python-template
python-template copied to clipboard
authentication confusion when doing git push in next_steps.md
Asked password is not your GitHub password, but must be a personal access token. This is confusing to people who have not used GitHub before.
Add https://docs.github.com/en/github-ae@latest/github/authenticating-to-github/creating-a-personal-access-token link to next_steps.md how to setup authentication.
Mentioned @bvreede during sprint demo.
Hi @sverhoeven, I encounter this issue when following next_steps.md, indeed the problem was that I couldn't do git remote add origin <URL of repo>
using HTTP, but by setting <URL of repo> = [email protected]:name_organization/name_repo
did the trick.
I faced the same issue. Shall I change this line
https://github.com/NLeSC/python-template/blob/3c176c5758a10f727d97bbf1435933598c5ffb65/hooks/pre_gen_project.py#L8
To
"repository": "[email protected]:" + cookiecutter.github_organization + "/" + cookiecutter.directory_name.lower().replace(" ", "-"),
And add after this
https://github.com/NLeSC/python-template/blob/3c176c5758a10f727d97bbf1435933598c5ffb65/%7B%7Bcookiecutter.directory_name%7D%7D/next_steps.md?plain=1#L5-L7
add
Note that you must setup your github authentication to do the following steps,
see [Creating a personal access token](https://docs.github.com/en/github-ae@latest/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
or [Connecting to GitHub with SSH](https://docs.github.com/en/github-ae@latest/authentication/connecting-to-github-with-ssh).
That would be great imho!
@apalha That looks good!
Though if the repo address is now SSH by default, then the instructions should only be for SSH, right? So the link to the first set of instructions should be removed, or put in a different context (namely with instructions to change the address to https).
@bvreede that is a good point.
What about this text:
Note that the next step assumes you have setup your connection to GitHub via SSH, see Connecting to GitHub with SSH.
You can also use a personal access token, see Creating a personal access token. If you choose this option below you will have to replace [email protected]:
by https://github.com/
.
Perfect @apalha! Thanks!
I made the changes on a new branch: 289-authentication-confusion (is this the format used?). When I try to push the branch it says I do not have permissions. I should have right?
Or should I do it with a fork?
@apalha you should have permission now.
Works now, thanks @sverhoeven ! Just made the pull request.