Pushing to Git returning Error Code 403 fatal: HTTP request failed
Are you seeing this error after running git push
error: The requested URL returned error: 403 Forbidden while accessing https://{yourusername}:{password}@github.com/yourRepo/ fatal: HTTP request failed
Note that 403 means is an HTTP code that means forbidden. It implies that your URL exists, the server is working, but there are some access/permission issues. It could be authentication or authorization.
Luckily, there are solutions that can surely solve your issue. Please try each of them, and if none work, leave a comment and I will personally help you solve it!
1. Make sure the password is correct
Self-explanatory, but in order for us to narrow what your particular issue is, we need to start with the basics. Make sure that your password is correct. You can check what password you are using in the .git/config
file in your repo’s root. If there is no password there, then you are likely using key-based authentication.
2. Create an Access Token
- Create a Personal Access Token, as per docs.
- https://github.com/settings/tokens
- Ensure all of the checkboxes are selected