2

I've a CentOS 6.2 server and will like to install & configure a Git Server there. I read a lot of documentation at this [1] and [2] for example but I'm stucked because it's a bit complex than SVN Server and have a lot of things to do. I get installed git-core git-web git-daemon and gitolite. I export my Pub SSH key from my client (Fedora 17 PC) to the server. I have a partition /data where I created a folder and call it /gitrepo and I want all the repos to be there. Which files I must configure to do this? How to setup git-web to find repositories there? I have a project under /var/www/html, how I add this project to a git repository?

Thanks in advance, hope any can clarify my ideas

[1] http://www.calculate-linux.org/main/en/gitolite
[2] http://linuxsysadminblog.com/2012/06/gitolite-add-edit-or-delete-git-repository-name/
ReynierPM
  • 700
  • 5
  • 14
  • 28

1 Answers1

1

Git works a littlebit different from SVN.

I don't know how deep you are into Git but in short you don't need much work to get your Git repo to the server.

The only thing Git needs is a SSH connection to your server. No deamon needed (at least for the Git hosting).

Just to make it clear. In the Git philosophy every one who works on a project in Git has hiw own local repository. So you just push your own repository up to the server.

For Git-web you might look into this: http://repo.or.cz/w/alt-git.git?a=blob_plain;f=gitweb/INSTALL

Christopher Perrin
  • 4,741
  • 17
  • 32
  • Thanks @cperrin88 it's a bit clear to me now but I think this is not my case at least right now because I have multiple developers but each have just one or two projects meaning just one developer by project. Now where I create my first empty git repo: at server, at client (developer PC)? I'm making a bash script for this purpose but need more help to understand the whole process. – ReynierPM Jun 21 '12 at 13:32
  • @ReynierPM: you need to declare it in your local clone of the gitolite-admin repo, if you are using gitolite. Pushing that gitolite-admin repo back will create your empty repo on the server. Then you can create said repo locally, add the remote address of the gitolite server and push. – VonC Jun 21 '12 at 13:42
  • @VonC I install gitolite and init gitolite-admin repo. I copied my SSH pub key to the server where gitolite-admin repo reside. What's next? clone the gitolite-admin repo to the clients? – ReynierPM Jun 21 '12 at 13:44
  • @ReynierPM http://sitaramc.github.com/gitolite/glssh.html and http://sitaramc.github.com/gitolite/repos.html are mandatory reads. Adding a repo is illustrated in answer like http://stackoverflow.com/questions/10345026/how-to-configure-a-migrated-git-repository-in-gitolite. A config file is useful: http://stackoverflow.com/questions/10906633/users-are-asked-for-password-while-using-gitolite/10909791#10909791 – VonC Jun 21 '12 at 14:38