How to access git from dsfr6 or dseb8

It is possible to access git repositories on cdcvs from machines on private networks using ssh tunnels.

Obtain a public key

Do this step on BOTH dsfr6 and dseb8

Use ssh-keygen. Whether you use the default key in .ssh/id_dsa{,.pub} or create your own accessible with ssh-agent is up to you.

You will need public keys for dsfr6, dseb8, and ds50ws

Add your public key to .ssh/authorized_keys

mkdir -p ~/.ssh && chmod 700 ~/.ssh; cat <pub-key> >> ~/.ssh/authorized_keys
  • add the ds50ws public key to .ssh/authorized_keys on dsfr6/dseb8 (the home directory is shared)
  • add the dsfr6 and dseb8 public keys to .ssh/authorized_keys on ds50ws

Get a redmine project manager to add your dsfr6 and/or dseb8 public key to .ssh/authorized_keys for each project you wish to use.

  • Both Chris and Lynn are project managers for artdaq and ds50daq.
  • This step is can be done from either ds50ws or cluck.
  • Your key must be added to each git repository (e.g., art, artdaq, ds50daq).
/usr/local/bin/ssh-add-redmine <user>:<pubkeyfile> <proj>+

On the private machine, start an ssh tunnel.

ssh -n -N -T -q -f -L<port> ds50wsp

<port> should be >1024.

Clone your git repository.

git clone ssh://p-<proj>@localhost:<port>/cvs/projects/<proj>

A word about ports

You must either use the same port number every time or "rename" your git remote repository
If you want to use a different port number for git:
  • cd to your working git directory
    git remote set-url origin  ssh://p-<proj>@localhost:<port>/cvs/projects/<proj>
  • use git remote -v to check

More documentation