0

I have downloaded the official docker jenkins image and installed Git+GitHub plugin for Jenkins.

In the credentials menu I add the public key of my regular GitHub user (did not generate new) and in the build configuration I specify the git url. Unfortunately, I get a Permission denied (public key) from GitHub.

So I tried the HTTPS url instead with my GitHub login to ensure there was nothing wrong with the connection to GitHub. That way it is working, but I cannot understand if I need to setup the SSH keys in the container or not, is that even possible since the container only contains Jenkins itself?

1 Answer 1

1

jenkins needs the private key and GitHub needs the public key. If I were you, I would have jenkins create a new key and it will show you the public key to copy. From there in GitHub you can add the key as a Deploy Key in the project's settings.

That way jenkins will have read-only access pretty much to the repo instead of your full access.

1
  • the public key is already in GitHub since I use it for my other projects. How do I let Jenkins generate a new key?
    – H.Rabiee
    May 23, 2015 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .