The explanation
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/working-with-git/#setting-up-local-repository "Setting up local
repository"] in "Working with Git and GitHub" quitely assumes that people
have already set up their local Git and GitHub for use of SSH.
They say:
> You should also set up django/django as an “upstream” remote (that is,
tell git that the reference Django repository was the source of your fork
of it):
>
>
> {{{
> git remote add upstream g...@github.com:django/django.git
> git fetch upstream
> }}}
I didn't set up SSH before.
Hence I got the following error when running `git fetch upstream`:
{{{
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is
SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known
hosts.
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.
}}}
The reason and solution for that error are described in
[https://stackoverflow.com/a/12940681 this stackoverflow reply].
Basically you need to set up an SSH key on your local machine and add it
to your GitHub profile.
This enables you to [https://docs.github.com/en/authentication/connecting-
to-github-with-ssh connect to GitHub].
I suggest two possible solutions:
1. insert a new section after the
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/working-with-git/#installing-git Installing Git] section
2. change the SSH notations (like git@^^github.com:django/django.git) to
HTTPS notations (like https://github.com/django/django.git) instead
If the second approach makes sense, I'd prefer this one because it's
easier to understand and needs less effort from a setup perspective.
Hence simplifies the start for first time contributers.
--
Ticket URL: <https://code.djangoproject.com/ticket/33585>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: assigned => closed
* resolution: => invalid
Comment:
This seems like a Github issue and not a Django issue, I think the user
can figure out the problem from the git error message.
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:1>
Comment (by Samuel Hartmann):
Replying to [comment:1 Mohamed Nabil Rady]:
> This seems like a Github issue and not a Django issue, I think the user
can figure out the problem from the git error message.
From my point of view, the issue here isn't the error message itself (Of
course we can't change/fix the error).
Instead the issue is that the documentation is incomplete.
The documentation is incomplete because it intends to give the correct
prerequisites in the
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/working-with-git/#installing-git Installing Git] section.
But these are actually not all requirements which are necessary to follow
the subsequent steps.
Since this documenation especially targets first time contributers, I
suggest to make it as easy as possible.
It took me at least one hour to get the SSH setup running.
This may definitely be enough to sicourage most of the first timers.
So my intention with this ticket is to simplify the contribution for first
time contributers as much as possible, to enlarge the community which
maintains Django in the long run.
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:2>
* status: closed => new
* has_patch: 0 => 1
* resolution: invalid =>
* stage: Unreviewed => Accepted
Comment:
> ... simplify the contribution for first time contributers as much as
possible
Yes, we did similar in 3c6a4fdb6d828a03e368632d88f8261cc30104da. GitHub's
SSH config docs are great, but the using the HTTPS checkout can defer
needing to deal with such configuration.
[https://github.com/django/django/pull/15533 PR updating the remaining
examples.]
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:3>
* owner: Samuel Hartmann => Carlton Gibson
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9fed515a251d488172feb1652bb5179344364fb3" 9fed515a]:
{{{
#!CommitTicketReference repository=""
revision="9fed515a251d488172feb1652bb5179344364fb3"
Fixed #33585 -- Made example git repo URLs use HTTPS protocol.
The SSH-based checkout requires additional configuration, which is
beneficial to defer for new contributors.
Follow up to 3c6a4fdb6d828a03e368632d88f8261cc30104da. This commit
updates the remaining examples.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"c0a34befeadea2f6031e2906b7890b329cc712bf" c0a34bef]:
{{{
#!CommitTicketReference repository=""
revision="c0a34befeadea2f6031e2906b7890b329cc712bf"
[4.0.x] Fixed #33585 -- Made example git repo URLs use HTTPS protocol.
The SSH-based checkout requires additional configuration, which is
beneficial to defer for new contributors.
Follow up to 3c6a4fdb6d828a03e368632d88f8261cc30104da. This commit
updates the remaining examples.
Backport of 9fed515a251d488172feb1652bb5179344364fb3 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:7>