On November 2020, GitHub had announced that they would no longer accept basic username/password to authenticate git commits and it would be deprecated by Mid 2021.
Instead, they recommend you to authenticate your git commits using a Personal Access Token from your GitHub account.
Generate a personal access token
- Unset your credentials from your remote repository:
git config --local --unset credential.helper
- Login to your GitHub account and go to Settings
- Then navigate to Developer Settings -> Personal Access Tokens
- Click on Generate new token
- Give a name to your Personal Access Token and the necessary permissions required.
- Once done, hit on Generate token
- The token will be shown once, so make sure to copy it and store it somewhere that you can remember.
Update your remote repository
Once you've generated a token, you just have to update your remote repository by following the below steps:
1. Update remote repository URL
git remote set-url origin https://<your_access_token>@github.com/<your_git_repo_url>
2. Just git pull once
Now, just perform
git pull operation once and you should be good:
git pull https://<your_access_token>@github.com/<your_git_repo_url>
Hope this helps you out!