libgit2 / libgit2/libgit2sharp
Cannot push:failed to write chunk header
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 3.5k
- Forks
- 925
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce el push con un archivo de más de 1 GB y compáralo con el caso de un archivo pequeño usando el código de LibGit2Sharp mostrado. Empieza en LibGit2Sharp/Network.cs:372 y Core/Proxy.cs:2225; después, sigue el error a través de Core/Ensure.cs:136. Se considera terminado cuando el push grande ya no finaliza de forma anómala, o cuando se documentan la limitación y las condiciones necesarias.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, git
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100