PS C:\Users\duhbb\PhpstormProjects\xxx-yyy> git push -uf origin main Enumerating objects: 306, done. Counting objects: 100% (306/306), done. Delta compression using up to 16 threads Compressing objects: 100% (293/293), done. Writing objects: 100% (306/306), 283.67 KiB | 5.91 MiB/s, done. Total 306 (delta 40), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (40/40), done. remote: GitLab: You are not allowed to force push code to a protected branch on this project. To http://192.168.213.7:8099/gitlab-instance-22480f0d/xxx-yyy.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'http://192.168.213.7:8099/gitlab-instance-22480f0d/xxx-yyy.git'
如上,报错了。
后来看了下gitlab,发现分支被设置为protected了,去掉了protected分支,再次push,成功。
本文链接地址:! [remote rejected] main -> main (pre-receive hook declined),英雄不问来路,转载请注明出处,谢谢。
有话想说:那就赶紧去给我留言吧。
文章评论