GitLab permission denied connecting by ssh

952 Views Asked by At

I have a problem connecting to my GitLab account. I have generated the public key and added to my profile, but when I try to connect by ssh, it denies the permissions.

vicent@DARKNESS:~$ ssh [email protected]
The authenticity of host 'gitlab.com (54.93.71.23)' can't be established.
ECDSA key fingerprint is (myfingerprint).
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,54.93.71.23' (ECDSA) to the list of known hosts.
Permission denied (publickey).

Regards.

1

There are 1 best solutions below

0
On

I dont think you can directly login as git user on the gitlab.com server, which is not your own server, but the Gitlab's public instance one. If you want to push code to your repo hosted on gitlab.com through SSH, use git:

git remote add origin [email protected]:username_or_namespace/project_name.git
git push origin master