This page will lead you in the installation of the different tools needed to synchronise your gin tonic repository on your computer. With macOS and linux, you may in principle choose between using GIN-cli or datalad. This walkthrough goes through datalad use, as we think on the long term it is a better and faster option.

The easiest way to install applications on OSX is to use homebrew (https://brew.sh/). If you prefer another route, please refer to the GIN wiki or datalad handbook.

Otherwise, just open the terminal application and paste the following codes, type return, and wait:

Step 1: Install homebrew (if not installed already).


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

This can take some time, depending on your internet connection. You may now read the next step or go for a different task and come back in 20-30 minutes.

Step 2: Install applications

(a version of git is already installed with gin-cli and datalad, but it may not be directly found by Rstudio, so it is easier to get a fresh install of git via homebrew).

This walkthrough uses Rstudio to create ssh keys If you plan on using R in the future, you need to install it via the installer, as homebrew version of r is not fully working.

brew install git
brew install rstudio
brew install datalad

pip3 install datalad

You see we installed both the datalad commands, and the datalad python versions. Both are needed.

You may also install GIN:

brew tap g-node/pkg brew install g-node/pkg/gin-cli

Step 3: SSH keys

While there is a way to create this with the command line, using Rstudio is much easier and faster:

Open Rstudio, in the tools, global Options, choose Git/SVN, push the create SSH key button. Once the key is created, you View the public key and copy it.

Back to your browser, open your GIN settings (click on your avatar on the upper right of the page), go to the SSH Keys, and add one key: paste the public key copied from RStudio there.

Step 4: clone the GIN repository

On your GIN .main repository, copy the SSH address, and open the terminal and run:

datalad clone <ssh address>

Step 5: make script executable

Navigate to the research repository folder on your computer using the cd command, this will look like cd yourreponame.main. Then run:

chmod +x sync_unix

Step 6: double click script

On your normal destop window, in the sync_unix file is now special, you can double click it and it will start the script which will update content from the server to your computer and vice versa. This is needed to set the special submodule folder that are initially empty. It can then be used to synchronise content.

Always have a look at the errors or warnings given, to be sure everything went ok.

The script ask you for a message that will be used to write the history, describe the change made in that message. It will then ask if he should drop content: this would delete the big files on your computer (only if the file is present on the server).

Step 7-infinty

Reiterate step 6 !

julien colomb edited this page 1 year ago