Skip to content

LibGit2Sharp.LibGit2SharpException | too many redirects or authentication replays #2117

Open
@belkhir-aziz

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions