繁体   English   中英

无法使用pip在github上安装特定的git分支-权限被拒绝(publickey)

[英]Cannot install a specific git branch on github with pip - Permission denied (publickey)

我试图在Github上用pip安装一个分叉的仓库( 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

我在某个地方犯错了吗?

谢谢。

您发布的错误消息:

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

...表明您无权访问该存储库。

您可能会改用GitHub的HTTP URL:

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

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://

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM