python - python中的Git命令
问题描述
我已经尝试使用下面的 python 代码从 Git 克隆存储库,但它没有克隆,它返回值为 1。
import subprocess
repo = input ("Repository:")
_repo_ = f '{repo}'
print ("Choose local repository ")
local = input ("Repository:")
local_path = f '{local}'
cmd = " git clone (git repository link)"+_repo_+".git"
print(str(cmd))
return_value =subprocess.call(cmd, shell=True)
print (Return value:" +str(return_value))
解决方案
推荐阅读
- react-native - 升级到 RN 0.62 后应用无法加载
- angular - Angular 9 CDK 门户错误:必须提供要附加的门户
- python - 如何从数据框列中删除方括号和逗号
- python - sympy - 二分法 - TypeError:无法确定关系的真值
- android - 在 Android 应用程序中寻找 Kotlin 非空断言错误的解释?
- loops - 在 Ansible 中组合多个循环的输出
- c# - 如何转换验证
到成功时为空的字符串? - angular - Angular:保持 observable 活着,直到另一个发生
- javascript - 如何在没有 javascript 的情况下建立在线聊天?
- latex - Tex: wrapfig 包对齐文本的问题