Github Support for password authentication was removed

Posted on

Please use a personal access token instead.

Github Support for password authentication was removed – In this article I want to share a tutorial on how to solve git errors when we want to retrieve files from github. Here is the error:

neon@neon:~/Documents/KERJA/FAHMI$ git clone https://github.com/Testing/myproject.git
Cloning into 'myproject'...
Username for 'https://github.com': whyme31
Password for 'https://whyme31@github.com': 
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/Testing/myproject.git/'

This is because we can no longer use the existing link addresses in general. By default the command we use is:

git clone https://github.com/Testing/myproject.git

But that method can no longer be used!

The newest way is to include a token.

Here is the format:

git clone https://<your_token>@github.com/Testing/myproject.git

How to Activate Github Token

To be able to activate the github token, follow this method:

  • Login to your github account
  • Select the Settings menu -> Developer Settings
Github Support for password authentication was removed
  • Then click Personal access tokens
  • Then click Generate new token
  • Fill in the Note form with information
  • Check Repo
  • Click Generate token.
Github Support for password authentication was removed
  • You will get a token code.
  • For example the tokens I get:

ghp_FCdJGH4HJSphPEowaGR6WaTonj95Gk3Nn0zZ

  • Next enter the token into the command like:
git clone https://ghp_FCdJGH4HJSphPEowaGR6WaTonj95Gk3Nn0zZ@github.com/Testing/myproject.git
  • If true, then you will get an error like this:
neon@neon:~/Documents/KERJA/FAHMI$ git clone https://ghp_FCdJGH4HJSphPEowaGR6WaTonj95Gk3Nn0zZ@github.com/Testing/myproject.git
Cloning into 'myproject'...
remote: Enumerating objects: 8274, done.
remote: Counting objects: 100% (8274/8274), done.
remote: Compressing objects: 100% (5962/5962), done.
remote: Total 8274 (delta 2103), reused 8267 (delta 2096), pack-reused 0
Receiving objects: 100% (8274/8274), 9.39 MiB | 448.00 KiB/s, done.
Resolving deltas: 100% (2103/2103), done.
  • Done

If this github password authentication was removed article was useful, please share it using the button below. Have a nice day.

Leave a Reply