libgit2 / libgit2/libgit2sharp
Credential handling in 0.27.0-preview-0096 fails against VSTS/Azure
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Between versions preview-0034 and preview-0096 the credential handling changed and no longer works with VSTS/Azure
Include="LibGit2Sharp" Version="0.27.0-preview-0034" - works correctly
Include="LibGit2Sharp" Version="0.27.0-preview-0096" - authentication fails
Reproduction steps
string surl = "https://testsite.visualstudio.com/testsite/_git/Test";
string un = "pat";
string pwd = "";
var credentialsProvider = new CredentialsHandler((_url, _user, _cred) =>
new UsernamePasswordCredentials
{
Username = un,
Password = pwd
}
);
var references = Repository.ListRemoteReferences(surl, credentialsProvider);
Expected behavior
Should return references
Actual behavior
preview-0096 throws "this remote has never connected" error when authentication fails.
Version of LibGit2Sharp (release number or SHA1)
0.27.0-preview-0096
Operating system(s) tested; .NET runtime tested
OSx, .net core 5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with LibGit2Sharp 0.27.0-preview-0034 and preview-0096 using Repository.ListRemoteReferences, the VSTS/Azure URL, and the provided CredentialsHandler. Compare credential handling between the two versions; done means the preview-0096 case authenticates successfully and returns references instead of throwing "this remote has never connected."
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100