Skip to content

authentication confusion when doing git push in next_steps.md #289

Closed

Description

@sverhoeven

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.

Activity

  1. added
    generated-package
    on May 4, 2021
  2. luisaforozco commented on Sep 28, 2022

    @luisaforozco
    Collaborator

    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> = git@github.com:name_organization/name_repo did the trick.

  3. apalha commented on Nov 17, 2022

    @apalha
    Contributor

    I faced the same issue. Shall I change this line

    "repository": "https://github.com/" + cookiecutter.github_organization + "/" + cookiecutter.directory_name.lower().replace(" ", "-"),

    To

    "repository": "git@github.com:" + cookiecutter.github_organization + "/" + cookiecutter.directory_name.lower().replace(" ", "-"),
    

    And add after this

    Once your Python package is created, put it under [version
    control](https://guide.esciencecenter.nl/#/best_practices/version_control) using
    [git](https://git-scm.com/) and [GitHub](https://github.com/).

    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).
    
  4. egpbos commented on Nov 17, 2022

    @egpbos
    Collaborator

    That would be great imho!

  5. bvreede commented on Nov 17, 2022

    @bvreede
    Contributor

    @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).

  6. apalha commented on Nov 17, 2022

    @apalha
    Contributor

    @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 git@github.com: by https://github.com/.

  7. bvreede commented on Nov 17, 2022

    @bvreede
    Contributor

    Perfect @apalha! Thanks!

  8. apalha commented on Nov 18, 2022

    @apalha
    Contributor

    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?

  9. sverhoeven commented on Nov 18, 2022

    @sverhoeven
    MemberAuthor

    @apalha you should have permission now.

  10. apalha commented on Nov 18, 2022

    @apalha
    Contributor

    Works now, thanks @sverhoeven ! Just made the pull request.

  11. linked a pull request that will close this issueFixes authentication confusion #325on Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    generated-package

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions