如何检查GitLab的版本?

如何检查GitLab的版本?,gitlab,Gitlab,如何检查服务器上安装了哪个版本的GitLab 我了解GitLab变更日志中指定的版本: 例如:“6.5.0”、“6.4.3”等 С只能通过终端进行此操作? 有没有办法远程执行此操作(使用浏览器而不是终端)?获取有关GitLab及其运行系统的信息: gitlab:env:info的示例输出 System information System: Arch Linux Current User: git Using RVM: yes RVM Version: 1.20.3 Rub

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

我了解GitLab变更日志中指定的版本:

例如:“6.5.0”、“6.4.3”等

С只能通过终端进行此操作?
有没有办法远程执行此操作(使用浏览器而不是终端)?

获取有关GitLab及其运行系统的信息: 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

阅读本文,它将对您有所帮助。

我已将我的服务器更新为GitLab 6.6.4,并最终找到了在不使用SSH访问服务器的情况下远程获取GitLab版本的方法

您应登录以访问以下页面:
https://your.domain.name/help

它显示类似于:

GitLab 6.6.442e34ae

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访问该版本

通过URL 显示版本的HTML页面可以在
https://your-gitlab-url/help
。仅当您已登录时,才会显示该版本

通过web GUI中的菜单 如果不想键入此URL,还可以从GitLab web GUI中的菜单访问相同的HTML页面:

在GitLab 11及更高版本中
  • 登录到GitLab
  • 单击右上角的下拉菜单。选择帮助
  • GitLab版本显示在页面顶部
  • 在早期版本中,如GitLab 9
  • 登录到GitLab
  • 单击左上角的下拉菜单。选择帮助
  • 然后版本会显示在页面顶部
  • 通过RESTAPI 以任何用户身份登录,选择屏幕右上角的用户图标。选择设置>访问令牌。创建个人访问令牌并将其复制到剪贴板

    在Linux shell中,使用
    curl
    访问GitLab版本:

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

    如果您是管理员,如果您想查看Gitlab版本(以及您不知道的更多版本),请单击扳手/管理员菜单图标,在组件下,您可以看到很多内容,尤其是在使用Omnibus的情况下。

    cd/opt/Gitlab

    cat版本-manifest.txt

    例如:

    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 ctl 6.8.2-omnibus
    gitlab rails v6.8.2

    当前的gitlab版本是6.8.2


    可以使用REST检索,请参阅:

    有关身份验证,请参阅文档。

    您有两个选择(登录后)

  • 使用API url(您可以从带有专用令牌的命令行使用它),它返回
    {“version”:“10.1.0”,“revision”:“5a695c4”}
  • 在浏览器中使用帮助url,您将看到GitLab的版本,即GitLab Community Edition 10.1.0 5a695c4

  • 如果您使用的是GITLAB的自托管版本,那么您可以考虑运行这个命令。

    grep gitlab/opt/gitlab/version-manifest.txt
    

    而不是
    http://domain-name/help
    您还可以以管理员身份登录,在浏览器中检查您的Gitlab版本名

    • 转到
      http://domain-name
    • 以管理员身份登录Gitlab(
      Root
    • 转到管理区
    • 在右角的
      选项卡下方,您可以找到
      组件
      选项卡
    在那里,您不仅可以找到Gitlab版本,还可以找到不同的组件,如Gitlab Shell、Gitlab workhorse、Gitlab API等,以及版本号
    如果使用Gitlab Docker映像,您还可以在那里找到更新版本的建议:

    sudo cat /srv/gitlab/data/gitlab-rails/VERSION
    
    示例输出:

    12.1.3
    

    我有版本:12.2.0-ee,我通过()尝试了URL,但没有得到此信息。 另一方面,我通过gitlab rake成功地在命令行中实现了这一点:

    sudo gitlab-rake gitlab:env:info
    
    。。。 GitLab信息 版本:12.2.0-ee
    …最简单的方法是粘贴以下命令:

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

    您可以在这里安装该版本。:)

    您可以在以下位置查看GitLab的版本:


    或者通过终端:
    gitlab rake gitlab:env:info

    您可以使用软件包管理器查询已安装的gitlab ce版本。如果恰好是debian或ubuntu,如下所示:

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

    如果您使用package manager进行安装,则应与其他发行版类似。

    它可以工作,但当前目录应在安装gitlab之前更改为目录:cd/home/git/gitlab(否则将报告:无法设置Gemfile)。运行Ubuntu14.04 LTS(可靠)我可以使用这个命令来实现相同的功能:
    gitlab-rake gitlab:env:info-RAILS\u-env=production
    但是您必须登录。(我已经为此挠头10分钟了……)您知道从文件系统执行此操作的方法吗?即,不再引导.Find文件名为“version manifest.txt”的服务器。。。对于gitlab omnibus,它存储在“/opt/gitlab/version manifest.txt”注意:您可以在托管的gitlab上看到它的样子(如果您登录到该服务)。很遗憾不能在“”上工作,可能它太旧了。确实如此,但速度非常慢。WebURL/帮助页对于这样一个简单的任务来说是更好的解决方案-检查版本。@stamster OP询问“只能通过终端完成吗?”这个命令做了什么,需要很长时间才能返回版本信息?自动获取版本的好选项,尽管使用了太多的代码;)。。。请改为尝试
    awk'$1==“gitlab ce”{print$2}'/opt/gitlab/version manifest.txt
    。这太棒了!!然后?你能说得更具体些吗。我试图将PythonGitlab设置为非管理员,但找不到API versiongitlab.com也是EE,如果登录,您可以轻松访问。所以你犯了一些错误。到目前为止,我在GitLab自托管12.10.x上看到的最简单的解决方案,非常感谢。
    cat /opt/gitlab/version-manifest.txt | head -n 1
    
    dpkg -l | grep gitlab-ce | tr -s [:space:] | cut -d" " -f3