1

I am actually coming from to this question Jenkins Github Plugin can't choose my credentials. I followed the steps of integrating github plugin to my jenkins for automatic builds whenever something is pushed to master.

I followed the official documentation https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin.

  1. I created private git server tokens till Step 2.
  2. In my jenkins "credentials" page, I have the newly created "secret" using my username and password. Fine.

Real Problem The newly created Oath-Token-Secret cannot be accessed in the credentials dropdown.Problem-image

I have removed the private git URL from the screenshot for security reasons, but I have entered it before trying to select credentials.

Jenkins version : 2.20

Community
  • 1
  • 1
Ram
  • 113
  • 1
  • 10

2 Answers2

0

The Step 2.2 mentions:

Note that credentials are filtered by entered GH url with help of domain requirements.
So you can create credentials in different domains and see only credentials that matched by predefined domains.

Is it possible that, in your case, you should enter the GitHub private repo url first; before attempting to select a credential?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi, I have mentioned the private url...I have just removed that from my screenshot...Is there any other reason why am not able to select credentials? – Ram Sep 15 '16 at 14:05
  • @Ram None that I know of. Double check the url, and its case (it might be case sensitive) – VonC Sep 15 '16 at 14:08
  • Thanks. The URL is 100℅ right, because another team in our organization uses same git URL with a lower Jenkins version 1.6 a d the hooks are working like a charm – Ram Sep 15 '16 at 14:10
  • @Ram Strange, that would be a regression in Jenkins 2, then? – VonC Sep 15 '16 at 14:10
  • One more fact is, i manually made CURL calls to delete my auth tokens...using the api version of the URL...so that is fine... – Ram Sep 15 '16 at 14:12
  • @Ram OK. Looks more and more like a bug/regression then. – VonC Sep 15 '16 at 14:13
  • I really dont expect that to be a problem in Jenkins 2 because the official documentation for this plugin is updates extremely recent time and this version of plugin comes out of box in Jenkins2.2 and I dont have option of downgrade. That means the plugin creator should have tested it with this version of Jenkins, atleast I believe so. – Ram Sep 15 '16 at 14:14
  • if its a bug, its strange that none has reported that in either their repo or in Stack overflow... – Ram Sep 15 '16 at 14:17
  • 1
    @Ram I agree. Maybe it is a bit too recent? – VonC Sep 15 '16 at 14:17
  • it is from Aug 20th 2016. That can be considered recent right? – Ram Sep 15 '16 at 14:21
  • @Ram I would say so, yes. – VonC Sep 15 '16 at 14:22
0

The secret text credentials plugin was 'excluded' in the configuration. Adding it back, solved it.

Ram
  • 113
  • 1
  • 10