git连接jenkins_Jenkins配置git连接github验证失败解决办法

一、问题现象:

配置Jenkins使用git,连接github,验证失败。日志如下:

Failed to connect to repository : Command "git ls-remote -h

[email protected]:***********/game-of-life.git HEAD" returned status

code 128:

stdout:

stderr: Host key verification

failed.

fatal: The remote end hung up unexpectedly

二、解决办法:

***Set

up SSH for Git on Linux***

Step 1. Ensure you

have an SSH client installed

# ssh -v

Step 2. Set up your default

identity

1)Open a terminal in your local

system.

2)Enter ssh-keygen at the command

line.

The command prompts you for a file

where you want to save the key. If the .ssh directory doesn't

exist, the system creates one for you.

# ssh-keygen

3)Press the Enter or Return key to

accept the d

你可能感兴趣的:(git连接jenkins)