3

I have configured SSH authentication so Jenkins can checkout code from a GitHub repository.

When I manually start a build, everything works fine. However, when I use a periodical poll, I get an authentication error.

Started on Apr 21, 2014 11:02:14 PM Using strategy: Default [poll] Last Built Revision: Revision 2dd6b946d5274c0e802fd912e9c9aed9c1bafa7c (origin/desenv) using GIT_SSH to set credentials jenkins@glr.com.br FATAL: Command "git ls-remote -h git@github.com:felipe-gdr/game-of-life.git desenv" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository.

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

felipe_gdr
  • 1,088
  • 2
  • 11
  • 27

1 Answers1

1

I was stuck on this for an entire afternoon and tried everything including manually starting my ssh agent and manually adding the build users ssh key, etc.

According to the answers from this thread Using ssh-agent with jenkins while polling SCM creating an SSH key without a passphrase is the only way to achieve this behavior for the time being.

It is grossly negligent but it is the only solution that I could get working on my last build project.

Community
  • 1
  • 1
PaoloV
  • 126
  • 3