7

So I have Jenkins-CI running with the plugins:

  • Credentials
  • Credentials Binding
  • Git

First what I did in order to authenticate Git with the remote repository, is I added credentials to the server to the Global scope with no domain.

However, this allowed any user on my Jenkins server to use those same credentials and thus interact with my Git remote repositories. So I tried instead going to:

Jenkins -> People -> [Username] -> Credentials

I tried both adding:

  • credentials without a domain ("Global (unrestricted)", but still as my personal credentials instead of server-wide credentials)
  • adding a credential domain, and adding my Git remote username and password that way.

However, then when I go into Jobs -> [Job] -> Configure -> Source Code Management -> Git -> Credentials, it only lists server-wide credentials, and not the ones I registered to my account.

So my question is thus: how do I use credentials that are not usable to the rest of the Jenkins server and use them in a Job's SCM credentials?

Qyriad
  • 71
  • 1
  • 3

1 Answers1

1

This is by design, most likely, see https://issues.jenkins-ci.org/browse/JENKINS-32417.

You could use a parametrized build with the credentials parameter as explained in https://stackoverflow.com/questions/34815482/accessing-credentials-in-jenkins-with-the-credentials-parameter-plugin.

Alternatively, use folders and the Folder Credentials Provider.

T. Kuther
  • 196
  • 4
  • 1
    Thanks; couldn't get it working reliably, still can't see user credentials in a pipeline job, despite passing them in as a parameter.. have a feeling it's a combination of deficiency of the AWS Credentials plugin, and user credenetials in pipeline jobs – Seb Aug 01 '17 at 07:46