我正在尝试cookiecutter https://github.com/user/template
在一个空的存储库中运行(用户是帐户,模板是包含我创建的 cookiecutter 模板的存储库),但是每当我尝试运行命令时,都会收到此错误:
USER:empty-repo $ cookiecutter https://github.com/user/template
Username for 'https://github.com': user
Password for 'https://user@github.com':
Traceback (most recent call last):
File "/Users/aos/.virtualenvs/py3/bin/cookiecutter", line 8, in <module>
sys.exit(main())
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/cookiecutter/cli.py", line 152, in main
skip_if_file_exists=skip_if_file_exists,
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/cookiecutter/main.py", line 74, in cookiecutter
directory=directory,
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/cookiecutter/repository.py", line 114, in determine_repo_dir
no_input=no_input,
File "/Users/aos/.virtualenvs/py3/lib/python3.7/site-packages/cookiecutter/vcs.py", line 104, in clone
stderr=subprocess.STDOUT,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/user/template.git']' returned non-zero exit status 128.
这是否必须使 repo 和/或帐户是私有的?我看过一些地方,但不确定解决方案。任何事情将不胜感激,谢谢!
Cookiecutter 0.7.2
蟒蛇 3.7