如何查看服务器上安装了哪个版本的GitLab ?

我是关于GitLab更新日志中指定的版本: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md

例如:“6.5.0”,“6.4.3”等。

Сan这只能通过终端吗? 有没有办法远程(用浏览器而不是终端)做到这一点?


当前回答

对于综合版本:

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

其他回答

您可以使用包管理器查询已安装的gitlab-ce版本。如果它恰好是debian或ubuntu,就像这样:

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

应该与其他发行版类似地工作,假设您使用包管理器进行安装。

您有两个选择(登录后)。

使用API url https://gitlab.example.com/api/v4/version(你可以使用私有令牌从命令行使用它),它返回{"version":"10.1.0","revision":"5a695c4"} 在浏览器https://gitlab.example.com/help中使用HELP url,您将看到GitLab的版本,即GitLab社区版10.1.0 5a695c4

如果使用Gitlab Docker镜像:

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

示例输出:

12.1.3

我有版本:12.2.0-ee,我尝试了URL通过(https://yourgitlab/help),但我没有得到这个信息。 另一方面,我用gitlab-rake成功地进入命令行:

sudo gitlab-rake gitlab:env:info

... GitLab信息 版本:12.2.0-ee ...

除了http://domain-name/help,您还可以在浏览器中以Admin身份登录来检查您的Gitlab版本名

访问http://domain-name 以管理员(Root)身份登录Gitlab 进入管理区域 在右侧的“组”标签下,您可以找到“组件”标签

在那里,你不仅可以找到Gitlab版本,还可以找到不同的组件,如Gitlab Shell、Gitlab workhorse、Gitlab API等,以及版本号 您还可以在那里找到更新版本的建议