2015-01-27 69 views
0

我在克隆git repo時面臨一個問題。GitPython - clone_from不能正常工作

我使用功能clone_from從GitPython庫

from git import Repo

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

我收到錯誤

WindowsError: The system cannot find the file specified

有人能告訴我這是怎麼克隆使用該庫的回購?

+0

你怎麼運行它? – 2015-01-27 01:11:26

+0

一點搜索可能會有所幫助。這是https://github.com/kennethreitz/legit/issues/148幫助嗎? – skyline75489 2015-01-27 01:26:35

+0

我直接從Windows上的命令行運行它 – 2015-01-27 06:46:42

回答

0

您的PATH中可能沒有git.ext,但可以通過自己執行來輕鬆進行測試。 如果您看到錯誤,您可以將其添加到PATH,或將GIT_PYTHON_GIT_EXECUTABLE設置爲可執行文件git-python應爲git命令行服務執行。