Open AndersBillLinden opened 6 months ago
I'm getting the same error as @AndersBillLinden on the Clone request. using LibGit2Sharp v0.28.0 and LibGit2Sharp.NativeBinaries v2.0.320
I am seeing the same error on LibGit2Sharp v0.30.0, any update on this?
I have the following code and have tried with CustomHeader
and the UsernamePasswordCredentials
set for the CredentialsProvider and get a 400 response back from Clone
. The following code uses just the CustomHeader
and gets the same 400 response.
sourceUrl is https://{orgName}@dev.azure.com/{orgName}/{projectName}/_git/{repoName}
var repoPath = LibGit2Sharp.Repository.Clone(
sourceUrl,
workingDirectoryPath,
new CloneOptions
{
Checkout = true,
FetchOptions =
{
Prune = true,
CustomHeaders = new[]
{
"Authorization: Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(
string.Format(CultureInfo.CurrentCulture, "{0}:{1}", "", _azureDevOpsOptions.PatToken)))
}
}
});
Using just the CredentialProvider I get the error that the OP reported, have a brand new PAT token so I know that's not the issue! So I have some questions because this was working a few months back:
I am trying to pull from a github repository with the following code getting an exception "too many redirects or authentication replays". Why? If I failed to login, I expect an exception telling me that. Also the exception suggests that it retried whatever it did a couple of times although "replay" needs clarification. Where do I configure the number of retries if any? I have no interest in trying more than once. I have checked the credentials many times and also I tried to pull from an azure devops repo with the same result.