Git - Admin on the Git Server

From EdWiki

Admin on the Git Server

  • What the Git Admin should do to add a new Project?
  • If the User(s) computer is not Authenticated:
    1. Save the received SSH public key file(s) to a temporary directory.
    2. Suppose, if you have received it from save it as /tmp/
    3. Append the SSH public Key to the /home/gituser/.ssh/authorized_keys file
$ cat /tmp/ >> /home/gituser/.ssh/authorized_keys
  • Create a bare repository of a project and set appropriate permissions
$ cd /opt/gitrepo
$ mkdir my_project.git
$ cd my_project.git
$ git --bare init
Initialized empty Git repository in /opt/gitrepo/my_project.git/ 
$ chgrp -R gitgrup /opt/gitrepo
$ chmod -R "g+wxr" /opt/gitrepo
  • Inform the User to create a project of the same name (my_project)