libgit2 / libgit2/libgit2sharp

LibGit2Sharp.LibGit2SharpException: failed to parse supported auth schemes: The operation identifier is not valid

未關閉
#2,048 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

描述

// code start
LibGit2Sharp.PullOptions options = new LibGit2Sharp.PullOptions();
options.FetchOptions = new FetchOptions();
options.FetchOptions.CredentialsProvider = new CredentialsHandler(
(url, usernameFromUrl, types) =>
new UsernamePasswordCredentials()
{
Username = _gitCredsUser,
Password = _gitCredsPassword
});

        // User information to create a merge commit
        var signature = new LibGit2Sharp.Signature(
            new Identity(_gitUsername, _gitEmail), DateTimeOffset.Now);

        // Pull
        Commands.Pull(repo, signature, options);

// end code

I am using LibGit2Sharp dll of 0.26.0.0, from last few days I am getting "failed to parse supported auth scheme" error while doing git pull. My git repository is on GITHUB. I am sure there might security related changes done on github side. that's why this error come.

Reproduction steps
Expected behavior

git pull should work without error.

Actual behavior
Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

windows 10

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 LibGit2Sharp 0.26.2 中顯示的 Commands.Pull 呼叫及其 FetchOptions/CredentialsHandler 設定開始,然後在 Windows 10 上針對 GitHub 重現驗證失敗。比較其中涉及的受支援驗證方案,並驗證使用所回報認證資訊的 pull 能夠在沒有剖析錯誤的情況下完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp, git, github
領域
authentication
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。