Some of the documentation for DSM packages is pretty sparse and/or generally vague. The Git server appears to be one of them. I normally work with a local git server and push my changes to a remote server in my day job. The instructions supplied by Synology do not appear to take that pattern into account. The proper way to setup your central repository is to create a bare repository as described by the folk at Atlassian. See the section titled Bare repositories. Here are the updated instructions.
Follow the first two steps as described by Synology. The last two steps describe how to create the bare repository.
- “Log into your Synology server via SSH as root or admin.”
- “Change directory to /volumeX, where X is the volume number, to create a folder. For example, “git_repos”. …”
- Move into the newly created “git_repos” directory.
- Issue “git init –bare <directory name>”. For example: git init –bare my_cool_project.git
To access this new repository you need a few pieces of information. A user setup in Synology and the port that your ssh is running on. Assume the user name is Fred, the ssh port is 12345, the project name is my_cool_project.git, the NAS DNS name is coolnas.bogus.com, and the git repository location (see step 2 above) is /volume1/git_repos. The connect string would look like this:
git clone ssh://Fred@coolnas.bogus.com:12345/volume1/git_repos/my_cool_project.git
Thanks for sharing superb informations. Your web site is so cool. I am impressed by the details that you have on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found simply the information I already searched all over the place and just could not come across. What a great website. Carlene Addy Fleming