libgit2 / libgit2/libgit2sharp
LibGit2SharpException: could not find appropriate mechanism for credentials
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps
Upgraded from v0.26.2 to v0.30.0, had compilation issues. Fair enough, we were quite out of date.
We changed the credentials provider as this was now located in the FetchOptions (see #2065).
I even tried setting the ProxyOptions.ProxyType to None as that was now Auto by default.
Has there anything changed regarding credentials between those versions? I didn't immediately spotted something on the releases/changes page.
Expected behavior
Everything keeps working as normal.
Actual behavior
Exception is thrown when trying to clone a repository:
LibGit2Sharp.LibGit2SharpException: could not find appropriate mechanism for credentials
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 136
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 810
Version of LibGit2Sharp (release number or SHA1)
v0.30.0
Operating system(s) tested; .NET runtime tested
Windows 11
.NET Framework 4.8
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
Reproduce the clone failure on Windows 11 with LibGit2Sharp v0.30.0 and compare the credential setup with v0.26.2, starting from CloneOptions, FetchOptions, and ProxyOptions. Inspect the reported paths in Core/Ensure.cs, Core/Proxy.cs, and Repository.cs, then use #2065 and the release changes to establish whether credential behavior changed and what a corrected outcome should be.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100