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.