libgit2 / libgit2/libgit2sharp
Exception when pushing to remote
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
I am getting the following exception when pushing to a running git daemon (with receive-pack enabled). the exception only occurs when the daemon is running on a separate machine, not when I run the deamon on the same machine as I am pushing to.
LibGit2Sharp.LibGit2SharpException: Error receiving socket data: An existing connection was forcibly closed by the remote host.
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_push_finish(PushSafeHandle push)
at LibGit2Sharp.Network.Push(Remote remote, IEnumerable1 pushRefSpecs, PushOptions pushOptions, Signature signature, String logMessage) at LibGit2Sharp.Network.Push(Remote remote, String pushRefSpec, PushOptions pushOptions, Signature signature, String logMessage) at LibGit2Sharp.NetworkExtensions.Push(Network network, IEnumerable1 branches, PushOptions pushOptions)
the git daemon is run using this command: git daemon --base-path=. --enable=receive-pack --export-all --verbose
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Network.Push and the git_push_finish call shown in the stack trace. Reproduce the push against a separate machine using the provided git daemon command, compare it with a same-machine push, and trace where the remote closes the connection. Done means the remote push no longer raises this exception and the differing environments are covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100