I’m facing a problem withJenkinswhile setting "git". I get the following error:
Failed to connect to repository : Command "git ls-remote -hhttp://github/someone/gittest.gitHEAD"stderr: fatal: Authentication failed
This is quite simple, so first you have to change to the Jenkins user and execute the following command :
git ls-remote -h ‘repo URL’ HEAD
After this, you will get a SSH warning. This happens when you first connect to a new host via SSH:
The authenticity of host 'github/someone/git.git' can't be established. Are you sure you want to continue connecting (yes/no)?
Type yes and press Enter. The host key will be added to the ~/.ssh/known_hosts file and you won't face this error henceforth.