👋 We've unified all of GitHub's product documentation in one place! Check out the content for REST API, GraphQL API, and Developers. Learn more on the GitHub blog.
Article version: Enterprise Server 2.20

Error: Permission to user/repo denied to user/other-repo

This error means the key you are pushing with is attached to another repository as a deploy key, and does not have access to the repository you are trying to push to.

Were you able to find what you were looking for?

To fix this, remove the deploy key from the repository, and add the key to your user account instead.

If the key you are using is intended to be a deploy key, check out our guide on deploy keys for more details.

Were you able to find what you were looking for?

Ask a human

Can't find what you're looking for?

Contact us