Git push error pre-receive hook declined

前端 未结 14 1090
眼角桃花
眼角桃花 2020-11-28 03:06

I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md a

相关标签:
14条回答
  • 2020-11-28 03:31

    Please check if JIRA status in "In Development". For me , it was not , when i changed jira status to "In Development", it worked for me.

    0 讨论(0)
  • 2020-11-28 03:33

    I've faced the same issue, this is because I am pushing my code directly in the master branch, and I don't have rights for this. So I push my code in a new branch and after that, I created a pull request to merge with master.

    0 讨论(0)
  • 2020-11-28 03:35

    I stumbled across the same error using BitBucket. I had a local Git repo I wanted to back up online, so I created a new repository from my BitBucket account (using the web interface).

    After running git remote add origin git@bitbucket.org:StatMarianne/<a private repo>.git, I ran git push origin master to no avail (I typically don't use the -u option with git push because I don't mind typing up the full repo and branch names when pushing and pulling).

    The error read:

    remote: You're not allowed to write to this repository.
    To bitbucket.org:StatMarianne/<a private repo>.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'git@bitbucket.org:StatMarianne/<a private repo>.git'
    

    But my local branch did get successfully pushed when I ran git push -u origin master (following strictly BitBucket's instructions).

    I find it surprising, since -u (--set-upstream) should only "add upstream (tracking) reference..." Anyhow.

    0 讨论(0)
  • 2020-11-28 03:36

    Go to Project settings --> Hooks --> (Under) Pre-receive hooks

    Disable cp require issue reference in commits

    0 讨论(0)
  • 2020-11-28 03:37

    ihave followed the instruction of heroku logs img https://devcenter.heroku.com/articles/buildpacks#detection-failure ( use cmd: heroku logs -> show your error) then do the cmd: "heroku buildpacks:clear". finally, it worked for me!

    0 讨论(0)
  • 2020-11-28 03:38

    You might not have developer access to the project or master branch. You need dev access to push new work up.

    New work meaning new branches and commits.

    0 讨论(0)
提交回复
热议问题