libgit2 / libgit2/libgit2sharp

LibGit2SharpException: could not find appropriate mechanism for credentials

未关闭
#2,087 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C#
星标
3.5k
派生
925
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 Windows 11 上使用 LibGit2Sharp v0.30.0 重现克隆失败,并从 CloneOptions、FetchOptions 和 ProxyOptions 入手,将凭据设置与 v0.26.2 进行比较。检查 Core/Ensure.cs、Core/Proxy.cs 和 Repository.cs 中报告的路径,然后利用 #2065 和发布版本的变更,确定凭据行为是否发生了变化,以及修正后的结果应当是什么。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, git
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。