#33585 closed Bug (fixed)
lacking hint to SSH setup (Working with Git and GitHub)
Reported by: | Samuel Hartmann | Owned by: | Carlton Gibson |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | documentation, git, github contributing, contribution |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Starting to work on #33544 I found the following:
The explanation 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 git@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. git@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 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 connect to GitHub.
I suggest two possible solutions:
- insert a new section after the Installing Git section
- 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.
Change History (7)
follow-up: 2 comment:1 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:2 by , 3 years ago
Replying to 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 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.
comment:3 by , 3 years ago
Has patch: | set |
---|---|
Resolution: | invalid |
Status: | closed → new |
Triage Stage: | Unreviewed → Accepted |
... 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.
comment:4 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
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.