More of a note-to-self, but may be useful to other ReadyNAS users who aren’t quite at home with Linux.

As I’m doing a lot of coding with different environments, and I want easy SCM, git is a fine choice. Git runs through IP addresses, so I can access remote servers inside VMs without any weird config needed. It integrates natively with XCode for iOS programming, and msysgit is a simple UI for Windows (there is also a VS extension for git).

Setting up git on the ReadyNAS is straightforward, but there are a couple of fiddly steps. First of all install the git add-on and get it configured correctly:

  1. Install the latest version of the community git add-on (download the .bin file and upload as a local update through FrontView, as with any other packages).
  2. Enable root SSH access with the ReadyNAS add-on
  3. Sign on to SSH as root: ssh root@your_nas_ip (using your FrontView admin password)
  4. Open the remote logon script for SSH – text editor vi will get you there: vi .bashrc
  5. Insert a new line in the script to add the folder with the git binaries to the path for remote logins: export PATH=PATH:/opt/rfw/bin

To create & populate your remote repository:

  1. Sign on to SSH as root: ssh root@your_nas_ip
  2. Create the folder for your repository: mkdir /opt/git/what_ever && cd /opt/git/what_ever
  3. Initialise the repository: git – bare init
  4. Exit SSH (exit)
  5. Navigate to the local git project folder:cd projects/etc
  6. Add the remote repo: git remote add origin ssh://root@your_nas_ip/opt/git/what_ever
  7. Populate the remote repository:git push origin master (using your admin password).

All done, and you can push, pull and clone to your NAS drive as if it were github. Navigate to local Web interface (https://your_nas_ip/gitweb/gitweb.cgi) and you should see your new project listed, and you can browse all the previous commits.