首页 > 解决方案 > 试图克隆一个 git repo 它卡在克隆到

问题描述

我正在使用 Windows 10 Ver 10.0.19042 Build 19042 , GIT Ver 2.32 尝试使用 git bash 执行以下命令 git clone --depth=1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git . 来克隆carla项目时,它会一直显示消息cloning into '.'

有时它会产生输出错误:错误写入“stdout”:损坏的管道我尝试了以下解决方案

另外,请注意,我已经使用该命令从 git 复制了其他 repos git clone <git_repo>,它工作正常

我想毫无问题地克隆 repo 有任何帮助吗?

标签: githttpgithubsshcarla

解决方案


我刚刚测试了相同的命令(Windows 10 上的 Git 2.32 也是如此)

--depth=1语法在 CMD 和 git bash 中运行良好。

如果您想使用 SSH 进行测试,您必须执行以下操作:

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

(假设您在个人资料中注册了一个公钥,考虑到这是一个私有存储库)


推荐阅读