Pipeline: connection is not authenticated

634 views
Skip to first unread message

Sverre Moe

unread,
Jun 29, 2016, 2:54:15 AM6/29/16
to Jenkins Users
Our git remote server is Gitolite and is has the public key of all the users

This has worked in Jenkins for standard project types, FreeStyle, Maven, Multiconfiguration. The user jenkins
Now using Pipeline, it fails to authenticate indexing the added repository. I have not set up any credentials for the repository. I had the same problem on a local test instance of Jenkins where using credentials solved that. However I do not have access to neither the password nor the private key of the user git on our company remote git server.

Branch Indexing LogStarted
Setting origin to ssh://g...@git.company.com/project.git
Fetching origin...
FATAL
: Failed to recompute children of mcs-gui
java.lang.IllegalStateException: Cannot open session, connection is not authenticated.

I have no problem accessing the repository on the command line with the user jenkins.

Sverre Moe

unread,
Jun 30, 2016, 6:54:00 AM6/30/16
to Jenkins Users
Is there no way to use Multibranch Pipeline without using stored Credentials on the GitSCMSource?
On other project types it is enough that the jenkins user's public key is stored on the git server.

Björn Pedersen

unread,
Jun 30, 2016, 8:32:46 AM6/30/16
to Jenkins Users
From the error message it looks like  a jgit acces. I think the buitl-in jgit will not read the ssh key unless it is stored in the credentials( as it seems from your description, all user pub keys are allowed, so you just need
to add the user 'jenkins' private key (not the git one).

Björn

Sverre Moe

unread,
Jul 1, 2016, 2:39:23 AM7/1/16
to Jenkins Users
I added a new credentials "SSH Username with private key"
Username: jenkins
Selected: From the Jenkins master ~/.ssh

Selected that credentials in Multibranch Pipeline on SCM Source and it was able to get access to the git repository.
Reply all
Reply to author
Forward
0 new messages