3

I have 2 internet connections (let's call them Con1, Con2), I'm trying to push my commits to the origin over Con1, but the git push is not successful. It works just fine over Con2. Git pull, fetch work fine over both, it's just git push that fails. I'm using Git over SSH. I get the below error-

Enumerating objects: 16, done.
Delta compression using up to 4 threads
Total 9 (delta 6), reused 0 (delta 0)
POST git-receive-pack (2157 bytes)
Error encountered while pushing to the remote repository: Git failed with a fatal error.
the remote end hung up unexpectedly
the remote end hung up unexpectedly
RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
Everything up-to-date

Speed/Bandwidth is not an issue, as Con1 on which git push fails is a higher speed network whereas the git push is successful over the lower speed network (Con2). I tried setting the http.postBuffer but no luck.

git config --global http.postBuffer 1048576000

What could be the issue?

Christoph
  • 6,841
  • 4
  • 37
  • 89
  • 1
    If you're getting messages from OpenSSL, you're not using SSH, but HTTPS. Also, unless you have a proxy or a known broken server, increasing `http.postBuffer` won't help and will just waste memory. – bk2204 May 05 '20 at 08:51
  • @Christoph I have been facing this for days, couldn't get it to resolve, hence posted the question. – AdityaShrivastava May 05 '20 at 09:17
  • @bk2204 I'm using a VPN, but this fails even without being connected to VPN. Whereas on the connection (that works), the git push is successful irrespective of VPN connectivity. I require the VPN only for DB connectivity, so i can do without it for git operations. – AdityaShrivastava May 05 '20 at 09:19
  • 1
    Have a look [here](https://stackoverflow.com/q/46232906/5784831)? – Christoph May 05 '20 at 12:42
  • @Christoph I tried almost all of the fixes, but none of them work. May I mention that i am using git lfs, tried setting compression options as a result as well. Could be the LFS misbehaving, but then it should error out for both connections, what's mind boggling is that it's working over the slower network. Also, I don't want to nuke the repository or switch to https as the push is working over the slower network, allowing me to work at least. But i plan to discontinue the slower connection soon, hence my dillemna. I'll post my updates if I'm able to figure out anything. – AdityaShrivastava May 06 '20 at 06:40
  • @bk2204 it's definitely ssh and not http – AdityaShrivastava May 06 '20 at 06:43
  • 1
    See my edit to the question - I think you somebody who knows the details. This is beyond my head. Concerning tags: I tried to focus on git / git-lfs. Hopefully somebody knows what to do. Let me know if you don't find a solution. By the way: when you use the slow connection - what does `git remote show origin` say? – Christoph May 06 '20 at 11:30
  • 1
    If you are seeing curl and OpenSSL, that is definitely, 100% HTTPS. Git pushes over SSH do not use libcurl in any way; I'm certain of that, and I contribute to Git. If you switch to SSH, it may work for you. – bk2204 May 06 '20 at 22:27
  • @Christoph You pointed me in the correct direction, i could see that the URLs are being pointed to http. I just remembered that i had cloned the repo twice, one with ssh & one without. And accidentally deleted the ssh one. – AdityaShrivastava May 07 '20 at 05:34
  • @bk2204 You are spot on, upon doing a git remote -v, i could see that it's not SSH. Maybe the new internet provider is blocking the push url for some reason, can't say. I'll re-clone the repo (I was dreading this part) over ssh and give it a go. Thanks a lot! – AdityaShrivastava May 07 '20 at 05:35
  • Then check `git config --list --show-origin`. – Christoph May 07 '20 at 06:02
  • Unfortunately, accessing the repo via SSH will not work as we use LFS, which does not support SSH. Back to square one. I think i will need to check with my provider i think. – AdityaShrivastava May 07 '20 at 07:45

0 Answers0