7

I have setup Gitlab in ubuntu server, it's working fine. I access Gitlab by url http://123.456.789.100 and Gitlab login details

 username:admin@local.host 
 password:123456

Then I wanted to set Gitlab CI for test the code before it merge. I have done with setting Gitlab CI by using the link. I have done setting up every thing except Runners. While set ssh git@<your gitlab url> in Runner I face error

 ssh git@123.456.789.100
 it prompts me for password

git@123.456.789.100's password: I entered password(123456) of gitlab's that I used to enter into gitlab server, then I have this error

Permission denied please try again

But I got Gitlab CI web interface by http://123.456.789.100:8081(I did set Gitlab-ci to listen on 8081 port). Then I entered Gitlab server's username and password as admin@local.host and 123456, I got Invalid credentials.

What would be the wrong I made?

xpt
  • 20,363
  • 37
  • 127
  • 216
user3002180
  • 431
  • 6
  • 19
  • 1
    Why are you trying to ssh into the gitlab instance from the runner? – Suever Jan 15 '16 at 22:30
  • As @Suever mentioned before I don't know neither why are you trying to ssh into gitlab from the runner. When registering a new runner, it will ask for the gitlab instance url, then the token and other options. Here is the link to the official documentation https://docs.gitlab.com/runner/register/index.html#gnulinux – Felipe Toledo Mar 25 '19 at 02:55
  • I believe it should be gitlab token instead of password. – Ashwin Parmar Nov 23 '19 at 21:59

1 Answers1

5

When you put git@ in the ssh it’s actually trying to use the git user on the machine that is running GitLab (rather than some GitLab controlled user).

The easiest fix for this would be to create an SSH key on the runner in question and then add that SSH key to GitLab. That will allow the runner to access the GitLab instance and clone and repositories you need.

For more help getting started, see this page on Configuring GitLab runners.

francescalus
  • 30,576
  • 16
  • 61
  • 96
olearycrew
  • 376
  • 2
  • 4