Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you find your GitLab host name (to test your SSH key)?

Tags:

ssh

gitlab

I just created a personal GitLab account and am trying to follow the steps on

https://gitlab.com/help/ssh/README

to deploy my SSH key to GitLab. I've completed up to step 5, and see my SSH key among 'Your SSH keys' in my User Settings -> SSH keys:

enter image description here

I'm trying to now complete the optional 6th step, testing the key:

enter image description here

My GitLab username is khpeek, so I guessed my 'GitLab domain' is gitlab.com/khpeek. However, the test command

ssh -T [email protected]/khpeek 

yields an error message:

ssh: Could not resolve hostname gitlab.com/khpeek: Name or service not known 

Apparently this is the wrong hostname. What would be the right one?

like image 626
Kurt Peek Avatar asked Apr 10 '17 09:04

Kurt Peek


People also ask

Do I need SSH key for GitLab?

In order to communicate over SSH (Secure Shell), you must have an SSH key pair. Each SSH key pair has a public and a private key.

What is SSH in GitLab?

The SSH stands for Secure Shell or Secure Socket Shell used for managing the networks, operating systems and configurations and also authenticates to the GitLab server without using username and password each time. You can set the SSH keys to provide a reliable connection between the computer and GitLab.


1 Answers

If you're using Gitlab on gitlab.com then the domain is simply gitlab.com so you should run ssh -T [email protected]

like image 199
Jawad Avatar answered Oct 11 '22 12:10

Jawad