git push origin master -> 被fallthru拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12905870/
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-19 07:38:36  来源:igfitidea点击:

git push origin master -> DENIED by fallthru

gitgitolite

提问by David Vasandani

When I try to 'git push origin master' I get the error 'DENIED by fallthru'

当我尝试 'git push origin master' 时,我收到错误 'DENIED by fallthru'

I've spent the last three hours googling. I can't figure out how to fix it.

过去三个小时我都在谷歌上搜索。我不知道如何修复它。

gitolite.log

gitolite.log

2012-10-15.16:43:47 16930   ssh ARGV=david_neudorfer_lbox_com_1350337154    SOC=git-receive-pack 'Treasure-Hunt.git'    FROM=10.0.4.185
2012-10-15.16:43:47 16930       repo 'Treasure-Hunt' missing
2012-10-15.16:43:47 16930       access(Treasure-Hunt, david_neudorfer_lbox_com_1350337154, W, 'any'),-> W any Treasure-Hunt david_neudorfer_lbox_com_1350337154 DENIED by fallthru
2012-10-15.16:43:47 16930       trigger,Writable,access_1,ACCESS_1,Treasure-Hunt,david_neudorfer_lbox_com_1350337154,W,any,W any Treasure-Hunt david_neudorfer_lbox_com_1350337154 DENIED by fallthru
2012-10-15.16:43:47 16930   die W any Treasure-Hunt david_neudorfer_lbox_com_1350337154 DENIED by fallthru<<newline>>(or you mis-spelled the reponame)

gitolite.conf

gitolite.conf

repo    test_project
  RW+                            = david_neudorfer_lbox_com_1350344583
repo    projectsmadesimple-web
  RW+                            = david_neudorfer_lbox_com_1350344583
repo    treasure-hunt
  RW+                            = david_neudorfer_lbox_com_1350344583

I noticed that the numbers after the names are different. Hoping that had something to do with it I tried:

我注意到名字后面的数字是不同的。希望与它有关我试过:

repo    test_project
  RW+                            = david_neudorfer_lbox_com_1350344583
  RW+                            = david_neudorfer_lbox_com_1350337154

Didn't work. Any suggestions would be great.

没用。任何建议都会很棒。

采纳答案by VonC

As cjc343comments, the last error line is telling:

正如cjc343评论的那样,最后一个错误行告诉我们:

2012-10-15.16:43:47 16930   die W any Treasure-Hunt 
                            DENIED by fallthru
                            (or you mis-spelled the reponame)

That error message comes from the main() function of src/gitolite-shell, after calling the src/lib/Gitolite/Conf/Load.pm repo_missing() function.

该错误消息来自src/gitolite-shellmain() 函数,在调用src/lib/Gitolite/Conf/Load.pm repo_missing() 函数之后

sub repo_missing {
    my $repo = shift;
    sanity($repo);

    return not -d "$rc{GL_REPO_BASE}/$repo.git";
}

It looks for a directory, which is, on Unix system, case sensitive.

它查找一个目录,该目录在 Unix 系统上区分大小写。

Then you need to fix the id issue: you should be authenticated always with the same name.

然后您需要解决 id 问题:您应该始终使用相同的名称进行身份验证。

回答by Tarun Yadav

Solved:
In my case I moved repo from my account to a group so path to the repo changed on remote but not in my local repo.

已解决:
在我的情况下,我将 repo 从我的帐户移动到一个组,因此 repo 的路径在远程更改但不在我的本地 repo 中。

So I changed path in local repo (config file):

所以我更改了本地仓库(配置文件)中的路径:

[remote "origin"]
url = [email protected]:mygroup/repo.git              // previously [email protected]:myname/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*