{"meta":{"title":"共享 GitHub 应用","intro":"您可以与其他用户分享GitHub App。","product":"应用","breadcrumbs":[{"href":"/zh/enterprise-cloud@latest/apps","title":"应用"},{"href":"/zh/enterprise-cloud@latest/apps/sharing-github-apps","title":"共享 GitHub Apps"},{"href":"/zh/enterprise-cloud@latest/apps/sharing-github-apps/sharing-your-github-app","title":"共享应用"}],"documentType":"article"},"body":"# 共享 GitHub 应用\n\n您可以与其他用户分享GitHub App。\n\n## 在GitHub App上分享你的GitHub Marketplace\n\n如果你的 GitHub App 是公开的，你可以选择将其发布到 GitHub Marketplace。 有关详细信息，请参阅“[关于 GitHub 应用市场](/zh/enterprise-cloud@latest/apps/github-marketplace/github-marketplace-overview/about-github-marketplace-for-apps)”。\n\n如果你是Enterprise Managed User，则无法在GitHub Marketplace上分享你的应用。\n\n有关如何从 GitHub Marketplace中安装应用的详细信息，请参阅 [通过 GitHub 市场安装 GitHub App 以用于组织](/zh/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-organizations) 和 [通过 GitHub 市场安装 GitHub App 以用于个人帐户](/zh/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-github-marketplace-for-your-personal-account)。\n\n## 通过安装链接分享你的 GitHub App\n\nGitHub App如果你是公共用户，则其他用户和组织可以安装你的应用。 若要详细了解如何公开应用，请参阅“[将GitHub应用公开或专用](/zh/enterprise-cloud@latest/apps/creating-github-apps/registering-a-github-app/making-a-github-app-public-or-private)”。\n\n如果你是 Enterprise Managed User，或者你的应用归你的企业账户所有，则你只能将你的应用共享给企业内部的账户。\n\n1. 在 GitHub 上任意页的右上角，单击你的个人资料图片。\n\n2. 导航到你的帐户设置。\n   * 对于由个人帐户拥有的应用，请单击“设置”\\*\\*\\*\\*。\n   * 对于组织拥有的应用：\n     1. 单击“你的组织”。\n     2. 在组织的右侧，单击**设置**。\n   * 对于由企业拥有的应用：\n     1. 如果使用的是 Enterprise Managed Users，请单击**你的企业**，以直接转到企业帐户设置。\n     2. 如果使用的是个人帐户，请单击**你的企业**，然后单击企业右侧的**设置**。\n\n3. 导航到 GitHub App 设置。\n   * 对于由个人帐户或组织拥有的应用：\n     1. 在左侧边栏中，单击“<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-code\" aria-label=\"code\" role=\"img\"><path d=\"m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z\"></path></svg> Developer settings”，然后单击“GitHub Apps”\\*\\*\\*\\*\\*\\*\\*\\*。\n   * 对于由企业拥有的应用：\n     1. 在左侧边栏中，在“设置”下，单击 **GitHub Apps**。\n\n4. 在您想要共享的 GitHub App 旁边，点击“**编辑**”。\n\n5. 单击“公共页面”。\n   GitHub 将带你前往你的 GitHub App 的公开页面。\n\n6. 单击“安装” 。\n   GitHub 将带你前往你的 GitHub App 的安装网址。 URL 将显示为`https://github.com/apps/APP-NAME/installations/new`，其中`APP-NAME`是GitHub App的名称。\n\n7. 与其他用户共享安装 URL。 若要详细了解用户如何从此 URL 安装你的应用，请参阅“[从第三方途径安装 GitHub Apps](/zh/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-a-third-party)”。\n\n   共享 URL 时，可以在 `state` 安装 URL 中包含查询参数以保留应用程序页面的状态，并在用户安装、进行身份验证或接受更新 GitHub App后返回该状态。 例如，可使用 `state` 参数将安装关联到用户或帐户。\n\n   要保留状态，请将其添加到安装 URL：`https://github.com/apps/<app name>/installations/new?state=AB12t`\n\n## GitHub App与GitHub Enterprise Server实例共享\n\n如果您想与您不属于的GitHub App实例共享您的GitHub Enterprise Server，则需要采取额外步骤。 有关详细信息，请参阅“[使GitHub应用可用于 GitHub Enterprise Server](/zh/enterprise-cloud@latest/apps/sharing-github-apps/making-your-github-app-available-for-github-enterprise-server)”。"}