[JIRA] (JENKINS-60594) workflow-scm-step plugin does not use global credentials if used inside shared library

2019-12-27 Thread ulrich.lohrm...@dsv-gruppe.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ulrich Lohrmann closed an issue as Not A Defect  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 PEBKAC (Probelm exists between keyboard and chair).  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-60594  
 
 
  workflow-scm-step plugin does not use global credentials if used inside shared library   
 

  
 
 
 
 

 
Change By: 
 Ulrich Lohrmann  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Not A Defect  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

[JIRA] (JENKINS-60594) workflow-scm-step plugin does not use global credentials if used inside shared library

2019-12-27 Thread ulrich.lohrm...@dsv-gruppe.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ulrich Lohrmann created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60594  
 
 
  workflow-scm-step plugin does not use global credentials if used inside shared library   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-scm-step-plugin  
 
 
Created: 
 2019-12-27 11:26  
 
 
Environment: 
 Jenkins 2.204.1  Credentials plugin 2.3.0  Credentials Binding Plugin 1.20  Pipeline SCM Step plugin 2.9  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Ulrich Lohrmann  
 

  
 
 
 
 

 
 When executing a GIT checkout with a SSH URL I can provide a credetialID (username with private key file) and the GIT repository is cloned using the credentials provided. So far so good. If I now move the checkout directive into a custom tag of a shared library and provide the credentialID from outside, the use of the credentials fails and the GIT repository cannot be accessed. GIT checkout from within pipeline script (works):   

 

checkout([$class: 'GitSCM',
branches: [[name: "MyBranch"]],
doGenerateSubmoduleConfigurations: false,
extensions: optionalExtensions,
submoduleCfg: [],
userRemoteConfigs: [[url: 'ssh://..'], [credentialsId: 'MyGitCredentials']])
 

 For easier use of the checkout command, I created a custom tag in a shared library that ony takes a subset of the possible arguments. 

 

import groovy.transform.Field

@Field def zielverzeichnis
@Field def url
@Field def