简体   繁体   English

GitPython-clone_from不起作用

[英]GitPython - clone_from not working

I am facing an issue while cloning a git repo. 克隆git repo时遇到问题。

I am using function clone_from from GitPython library 我正在使用来自GitPython库的函数clone_from

from git import Repo 从git import回购

Repo.clone_from("git://github.com/facebook/buck.git", "D:\\sample") Repo.clone_from(“ git://github.com/facebook/buck.git”,“ D:\\ sample”)

I am getting error 我遇到错误

WindowsError: The system cannot find the file specified WindowsError:系统找不到指定的文件

Can someone please tell me if this is how to clone a repo using the library? 有人可以告诉我这是否是使用库克隆存储库的方法吗?

You might not have git.ext in your PATH , but that can easily be tested by executing it yourself. 您可能在PATH没有git.ext ,但是可以通过自己执行它很容易地进行测试。 If you see an error, you can either add it to the PATH , or set the GIT_PYTHON_GIT_EXECUTABLE to the executable git-python should execute for git commandline services. 如果看到错误,则可以将其添加到PATH ,或将GIT_PYTHON_GIT_EXECUTABLE设置为应为git命令行服务执行的可执行git-python。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM