简体   繁体   中英

GitPython - clone_from not working

I am facing an issue while cloning a git repo.

I am using function clone_from from GitPython library

from git import Repo

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

I am getting error

WindowsError: The system cannot find the file specified

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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