[JIRA] (JENKINS-45007) git-plugin GitSCM does not support ssh credentials when using checkout in a Jenkinsfile

3 views
Skip to first unread message

ilatypov@yahoo.ca (JIRA)

unread,
May 1, 2019, 1:58:02 AM5/1/19
to jenkinsc...@googlegroups.com
Ilguiz Latypov commented on Bug JENKINS-45007
 
Re: git-plugin GitSCM does not support ssh credentials when using checkout in a Jenkinsfile

Was the source code analysis in the bug description flawed, then?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
May 1, 2019, 7:13:02 AM5/1/19
to jenkinsc...@googlegroups.com

I didn't do a detailed review of the source code, since I know there are tens of thousands of users and jobs that use checkout with credentials. Many automated tests and interactive tests regularly check that ssh based authentication works with git providers, including:

  • GitHub
  • Bitbucket
  • Gitlab
  • Microsoft
  • Assembla
  • Plain git

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 14, 2019, 8:14:03 AM7/14/19
to jenkinsc...@googlegroups.com

The example in the description has the same problem as the example on stackoverflow. Instead of creating a single entry for userremoteConfig with a value for URL and a value for credentialsID inside that entry, it creates two entries for userremoteConfig, one with URL and one with credentialsID.

Don't do this:

		userRemoteConfigs: [
			[url: "${gitUrl}" ],
			[credentialsId:'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx']

Instead, do this:

		userRemoteConfigs: [
			[url: "${gitUrl}" ,
			credentialsId:'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx']

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 14, 2019, 8:14:04 AM7/14/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages