2014-04-29 109 views
1

我根据github.com/sitaramc/gitolite上的README配置了gitolite。 gitolite服务器中的用户是git。我在工作站中的/ home/john/gitolite-admin/conf下更改了gitolite.conf,并在其中添加了foo repo。之后,我会推,我检查了服务器。服务器中的/ home/git/repositories获得了新的foo回购。 repo foo是RW +。在那种情况下,我认为gitolite工作正常。所以,我:gitolite git push致命拒绝

git add test.txt 
git commit -m "add test file" 
git remote rm origin 
git remote add origin [email protected]:/home/git/repositories/foo.git 
git push origin master 

但我得到的错误信息:

FATAL: W any home/git/repositories/foo John DENIED by fallthru 
(or you mis-spelled the reponame) 
fatal: The remote end hung up unexpectedly. 

我没有关于此错误的线索。有人可以提出任何建议吗?提前致谢。

回答

0

自述文件中未显示“[email protected]:/home/git/repositories/foo.git”网址。

你看到的是:

[email protected]:foo 

换句话说,你不能指定的完整路径。

另外,请确保您不会删除本地回购gitolite-admin中的原产地。

如果你有一个新的回购foo,你必须在其他地方复制它:

git clone [email protected]:foo 

我怀疑你只有一个SSH公钥/私钥,但如果你要保持几个身份,请参阅“Multiple gitolite users on one machine ”。

+0

非常感谢您的回复。我修改了git remote add origin git @ xxx:foo.git,然后做了git push。结果很好,比如master - > master。但是当我在服务器上查看foo时,没有任何更新。我必须做git clone foo foo2来检查更新的文件吗?请提出一些建议。提前致谢! – user2525034

+0

@ user2525034这在以下网址讨论:http://stackoverflow.com/a/16593046/6309:在服务器上看不到任何文件,这是正常的。 – VonC

相关问题