我想了解安装在GitLab更改日志中指定的版本:
https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md。
例如:"6.5.0","6.4.3"等版本。
这是否只能通过终端来完成?
是否有一种远程方式(使用浏览器而不是终端)来执行此操作?
我已将服务器更新为GitLab 6.6.4,最终找到了一种无需通过SSH访问服务器即可远程获取GitLab版本的方法。
您应该登录以访问以下页面:https://your.domain.name/help
页面显示类似于:
GitLab 6.6.4 42e34ae
GitLab是用于协作编写代码的开源软件。
...
等等。
对于综合版本:
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访问版本。
在浏览器中键入https://your-gitlab-url/help
,即可查看显示版本的HTML页面。只有登录后才会显示版本。
如果您不想输入URL,也可以通过GitLab Web GUI菜单访问相同的HTML页面:
以任何用户身份登录,选择屏幕右上角的用户图标。选择设置>访问令牌。创建个人访问令牌并将其复制到剪贴板中。
在Linux shell中使用curl
访问GitLab版本:
curl --header "PRIVATE-TOKEN: personal-access-token" your-gitlab-url/api/v4/version
如果你正在使用GitLab的自托管版本,那么你可以考虑运行以下命令:
grep gitlab /opt/gitlab/version-manifest.txt
登录后您有两种选择:
{"version":"10.1.0","revision":"5a695c4"}
GitLab Community Edition 10.1.0 5a695c4
gitlab-rake gitlab:env:info
。如果使用Gitlab Docker镜像:
# from the host, not inside container
sudo cat /srv/gitlab/data/gitlab-rails/VERSION
示例输出:
12.1.3
/var/opt/gitlab/gitlab-rails/VERSION
。bundle exec rake gitlab:env:info RAILS_ENV=production
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
阅读这篇文章,它会帮助你。
gitlab-rake gitlab:env:info RAILS_ENV=production
。 - Thomas Urban