Support for password authentication was removed on August 13,2021. Please use a personal access token instead.
Set Token authentication for Git operations. From 13th August 2021 password authentication was removed, So in this article, I will show how to set Token Authentication
Log in to your GitHub account and follow the next steps:
- In the upper-right corner of any page, click your profile photo, then click Settings. Settings icon in the user bar
- In the left sidebar, click Developer settings. Developer Plolicysettings
- In the left sidebar, click Personal access tokens. Personal access tokens
- Click Generate new token. Generate a new token button
- Give your token a descriptive name. Token description field
- To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker. Token expiration field
- Select the scopes or permissions, you’d like to grant this token. To use your token to access repositories from the command line, select repo.
- Selecting token scopes
- Click Generate token. Generate token button
- Copy safe your Newly created token as you will use this as your password every time you want to perform a
**** Note: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as
environment variables instead of hardcoding them into your programs.
Now You can push instead token to the password
$ git clone https://github.com/username/your-repo.git