SourceTree failed to push some refs

1.6k Views Asked by At

I cloned a repository from BitBucket. After I made some simple changes in the code I did a commit. However, I am not able to push. The following error appears:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c
credential.helper=sourcetree push -v --tags origin refs/heads/dev:refs/heads/dev
Pushing to https://bitbucket.org/example/example.git
POST git-receive-pack (188 bytes)
remote: permission denied to update branch dev        
To https://bitbucket.org/example/example.git
! [remote rejected] dev -> dev (pre-receive hook declined)
error: failed to push some refs to 'https://bitbucket.org/example/example.git'
Completed with errors, see above

I searched Google and StackOverflow but the solutions weren't working. Does someone has a suggestion?

1

There are 1 best solutions below

0
On

You aren't permitted to push directly to that branch. (It says so in the response: remote: permission denied to update branch dev.) The repo admin panel has a "Branch permissions" section; if you're the admin, then you can update it yourself, and if you aren't an admin then you should speak to your admin.