Multibranch pipeline and github integration

94 views
Skip to first unread message

Warren Strange

unread,
Jun 8, 2016, 6:22:01 PM6/8/16
to Jenkins Users


This is probably a clueless newbie problem,  but here goes:

I am getting hit with github API rate limits, and want to use an authenticated account for api calls.

There  is a "scan credentials" drop down - but I have no idea how to add credentials to show up in the drop down. 

I have added a bunch of credentials at the global level (no idea which  type to use - I have tried a bunch) - but those
don't show up. 

Any hints?


Michael Neale

unread,
Jun 8, 2016, 10:18:07 PM6/8/16
to Jenkins Users
Those API limits will be hit quick when unathenticated, which is what you are seeing. 

Adding credentials is correct - are you using this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin

Perhaps some screen caps might make it clearer. 

This isn't a "clueless newbie" question, it is a bit fiddly to setup the first time, so don't worry ;)

Warren Strange

unread,
Jun 9, 2016, 3:58:21 PM6/9/16
to Jenkins Users


Thanks Michael - I got this working.

For those that might run into this problem, here is what you need to do:

- Go to your github profile and create a new personal access token:   https://github.com/settings/tokens. It needs to have a few scopes
checked off to be able to read the repo, make API calls, etc. 
- In Jenkins - create a credential type of "username / password"
- Your username is your github username. The password is the token generated by github
- In the multi-branch config - you should now have a username/password choice in the "scan credentials" drop down. Select the credential from above and you are good to go. No more API limits! (Well - 5,000 / hour - which should be lots)

Michael Neale

unread,
Jun 9, 2016, 9:34:53 PM6/9/16
to Jenkins Users
Great to hear Warren!

Yes I forgot to mention personal access token. I use 2 factor with github so I automatically do that knowing that there is no point putting my github password into anything else. 

I wonder if it is worth documenting those steps here: https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+GitHub+Branch+Source+Plugin (no real docs there or readme). Although, given you put it on this thread - google will find it now!

Thanks!
Reply all
Reply to author
Forward
0 new messages