树莓派上的主机密钥验证失败

时间:2020-04-02 20:11:13

标签: gitlab-ci gitlab-ci-runner

我已经将密钥添加到gitlab-ci

 $ cd /home/pi/dashboard
 $ git fetch
 Host key verification failed.
 fatal: Could not read from remote repository.
 Please make sure you have the correct access rights
 and the repository exists.```

1 个答案:

答案 0 :(得分:1)

您可以尝试scan for your gitlab-ci server first

ssh-keygen -R domain.com
ssh-keyscan -t rsa domain.com >> ~/.ssh/known_hosts

(由gitlab-ci服务器替换'domain.com')

然后再次尝试您的git fetch