4
A
回答
4
有一個庫,libgit2
,它使git可以用作共享庫,更有助於您的原因是python綁定的pygit
。
>>> from pygit2 import clone_repository
>>> repo_url = 'git://github.com/libgit2/pygit2.git'
>>> repo_path = '/path/to/create/repository'
>>> repo = clone_repository(repo_url, repo_path) # Clones a non-bare repository
>>> repo = clone_repository(repo_url, repo_path, bare=True) # Clones a bare repository
您可以查看基於存儲庫文檔here
5
只是subprocess.check_call運行git
命令:
import subprocess
subprocess.check_call(["git", "clone", ...])
相關問題
- 1. 克隆私人Github回購
- 2. 克隆github回購到私人gitlab回購
- 3. 克隆Github回購
- 4. Ansible Docker容器 - 克隆私人回購
- 5. 克隆私人github回購沒有部署密鑰?
- 6. 問題克隆GitHub的私人回購到遠程服務器
- 7. 錯誤克隆github回購
- 8. 克隆github wiki到本地回購
- 9. 從Gihub的私人回購中刪除私人回購和克隆
- 10. 使用SVN的私人Github回購
- 11. 使用Github克隆和本地回購:Cloud9 IDE
- 12. 克隆/鏡像用於開發的私人Git回購
- 13. GitHub的服務器端克隆回購
- 14. 在Github Desktop中克隆別人的公開回購
- 15. 如何在Vagrant中自動克隆/從私人回購拉動
- 16. 來自私人回購的Openshift SSH錯誤克隆子模塊
- 17. SBT混帳克隆掛起私人回購
- 18. 如何克隆私人託管gitolite回購
- 19. 在gitlab中克隆私人回購沒有密碼?
- 20. Github:只讀訪問私人回購
- 21. GitHub Enterprise公共與私人回購
- 22. 克隆git回購
- 23. 如何在Windows中使用hg-git克隆github回購
- 24. 公共訪問私人npm模塊從私人github回購
- 25. 用PHP克隆Git回購
- 26. Mercurial - 克隆克隆另一個回購
- 27. 使用Slurm克隆Github回收
- 28. 私人回購是通過可靠的劇本克隆,但私人寶石沒有得到安裝
- 29. 克隆GitHub上的Ruby回購,但不能夠在本地啓動它從克隆的github
- 30. 如何使用Jenkins結帳幾個私人Github回購
什麼禁止
要使用
pygit
克隆回購回答你的問題你從調用「git clone ...」? – 2015-01-23 22:19:59