User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

git [2018/06/28 07:59] (current)
192.168.1.102 created
Line 1: Line 1:
 +====== Setup a local git server ====== 
 +These steps are from this page: http://​www.spinellis.gr/​blog/​20130619/​ 
 +  * Create a group for git users: groupadd gitgroup 
 +  * Add each user with "​useradd -m -G gitgroup <​username>"​ 
 +  * Create the repo in a place which has at least group/user level rx permissions (don't need w): 
 +<​code>​ 
 +    # cd <​destination directory>​ 
 +    # git init --bare <​repo_name>​.git 
 +    # chmod g+rx <​repo_name>​.git 
 +    # chown -R :gitgroup <​repo_name>​.git 
 +    # cd <​repo_name>​.git 
 +    # git config core.sharedRepository group 
 +    # find . -type d -print0 | xargs -0 chmod 2770 
 +    # find . -type f -print0 | xargs -0 chmod g=u 
 +</​code>​ 
 +  * Clients can now login with SSH authentication and clone the repo
git.txt · Last modified: 2018/06/28 07:59 by 192.168.1.102