Push over SSH Keys - Write failed: Broken pipe


I am unable to make the push working using SSH Keys. I generated the public key, added it to the profile but when I do git push it fails with Write failed: Broken pipe

userid@hostname :>git push --tags origin master
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly

It seems that the pub key is OK & accepted:

$ ssh -vt git@gitlab.ourdomain.com
OpenSSH_5.5p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /opt/openssh-5.5p1/etc/ssh_config
debug1: Connecting to gitlab.ourdomain.com [xxx.yyy.zzz.aaa] port 22.
debug1: Connection established.
debug1: identity file /home/userid/.ssh/id_rsa type 1
debug1: identity file /home/userid/.ssh/id_rsa-cert type -1
debug1: identity file /home/userid/.ssh/id_dsa type -1
debug1: identity file /home/userid/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5
debug1: match: OpenSSH_5.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client blowfish-cbc hmac-md5 none
debug1: kex: client->server blowfish-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'gitlab.ourdomain.com' is known and matches the RSA host key.
debug1: Found key in /home/userid/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive,hostbased
debug1: Next authentication method: publickey
debug1: Offering public key: /home/userid/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Write failed: Broken pipe

Any idea what could be wrong? Both the client and GitLab server runs on RedHat Enterprise Linux 6.5.

We run on GitLab 8.1.3
UPDATE: just upgraded to GitLab 8.2.0 and the issue still persists.

UPDATE2: added issue for it: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/971

Thank you.

We finally found the solution and it had nothing to do with GitLab itself. The issue was with the git OS user - it’s grace logins have expired. the ‘Broken pipe’ error with no other errors in the logs was really not very helpful in troubleshooting.

Thanks for reporting back. We could document it somewhere in the troubleshooting guide.

you can try remove ~/.ssh/know_hosts