Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in git: You can only push your own commits in this repository

Yesterday I started to recieve errors when trying to push my commit to repo, how to fix it? And I am not admin of this repo.

remote: You can only push your own commits in this repository
remote: Commit commitName was committed by <myName> <[email protected]>
To ssh://bitbucket.awg.ru/repo
 ! [remote rejected] branchName -> branchName (pre-receive hook declined)
error: failed to push some refs to 'ssh://[email protected]/repo'

Update

Thanks everybody, the problem is solved. The problem was on the Bitbucket side, the admininstrator changed some options. Now everything is OK.

like image 292
Oleg Avatar asked Oct 19 '18 05:10

Oleg


1 Answers

Thanks everybody, problem is solved. Problem was on Bitbucket side, administrator changed some options. Now everything is OK.

UPDATE

As per @Oleg who asked the question. The problem in general happens because of a Bitbucket hook. This hook will reject any push that contains a commit not committed by the user who pushes to the server.

To solve the issue:

  • You must have Admin access to the repository in Bitbucket server
  • Go to the repository in the server
  • Then ⚙ Repository settings in the sidebar
  • Select Hooks
  • Disable Verify Committer hook
  • You are done
like image 177
Oleg Avatar answered Sep 20 '22 06:09

Oleg