0

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 git@gitlab.com
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.

Miikka
  • 4,573
  • 34
  • 47
Viherbar
  • 239
  • 3
  • 13

1 Answers1

0

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 git@gitlab.com:username_or_namespace/project_name.git
git push origin master
Pierre
  • 2,552
  • 5
  • 26
  • 47