Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository.ListRemoteReferences needs CustomHeaders setting option #2136

Open
rmadani opened this issue Dec 26, 2024 · 2 comments
Open

Repository.ListRemoteReferences needs CustomHeaders setting option #2136

rmadani opened this issue Dec 26, 2024 · 2 comments

Comments

@rmadani
Copy link

rmadani commented Dec 26, 2024

Similar to FetchOptions used for PullOptions, CloneOptions or PushOptions, Repository.ListRemoteReferences needs to somehow expose a CustomHeaders option. Without it, a request to an on-premise Azure DevOps Server (in my case version 2020), throws the following exception using a Personal Access Token for authentication.

Unhandled exception: too many redirects or authentication replays | LibGit2Sharp.LibGit2SharpException | too many redirects or authentication replays

CustomHeaders are needed to enforce Basic Authorization.

Thank you.

@rmadani rmadani changed the title Repository.ListRemoteReferences needs CustomHeader setting optipn Repository.ListRemoteReferences needs CustomHeaders setting option Dec 26, 2024
@ethomson
Copy link
Member

ethomson commented Dec 27, 2024

You're welcome to use custom headers to pass information to the server, but I don't think that I understand. Because you don't need to use custom headers for authentication. You're welcome to use a personal access token using basic authentication. Just set it in the username and password information.

You can treat them as if they were a username/password combination. This is what I do, and this is how we intended you to use personal access tokens when we added them to Azure DevOps.

@rmadani
Copy link
Author

rmadani commented Dec 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants