Create a git server
To create a git server
Create a git user
Note: step might be optional when user git
already exists
$ sudo useradd -m git
Create the home folder for git
$ sudo mkdir /home/git
$ sudo chmod 700 /home/git
$ sudo chown -R git:git /home
Create .ssh
folder
$ sudo su git -s /bin/bash
$ mkdir .ssh
$ chmod 700 .ssh
Create authorized_keys
$ touch .ssh/authorized_keys
$ chmod 600 .ssh/authorized_keys
Copy your public keys to this file
Create a repository
$ mkdir hello-world.git
Cloning the repo
$ git clone git@myserver.home:hello-world.git