题
如何检查服务器上安装了哪个版本的GitLab?
我是关于gitlab changelog中指定的版本:
https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md
例如:"6.5.0","6.4.3"等。
这只能通过终端完成吗?
有没有办法远程做到这一点(使用浏览器而不是终端)?
解决方案
我已将我的服务器更新为Gitlab 6.6.4,最后找到了远程获取Gitlab版本的方式,而没有SSH访问服务器。
you 应该登录以访问以下页面:
https://your.domain.name/help
它显示类似于:
的东西gitlab 6.6.4 42e34ae
gitlab是开源软件,用于协作代码。
......
等等。
其他提示
对于omnibus版本:\
sudo gitlab-rake gitlab:env:info
.
示例:
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: git@your.hostname: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
. 您可以通过URL,Web GUI和REST API访问版本。
通过URL显示版本的HTML页面可以在https://your-gitlab-url/help
的浏览器中显示。
通过Web GUI中的菜单
如果您不在意键入此URL,您还可以从Gitlab Web GUI中的菜单访问相同的HTML页面:
在gitlab 11和后面的
- 登录到gitlab
- 单击
帮助。
- gitlab版本出现在页面的顶部
在早期版本中,如gitlab 9
您有两个选择(登录后)。
- 使用API url https://gitlab.example.com/api/v4/version (您可以从命令行使用它与私人令牌),它返回
{"version":"10.1.0","revision":"5a695c4"}
- 在浏览器中使用帮助url https://gitlab.example.com/help 你会看到GitLab的版本,即
GitLab Community Edition 10.1.0 5a695c4
如果您使用的是Gitlab的自托管版本,那么您可以考虑运行此命令。
grep gitlab /opt/gitlab/version-manifest.txt
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: git@gitlab.arch: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.
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 findComponents
tab
There you can find not only Gitlab version but also different components like Gitlab Shell, Gitlab workhorse, Gitlab API etc, version numbers
You will also find the suggestions to update the versions there
cat /opt/gitlab/version-manifest.txt |grep gitlab-ce|awk '{print $2}'
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.
If using the Gitlab Docker image:
sudo cat /srv/gitlab/data/gitlab-rails/VERSION
Example output:
12.1.3
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.
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 ...