Установка git
Сам git устанавливается одной строчкой:
sudo aptitude install git-core git-svn gitweb
Создаем нового пользователя:
sudo adduser git
Настраиваем git web:
sudo vim /etc/gitweb.conf
# path to git projects (<project>.git) $projectroot = "/home/git"; # directory to use for temp files $git_temp = "/tmp"; # target of the home link on top of all pages #$home_link = "/gitweb/"; # html text to include at home page $home_text = "indextext.html"; # file with project list; by default, simply scan the projectroot dir. $projects_list = $projectroot; # stylesheet to use $stylesheet = "gitweb.css"; # logo to use $logo = "git-logo.png"; # the 'favicon' $favicon = "git-favicon.png";
А теперь добавим настройки для apache2(Он должен бить установлен и настроен. Как установить apache описано в старих постах)
sudo vim /etc/apache2/conf.d/gitweb
Alias /gitweb /usr/share/gitweb
<directory >
Options FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
Order deny,allow
Allow from all
</directory>
<location ">
Order deny,allow
Allow from all
</location>
Перезагружаем apache2
sudo apache2ctl graceful
Создаем первий репозиторий:
sudo su - git cd ~ mkdir test cd test git init --bare
Тепер можна поключаться к репозиторию и заливать свой проект. Для работи я іспользую JetBranins продукти
Вот прмер строки подключения git@127.0.0.1:test
(Нужно вводить пароль пользователя git)
Для подключения к репозиторию с eclips срока виглядит также.
А также можно посмотреть свои проекти по адресу http://localhost/gitweb/
