-1

I am using Jenkins Github plugin and was using public/private key for one repo, which was working alright. But I got problem when I added another repo, because github doesn't allow sharing public key across multiple repos.

So i integrated jenkins using github token (in Jenkins > manage > configure system and service in github) and removed private/public keys in jenkins server and github. Now when I add repo, I get Permission denied (publickey) error (image attached)

How do i integrate multiple github repos with my jenkins server? enter image description here

vikramaditya234
  • 1,278
  • 2
  • 18
  • 37

1 Answers1

0

Found the problem. There is key attached to account of user who's token was added to jenkins. My assumption was it should not have mattered as token was added. But that's not correct.

Added private keys of user who's token was used, in jenkins server and everything returns to normal

Got hint from Authenticate Jenkins CI for Github private repository

Community
  • 1
  • 1
vikramaditya234
  • 1,278
  • 2
  • 18
  • 37