git push origin 被fallthru拒绝,钩子拒绝:gitolite

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10429201/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 13:36:26  来源:igfitidea点击:

git push origin DENIED by fallthru, hook declined: gitolite

gitgitolitegit-push

提问by teak

I am having a problem pushing with gitusing Gitolite.
When I try this:

我在推动git使用 Gitolite时遇到问题。
当我尝试这个时:

git push origin :refs/tags/deployment

I get this error:

我收到此错误:

remote: D NAME/install.py repos michael DENIED by fallthru
remote: error: hook declined to update refs/tags/deployment
To gitolite@admin:repos
 ! [remote rejected] deployment (hook declined)
error: failed to push some refs to 'gitolite@admin:repos'

I have given the group deploy[of which the user michaelis a member of] permission to delete branches in the Gitolite config:

我已授予组deploy[其中用户michael是其成员] 删除 Gitolite 配置中的分支的权限:

@deply  =   michael

repo  repos

        RWD    =   @deply

I have seen this post: "Unable to push in Git. Why?"

我看过这篇文章:“无法推送 Git。为什么?

But I am not using any hooks that I am aware of and cannot find anything thing else that might relate.

但是我没有使用我知道的任何钩子,也找不到任何其他可能相关的东西。

Is there something im missing perhaps?
Has anybody come across this?

可能有什么我遗漏的吗?
有没有人遇到过这个?

回答by Mike

You need RW+permission for ref changes/deletion

您需要RW+获得 ref 更改/删除的许可

RW+, for "push -f" or ref deletion allowed (i.e., destroy information)

RW+,表示允许“push -f”或ref删除(即销毁信息)

Also, if you're using V2 this may apply:

此外,如果您使用的是 V2,这可能适用:

RWD and RW+D, for ref deletion. Once you use this in a repo, a normal RW+ can no longer delete a ref; it can only rewind

RWD 和 RW+D,用于 ref 删除。一旦在 repo 中使用它,普通的 RW+ 就不能再删除 ref;它只能倒带

Sources:

资料来源:

http://sitaramc.github.com/gitolite/g2/conf.html

http://sitaramc.github.com/gitolite/g2/conf.html

http://sitaramc.github.com/gitolite/rules.html

http://sitaramc.github.com/gitolite/rules.html

回答by Huns

This worked for me, when nothing else would:

这对我有用,当没有其他方法时:

cd ~gitlab/gitlab
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_keys RAILS_ENV=production
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production