libgit2 / libgit2/libgit2sharp

Cannot push:failed to write chunk header

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

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

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

説明

I used 0.25.0-preview-0073 with Core

`using (var repo = new Repository(RepositoryPath))
{
// Stage the file
Commands.Stage(repo, "*");

// Create the committer's signature and commit
Signature author = new Signature("translator", "example.com", DateTime.Now);
Signature committer = author;

// Commit to the repository
Commit commit = repo.Commit($"Resx files updated {DateTime.Now}", author, committer);

Remote remote = repo.Network.Remotes["origin"];
var options = new PushOptions
{
    CredentialsProvider = (_url, _user, _cred) =>
       new UsernamePasswordCredentials
       {
           Username = _settings.GitUserName,
           Password = _settings.GitPassword
       }
 };
 repo.Network.Push(remote, @"refs/heads/master", options);

} `

And I get error when I try to push a large file ( > 1GB)

LibGit2Sharp.LibGit2SharpException: failed to write chunk header: The connection with the server was terminated abnormally

at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in C:\projects\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 136
at LibGit2Sharp.Core.Proxy.git_remote_push(RemoteHandle remote, IEnumerable1 refSpecs, GitPushOptions opts) in C:\projects\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 2225 at LibGit2Sharp.Network.Push(Remote remote, IEnumerable1 pushRefSpecs, PushOptions pushOptions) in C:\projects\libgit2sharp\LibGit2Sharp\Network.cs:line 372
at VA.Services.BitbucketService.d__4.MoveNext() in D:\Sources\VA\migrationTool\VA.Services\BitbucketService.cs:line 88

With small file works fine

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

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

はじめの一歩

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

調査の方向性

1 GBを超えるファイルで push を再現し、示されている LibGit2Sharp コードを使って小さいファイルの場合と比較してください。LibGit2Sharp/Network.cs:372 と Core/Proxy.cs:2225 から開始し、その後 Core/Ensure.cs:136 までエラーを追跡してください。大きな push が異常終了しなくなるか、制限と必要な条件が文書化されれば完了です。

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

評価

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

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

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