Cyclops
Cyclops

Reputation: 689

Error when pushing to master

When I am trying to push my changes to the master I am getting an error saying,

fatal: remote error: Insufficient permissions
You do not have permissions to push to the repository <my repo name> in the project <project name>

My git repo is in Atalassian STASH

Upvotes: 5

Views: 7414

Answers (1)

VonC
VonC

Reputation: 1323263

In addition of the possible authentication issue (wrong username/password for https access, or wrong/unknown public key sor ssh access), check the branch permissions.
See "Using branch permissions".

As specified in this thread:

branch permissions doesn't elevate the project level permissions. It is more of a restriction.
When you push changes to a repository:

  • first the project level permission is checked. This is the same as it was in Stash 1.x meaning the user must be a contributor (have write access) to the project in order for their push to proceed.
  • Stash then checks the branch permissions for each branch which is being updated.
    • If a restriction exists and the user doesn't have permission the push is rejected.
    • If there is no restriction or they have permission the push is successful.

Upvotes: 1

Related Questions