Git Version Control#

To link commits and files in your Git repository with Allegra, you need to include a reference to the affected items in your commit comment in the form “#<item number>, e.g. “#4711”. To integrate a version control system, a corresponding plug-in must be installed in the directory $ALLEGRA_HOME/plugins. For the respective project or workspace, the function “Version Control” must be activated (Administration > Workspaces > <Workspace> > Version Control). In this view, you can make all necessary settings to connect to a Git repository.

Connection Type#

The Git repository can be accessed via three protocols:

  • ssh : the Git repository is accessed via the secure shell (ssh) protocol

  • file : possible if the Allegra server has direct access to the files of the Git repository

  • gitlab : the repository is managed by GitLab

Repository Path#

The absolute path to the repository, only needed for the file protocol.

Server Name and Server Port#

The URL and the Git port to the repository server

GitLab Project ID#

In GitLab, each project has an identification number. You can use this number to associate an Allegra project with a GitLab project.

Item Number Pattern#

Allegra links those commits that reference Allegra item numbers in their commit message. Item numbers are recognized based on the regular expression set here.

Authentication Methods#

The system supports the following authentication methods:

  • Anonymous : Only for direct access via the file protocol

  • Password: You use username and password

  • Public/private key: You use a key pair

  • Token: You use an access token generated by GitLab.

Integrated Repository Browser#

The system has an integrated repository browser. You can access it via the cockpit tile “Version Control” and when editing an item.

Updating Allegra through Git#

Allegra can synchronize its version control data with a Git repository in two ways:

  1. Via a timed automatic process every x minutes, where x can be adjusted in the file $ALLEGRA_HOME/quartz-jobs.xml.

  2. Via a Rest endpoint. When the system receives a POST request there, it updates all version control data. The URL is: {Allegra Server URL}/rest/vcPlugin/fetchLogs. You can use this endpoint URL in hook scripts of your Git or GitLab server.