Using the Git repository


You need to have a valid kerberos ticket and one that has forwarding obtained via:

kinit -f username@FNAL.GOV

Check with:

klist -a

and you should see flags "FRIA" e.g.

  Credentials cache: API:501:1
  Principal: lmark@FNAL.GOV
  Issued                Expires             Flags    Principal
    Sep 13 16:05:12 2013  Sep 14 18:05:11 2013  FRIA   krbtgt/FNAL.GOV@FNAL.GOV

You may also need to tweak your ssh configuration, depending on your system's default ssh configuration, by adding

  GSSAPIAuthentication         yes
  ForwardX11Trusted            no
  GSSAPIDelegateCredentials    yes

into your ~/.ssh/config file.

If ssh and kerberos are working then you should be able to type:

ssh echo hello

and then get back the statement "Only 'lscvs' and 'cvs' commands are allowed".
Although I have had instances where this fails yet the git communication with FNAL is OK.

Checking out the code

You can get a local copy of the git repository via the command:

git clone ssh://

This takes a while (a few mins "Resolving deltas").

Then do the following (you need only do this once) :

cd gm2trackerdaq
git config --global "Your name" 
git config --global

You then need to switch to the correct branch, which is currently productionDAQ (this will be merged into develop soon).

cd gm2trackerdaq
git checkout productionDAQ

Keeping up to date with the FNAL repository

Update your local repository from the FNAL remote version as follows:

git pull origin productionDAQ

Push your committed changes to the FNAL remote repository using:

git push origin productionDAQ

Help with git

See these pages for g-2 specific git info:;filename=git_instructions.pdf;version=1

There are also many guides online.


Issues connecting to repository

If you get permission denied errors when trying to access the git repository, first check you have a valid kerberos ticket using klist -a. If you have and it still doesn't work, you may have an issue resolving the DNS alias in the FNAL git server from (the alias) to (the real hostname). A work around for this is to directly use ccdcvsvm as your remote server.

To do this at the initial clone:

git clone ssh://

In this case you should then be able to push/pull as normal (e.g. as covered above).

If you have an existing repository already cloned using cdcvs, you can add an additional remote server:

git remote add origin-no-dns ssh://

You can then push/pull using:

git pull origin-no-dns <your branch>
git push origin-no-dns <your branch>