Moon Light Box

Less is More

Git - How to Install Git Server in Synology DS214 NAS?

Synology DS214 NAS is provided Git server package.

And I noted the setup below.

Click Control Panel.

Create a new user account. (Example : git)

Create a new shared folder. (Example : Repository)

Select user git and on click Read/Write permission.

Click Package Center and install Git Server package.

Launch Git Server and allow user git to use.

Enable SSH srvices then save and reboot.

You need login NAS with root via ssh. (Linux can use ssh command and Windows can use putty.)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ ssh -l root 192.168.1.100 #192.168.1.100 is example. You need find your NAS local area IP.

$ Enter root password

$ cd /volume1/Repository/

$ mkdir moonlightbox.git

$ cd moonlightbox.git

$ git --bare init

$ cd ..

$ chown -R git:users moonlightbox.git

$ exit

Next, we will download moonlightbox project.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ cd ~

$ git clone ssh://git@192.168.1.100/volume1/Repository/moonlightbox.git/

$ Enter git password # In this step, you can see the empty moonlightbox project.

$ cd moonlightbox

$ echo 1 > test.txt

$ git add .

$ git commit -m "Init test"

$ git push origin master

$ Enter git password # Finish check in "Init test" patch into git server.

HaHa. Done! :))))

Comments