webhook配置完成后,发布时,应用所在的服务器上报 “Host key verification failed. fatal: Could not read from remote repository.”
同步从git上拉取代码失败
做过的一些配置:
- 本地仓库的远程仓库地址
- ssh密钥对
- 在远程仓库上github/gitlab上也已经添加了本地密钥 --互信
解决办法:
方法一: ssh-keyscan -H github.com >> ~/.ssh/known_hosts 方法二: ssh -T git@gitlab.com 待确认时输入yes