Question about permissions for django.git

26 views
Skip to first unread message

Christopher Keith

unread,
Oct 31, 2020, 1:31:44 PM10/31/20
to Django users
Folks -


However, when I try to 'git fetch' the source repo, I get 'Permission denied'

PS C:\Users\chris\Documents\Github>  git clone https://github.com/chrisxkeith/django.git
Cloning into 'django'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 465879 (delta 0), reused 0 (delta 0), pack-reused 465878
Receiving objects: 100% (465879/465879), 197.61 MiB | 3.93 MiB/s, done.
Resolving deltas: 100% (339992/339992), done.
Updating files: 100% (6412/6412), done.
PS C:\Users\chris\Documents\Github> cd django
PS C:\Users\chris\Documents\Github\django> git remote add upstream g...@github.com:django/django.git
PS C:\Users\chris\Documents\Github\django> git fetch upstream
g...@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have tried this on Linux Mint also, and get the same error. Do I need to be added to some permissions list?

Thanks in advance for any help.
- Chris

Kasper Laudrup

unread,
Oct 31, 2020, 1:39:44 PM10/31/20
to django...@googlegroups.com
Hi Chris,

On 31/10/2020 17.02, Christopher Keith wrote:
> Folks -
>
> I am following the instructions from
> https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/working-with-git/
> .
>
> However, when I try to 'git fetch' the source repo, I get 'Permission
> denied'
>
> PS C:\Users\chris\Documents\Github>  git clone
> https://github.com/chrisxkeith/django.git

Here you are using an https URL (https://github.com/chrisxkeith/django.git)

> g...@github.com:django/django.git
> PS C:\Users\chris\Documents\Github\django> git fetch upstream
> g...@github.com: Permission denied (publickey).
> fatal: Could not read from remote repository.

Here you are using a "git" URL (g...@github.com:django/django.git).

Instead of:

# git remote add upstream g...@github.com:django/django.git

Try:

# git remote add upstream https://github.com/django/django.git

Or something similar.

Hope you see the difference.

Kind regards,

Kasper Laudrup

Christopher Keith

unread,
Oct 31, 2020, 2:24:34 PM10/31/20
to Django users
Hey Kasper-

Many thanks! Tried your suggestion and it works.

Does this mean that my specific git configuration is such that the 'git' URL will not work? If so, it is possible that https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/working-with-git/ could be updated to show both ways of setting up the remote?

Best regards,
Chris
Reply all
Reply to author
Forward
0 new messages