I can clone with https but not with ssh

from a specific server I cannot git clone (or any other git command for that matter) over ssh I get

Write failed: Broken pipe
fatal: The remote end hung up upon initial contact

but no problem using https

(not self hosted using gitlab.com and not sure where I can get support)

If you run ssh -T git@gitlab.com from this environment, do you see a Welcome to GitLab, @username! message output?

after few 2~3 tries it does (tried with 2 different users)

retried a git clone right after it and it hangs

Hi @headgeeek, thanks for the update.

It’s odd that its working intermittently, normally I’d expect it to be all or nothing - either it works or it doesn’t.

To help troubleshoot further, can you run the following command until you get one failure and one success?

ssh -Tvvv git@gitlab.com

Comparing the verbose output from failed attempt with the successful attempt should provide some additional clues into why this is failing. https://docs.gitlab.com/ee/ssh/#testing-that-everything-is-set-up-correctly

I can’t reproduce it now it seems to work all the way sometimes very slowly sometime straight away that being said i have a git clone that is stuck for more than one hour then if fail

remote: Enumerating objects: 2815, done.
remote: Counting objects: 100% (2815/2815), done.
remote: Compressing objects: 100% (366/366), done.
Réception d’objets: 8% (1103/13786), 204.00 KiB | 1024 bytes/s

Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: fin de fichier prématurée
fatal: index-pack failed

at some point it started simply drop the connection and tell me to check if I have the rights to the remote (which I have) so let’s remove some unknown.

So create a brand new key from the server itself added to the agent, made sure it was the only key and no other were forwarded then retried again. it does kind of workish but it takes forever until it timeout while simply cloning the repository is a breeze on any other server/local machine…

I’m without any idea now

Could it be that we’re having the same issue? I’m having similar symptoms while pushing/pulling from my workstation. I made a post about it, but so far no solution.

Never mind, I just noticed that it must have something to do with my network configuration. Sorry for the distraction!

I am also facing same issue. anybody who can help?