You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
I get LibGit2Sharp.LibGit2SharpException:“too many redirects or authentication replays” when I push the repository.
I use username&&password in CredentialsProvider
The text was updated successfully, but these errors were encountered: