Git - Setting Up Central Server
Jump to navigation
Jump to search
- 1. Create a Group
groupadd gitusers
- 2. Add users to the gorup
TODO: add the comant
- set up users
- set up repo
- clone repo
- Settiing up permission
sudo chown :gitusers -R central.git/ chmod g+ws central.git/ -R
# change umask in /etc/profile to 002
in /etc/pam.d add a line
session optional pam_umask.so umask=002
- Setting up keys
local > ssh-keygen local > scp id_rsa.pub bszlachta@git.nobleprog.net:~
mkdir .ssh git:~ > cat id_rsa.pub >> .ssh/authorized_keys chmod u=rwx,g=,o= .ssh/ chmod u=rw,g=,o= .ssh/authorized_keys
User Public repo
Kate is one of the developers who cannot push to the central repo
She wants to expose her stuff via Kate public repo
mkdir kateprv
git clone /g/central.git/ kateprv/
chmod 700 kateprv/
# TODO it doesn't seem to be working
# TODO FIXED git remote set-url --delete --push origin /home/kate/pubdistprj.git/
# create public repo
git clone kateprv/ katepub.git --bare
# add remote
git remote add katepub /home/kate/katepub.git/
git push katepub