简体   繁体   English

试图克隆一个 git 回购它卡在克隆到

[英]Trying to clone a git repo it stuck at cloning into

I am using Windows 10 Ver 10.0.19042 Build 19042 , GIT Ver 2.32 when trying to execute the following command using git bash git clone --depth=1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git. I am using Windows 10 Ver 10.0.19042 Build 19042 , GIT Ver 2.32 when trying to execute the following command using git bash git clone --depth=1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git. to clone the carla project it stucks displaying the message cloning into '.'克隆它卡住的carla项目,将消息cloning into '.' forever.永远。

sometimes it yields output Error: error writing "stdout": broken pipe I Have tried the following solutions有时它会产生 output 错误:错误写入“stdout”:损坏 pipe 我尝试了以下解决方案

  • Replace the HTTPS with HTTP将 HTTPS 替换为 HTTP
  • I have installed Open SSH for windows我已经为 windows 安装了 Open SSH

Also, note that I have copied other repos from git using the command git clone <git_repo> and it works fine另外,请注意,我使用命令git clone <git_repo>从 git 复制了其他存储库,它工作正常

I want to clone the repo with no issues any help?我想毫无问题地克隆 repo 有任何帮助吗?

I just tested the same command (Git 2.32 on Windows 10 as well)我刚刚测试了相同的命令(Windows 10 上的 Git 2.32)

The --depth=1 syntax does work well, both in CMD and git bash. --depth=1语法在 CMD 和 git bash 中运行良好。

If you want to test with SSH, you will have to do:如果您想使用 SSH 进行测试,您必须执行以下操作:

git clone --depth=1 -b carla git@github.com/CarlaUnreal/UnrealEngine.git .

(assuming you have a public key registered to your profile, considering this is a private repository) (假设您在个人资料中注册了一个公钥,考虑到这是一个私有存储库)

If you have enabled ssh for your account then it is due to same reason.如果您为您的帐户启用了 ssh,则原因相同。 I also faced it and with below command you can easily avoid hang problem during clone.我也遇到过它,使用以下命令,您可以轻松避免克隆过程中出现挂起问题。

  • ssh -T git@github.com (This command will authenticate you over ssh) ssh -T git@github.com (此命令将通过 ssh 对您进行身份验证)
  • git clone git@github.com:/ git 克隆 git@github.com:/

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

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