Git,无法在 Windows 上克隆 repo

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1035601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:42:01  来源:igfitidea点击:

Git, Can't clone repo on windows

windowsgitsshclone

提问by Chris

I'm trying to use git on windows to clone a remote repository. I can clone it on my mac fine but on windows I get a problem.

我正在尝试在 Windows 上使用 git 来克隆远程存储库。我可以在我的 Mac 上很好地克隆它,但在 Windows 上我遇到了问题。

WHen using git bash to clone, I get a message saying the server's host key is not cached in the registry. It asks me to preess y or n to trust the host.

使用 git bash 进行克隆时,我收到一条消息,指出服务器的主机密钥未缓存在注册表中。它要求我按 y 或 n 来信任主机。

THe problem is that if I press y or n nothing happens. It just hangs there. Should I use OpenSSH instead of PuTTY?

问题是,如果我按 y 或 n 没有任何反应。它只是挂在那里。我应该使用 OpenSSH 而不是 PuTTY?

Thanks

谢谢

回答by J?rg W Mittag

The problem is that MSysGit starts PLink in the background, i.e. the terminal is not actually connected to the input of PLink. That means that you simply can'ttype anything into PLink.

问题是MSysGit在后台启动PLink,即终端实际上​​并没有连接到PLink的输入端。这意味着您根本无法在 PLink 中输入任何内容。

You simply have to connect to the server once using PLink or PuTTY, answer Yesand from then on, you won't be asked again.

您只需要使用 PLink 或 PuTTY 连接到服务器一次,回答,从那时起,您将不会再被询问。