Cloning workflowLibs.git with ssh

194 views
Skip to first unread message

Sverre Moe

unread,
Jun 28, 2016, 6:27:14 AM6/28/16
to Jenkins Users
Since the jenkins server is authenticated and using https I have to use ssh:// to clone the workflowLibs.git repository.
I have configured jenkins with SSHD and enabled it on port number xxxxx.
I am not sure which USERNAME to use.

I tried setting a password for the jenkins user, but it wouldn't work cloning workflowLibs.git with that user.
git clone ssh://jen...@jenkins.company.com:xxxxx/workflowLibs.git

Cloning into 'workflowLibs'...
Permission denied (publickey).
fatal
: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

For now I have initialized the repository directly on the server:/var/lib/jenkins/workflow-libs and manually transferred the files over. It is not a method I would rely on, but it work for now to get my build scripts in CPS global lib.

Kohsuke Kawaguchi

unread,
Jun 28, 2016, 6:14:07 PM6/28/16
to Jenkins Users
You should use your user name on Jenkins. You'll also need to register your public key on Jenkins. See http://LOCATION/me/configure

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/534e6cde-aaa0-4d58-9279-7d89d4dccd57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sverre Moe

unread,
Jun 29, 2016, 2:45:48 AM6/29/16
to Jenkins Users
Yes, that worked. Thanks.

Kohsuke Kawaguchi

unread,
Jun 29, 2016, 11:40:48 AM6/29/16
to Jenkins Users
I'll improve the docs. I also want to look into why authentication over HTTPS is not supported. That is a painful bug now that we set up authentication for new instances more aggressively for obvious reasons...

Reply all
Reply to author
Forward
0 new messages