1

I configured gitolite according to README from github.com/sitaramc/gitolite. The user in gitolite server is git. I changed the gitolite.conf under /home/john/gitolite-admin/conf in the workstation, where I added a foo repo. After that, I git push and I checked the server. The /home/git/repositories in the server got the new foo repo. The repo foo is RW+. In that case, I assumed that the gitolite works ok. So, I:

git add test.txt
git commit -m "add test file"
git remote rm origin
git remote add origin git@192.168.1.5:/home/git/repositories/foo.git
git push origin master

But I got the error message:

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

I have no clue about this error. Can someone give any suggestions? Thanks in advance.

user2525034
  • 43
  • 2
  • 5

1 Answers1

0

You don't see "git@xxx:/home/git/repositories/foo.git" urls in the README.

What you see is:

git@xxx:foo

In other word, you must not specify the full path.

Plus, make sure you don't delete origin in your local repo gitolite-admin.

If you have a new repo foo, you must clone it somewhere else:

git clone git@xxx:foo

I suspect you have only one ssh public/private key, but if you have to maintain several identities, see "Multiple gitolite users on one machine".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you very much for your response. I amended git remote add origin git@xxx:foo.git, then did git push. The result is fine, like master ->master. But when I checked the foo under server, there are no any updates. Do I have to do git clone foo foo2 to check the updated files? Please give some suggestion. Thanks in advance! – user2525034 Apr 30 '14 at 20:38
  • @user2525034 this is discussed at: http://stackoverflow.com/a/16593046/6309: you won't see any file on the server, this is normal. – VonC Apr 30 '14 at 20:47