I have a jenkins job foo
that works perfectly well. It is authenticated with jenkins_foo_user
. It is able to clone the repo and checkout the right branch.
In my codebase, I have another script - query_github.py
a script used to query Github API to get information such as commits and pull request. To be able to use this API I need an access token.
I want to be able to use the jenkins user access token to authenticate and access the github credentials. How do I do this? Note: Using the Github Enterprise version