This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-08-20. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.18

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.

Did this doc help you?

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.

Did this doc help you?

Ask a human

Can't find what you're looking for?

Contact us