Not able to push a commit in the main branch

Viewed 48

I have made one commit to my local machine, but when I'm trying to push the commit to main branch, I'm facing the below error.

git push origin main
remote: Permission to ragnarok/encode-project.git denied to Bhavishyag2.
fatal: unable to access 'https://github.com/ragnarok/encode-project.git/': The requested URL returned error: 403

When I do the above with SSH remote, it gives a different error:

encode-project>git push origin main
ERROR: Permission to ragnarok/encode-project.git denied to Bhavishyag2.
fatal: Could not read from remote repository.

If anyone could help?

1 Answers

That means the credentials (username/token) used for accessing ragnarok's repository or the SSH public key registered to GitHub is:

  • not ragnarok's
  • identify a remote account Bhavishyag2 who is not registered as a collaborator to the ragnarok/encode-project project.

If you are Bhavishyag2, you would need to fork ragnarok/encode-project before being able to add/commit and, more importantly, push to that repository.

Related