Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Enabling unified search for your enterprise

You can allow users to include repositories on GitHub.com in their search results when searching from 您的 GitHub Enterprise Server 实例.

Enterprise owners can enable unified search between GitHub Enterprise Server and GitHub.com.

About 统一搜索

When you enable unified search, users can view search results from content on GitHub.com when searching from 您的 GitHub Enterprise Server 实例.

You can choose to allow search results for public repositories on GitHub.com, and you can separately choose to allow search results for private repositories on GitHub Enterprise Cloud. If you enable unified search for private repositories, users can only search private repositories that they have access to and that are owned by the connected organization or enterprise account. For more information, see "About searching on GitHub."

Users will never be able to search 您的 GitHub Enterprise Server 实例 from GitHub.com, even if they have access to both environments.

After you enable unified search for 您的 GitHub Enterprise Server 实例, before individual users can see search results from private repositories on GitHub.com in 您的 GitHub Enterprise Server 实例, each user must also connect their user account on GitHub Enterprise Server with a user account on GitHub.com. For more information, see "Enabling GitHub.com repository search in your private enterprise account."

Searching via the REST and GraphQL APIs does not include GitHub.com search results. Advanced search and searching for wikis in GitHub.com are not supported.

Enabling 统一搜索

Before you can enable 统一搜索, you must enable GitHub Connect. For more information, see "Managing GitHub Connect."

  1. 登录到 GitHub Enterprise Server 和 GitHub.com。

  2. 从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击

    用于访问站点管理员设置的火箭飞船图� �的屏幕截图

  3. 如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)

    "站点管理员" 链接的屏幕截图

  4. 在左侧边� �中,单击 Enterprise(企业) 概述站点管理设置中的 Enterprise(企业)概述选项卡

  5. 在企业帐户边� �中,单击 GitHub Connect企业帐户边� �中的 GitHub Connect 选项卡

  6. Under "Users can search GitHub.com", use the drop-down menu and click Enabled. Enable search option in the search GitHub.com drop-down menu

  7. Optionally, under "Users can search private repositories on GitHub.com", use the drop-down menu and click Enabled. Enable private repositories search option in the search GitHub.com drop-down menu