Error on git push = ! [remote rejected] master -> master (pre-receive hook declined)

后端 未结 6 1207
悲&欢浪女
悲&欢浪女 2021-02-05 01:26

I think, it\'s a different issue than this(remote rejected master -> master (pre-receive hook declined)), and many people are facing same issue, So I am posting a new here.

相关标签:
6条回答
  • 2021-02-05 01:55

    I have better solution on Bitbucket: If you are admin go to Repo >Settings >Limit Pushes section, and in "Branch name" put 'master', and in "..search... user" put your user name - then push "ADD" - and you are done :)

    0 讨论(0)
  • 2021-02-05 01:56

    Just reporting another case leading to the specified error. If the Bitbucket repository size reaches 2 GB, Bitbucket itself restricts the repository to read-only access. When that happens, contributors with read/write permissions are not able to push and get the "pre-receive hook declined" error.

    I also found these documents from Atlassian: https://blog.bitbucket.org/2014/05/30/repository-size-limits/ https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html

    Links include a guide on how to restore the repo back to full functionality

    0 讨论(0)
  • 2021-02-05 02:05

    What worked for me was:

    1. Created a new branch locally
    2. Bitbucket -> Settings -> Repository details = changed default branch (e.g to prod)
    3. Bitbucket -> Branches -> delete master branch (you can do this without step 2)
    4. Then push your locally created branch (e.g master)
    5. Bitbucket -> Settings -> Repository details = changed default branch (e.g to master)
    0 讨论(0)
  • 2021-02-05 02:09

    It looks like the branch management (one of the admin settings) in bitbucket has been configured to only allow certain people to push directly to master.

    Try creating a branch - git checkout -b test, create your test commit and push git push origin test:test. You can always cleanly delete this branch once you have completed the test.

    The other option (probably best agreeing with whoever set this up) is you go to bitbucket and head to admin, branch management and remove master be to limited. cf - https://confluence.atlassian.com/display/BITBUCKET/Branch+management

    0 讨论(0)
  • 2021-02-05 02:18

    The same issue with me on gitlab, I asked the repo owner to grand me maintainer role and the issue fixed.

    0 讨论(0)
  • 2021-02-05 02:20

    I think package setuptools/distribute is listed in requirements.txt. Please remove the same.

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