libgit2 / libgit2/libgit2sharp

503 - During clone

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

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

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

説明

Version of LibGit2Sharp (release number or SHA1)

Master -7f59d22c

Operating system(s) tested; .NET runtime tested

I receive a "503" when trying to clone a repo from our self host git-service (gitea)

url looks like this:
https://{server}/git/{orga}/{repo}

cloning via git command line works without any problem:
git clone https://mytoken@{server}/git/{orga}/{repo}

i'm passing the token via cloneoptions.Credentialsprovider

 var co = new CloneOptions();
            co.CredentialsProvider = (_url, _user, _cred) =>
                new UsernamePasswordCredentials
                {
                    Username = "mytoken",
                    Password = string.Empty
                };

            string clonedRepoPath = Repository.Clone(url, scd.DirectoryPath, co);

Stacktrace:
LibGit2Sharp.LibGit2SharpException : request failed with status code: 503

   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in C:\Users\stefan.kneidl\Source\Repos\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 154
   at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in C:\Users\stefan.kneidl\Source\Repos\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 172
   at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in C:\Users\stefan.kneidl\Source\Repos\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 276
   at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in C:\Users\stefan.kneidl\Source\Repos\libgit2sharp\LibGit2Sharp\Repository.cs:line 793
   at LibGit2Sharp.Tests.CloneFixture.CanCloneGitea(String url) in C:\Users\stefan.kneidl\Source\Repos\libgit2sharp\LibGit2Sharp.Tests\CloneFixture.cs:line 55

As additional information when trying to access the git server via browser:
https://{myserver}/git
returns: The service is not available. Please try again later.
https://{myserver}/git/ works as intended

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

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

はじめの一歩

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

調査の方向性

LibGit2Sharp.Tests/CloneFixture.cs の CanCloneGitea から始め、Core/Proxy.cs と Core/Ensure.cs を通じて Repository.Clone を追跡してください。失敗する self-hosted URL と CredentialsProvider を、動作するコマンドラインの clone と比較し、サーバーの /git と /git/ に対する異なる応答も含めて確認してください。clone の動作が説明または修正され、焦点を絞った回帰テストでカバーされれば完了です。

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

評価

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

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

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