【问题标题】:As a user, how can I determine the installed version of GitHub Enterprise?作为用户,我如何确定已安装的 GitHub Enterprise 版本?
【发布时间】:2014-11-09 04:25:55
【问题描述】:

一些扩展 GitHub Enterprise 的服务需要足够新的版本。但是作为 GH:E 的标准用户,我如何在不打扰管理员的情况下确定我的公司安装了哪个版本?

【问题讨论】:

    标签: github-enterprise


    【解决方案1】:

    作为 GHE 管理员,我认为版本不会显示给非管理员用户,即使在 API 元信息或页面源等中也是如此。

    但是,对于管理员,它显示在每个页面顶部的条形图中。因此,如果您确实询问他们,如果他们已登录,他们就会在屏幕上随时查看该信息。

    【讨论】:

      【解决方案2】:

      我正在为我们的 github 企业版搜索相同的信息。 在页面源中,我发现了以下内容:

      <a href="/">
            <span class="octicon-mark-github" title="GitHub Enterprise Version 11.10.xxx"></span>
      </a>
      

      这是 GitHub Enterprise 页脚中的 GitHub Octocat 徽标 - 只需将鼠标悬停在其上即可获得带有版本号的工具提示。

      【讨论】:

      • 这就够了!谢谢!
      • 从命令行:$ curl -sS https://github.corp/login | grep enterprise/2... -o 返回enterprise/2.10
      • 我在以下位置找到它:&lt;a href="https://github.dns.ad.zopa.com" aria-label="Homepage" class="site-footer-mark" title="GitHub Enterprise Version 2.11.4"&gt;...&lt;/a&gt;
      • @GerardBrull - 我认为你的答案是正确的!谢谢!
      【解决方案3】:

      我意识到这不是非常用户友好,但即使没有登录,任何用户都可以使用它。

      从 Github Enterprise v2.12 开始,您可以从服务的/meta API endpoint 获取 GitHub Enterprise 版本。返回的 JSON 将包含一个包含版本号的 installed_version 字段。

      https://ghe.company.com/api/v3/meta
      
      {
        "verifiable_password_authentication": true,
        "installed_version": "2.20.0"
      }
      

      如果连接到api.github.com,则从 GitHub 的 /meta API endpoint 返回的 JSON 将包含其他附加字段,但不会包含 installed_version 字段。

      https://api.github.com/meta
      
      {
        "verifiable_password_authentication": true,
        "ssh_key_fingerprints": { ... },
        "hooks": [ ... ],
        "web": [ ... ],
        "api": [ ... ],
        "git": [ ... ],
        "pages": [ ... ],
        "importer": [ ... ]
      }
      

      【讨论】:

        【解决方案4】:

        我发现如果你去 GHE 主页并滚动到底部,你可以找到快照中提到的版本

        【讨论】:

          猜你喜欢
          • 2017-05-30
          • 2011-02-12
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2010-09-13
          相关资源
          最近更新 更多