Paul Smith
Paul Smith

Reputation: 369

SSH-Key not recognized "receive packet: type 51" in Gitlab-CE

In my installation of Gitlab Community Edition 14.8.2, clone/push/etc.-actions do not work via SSH. The same actions via HTTPS work as usual. Also SSH actions on gitlab.com work as usual. Multiple users, whose SSH-keys worked a few weeks ago have this problem. Users log in via LDAP. The server runs Ubuntu 20.04.

Gitlab Docs recommend ssh -Tvvv [email protected]. When I do this for my own domain, I get this:

[...]
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user/.ssh/id_ed25519 ED25519 SHA256:a5B[...]
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51

The authentication process ends there. When I do it for gitlab.com the receive packet is 60 instead of 51. And I get successful authentication.

Tried solutions

I don't know what to do now. As SSH works on gitlab.com, there has to be a solution for this. Could someone help me out to find it?

As I'm not quite sure, what exactly goes wrong, any help to find that out would also be greatly appreciated.

Versions:

GitLab 14.8.2
GitLab Shell 13.23.2
GitLab Workhorse v14.8.2 

Upvotes: 3

Views: 4772

Answers (1)

Clément Moyroud
Clément Moyroud

Reputation: 11

I just encountered the issue, and our problem was that the local git account had the wrong home directory in /etc/passwd. This was due to a gitlab.rb SNAFU due to our use of NFS for some of the data.

Because of that the ~.ssh dir was not in the right location, so no keys were available.

Upvotes: 1

Related Questions