libgit2 / libgit2/libgit2sharp

"LibGit2Sharp.LibGit2SharpException: could not initialize security context" while cloning

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

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

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

説明

Reproduction steps

providing valid credential to the CredentialProvider using the below snippet
cloneOptions.FetchOptions.CredentialsProvider = (url, usernameFromUrl, password) =>
new UsernamePasswordCredentials{ Username = gitCredential.UserName, Password = gitCredential.Password };

cloneOptions.FetchOptions.CertificateCheck = (certificate, valid, host) => true;

Repository.Clone(Credential.RepositoryUrl, workingDirectory, cloneOptions);

Expected behavior

Should clone the repository to the working directory.

Actual behavior

LibGit2Sharp.LibGit2SharpException: could not initialize security context:
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in //LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in /
/LibGit2Sharp/Core/Ensure.cs:line 172
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 824

Version of LibGit2Sharp (release number or SHA1)

v0.30.0

Operating system(s) tested; .NET runtime tested

.NET8, windows OS

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

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

はじめの一歩

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

調査の方向性

.NET 8 と Windows で、提供されている CredentialProvider、CertificateCheck、Repository.Clone のスニペットを使用してクローンの失敗を再現することから始めます。報告されたパスを Core/Ensure.cs、Core/Proxy.cs、Repository.cs を通じて追跡し、その後、セキュリティコンテキスト例外なしでクローンが完了することを確認します。

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

評価

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

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

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