This post has already been read 1488 times!

git

Git and SSH are both powerful tools, and git/ssh work well together.

 
We introduce how to set up git server via ssh in this post. Git server through SSH is easy and fast to set up, although every user will have access to all repositories in the git server over SSH and every user is the git administrator.

Server side git user and home


// logon to the git server by ssh username@example.org
// username is the account name that have administrator privilege (or can sudo) on the git server.

// Install git package
# yum install git
 

// In the file /etc/ssh/sshd_config add the list of git users
// AllowUsers first_user second_user third_user
// Create a developpers group
# sudo addgroup developpers
 

// Add the developpers list to the developpers group
# sudo /etc/group
 

// developpers : x:502 : first_user, second_user, third_user
// Make a GIT REPOSITORY on your server drive
# mkdir export
# mkdir gitrepository
 

// Make a GIT PROJECT on the REPOSITORY
# mkdir gitproject.git
 

// Check the READING/WRITING rights and GROUP rights on the GIT REPOSITORY PROJECT <b>/export/git/gitproject.git
# ls -l
# chgrp developpers gitproject.git
 

# ls -l
# sudo chmod g+rws gitproject.git
 

// GIT BARE and SHARE for the GIT REPOSITORY
# git init --bare --shared
 

See more in the Michael's Git Tutorial - Setting Up a Git Server

Comments are closed.

Post Navigation