How to check the version of GitLab?

Gitlab

Gitlab Problem Overview


How to check which version of GitLab is installed on the server?

I am about version specified in GitLab changelog:
https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md

For example: "6.5.0", "6.4.3", etc.

Сan this be done only through the terminal?
Is there a way to do that remotely (with browser instead of terminal)?

Gitlab Solutions


Solution 1 - Gitlab

I have updated my server to GitLab 6.6.4 and finally found the way to get version of GitLab remotely without SSH access to server.

You should be logged in to access the following page: https://your.domain.name/help

It shows something similar to:
>GitLab 6.6.4 42e34ae > >GitLab is open source software to collaborate on code.
>...
> etc.

Solution 2 - Gitlab

For omnibus versions:

sudo gitlab-rake gitlab:env:info

Example:

System information
System:		Ubuntu 12.04
Current User:	git
Using RVM:	no
Ruby Version:	2.1.7p400
Gem Version:	2.2.5
Bundler Version:1.10.6
Rake Version:	10.4.2
Sidekiq Version:3.3.0

GitLab information
Version:	8.2.2
Revision:	08fae2f
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		https://your.hostname
HTTP Clone URL:	https://your.hostname/some-group/some-project.git
SSH Clone URL:	[email protected]:some-group/some-project.git
Using LDAP:	yes
Using Omniauth:	no

GitLab Shell
Version:	2.6.8
Repositories:	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:		/opt/gitlab/embedded/bin/git

Solution 3 - Gitlab

You can access the version through a URL, the web GUI, and the ReST API.

Via a URL

An HTML page displaying the version can be displayed in a browser at https://your-gitlab-url/help. The version is displayed only if you are signed in.

Via a menu in the web GUI

If you do not care to type this URL, you can also access the same HTML page from a menu in the GitLab web GUI:

In GitLab 11 and later
  1. Log in to GitLab
  2. Click on the ? drop down menu in the upper right. Select Help.
  3. The GitLab version appears at the top of the page
In earlier versions, like GitLab 9
  1. Log in to GitLab
  2. Click on the three lines drop down menu in the upper left. Select Help.
  3. And then the version appears at the top of the page

Via the ReST API

Log in as any user, select the user icon in the upper right of the screen. Select Settings > Access Tokens. Create a personal access token and copy it to your clipboard.

In a Linux shell, use curl to access the GitLab version:

curl --header "PRIVATE-TOKEN: personal-access-token" your-gitlab-url/api/v4/version

Solution 4 - Gitlab

If you are using a self-hosted version of GitLab then you may consider running this command.

Solution 5 - Gitlab

You have two choices (after logged in).

  1. Use API url https://gitlab.example.com/api/v4/version (you can use it from command line with private token), it returns {"version":"10.1.0","revision":"5a695c4"}
  2. Use HELP url in browser https://gitlab.example.com/help and you will see version of GitLab, ie GitLab Community Edition 10.1.0 5a695c4

Solution 6 - Gitlab

You can view GitLab's version at: https://your.domain.name/help

Or via terminal: gitlab-rake gitlab:env:info

Solution 7 - Gitlab

cd /opt/gitlab

cat version-manifest.txt

Example:

gitlab-ctl 6.8.2-omnibus
gitlab-rails v6.8.2

Current gitlab version is 6.8.2

Screenshot of the console

Solution 8 - Gitlab

Get information about GitLab and the system it runs on :

bundle exec rake gitlab:env:info RAILS_ENV=production

Example output of gitlab:env:info

System information
System:		Arch Linux
Current User:	git
Using RVM:	yes
RVM Version:	1.20.3
Ruby Version:	2.0.0p0
Gem Version:	2.0.0
Bundler Version:1.3.5
Rake Version:	10.0.4

GitLab information
Version:	5.2.0.pre
Revision:	4353bab
Directory:	/home/git/gitlab
DB Adapter:	mysql2
URL:		http://gitlab.arch
HTTP Clone URL:	http://gitlab.arch/some-project.git
SSH Clone URL:	[email protected]:some-project.git
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	1.4.0
Repositories:	/home/git/repositories/
Hooks:		/home/git/gitlab-shell/hooks/
Git:		/usr/bin/git

Read this article, it will help you.

Solution 9 - Gitlab

Instead of http://domain-name/help you can also check your Gitlab version name in browser by logging as Admin

  • Go to http://domain-name
  • Log in to Gitlab as Admin (Root)
  • Go to Admin Area
  • On the right corner, below Groups tab, you can find Components tab

There you can find not only Gitlab version but also different components like Gitlab Shell, Gitlab workhorse, Gitlab API etc, version numbers enter image description here You will also find the suggestions to update the versions there

Solution 10 - Gitlab

If using the Gitlab Docker image:

sudo cat /srv/gitlab/data/gitlab-rails/VERSION

Example output:

12.1.3

Solution 11 - Gitlab

cat /opt/gitlab/version-manifest.txt |grep gitlab-ce|awk '{print $2}'

Solution 12 - Gitlab

I have Version: 12.2.0-ee and I tried the URL via (https://yourgitlab/help ) but I have not got this information. In the other hand I got this with gitlab-rake with success into the command line:

sudo gitlab-rake gitlab:env:info

... GitLab information Version: 12.2.0-ee ...

Solution 13 - Gitlab

The easiest way is to paste the following command:

cat /opt/gitlab/version-manifest.txt | head -n 1

and there you get the version installed. :)

Solution 14 - Gitlab

It can be retrieved using REST, see Version API :

curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/version

For authentication see Personal access tokens documentation.

Solution 15 - Gitlab

you can use the package manager to query installed version of gitlab-ce. if it happens to be debian or ubuntu, like this:

dpkg -l | grep gitlab-ce | tr -s [:space:] | cut -d" " -f3

should work similarly with other distributions, assuming you used package manager to install.

Solution 16 - Gitlab

To check the version of gitlab on centos

rpm -qa | grep gitlab-ce

Solution 17 - Gitlab

If you are an admin and if you want to see the Gitlab version (and more you didn't know about) click on the wrench/admin menu icon and under Components you can see a lot , especially if you are using Omnibus.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMaximView Question on Stackoverflow
Solution 1 - GitlabMaximView Answer on Stackoverflow
Solution 2 - GitlabntwrkguruView Answer on Stackoverflow
Solution 3 - GitlabJohn McGeheeView Answer on Stackoverflow
Solution 4 - GitlabArihant GodhaView Answer on Stackoverflow
Solution 5 - GitlabMíraView Answer on Stackoverflow
Solution 6 - GitlabSanyam JainView Answer on Stackoverflow
Solution 7 - GitlabHan YahuiView Answer on Stackoverflow
Solution 8 - Gitlabdardar.mohView Answer on Stackoverflow
Solution 9 - GitlabRajana DeepakView Answer on Stackoverflow
Solution 10 - GitlabDLightView Answer on Stackoverflow
Solution 11 - GitlabAborn JiangView Answer on Stackoverflow
Solution 12 - GitlabcesarbandView Answer on Stackoverflow
Solution 13 - GitlabsebastianView Answer on Stackoverflow
Solution 14 - GitlabJaroslav KravecView Answer on Stackoverflow
Solution 15 - GitlabNealView Answer on Stackoverflow
Solution 16 - GitlabMian Asbat AhmadView Answer on Stackoverflow
Solution 17 - GitlabpjammerView Answer on Stackoverflow