【问题标题】:Cannot install a specific git branch on github with pip - Permission denied (publickey)无法使用 pip 在 github 上安装特定的 git 分支 - 权限被拒绝(公钥)
【发布时间】:2014-02-18 16:20:33
【问题描述】:

我正在尝试使用 pip 在 Github 上安装一个分叉的 repo (https://github.com/theatlantic/django-ckeditor/),但没有成功。

当我使用时

pip install -e git+git://github.com/theatlantic/django-ckeditor.git#egg=django-ckeditor

它确实安装了 repo 的内容,但是它的旧版本,没有我感兴趣的新更改。所以我试图强制 pip 获取最新的分支,这显然是 atl/4.3.x 但我得到这个奇怪的错误,比如分支的名称不正确或类似的东西:

$ pip install -e git+git://github.com/theatlantic/django-ckeditor.git@"atl/4.3.x"#egg=django-ckeditor
Obtaining django-ckeditor from git+git://github.com/theatlantic/django-ckeditor.git@atl/4.3.x#egg=django-ckeditor
  Updating /home/mathx/.virtualenvs/goblets/src/django-ckeditor clone (to atl/4.3.x)
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'git@github.com:theatlantic/ckeditor-dev.git' into submodule path 'ckeditor/static/ckeditor/ckeditor-dev' failed

我是不是在某个地方犯了错误?

谢谢。

【问题讨论】:

  • 你的操作系统是什么?我刚刚在 Ubuntu Linux 上运行了你的确切命令,它运行良好,查看分支 atl/4.3.x。
  • Linux Mint 15。我的 pip 版本是 1.4.1
  • 你最近有再尝试过吗? GitHub 遭遇了DDOS attack earlier today,这可能会影响到您。

标签: git github pip


【解决方案1】:

您发布的错误消息:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

...表示您无权访问 repo。

你可能会幸运地使用 GitHub 的 HTTP URL:

pip install -e git+http://github.com/theatlantic/django-ckeditor.git#egg=django-ckeditor

【讨论】:

  • 如何更改错误消息中显示的电子邮件 (,,,@github.com)
  • 在什么消息中?
【解决方案2】:

IRC 的一位用户询问了这种类似情况,我认为我们找到的答案也适用于这里。 (链接到这个问题的用户说“同样的事情正在发生”,这就是我遇到它的方式。)

考虑 OP 的输出:

从 git+git://github.com/theatlantic/django-ckeditor.git@atl/4.3.x#egg=django-ckeditor 获取 django-ckeditor

OP 试图通过匿名 git(git:// URL)安装 django-ckeditor。

错误是:

将“git@github.com:theatlantic/ckeditor-dev.git”克隆到子模块路径“ckeditor/static/ckeditor/ckeditor-dev”失败

如果您查看https://github.com/theatlantic/django-ckeditor/blob/atl/4.3.x/.gitmodules,django-ckeditor 会引入 ckeditor-dev,并使用 SSH URL 进行操作。

GitHub 不允许通过 SSH 进行匿名克隆。通过 SSH 使用 git 必须使用已注册的 SSH 密钥。用户必须注册 GitHub,注册他们的公钥,并适当地配置私钥以在此安装发生时使用。

存储库所有者 (theatlantic) 应将其子模块 URL 更改为 https:// URL,或匿名 git://。

【讨论】:

    猜你喜欢
    • 2021-11-11
    • 2011-11-25
    • 2012-01-18
    • 2012-04-25
    • 2014-03-18
    • 1970-01-01
    • 1970-01-01
    • 2020-01-04
    相关资源
    最近更新 更多