试图克隆一个 git repo 它卡在克隆到

时间:2021-06-08 02:55:16

标签: git http github ssh carla

我使用的是 Windows 10 Ver 10.0.19042 Build 19042 , GIT 2.32 版 尝试使用 git bash 执行以下命令时 git clone --depth=1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git . 为了克隆 carla 项目,它卡住永远显示消息 cloning into '.'

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

  • 用 HTTP 替换 HTTPS
  • 我已经为 Windows 安装了 Open SSH

另外,请注意,我使用命令 git clone <git_repo> 从 git 复制了其他存储库,它工作正常

我想毫无问题地克隆 repo 有什么帮助吗?

1 个答案:

答案 0 :(得分:0)

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

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

如果你想用 SSH 进行测试,你必须这样做:

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

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