pushing failed: failed to parse supported auth schemes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- git, javascript, node.js
- Lĩnh vực
- authentication
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi trong Remote.push bằng credentials callback và môi trường được báo cáo gồm Node v12.16.3, Windows và nodegit 0.26.5. So sánh các lỗi với mật khẩu không rỗng và mật khẩu rỗng, sau đó lần theo đường dẫn xác thực của push; được xem là hoàn tất khi các push lên GitLab hoàn tất thành công bằng documented credentials flow.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
System information
- node version: v12.16.3
- npm or yarn version: 6.14.4
- OS/version/architecture: win32/10.0.19041/x64
- Applicable nodegit version: 0.26.5
I am working on a script that clones a repo from gitlab, does some changes and the commits ans pushes these changes back to the repo.
The gitlab url is https://gitlab.com/*my_name*/*repo_name*.git.
Cloning and commiting works but I am unable to push the commit.
This is my code:
const repo = await nodegit.Clone(...)
// do changes
const index = await repo.refreshIndex();
await index.addAll();
await index.write();
const oid = await index.writeTree();
const head = await nodegit.Reference.nameToId(repo, "HEAD");
const parent = await repo.getCommit(head);
const author = nodegit.Signature.now('*my_name*',
'*my@emailaddress*');
const commitid = await repo.createCommit("HEAD", author, author, "test message", oid, [parent]);
const commit = await repo.getCommit(commitid);
console.log(commit.message(), commit.author().name(), commit.date()); // <- logs correct data
const remote = await repo.getRemote('origin');
try {
const pushed = await remote.push(
["refs/heads/master:refs/heads/master"],
{
callbacks: {
credentials: function(url, userName) {
return nodegit.Cred.userpassPlaintextNew('*my_name*', '*my_password*')
}
}
}
);
} catch (e) {
console.log(e);
}
[Error: failed to parse supported auth schemes: The operation identifier is not valid.
] {
errno: -1,
errorFunction: 'Remote.push'
}
while messing around I found that leaving the password empty causes a different error:
return nodegit.Cred.userpassPlaintextNew('*my_name*', '') // <- empty string
[Error: too many redirects or authentication replays] {
errno: -1,
errorFunction: 'Remote.push'
}
I thought this should cause an unauthorized error.
- Ngôn ngữ chính
- JavaScript
- Star
- 5.8k
- Fork
- 704
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nodegit/nodegit
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
DiffLine.rawContent() returns string instead of Buffer, causing non-UTF-8 encoding corruption Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Prebuilt Binaries for node 22 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của nodegit/nodegit
Issue tương tự
-
Edit: CW+ Đang mởchannels:edit check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
스택 PR 머지 시 하위 PR base 재지정 단계 부재 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
idean3885/claude-ops-agent#521 ·
-
[Nytt ikon]: menu-search Đang mởforespørsel 🥰 ikoner 🖼 nytt ✨
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100