【发布时间】:2018-02-20 11:25:15
【问题描述】:
我是 Python 和 Git 的新手。找到了使用 Python 运行 Git 命令的 GitPython 库。我正在尝试将已在 Google Cloud 上创建的私有存储库克隆到我在 Mac 上的本地目录中。我的代码如下:
repo = Repo.clone_from('https://source.developers.google.com/p/my-project/r/my-project--data', 'my-local-dir', no_checkout=True)
我收到以下错误:
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone --no-checkout -v https://source.developers.google.com/p/my-project/r/my-project-data /my-local-dir stderr: 'Cloning into '/my-local-dir'... fatal: could not read Username for 'https://source.developers.google.com': Device not configured
请帮忙。 提前致谢。
【问题讨论】:
标签: repository clone git-clone gitpython