2

I cannot find my project files on the server gitolite is running. Basically, I built a git server using gitolite on a CentOS 6.2, and I created a new repository,I can successfully clone, pull, commit and push files to this new project, but when I logged in this server, trying to find my project files on it, I could not find them. the repository is in /home/mygituser/repositories/myproject.git/ , but none of my pushed files can be found any in there.

Is gitolite keeping the actual project contents somewhere else or is there a way to config and seperate project contents and its repository?

This is driving me crazy, any help will be highly appreciated.

Ross Wang
  • 27
  • 3

1 Answers1

0

Gitolite operates with bare repositories.
A bare repo has no working tree, meaning no files.

That is why, by the way, your repo root directory ends with .git: it is a naming convention to reference bare repos.

See "Git push only for bare repositories?" for more.

Your repos are managed by default on:

~git/repositories/myrepo1.git
~git/repositories/myrepo2.git

Generally, you don't need to look to the content of a repo while being on the server: you simply clone it on a client and look it there. (the clone won't be a bare repo by default)

You could clone it on the server, if you have a proper ~git/.ssh/id_rsa(.pub) key declared as a user in the gitolite.conf file.
It is what I do, as a test, after installing/updating gitolite on my server.
That works because of my local ssh config file:

Host gitolitesrv
Hostname localhost
User @USERNAME@
Port @PORT_SSHD@
IdentityFile @H@/.ssh/gitoliteadm

So I have a ~git/.ssh/gitolite(.pub) private and public key dedicated to gitolite admin, which I can use locally on the server to clone gitolite repo if I want.
That is because I use that same key to setup gitolite:

 GITOLITE_HTTP_HOME= gitolite setup -pk "${H}/.ssh/gitoliteadm.pub"

If you have a similar setup, you can then clone any repo on the server:

git clone gitolitesrv:gitolite-admin "${gtl}/ga"
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks a lot for your attention. can you please tell me where is the project content path by default? or there is no way to review them on gitolite server? – Ross Wang May 16 '13 at 16:44
  • I found a related topic, and I think i am not gonna find a work copy on gitlite server as you guys suggested. http://stackoverflow.com/questions/7060636/git-gitolite-moving-repos-after-setting-up-gitolite – Ross Wang May 16 '13 at 16:54
  • @RossWang I have edited the answer (the `@variable@` are templates to be replace by real values) – VonC May 16 '13 at 16:54
  • Thank you very much! it is a great practice. I tried to review the project contents is for making sure all files were pushed correctly, this can be done by clone a new one. – Ross Wang May 16 '13 at 17:01