Git Server

Git is an open source distributed version control system, which allows you to maintain software source code, documents or any type of file on a computer with speed and efficiency. With Git, you can collaborate with different groups of people simultaneously with relative ease.

To allow users to use Git:

  1. Log into DSM using an account with administrative privileges. Go to Control Panel > Terminal and enable SSH service.
  2. Launch the Git package. Select users to provide them with the ability to check in and check out files from the repository.

Note:

Git users will be restricted to Git-related activities with a shell tool called git-shell. This login shell will be applied to Git users to ensure that the accounts are only used for Git operations. As a result, Git users may only use the SSH connection to push and pull Git repositories, and will not have full access to DSM.

To create a Git repository:

  1. Log into your Synology server via SSH as root or admin.
  2. Change directory to /volumeX, where X is the volume number, to create a folder. For example, "git_repos". The permission of the folder will be the same as Linux.
  3. In the folder, run git init to create an empty repository.
  4. After the repository is created, a Git client user can enter the following command to access this repository:
    git clone ssh://[Git users]@[Your Synology server's IP address or hostname]/[Git repository path]