I am trying to connect to my repository on gitlab.com.
It used to work on my laptop both when I was at home and when I was at work. I was using ssh and had added the ssh keys to gitlab.
Suddenly some days ago it stopped working from home: I get:
$ git pull
Connection closed by 54.93.71.23
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
From within my work network, on the same laptop it works fine using ssh.
So now I switched to https and it works most of the time, but ocassionally it hangs and I get:
fatal: The remote end hung up unexpectedly
error: RPC failed; result=56, HTTP code = 0
From my work, this never happens, even if I try to commit the same changes just half an hour later.
What could be the problem with ssh? Am I behind a router firewall or did my provider change something?
EDIT 1: Output of git pull, adding LogLevel DEBUG3 to my .ssh/config:
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: setup [email protected]
debug1: kex: server->client aes128-ctr [email protected] none
debug2: mac_setup: setup [email protected]
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 54.93.71.23
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EDIT 2: The connection over https hangs ocassionally, but after many tests there were no MTU problems on my side. Probably the provider had some failures. Github and Bitbucket work perfectly fine over ssh.
Thanks!
LogLevel DEBUG3
to your.ssh/config
to get more detailed logs to see when the connection is breaking. This could me an MTU problem — the symptom “some long data transfers fail behind a home internet connection” is typical of MTU problems — though if that's the reason I'd expect more than the occasional hang with HTTPS as well.