我希望使用pygit2从GitHub收集存储库,但有问题。 我的代码:
from pygit2 import clone_repository
file = open("data_trim.txt", "r")
count = 1
for line in file:
repo_path = "repo"+str(count)
count = count+1
repo_url = "http://github.com/%s.git"%line
print repo_url
repo = clone_repository(repo_url, repo_path)
我有这个错误," ValueError:格式错误的网址' http://github.com/Elvish-Hunter/wesnoth git的"当我运行代码。我也尝试过使用,(repo_url =" http://github.com" + line +" .git")但是遇到了同样的问题。任何有关如何解决问题的帮助将受到高度赞赏。