From 6574e42b9ccc0acf18cd4041f4bab3aee6f37524 Mon Sep 17 00:00:00 2001 From: zjkjzj Date: Tue, 27 Apr 2021 17:22:53 +0800 Subject: [PATCH] docs(troubleshooting): fix: Host key verification failed --- docs/troubleshooting.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 993e898..17b06a0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -539,4 +539,23 @@ fatal: 无法读取远程仓库。 参考:[使用curl出现gnutls_handshake() failed: Error in the pull function或者GnuTLS recv error: Error in the pull](https://blog.csdn.net/anlian523/article/details/90729063) * 方法一:`sudo apt-get install libcurl4-openssl-dev` -* 方法二:开启代理(推荐) \ No newline at end of file +* 方法二:开启代理(推荐) + +## 问题十八:Host key verification failed. + +``` ++ git push --force ssh://git@gitlab.zhujian.tech:7020/****/test.git master +Host key verification failed. +fatal: Could not read from remote repository. + +Please make sure you have the correct access rights +and the repository exists. +``` + +在网上找了很多资料,提出的解决方案是重新设置`ssh`公/私钥。当前我的问题不是这个,而是`.ssh/config`重新配置 + +``` +Host + Port xxx ---------------> 这个是关键,默认为22,当前应该设置为7020 + StrictHostKeyChecking no +``` \ No newline at end of file