Before You Start
- Since the gitolite administration is done remotely, you’ll need to have git installed on your local machine. github has an excellent guide to help you set up git. If this is your first delve into the git world, surf over to the official page and read through some of the excellent documentation. It’s important to understand how to use git before you attempt to install gitolite, since its installation involves using git commands.
- If you follow this guide 100%, your local workstation will need to have ssh and scp installed on it
- This may go without saying, but you’ll also need a basic understanding of using vim to open, edit, and save files on the Diskstation. If you’re new to vim, check out A Byte of Vim.
- The steps outlined here assume a Linux or Mac workstation. Your mileage may vary with other operating systems when steps on the local workstation are necessary.
- This will take some time. Do not start this if you have something important to do soon.
Conventions
- Any command beginning with “DiskStation> ” is to be run on the Synology DiskStation
- Any command beginning with “localhost$ ” is to be run on your local workstation
Bootstrap and Install Git on your Diskstation
- Find what CPU type is in your Synology NAS server
- Enable ssh terminal access in your Synology control panel using the “Terminal” icon
- Reboot your Diskstation
- Login to your Diskstation as root using SSH. Enter your Diskstation’s admin password when prompted for a password.
1localhost$ ssh root@diskstation - Change to the @tmp directory
1DiskStation> cd /volume1/@tmp - Download the bootstrap file to for your CPU type using wget. The example below is for the DS212J with the Marvel Kirkwood mv6281 ARM processor. Use the Overview on modifying the Synology Server page to identify the correct bootstrap file URL to use when executing the wget command below.
1DiskStation> wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh - Change the bootstrap file permission so it is executable
1DiskStation> chmod +x syno-mvkw-bootstrap_1.2-7_arm.xsh - Execute the bootstrap file
1DiskStation> sh syno-mvkw-bootstrap_1.2-7_arm.xsh - Delete the bootstrap file
1DiskStation> rm syno-mvkw-bootstrap_1.2-7_arm.xsh - Edit the root user .profile file and comment out PATH and its export
1DiskStation> vi ~/.profile - Comment out the .profile PATH and export, and save (escape+ZZ) (Why you may ask?)
12#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin#export PATH - Reboot your Diskstation
1DiskStation> reboot now - Login to your Diskstation as root using SSH
1localhost$ ssh root@diskstation - Update the ipkg list
1DiskStation> ipkg update - Install coreutils
1DiskStation> ipkg install coreutils - And the moment we’ve been waiting for… Install git
1DiskStation> ipkg install git - Make symlinks to the git binaries in /usr/bin
1DiskStation> ln -s /opt/bin/git* /usr/bin
At this point, your Synology server has the core required software installed. From here on, it’s configuration and a bit of SSH fun to get gitolite up and running. Let’s get the SSH bit out of the way, shall we?
Install SCP (optional)
By default, DSM 4.0 Diskstations do not have SCP installed. Though this is somewhat optional, I find it to be the easiest way to copy and manage the public keys we’ll be working with in later steps. If you do not use this method, you could always copy your keys over to the Diskstation volume using any normal method, such as AFP, NFS, FTP, whatever floats your boat.
- On your Diskstation, change to the /volume1/@tmp directory
1DiskStation> cd /volume1/@tmp - Download the OpenSSH ipkg
1DiskStation> ipkg download openssh - Inflate the ipkg
1DiskStation> tar -xvzf openssh_5.9p1-1_arm.ipk - Inflate the data.tar.gz file
1DiskStation> tar -xvzf data.tar.gz - Copy the scp binary to /bin
1DiskStation> cp /volume1/@tmp/opt/bin/openssh-scp /bin/scp - Delete the OpenSSH files from /volume1/@tmp
12DiskStation> cd /volume1/@tmpDiskStation> rm -rf opt/ data.tar.gz openssh_5.9p1-1_arm.ipk control.tar.gz debian-binary
SCP is now installed, give it a try on the command line!
|
1 2 3 4 |
DiskStation> scp usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
Got that out of the way, now let’s move on to some easier user management stuff.
Create a Git user on the Diskstation
You’ll need one for gitolite to use, often referred to as a “hosted user.” Fortunately, you can just create a new user using the Diskstation’s Web Desktop.
- Login to the Diskstation Web Desktop as the admin user
- Launch the Control Panel from the Web Desktop
- Launch Users from within the Control Panel
- Click Create User
- Enter the following details and a password and click Next
Username: git
Description: Git hosting user - On the User Groups tab, ensure only “users” system default group is checked, then click Next
- Assign privileges – shared folders: It is a good idea to limit the access of this user, so select the No Access checkboxes for all your shares and click Next
- Don’t worry about a quota, unless you really need to and click Next
- Assign privileges – applications: uncheck the grant checkbox for all applications and click Next
- Review the account details and click Apply when to create the git user
Enable Shell Access for the Git User
- Login to your Diskstation as root using SSH. Enter your Diskstation’s admin password when prompted for a password
1localhost$ ssh root@diskstation - Edit the /etc/passwd file
1DiskStation> vi /etc/passwd - Find the git user entry and change the shell from /sbin/nologin to /bin/ash and save (escape+ZZ)
1git:x:1000:100:git hosting user:/var/services/homes/git:/bin/ash
Generate a Key Pair on your Local Workstation
If you already have a key pair generated that is NOT already used for key authentication as the git hosting user, you can skip this step.
Important: These steps are performed on your local workstation, NOT the Diskstation!
Note: If you already have key pair authentication to the DiskStation setup for the git hosting user, you’ll need to generate two key pairs, one for the gitolite admin and one for normal use. You’ll also have to configure SSH host aliases to send the right key.
- Generate a RSA public/private key pair – leave the passphrase empty and use default location and name
1localhost$ ssh-keygen -t rsa - SCP the public key to the Diskstation
1234567localhost$ cd ~/.sshlocalhost$ scp id_rsa.pub git@diskstation:yourname.pubThe authenticity of host 'disk station (0.0.0.0)' can't be established.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'diskstation' (RSA) to the list of known hosts.git@diskstation's password:id_rsa.pub 100% 398 0.4KB/s 00:00
Cool. The public key is on the DiskStation and in the git user’s home directory. But there’s more to do…
Configure the Git Hosting User’s Profile and Home Directory
- Login to the DiskStation as the git user
1localhost$ ssh root@diskstation - Switch to the git hosting user using su
1DiskStation> su - git - Create a new .profile for the git user
1DiskStation> vi .profile - Make the contents of the .profile look similar to below and save (escape+ZZ), changing the value of HOME if you have more than one volume or a volume not named volume1
1234PATH=bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/binexport PATHHOME=/volume1/homes/gitexport HOME - Source the new .profile so environment variables take effect
1DiskStation> source .profile - Make a bin directory in the git hosting user home directory
1DiskStation> mkdir $HOME/bin
There’s a light at the end of the tunnel… Is that a train?
Install Gitolite on the DiskStation and Run Setup
Don’t install gitolite as root. If you followed the above instructions correctly, you should have no issue installing as a git hosting user!
- Make sure you’re the git user!
12DiskStation> whoamigit # if this says root, do a su - git to switch user - As the git user, download gitolite by cloning the github repository
1234567DiskStation> git clone git://github.com/sitaramc/gitoliteCloning into 'gitolite'...remote: Counting objects: 8044, done.remote: Compressing objects: 100% (2853/2853), done.Receiving objects: 100% (8044/8044), 2.47 MiB | 1.57 MiB/s, done.remote: Total 8044 (delta 5517), reused 7554 (delta 5082)Resolving deltas: 100% (5517/5517), done. - As the git user, run the gitolite install command
1DiskStation> /volume1/homes/git/gitolite/install -ln - Setup gitolite using the public key you uploaded many steps ago, located in the git hosting user home directory (it is safe to ignore the WARNINGS you see below – others, maybe not)
1234567DiskStation> gitolite setup -pk $HOME/yourname.pubInitialized empty Git repository in /volume1/homes/git/repositories/gitolite-admin.git/WARNING: pclose failed: Illegal seek at /volume1/homes/git/gitolite/src/lib/Gitolite/Common.pm line 292.WARNING: pclose failed: Illegal seek at /volume1/homes/git/gitolite/src/lib/Gitolite/Common.pm line 292.Initialized empty Git repository in /volume1/homes/git/repositories/testing.git/
Hey! Good work! Gitolite is now installed on your DiskStation! Why not take it for a spin? In fact, it is mandatory to create users and repositories.
Clone the Admin Repo
Important: These steps are performed on your local workstation, NOT the Diskstation!
- Clone the admin repository to a writeable directory on your workstation
123456localhost$ git clone git@diskstation:gitolite-adminCloning into 'gitolite-admin'...remote: Counting objects: 4, done.remote: Compressing objects: 100% (2/2), done.remote: Total 4 (delta 0), reused 0 (delta 0)Receiving objects: 100% (4/4), 320 bytes, done.
Take a break, then go forth and administer your gitolite installation!
Changelog
05/28/2012 – Initial publication
05/31/2012 – Corrected typo on gitolite install command
01/31/2013 – Added link explaining why commenting out root path is necessary
At “DiskStation> git clone git://github.com/sitaramc/gitolite”, I get the error message “-ash: git: not found”. Looking closer, I can see that I don’t have access to neither the git command nor the ipkg command as user=git.. I have them as root though.
I was so close. please help me, Ryan:(
More info:
the profile for git is exactly the same as yours.
in /etc/passwd, I have:
“git:x:1029:100:Git hosting user:/var/services/homes/git:/bin/ash”, only changing the last part “bin/ash”
Hi Sebastian,
It sounds like the PATH for the git user isn’t setup correctly.
Easy way to check:
DiskStation> su – git # become git user and take on the git user’s user environment
DiskStation> env # print out env variables
You should see something like:
USER=git
HOME=/volume1/homes/git
PAGER=more
LOGNAME=git
TERM=xterm-256color
PATH=bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
SHELL=/bin/ash
PWD=/volume1/homes/git
PGDATA=/var/service/pgsql
If you don’t, make sure you didn’t miss any steps in the section “Configure the Git Hosting User’s Profile and Home Directory”. The important piece here is that the git user’s .profile file in that user’s home directory e.g. (/volume1/homes/git) has a PATH variable defined and exported. See that section of the post for the exact contents needed.
Let me know how it goes!
I have it the same as you, only difference is I have “TERM=XTERM” (without -256color). Path is identical.
/volume1/homes/git only has “Sebastian.pub” and folder “bin”, which is empty.
As root, try:
DiskStation> su – git
DiskStation> whoami
git
DiskStation> which git
/usr/bin/git
If /usr/bin/git doesn’t show up, make sure you made your symlinks as the root user
(as root)
DiskStation> ln -s /opt/bin/git* /usr/bin
SUCCESS! Wow, so fast feedback. Karma to you:)
Hi Ryan,
Thank’s for a great tutorial.
I’m stuck at this point as well.
I’ve commented out the PATH in the root .profile, created teh symlinks (as root) and creted the .profile for the git user.
However, when I type which git, the system points to /opt/bin/git
typing env, shows that PATH is prepended with /opt/bin:/opt/sbin: for both root and git users.
Any help appreciated – Magnus
Please disregard from my previous question.
Solved it, error when copy-pasting the PATH from your webpage.
Sorry
Glad you’ve got everything in working order! Thanks for the kudos!
I got an error when I install the Gitolite.
When I do this “DiskStation> gitolite setup -pk $HOME/yourname.pub”
I got the error “gitolite: not found”
If you followed the instruction to a tee, gitolite should have been linked in your $HOME/bin directory. This should also be part of the git hosting user’s path in that user’s .profile. The fact that it isn’t means you likely missed a step or two.
I succeed to install gitolite. Thank you for your tutorial.
Just last one question : It exist a client for desktop or a web application to manage the git server like GitHub. I heard gitweb, but does exist it other ?
Github is closed source software, but there are other alternatives out there. Don’t expect them to be as robust and elegant. Gitweb is one option, but Gitlab is also worth a try if you don’t mind running Ruby on Rails.
Question about step 11: Uncomment after installation? Seems weird to leave root’s path unset.
Hi Mark,
This is explained in more detail on the Synology Inc. Online Community. There’s a thread dedicated to it. I pulled this from the Synology wiki as well, as part of the bootstrap documentation.
http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc
This is a great post!
When I type the following command,
1. localhost$ scp id_rsa.pub git@diskstation:yourname.pub
2. git@diskstation’s password:
id_rsa.pub
I only got “Permission denied, please try again”.
I wondering know that does “yourname.pub” means that I should replace the “youranme” with current user name on the localhost?
As a rule of thumb, you usually name the public key after the username of the git user you’re going to configure in the repository. In this case, replace “yourname” with that name. Also be sure you are substituting the correct values in there for the git user’s password, and the proper IP or hostname for your Disk Station.
Hi,
First thank you on very good step by step tutorial, i follow and all works like charm but only on localhost.
Did you try make it work from remote computer ? I have problem, when i want to clone i must use git clone ssh://user@publicip/~user/repositories/repo.git and this work, but when i want to push then i got error:
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 394 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Empty compile time value given to use lib at hooks/update line 6
remote: Use of uninitialized value in require at hooks/update line 7.
remote: Use of uninitialized value in require at hooks/update line 7.
remote: Can’t locate Gitolite/Hooks/Update.pm in @INC (@INC contains: /usr/lib/
perl5/5.8.6/MARVELL_88F6281 /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/
MARVELL_88F6281 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl .) at ho
oks/update line 7.
remote: BEGIN failed–compilation aborted at hooks/update line 7.
remote: error: hook declined to update refs/heads/master
To ssh://user@pubip/~user/repositories/gitolite-admin.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to ‘ssh://user@pubip/~user/repositories
/gitolite-admin.git’
Thanks in advance!
Your gitolite installation is fine. The problem you are facing is based on how you cloned your repository. See the following link, as it outlines the issue you are facing.
http://stackoverflow.com/questions/5233058/gitolite-push-error-remote-env-gl-rc-not-set
Ryan
Hi,
Thank you for your reply, yes you are right, installation is ok, but adding new user is problem. When I add new users I still need to use git username to clone, commit, push. Generating and adding new pub keys is only connection from workstation to NAS. Anyway thank you on wonderfull tutorial. Now i have all my project connected with my own git server… Currently trying to figure out how to install git-daemon on NAS to use git protocol
Best regards from Sarajevo
Pooky
Cheers from Cleveland, OH USA!
It should be easy to get git-daemon serving up the git protocol. Check out the Synology forums and wiki and see what you need to do to daemonize the process.
i follwed all steps but i get this error:
noname:.ssh Lutarus$ git clone git@192.168.178.21:gitolite-admin
Cloning into ‘gitolite-admin’…
FATAL: R any gitolite-admin Lutarus DENIED by fallthru
(or you mis-spelled the reponame)
fatal: The remote end hung up unexpectedly
mh i installed gitolite as root before i found this tutorial.. what i have to do now?
please help me :-/
Hi Lutarus,
Remove gitolite and start over installing it as a non-root user.
Follow these steps:
http://sitaramc.github.com/gitolite/emergencies.html#clean
Thank you for this very thorough install, everything went well until I tried to copy over my key to the home directory of the git user on my DiskStation. I got:
ash: /opt/bin/gitosis-serve: not found
lost connection
I had tried to install gitosis a while back without any luck, so I thought I’d give gitolite a try, but it looks like gitosis left a trace somewhere even though I removed it from my DiskStation. Might you have a suggestion as to how I can troubleshoot?
Thanks!
Hi Arie,
I don’t have any experience with gitosis, but a quick Google search turns up a Server Fault post and response that looks promising.
http://serverfault.com/questions/91907/how-do-i-uninstall-gitosis
First of all thank you for the comprehensive guide.
I successfully installed git and created the git user, but when I want to change via “su – git” there appears a warning “su: warning: cannot change directory to /var/services/homes/git: No such file or directory” in fact the whole “homes” directory is non existent. What’s up with that? =(
I also tried to create the dir via root, but permission is denied … damn.
Thanks
Christian -
Odd behavior indeed. Try blowing away the git user and trying again? Just to be certain, you created the git user through the admin interface, right? Not through the shell?
I had the same problem.
The solution is to go to the users screen on the control panel of your DiskStation and activate the service ‘Users’s home’ (Sorry, I don’t run English UI, but I’m sure you can figure out which button I’m referring to)
/Magnus
Thank you so much for going to the trouble of writing-up this tutorial, it has been invaluable to me.
Just one question; what is the name of the wordpress plug-in you are using to display the code segments? Its really nice.
Regards
Alex.
Glad you found it useful, Alex.
The syntax highlighting plugin is called Crayon Syntax Highlighter.
I have the following error when attempting to clone admin repository
Evgenys-MacBook-Pro:~ evgeny$ git clone git@diskstation:gitolite-adminCloning into ‘gitolite-admin’…
ssh: Could not resolve hostname diskstation: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Evgenys-MacBook-Pro:~ evgeny$ git clone git@192.168.1.61:gitolite-admin
Cloning into ‘gitolite-admin’…
git@192.168.1.61‘s password:
fatal: ‘gitolite-admin’ does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Can you please point me what is wrong? I followed your instructions step-by-step.
Thanks!
My guess based on the information provided is that you missed a step with your ssh key setup.
It shouldn’t be asking for a password, rather it should be using the authorized key.
Ok, finally got it working! All keys were fine
My problem was the SSH was not enabled on the server
so i changed in the /etc/ssh/sshd_config from
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
To this:
#RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
Please refer to this great post by Scott Granneman concerning enabling SSH on Synology, it helped a lot to me.
http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/
Last thing I did was deleting “no-pty” from .ssh/authorized_keys file
because it was producing error “PTY allocation request failed on channel 0″ when I was trying to ssh git@192.168.1.61
I would like to thank you a lot for your effors!
Really, great job!!
After comment out the 2 lines in ~/.profile I can’t access Diskstation Web Desktop.
Same thing here (Diskstation 410j, DSM up to date).
Hey Ryan
First of all, thank you very much for this extremely well documented tutorial. It was very convenient to follow even with my rather basic previous knowledge. The installation worked without any problems on my Synology DS212+!
Last week I updated DSM to version 4.1 – unfortunatley I completely forgot about possible issues. In fact, I was not able to push my commits to the gitolite-admin repo after the update. I received the error message
git push
WARNING: Can’t exec “git”: No such file or directory at /volume1/homes/git/gitolite/src/lib/Gitolite/Common.pm line 120, line 1.
fatal: The remote end hung up unexpectedly
After an unsuccessful internet search I started to redo some of the steps of your tutorial which finally fixed my problem. In fact, I don’t know which steps really are necessary, maybe someone with more insight can clarify that.
Here’s what I (re)did after the DSM update 4.0->4.1:
- From section “Bootstrap and Install Git on your Diskstation”: steps 4, 10-17 (in my case coreutils were still up-to-date, so step 15 was unnecessary)
- From section “Install SCP (optional)”: nothing, scp still working
- From section “Create a Git user on the Diskstation”: nothing
- From section “Enable Shell Access for the Git User”: nothing, git user entry unchanged
- From section “Generate a Key Pair on your Local Workstation”: nothing
- From section “Configure the Git Hosting User’s Profile and Home Directory”: steps 1-5 (in my case the .profile was unchanged, so step 3 and 4 unnecessary)
- From section “Install Gitolite on the DiskStation and Run Setup”: nothing
- From section “Clone the Admin Repo”: nothing
- Reboot
- Now you’re hopefully done!
Please post, if I forgot/messed up something! I hope this helps someone with the same issue!
Best regards
Daniel
Thanks, Daniel. I hope this helps out some others that upgrade/have upgraded. I haven’t found the time to go through my tutorial with 4.1 yet, so thanks for sending this feedback along for others!
Same problem here.
I had to redo the following command to have it working again:
ln -s /opt/bin/git* /usr/bin
Have same problem as Daniel in post #13
Followed these instructions and got i working again, only difference is that I only applied
- From section “Bootstrap and Install Git on your Diskstation”: steps 4, 10-17 (skipping 15)
Thansk Daniel
Best regards
Per-Åke
Great Article!!! So easy to follow and complete. Thanks for documenting this!
Awesome! thank you so much for posting this – everything works perfectly.
Just wondering: why did you comment out (and leave commented out) the root .profile PATH var? It seems that the step where you symlink the git binaries to the normal path (/usr/bin) covers any path issues.
Also wondering, have you found that you need to redo any of these steps after upgrading your DSM? If so, what step(s)?
Glad it worked out for you, Benzo!
I get the question about commenting the path a lot. Honestly, it seems odd to me but I pulled it from the bootstrap instructions on Synology’s wiki.
http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc#Bootstrap
If you look at step 8 – that’s where I pulled it from. The background of why this needs to be done comes from http://forum.synology.com/enu/viewtopic.php?p=185512#p185512
When performing upgrades, as others have mentioned, you may have to repeat some steps. It seems like the symlink to git is one of the things that disappears.
[...] is not supported by DSM trough the package center, but the IPKG repository contains it. Ryan Helco (http://www.bluevariant.com/2012/05/comprehensive-guide-git-gitolite-synology-diskstation/) took the effort to write down the necessary steps to set it [...]
Hi Ryan,
Thanks for the article – it has helped me a lot to do almost the complete setup
I am, however, stumbling at the final hurdle and don’t understand something.
When I run > gitolite setup -pk $HOME/username.pub
I get the following: WARNING: keydir/usernamepub duplicates a non-gitolite key, sshd will ignore it
The problem is, I use username.pub for SSH login for the user “git”, and “git” has shell access (as per your instructions above).
Should I understand it that the username key pair generated are only used for gitolite and thus any user defined access to the server using SSH should use other keys? Also, is there a reason why the default id_rsa should be used?
I’ll comment further if I manage to fix by generating other keys.
Thanks again,
Sonny
This is a common gitolite error. The ssh keys are the most confusing part, and normally where errors pop up. You are right, that you should not be using the same key. The user you run gitolite under is considered a non-login user. E.g. one you’d su – git when you need to from another logged in user. Here’s more information:
http://sitaramc.github.com/gitolite/emergencies.html#ce
That should clear up your issue!
Hi,
I have problem while installing git.
I have stopped on this step:
DiskStation> gitolite setup -pk $HOME/tom.pubFATAL: errors found but logfile could not be created
FATAL: /volume1/homes/git/.gitolite/logs/gitolite-2013-02.log: No such file or directory
FATAL: die '/volume1/homes/git/tom.pub' must have exactly one line
DiskStation> FATAL: die '/volume1/homes/git/tom.pub' must have exactly one line
I resolve missing directories .gitolite and .gitolite/logs/ by creating this in console and it is ok.
Unfortunately second error still exists (FATAL: die ‘/volume1/homes/git/tom.pub’ must have exactly one line) and I don’t know what’s wrong.
I have DSM 4.1 on DS212j. Early I had DSM 4.0 but I did not install git on DSM 4.0.
Not sure where you got hung up – I haven’t installed this on 4.1 yet myself. However, it certainly seems like you have an issue with your public key.
I’d suggest starting here:
http://sitaramc.github.com/gitolite/ssh.html
Thank for answer.
I done a key in puttygen on Windows 8. On one of pages on link from You I found information about issues with putty and recommendation to use msysgit (http://msysgit.github.com/). I installed it but I ran my second computer with CentOS 6 and I finished on this. After command: gitolite setup -pk $HOME/tom.pub I saw this:
DiskStation> gitolite setup -pk $HOME/tom.pub
Initialized empty Git repository in /volume1/homes/git/repositories/gitolite-admin.git/
WARNING: pclose failed: Illegal seek at /volume1/homes/git/gitolite/src/lib/Gitolite/Common.pm line 317.
WARNING: pclose failed: Illegal seek at /volume1/homes/git/gitolite/src/lib/Gitolite/Common.pm line 317.
Initialized empty Git repository in /volume1/homes/git/repositories/testing.git/
WARNING: Warning: Use of “shift” without parentheses is ambiguous at /volume1/homes/git/gitolite/src/triggers/post-compile/ssh-authkeys line 124, <DATA> line 1.
WARNING: /volume1/homes/git/.ssh missing; creating a new one
WARNING: /volume1/homes/git/.ssh/authorized_keys missing; creating a new one
I finished all steps and It seems that all is ok…. probably
The warnings are normal. Looks like you’re in business!