[JIRA] (JENKINS-59751) Projects Created Through Pipeline DSL Plugin Do Not Pass Credentials Correctly When Connecting to Github

8 views
Skip to first unread message

aaron.franssell@gmail.com (JIRA)

unread,
Oct 11, 2019, 11:18:03 AM10/11/19
to jenkinsc...@googlegroups.com
Aaron Franssell created an issue
 
Jenkins / Bug JENKINS-59751
Projects Created Through Pipeline DSL Plugin Do Not Pass Credentials Correctly When Connecting to Github
Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2019-10-11 15:17
Priority: Major Major
Reporter: Aaron Franssell

When I create a project through the pipeline DSL plugin (code snippet below is for a multibranch pipeline) the credentials I created are not passed correctly through to Github and authentication fails.

Once I navigate to the newly created project and click "Configure" and then "Save" the configuration, Jenkins then scans Github successfully and everything works as expected.

I would like to spin up Jenkins completely through Chef and Groovy DSLs so that no manual intervention (like having to click "Save") is required.

Here is the DSL script I'm using:

UUID uuid = UUID.fromString("dd847135-8391-4f66-a54c-7f8781dc3119")
multibranchPipelineJob('test3') {
  displayName "test3"
  description "test3"
  branchSources {
    github

{       id(uuid.toString())        scanCredentialsId('gitusername_password')        repoOwner('my_user')        repository('my-repo')        buildForkPRMerge(false)        repository("my-repo.git")     }

  }
}
queue("test3")

Here is the relevant portion of the logs:

[Fri Oct 11 14:56:44 UTC 2019] Starting branch indexing...
14:56:44 Connecting to https://api.github.com using my_user/****** (gitusername_password)
ERROR: [Fri Oct 11 14:56:45 UTC 2019] Could not update folder level actions from source dd847135-8391-4f66-a54c-7f8781dc3119
hudson.AbortException: Invalid scan credentials when using my_user/****** (gitusername_password) to connect to my_user/my-repo.git on https://api.github.com

 

My Jenkins version is: 2.190.1

Job DSL Plugin version: 1.76

OS:

Operating System: Amazon Linux 2
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 4.14.138-114.102.amzn2.x86_64

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

aaron.franssell@gmail.com (JIRA)

unread,
Oct 11, 2019, 11:19:02 AM10/11/19
to jenkinsc...@googlegroups.com
Aaron Franssell updated an issue
Change By: Aaron Franssell
When I create a project through the pipeline DSL plugin (code snippet below is for a multibranch pipeline) the credentials I created are not passed correctly through to Github and authentication fails.

Once I navigate to the newly created project and click "Configure" and then "Save" the configuration, Jenkins then scans Github successfully and everything works as expected.

I would like to spin up Jenkins completely through Chef and Groovy DSLs so that no manual intervention (like having to click "Save") is required.

Here is the DSL script I'm using:

```

UUID uuid = UUID.fromString("dd847135-8391-4f66-a54c-7f8781dc3119")
multibranchPipelineJob('test3') {
  displayName "test3"
  description "test3"
  branchSources {
    github
{

{
      id(uuid.toString())
       scanCredentialsId('gitusername_password')
       repoOwner('my_user')
       repository('my-repo')

       buildForkPRMerge(false)
       repository("my-repo.git")
    }

  }
}
queue("test3")

```

Here is the relevant portion of the logs:

[Fri Oct 11 14:56:44 UTC 2019] Starting branch indexing...
14:56:44 Connecting to [ https://api.github.com |https://api.github.com/] using my_user/****** (gitusername_password)

ERROR: [Fri Oct 11 14:56:45 UTC 2019] Could not update folder level actions from source dd847135-8391-4f66-a54c-7f8781dc3119
hudson.AbortException: Invalid scan credentials when using my_user/****** (gitusername_password) to connect to my_user/my-repo.git on [https://api.github.com|https://api.github.com/]


 

My Jenkins version is: 2.190.1

Job DSL Plugin version: 1.76

OS:

Operating System: Amazon Linux 2
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 4.14.138-114.102.amzn2.x86_64

aaron.franssell@gmail.com (JIRA)

unread,
Oct 11, 2019, 11:19:03 AM10/11/19
to jenkinsc...@googlegroups.com

aaron.franssell@gmail.com (JIRA)

unread,
Oct 14, 2019, 9:25:04 AM10/14/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages