[Django] #33585: lacking hint to SSH setup (Working with Git and GitHub)

47 views
Skip to first unread message

Django

unread,
Mar 18, 2022, 12:25:26 PM3/18/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel | Owner: Samuel Hartmann
Hartmann |
Type: Bug | Status: assigned
Component: | Version: dev
Documentation | Keywords: documentation, git,
Severity: Normal | github contributing, contribution
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Starting to work on #33544 I found the following:

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.

Django

unread,
Mar 18, 2022, 12:33:47 PM3/18/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Samuel
| Hartmann
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: invalid
Keywords: documentation, git, | Triage Stage:
github contributing, contribution | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mohamed Nabil Rady):

* 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>

Django

unread,
Mar 19, 2022, 9:14:01 AM3/19/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Samuel
| Hartmann
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: invalid
Keywords: documentation, git, | Triage Stage:
github contributing, contribution | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Mar 22, 2022, 5:02:11 AM3/22/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Samuel
| Hartmann
Type: Bug | Status: new

Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: documentation, git, | Triage Stage: Accepted
github contributing, contribution |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* 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>

Django

unread,
Mar 22, 2022, 5:02:20 AM3/22/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Carlton
| Gibson
Type: Bug | Status: assigned

Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: documentation, git, | Triage Stage: Accepted
github contributing, contribution |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* owner: Samuel Hartmann => Carlton Gibson
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:4>

Django

unread,
Mar 22, 2022, 6:23:40 AM3/22/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: documentation, git, | Triage Stage: Ready for
github contributing, contribution | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33585#comment:5>

Django

unread,
Mar 22, 2022, 6:58:34 AM3/22/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed

Keywords: documentation, git, | Triage Stage: Ready for
github contributing, contribution | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* 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>

Django

unread,
Mar 22, 2022, 7:13:21 AM3/22/22
to django-...@googlegroups.com
#33585: lacking hint to SSH setup (Working with Git and GitHub)
-------------------------------------+-------------------------------------
Reporter: Samuel Hartmann | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed
Keywords: documentation, git, | Triage Stage: Ready for
github contributing, contribution | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages