Find us on facebook

Jan 31, 2018

setup git server

su -
sudo useradd git
  === Enter new UNIX password:
  === Retype new UNIX password:
  === passwd: password updated successfully

 sudo apt-get install git
 
 su git
 sudo mkdir git (create git folder on home)
 move id_rsa.pub to /home/git
 mkdir ~/.ssh && chmod 700 ~/.ssh
 touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
 
 cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
 cat ~/.ssh/authorized_keys

 mkdir project.git
 cd project.git
 git init --bare

No comments:

Post a Comment