The GIT version control system is gaining more and more momentum also in the HEP community. For small/medium projects that do not fit in the regular LHCb develompent infrastructure and policies (see SVNUsageGuidelines), GIT seems to be a good alternative to Subversion.

To request git repositories, go to https://gitlab.cern.ch.

Since GIT is not officially supported by LHCb, you should not expect to get much help about how to use it, but here are a few useful resources:

-- MarcoClemencic - 2015-05-05

Guidelines (Obsolete)

To allow LHCb users to manage special projects with GIT, we set up a small infrastructure to host user repositories.

Requesting a repository

Users wanting to host a project on GIT will have to send a mail to lhcb-git-librarians@cernNOSPAMPLEASE.ch with the name they want for the repository, a short description of the project and the AFS username who should own the repository.

IMPORTANT: only projects that do not fit in the regular LHCb development model will be accepted.

Everybody will have read access to the newly created repositories, but write access will be limited to the owner and the users that the owner requested to be added. It is possible to foresee write access to AFS groups.

The created empty repository will be accessible directly via AFS, via SSH and HTTP with the following commands:

  • git clone /afs/cern.ch/lhcb/software/GIT/<Project>.git
  • git clone ssh://lxplus.cern.ch/afs/cern.ch/lhcb/software/GIT/<Project>.git
    • with another user: git clone ssh://USERNAME@lxplus.cern.ch/afs/cern.ch/lhcb/software/GIT/<Project>.git
  • git clone http://cern.ch/lhcbproject/GIT/<Project>.git

Note that the HTTP access is read-only.

Suggestion: with git it is possible to use two different URLs for fetch and push operations, which is very handy with our setup. What you have to do is:

git clone http://cern.ch/lhcbproject/GIT/<Project>.git
cd <Project>
git remote set-url --push origin ssh://lxplus.cern.ch/afs/cern.ch/lhcb/software/GIT/<Project>.git

Infrastructure

The AFS directory /afs/cern.ch/lhcb/software/GIT will point to a dedicated backed up volume and will be writeable only to Librarians.

A link in /afs/cern.ch/lhcb/project/web pointing to /afs/cern.ch/lhcb/software/GIT enables the HTTP access.

Create a new repository

Once the repository is approved, a librarian will have to issue the following commands:
project=<Project>
owner=<owner>
repo=/afs/cern.ch/lhcb/software/GIT/${project}.git
git init --bare ${repo}
cd ${repo}
git update-server-info
afs_admin set_owner -r ${owner} ${repo}
afs_admin set_acl -r ${repo} ${owner} rlidwka
Check that the file ${project}.git/hooks/post-update.sample is executable and contains the line exec git update-server-info, then do
cd ${repo}/hooks
mv post-update.sample post-update
(this last step is needed to automatically create the special files required to allow HTTP access).

Informations

A PHP script (/afs/cern.ch/lhcb/software/GIT/index.php) shows a list of the currently hosted repositories.

Repository details

-- MarcoClemencic - 14-Mar-2012

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2015-05-05 - MarcoClemencic
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback