How to resolve this...
Notifications
Clear all

How to resolve this error Jenkins Host key verification failed

RSS

(@abhijith)
Noble Member
Joined: 1 year ago
帖子:1350
10/05/2021 9:52 am

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

Quote
(@anamika)
Noble Member
Joined: 1 year ago
Posts: 1381
10/05/2021 9:54 am

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.


ReplyQuote
Share:
Baidu