Mac中,用sourcetree去clone代码结果出错:
git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone https://git.oschina.net/saicgroup/saicgroup_srt-ios.git /Users/minglong/saicgroup_srt-ios Cloning into ‘/Users/minglong/saicgroup_srt-ios’… error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out fatal: The remote end hung up unexpectedly Completed with errors, see above |
搜:
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
git – 504 gateway timeout on GitLab HTTP URLs – Stack Overflow
关闭了shadowsocks,问题依旧。
去命令行中 clone试试,结果问题依旧。
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out – 开源中国社区
【总结】
此处是git代码仓库中有大文件,所以始终无法下载下来,报错:
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
最后是加上–depth=1,只下载最新版本(和之前一个版本):
git clone https://git.oschina.net/xxxxxxx/xxx.git –depth=1 |
结果就可以下载了。
转载请注明:在路上 » 【已解决】git下载代码出错:error RPC failed HTTP 504 curl 22 The requested URL returned error