LibGit2Sharp.LibGit2SharpException:“too many redirects or authentication replays”
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Begin at the PushOptions.CredentialsProvider and repo.Network.Push calls shown in the report, then reproduce the push with the stated username and password setup. Compare the resulting redirect or authentication behavior with the configured remote; done requires identifying a reproducible cause and corrective change, but the issue names no source file or test target.
Written by the indexing model from the issue text.
Description
I get LibGit2Sharp.LibGit2SharpException:“too many redirects or authentication replays” when I push the repository.
I use username&&password in CredentialsProvider
using var repo = new Repository(rootPath);
var options = new PushOptions
{
CredentialsProvider = (url, user, cred) =>
new UsernamePasswordCredentials { Username = userName, Password = password },
};
var remoteName = "origin";
var remote = repo.Network.Remotes.FirstOrDefault(r => r.Name == remoteName);
if (remote == null)
{
repo.Network.Remotes.Add(remoteName, res);
}
var branch = repo.Branches["main"];
if (branch == null)
{
branch = repo.CreateBranch("main");
}
repo.Branches.Update(branch, b => b.Remote = remoteName, b => b.UpstreamBranch = branch.CanonicalName);
repo.Network.Push(branch, options);
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
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.
More from libgit2/libgit2sharp
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
libgit2/libgit2sharp#2193 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
libgit2/libgit2sharp#2192 · 1 comment ·
-
Website is down Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
libgit2/libgit2sharp#2191 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
libgit2/libgit2sharp#2187 · 2 comments ·
All issues in libgit2/libgit2sharp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100