the error "too many redirects or authentication replays libgit2shap" come up after upgrading from 0.28 to 0.30 on Fetch

Open
#2,095 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, git
Domain
tooling

Research direction

Start with the provided Repository.Init and Commands.Fetch reproduction, especially FetchOptions.CredentialsProvider, and compare behavior between LibGit2Sharp 0.28, 0.29, and 0.30. Confirm the result in the reported environment and identify whether authentication or redirect handling changed; done means fetch completes normally with the supplied credentials and the required runtime and OS details are documented.

Written by the indexing model from the issue text.

Description

Reproduction steps

upgrading from 0.28 to 0.30 on Fetch

Repository.Init(_gitRootPath);
using var repo = new Repository(gitRootPath);
Remote remote = repo.Network.Remotes.Add(VcConstants.ORIGIN, vcSettings.GitRepoUrl);
var remoteRefSpecs = remote.FetchRefSpecs.Select(x => x.Specification);
Commands.Fetch(repo, remote.Name, refSpecs, new FetchOptions
{
CredentialsProvider = (
, _, _) => new UsernamePasswordCredentials
{ Username = vcSettings.GitUsername, Password = vcSettings.GitPassword },
Prune = true
}, string.Empty);

Expected behavior

should fetch normally with exceptions

Actual behavior

throw too many redirects or authentication replays

Version of LibGit2Sharp (release number or SHA1)

0.29.0 & 0.30.0

Operating system(s) tested; .NET runtime tested
Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libgit2/libgit2sharp

All issues in libgit2/libgit2sharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.