Set Up Your Environment

Last update: 06 Aug 2024 [History] [Edit]

Shell environment

We’ll assume here you do the tutorial on a CERN-like SLC6 machine, such as lxplus. There’s nothing special about this setup, but it’s simply the easiest way to establish a uniform environment for a tutorial and make sure that everything works.

ssh lxplus
setupATLAS
lsetup git

One downside of lxplus is the lack of good git GUIs, so it’s also possible to do all git operations on a more convenient platform (like your laptop) and just use an SLC6 machine to run compilation - this can be done with an rsync of your git checkout, or you could run a local SLC6 docker container.

Warning Make sure you run asetup in the directory which contains athena/, and not inside the repository directory itself as running it inside athena/ can cause problems with CMake e.g. undefined reference to pthread_create. This is discussed in more detail in the `Git tips’ section.

Configure git

If you are using git for the first time, it is important to set your git name and email address which will be used by git as author for your commits (if you do not specify someone else explicitly). Failure to do this properly may cause problems when you try to push to an internal or private git repositories hosted on the CERN GitLab server. You can check that your name and email address are properly set by running

git config --list

Look for user.name and user.email. If it is not yet set, please run the following commands (which set the information for all your git repositories on lxplus):

git config --global user.name "Your Name"
git config --global user.email "your.name@cern.ch"

There are two other setting that we recommend as well:

git config --global push.default simple
git config --global http.postBuffer 1048576000
git config --global http.emptyAuth true # Required on CC7

The push setting makes some operations more straightforward. The second addresses an issue with large pushes via plain http or krb5. The third addresses an issue with libcurl and krb5.