libgit2 / libgit2/libgit2sharp
"Too many redirects or authentication replays" when pushing changes
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi,
have been search for this for a day and some people mentioned it is a bug.
I can clone, stage and commit, but the push always fails.
Command line push works fine
ClonedRepoPath = @"c:\temp\test"
_params.ClonedRepoPath = "http://172.16.40.129/test/Interfaces.git"
clone:
` if (!Directory.Exists(_params.ClonedRepoPath))
{
Directory.CreateDirectory(_params.ClonedRepoPath);
}
var result = Repository.Clone(_params.ServerPath, _params.ClonedRepoPath);
`
stage, commit and push
`
using (var repo = new Repository(_params.ClonedRepoPath))
{
if (repo.Network.Remotes.All(r => r.Name != name))
{
repo.Network.Remotes.Add(name, _params.ServerPath);
}
Commands.Stage(repo, "*");
if (repo.RetrieveStatus().IsDirty)
{
Commit commit = repo.Commit("CodeGen commit", new Signature(_params.UserName, _params.EmailAddress, System.DateTimeOffset.Now)
, new Signature(_params.UserName, _params.EmailAddress, System.DateTimeOffset.Now));
var options = new PushOptions{
CredentialsProvider = (_url, _user, _cred) => new DefaultCredentials()
};
repo.Network.Push(repo.Network.Remotes["origin"], @"refs/heads/master", options);
}
}
`
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.
Hướng nghiên cứu
Không có tệp repository hoặc bài kiểm thử nào được nêu. Bắt đầu với lệnh gọi Push và PushOptions/CredentialsProvider được trình bày trong báo cáo, sau đó so sánh thiết lập xác thực của nó với lệnh push từ dòng lệnh đang hoạt động. Công việc được xem là hoàn tất khi tái hiện được lỗi và xác định được thay đổi cấu hình hoặc mã khiến các lệnh push từ thư viện hoạt động thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, git
- Lĩnh vực
- networking, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100