GitHub login

Lately I get an email from github

You recently used a password to access the repository at … … with git using git/2.26.2.

Basic authentication using a password to Git is deprecated and will soon no longer work. Visit Token authentication requirements for Git operations - The GitHub Blog for more information around suggested workarounds and removal dates.

I don’t understand what I have to do to comply, can someone tell me step by step what I should do?

I use atom on linux.

Thanks

Hi,

At the moment, if you are using git from the command-line, for things such as cloning private repositories, or pushing code to repositories, it has been true for a while that you can type your username and password on the command-line for GitHub.com to let GitHub know you have access rights to those repositories. But this will stop working August 13, 2021.

Personal Access Tokens are the recommended way to prove to GitHub that you are who you say you are. The official instructions to get a Personal Access Token are here: Creating a personal access token - GitHub Docs

Mostly:

  1. Make sure your email address is verified for your GitHub account
  2. Visit here: https://github.com/settings/tokens
    1. Generate a new token
    2. Be ready to write this down somewhere or copy it somewhere, as it can only be shown once or you have to reset it to get a new one. (Which is fine, just a bit inconvenient to have to do).
  3. When asked to authenticate to GitHub, enter this token as your password. I think the username you enter doesn’t actually matter if you give the token as your password. It only checks that the token is for an account that genuinely has access rights to whatever repository you are meaning to work with.
    1. If you already have entered your password into some credential manager, something that remembers your password for you, you might have to delete your old password so you can enter the token in its place. There are a lot of different ways to store a password for git, so unfortunately the answer for how to delete a password depends on exactly how it was stored. If you need help with this, I think we’d need more information to say the exact way to get rid of the old password.

I hope that helps.

Best Regards.