一、问题现象:
配置Jenkins使用git,连接github,验证失败。日志如下:
Failed to connect to repository : Command "git ls-remote -h
git@github.com:***********/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