重新安装 Babun 后无法连接到 Git 主机

Unable to Connect to Git Host After Babun Re-Install

我之前在我的机器 C 驱动器上安装了 babun,在默认位置 %userprofile%.babun 并且我的安装工作完美。因为 space 我不得不将 babun 移动到不同的驱动器。我卸载了C盘的babun。当我这样做时,我无法删除 .babun\cygwin\bin ssh-agent 文件和其他一些 .dll 文件。我 运行 在另一个驱动器上新安装了 babun,现在我无法从 shell 连接到 git。当我尝试访问 git.

时收到 "Host key verification failed" 消息

有没有人在更改安装位置后遇到过类似的事情,有没有关于如何解决这个问题的建议?

删除位于 .babun\cygwin\home\your-user-name

的 .ssh 文件夹

将 C:\Users\your-user-name 中的 .ssh 文件夹粘贴到 .babun\cygwin\home\your-user-name

在babun shell, 运行下面的命令:

cd ~
chgrp -R Users .ssh/
chmod -R 700 .ssh/
chmod 600 .ssh/id_rsa

记得将您的用户名和电子邮件添加到 git 配置中,使用:

git config --global user.name "your name"
git config --global user.emial "your@email.com"

关于上次安装遗留的文件,重启机器应该可以删除。