0

i have github + jenkin setup(for pipelining) which is working fine for public repos but as soon as i make my repo private, auto polling of my SCM breaks( basically after github webhook POST message back to jenkin to start the pipeline). In Github hook log i can see below error message. While i have updated my jenkin configuration to point to ssh github link with public/private key properly setup. I want to know why jenkin is picking up https link(as part of SCM polling) rather than ssh link which if picked will work. I have also tried passing PAT as part of repo name but it did not work either. Error - /usr/bin/git ls-remote -h -- https://xxxxxx@github.com/xxxxxx/zzzzz.git # timeout=10 ERROR: polling failed in /var/lib/jenkins/workspace/zzzzz on hudson.plugins.git.GitException: Command "/usr/bin/git ls-remote -h -- https://xxxxxx@github.com/xxxxxx/zzzzzzz" returned status code 128: stdout: stderr: remote: Support for password authentication was removed on August 13, 2021.

I have already tried using ssh link with proper public/private key setup and it is working fine. I want to know why jenkin is picking up https link(as part of SCM polling) rather than ssh link which if picked will work. I have also tried passing PAT as part of repo name but it did not work either.

iamDJ
  • 1

1 Answers1

0

Looks like the project in Jenkins has been configured with a https:// url for the private repo. As the error exception returned advises, GitHub no longer supports password authentication via https://.

Check the configuration of your project/pipeline, based on the fact that a ssh security key pair has been installed on Jenkins is using the ssh url:

  1. In the project/pipeline configuration, locate the section for Source Code Management (SCM).
  2. Check the repository URL to see if it is setup with the HTTPS URL, if so update to the SSH URL. It should look something like git@github.com:xxxxxx/zzzzz.git.
  3. Save the configuration changes.
djmonki
  • 3,020
  • 7
  • 18