简体   繁体   中英

SourceTree failed to push some refs

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM