'How do you find your GitLab host name (to test your SSH key)?
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:
I'm trying to now complete the optional 6th step, testing the key:
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?
Solution 1:[1]
Open your GitLab account or repository online (any site will do, just make sure your logged in). Then checkout the URL. The domain together with the TLD will be your hostname. E.g.
www.gitlab.your.institution.com/...
So in this case gitlab.your.institution.com is your hostname.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nick Halden |


