How setup git server on fedora ?
Hi,
I wonder if anyone have a quick and easy way to install a git server on fedora to organize my current developments ?
Thanks
Answer myself:
dnf install gitosis
vi /usr/share/doc/gitosis/README.fedora
vi /usr/share/doc/gitosis/README.rst
as root
su - gitosis
gitosis-init < /tmp/id_rsa.pub
(use your ~/.ssh/id_rsa.pub already generated for ssh connections )
with your regular user (here you got ~/.ssh/id_rsa.pub)
git clone gitosis@localhost:gitosis-admin.git
cd gitosis-admin/
vi gitosis.conf
git commit .
git push
cd ../your_project
git remote add myserver git@localhost:myproject.git (myproject was defined in gitosis.conf and you gave to use premissions to write )
git push myserver master:refs/heads/master
in other local :
git clone gitosis@localhost:myproject.git
Integrate with cgit:
vi /etc/cgitrc
.
repo.url=demo1
repo.path=/var/lib/gitosis/repositories/demo1.git
repo.desc=the master demo1 repository
repo.owner=sergio.basto
repo.readme=info/web/about.html
.
usermod --append --groups gitosis apache
.
systemctl restart httpd
and http://localhost/cgit/ should work
Update: After I tested gitosis I conclude and be aware gitosis is very limited for example do not permit access RW+ etc , I don't recall well