Git operations on NFS storage

Context

The CL storage is made of NFS shares from ZI's storage services. Cloning, pulling or forking a git repository on an NFS share will incur in errors.

Procedure

A workaround is to clone or fork the repository to a machine that has a location dedicated to you on its local storage. This can be your machine. You also have a location dedicated to you on our infrastructure if you have access to a GPU server.

Cloning repo onto your own computer

If you're on Mac or Linux, or in a WSL terminal on windows, clone the repository locally, then run

scp -r /your/local/folder <your_user>@login2.cl.uzh.ch:/home/<your_user>/

For example:

scp -r /home/mawang/git_repo mawang@login2.cl.uzh.ch:/home/mawang/

Enter your UZH password when prompted (the same you use for your Microsoft logins).

A copy of the repository is now on your home folder in the CL storage and can be accessed from any server of our infra. Note that this is a static copy, and you cannot pull from remote or do any of the most common git operations on it.

Cloning the repo to one of the GPU servers

  1. Navigate to /local/scratch/<your_user>/ and clone the repository locally.
  2. Then, run scp -r /local/scratch/<your_user>/git_repo <your_user>@login2.cl.uzh.ch:/home/<your_user>/

For example , if your username is mawang the command will be

scp -r /local/scratch/mawang/git_repo mawang@login2.cl.uzh.ch:/home/mawang/

Enter your UZH password when prompted (the same you use for your Microsoft logins).

A copy of the repository is now on your home folder in the CL storage and can be accessed from any server of our infra.

Note: that this is a static copy, and you cannot pull from remote or do any of the most common git operations on it. You can however work on it as it is on /local/scratch/<your_user>