Information Technology Reference
In-Depth Information
"/pub/git"
end
Boot the virtual machine and open the ssh session:
$ vagrant up
$ vagrant ssh
Update the system dependencies and install the git and apache2 packages:
# Guest OS (Ubuntu 12.04)
$ sudo apt-get update -y
$ sudo apt-get install -y git apache2
Install the repository you want to share.
# Guest OS (Ubuntu 12.04)
$ cd /var/www
$ sudo git clone --bare /pub/git/03-01 03-01.git
$ sudo chown -R vagrant:www-data /var/www/03-01.git
Create the hook:
# Guest OS (Ubuntu 12.04)
$ cd /var/www/03-01.git/hooks
$ mv post-update.sample post-update
Run post update for the first time:
# Guest OS (Ubuntu 12.04)
$ cd /var/www/03-01.git/
$ git update-server-info
The repository is now available to the public with the following URL: ht-
tp://localhost/03-01.git . Clone it with:
# Guest OS (Ubuntu 12.04)
$ cd
$ git clone http://localhost/03-01.git
Search WWH ::




Custom Search