Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

github

pip

I'm trying to install a forked repo (https://github.com/theatlantic/django-ckeditor/) on Github with pip but without success.

When I use

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

It does install the repo's content, but an older version of it, without the new changes I'm interested in. So I tried to force pip to get the most updated branch, which is apparently atl/4.3.x but I get this weird error, like if the branch's name would be incorrect or something like that :

$ 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 '[email protected]:theatlantic/ckeditor-dev.git' into submodule path 'ckeditor/static/ckeditor/ckeditor-dev' failed

Am I making a mistake somewhere ?

Thanks.

like image 594
Zashas Avatar asked Jan 27 '14 17:01

Zashas


People also ask

How do I fix permission denied publickey fatal could not read from remote repository please make sure you have the correct access rights and the repository exists?

The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.

Why do I get permission denied publickey?

"Permission denied (publickey)" and "Authentication failed, permission denied" errors occur if: You're trying to connect using the wrong user name for your AMI. The file permissions within the operating system are incorrect on the instance. The incorrect SSH public key (.

Is a directory git GitHub com Permission denied publickey?

GitHub's Permission denied (publickey) error is usually caused by one of the following three issues: You have used an incorrect email address in the GitHub SSH URL. You have not configured your public SSH key in your GitHub account. You must create GitHub SSH keys to be used by the secure shell.


2 Answers

The error message you posted:

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

...indicates you don't have access to the repo.

You might have luck using GitHub's HTTP URL instead:

pip install -e git+http://github.com/theatlantic/django-ckeditor.git#egg=django-ckeditor
like image 112
Aaron C. de Bruyn Avatar answered Sep 19 '22 01:09

Aaron C. de Bruyn


A user in IRC came in asking about this similar situation, and I think the answer we found applies here as well. (The user linked to this question saying "the same thing is happening", that's how I came across it.)

Consider the output from the OP:

Obtaining django-ckeditor from git+git://github.com/theatlantic/django-ckeditor.git@atl/4.3.x#egg=django-ckeditor

The OP was attempting to pip install django-ckeditor via anonymous git (a git:// URL).

The error was:

Clone of '[email protected]:theatlantic/ckeditor-dev.git' into submodule path 'ckeditor/static/ckeditor/ckeditor-dev' failed

If you look at https://github.com/theatlantic/django-ckeditor/blob/atl/4.3.x/.gitmodules, django-ckeditor pulls in ckeditor-dev, and does so with an SSH URL.

GitHub does not allow anonymous clones via SSH. Any use of git via SSH must use a registered SSH key. A user would have to sign up for GitHub, register their public key, and configure the private key appropriately to be used when this installation is happening.

The repository owner (theatlantic) should change their submodule URL to an https:// URL, or anonymous git://.

like image 42
VxJasonxV Avatar answered Sep 19 '22 01:09

VxJasonxV