Jesper Niedermann's .NET Blog
about .NET and related technologies RSS 2.0
# Sunday, 08 June 2014

I must admit that I prefer SVN over GIT due to the (in 2014 only slightly inferior) tooling and due to the illogical naming and structuring of commands and parameters.
But still GIT has a lot going for it, and I needed the GIT submodule command for a private project of mine  i.e. something that I want to sell
and therefore not place on github.

So away with SVN.

On my trusted Synology I have the SVN server installed which was basicly just plug and play. So I figured that installing the GIT server package would be just as easy.

Sadly that was not case. Now 6 hours later I finally have it working. So this post is here, to hopefully save you and my future self some time.

This is a rundown of what I should have done.

  1. Upgrade to at least DSM 4.3 ( I used 4.2 but the GIT Server package did not work with that. Basicly there was no git commandline interface).
  2. Install the GIT Server package from Synology
  3. Create a user on the server to access GIT
  4. Create a Share for GIT (e.g. named “gitrepo” or similar)
  5. If using a windows client. Install putty to issue GIT commands to the server via SSH (you have to enable SSH on the server)
  6. Issue commands to make a bare server GIT Repo

    mkdir somerepo.git
    cd somerepo.git
    git init --bare –shared

  7. Login to Putty as root (important). Change the owner to be your newly created git User

    c
    hown -R gituser somerepo.git

  8. You can now clone the repo from your prefered Git client – using ssh.

    btw. When using ssh you should access it via full path. I.e. ssh://gituser@<servername or ip>/volume<x>/gitrepo/somerepo.git

Of these steps (not) upgrading to DSM 4.3 was most costly because nothing anywhere indicated that I could only use GIT server after upgrading.

I also had problems changing ownership of files. Turned out I just needed to login to putty as root. Probably just basic linux knowledge that I do not have.

Same goes for the ssh path. I naturally thought the path would be the same as for https i.e. without the /volume<x> part.

So basicly it works now, although I still have to decide on the security part.

Should it be with username/password or a putty key, should I open up my firewall to allow me access from the internet and so on.

Sunday, 08 June 2014 15:00:47 (GMT Daylight Time, UTC+01:00)  #    Comments [0] -

Comments are closed.
Archive
<2017 December>
SunMonTueWedThuFriSat
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer
I am a software architect with focus on Microsoft Technologies. I have been working with these in different large companies since 1995. I am currently employed at UVdata A/S.
Here is my View Jesper Niedermann's profile on LinkedIn

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Privacy policy
The privacy policy of this site.

© Copyright 2017
Jesper Niedermann
Sign In
Statistics
Total Posts: 28
This Year: 0
This Month: 0
This Week: 0
Comments: 32
All Content © 2017, Jesper Niedermann
DasBlog theme 'Niedermann' created by Jesper Niedermann, based on 'Business' created by Christoph De Baene (delarou)