向stackoverflow社区致意。我需要一些指导,如何防止我的Python cmd line应用程序在我克隆存储库的网络(GitHub)由于许多克隆请求而断开连接时崩溃。下面是我用来克隆repo的代码。目前运行良好。但是,我想,当有多人下载回购协议或者网络速度慢的时候,我会被踢出去,我的应用程序就会崩溃。我以为try/except语句可以防止崩溃,但没有用:
...
command = r'git clone git@github.com:somerepo.git'
try:
subprocess.call(command, shell=False)
except subprocess.CalledProcessError as cpe:
click.echo(cpe.output)
...
错误:
Git Clone Fails - error: RPC failed; result=56, HTTP code = 200
git clone http://somerepo/repo.git
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=56, HTTP code = 200
目前没有回答
相关问题 更多 >
编程相关推荐