2

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. enter image description here
  • Second approach: Go to github and generate and access token, then add it as secret text credential in jenkins. enter image description here enter image description here enter image description here

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.

vi ~/.ssh/config

~/.ssh/config

enter image description here

I also tried without alias:

enter image description here

What am I missing?

Community
  • 1
  • 1
Mauricio
  • 839
  • 2
  • 13
  • 26
  • With your third approach (which i have got working for private repos in the past), it looks like your hostname may be set incorrectly - what is `github-droid`? It should be `github.com` – Peter Reid Mar 20 '17 at 20:55
  • @PeterReid I had to do that because I have two public keys in my repository. One for my droid repository and the default for ios. So I had to create an alias to tell jenkins which public key it should use for the android repository. I edited my answer tho show you my `~/.ssh/config` – Mauricio Mar 20 '17 at 22:05

0 Answers0