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: unable to access ‘https://github.com/piyas33/browser_web_react.git/': The requested URL returned error: 403
To fix the error, follow the below steps:
- Your Profile Settings
2. Click Developer settings below on the right side.
3. Click Personal access tokens.
4. Click Generate New Token
5. Write the token name:
6. After generating the token, Copy this.
7. This token is used as a password.
Important Note: To store the token git credential so you don’t have to type the token every time, use this command before pushing.
git config credential.helper store
Permanently Save Token:
- Now, open the Git repository where you got the error and remove the current origin by running the following command.
git remote remove origin
2. Add the new origin using the following command in your terminal.
git remote add origin https://<TOKEN>@github.com/<USERNAME>/<REPO>.gitExample:git remote add origin https://firstname.lastname@example.org/piyas33/blog_demo.git
That’s it, now you can push your code to GitHub using the
git push command without any errors.