Comments on How To Install A Public Git Repository On A Debian Server
How To Install A Public Git Repository On A Debian Server Git is a free distributed revision control, was initially created by Linus Torvalds for Linux kernel development. It is primarily developed on Linux, but can be used on other Unix operating systems including BSD, Solaris and Darwin. Git is extremely fast on POSIX-based systems such as Linux. It differs from svn and creates a private repository on a remote server too.
14 Comment(s)
Comments
You need some permission change before you can create directories without sudo. Perhaps a git group would be a good idea as well...
This is a great tutorial. Or would be if it worked. As it is .. it doesn't. Followed instructions on Debian Lenny.
# git clone git://server/project.git project
Initialized empty Git repository in /var/cache/git/project.git/project/.git/
fatal: Unable to look up server (port 9418) (Name or service not known)
#
You need to change git://server/ to git://localhost/
Hope this helps.
My error. Works. I think.
Still, would be more useful if it said what to once set up.
Thanks great! it work! only your man help me!
[Fri Feb 26 01:39:46 2010] [error] [client 127.0.0.1] [Fri Feb 26 01:39:46 2010] gitweb.cgi: Can't opendir(/var/cache/git): Permission denied
I keep getting the above error, any ideas?
I kept getting 404 - No projects found even though my $projectroot was correct. I'm surprised none of the tutorials I found mentions verifying the permissions for the git repositories.
I navigated to my projectroot folder and used ls -l to view the repository permissions and discovered they had 750. I changed them to 755 and the error went away and I was able to navigate the repositories just fine.
Another alternative would be to change the group for them to the Apache user, which is www-data on Debian/Ubuntu but other distros may be different.
I hope this helps someone else since I didn't see it mentioned anywhere.
I think there is a bug :
Project will appear in web site has "project.git/.git".
You can create the repository somewhere, it will create a ".git" directory inside.
Then copie ".git" to /var/cache/git/ and rename it in "project.git".
In this case unfortunately you can't use "git" command in /var/cache/git/, it requires a ".git" directory.
Found some help here : http://gofedora.com/how-to-install-configure-gitweb/
Thanks man :)
very nice guide
Hi,
Nice "How to". But I've a 'little' problem, if some guy can help me ... :) :
[...]
[root:/home/www-data/git/cache] #>cd project.git/
[root:/home/www-data/git/cache/project.git] #>touch .git/git-daemon-export-ok
[root:/home/www-data/git/cache/project.git] #>git daemon --base-path=/var/cache/git --detach --syslog --export-all
[root:/home/www-data/git/cache/project.git] #>git clone git://localhost/project.git project
Cloning into project...
fatal: The remote end hung up unexpectedly
[root:/home/www-data/git/cache/project.git] #>git clone git://213.186.46.210/project.git project
Cloning into project...
fatal: The remote end hung up unexpectedly
[root:/home/www-data/git/cache/project.git] #>git clone git://213.186.46.210/
Cloning into 213.186.46.210...
fatal: The remote end hung up unexpectedly
Minor error: "sudo cat vim /etc/apache2/conf.d/git" should be "sudo vim /etc/apache2/conf.d/git"
Hmm, it doesn't work at all
Thanks for sharing this knowledge with this utility . this is very important for beginner
Thanks once again
Git clone works fine but git push doesn't. It throws this error:
git://127.0.0.1:9418/project.git: access denied or repository not exported: /project.git