I've trying to integrate jenkins to a private repository of my organization. Here's what I've tried:
- First approach: Use the Credentials plugin to put my github username and password.
- Second approach: Go to github and generate and access token, then add it as secret text
credential in jenkins.
Note in the last picture that even though I added the secret text credential, it doesn't appear in my options. Although it is added to the global credentials when I go to Jenkins -> Credentials
. So I'm not sure if it is using it or not.
- Third approach: Add a deploy key to the repository with server's ssh public key. If you have more than one public key like me, create a host alias
vi ~/.ssh/config
I also tried without alias:
What am I missing?