Git - Setting Up Central Server

From Training Material
Revision as of 13:44, 29 October 2014 by Bernard Szlachta (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
1. Create a Group
groupadd gitusers
2. Add users to the gorup
TODO: add the comant
  1. set up users
  2. set up repo
  3. clone repo
  1. 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
  1. 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