I am trying to setup a GIT repository over LAN in Ubuntu OS.
I am able to setup a GIT repository, but not sure HOW TO expose the repository to other users in LAN.
As it requires a server, I installed OpenSSH-Server. But don’t know HOW TO configure it.
Please point me to correct resource to read from.
Thanks.
Best Answer
First of all, you need to check your openssh setup on Ubuntu server: see this HowTo.
Then you can follow this article, which mainly recommend:
go into your
/etc/ssh/ssh_config
file and add git to the list of Allowed Users that can login.copy your
id_rsa.pub
file over to your server somewhere (in our example we're using/tmp
) and then run this command:From your local machine, test it out with this:
Configure gitosis for a new project. Use your favorite editor to create a new block under the gitosis one. It should look like this:
A couple of things to watch out in the above block.
First, make sure your name matches what's in your public key (that is, open your id_rsa.pub file and see that what the name says.
Second, make sure you spell writable correctly!
Once you're done, commit and push the changes up to the server.