0

Using the steps outlined here I lifted and shifted our Jenkins instance from one windows machine to another windows machine.

Jenkins on the new server launches successfully.

However, the integration with GitHub on all the projects is failing with the following error.

enter image description here

Failed to connect to repository : Command "git.exe ls-remote -h git@github.com:some_repo_name.git HEAD" returned status code 128: stdout: stderr: some_user@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

What have I done wrong?

Geezer
  • 304
  • 3
  • 11
  • Copy the SSH keys `.ssh/id_rsa` and `.ssh/id_rsa.pub` from the old machine to the new machine. The `.ssh` directory should be in the user's home directory at the same level as `JENKINS_HOME`. – Dibakar Aditya Feb 14 '20 at 17:55
  • I have. is there a way to tell Jenkins the location of these files? – Geezer Feb 15 '20 at 10:17
  • 1
    Verify that you are using the correct keypairs/credentials. Secondly check the permissions on the keys and that they are located in `JENKINS_HOME/.ssh`. Lastly check if the machine has proper network connectivity to access the repositories. Try to clone/ping the repository manually from the new machine. – Dibakar Aditya Feb 15 '20 at 14:36
  • this is now resolved, thanks – Geezer Mar 03 '20 at 10:14
  • Good to know. What was the cause? – Dibakar Aditya Mar 03 '20 at 19:09

0 Answers0