简体   繁体   English

Cygwin下的Git Clone挂起

[英]Git Clone under Cygwin hangs

This is something of a mystery. 这是一个谜。 I just installed Cygwin on my Windows machine (Windows 8). 我刚刚在我的Windows机器上安装了Cygwin(Windows 8)。 The very first thing I tried was git clone (I was cloning a private repository using ssh, rather than anything on github). 我尝试的第一件事是git clone(我使用ssh克隆了一个私有存储库,而不是github上的任何东西)。 It announced cloning into blah-blah-blah, and then just froze. 它宣布克隆成blah-blah-blah,然后就冻结了。 I waited several minutes, and nothing. 我等了几分钟,什么都没有。 I looked at the directory, and there was a directory created with the .git subdirectory, but nothing else. 我查看了目录,并且使用.git子目录创建了一个目录,但没有别的。 It never got around to asking for my password. 它从来没有要求我的密码。

I am able to use git from a Windows command prompt, and the git shell that I downloaded from the Git website works. 我能够从Windows命令提示符使用git,并且我从Git网站下载的git shell可以正常工作。 So there's no problem with my git connection. 所以我的git连接没问题。 It's just git under Cygwin. 它只是Cygwin下的git。

You might ask why I'm bothering, if I can use git outside of Cygwin. 如果我可以在Cygwin之外使用git,你可能会问为什么我很烦。 It's just because I'm trying to debug some git hook scripts that I wrote, and I want them to be usable by someone using git under Cygwin. 这只是因为我正在尝试调试我编写的一些git钩子脚本,并且我希望它们可以被在Cygwin下使用git的人使用。 But I can't even get to the point where the git hooks are called. 但我甚至无法达到调用git钩子的程度。

I didn't get any further on this. 我对此没有进一步的了解。 I stopped using Cywin for git, and instead have been using the git bash shell 我停止使用Cywin作为git,而是使用git bash shell

I usually make sure to use a separate PATH when using cygwin . 我通常确保在使用cygwin时使用单独的PATH
If I use Git, I make sure to reference a simplified PATH . 如果我使用Git,我一定要参考简化的PATH

In both instance, you need to make sure $HOME reference the right folder, as credentials can be stored there by default ( ~/.ssh for your SSH keys for instance) 在这两个实例中,您需要确保$HOME引用正确的文件夹,因为默认情况下可以存储凭据(例如,对于您的SSH密钥, ~/.ssh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM