问题
ahs@ahsdeMacBook-Pro .ssh % git clone git@192.168.6.200:service-customized/bj-hx/terminal/web-code/ie-custom-code.git Cloning into 'ie-custom-code'... The authenticity of host '192.168.6.200 (192.168.6.200)' can't be established. ED25519 key fingerprint is SHA256:EaxvcwqdRYQ7NfViwwZiWAykWdOMUM3FUBOUj45LGDE. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? 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 克隆 Git 存储库,但是遇到了主机密钥验证失败的错误。这通常是因为您第一次连接到该主机,SSH 不信任该主机的身份验证密钥。您可以尝试以下步骤:
- 确认您正在连接到正确的主机。您可以检查 IP 地址和主机名是否正确。
- 确认您的 SSH 密钥是否正确配置。您可以检查您的 SSH 密钥是否已添加到您的 Git 帐户中。
- 确认您的主机密钥是否正确配置。您可以尝试手动添加主机密钥到您的 SSH 密钥列表中。
以下是手动添加主机密钥的示例命令:
ssh-keyscan -t ed25519 192.168.6.200 >> ~/.ssh/known_hosts
请注意,这将添加主机密钥到您的 known_hosts
文件中,以便 SSH 可以验证主机身份。如果您仍然遇到问题,请联系存储库所有者或管理员以获取进一步帮助。