msysgit 不再要求输入密码

msysgit 不再要求输入密码

我有一个远程 GIT 存储库(ubuntu),在 Windows 7 上本地工作。我让它运行良好,并设置了 SSH 密钥。在此过程中的某个时刻,我似乎禁用了 GIT/msysgit 要求输入密码的功能。我现在有一个新的远程 git 存储库(在 ubuntu 上),没有设置密钥,它不会要求我输入密码。我试过了

git clone ssh://<user>:<pass>@<ip>:<myport>/mygitrepopath

也不起作用。但我可以使用具有相同凭据的 putty 登录。

编辑

为了设置密钥,我使用 putty 生成了公钥/私钥,并将相应的密钥添加到服务器和 pageant 中。我不记得我是否采取了其他步骤 :(

这是我收到的信息

Cloning into 'myhub'...
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa blhablhablhjah
Connection abandoned.
fatal: The remote end hung up unexpectedly

答案1

检查 ~/.ssh 和 ~/.ssh/known_hosts 是否可写。

答案2

如果您使用 PuTTY 作为 SSH 提供程序进行安装,请尝试以下故障排除步骤:

  1. 启动PuTTY
  2. 连接到你的 git 主机:

    ssh 用户@ip -p 端口

  3. 确认主人的签名/指纹

  4. 取消连接(CTRL-C)
  5. 完成。git 现在应该能够执行所有操作,而不管 shell 是什么(常规 Windows 命令提示符、msysgit 或 cygwin)

(从http://drupal.org/node/1027094

相关内容