libgit2 / libgit2/libgit2sharp
LibGit2Sharp.LibGit2SharpException | too many redirects or authentication replays
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
I am using LibGit2Sharp (version 0.28.0) with a Personal Access Token to access AZURE Repository.
UsernamePasswordCredentials =>
{
Username = "pat",
Password = PersonalAccessToken
}
CustomHeader => "Authorization: Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes($":{PersonalAccessToken}"))}"
Everything was working as expected until last week, when I started encountering exceptions while trying to interact with the remote repository (e.g., clone, pull, push).
Clone failed. | LibGit2Sharp.LibGit2SharpException | too many redirects or authentication replays
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in //LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in //LibGit2Sharp/Core/Ensure.cs:line 172
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in //LibGit2Sharp/Core/Proxy.cs:line 278
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in //LibGit2Sharp/Repository.cs:line 824
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported call path in Core/Ensure.cs, Core/Proxy.cs, and Repository.cs, focusing on Repository.Clone in LibGit2Sharp 0.28.0. Reproduce the authentication failure against an Azure repository using the shown credentials and headers, then document the cause and verify that clone, pull, and push no longer produce the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, git
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100