libgit2sharp
libgit2sharp copied to clipboard
Cannot push:failed to write chunk header
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, IEnumerable
1 pushRefSpecs, PushOptions pushOptions) in C:\projects\libgit2sharp\LibGit2Sharp\Network.cs:line 372
at VA.Services.BitbucketService.<Upload>d__4.MoveNext() in D:\Sources\VA\migrationTool\VA.Services\BitbucketService.cs:line 88
With small file works fine
Same here
Did anyone find a solution to this problem?
I have the following scenario:
- a webapp in Azure trying to push big commit (320MB) to Azure DevOps
- the app throws this thread's exception after 10m
- if I try the same operation in my local the push is succesful.
What can I try to debug this situation?
I have the same problem. This is apparently still a bug in the push operation.