LibGit2SharpException: could not find appropriate mechanism for credentials

オープン
#2,087 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp, git
領域
tooling

調査の方向性

LibGit2Sharp v0.30.0 を使用して Windows 11 で clone の失敗を再現し、CloneOptions、FetchOptions、ProxyOptions から始めて、v0.26.2 との認証情報の設定を比較します。Core/Ensure.cs、Core/Proxy.cs、Repository.cs の報告されたパスを調査し、その後 #2065 とリリースの変更を使って、認証情報の動作が変更されたかどうか、および修正後にどうなるべきかを確認します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

libgit2/libgit2sharp のほかの issue

libgit2/libgit2sharp の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。