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.

torsdag 30. juni 2016 14.32.46 UTC+2 skrev Björn Pedersen følgende:
>
> 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
>
> Am Mittwoch, 29. Juni 2016 08:54:15 UTC+2 schrieb Sverre Moe:
>>
>> Our git remote server is Gitolite and is has the public key of all the 
>> users
>> git clone ssh://[email protected]/project.git
>>
>> 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://[email protected]/project.git
>> Fetching origin...
>> FATAL: Failed to recompute children of mcs-gui
>> java.lang.IllegalStateException 
>> <http://stacktrace.jenkins-ci.org/search?query=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.
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9c2d3c75-8880-4c22-af6f-72f6a6b808dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to