GitHub CLI authentication on Linux/Mac

Support for password authentication was removed on August 13, 2021. Please use a personal access token instead

GitHub CLI authentication on Linux/Mac
Photo by Roman Synkevych / Unsplash

I was just reinstalling my operating system when I came across GitHub clone error:

Support for password authentication was removed on August 13, 2021. Please use a personal access token instead

The solution is simple. All we need to do is use developer token.
If you don't like to be asked every time to enter the developer token first start with commands:

git config --global user.name "yourgithubusername"
git config --global user.email "your@email.com"
git config -l

Now navigate your browser to https://github.com/settings/tokens and issue a new token by clicking on  Generate new token. We will use this token as our password when asked for credentials.

Now clone the repository of your liking and enter username and newly generated token as password.

Voila!