Skip to content

GitLab public key not published

When you haven't pushed to a project, the instructions on the project page are basically:

git remote add origin git@gitlab.com:Nateowami/html5-video-trail.git
git push -u origin master

No mention that you need GitLab's public key and will face this:

The authenticity of host 'gitlab.com (104.210.2.228)' can't be established.
ECDSA key fingerprint is f1:d0:fb:46:73:7a:70:92:5a:ab:5d:ef:43:e2:1c:35.
Are you sure you want to continue connecting (yes/no)?

Just to be clear I understand why this message is shown, and that I could just say "yes."

But the SSH public key should be published, and at one time it was. Shouldn't this be displayed prominently? I thought I might find it in the help article about SSH keys, but no.

Finally, one thing I noticed is that initially the instructions told me to use https://gitlab.com/Nateowami/project.git, but now they say git@gitlab.com:Nateowami/project.git. Presumably, that's because I just added an SSH key. Hence, the change of instructions.

I only did that because there was a big orange message telling me that "You won't be able to pull or push project code via SSH until you add an SSH key to your profile," which for a moment I thought meant "You won't be able to pull or push project code at all." Having other options displayed prominently would help as well.