Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19k points)

I’m facing a problem with Jenkins while setting "git". I get the following error:

Failed to connect to repository : Command "git ls-remote -h http://github/someone/gittest.git HEAD" 

stderr: fatal: Authentication failed

1 Answer

0 votes
by (33.1k points)

Simply change to the Jenkins user and run the command manually:

git ls-remote -h [email protected]:person/projectmarket.git HEAD

You will get the standard SSH warning when first connecting to a new host via SSH:

The authenticity of host 'bitbucket.org (207.223.240.181)' can't be established.

RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.

Are you sure you want to continue connecting (yes/no)?

Type yes and press Enter. The host key for bitbucket.org will now be added to the ~/.ssh/known_hosts file and you won't get this error in Jenkins anymore.

Hope this answer helps you!

Browse Categories

...