I’m stuck with creating a pipeline for GitLab with ssh keys

1,288 views
Skip to first unread message

toper halo

unread,
Dec 9, 2014, 7:00:47 PM12/9/14
to go...@googlegroups.com

Hi people, I’m new to go.cd and I’m stuck with creating a pipeline for GitLab either with ssh keys or through http link.

I installed go.cd and GitLab on the same ubuntu 14 server and created a private repo called “test" in gitlab.

I found instructions

 
which I followed and generated (without a pass phrase) keys for go user. I copied from /var/go/.ssh/id_rsa.pub To deploy keys tab in my project called test ( I figured out that I have to use Deploy keys for GitLab. So when I create a project on gitlab  I can add a key in Project Settings - Deploy Keys).



Then there are two ways I can point go.cd to use my gitlab repo


When I create a pipeline on the second step (materials)

I set material type - git

 

When I use http link to my project and put in url box and click check connection I get error like this:

Repository ... not found! : Error performing command: --- Command --- git ls-remote ... --- Environment --- {} --- INPUT ---- --OUTPUT --- --- ERROR --- ERROR: fatal: could not read Username for ... No such device or address ---


looks ok (?), because repo is private and I have to provide username and pass somehow


When I use ssh link and hit test connection I get:

Repository ssh://git@...:1299/user/test.git not found! : Error performing command: --- Command --- git ls-remote ssh://git@...:1299/user/test.git --- Environment --- {} --- INPUT ---- --OUTPUT --- --- ERROR --- ERROR: Host key verification failed. ERROR: fatal: Could not read from remote repository. ERROR: ERROR: Please make sure you have the correct access rights ERROR: and the repository exists. ---


When I manually run ls-remote from go user:

go@coolserver:/root$ git ls-remote ssh://git@reallycoolserver:customportforssh/cooluser/test.git

I get:

fatal: failed to stat '.': Permission denied


How can I fix it or make a workaround?


There is one more thing I do not understand. Why do I need to install agents? What are they for?

toper halo

unread,
Dec 10, 2014, 5:13:36 AM12/10/14
to go...@googlegroups.com
ok I found the solution. I should run it outside root dir!

среда, 10 декабря 2014 г., 3:00:47 UTC+3 пользователь toper halo написал:
Reply all
Reply to author
Forward
0 new messages