LC has three GitLab servers, each hosting repositories accessible only to LC users in the appropriate zone. These servers can be viewed via a web browser at:

See Accessing LC Systems for login details. 

Users can also accesses these severs from the command line via git commands. GitLab supports two access modes:

  • git-over-ssh: Git commands connect to the GitLab sever using ssh protocol. This requires a specific SSH configuration as the LC GitLab servers are not directly accessible outside of the LC network.
  • git-over-https: Git commands connect to the GitLab server using https protocol. LC requires the use of a Personal Access Token (PAT) when using this connection method (OTP token passwords are not accepted).

git-over-ssh

Utilizing git-over-ssh requires several configuration steps, particularly when connecting from non-LC systems. Users must first set up SSH keys in their GitLab profile. Users connecting from a non-LC machine must configure SSH to hop through an LC system. While getting the configuration set up can be tricky, once set up it does not expire.

See either of these instructions:

  1. Connecting to LC GitLab from an LC machine
  2. Connecting to LC GitLab from a local machine (desktop or laptop)

When cloning a repository, it is recommended that users get the correct URL from the blue CODE button on the repository webpage. The format for LC GitLab repository URLs for git-over-ssh connections is similar to:

ssh://git@czgitlab.llnl.gov:7999/<PROJECT>/<REPOSITORY>.git

Please note that GitLab supports sub-groups and sub-projects, which may change the URL format. 

git-over-https

If using git-over-https, the git clone command will prompt for LC username and password. Users MUST use a Personal Access Token as the password, as OTP token authentication is not allowed. Note that the lifetime of a PAT is limited, and users may need to regularly re-generate tokens.

See Using a Personal Access Token for Git-Over-HTTPS.

When cloning a repository, it is recommended that users get the correct URL from the blue CODE button on the repository webpage. The format for LC GitLab repository URLs for git-over-https connections is similar to:

https://lc.llnl.gov/gitlab/<PROJECT>/<REPOSITORY>.git

Please note that GitLab supports sub-groups and sub-projects, which may change the URL format.