* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn

* run script/i18n/reset-known-broken-translation-files.js

* Check in cn CSV report

Co-authored-by: Grace Park <gracepark@github.com>
This commit is contained in:
docubot 2022-06-16 15:11:58 -04:00 коммит произвёл GitHub
Родитель e6d18e1f87
Коммит eaa75433ae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
147 изменённых файлов: 906 добавлений и 551 удалений

Просмотреть файл

@ -42,7 +42,6 @@ translations/zh-CN/content/admin/configuration/configuring-your-enterprise/acces
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/command-line-utilities.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-custom-footers.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-rate-limits.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md,broken liquid tags
@ -50,7 +49,6 @@ translations/zh-CN/content/admin/configuration/configuring-your-enterprise/deplo
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md,broken liquid tags
translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md,broken liquid tags
translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md,broken liquid tags
translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled.md,broken liquid tags
translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/index.md,broken liquid tags
translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md,broken liquid tags
@ -77,9 +75,11 @@ translations/zh-CN/content/admin/identity-and-access-management/index.md,renderi
translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/index.md,broken liquid tags
@ -100,7 +100,6 @@ translations/zh-CN/content/admin/packages/getting-started-with-github-packages-f
translations/zh-CN/content/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages.md,broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator.md,broken liquid tags
@ -206,6 +205,7 @@ translations/zh-CN/content/discussions/collaborating-with-your-community-using-d
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md,broken liquid tags
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md,broken liquid tags
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/index.md,broken liquid tags
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md,broken liquid tags
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md,broken liquid tags
translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md,broken liquid tags
translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom.md,broken liquid tags
@ -314,6 +314,7 @@ translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml,broken liquid
translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml,broken liquid tags
translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml,broken liquid tags
@ -347,14 +348,14 @@ translations/zh-CN/data/reusables/dependabot/dependabot-alerts-dependency-graph-
translations/zh-CN/data/reusables/dependabot/enterprise-enable-dependabot.md,broken liquid tags
translations/zh-CN/data/reusables/dotcom_billing/downgrade-org-to-free.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,rendering error
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/about-license-sync.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/hardware-rec-table.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_management_console/badge_indicator.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,rendering error
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/packages.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/getting-started/actions.md,broken liquid tags
@ -375,9 +376,9 @@ translations/zh-CN/data/reusables/repositories/deleted_forks_from_private_reposi
translations/zh-CN/data/reusables/repositories/enable-security-alerts.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/github-reviews-security-advisories.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/select-marketplace-apps.md,broken liquid tags
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,rendering error
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,broken liquid tags
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,Listed in localization-support#489
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,rendering error
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,broken liquid tags
translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/security-advisory/link-browsing-advisory-db.md,broken liquid tags

1 file reason
42 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/command-line-utilities.md broken liquid tags
43 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md broken liquid tags
44 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-custom-footers.md broken liquid tags
translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md broken liquid tags
45 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md broken liquid tags
46 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-rate-limits.md broken liquid tags
47 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md broken liquid tags
49 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md broken liquid tags
50 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md broken liquid tags
51 translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md broken liquid tags
translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements.md broken liquid tags
52 translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled.md broken liquid tags
53 translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/index.md broken liquid tags
54 translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md broken liquid tags
75 translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md broken liquid tags
76 translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication.md broken liquid tags
77 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md broken liquid tags
78 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users.md broken liquid tags
79 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md broken liquid tags
80 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md broken liquid tags
81 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md broken liquid tags
82 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md broken liquid tags
83 translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise.md broken liquid tags
84 translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md broken liquid tags
85 translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/index.md broken liquid tags
100 translations/zh-CN/content/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages.md broken liquid tags
101 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md broken liquid tags
102 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md broken liquid tags
103 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md broken liquid tags
104 translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md broken liquid tags
105 translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator.md broken liquid tags
205 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md broken liquid tags
206 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md broken liquid tags
207 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/index.md broken liquid tags
208 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md broken liquid tags
209 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md broken liquid tags
210 translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md broken liquid tags
211 translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom.md broken liquid tags
314 translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml broken liquid tags
315 translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml broken liquid tags
316 translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml broken liquid tags
317 translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml broken liquid tags
318 translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml broken liquid tags
319 translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml broken liquid tags
320 translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml broken liquid tags
348 translations/zh-CN/data/reusables/dependabot/enterprise-enable-dependabot.md broken liquid tags
349 translations/zh-CN/data/reusables/dotcom_billing/downgrade-org-to-free.md broken liquid tags
350 translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md broken liquid tags
351 translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md rendering error broken liquid tags
352 translations/zh-CN/data/reusables/enterprise-licensing/about-license-sync.md broken liquid tags
353 translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md broken liquid tags
354 translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md broken liquid tags
355 translations/zh-CN/data/reusables/enterprise_installation/hardware-rec-table.md broken liquid tags
356 translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md broken liquid tags
357 translations/zh-CN/data/reusables/enterprise_management_console/badge_indicator.md broken liquid tags
358 translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md rendering error broken liquid tags
359 translations/zh-CN/data/reusables/gated-features/packages.md broken liquid tags
360 translations/zh-CN/data/reusables/gated-features/secret-scanning.md broken liquid tags
361 translations/zh-CN/data/reusables/getting-started/actions.md broken liquid tags
376 translations/zh-CN/data/reusables/repositories/enable-security-alerts.md broken liquid tags
377 translations/zh-CN/data/reusables/repositories/github-reviews-security-advisories.md broken liquid tags
378 translations/zh-CN/data/reusables/repositories/select-marketplace-apps.md broken liquid tags
379 translations/zh-CN/data/reusables/saml/saml-session-oauth.md rendering error broken liquid tags
380 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md Listed in localization-support#489
381 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md rendering error broken liquid tags
382 translations/zh-CN/data/reusables/scim/after-you-configure-saml.md broken liquid tags
383 translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md broken liquid tags
384 translations/zh-CN/data/reusables/security-advisory/link-browsing-advisory-db.md broken liquid tags

Просмотреть файл

@ -1,5 +1,5 @@
---
title: Managing contribution settings on your profile
title: 管理个人资料上的贡献设置
intro: 您的贡献(包括提交、提议的拉取请求和打开的议题)将显示在个人资料中,便于人们轻松看到您所做的工作。
redirect_from:
- /articles/managing-contribution-graphs-on-your-profile
@ -19,6 +19,6 @@ children:
- /sending-enterprise-contributions-to-your-githubcom-profile
- /why-are-my-contributions-not-showing-up-on-my-profile
- /troubleshooting-commits-on-your-timeline
shortTitle: Manage contribution settings
shortTitle: 管理贡献设置
---

Просмотреть файл

@ -1,5 +1,5 @@
---
title: Showing your private contributions and achievements on your profile
title: 在您的个人资料中显示您的私人贡献和成就
intro: '您的 {% data variables.product.product_name %} 个人资料显示过去一年中您的仓库贡献图。 除了公共存储库的活动外,您还可以选择显示 {% ifversion fpt or ghes or ghec %}私人和内部{% else %}私人{% endif %} 仓库中的匿名活动{% ifversion fpt or ghes or ghec %}{% endif %}。'
redirect_from:
- /articles/publicizing-or-hiding-your-private-contributions-on-your-profile
@ -13,7 +13,7 @@ versions:
ghec: '*'
topics:
- Profiles
shortTitle: Private contributions and achievements
shortTitle: 私人贡献和成就
---
如果公开您的私有贡献,对您处理的私有仓库没有访问权限的人员将无法查看您的私有贡献详情, 而只能看到您在指定日期的贡献数。 您的公共贡献会包含详细信息。 更多信息请参阅“[在个人资料页面中查看贡献](/articles/viewing-contributions-on-your-profile-page)”。
@ -31,12 +31,12 @@ shortTitle: Private contributions and achievements
- 要公开您的私有贡献,在贡献图上方,使用 **Contribution settings贡献设置**下拉菜单,然后选择 **Private contributions私有贡献**。 访问者将会看到您的私有贡献数,但没有更多详细信息。 ![从贡献设置下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-on.png)
- 要隐藏您的私有贡献,在贡献图上方,使用 **Contribution settings贡献设置**下拉菜单,然后取消选择 **Private contributions私有贡献**。访问者只会看到您的公共贡献。 ![从贡献设置下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-off.png)
## Changing the visibility of Achievements
## 更改成就的可见性
{% data reusables.user-settings.access_settings %}
1. Show or hide Achievements on your profile:
- To show Achievements on your profile, navigate to **Profile settings**, and select the checkbox next to **Show Achievements on my profile.** ![Enable visitors to see Achievements from profile settings](/assets/images/achievements-profile-settings-off.png)
- To hide Achievements from your profile, navigate to **Profile settings**, and unselect the checkbox next to **Show Achievements on my profile.** ![Hide Achievements from visitors in profile settings](/assets/images/achievements-profile-settings-on.png)
1. 在个人资料上显示或隐藏成就:
- 要在个人主页上显示成就,请导航到 **Profile settings个人资料设置**,然后选中 **Show Achievements on my profile在我的个人资料中显示成就**旁边的复选框。 ![使访问者能够从个人资料设置查看成就](/assets/images/achievements-profile-settings-off.png)
- 要从您的个人资料中隐藏成就,请导航到 **Profile settings个人资料设置**,然后取消选中 **Show Achievements on my profile在我的个人资料上显示成就**旁边的复选框。 ![在个人资料设置中对访问者隐藏成就](/assets/images/achievements-profile-settings-on.png)
## 延伸阅读

Просмотреть файл

@ -42,7 +42,7 @@ shortTitle: 设置提交电子邮件地址
{% endif %}
{% ifversion fpt or ghec %}如果您想将个人电子邮件地址设为私密,则可以使用 {% data variables.product.product_name %} 的 `no-reply` 电子邮件地址作为您的提交电子邮件地址。 要将 `noreply` 电子邮件地址用于从命令行推送的提交,请在 Git 中设置提交电子邮件地址时使用该电子邮件地址。 要将 `noreply` 地址用于基于 web 的 Git 操作,请在 GitHub 上设置提交电子邮件地址并选择**对我的电子邮件地址保密**。
{% ifversion fpt or ghec %}如果您想将个人电子邮件地址设为私密,则可以使用 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址作为您的提交电子邮件地址。 要将 `noreply` 电子邮件地址用于从命令行推送的提交,请在 Git 中设置提交电子邮件地址时使用该电子邮件地址。 要将 `noreply` 地址用于基于 web 的 Git 操作,请在 GitHub 上设置提交电子邮件地址并选择**对我的电子邮件地址保密**。
您也可以选择阻止从命令行推送的提交显示您的个人电子邮件地址。 更多信息请参阅“[阻止推送的命令行显示您的个人电子邮件地址](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)”。{% endif %}
@ -52,7 +52,7 @@ shortTitle: 设置提交电子邮件地址
{% note %}
**注意:**如果您在 2017 年 7 月 18 日_之后_在 {% data variables.product.product_location %} 上创建了您的帐户,则 {% data variables.product.product_name %} `no-reply` 电子邮件地址是七位数的 ID 号,您的用户名以 <code><em>ID+用户名</em>@users.noreply.github.com</code> 的形式提供。 如果您在 2017 年 7 月 18 日_之前_在 {% data variables.product.product_location %} 上创建了帐户,则 {% data variables.product.product_name %} `no-reply` 电子邮件地址是 <code><em>用户名</em>@users.noreply.github.com</code>。 通过在电子邮件设置中选择(或取消选择并重新选择)**Keep my email address private将我的电子邮件地址设为私密**,您可以获得基于 ID 的 {% data variables.product.product_name %} `no-reply` 电子邮件地址。
**注意:**如果您在 2017 年 7 月 18 日_之后_在 {% data variables.product.product_location %} 上创建了您的帐户,则 {% data variables.product.product_name %} `noreply` 电子邮件地址是七位数的 ID 号,您的用户名以 <code><em>ID+用户名</em>@users.noreply.github.com</code> 的形式提供。 如果您在 2017 年 7 月 18 日_之前_在 {% data variables.product.product_location %} 上创建了帐户,则 {% data variables.product.product_name %} `noreply` 电子邮件地址是 <code><em>用户名</em>@users.noreply.github.com</code>。 通过在电子邮件设置中选择(或取消选择并重新选择)**Keep my email address private将我的电子邮件地址设为私密**,您可以获得基于 ID 的 {% data variables.product.product_name %} `noreply` 电子邮件地址。
{% endnote %}

Просмотреть файл

@ -190,7 +190,7 @@ jobs:
| `github.graphql_url` | `字符串` | {% data variables.product.prodname_dotcom %} GraphQL API 的 URL。 |
| `github.head_ref` | `字符串` | 工作流程运行中拉取请求的 `head_ref` 或来源分支。 此属性仅在触发工作流程运行的事件为 `pull_request``pull_request_target` 时才可用。 |
| `github.job` | `字符串` | 当前作业的 [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id)。 <br /> 注意:此上下文属性由 Actions 运行器设置,并且仅在作业的执行 `steps` 中可用。 否则,此属性的值将为 `null`。 |
| `github.ref` | `字符串` | 触发工作流程的分支或标记参考。 对于分支,格式为 `refs/heads/<branch_name>`,对于标记是 `refs/tags/<tag_name>`。 |
| `github.ref` | `字符串` | {% data reusables.actions.ref-description %}
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5338 %}
| `github.ref_name` | `string` | {% data reusables.actions.ref_name-description %} | | `github.ref_protected` | `string` | {% data reusables.actions.ref_protected-description %} | | `github.ref_type` | `string` | {% data reusables.actions.ref_type-description %}
{%- endif %}

Просмотреть файл

@ -143,7 +143,7 @@ jobs:
| `GITHUB_HEAD_REF` | 工作流程运行中拉取请求的头部引用或来源分支。 此属性仅在触发工作流程运行的事件为 `pull_request``pull_request_target` 时才设置。 例如,`feature-branch-1`。 |
| `GITHUB_JOB` | 当前作业的 [job_id](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id)。 例如,`greeting_job`。 |
| `GITHUB_PATH` | 运行器上从工作流程命令到设置系统 `PATH` 变量的文件路径。 此文件对于当前步骤是唯一的,并且会针对作业中的每个步骤进行更改。 例如 `/home/runner/work/_temp/_runner_file_commands/add_path_899b9445-ad4a-400c-aa89-249f18632cf5`。 更多信息请参阅“[{% data variables.product.prodname_actions %} 的工作流程命令](/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path)”。 |
| `GITHUB_REF` | 触发工作流程的分支或标记参考。 对于分支,这是格式 `refs/heads/<branch_name>`,对于标记是 `refs/tags/<tag_name>`,对于拉取请求是 `refs/pull/<pr_number>/merge`。 此变量仅在分支或标记可用于事件类型时才会设置。 例如 `refs/heads/feature-branch-1`。 |
| `GITHUB_REF` | {% data reusables.actions.ref-description %}
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5338 %}
| `GITHUB_REF_NAME` | {% data reusables.actions.ref_name-description %} For example, `feature-branch-1`.| | `GITHUB_REF_PROTECTED` | {% data reusables.actions.ref_protected-description %} | | `GITHUB_REF_TYPE` | {% data reusables.actions.ref_type-description %}
{%- endif %}

Просмотреть файл

@ -49,7 +49,7 @@ topics:
```{% endif %}
{% note %}
**Note**: For more information about enabling access to the administrative shell via SSH, see "[Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/configuration/accessing-the-administrative-shell-ssh)."
**Note**: For more information about enabling access to the administrative shell via SSH, see "[Accessing the administrative shell (SSH)](/enterprise/admin/configuration/accessing-the-administrative-shell-ssh)."
{% endnote %}
2. 应用配置。

Просмотреть файл

@ -43,7 +43,7 @@ To use {% data variables.product.prodname_github_connect %}, you must have an or
{% ifversion ghes %}
If your organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} uses IP allow lists, you must add the IP address or network for {% data variables.product.product_location %} to your IP allow list on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing allowed IP addresses for your organization](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
{% endif %}
## Enabling {% data variables.product.prodname_github_connect %}

Просмотреть файл

@ -19,7 +19,7 @@ topics:
{% data variables.enterprise.management_console %} 中的主机名设置应设置为合适的完全限定域名 (FQDN),此域名可在互联网上或您的内部网络内解析。 例如,您的主机名设置可能是 `github.companyname.com。` Web 和 API 请求将自动重定向到 {% data variables.enterprise.management_console %} 中配置的主机名。
配置主机名后,可以启用子域隔离以进一步提高 {% data variables.product.product_location %} 的安全性。 更多信息请参阅“[启用子域隔离](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)”。
配置主机名后,可以启用子域隔离以进一步提高 {% data variables.product.product_location %} 的安全性。 更多信息请参阅“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)”。
有关支持的主机名类型的详细信息,请参阅 [HTTP RFC 2.1 节](https://tools.ietf.org/html/rfc1123#section-2)。
@ -33,4 +33,4 @@ topics:
{% data reusables.enterprise_management_console.test-domain-settings-failure %}
{% data reusables.enterprise_management_console.save-settings %}
为了帮助缓解各种跨站点脚本漏洞,我们建议您在配置主机名后为 {% data variables.product.product_location %} 启用子域隔离。 更多信息请参阅“[启用子域隔离](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)”。
为了帮助缓解各种跨站点脚本漏洞,我们建议您在配置主机名后为 {% data variables.product.product_location %} 启用子域隔离。 更多信息请参阅“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)”。

Просмотреть файл

@ -32,9 +32,9 @@ topics:
要在生产中使用 TLS您必须具有由可信证书颁发机构签名的未加密 PEM 格式的证书。
您的证书还需要为“[启用子域隔离](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)”中列出的子域配置使用者可选名称,如果证书已由中间证书颁发机构签名,将需要包含完整的证书链。 更多信息请参阅 Wikipedia 上的“[使用者可选名称](http://en.wikipedia.org/wiki/SubjectAltName)”。
您的证书还需要为“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)”中列出的子域配置使用者可选名称,如果证书已由中间证书颁发机构签名,将需要包含完整的证书链。 更多信息请参阅 Wikipedia 上的“[使用者可选名称](http://en.wikipedia.org/wiki/SubjectAltName)”。
您可以使用 `ghe-ssl-generate-csr` 命令为实例生成证书签名请求 (CSR)。 更多信息请参阅“[命令行实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities/#ghe-ssl-generate-csr)”。
您可以使用 `ghe-ssl-generate-csr` 命令为实例生成证书签名请求 (CSR)。 更多信息请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities/#ghe-ssl-generate-csr)”。
## 上传自定义 TLS 证书
@ -63,7 +63,7 @@ Let's Encrypt 是公共证书颁发机构,他们使用 ACME 协议颁发受浏
在您启用通过 Let's Encrypt 自动进行 TLS 证书管理后,{% data variables.product.product_location %} 将与 Let's Encrypt 服务器通信,以获取证书。 要续订证书Let's Encrypt 服务器必须通过入站 HTTP 请求验证已配置域名的控制。
您还可以在 {% data variables.product.product_location %} 上使用 `ghe-ssl-acme` 命令行实用程序自动生成 Let's Encrypt 证书。 更多信息请参阅“[命令行实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-ssl-acme)”。
您还可以在 {% data variables.product.product_location %} 上使用 `ghe-ssl-acme` 命令行实用程序自动生成 Let's Encrypt 证书。 更多信息请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities#ghe-ssl-acme)”。
## 使用 Let's Encrypt 配置 TLS

Просмотреть файл

@ -50,13 +50,13 @@ shortTitle: 启用子域隔离
启用子域隔离之前,您必须为新域配置网络设置。
- 指定有效域名作为主机名,而不是指定 IP 地址。 更多信息请参阅“[配置主机名](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-a-hostname)。”
- 指定有效域名作为主机名,而不是指定 IP 地址。 更多信息请参阅“[配置主机名](/enterprise/admin/guides/installation/configuring-a-hostname)。”
{% data reusables.enterprise_installation.changing-hostname-not-supported %}
- 为上文列出的子域设置通配符域名系统 (DNS) 记录或单独的 DNS 记录。 建议为指向您的服务器 IP 地址的 `*.HOSTNAME` 创建一条 A 记录,从而无需为各个子域创建多条记录。
- 为 `*.HOSTNAME` 获取一个使用者可选名称 (SAN) 同时适用于 `HOSTNAME` 和通配符域 `*.HOSTNAME` 的通配符传输层安全 (TLS) 证书。 例如,如果您的主机名为 `github.octoinc.com`,则获取一个通用名值设为 `*.github.octoinc.com`、SAN 值同时设为 `github.octoinc.com``*.github.octoinc.com` 的证书。
- 在设备上启用 TLS。 更多信息请参阅“[配置 TLS](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-tls/)”。
- 在设备上启用 TLS。 更多信息请参阅“[配置 TLS](/enterprise/admin/guides/installation/configuring-tls/)”。
## 启用子域隔离

Просмотреть файл

@ -69,7 +69,7 @@ We strongly recommend enabling PROXY protocol support for both your instance and
## Configuring health checks
Health checks allow a load balancer to stop sending traffic to a node that is not responding if a pre-configured check fails on that node. If the instance is offline due to maintenance or unexpected failure, the load balancer can display a status page. In a High Availability (HA) configuration, a load balancer can be used as part of a failover strategy. However, automatic failover of HA pairs is not supported. You must manually promote the replica instance before it will begin serving requests. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)."
Health checks allow a load balancer to stop sending traffic to a node that is not responding if a pre-configured check fails on that node. If the instance is offline due to maintenance or unexpected failure, the load balancer can display a status page. In a High Availability (HA) configuration, a load balancer can be used as part of a failover strategy. However, automatic failover of HA pairs is not supported. You must manually promote the replica instance before it will begin serving requests. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)."
{% data reusables.enterprise_clustering.health_checks %}
{% data reusables.enterprise_site_admin_settings.maintenance-mode-status %}

Просмотреть файл

@ -54,7 +54,7 @@ The first time that you access the {% data variables.enterprise.management_conso
The {% data variables.enterprise.management_console %} locks after ten failed login attempts are made in the span of ten minutes. You must wait for the login screen to automatically unlock before attempting to log in again. The login screen automatically unlocks as soon as the previous ten minute period contains fewer than ten failed login attempts. The counter resets after a successful login occurs.
To immediately unlock the {% data variables.enterprise.management_console %}, use the `ghe-reactivate-admin-login` command via the administrative shell. For more information, see "[Command line utilities](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-reactivate-admin-login)" and "[Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/)."
To immediately unlock the {% data variables.enterprise.management_console %}, use the `ghe-reactivate-admin-login` command via the administrative shell. For more information, see "[Command line utilities](/enterprise/admin/guides/installation/command-line-utilities#ghe-reactivate-admin-login)" and "[Accessing the administrative shell (SSH)](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/)."
## Troubleshooting failed connections to the {% data variables.enterprise.management_console %}

Просмотреть файл

@ -15,7 +15,7 @@ topics:
- Enterprise
- SSH
---
You can execute these commands from anywhere on the VM after signing in as an SSH admin user. For more information, see "[Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/)."
You can execute these commands from anywhere on the VM after signing in as an SSH admin user. For more information, see "[Accessing the administrative shell (SSH)](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/)."
## General
@ -124,7 +124,7 @@ $ ghe-config app.github.rate-limiting-exempt-users "<em>hubot</em> <em>github-ac
### ghe-config-apply
This utility applies {% data variables.enterprise.management_console %} settings, reloads system services, prepares a storage device, reloads application services, and runs any pending database migrations. It is equivalent to clicking **Save settings** in the {% data variables.enterprise.management_console %}'s web UI or to sending a POST request to [the `/setup/api/configure` endpoint](/enterprise/{{ currentVersion }}/user/rest/reference/enterprise-admin#management-console).
This utility applies {% data variables.enterprise.management_console %} settings, reloads system services, prepares a storage device, reloads application services, and runs any pending database migrations. It is equivalent to clicking **Save settings** in the {% data variables.enterprise.management_console %}'s web UI or to sending a POST request to [the `/setup/api/configure` endpoint](/enterprise/user/rest/reference/enterprise-admin#management-console).
You will probably never need to run this manually, but it's available if you want to automate the process of saving your settings via SSH.
@ -352,7 +352,7 @@ stop/waiting
### ghe-set-password
With `ghe-set-password`, you can set a new password to authenticate into the [{% data variables.enterprise.management_console %}](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-management-console).
With `ghe-set-password`, you can set a new password to authenticate into the [{% data variables.enterprise.management_console %}](/enterprise/admin/guides/installation/accessing-the-management-console).
```shell
ghe-set-password <new_password>
@ -394,7 +394,7 @@ existing keys in /etc/ssh/ssh_host_* and generate new ones. [y/N]
### ghe-ssh-weak-fingerprints
This utility returns a report of known weak SSH keys stored on the {% data variables.product.prodname_enterprise %} appliance. You can optionally revoke user keys as a bulk action. The utility will report weak system keys, which you must manually revoke in the [{% data variables.enterprise.management_console %}](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-management-console).
This utility returns a report of known weak SSH keys stored on the {% data variables.product.prodname_enterprise %} appliance. You can optionally revoke user keys as a bulk action. The utility will report weak system keys, which you must manually revoke in the [{% data variables.enterprise.management_console %}](/enterprise/admin/guides/installation/accessing-the-management-console).
```shell
# Print a report of weak user and system SSH keys
@ -406,7 +406,7 @@ $ ghe-ssh-weak-fingerprints --revoke
### ghe-ssl-acme
This utility allows you to install a Let's Encrypt certificate on your {% data variables.product.prodname_enterprise %} appliance. For more information, see "[Configuring TLS](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-tls)."
This utility allows you to install a Let's Encrypt certificate on your {% data variables.product.prodname_enterprise %} appliance. For more information, see "[Configuring TLS](/enterprise/admin/guides/installation/configuring-tls)."
You can use the `-x` flag to remove the ACME configuration.
@ -418,7 +418,7 @@ ghe-ssl-acme -e
This utility allows you to install a custom root CA certificate on your {% data variables.product.prodname_enterprise %} server. The certificate must be in PEM format. Furthermore, if your certificate provider includes multiple CA certificates in a single file, you must separate them into individual files that you then pass to `ghe-ssl-ca-certificate-install` one at a time.
Run this utility to add a certificate chain for S/MIME commit signature verification. For more information, see "[About commit signature verification](/enterprise/{{ currentVersion }}/user/articles/about-commit-signature-verification/)."
Run this utility to add a certificate chain for S/MIME commit signature verification. For more information, see "[About commit signature verification](/enterprise/user/articles/about-commit-signature-verification/)."
Run this utility when {% data variables.product.product_location %} is unable to connect to another server because the latter is using a self-signed SSL certificate or an SSL certificate for which it doesn't provide the necessary CA bundle. One way to confirm this is to run `openssl s_client -connect host:port -verify 0 -CApath /etc/ssl/certs` from {% data variables.product.product_location %}. If the remote server's SSL certificate can be verified, your `SSL-Session` should have a return code of 0, as shown below.
@ -470,7 +470,7 @@ ghe-ssl-certificate-setup
### ghe-ssl-generate-csr
This utility allows you to generate a private key and certificate signing request (CSR), which you can share with a commercial or private certificate authority to get a valid certificate to use with your instance. For more information, see "[Configuring TLS](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-tls)."
This utility allows you to generate a private key and certificate signing request (CSR), which you can share with a commercial or private certificate authority to get a valid certificate to use with your instance. For more information, see "[Configuring TLS](/enterprise/admin/guides/installation/configuring-tls)."
For more information about this command or for additional options, use the `-h` flag.
@ -812,7 +812,7 @@ In this example, `ghe-repl-status -vv` sends verbose status information from a r
### ghe-upgrade
This utility installs or verifies an upgrade package. You can also use this utility to roll back a patch release if an upgrade fails or is interrupted. For more information, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-github-enterprise-server/)."
This utility installs or verifies an upgrade package. You can also use this utility to roll back a patch release if an upgrade fails or is interrupted. For more information, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server/)."
To verify an upgrade package:
```shell
@ -872,7 +872,7 @@ ghe-license-usage
### ghe-org-membership-update
This utility will enforce the default organization membership visibility setting on all members in your instance. For more information, see "[Configuring visibility for organization membership](/enterprise/{{ currentVersion }}/admin/guides/user-management/configuring-visibility-for-organization-membership)." Setting options are `public` or `private`.
This utility will enforce the default organization membership visibility setting on all members in your instance. For more information, see "[Configuring visibility for organization membership](/enterprise/admin/guides/user-management/configuring-visibility-for-organization-membership)." Setting options are `public` or `private`.
```shell
ghe-org-membership-update --visibility=<em>SETTING</em>

Просмотреть файл

@ -72,7 +72,7 @@ More resources may be required depending on your usage, such as user activity an
{% endnote %}
4. Set the `GHE_DATA_DIR` value to the filesystem location where you want to store backup snapshots.
5. Open your primary instance's settings page at `https://HOSTNAME/setup/settings` and add the backup host's SSH key to the list of authorized SSH keys. For more information, see [Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/).
5. Open your primary instance's settings page at `https://HOSTNAME/setup/settings` and add the backup host's SSH key to the list of authorized SSH keys. For more information, see [Accessing the administrative shell (SSH)](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/).
6. Verify SSH connectivity with {% data variables.product.product_location %} with the `ghe-host-check` command.
```shell
$ bin/ghe-host-check

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Configuring email for notifications
intro: 'To make it easy for users to respond quickly to activity on {% data variables.product.product_name %}, you can configure {% data variables.product.product_location %} to send email notifications for issue, pull request, and commit comments.'
title: 配置电子邮件通知
intro: '为了让用户轻松地快速响应 {% data variables.product.product_name %} 上的活动,您可以配置 {% data variables.product.product_location %} 对议题、拉取请求和提交注释发送电子邮件通知。'
redirect_from:
- /enterprise/admin/guides/installation/email-configuration
- /enterprise/admin/articles/configuring-email
@ -17,90 +17,78 @@ topics:
- Fundamentals
- Infrastructure
- Notifications
shortTitle: Configure email notifications
shortTitle: 配置电子邮件通知
---
{% ifversion ghae %}
Enterprise owners can configure email for notifications.
企业所有者可以配置以电子邮件发送通知。
{% endif %}
## Configuring SMTP for your enterprise
## 为企业配置 SMTP
{% ifversion ghes %}
{% data reusables.enterprise_site_admin_settings.email-settings %}
4. Select **Enable email**. This will enable both outbound and inbound email, however for inbound email to work you will also need to configure your DNS settings as described below in "[Configuring DNS and firewall
settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)."
![Enable outbound email](/assets/images/enterprise/management-console/enable-outbound-email.png)
5. Type the settings for your SMTP server.
- In the **Server address** field, type the address of your SMTP server.
- In the **Port** field, type the port that your SMTP server uses to send email.
- In the **Domain** field, type the domain name that your SMTP server will send with a HELO response, if any.
- Select the **Authentication** dropdown, and choose the type of encryption used by your SMTP server.
- In the **No-reply email address** field, type the email address to use in the From and To fields for all notification emails.
6. If you want to discard all incoming emails that are addressed to the no-reply email address, select **Discard email addressed to the no-reply email address**.
![Checkbox to discard emails addressed to the no-reply email address](/assets/images/enterprise/management-console/discard-noreply-emails.png)
7. Under **Support**, choose a type of link to offer additional support to your users.
- **Email:** An internal email address.
- **URL:** A link to an internal support site. You must include either `http://` or `https://`.
![Support email or URL](/assets/images/enterprise/management-console/support-email-url.png)
8. [Test email delivery](#testing-email-delivery).
4. 选择 **Enable email**。 这将同时启用出站和入站电子邮件,不过,要想入站电子邮件正常运行,您还需要按照下文“[配置 DNS 和防火墙设置以允许传入的电子邮件](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)”所述配置您的 DNS 设置。 ![启用出站电子邮件](/assets/images/enterprise/management-console/enable-outbound-email.png)
5. 键入 SMTP 服务器的设置。
- 在 **Server address** 字段中,输入您的 SMTP 服务器的地址。
- 在 **Port** 字段中,输入 SMTP 服务器用于发送电子邮件的端口。
- 在 **Domain** 字段中,输入您的 SMTP 服务器将随 HELO 响应(如有)发送的域名。
- 在 **Authentication身份验证**下拉菜单中选择您的 SMTP 服务器使用的加密类型。
- 在 **No-reply email address** 字段中,输入要在所有通知电子邮件的 From 和 To 字段中使用的电子邮件地址。
6. 如果您想丢弃发送到无回复电子邮件地址的所有传入电子邮件,请选中 **Discard email addressed to the no-reply email address**。 ![用于丢弃发送到无回复电子邮件地址的电子邮件的复选框](/assets/images/enterprise/management-console/discard-noreply-emails.png)
7. 在 **Support支持**下,选择用于向您的用户提供附加支持的链接类型。
- **Email电子邮件**:内部电子邮件地址。
- **URL**:内部支持站点的链接。 您必须包括 `http://``https://`。 ![支持电子邮件或 URL](/assets/images/enterprise/management-console/support-email-url.png)
8. [测试电子邮件递送](#testing-email-delivery)。
{% elsif ghae %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.email-tab %}
2. Select **Enable email**.
!["Enable" checkbox for email settings configuration](/assets/images/enterprise/configuration/ae-enable-email-configure.png)
3. Type the settings for your email server.
- In the **Server address** field, type the address of your SMTP server.
- In the **Port** field, type the port that your SMTP server uses to send email.
- In the **Domain** field, type the domain name that your SMTP server will send with a HELO response, if any.
- Select the **Authentication** dropdown, and choose the type of encryption used by your SMTP server.
- In the **No-reply email address** field, type the email address to use in the From and To fields for all notification emails.
4. If you want to discard all incoming emails that are addressed to the no-reply email address, select **Discard email addressed to the no-reply email address**.
!["Discard" checkbox for email settings configuration](/assets/images/enterprise/configuration/ae-discard-email.png)
5. Click **Test email settings**.
!["Test email settings" button for email settings configuration](/assets/images/enterprise/configuration/ae-test-email.png)
6. Under "Send test email to," type the email address where you want to send a test email, then click **Send test email**.
!["Send test email" button for email settings configuration](/assets/images/enterprise/configuration/ae-send-test-email.png)
7. Click **Save**.
!["Save" button for enterprise support contact configuration](/assets/images/enterprise/configuration/ae-save.png)
2. 选择 **Enable email**。 ![用于电子邮件设置配置的"Enable启用"复选框](/assets/images/enterprise/configuration/ae-enable-email-configure.png)
3. 键入电子邮件服务器的设置。
- 在 **Server address** 字段中,输入您的 SMTP 服务器的地址。
- 在 **Port** 字段中,输入 SMTP 服务器用于发送电子邮件的端口。
- 在 **Domain** 字段中,输入您的 SMTP 服务器将随 HELO 响应(如有)发送的域名。
- 在 **Authentication身份验证**下拉菜单中选择您的 SMTP 服务器使用的加密类型。
- 在 **No-reply email address** 字段中,输入要在所有通知电子邮件的 From 和 To 字段中使用的电子邮件地址。
4. 如果您想丢弃发送到无回复电子邮件地址的所有传入电子邮件,请选中 **Discard email addressed to the no-reply email address**。 ![用于电子邮件设置配置的"Discard放弃"复选框](/assets/images/enterprise/configuration/ae-discard-email.png)
5. 单击 **Test email settings测试电子邮件设置**。 ![用于电子邮件设置配置的"Test email settings测试电子邮件设置"按钮](/assets/images/enterprise/configuration/ae-test-email.png)
6. 在“Send test email to发送测试电子邮件到”下请输入测试电子邮件要发送到的电子邮件地址然后单击 **Send test email发送测试电子邮件**。 ![用于电子邮件设置配置的"Send test email发送测试电子邮件"按钮](/assets/images/enterprise/configuration/ae-send-test-email.png)
7. 单击 **Save保存**。 ![用于企业支持联系人配置的"Save保存"按钮](/assets/images/enterprise/configuration/ae-save.png)
{% endif %}
{% ifversion ghes %}
## Testing email delivery
## 测试电子邮件递送
1. At the top of the **Email** section, click **Test email settings**.
![Test email settings](/assets/images/enterprise/management-console/test-email.png)
2. In the **Send test email to** field, type an address to send the test email to.
![Test email address](/assets/images/enterprise/management-console/test-email-address.png)
3. Click **Send test email**.
![Send test email](/assets/images/enterprise/management-console/test-email-address-send.png)
1. 在 **Email** 部分的顶部,单击 **Test email settings**。 ![测试电子邮件设置](/assets/images/enterprise/management-console/test-email.png)
2. 在 **Send test email to** 字段中,输入用于接收测试电子邮件的地址。 ![测试电子邮件地址](/assets/images/enterprise/management-console/test-email-address.png)
3. 单击 **Send test email**。 ![发送测试电子邮件](/assets/images/enterprise/management-console/test-email-address-send.png)
{% tip %}
**Tip:** If SMTP errors occur while sending a test email—such as an immediate delivery failure or an outgoing mail configuration error—you will see them in the Test email settings dialog box.
**提示**:如果在发送测试电子邮件时发生 SMTP 错误(例如即时递送失败或传出邮件配置错误),您将在 Test email settings 对话框中看到这些错误。
{% endtip %}
4. If the test email fails, [troubleshoot your email settings](#troubleshooting-email-delivery).
5. When the test email succeeds, at the bottom of the page, click **Save settings**.
![Save settings button](/assets/images/enterprise/management-console/save-settings.png)
4. 如果测试电子邮件失败,请[排查电子邮件设置问题](#troubleshooting-email-delivery)。
5. 当测试电子邮件成功后,在页面的底部单击 **Save settings**。 ![Save settings 按钮](/assets/images/enterprise/management-console/save-settings.png)
{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %}
## Configuring DNS and firewall settings to allow incoming emails
## 配置 DNS 和防火墙设置以允许传入的电子邮件
If you want to allow email replies to notifications, you must configure your DNS settings.
如果您希望允许通知的电子邮件回复,则必须配置 DNS 设置。
1. Ensure that port 25 on the instance is accessible to your SMTP server.
2. Create an A record that points to `reply.[hostname]`. Depending on your DNS provider and instance host configuration, you may be able to instead create a single A record that points to `*.[hostname]`.
3. Create an MX record that points to `reply.[hostname]` so that emails to that domain are routed to the instance.
4. Create an MX record that points `noreply.[hostname]` to `[hostname]` so that replies to the `cc` address in notification emails are routed to the instance. For more information, see {% ifversion ghes %}"[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications){% else %}"[About email notifications](/github/receiving-notifications-about-activity-on-github/about-email-notifications){% endif %}."
1. 确保您的 SMTP 服务器可以访问实例上的端口 25。
2. 创建一个指向 `reply.[hostname]` 的 A 记录。 根据您的 DNS 提供商和实例主机配置,您可以创建一个指向 `*.[hostname]` 的 A 记录。
3. 创建一个指向 `reply.[hostname]` 的 MX 记录,以便发送到该域的电子邮件可以路由到实例。
4. 创建一个将 `noreply.[hostname]` 指向 `[hostname]` 的 MX 记录,以便对通知电子邮件中 `cc` 地址的回复可以路由到实例。 更多信息请参阅{% ifversion ghes %}"[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications){% else %}“[关于电子邮件通知](/github/receiving-notifications-about-activity-on-github/about-email-notifications){% endif %}。”
## Troubleshooting email delivery
## 排查电子邮件递送问题
### Create a Support Bundle
### 创建支持包
If you cannot determine what is wrong from the displayed error message, you can download a [support bundle](/enterprise/{{ currentVersion }}/admin/guides/enterprise-support/providing-data-to-github-support) containing the entire SMTP conversation between your mail server and {% data variables.product.prodname_ghe_server %}. Once you've downloaded and extracted the bundle, check the entries in *enterprise-manage-logs/unicorn.log* for the entire SMTP conversation log and any related errors.
如果您无法根据显示的错误消息确定什么地方出错,可以下载包含您的邮件服务器与 {% data variables.product.prodname_ghe_server %} 之间的整个 SMTP 对话的[支持包](/enterprise/admin/guides/enterprise-support/providing-data-to-github-support)。 在下载并提取支持包后,请检查 *enterprise-manage-logs/unicorn.log* 中的条目,查看整个 SMTP 对话日志和任何相关错误。
The unicorn log should show a transaction similar to the following:
该独角兽日志应以类似于下面所示的方式显示事务:
```shell
This is a test email generated from https://10.0.0.68/setup/settings
@ -132,18 +120,18 @@ TLS connection started
-> "535 5.7.1 http://support.yourdomain.com/smtp/auth-not-accepted nt3sm2942435pbc.14\r\n"
```
This log shows that the appliance:
此日志显示该设备:
* Opened a connection with the SMTP server (`Connection opened: smtp.yourdomain.com:587`).
* Successfully made a connection and chose to use TLS (`TLS connection started`).
* The `login` authentication type was performed (`<- "AUTH LOGIN\r\n"`).
* The SMTP Server rejected the authentication as invalid (`-> "535-5.7.1 Username and Password not accepted.`).
* 打开了与 SMTP 服务器的连接 (`Connection opened: smtp.yourdomain.com:587`)。
* 成功连接并选择使用 TLS (`TLS connection started`)。
* 执行了 `login` 身份验证类型 (`<- "AUTH LOGIN\r\n"`)。
* SMTP 服务器以无效为原因拒绝了身份验证 (`-> "535-5.7.1 Username and Password not accepted.`)。
### Check {% data variables.product.product_location %} logs
### 检查 {% data variables.product.product_location %} 日志
If you need to verify that your inbound email is functioning, there are two log files that you can examine on your instance: To verify that */var/log/mail.log* and */var/log/mail-replies/metroplex.log*.
如果您需要验证入站电子邮件是否正常运行,可以在实例上检查两个日志文件:验证 */var/log/mail.log**/var/log/mail-replies/metroplex.log*
*/var/log/mail.log* verifies that messages are reaching your server. Here's an example of a successful email reply:
*/var/log/mail.log* 可以验证消息是否抵达您的服务器。 下面是一个成功电子邮件回复的示例:
```
Oct 30 00:47:18 54-171-144-1 postfix/smtpd[13210]: connect from st11p06mm-asmtp002.mac.com[17.172.124.250]
@ -155,9 +143,9 @@ Oct 30 00:47:19 54-171-144-1 postfix/qmgr[17250]: 51DC9163323: removed
Oct 30 00:47:19 54-171-144-1 postfix/smtpd[13210]: disconnect from st11p06mm-asmtp002.mac.com[17.172.124.250]
```
Note that the client first connects; then, the queue becomes active. Then, the message is delivered, the client is removed from the queue, and the session disconnects.
请注意,客户端先连接,然后队列变成活动状态。 接着,消息递送,客户端从队列中移除,会话断开连接。
*/var/log/mail-replies/metroplex.log* shows whether inbound emails are being processed to add to issues and pull requests as replies. Here's an example of a successful message:
*/var/log/mail-replies/metroplex.log* 可以显示入站电子邮件是否正在处理,以便作为回复添加到问题和拉取请求中。 下面是一个成功消息的示例:
```
[2014-10-30T00:47:23.306 INFO (5284) #] metroplex: processing <b2b9c260-4aaa-4a93-acbb-0b2ddda68579@me.com>
@ -165,19 +153,19 @@ Note that the client first connects; then, the queue becomes active. Then, the m
[2014-10-30T00:47:23.334 DEBUG (5284) #] Moving /data/user/mail/reply/new/1414630039.Vfc00I12000eM445784.ghe-tjl2-co-ie => /data/user/incoming-mail/success
```
You'll notice that `metroplex` catches the inbound message, processes it, then moves the file over to `/data/user/incoming-mail/success`.{% endif %}
您将注意到,`metroplex` 会缓存、处理入站消息,然后将文件移动到 `/data/user/incoming-mail/success` 中。{% endif %}
### Verify your DNS settings
### 验证 DNS 设置
In order to properly process inbound emails, you must configure a valid A Record (or CNAME), as well as an MX Record. For more information, see "[Configuring DNS and firewall settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)."
为了正确处理入站电子邮件,您必须配置有效的 A 记录(或 CNAME和 MX 记录。 更多信息请参阅“[配置 DNS 和防火墙设置以允许传入的电子邮件](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)”。
### Check firewall or AWS Security Group settings
### 检查防火墙或 AWS 安全组设置
If {% data variables.product.product_location %} is behind a firewall or is being served through an AWS Security Group, make sure port 25 is open to all mail servers that send emails to `reply@reply.[hostname]`.
如果 {% data variables.product.product_location %} 位于防火墙后或者正在通过 AWS 安全组提供,请确保端口 25 对将电子邮件发送到 `reply@reply.[hostname]` 的所有邮件服务器开放。
### Contact support
### 联系支持
{% ifversion ghes %}
If you're still unable to resolve the problem, contact {% data variables.contact.contact_ent_support %}. Please attach the output file from `http(s)://[hostname]/setup/diagnostics` to your email to help us troubleshoot your problem.
如果您仍然无法解决问题,请联系 {% data variables.contact.contact_ent_support %}。 请在您的电子邮件中附上 `http(s)://[hostname]/setup/diagnostics` 的输出文件,以便帮助我们排查您的问题。
{% elsif ghae %}
You can contact {% data variables.contact.github_support %} for help configuring email for notifications to be sent through your SMTP server. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
您可以联系 {% data variables.contact.github_support %} 寻求帮助配置通过 SMTP 服务器发送电子邮件通知。 更多信息请参阅“[从 {% data variables.contact.github_support %} 获取帮助](/admin/enterprise-support/receiving-help-from-github-support)”。
{% endif %}

Просмотреть файл

@ -79,7 +79,7 @@ IP 例外列表提供对 {% data variables.product.product_location %} 的受控
## 通过 {% data variables.product.prodname_enterprise_api %} 排定维护模式
您可以通过 {% data variables.product.prodname_enterprise_api %} 排定在其他时间或日期进行维护。 更多信息请参阅“[管理控制台](/enterprise/{{ currentVersion }}/user/rest/reference/enterprise-admin#enable-or-disable-maintenance-mode)”。
您可以通过 {% data variables.product.prodname_enterprise_api %} 排定在其他时间或日期进行维护。 更多信息请参阅“[管理控制台](/enterprise/user/rest/reference/enterprise-admin#enable-or-disable-maintenance-mode)”。
## 为集群中的所有节点启用或禁用维护模式

Просмотреть файл

@ -26,7 +26,7 @@ topics:
{% data reusables.enterprise_installation.image-urls-viewable-warning %}
启用私有模式后,您可以允许未验证的 Git 操作(以及对 {% data variables.product.product_location %} 具有网络访问权限的任何人)读取已启用匿名 Git 读取权限的实例上的公共仓库代码。 更多信息请参阅“[允许管理员启用对公共仓库的匿名 Git 读取权限](/enterprise/{{ currentVersion }}/admin/guides/user-management/allowing-admins-to-enable-anonymous-git-read-access-to-public-repositories)”。
启用私有模式后,您可以允许未验证的 Git 操作(以及对 {% data variables.product.product_location %} 具有网络访问权限的任何人)读取已启用匿名 Git 读取权限的实例上的公共仓库代码。 更多信息请参阅“[允许管理员启用对公共仓库的匿名 Git 读取权限](/enterprise/admin/guides/user-management/allowing-admins-to-enable-anonymous-git-read-access-to-public-repositories)”。
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}

Просмотреть файл

@ -215,21 +215,21 @@ Refer to this section of the site admin dashboard to manage organizations, peopl
This is a list of the repositories on {% data variables.product.product_location %}. You can click on a repository name and access functions for administering the repository.
- [Blocking force pushes to a repository](/enterprise/{{ currentVersion }}/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/)
- [Configuring {% data variables.large_files.product_name_long %}](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-git-large-file-storage/#configuring-git-large-file-storage-for-an-individual-repository)
- [Archiving and unarchiving repositories](/enterprise/{{ currentVersion }}/admin/guides/user-management/archiving-and-unarchiving-repositories/)
- [Blocking force pushes to a repository](/enterprise/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/)
- [Configuring {% data variables.large_files.product_name_long %}](/enterprise/admin/guides/installation/configuring-git-large-file-storage/#configuring-git-large-file-storage-for-an-individual-repository)
- [Archiving and unarchiving repositories](/enterprise/admin/guides/user-management/archiving-and-unarchiving-repositories/)
## All users
Here you can see all of the users on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/{{ currentVersion }}/admin/guides/user-management/auditing-ssh-keys).
Here you can see all of the users on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys).
## Site admins
Here you can see all of the administrators on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/{{ currentVersion }}/admin/guides/user-management/auditing-ssh-keys).
Here you can see all of the administrators on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys).
## Dormant users
{% ifversion ghes %}
Here you can see and [suspend](/enterprise/{{ currentVersion }}/admin/guides/user-management/suspending-and-unsuspending-users) all of the inactive users on {% data variables.product.product_location %}. A user account is considered to be inactive ("dormant") when it:
Here you can see and [suspend](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users) all of the inactive users on {% data variables.product.product_location %}. A user account is considered to be inactive ("dormant") when it:
{% endif %}
{% ifversion ghae %}
Here you can see and suspend all of the inactive users on {% data variables.product.product_location %}. A user account is considered to be inactive ("dormant") when it:
@ -239,8 +239,8 @@ Here you can see and suspend all of the inactive users on {% data variables.prod
- Has not generated any activity within that time period.
- Is not a site administrator.
{% data reusables.enterprise_site_admin_settings.dormancy-threshold %} For more information, see "[Managing dormant users](/enterprise/{{ currentVersion }}/admin/guides/user-management/managing-dormant-users/#configuring-the-dormancy-threshold)."
{% data reusables.enterprise_site_admin_settings.dormancy-threshold %} For more information, see "[Managing dormant users](/enterprise/admin/guides/user-management/managing-dormant-users/#configuring-the-dormancy-threshold)."
## Suspended users
Here you can see all of the users who have been suspended on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/{{ currentVersion }}/admin/guides/user-management/auditing-ssh-keys).
Here you can see all of the users who have been suspended on {% data variables.product.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys).

Просмотреть файл

@ -62,10 +62,10 @@ topics:
$ ghe-repl-setup <em>PRIMARY IP</em>
```
1. 为存储库缓存设置 `cache_location`,将 *CACHE-LOCATION* 替换为字母数字标识符,例如部署缓存的区域。
1. 为存储库缓存设置 `cache_location`,将 *CACHE-LOCATION* 替换为字母数字标识符,例如部署缓存的区域。 还要为此缓存设置数据中心名称;新缓存将尝试从同一数据中心中的另一个缓存设定种子。
```shell
$ ghe-repl-node --cache <em>CACHE-LOCATION</em>
$ ghe-repl-node --cache <em>CACHE-LOCATION</em> --datacenter <em>REPLICA-DC-NAME</em>
```
{% data reusables.enterprise_installation.replication-command %}

Просмотреть файл

@ -19,7 +19,7 @@ topics:
{% data variables.product.prodname_ghe_server %} 由一组服务组成。 在集群中,这些服务跨多个节点运行,请求在它们之间进行负载均衡。 更改会与冗余副本一起自动存储在到单独的节点上。 大多数服务与相同服务的其他实例是对等的。 这种情况的例外是 `mysql-server``redis-server` 服务。 它们使用具有一个或多个_副本_节点的单个_主_节点来操作。
详细了解[群集所需的服务](/enterprise/{{ currentVersion }}/admin/enterprise-management/about-cluster-nodes#services-required-for-clustering)。
详细了解[群集所需的服务](/enterprise/admin/enterprise-management/about-cluster-nodes#services-required-for-clustering)。
## 集群是否适合我的组织?
@ -27,7 +27,7 @@ topics:
{% data variables.product.prodname_ghe_server %} 要求节点之间保持较低的延迟,不适用于跨地理位置的冗余。
集群提供了冗余功能,但不适用于替换高可用性配置。 更多信息请参阅[高可用性配置](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-github-enterprise-server-for-high-availability)。 主设备/辅助设备故障切换配置远比集群简单,可以满足许多组织的需求。 更多信息请参阅[集群与高可用性之间的差异](/enterprise/{{ currentVersion }}/admin/guides/clustering/differences-between-clustering-and-high-availability-ha/)。
集群提供了冗余功能,但不适用于替换高可用性配置。 更多信息请参阅[高可用性配置](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability)。 主设备/辅助设备故障切换配置远比集群简单,可以满足许多组织的需求。 更多信息请参阅[集群与高可用性之间的差异](/enterprise/admin/guides/clustering/differences-between-clustering-and-high-availability-ha/)。
{% data reusables.package_registry.packages-cluster-support %}

Просмотреть файл

@ -39,8 +39,8 @@ HA 或集群都不应被视为常规备份的替代品。 更多信息请参阅
## 监视
可用性功能,尤其是具有自动故障切换的功能(如集群)可以屏蔽故障,因为在发生故障时通常不会中断服务。 无论您使用的是 HA 还是集群,监视每个实例的状态都十分重要,这样您就可以了解何时发生了故障。 有关监视的更多信息,请参阅“[建议的警报阈值](/enterprise/{{ currentVersion }}/admin/guides/installation/recommended-alert-thresholds/)”和“[监视集群节点](/enterprise/{{ currentVersion}}/admin/guides/clustering/monitoring-cluster-nodes/)”。
可用性功能,尤其是具有自动故障切换的功能(如集群)可以屏蔽故障,因为在发生故障时通常不会中断服务。 无论您使用的是 HA 还是集群,监视每个实例的状态都十分重要,这样您就可以了解何时发生了故障。 有关监控的详细信息,请参阅“[建议的警报阈值](/enterprise/admin/guides/installation/recommended-alert-thresholds/)”和“[监控群集节点](/enterprise/{{ currentVersion}}/admin/guides/clustering/monitoring-cluster-nodes/)”。
## 延伸阅读
- 有关 {% data variables.product.prodname_ghe_server %} 集群的更多信息,请参阅“[关于集群](/enterprise/{{ currentVersion}}/admin/guides/clustering/about-clustering/)”。
- 有关 HA 的更多信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 以实现高可用性](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)”。
- 有关 HA 的更多信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 以实现高可用性](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)”。

Просмотреть файл

@ -17,12 +17,12 @@ topics:
## 安装 {% data variables.product.prodname_ghe_server %}
1. 在每个集群节点上,提供并安装 {% data variables.product.prodname_ghe_server %}。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
1. 在每个集群节点上,提供并安装 {% data variables.product.prodname_ghe_server %}。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
2. 使用管理 shell 或 DHCP**仅**配置每个节点的 IP 地址。 不要配置任何其他设置。
## 配置第一个节点
1. 连接到将在 `cluster.conf` 中指定为 MySQL 主要节点的节点。 更多信息请参阅“[关于集群配置文件](/enterprise/{{ currentVersion }}/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)”。
1. 连接到将在 `cluster.conf` 中指定为 MySQL 主要节点的节点。 更多信息请参阅“[关于集群配置文件](/enterprise/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)”。
2. 在 Web 浏览器中,访问 `https://<ip address>:8443/setup/`
{% data reusables.enterprise_installation.upload-a-license-file %}
{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %}
@ -30,7 +30,7 @@ topics:
## 初始化集群
要初始化集群,您需要一个集群配置文件 (`cluster.conf`)。 更多信息请参阅“[关于集群配置文件](/enterprise/{{ currentVersion }}/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)”。
要初始化集群,您需要一个集群配置文件 (`cluster.conf`)。 更多信息请参阅“[关于集群配置文件](/enterprise/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)”。
1. 从配置的第一个节点开始,运行 `ghe-cluster-config-init`。 如果集群配置文件中存在未配置的节点,此操作会初始化集群。
2. 运行 `ghe-cluster-config-apply`。 这将验证 `cluster.conf` 文件,将配置应用于每个节点文件,并在每个节点上显示已配置的服务。
@ -39,7 +39,7 @@ topics:
## 关于集群配置文件
集群配置文件 (`cluster.conf`) 会定义集群中的节点以及它们运行的​​服务。 更多信息请参阅“[关于集群节点](/enterprise/{{ currentVersion }}/admin/guides/clustering/about-cluster-nodes)”。
集群配置文件 (`cluster.conf`) 会定义集群中的节点以及它们运行的​​服务。 更多信息请参阅“[关于集群节点](/enterprise/admin/guides/clustering/about-cluster-nodes)”。
此示例 `cluster.conf` 定义了一个包含五个节点的集群。

Просмотреть файл

@ -34,4 +34,4 @@ Geo-replication 不会增大 {% data variables.product.prodname_ghe_server %}
{% data reusables.enterprise_installation.monitoring-replicas %}
## 延伸阅读
- “[创建 Geo-replication 副本](/enterprise/{{ currentVersion }}/admin/guides/installation/creating-a-high-availability-replica/#creating-geo-replication-replicas)”
- “[创建 Geo-replication 副本](/enterprise/admin/guides/installation/creating-a-high-availability-replica/#creating-geo-replication-replicas)”

Просмотреть файл

@ -30,7 +30,7 @@ shortTitle: 关于 HA 配置
高可用性配置不适用于:
- **扩展**。 虽然可以使用 Geo-replication 将流量分布在不同地理位置,但写入性能受限于主设备的速度和可用性。 更多信息请参阅“[关于 Geo-replication](/enterprise/{{ currentVersion }}/admin/guides/installation/about-geo-replication/)”。{% ifversion ghes > 3.2 %}
- **扩展**。 虽然可以使用 Geo-replication 将流量分布在不同地理位置,但写入性能受限于主设备的速度和可用性。 更多信息请参阅“[关于 Geo-replication](/enterprise/admin/guides/installation/about-geo-replication/)”。{% ifversion ghes > 3.2 %}
- **CI/CD 负载**。 如果您有大量在地理位置上远离主实例的 CI 客户端,则配置仓库缓存可能会使您受益匪浅。 更多信息请参阅“[关于仓库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。{% endif %}
- **备份主设备**。 高可用性副本不会替代灾难恢复计划中的非现场备份。 某些形式的数据损坏或数据丢失可能会立即从主设备复制到副本。 为确保安全回滚到稳定的过去状态,必须通过历史快照执行定期备份。
- **零停机时间升级**。 为避免受控升级场景下出现数据丢失和裂脑的状况,请先将主设备置于维护模式并等待所有写入操作完成,然后再对副本进行升级。
@ -45,13 +45,13 @@ shortTitle: 关于 HA 配置
在故障转移期间,必须将主设备置于维护模式,并将其 DNS 记录重定向到副本的 IP 地址。 将流量从主设备重新定向到副本所需的时间将取决于 TTL 配置以及更新 DNS 记录所需的时间。
如果您要使用 Geo-replication则必须配置 Geo DNS将流量定向到距离最近的副本。 更多信息请参阅“[关于 Geo-replication](/enterprise/{{ currentVersion }}/admin/guides/installation/about-geo-replication/)”。
如果您要使用 Geo-replication则必须配置 Geo DNS将流量定向到距离最近的副本。 更多信息请参阅“[关于 Geo-replication](/enterprise/admin/guides/installation/about-geo-replication/)”。
### 负载均衡器
{% data reusables.enterprise_clustering.load_balancer_intro %} {% data reusables.enterprise_clustering.load_balancer_dns %}
在故障转移期间,您必须将主设备置于维护模式。 您可以将负载均衡器配置为自动检测副本何时已升级为主设备,或者可能需要手动更改配置。 您必须先将副本手动升级为主设备,随后副本才能对用户流量作出响应。 更多信息请参阅“[结合使用 {% data variables.product.prodname_ghe_server %} 和负载均衡器](/enterprise/{{ currentVersion }}/admin/guides/installation/using-github-enterprise-server-with-a-load-balancer/)”。
在故障转移期间,您必须将主设备置于维护模式。 您可以将负载均衡器配置为自动检测副本何时已升级为主设备,或者可能需要手动更改配置。 您必须先将副本手动升级为主设备,随后副本才能对用户流量作出响应。 更多信息请参阅“[结合使用 {% data variables.product.prodname_ghe_server %} 和负载均衡器](/enterprise/admin/guides/installation/using-github-enterprise-server-with-a-load-balancer/)”。
{% data reusables.enterprise_installation.monitoring-replicas %}
@ -187,5 +187,5 @@ Success: Replica has been promoted to primary and is now accepting requests.
## 延伸阅读
- “[创建高可用性副本](/enterprise/{{ currentVersion }}/admin/guides/installation/creating-a-high-availability-replica)”
- “[创建高可用性副本](/enterprise/admin/guides/installation/creating-a-high-availability-replica)”
- "[网络端口](/admin/configuration/configuring-network-settings/network-ports)"

Просмотреть файл

@ -19,7 +19,7 @@ shortTitle: 创建 HA 副本
## 创建高可用性副本
1. 在所需平台上设置新的 {% data variables.product.prodname_ghe_server %} 设备。 副本设备应镜像主设备的 CPU、RAM 和存储设置。 建议您在独立环境中安装副本设备。 底层硬件、软件和网络组件应与主设备的相应部分隔离。 如果要使用云提供商,请使用单独的区域或分区。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
1. 在所需平台上设置新的 {% data variables.product.prodname_ghe_server %} 设备。 副本设备应镜像主设备的 CPU、RAM 和存储设置。 建议您在独立环境中安装副本设备。 底层硬件、软件和网络组件应与主设备的相应部分隔离。 如果要使用云提供商,请使用单独的区域或分区。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
1. 确保主设备和新的副本设备可以通过端口 122/TCP 和 1194/UDP 相互通信。 更多信息请参阅“[网络端口](/admin/configuration/configuring-network-settings/network-ports#administrative-ports)”。
1. 在浏览器中,导航到新副本设备的 IP 地址并上传您的 {% data variables.product.prodname_enterprise %} 许可。
{% data reusables.enterprise_installation.replica-steps %}
@ -38,7 +38,7 @@ shortTitle: 创建 HA 副本
## 创建 Geo-replication 副本
此示例配置使用一个主设备和两个副本,它们位于三个不同的地理区域。 由于三个节点可以位于不同网络中,要求所有节点均可从其他所有节点到达。 必需的管理端口至少应向其他所有节点开放。 有关端口要求的更多信息,请参阅“[网络端口](/enterprise/{{ currentVersion }}/admin/guides/installation/network-ports/#administrative-ports)”。
此示例配置使用一个主设备和两个副本,它们位于三个不同的地理区域。 由于三个节点可以位于不同网络中,要求所有节点均可从其他所有节点到达。 必需的管理端口至少应向其他所有节点开放。 有关端口要求的更多信息,请参阅“[网络端口](/enterprise/admin/guides/installation/network-ports/#administrative-ports)”。
1. 在第一个副本上运行 `ghe-repl-setup`,采用与创建标准双节点配置相同的方式创建第一个副本。
```shell
@ -98,6 +98,6 @@ shortTitle: 创建 HA 副本
## 延伸阅读
- "[关于高可用性配置](/enterprise/{{ currentVersion }}/admin/guides/installation/about-high-availability-configuration)"
- "[用于复制管理的实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)"
- “[关于 Geo-replication](/enterprise/{{ currentVersion }}/admin/guides/installation/about-geo-replication/)”
- "[关于高可用性配置](/enterprise/admin/guides/installation/about-high-availability-configuration)"
- "[用于复制管理的实用程序](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)"
- “[关于 Geo-replication](/enterprise/admin/guides/installation/about-geo-replication/)”

Просмотреть файл

@ -50,7 +50,7 @@ shortTitle: 启动故障转移到设备
```
5. 将 DNS 记录更新为指向副本的 IP 地址。 流量会在经过 TTL 周期后定向到副本。 如果您要使用负载均衡器,请务必将其配置为向副本发送流量。
6. 通知用户他们可以恢复正常操作。
7. 如有需要,请设置从新的主设备复制到现有设备和之前的主设备。 更多信息请参阅“[关于高可用性配置](/enterprise/{{ currentVersion }}/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)”。
7. 如有需要,请设置从新的主设备复制到现有设备和之前的主设备。 更多信息请参阅“[关于高可用性配置](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)”。
8. 您不打算在故障转移之前将复制设置为高可用性配置一部分的设备需由 UUID 从高可用性配置中删除。
- 在以前的设备上,通过 `cat /data/user/common/uuid` 获取其 UUID。
```shell
@ -63,4 +63,4 @@ shortTitle: 启动故障转移到设备
## 延伸阅读
- "[用于复制管理的实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)"
- "[用于复制管理的实用程序](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)"

Просмотреть файл

@ -17,7 +17,7 @@ shortTitle: 恢复 HA 配置
## 关于高可用性配置的恢复
如果故障转移是在计划内进行的,或者与设备的健康状态无关,则可以将之前的主设备用作新的副本设备。 如果故障转移与主设备的问题相关,则最好创建新的副本设备。 更多信息请参阅“[创建高可用性副本](/enterprise/{{ currentVersion }}/admin/guides/installation/creating-a-high-availability-replica/)”。
如果故障转移是在计划内进行的,或者与设备的健康状态无关,则可以将之前的主设备用作新的副本设备。 如果故障转移与主设备的问题相关,则最好创建新的副本设备。 更多信息请参阅“[创建高可用性副本](/enterprise/admin/guides/installation/creating-a-high-availability-replica/)”。
{% warning %}

Просмотреть файл

@ -27,7 +27,7 @@ shortTitle: 访问监控仪表板
{% note %}
**注**:由于通过持续集成 (CI) 或构建服务器定期轮询 {% data variables.product.product_location %} 会引发拒绝服务攻击,从而导致问题的出现,因此,建议使用 web 挂钩推送更新。 更多信息请参阅“[关于 web 挂钩](/enterprise/{{ currentVersion }}/user/articles/about-webhooks/)”。
**注**:由于通过持续集成 (CI) 或构建服务器定期轮询 {% data variables.product.product_location %} 会引发拒绝服务攻击,从而导致问题的出现,因此,建议使用 web 挂钩推送更新。 更多信息请参阅“[关于 web 挂钩](/enterprise/user/articles/about-webhooks/)”。
{% endnote %}
@ -35,8 +35,8 @@ shortTitle: 访问监控仪表板
| 问题 | 可能原因 | 建议 |
| ---------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CPU 利用率高 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少的 CPU 资源。 要增加 VM 的总 CPU 资源,请参阅“[增加 CPU 或内存资源](/enterprise/{{ currentVersion }}/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 |
| 内存使用量高 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少内存。 要增加 VM 上可用的总内存大小,请参阅“[增加 CPU 或内存资源](/enterprise/{{ currentVersion }}/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 |
| 可用磁盘空间小 | 较大的二进制或日志文件占用磁盘空间 | 如有可能,请在独立服务器上托管较大的二进制文件,并压缩或存档日志文件。 如有必要,请按“[增加存储容量](/enterprise/{{ currentVersion }}/admin/guides/installation/increasing-storage-capacity/)”中的步骤操作,为您的平台增加 VM 的磁盘空间。 |
| CPU 利用率高 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少的 CPU 资源。 要增加 VM 的总 CPU 资源,请参阅“[增加 CPU 或内存资源](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 |
| 内存使用量高 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少内存。 要增加 VM 上可用的总内存大小,请参阅“[增加 CPU 或内存资源](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 |
| 可用磁盘空间小 | 较大的二进制或日志文件占用磁盘空间 | 如有可能,请在独立服务器上托管较大的二进制文件,并压缩或存档日志文件。 如有必要,请按“[增加存储容量](/enterprise/admin/guides/installation/increasing-storage-capacity/)”中的步骤操作,为您的平台增加 VM 的磁盘空间。 |
| 响应时间较正常时间长 | 通常是上述问题之一造成的 | 确定并解决根本问题。 如果响应时间仍较长,请联系 {% data variables.contact.contact_ent_support %}。 |
| 错误率提高 | 软件问题 | 联系 {% data variables.contact.contact_ent_support %} 并附上支持包。 更多信息请参阅“[向 {% data variables.product.prodname_enterprise %} Support 提供数据](/enterprise/{{ currentVersion}}/admin/guides/enterprise-support/providing-data-to-github-support#creating-and-sharing-support-bundles)”。 |

Просмотреть файл

@ -18,10 +18,10 @@ shortTitle: 设置外部监控
## 关于 SNMP
简单网络管理协议 (SNMP) 是一种受到广泛支持的网络设备和服务器监视方法。 SNMP 默认禁用,但可以通过 {% data variables.product.prodname_enterprise %} 监视仪表板进行配置。 UDP 端口 161 必须打开,并且可以通过您的网络管理站到达。 更多信息请参阅“[使用 SNMP 进行监视](/enterprise/{{ currentVersion }}/admin/guides/installation/monitoring-using-snmp/)”。
简单网络管理协议 (SNMP) 是一种受到广泛支持的网络设备和服务器监视方法。 SNMP 默认禁用,但可以通过 {% data variables.product.prodname_enterprise %} 监视仪表板进行配置。 UDP 端口 161 必须打开,并且可以通过您的网络管理站到达。 更多信息请参阅“[使用 SNMP 进行监视](/enterprise/admin/guides/installation/monitoring-using-snmp/)”。
## 关于 collectd
collectd 属于开源统计信息收集和报告守护程序,内置对写入 RRD 文件的支持。 可以将关于 CPU 利用率、内存与磁盘占用量、网络接口流量与错误以及系统负荷的统计信息转发到外部 collectd 服务器,可在该服务器中使用各种可用工具和插件配置图表、分析和警报。 要配置 `collectd` 转发,请参阅“[配置 collectd](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-collectd/)”。
collectd 属于开源统计信息收集和报告守护程序,内置对写入 RRD 文件的支持。 可以将关于 CPU 利用率、内存与磁盘占用量、网络接口流量与错误以及系统负荷的统计信息转发到外部 collectd 服务器,可在该服务器中使用各种可用工具和插件配置图表、分析和警报。 要配置 `collectd` 转发,请参阅“[配置 collectd](/enterprise/admin/guides/installation/configuring-collectd/)”。
此外,也可以使用内置到底层虚拟化平台的监视工具对系统资源进行基本监视和警报。 更多信息请参阅 [Amazon CloudWatch](http://aws.amazon.com/cloudwatch/) 和 [VMware vSphere 监视](http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-monitoring-performance-guide.pdf)文档。

Просмотреть файл

@ -14,9 +14,9 @@ topics:
shortTitle: 启用自动更新检查
---
在 {% data variables.product.product_location %} 的升级包自动下载后,您将收到一条消息,通知您可以升级 {% data variables.product.prodname_ghe_server %}。 升级包会下载到 {% data variables.product.product_location %} 上的 `/var/lib/ghe-updates` 目录中。 更多信息请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-github-enterprise-server)
在 {% data variables.product.product_location %} 的升级包自动下载后,您将收到一条消息,通知您可以升级 {% data variables.product.prodname_ghe_server %}。 升级包会下载到 {% data variables.product.product_location %} 上的 `/var/lib/ghe-updates` 目录中。 更多信息请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server)。
如果升级存在可用的热补丁,将自动下载 `.hpkg`。 在 Management Console 中,您可以选择立即安装热补丁或排定稍后安装。 更多信息请参阅“[通过热补丁升级](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-github-enterprise-server#upgrading-with-a-hotpatch)”。
如果升级存在可用的热补丁,将自动下载 `.hpkg`。 在 Management Console 中,您可以选择立即安装热补丁或排定稍后安装。 更多信息请参阅“[通过热补丁升级](/enterprise/admin/guides/installation/upgrading-github-enterprise-server#upgrading-with-a-hotpatch)”。
{% tip %}

Просмотреть файл

@ -18,7 +18,7 @@ shortTitle: Increase CPU or memory
{% note %}
**Note:** Before increasing CPU or memory resources, put your instance in maintenance mode.{% ifversion ip-exception-list %} You can validate changes by configuring an IP exception list to allow access from specified IP addresses. {% endif %} For more information, see "[Enabling and scheduling maintenance mode](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)."
**Note:** Before increasing CPU or memory resources, put your instance in maintenance mode.{% ifversion ip-exception-list %} You can validate changes by configuring an IP exception list to allow access from specified IP addresses. {% endif %} For more information, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)."
{% endnote %}

Просмотреть файл

@ -24,7 +24,7 @@ shortTitle: 增加存储容量
{% note %}
**注意:** 在调整任何存储卷的大小之前,请将您的实例置于维护模式。{% ifversion ip-exception-list %} 您可以通过配置 IP 例外列表以允许从指定的 IP 地址进行访问来验证更改。 {% endif %} 更多信息请参阅“[启用和计划维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
**注意:** 在调整任何存储卷的大小之前,请将您的实例置于维护模式。{% ifversion ip-exception-list %} 您可以通过配置 IP 例外列表以允许从指定的 IP 地址进行访问来验证更改。 {% endif %} 更多信息请参阅“[启用和计划维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
{% endnote %}
@ -36,7 +36,7 @@ shortTitle: 增加存储容量
1. 使用虚拟平台工具调整现有用户卷磁盘大小。
{% data reusables.enterprise_installation.ssh-into-instance %}
3. 将设备置于维护模式。 更多信息请参阅“[启用和排定维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
3. 将设备置于维护模式。 更多信息请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
4. 重启设备,以检测新存储分配。
```shell
$ sudo reboot
@ -48,7 +48,7 @@ shortTitle: 增加存储容量
## 使用新设备增加根分区大小
1. 使用版本与当前设备相同的较大根磁盘来设置新的 {% data variables.product.prodname_ghe_server %} 实例。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
1. 使用版本与当前设备相同的较大根磁盘来设置新的 {% data variables.product.prodname_ghe_server %} 实例。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。
2. 关闭当前设备:
```shell
$ sudo poweroff
@ -60,7 +60,7 @@ shortTitle: 增加存储容量
{% warning %}
**警告:** 在增加根分区大小之前,您必须将您的实例置于维护模式。 更多信息请参阅“[启用和排定维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
**警告:** 在增加根分区大小之前,您必须将您的实例置于维护模式。 更多信息请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
{% endwarning %}

Просмотреть файл

@ -2,8 +2,8 @@
title: 更新虚拟机和物理资源
intro: 升级虚拟软件和虚拟硬件需要您的实例停机一段时间,因此,请务必提前规划升级。
redirect_from:
- '/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-the-vm'
- '/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-physical-resources'
- /enterprise/admin/guides/installation/upgrading-the-vm
- /enterprise/admin/guides/installation/upgrading-physical-resources
- /enterprise/admin/installation/updating-the-virtual-machine-and-physical-resources
- /enterprise/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources
versions:

Просмотреть файл

@ -54,7 +54,7 @@ shortTitle: 从 11.10.x 迁移到 2.1.23
6. 将备份主机访问 SSH 密钥粘贴到“Add new SSH key”中。 ![授权备份](/assets/images/enterprise/migration/migration-authorize-backup-host.png)
7. 单击 **Add key添加密钥**,然后单击 **Continue继续**
8. 复制您将在备份主机上运行的 `ghe-restore` 命令,将数据迁移到新实例。 ![开始迁移](/assets/images/enterprise/migration/migration-restore-start.png)
9. 在旧实例上启用维护模式,并等待所有活动进程完成。 更多信息请参阅“[启用和排定维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
9. 在旧实例上启用维护模式,并等待所有活动进程完成。 更多信息请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
{% note %}
@ -95,4 +95,4 @@ shortTitle: 从 11.10.x 迁移到 2.1.23
{% endnote %}
15. 使用 DNS 或 IP 地址分配将用户网络流量从旧实例切换到新实例。
16. 升级到 {{ currentVersion }} 的最新补丁版本。 更多信息请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server/)。”
16. 升级到 {% data variables.product.prodname_ghe_server %} 的最新修补程序版本。 更多信息请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server/)。”

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Upgrade requirements
intro: 'Before upgrading {% data variables.product.prodname_ghe_server %}, review these recommendations and requirements to plan your upgrade strategy.'
title: 升级要求
intro: '对 {% data variables.product.prodname_ghe_server %} 进行升级之前,请查阅升级策略规划的建议和要求。'
redirect_from:
- /enterprise/admin/installation/upgrade-requirements
- /enterprise/admin/guides/installation/finding-the-current-github-enterprise-release
@ -13,42 +13,43 @@ topics:
- Enterprise
- Upgrades
---
{% note %}
**Notes:**
{% ifversion ghes < 3.3 %}- Features such as {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %}, {% data variables.product.prodname_mobile %} and {% data variables.product.prodname_GH_advanced_security %} are available on {% data variables.product.prodname_ghe_server %} 3.0 or higher. We highly recommend upgrading to 3.0 or later releases to take advantage of critical security updates, bug fixes and feature enhancements.{% endif %}
- Upgrade packages are available at [enterprise.github.com](https://enterprise.github.com/releases) for supported versions. Verify the availability of the upgrade packages you will need to complete the upgrade. If a package is not available, contact {% data variables.contact.contact_ent_support %} for assistance.
- If you're using {% data variables.product.prodname_ghe_server %} Clustering, see "[Upgrading a cluster](/enterprise/{{ currentVersion }}/admin/guides/clustering/upgrading-a-cluster/)" in the {% data variables.product.prodname_ghe_server %} Clustering Guide for specific instructions unique to clustering.
- The release notes for {% data variables.product.prodname_ghe_server %} provide a comprehensive list of new features for every version of {% data variables.product.prodname_ghe_server %}. For more information, see the [releases page](https://enterprise.github.com/releases).
**注意:**
{% ifversion ghes < 3.3 %}- {% data variables.product.prodname_actions %}{% data variables.product.prodname_registry %}{% data variables.product.prodname_mobile %} {% data variables.product.prodname_GH_advanced_security %} 等功能在 {% data variables.product.prodname_ghe_server %} 3.0 或更高版本中可用 我们强烈建议升级到 3.0 或更高版本以利用关键安全更新错误修复和功能增强{% endif %}
- 为受支持版本提供的升级包位于 [enterprise.github.com](https://enterprise.github.com/releases)。 验证完成升级所需的升级包的可用性。 如果升级包不可用,请联系 {% data variables.contact.contact_ent_support %} 获得帮助。
- 如果您使用 {% data variables.product.prodname_ghe_server %} 集群,请参阅 {% data variables.product.prodname_ghe_server %} 集群指南中的“[升级集群](/enterprise/admin/guides/clustering/upgrading-a-cluster/)”,了解集群特有的说明。
- {% data variables.product.prodname_ghe_server %} 版本说明提供了 {% data variables.product.prodname_ghe_server %} 每一版本的新功能一览表。 更多信息请参阅[版本页面](https://enterprise.github.com/releases)。
{% endnote %}
## Recommendations
## 建议
- Include as few upgrades as possible in your upgrade process. For example, instead of upgrading from {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[2] }} to {{ enterpriseServerReleases.supported[1] }} to {{ enterpriseServerReleases.latest }}, you could upgrade from {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[2] }} to {{ enterpriseServerReleases.latest }}. Use the [{% data variables.enterprise.upgrade_assistant %}](https://support.github.com/enterprise/server-upgrade) to find the upgrade path from your current release version.
- If youre several versions behind, upgrade {% data variables.product.product_location %} as far forward as possible with each step of your upgrade process. Using the latest version possible on each upgrade allows you to take advantage of performance improvements and bug fixes. For example, you could upgrade from {% data variables.product.prodname_enterprise %} 2.7 to 2.8 to 2.10, but upgrading from {% data variables.product.prodname_enterprise %} 2.7 to 2.9 to 2.10 uses a later version in the second step.
- Use the latest patch release when upgrading. {% data reusables.enterprise_installation.enterprise-download-upgrade-pkg %}
- Use a staging instance to test the upgrade steps. For more information, see "[Setting up a staging instance](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-up-a-staging-instance/)."
- When running multiple upgrades, wait at least 24 hours between feature upgrades to allow data migrations and upgrade tasks running in the background to fully complete.
- Take a snapshot before upgrading your virtual machine. For more information, see "[Taking a snapshot](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server#taking-a-snapshot)."
- Ensure you have a recent, successful backup of your instance. For more information, see the [{% data variables.product.prodname_enterprise_backup_utilities %} README.md file](https://github.com/github/backup-utils#readme).
- 尽量减少升级过程中的升级次数。 例如,不要从 {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[2] }} 升级到 {{ enterpriseServerReleases.supported[1] }} 再升级到 {{ enterpriseServerReleases.latest }},而应从 {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[2] }} 升级到 {{ enterpriseServerReleases.latest }}。 使用 [{% data variables.enterprise.upgrade_assistant %}](https://support.github.com/enterprise/server-upgrade) 查找当前发行版的升级路径。
- 如果您的版本比最新版本低几个版本,请通过升级过程的每一步骤尽量将 {% data variables.product.product_location %} 升级为更高版本。 在每次升级时尽可能使用最新版本,这样一来您可以充分利用性能改进和错误修复。 例如,您可以从 {% data variables.product.prodname_enterprise %} 2.7 升级到 2.8 再升级到 2.10,但从 {% data variables.product.prodname_enterprise %} 2.7 升级到 2.9 再升级到 2.10 会在第二步中使用更高版本。
- 升级时使用最新补丁版本。 {% data reusables.enterprise_installation.enterprise-download-upgrade-pkg %}
- 使用暂存实例测试升级步骤。 更多信息请参阅“[设置暂存实例](/enterprise/admin/guides/installation/setting-up-a-staging-instance/)”。
- 如果运行多次升级,两次功能升级之间至少应间隔 24 小时,以便使数据迁移和后台升级任务能够彻底完成。
- 在升级虚拟机之前拍摄快照。 更多信息请参阅“[生成快照](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server#taking-a-snapshot)”。
- 确保您最近成功备份了实例。 更多信息请参阅 [{% data variables.product.prodname_enterprise_backup_utilities %} README.md 文件](https://github.com/github/backup-utils#readme)。
## Requirements
## 要求
- You must upgrade from a feature release that's **at most** two releases behind. For example, to upgrade to {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.latest }}, you must be on {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[1] }} or {{ enterpriseServerReleases.supported[2] }}.
- When upgrading using an upgrade package, schedule a maintenance window for {% data variables.product.prodname_ghe_server %} end users.
- 您必须从**最近**两个版本的功能版本开始升级。 例如,要升级到 {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.latest }},您必须使用 {% data variables.product.prodname_enterprise %} {{ enterpriseServerReleases.supported[1] }} 或 {{ enterpriseServerReleases.supported[2] }}。
- 使用升级包进行升级时,请为 {% data variables.product.prodname_ghe_server %} 最终用户安排维护时段。
- {% data reusables.enterprise_installation.hotpatching-explanation %}
- A hotpatch may require downtime if the affected services (like kernel, MySQL, or Elasticsearch) require a VM reboot or a service restart. You'll be notified when a reboot or restart is required. You can complete the reboot or restart at a later time.
- Additional root storage must be available when upgrading through hotpatching, as it installs multiple versions of certain services until the upgrade is complete. Pre-flight checks will notify you if you don't have enough root disk storage.
- When upgrading through hotpatching, your instance cannot be too heavily loaded, as it may impact the hotpatching process.
- Upgrading to {% data variables.product.prodname_ghe_server %} 2.17 migrates your audit logs from Elasticsearch to MySQL. This migration also increases the amount of time and disk space it takes to restore a snapshot. Before migrating, check the number of bytes in your Elasticsearch audit log indices with this command:
- 如果受影响的服务例如内核、MySQL 或 Elasticsearch需要重启 VM 或服务,热补丁可能需要停机一段时间。 需要重启时,系统会通知您。 您可以在稍后完成重启。
- 通过热补丁升级时,必须提供额外的根存储,因为热补丁会安装某些服务的多个版本,直至升级完成。 如果根磁盘存储空间不足,运行前检查将发出通知。
- 通过热补丁进行升级时,您的实例负荷不能过大,否则可能影响热补丁过程。
- 升级到 {% data variables.product.prodname_ghe_server %} 2.17 会将您的审核日志从 ElasticSearchElasticSearch 迁移到 MySQL。 这种迁移还会增加恢复快照所需的时长和磁盘空间大小。 迁移之前,请使用此命令检查 ElasticSearch 审核日志索引中的字节数:
``` shell
curl -s http://localhost:9201/audit_log/_stats/store | jq ._all.primaries.store.size_in_bytes
```
Use the number to estimate the amount of disk space the MySQL audit logs will need. The script also monitors your free disk space while the import is in progress. Monitoring this number is especially useful if your free disk space is close to the amount of disk space necessary for migration.
使用此数字估算 MySQL 审核日志将需要的磁盘空间大小。 该脚本还会在导入过程中监视可用磁盘空间大小。 在可用磁盘空间大小接近于迁移必需的磁盘空间大小时,监视此数字尤为重要。
{% data reusables.enterprise_installation.upgrade-hardware-requirements %}
## Next steps
## 后续步骤
After reviewing these recommendations and requirements, you can upgrade {% data variables.product.prodname_ghe_server %}. For more information, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrading-github-enterprise-server/)."
查看这些建议和要求后,您可以对 {% data variables.product.prodname_ghe_server %} 进行升级。 更多信息请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server/)。”

Просмотреть файл

@ -27,14 +27,14 @@ shortTitle: 升级 GHES
## 准备升级
1. 确定升级策略并选择要升级到的版本。 更多信息请参阅“[升级要求](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrade-requirements/)”,并参考 [{% data variables.enterprise.upgrade_assistant %}](https://support.github.com/enterprise/server-upgrade) 以查找当前发行版的升级路径。
1. 确定升级策略并选择要升级到的版本。 更多信息请参阅“[升级要求](/enterprise/admin/guides/installation/upgrade-requirements/)”,并参考 [{% data variables.enterprise.upgrade_assistant %}](https://support.github.com/enterprise/server-upgrade) 以查找当前发行版的升级路径。
1. 使用 {% data variables.product.prodname_enterprise_backup_utilities %} 创建全新的主实例备份。 更多信息请参阅 [{% data variables.product.prodname_enterprise_backup_utilities %} README.md 文件](https://github.com/github/backup-utils#readme)。
1. 如果 {% data variables.product.product_location %} 使用临时自托管运行器进行 {% data variables.product.prodname_actions %} 并且您已禁用自动更新,请将运行器升级到已升级实例将运行的运行器应用程序的版本。
1. 如果您要使用升级包进行升级,请为 {% data variables.product.prodname_ghe_server %} 最终用户排定维护窗口。 如果您要使用热补丁,则不需要使用维护模式。
{% note %}
**注**:维护窗口取决于所执行升级的类型。 使用热补丁进行升级通常不需要维护窗口。 有时需要重启,不过您可以在之后的某个时间重启。 按照 MAJOR.FEATURE.PATCH 的版本控制方案,使用升级包的补丁版本通常需要不到 5 分钟的停机时间。 包含数据迁移的功能版本需要的时间更长,具体视存储性能以及迁移的数据量而定。 更多信息请参阅“[启用和排定维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
**注**:维护窗口取决于所执行升级的类型。 使用热补丁进行升级通常不需要维护窗口。 有时需要重启,不过您可以在之后的某个时间重启。 按照 MAJOR.FEATURE.PATCH 的版本控制方案,使用升级包的补丁版本通常需要不到 5 分钟的停机时间。 包含数据迁移的功能版本需要的时间更长,具体视存储性能以及迁移的数据量而定。 更多信息请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
{% endnote %}
@ -72,7 +72,7 @@ shortTitle: 升级 GHES
{% data reusables.enterprise_installation.hotpatching-explanation %}
使用 {% data variables.enterprise.management_console %},您可以立即安装热补丁,也可以安排以后安装。 您可以使用管理 shell 的 `ghe-upgrade` 实用程序安装热补丁。 更多信息请参阅“[升级要求](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrade-requirements/)”。
使用 {% data variables.enterprise.management_console %},您可以立即安装热补丁,也可以安排以后安装。 您可以使用管理 shell 的 `ghe-upgrade` 实用程序安装热补丁。 更多信息请参阅“[升级要求](/enterprise/admin/guides/installation/upgrade-requirements/)”。
{% note %}
@ -81,7 +81,7 @@ shortTitle: 升级 GHES
{% ifversion ghes %}
- 如果 {% data variables.product.product_location %} 正在运行发布候选版本,则无法使用热补丁升级。
- {% endif %}无法在集群环境中使用 {% data variables.enterprise.management_console %} 安装热补丁。 要在集群环境中安装热补丁,请参阅“[升级集群](/enterprise/{{ currentVersion }}/admin/clustering/upgrading-a-cluster#upgrading-with-a-hotpatch)”。
- {% endif %}无法在集群环境中使用 {% data variables.enterprise.management_console %} 安装热补丁。 要在集群环境中安装热补丁,请参阅“[升级集群](/enterprise/admin/clustering/upgrading-a-cluster#upgrading-with-a-hotpatch)”。
{% endnote %}
@ -93,7 +93,7 @@ shortTitle: 升级 GHES
如果显示的升级目标是功能版本而不是修补程序版本,则无法使用 {% data variables.enterprise.management_console %} 来安装修补程序。 您必须改为使用管理 shell 安装热补丁。 更多信息请参阅“[使用管理 shell 安装热补丁](#installing-a-hotpatch-using-the-administrative-shell)”。
1. 启用自动更新。 更多信息请参阅“[启用自动更新](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-automatic-update-checks/)”。
1. 启用自动更新。 更多信息请参阅“[启用自动更新](/enterprise/admin/guides/installation/enabling-automatic-update-checks/)”。
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_management_console.updates-tab %}
@ -144,7 +144,7 @@ shortTitle: 升级 GHES
## 使用升级包升级
虽然您可以使用热补丁升级到功能系列中的最新补丁版本,但必须使用升级包升级到更新的功能版本。 例如,要从 `2.11.10` 升级到 `2.12.4`,您必须使用升级包,因为两者在不同的功能系列中。 更多信息请参阅“[升级要求](/enterprise/{{ currentVersion }}/admin/guides/installation/upgrade-requirements/)”。
虽然您可以使用热补丁升级到功能系列中的最新补丁版本,但必须使用升级包升级到更新的功能版本。 例如,要从 `2.11.10` 升级到 `2.12.4`,您必须使用升级包,因为两者在不同的功能系列中。 更多信息请参阅“[升级要求](/enterprise/admin/guides/installation/upgrade-requirements/)”。
### 使用升级包升级单个设备
@ -153,7 +153,7 @@ shortTitle: 升级 GHES
{% data reusables.enterprise_installation.ssh-into-instance %}
2. {% data reusables.enterprise_installation.enterprise-download-upgrade-pkg %} 选择适当的平台并复制升级包(*.pkg* 文件)的 URL。
{% data reusables.enterprise_installation.download-package %}
4. 启用维护模式并等待 {% data variables.product.prodname_ghe_server %} 实例上的所有活动进程完成。 更多信息请参阅“[启用和排定维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
4. 启用维护模式并等待 {% data variables.product.prodname_ghe_server %} 实例上的所有活动进程完成。 更多信息请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。
{% note %}
@ -197,7 +197,7 @@ shortTitle: 升级 GHES
{% endwarning %}
1. 在主实例上,启用维护模式并等待所有活动进程完成。 更多信息请参阅“[启用维护模式](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)”。
1. 在主实例上,启用维护模式并等待所有活动进程完成。 更多信息请参阅“[启用维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)”。
{% data reusables.enterprise_installation.replica-ssh %}
3. 在副本实例或者所有副本实例(如果您将多个副本实例作为 Geo-replication 的一部分运行)上,运行 `ghe-repl-stop` 以停止复制。
4. 按照“[使用升级包升级单个设备](#upgrading-a-single-appliance-with-an-upgrade-package)”中的说明升级主实例。
@ -239,7 +239,7 @@ shortTitle: 升级 GHES
回滚完成后,通过在所有副本上运行 `ghe-repl-start` 来重新启动复制。
更多信息请参阅“[命令行实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities/#ghe-upgrade)”。
更多信息请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities/#ghe-upgrade)”。
### 回滚功能版本

Просмотреть файл

@ -28,7 +28,7 @@ shortTitle: 回退身份验证
{% warning %}
**警告**:如果您禁用内置身份验证,则必须单独挂起不应具有实例访问权限的任何用户。 更多信息请参阅“[挂起和取消挂起用户](/enterprise/{{ currentVersion }}/admin/guides/user-management/suspending-and-unsuspending-users)”。
**警告**:如果您禁用内置身份验证,则必须单独挂起不应具有实例访问权限的任何用户。 更多信息请参阅“[挂起和取消挂起用户](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)”。
{% endwarning %}

Просмотреть файл

@ -15,7 +15,7 @@ permissions: Enterprise owners can use a recovery code to access an enterprise a
当身份验证配置错误或身份提供程序 (IdP) 问题阻止您使用 SSO 时,您可以使用恢复代码访问您的企业帐户。
要以这种方式访问您的企业帐户,您必须以前下载并存储了企业的恢复代码。 For more information, see "[Downloading your enterprise account's single sign-on recovery codes](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes)."
要以这种方式访问您的企业帐户,您必须以前下载并存储了企业的恢复代码。 更多信息请参阅“[下载企业帐户的单点登录恢复代码](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes)”。
{% data reusables.saml.recovery-code-caveats %}

Просмотреть файл

@ -1,7 +1,7 @@
---
title: Downloading your enterprise account's single sign-on recovery codes
title: 下载企业帐户的单点登录恢复代码
shortTitle: 下载恢复代码
intro: 'To ensure that you can access {% data variables.product.product_name %} if your identity provider (IdP) is unavailable, you should download your enterprise account''s single sign-on (SSO) recovery codes.'
intro: '为确保在身份提供程序 (IdP) 不可用时可以访问 {% data variables.product.product_name %} ,应下载企业帐户的单点登录 (SSO) 恢复代码。'
versions:
ghec: '*'
type: how_to
@ -17,7 +17,7 @@ permissions: Enterprise owners can download the SSO recovery codes for the enter
如果您的 IdP 不可用,您可以使用恢复代码登录并通过 {% data variables.product.product_location %} 访问您的企业。 更多信息请参阅“[在身份提供程序不可用时访问企业帐户](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/accessing-your-enterprise-account-if-your-identity-provider-is-unavailable)”。
If you did not save your recovery codes when you configured SSO, you can still access the codes from your enterprise's settings.
如果在配置 SSO 时未保存恢复代码,您仍然可以从企业的设置中访问这些代码。
@ -25,10 +25,10 @@ If you did not save your recovery codes when you configured SSO, you can still a
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.security-tab %}
1. Under{% ifversion oidc-for-emu %} either{% endif %} "Require SAML authentication"{% ifversion oidc-for-emu %} or "Require OIDC authentication"{% endif %}, click **Save your recovery codes**.{% ifversion oidc-for-emu %}
1. 在{% ifversion oidc-for-emu %}{% endif %} “Require SAML authentication需要 SAML 身份验证)”{% ifversion oidc-for-emu %} 或“Require OIDC authentication需要 OIDC 身份验证)”{% endif %} 下,单击 **Save your recovery codes保存恢复代码**{% ifversion oidc-for-emu %}
{% note %}
**Note:** OIDC SSO is only available for {% data variables.product.prodname_emus %}. 更多信息请参阅“[关于企业管理用户](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)”。
**注意:**OIDC SSO 仅适用于 {% data variables.product.prodname_emus %}。 更多信息请参阅“[关于企业管理用户](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)”。
{% endnote %}{% endif %}

Просмотреть файл

@ -1,7 +1,7 @@
---
title: About support for your IdP's Conditional Access Policy
shortTitle: Conditional access policy
intro: 'When your enterprise uses OIDC SSO, {% data variables.product.prodname_dotcom %} will validate access to your enterprise and its resources using your IdP''s Conditional Access Policy (CAP).'
title: 关于对 IdP 的条件访问策略的支持
shortTitle: 条件访问策略
intro: '当您的企业使用 OIDC SSO 时,{% data variables.product.prodname_dotcom %} 将使用 IdP 的条件访问策略 (CAP) 验证对您的企业及其资源的访问。'
product: '{% data reusables.gated-features.emus %}'
versions:
feature: oidc-for-emu
@ -14,34 +14,34 @@ topics:
{% data reusables.enterprise-accounts.oidc-beta-notice %}
## About support for Conditional Access Policies
## 关于对条件访问策略的支持
{% data reusables.enterprise-accounts.emu-cap-validates %}
CAP support is enabled automatically for any {% data variables.product.prodname_emu_enterprise %} that enables OIDC SSO and cannot be disabled. {% data variables.product.prodname_dotcom %} enforces your IdP's IP conditions but not device compliance conditions.
对于启用 OIDC SSO 的任何 {% data variables.product.prodname_emu_enterprise %}CAP 支持都会自动启用,并且无法禁用。 {% data variables.product.prodname_dotcom %} 强制执行 IdP 的 IP 条件,但不强制执行设备合规性条件。
For more information about using OIDC with {% data variables.product.prodname_emus %}, see "[Configuring OIDC for Enterprise Managed Users](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)" and "[Migrating from SAML to OIDC](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc)."
有关将 OIDC 与 {% data variables.product.prodname_emus %} 配合使用的更多信息,请参阅“[为企业托管用户配置 OIDC](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)”和“[从 SAML 迁移到 OIDC](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc)”。
## About using CAP with IP allow lists
## 关于将 CAP 与 IP 允许列表一起使用
We recommend disabling your enterprise account's IP allow list and relying on your IdP's CAP. If you enable IP allow lists for your enterprise and also make use of your IdP's CAP, both the IP allow list and CAP will be enforced. If either restriction rejects a user's IP address, the request fails. For more information about IP allow lists, see "[Enforcing policies for security settings in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)."
我们建议您禁用企业帐户的 IP 允许列表,并依靠 IdP 的 CAP。 如果您为企业启用 IP 允许列表,并且还利用 IdP 的 CAP则将强制执行 IP 允许列表和 CAP。 如果限制或拒绝用户的 IP 地址,则请求将失败。 有关 IP 允许列表的更多信息,请参阅“[在企业中实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)”。
## Considerations for integrations and automations
## 集成和自动化的注意事项
{% data variables.product.prodname_dotcom %} sends the originating IP address to your IdP for validation against your CAP. To make sure actions and apps are not blocked by your IdP's CAP, you will need to make changes to your configuration.
{% data variables.product.prodname_dotcom %} 将原始 IP 地址发送到您的 IdP以便对您的 CAP 进行验证。 要确保操作和应用程序未被 IdP 的 CAP 阻止,您需要对配置进行更改。
{% data reusables.enterprise-accounts.oidc-gei-warning %}
### {% data variables.product.prodname_actions %}
Actions that use a personal access token will likely be blocked by your IdP's CAP. We recommend that personal access tokens are created by a service account which is then exempted from IP controls in your IdP's CAP.
使用个人访问令牌的操作可能会被 IdP 的 CAP 阻止。 我们建议由服务帐户创建个人访问令牌,然后从 IdP CAP 中的 IP 控制中免除该帐户。
If you're unable to use a service account, another option for unblocking actions that use personal access tokens is to allow the IP ranges used by {% data variables.product.prodname_actions %}. 更多信息请参阅“[关于 GitHub 的 IP 地址](/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses)”。
如果无法使用服务帐户,则取消阻止使用个人访问令牌的操作的另一个选项是允许 {% data variables.product.prodname_actions %} 使用的 IP 范围。 更多信息请参阅“[关于 GitHub 的 IP 地址](/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses)”。
### {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %}
### {% data variables.product.prodname_github_apps %} {% data variables.product.prodname_oauth_apps %}
When {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %} make requests on a member's behalf, {% data variables.product.prodname_dotcom %} will send the IP address of the app's server to your IdP for validation. If the IP address of the app's server is not validated by your IdP's CAP, the request will fail.
当 {% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %} 代表成员发出请求时,{% data variables.product.prodname_dotcom %} 会将应用程序服务器的 IP 地址发送到您的 IdP 进行验证。 如果应用程序服务器的 IP 地址未通过 IdP 的 CAP 验证,则请求将失败。
You can contact the owners of the apps you want to use, ask for their IP ranges, and configure your IdP's CAP to allow access from those IP ranges. If you're unable to contact the owners, you can review your IdP sign-in logs to review the IP addresses seen in the requests, then allow-list those addresses.
您可以联系要使用的应用程序的所有者,询问他们的 IP 范围,并配置 IdP 的 CAP 以允许从这些 IP 范围进行访问。 如果您无法联系所有者,可以查看 IdP 登录日志以查看请求中看到的 IP 地址,然后允许列出这些地址。
You can also enable IP allow list configuration for installed {% data variables.product.prodname_github_apps %}. When enabled, all {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %} will continue working regardless of the originating IP address. 更多信息请参阅“[在企业中实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#allowing-access-by-github-apps)”。
您还可以为已安装的 {% data variables.product.prodname_github_apps %} 启用 IP 允许列表配置。 启用后,无论原始 IP 地址如何,所有 {% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %} 都将继续工作。 更多信息请参阅“[在企业中实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#allowing-access-by-github-apps)”。

Просмотреть файл

@ -4,7 +4,7 @@ shortTitle: OIDC for managed users
intro: 'You can automatically manage access to your enterprise account on {% data variables.product.prodname_dotcom %} by configuring OpenID Connect (OIDC) single sign-on (SSO) and enable support for your IdP''s Conditional Access Policy (CAP).'
product: '{% data reusables.gated-features.emus %}'
versions:
feature: oidc-for-emu
feature: 'oidc-for-emu'
topics:
- Accounts
- Authentication
@ -22,17 +22,19 @@ With {% data variables.product.prodname_emus %}, your enterprise uses your ident
You can adjust the lifetime of a session, and how often a {% data variables.product.prodname_managed_user %} needs to reauthenticate with your IdP, by changing the lifetime policy property of the ID tokens issued for {% data variables.product.prodname_dotcom %} from your IdP. The default lifetime is one hour. For more information, see "[Configurable token lifetimes in the Microsoft identity platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes)" in the Azure AD documentation.
If you currently use SAML SSO for authentication and would prefer to use OIDC and benefit from CAP support, you can follow a migration path. For more information, see "[Migrating from SAML to OIDC](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc)."
If you currently use SAML SSO for authentication and would prefer to use OIDC and benefit from CAP support, you can follow a migration path. For more information, see "[Migrating from SAML to OIDC](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc)."
{% data reusables.enterprise-accounts.oidc-gei-warning %}
## 身份提供程序支持
## Identity provider support
Support for OIDC is in public beta and available for customers using Azure Active Directory (Azure AD).
Support for OIDC is in public beta and available for customers using Azure Active Directory (Azure AD).
Each Azure AD tenant can support only one OIDC integration with {% data variables.product.prodname_emus %}. If you want to connect Azure AD to more than one enterprise on {% data variables.product.prodname_dotcom %}, use SAML instead. For more information, see "[Configuring SAML single sign-on for {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users)."
## Configuring OIDC for Enterprise Managed Users
1. 以新企业的设置用户身份登录 {% data variables.product.prodname_dotcom_the_website %} ,用户名为 **@<em>SHORT-CODE</em>_admin**。
1. Sign into {% data variables.product.prodname_dotcom_the_website %} as the setup user for your new enterprise with the username **@<em>SHORT-CODE</em>_admin**.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.security-tab %}
@ -42,6 +44,6 @@ Support for OIDC is in public beta and available for customers using Azure Activ
{% data reusables.enterprise-accounts.emu-azure-admin-consent %}
{% data reusables.enterprise-accounts.download-recovery-codes %}
## 启用预配
## Enabling provisioning
After you enable OIDC SSO, enable provisioning. 更多信息请参阅“[配置企业托管用户的 SCIM 预配](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)”。
After you enable OIDC SSO, enable provisioning. For more information, see "[Configuring SCIM provisioning for enterprise managed users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)."

Просмотреть файл

@ -1,5 +1,5 @@
---
title: Using Enterprise Managed Users for IAM
title: 对 IAM 使用企业托管用户
shortTitle: 企业托管用户
product: '{% data reusables.gated-features.emus %}'
intro: 您可以使用身份提供程序管理身份和访问权限,并预配只能参与您的企业的帐户。

Просмотреть файл

@ -4,7 +4,7 @@ shortTitle: Migrating from SAML to OIDC
intro: 'If you''re using SAML to authenticate members in your {% data variables.product.prodname_emu_enterprise %}, you can migrate to OpenID Connect (OIDC) and benefit from support for your IdP''s Conditional Access Policy.'
product: '{% data reusables.gated-features.emus %}'
versions:
feature: oidc-for-emu
feature: 'oidc-for-emu'
topics:
- Accounts
- Authentication
@ -31,13 +31,13 @@ If you're new to {% data variables.product.prodname_emus %} and haven't yet conf
{% endnote %}
1. Before you begin the migration, sign in to Azure and disable provisioning in the existing {% data variables.product.prodname_emu_idp_application %} application.
1. Sign into {% data variables.product.prodname_dotcom_the_website %} as the setup user for your enterprise with the username **@<em>SHORT-CODE</em>_admin**.
1. Sign into {% data variables.product.prodname_dotcom_the_website %} as the setup user for your enterprise with the username **@<em>SHORT-CODE</em>_admin**.
1. When prompted to continue to your identity provider, click **Use a recovery code** and sign in using one of your enterprise's recovery codes.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.security-tab %}
1. At the bottom of the page, next to "Migrate to OpenID Connect single sign-on", click **Configure with Azure**.
{% warning %}
1. At the bottom of the page, next to "Migrate to OpenID Connect single sign-on", click **Configure with Azure**.
{% warning %}
**Warning:** The migration can take up to an hour, and it is important that no users are provisioned during the migration. You can confirm if the migration is still in progress by returning to your enterprise's security settings page; if "Require SAML authentication" is still checked, the migration is still in progress.
@ -47,12 +47,12 @@ If you're new to {% data variables.product.prodname_emus %} and haven't yet conf
1. Read both warnings and click to continue.
{% data reusables.enterprise-accounts.emu-azure-admin-consent %}
1. In a new tab or window, while signed in as the setup user on {% data variables.product.prodname_dotcom_the_website %}, create a personal access token with the **admin:enterprise** scope and **no expiration** and copy it to your clipboard. For more information about creating a new token, see "[Creating a personal access token](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users#creating-a-personal-access-token)."
1. In the settings for the {% data variables.product.prodname_emu_idp_oidc_application %} application in Azure Portal, under "Tenant URL", type `https://api.github.com/scim/v2/enterprises/YOUR_ENTERPRISE`, replacing YOUR_ENTERPRISE with the name of your enterprise account.
1. In the settings for the {% data variables.product.prodname_emu_idp_oidc_application %} application in Azure Portal, under "Tenant URL", type `https://api.github.com/scim/v2/enterprises/YOUR_ENTERPRISE`, replacing YOUR_ENTERPRISE with the name of your enterprise account.
For example, if your enterprise account's URL is `https://github.com/enterprises/octo-corp`, the name of the enterprise account is `octo-corp`.
1. Under "Secret token", paste the personal access token with the **admin:enterprise** scope that you created earlier.
1. To test the configuration, click **Test Connection**.
1. To save your changes, at the top of the form, click **Save**.
1. In Azure Portal, copy the users and groups from the old {% data variables.product.prodname_emu_idp_application %} application to the new {% data variables.product.prodname_emu_idp_oidc_application %} application.
1. Test your configuration by provisioning a single new user.
1. If your test is successful, start provisioning for all users by clicking **Start provisioning**.
1. If your test is successful, start provisioning for all users by clicking **Start provisioning**.

Просмотреть файл

@ -113,7 +113,7 @@ LDAP 是用于访问和维护目录信息服务的常用应用程序协议,是
{% endnote %}
借助 LDAP 同步,您可以将 {% data variables.product.prodname_ghe_server %} 用户和团队成员关系与建立的 LDAP 组同步。 这样,您可以在 LDAP 服务器中为用户建立基于角色的权限控制,而不用在 {% data variables.product.prodname_ghe_server %} 中手动建立。 更多信息请参阅“[创建团队](/enterprise/{{ currentVersion }}/admin/guides/user-management/creating-teams#creating-teams-with-ldap-sync-enabled)”。
借助 LDAP 同步,您可以将 {% data variables.product.prodname_ghe_server %} 用户和团队成员关系与建立的 LDAP 组同步。 这样,您可以在 LDAP 服务器中为用户建立基于角色的权限控制,而不用在 {% data variables.product.prodname_ghe_server %} 中手动建立。 更多信息请参阅“[创建团队](/enterprise/admin/guides/user-management/creating-teams#creating-teams-with-ldap-sync-enabled)”。
要启用 LDAP 同步,请在您的 LDAP 设置中选择 **Synchronize Emails同步电子邮件**、**Synchronize SSH Keys同步 SSH 密钥)**或 **Synchronize GPG Keys同步 GPG 密钥)**
@ -187,8 +187,8 @@ LDAP 是用于访问和维护目录信息服务的常用应用程序协议,是
除非[启用 LDAP 同步](#enabling-ldap-sync),否则 LDAP 帐户的变更将不会自动与 {% data variables.product.prodname_ghe_server %} 同步。
* 要使用新的 LDAP 管理员组,必须在 {% data variables.product.prodname_ghe_server %} 上手动升级和降级用户,以反映 LDAP 中的变更。
* 要在 LDAP 管理员组中添加或移除 LDAP 帐户,请[在 {% data variables.product.prodname_ghe_server %} 上升级或降级帐户](/enterprise/{{ currentVersion }}/admin/guides/user-management/promoting-or-demoting-a-site-administrator)。
* 要移除 LDAP 帐户,请[挂起 {% data variables.product.prodname_ghe_server %} 帐户](/enterprise/{{ currentVersion }}/admin/guides/user-management/suspending-and-unsuspending-users)。
* 要在 LDAP 管理员组中添加或移除 LDAP 帐户,请[在 {% data variables.product.prodname_ghe_server %} 上升级或降级帐户](/enterprise/admin/guides/user-management/promoting-or-demoting-a-site-administrator)。
* 要移除 LDAP 帐户,请[挂起 {% data variables.product.prodname_ghe_server %} 帐户](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)。
### 手动同步 LDAP 帐户
@ -200,10 +200,10 @@ LDAP 是用于访问和维护目录信息服务的常用应用程序协议,是
{% data reusables.enterprise_site_admin_settings.admin-tab %}
5. 在“LDAP”下单击 **Sync now**,使用您的 LDAP 服务器中的数据手动更新帐户。 ![LDAP Sync now 按钮](/assets/images/enterprise/site-admin-settings/ldap-sync-now-button.png)
您也可以[使用 API 触发手动同步](/enterprise/{{ currentVersion }}/user/rest/reference/enterprise-admin#ldap)。
您也可以[使用 API 触发手动同步](/enterprise/user/rest/reference/enterprise-admin#ldap)。
## 撤销 {% data variables.product.product_location %} 的权限
如果[启用 LDAP 同步](#enabling-ldap-sync),移除用户的 LDAP 凭据将在下一次同步操作后挂起他们的帐户。
如果**未**启用 LDAP 同步,您必须在移除 LDAP 凭据后手动挂起 {% data variables.product.prodname_ghe_server %} 帐户。 更多信息请参阅“[挂起和取消挂起用户](/enterprise/{{ currentVersion }}/admin/guides/user-management/suspending-and-unsuspending-users)”。
如果**未**启用 LDAP 同步,您必须在移除 LDAP 凭据后手动挂起 {% data variables.product.prodname_ghe_server %} 帐户。 更多信息请参阅“[挂起和取消挂起用户](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)”。

Просмотреть файл

@ -137,7 +137,7 @@ You can enable or disable SAML authentication for {% data variables.product.prod
![Screenshot of "Enable encrypted assertions" checkbox within management console's "Authentication" section](/assets/images/help/saml/management-console-enable-encrypted-assertions.png)
{%- endif %}
1. In the **Single sign-on URL** field, type the HTTP or HTTPS endpoint on your IdP for single sign-on requests. This value is provided by your IdP configuration. If the host is only available from your internal network, you may need to [configure {% data variables.product.product_location %} to use internal nameservers](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-dns-nameservers/).
1. In the **Single sign-on URL** field, type the HTTP or HTTPS endpoint on your IdP for single sign-on requests. This value is provided by your IdP configuration. If the host is only available from your internal network, you may need to [configure {% data variables.product.product_location %} to use internal nameservers](/enterprise/admin/guides/installation/configuring-dns-nameservers/).
![Screenshot of text field for single sign-on URL](/assets/images/enterprise/management-console/saml-single-sign-url.png)
1. Optionally, in the **Issuer** field, type your SAML issuer's name. This verifies the authenticity of messages sent to {% data variables.product.product_location %}.

Просмотреть файл

@ -80,7 +80,7 @@ topics:
| `NameID` | 是 | 持久用户标识符。 可以使用任意持久名称标识符格式。 {% ifversion ghec %}如果将企业与 {% data variables.product.prodname_emus %} 一起使用, {% endif %}{% data variables.product.product_name %} 将规范化 `NameID` 元素以用作用户名,除非提供了替代断言之一。 更多信息请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。 |
| `SessionNotOnOrAfter` | 否 | {% data variables.product.product_name %} 使关联的会话失效的日期。 失效后,此人必须再次进行身份验证才能访问 {% ifversion ghec or ghae %}企业的资源{% elsif ghes %}{% data variables.product.product_location %}{% endif %}。 更多信息请参阅“[会话持续时间和超时](#session-duration-and-timeout)”。 |
{%- ifversion ghes or ghae %}
| `administrator` | 无|当值为 `true` 时,{% data variables.product.product_name %} 会自动将用户提升为 {% ifversion ghes %}站点管理员{% elsif ghae %}企业所有者{% endif %}。 任何其他值或不存在的值都将降级帐户并删除管理访问权限。 | | `username` | 无 | {% data variables.product.product_location %} 的用户名。 |
| `administrator` | 无|当值为 `true` 时,{% data variables.product.product_name %} 会自动将用户提升为 {% ifversion ghes %}站点管理员{% elsif ghae %}企业所有者{% endif %}。 Setting this attribute to anything but `true` will result in demotion, as long as the value is not blank. Omitting this attribute or leaving the value blank will not change the role of the user. | | `username` | 无 | {% data variables.product.product_location %} 的用户名。 |
{%- endif %}
| `full_name` |无| {% ifversion ghec %}如果为企业配置 SAML SSO 并使用 {% data variables.product.prodname_emus %},则{% else %}{% endif %} 用户的全名显示在用户的个人资料页上。 | | `emails` | 无| 用户的电子邮件地址。{% ifversion ghes or ghae %} 您可以指定多个地址。{% endif %}{% ifversion ghec or ghes %} 如果在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间同步许可证使用情况,{% data variables.product.prodname_github_connect %} 将使用 `emails` 跨产品识别唯一用户。 更多信息请参阅“[在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间同步许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。{% endif %} | | `public_keys` |无| {% ifversion ghec %}如果为企业配置 SAML SSO 并使用 {% data variables.product.prodname_emus %},则为{% else %}{% endif %} 用户的公有 SSH 密钥。 您可以指定多个键。 | | `gpg_keys` |无| {% ifversion ghec %}如果为企业配置 SAML SSO 并使用 {% data variables.product.prodname_emus %},则{% else %}{% endif %}为用户的 GPG 密钥。 您可以指定多个键。 |

Просмотреть файл

@ -124,7 +124,7 @@ aws ec2 run-instances \
If this is a production instance, we strongly recommend allocating an Elastic IP (EIP) and associating it with the instance before proceeding to {% data variables.product.prodname_ghe_server %} configuration. Otherwise, the public IP address of the instance will not be retained after instance restarts. For more information, see "[Allocating an Elastic IP Address](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-allocating)" and "[Associating an Elastic IP Address with a Running Instance](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating)" in the Amazon documentation.
Both primary and replica instances should be assigned separate EIPs in production High Availability configurations. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)."
Both primary and replica instances should be assigned separate EIPs in production High Availability configurations. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)."
## Configuring the {% data variables.product.prodname_ghe_server %} instance

Просмотреть файл

@ -1010,7 +1010,7 @@ Action | Description
| `repo.code_scanning_analysis_deleted` | Code scanning analysis for a repository was deleted. For more information, see "[Delete a code scanning analysis from a repository](/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository)."
| `repo.change_merge_setting` | Pull request merge options were changed for a repository.
| `repo.clear_actions_settings` | A repository administrator cleared {% data variables.product.prodname_actions %} policy settings for a repository.
| `repo.config` | A repository administrator blocked force pushes. For more information, see [Blocking force pushes to a repository](/enterprise/{{ currentVersion }}/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/) to a repository.
| `repo.config` | A repository administrator blocked force pushes. For more information, see [Blocking force pushes to a repository](/enterprise/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/) to a repository.
{%- ifversion fpt or ghec %}
| `repo.config.disable_collaborators_only` | The interaction limit for collaborators only was disabled. For more information, see "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)."
| `repo.config.disable_contributors_only` | The interaction limit for prior contributors only was disabled in a repository. For more information, see "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)."

Просмотреть файл

@ -1,7 +1,7 @@
---
title: Displaying IP addresses in the audit log for your enterprise
intro: You can display the source IP address for events in your enterprise's audit log.
shortTitle: IP addresses in audit log
title: 在企业的审核日志中显示 IP 地址
intro: 您可以在企业的审核日志中显示事件的源 IP 地址。
shortTitle: 审核日志中的 IP 地址
permissions: Enterprise owners can display IP addresses in the audit log for an enterprise.
versions:
feature: enterprise-audit-log-ip-addresses
@ -16,43 +16,43 @@ topics:
{% note %}
**Note:** Display of IP addresses in the enterprise audit log is currently in public beta and is subject to change.
**注意:** 企业审核日志中 IP 地址的显示目前处于公开测试阶段,可能会发生更改。
{% endnote %}
## About display of IP addresses in the audit log
## 关于在审核日志中显示 IP 地址
By default, {% data variables.product.product_name %} does not display the source IP address for events in your enterprise's audit log. Optionally, to ensure compliance and respond to threats, you can display the full IP address associated with the actor responsible for each event. Actors are typically users, but can also be apps or integrations.
默认情况下,{% data variables.product.product_name %} 不会在企业的审核日志中显示事件的源 IP 地址。 (可选)为了确保合规性并响应威胁,您可以显示与负责每个事件的参与者关联的完整 IP 地址。 参与者通常是用户,但也可以是应用程序或集成。
You are responsible for meeting any legal obligations that accompany the viewing or storage of IP addresses displayed within your enterprise's audit log.
您负责履行查看或存储企业审核日志中显示的 IP 地址时附带的任何法律义务。
If you choose to display IP addresses, the IP addresses only appear in your enterprise's audit log. IP addresses will not appear for events in the audit logs for individual organizations owned by your enterprise. For more information about organization audit logs, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)."
如果选择显示 IP 地址,则 IP 地址仅显示在企业的审核日志中。 对于企业拥有的各个组织的审核日志中的事件,不会显示 IP 地址。 有关组织审核日志的详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)”。
You can display IP addresses in the audit log regardless of which authentication method you use for your enterprise on {% data variables.product.product_location %}. 更多信息请参阅“[关于企业的身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。
您可以在审核日志中显示 IP 地址,而不管您在 {% data variables.product.product_location %} 上对企业使用哪种身份验证方法。 更多信息请参阅“[关于企业的身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。
When anyone creates an account on {% data variables.product.product_location %}, the person agrees to {% data variables.product.company_short %}'s collection of basic information about connections to {% data variables.product.company_short %}'s services, including source IP address. For more information, see "[GitHub Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#usage-information)."
当任何人在 {% data variables.product.product_location %} 上创建帐户时,此人同意 {% data variables.product.company_short %} 收集有关连接到 {% data variables.product.company_short %} 服务的基本信息,包括源 IP 地址。 更多信息请参阅“[GitHub 隐私声明](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#usage-information)”。
## Events that display IP addresses in the audit log
## 在审核日志中显示 IP 地址的事件
{% data variables.product.product_name %} displays an IP address in the audit log when a member of the enterprise interacts with a resource owned by your enterprise or an organization in your enterprise. For example, you will see an IP address for audited events involving an internal or private repository owned by an organization in your enterprise, or resources associated with those repositories, such as an issue, pull request, action, or project.
在企业成员与企业或企业中的组织拥有的资源交互时,{% data variables.product.product_name %} 会在审核日志中显示 IP 地址。 例如,您将看到涉及企业中组织拥有的内部或私有存储库或这些存储库关联资源的已审核事件的 IP 地址,例如议题、拉取请求、操作或项目。
If members of your enterprise access {% data variables.product.product_location %} with personal accounts that they manage, because you do not use {% data variables.product.prodname_emus %}, {% data variables.product.product_name %} does not display an event or IP address in the audit log for the following actions.
如果企业成员使用他们管理的个人帐户访问 {% data variables.product.product_location %},因为您不使用 {% data variables.product.prodname_emus %},所以 {% data variables.product.product_name %} 不会在审核日志中显示以下操作的事件或 IP 地址。
- Authentication to {% data variables.product.product_location %}
- Interactions with a resource owned by the personal account, including a repository, gist, or project
- Interactions with a public repository owned by an organization in your enterprise
- 向 {% data variables.product.product_location %} 验证
- 与个人帐户拥有的资源(包括存储库、要点或项目)的交互
- 与企业中组织拥有的公共存储库的交互
## Enabling display of IP addresses in the audit log
## 启用在审核日志中显示 IP 地址
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.audit-log-tab %}
1. Under "Audit log", click **Source IP disclosure**.
1. 在“Audit log审核日志”下单击 **Source IP disclosure源 IP 披露)**
![Screenshot of "Source IP disclosure" tab](/assets/images/help/enterprises/audit-log-source-ip-disclosure-tab.png)
1. Under "Disclose actor IP addresses in audit logs", select **Enable source IP disclosure**.
!["源 IP 披露"选项卡屏幕截图](/assets/images/help/enterprises/audit-log-source-ip-disclosure-tab.png)
1. 在“Disclose actor IP addresses in audit logs在审核日志中披露参与者 IP 地址)”下,选择 **Enable source IP disclosure启用源 IP 披露)**
![Screenshot of checkbox to enable display of IP addresses in audit logs](/assets/images/help/enterprises/audit-log-enable-source-ip-disclosure-checkbox.png)
![启用在审核日志中显示 IP 地址的复选框屏幕截图](/assets/images/help/enterprises/audit-log-enable-source-ip-disclosure-checkbox.png)
1. 单击 **Save保存**
After you enable the feature, you can access the audit log to view events that include IP addresses. 更多信息请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)”。
启用该功能后,可以访问审核日志以查看包含 IP 地址的事件。 更多信息请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)”。

Просмотреть файл

@ -19,8 +19,8 @@ shortTitle: GitHub Enterprise API
利用 API您可以自动处理多种管理任务。 包含以下例子:
{% ifversion ghes %}
- 对 {% data variables.enterprise.management_console %} 进行更改。 更多信息请参阅“[{% data variables.enterprise.management_console %}](/enterprise/{{ currentVersion }}/user/rest/reference/enterprise-admin#management-console)”。
- 配置 LDAP 同步。 更多信息请参阅“[LDAP](/enterprise/{{ currentVersion }}/user/rest/reference/enterprise-admin#ldap)”。{% endif %}
- 对 {% data variables.enterprise.management_console %} 进行更改。 更多信息请参阅“[{% data variables.enterprise.management_console %}](/enterprise/user/rest/reference/enterprise-admin#management-console)”。
- 配置 LDAP 同步。 更多信息请参阅“[LDAP](/enterprise/user/rest/reference/enterprise-admin#ldap)”。{% endif %}
- 收集关于企业的统计信息。 更多信息请参阅“[管理统计](/rest/reference/enterprise-admin#admin-stats)”。
- 管理企业帐户。 更多信息请参阅“[企业帐户](/graphql/guides/managing-enterprise-accounts)”。

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Creating a pre-receive hook script
intro: Use pre-receive hook scripts to create requirements for accepting or rejecting a push based on the contents.
title: 创建预接收挂钩脚本
intro: 使用预接收挂钩脚本创建基于内容来接受或拒绝推送的要求。
miniTocMaxHeadingLevel: 3
redirect_from:
- /enterprise/admin/developer-workflow/creating-a-pre-receive-hook-script
@ -13,146 +13,140 @@ topics:
- Enterprise
- Policies
- Pre-receive hooks
shortTitle: Pre-receive hook scripts
shortTitle: 预接收挂钩脚本
---
You can see examples of pre-receive hooks for {% data variables.product.prodname_ghe_server %} in the [`github/platform-samples` repository](https://github.com/github/platform-samples/tree/master/pre-receive-hooks).
## Writing a pre-receive hook script
A pre-receive hook script executes in a pre-receive hook environment on {% data variables.product.product_location %}. When you create a pre-receive hook script, consider the available input, output, exit status, and environment variables.
您可以在 [`github/platform-samples` 仓库](https://github.com/github/platform-samples/tree/master/pre-receive-hooks)中查看 {% data variables.product.prodname_ghe_server %} 的预接收挂钩示例。
### Input (`stdin`)
After a push occurs and before any refs are updated for the remote repository, the `git-receive-pack` process on {% data variables.product.product_location %} invokes the pre-receive hook script. Standard input for the script, `stdin`, is a string containing a line for each ref to update. Each line contains the old object name for the ref, the new object name for the ref, and the full name of the ref.
## 编写预接收挂钩脚本
预接收挂钩脚本在 {% data variables.product.product_location %} 上的预接收挂钩环境中执行。 创建预接收挂钩脚本时,请考虑可用的输入、输出、退出状态和环境变量。
### 输入 (`stdin`)
推送发生后,在为远程仓库更新任何引用之前,在 {% data variables.product.product_location %} 上的 `git-receive-pack` 进程将调用预接收挂钩脚本。 脚本 `stdin` 的标准输入是一个字符串,对每个要更新的 ref 包含一行。 每行都包含 ref 的旧对象名称、引用的新对象名称和 ref 的全名。
```
<old-value> SP <new-value> SP <ref-name> LF
```
This string represents the following arguments.
此字符串表示以下参数。
| Argument | Description |
| :------------- | :------------- |
| `<old-value>` | Old object name stored in the ref.<br> When you create a new ref, the value is 40 zeroes. |
| `<new-value>` | New object name to be stored in the ref.<br> When you delete a ref, the value is 40 zeroes. |
| `<ref-name>` | The full name of the ref. |
| 参数 | 描述 |
|:------------------- |:------------------------------------------------ |
| `<old-value>` | 存储在 ref 中的旧对象名称。<br>当您创建新的 ref 时,值是 40 个零。 |
| `<new-value>` | 要存储在 ref 中的新对象名称。<br>当您删除 ref 时,值是 40 个零。 |
| `<ref-name>` | ref 的全名。 |
For more information about `git-receive-pack`, see "[git-receive-pack](https://git-scm.com/docs/git-receive-pack)" in the Git documentation. For more information about refs, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in *Pro Git*.
有关 `git-receive-pack` 的更多信息,请参阅 Git 文档中的“[git-receive-pack](https://git-scm.com/docs/git-receive-pack)”。 有关 ref 的更多信息,请参阅 *Pro Git* 中的“[Git 引用](https://git-scm.com/book/en/v2/Git-Internals-Git-References)”。
### Output (`stdout`)
### 输出 (`stdout`)
The standard output for the script, `stdout`, is passed back to the client. Any `echo` statements will be visible to the user on the command line or in the user interface.
脚本 `stdout` 的标准输出传回客户端。 任何 `echo` 语句将在命令行或用户界面上对用户可见。
### Exit status
### 退出状态
The exit status of a pre-receive script determines if the push will be accepted.
预接收脚本的退出状态决定是否接受推送。
| Exit-status value | Action |
| :- | :- |
| 0 | The push will be accepted. |
| non-zero | The push will be rejected. |
| Exit-status 值 | 操作 |
|:------------- |:------ |
| 0 | 将接受推送。 |
| 非零 | 将拒绝推送。 |
### Environment variables
### 环境变量
In addition to the standard input for your pre-receive hook script, `stdin`, {% data variables.product.prodname_ghe_server %} makes the following variables available in the Bash environment for your script's execution. For more information about `stdin` for your pre-receive hook script, see "[Input (`stdin`)](#input-stdin)."
除了预接收挂钩脚本 `stdin` 的标准输入外,,{% data variables.product.prodname_ghe_server %} 在 Bash 环境中为您的脚本执行提供以下变量。 有关预接收钩脚本 `stdin` 的更多信息,请参阅“[输入 (`stdin`)](#input-stdin)”。
Different environment variables are available to your pre-receive hook script depending on what triggers the script to run.
预接收挂钩脚本可使用不同的环境变量,具体取决于触发脚本运行的因素。
- [Always available](#always-available)
- [Available for pushes from the web interface or API](#available-for-pushes-from-the-web-interface-or-api)
- [Available for pull request merges](#available-for-pull-request-merges)
- [Available for pushes using SSH authentication](#available-for-pushes-using-ssh-authentication)
- [始终可用](#always-available)
- [可用于从 Web 界面或 API 推送](#available-for-pushes-from-the-web-interface-or-api)
- [可用于拉取请求合并](#available-for-pull-request-merges)
- [可用于使用 SSH 身份验证的推送](#available-for-pushes-using-ssh-authentication)
#### Always available
#### 始终可用
The following variables are always available in the pre-receive hook environment.
以下变量在预接收挂钩环境中始终可用。
| Variable | Description | Example value |
| :- | :- | :- |
| <pre>$GIT_DIR</pre> | Path to the remote repository on the instance | /data/user/repositories/a/ab/<br>a1/b2/34/100001234/1234.git |
| <pre>$GIT_PUSH_OPTION_COUNT</pre> | The number of push options that were sent by the client with `--push-option`. For more information, see "[git-push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt)" in the Git documentation. | 1 |
| <pre>$GIT\_PUSH\_OPTION\_<em>N</em></pre> | Where _N_ is an integer starting at 0, this variable contains the push option string that was sent by the client. The first option that was sent is stored in `GIT_PUSH_OPTION_0`, the second option that was sent is stored in `GIT_PUSH_OPTION_1`, and so on. For more information about push options, see "[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)" in the Git documentation. | abcd |{% ifversion ghes %}
| <pre>$GIT_USER_AGENT</pre> | User-agent string sent by the Git client that pushed the changes | git/2.0.0{% endif %}
| <pre>$GITHUB_REPO_NAME</pre> | Name of the repository being updated in _NAME_/_OWNER_ format | octo-org/hello-enterprise |
| <pre>$GITHUB_REPO_PUBLIC</pre> | Boolean representing whether the repository being updated is public | <ul><li>true: Repository's visibility is public</li><li>false: Repository's visibility is private or internal</li></ul>
| <pre>$GITHUB_USER_IP</pre> | IP address of client that initiated the push | 192.0.2.1 |
| <pre>$GITHUB_USER_LOGIN</pre> | Username for account that initiated the push | octocat |
| 变量 | 描述 | 示例值 |
|:------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------ |
| <pre>$GIT_DIR</pre> | 实例上远程仓库的路径 | /data/user/repositories/a/ab/<br>a1/b2/34/100001234/1234.git |
| <pre>$GIT_PUSH_OPTION_COUNT</pre> | 由客户端使用 `--pub-option` 发送的推送选项数量。 更多信息请参阅 Git 文档中的“[git-push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt)”。 | 1 |
| <pre>$GIT\_PUSH\_OPTION\_<em>N</em></pre> | 其中 _N_ 是一个从 0 开始的整数,此变量包含客户端发送的推送选项字符串。 发送的第一个选项存储在 `GIT_PUSH_OPTION_0` 中,发送的第二个选项存储在 `GIT_PUSH_OPTION_1` 中,依此类推。 关于推送选项的更多信息,请参阅 Git 文档中的“[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)”。 | abcd |{% ifversion ghes %}
| <pre>$GIT_USER_AGENT</pre> | 推送更改的 Git 客户端发送的 user-agent 字符串。 | git/2.0.0{% endif %}
| <pre>$GITHUB_REPO_NAME</pre> | _NAME_/_OWNER_ 格式更新的仓库名称 | octo-org/hello-enterprise |
| <pre>$GITHUB_REPO_PUBLIC</pre> | 表示更新的仓库是否公开的布尔值 | <ul><li>true仓库的可见性是公开的</li><li>false仓库的可见性是私密或内部的</li></ul> |
| <pre>$GITHUB_USER_IP</pre> | 发起推送的客户端 IP 地址 | 192.0.2.1 |
| <pre>$GITHUB_USER_LOGIN</pre> | 发起推送的帐户的用户名 | octocat |
#### Available for pushes from the web interface or API
#### 可用于从 Web 界面或 API 推送
The `$GITHUB_VIA` variable is available in the pre-receive hook environment when the ref update that triggers the hook occurs via either the web interface or the API for {% data variables.product.prodname_ghe_server %}. The value describes the action that updated the ref.
当触发挂钩的 ref 更新通过 {% data variables.product.prodname_ghe_server %} 的 Web 界面或 API 进行时,`$GITHUB_VIA` 变量可用于预接收挂钩环境。 该值描述了更新 ref 的操作。
| 值 | 操作 | 更多信息 |
|:-------------------------- |:-------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------- |
| <pre>auto-merge deployment api</pre> | 通过 API 创建的部署自动合并基础分支 | REST API 文档中的“[创建部署](/rest/reference/deployments#create-a-deployment)” |
| <pre>blob#save</pre> | 在 Web 界面中更改文件的内容 | "[编辑文件](/repositories/working-with-files/managing-files/editing-files)" |
| <pre>branch merge api</pre> | 通过 API 合并分支 | REST API 文档中的“[合并分支](/rest/reference/branches#merge-a-branch)” |
| <pre>branches page delete button</pre> | 在 Web 界面中删除分支 | “[在仓库内创建和删除分支](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#deleting-a-branch)” |
| <pre>git refs create api</pre> | 通过 API 创建 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#create-a-reference)” |
| <pre>git refs delete api</pre> | 通过 API 删除 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#delete-a-reference)” |
| <pre>git refs update api</pre> | 通过 API 更新 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#update-a-reference)” |
| <pre>git repo contents api</pre> | 通过 API 更改文件的内容 | REST API 文档中的“[创建或更新文件内容](/rest/reference/repos#create-or-update-file-contents)” |
| Value | Action | More information |
| :- | :- | :- |
| <pre>auto-merge deployment api</pre> | Automatic merge of the base branch via a deployment created with the API | "[Create a deployment](/rest/reference/deployments#create-a-deployment)" in the REST API documentation |
| <pre>blob#save</pre> | Change to a file's contents in the web interface | "[Editing files](/repositories/working-with-files/managing-files/editing-files)" |
| <pre>branch merge api</pre> | Merge of a branch via the API | "[Merge a branch](/rest/reference/branches#merge-a-branch)" in the REST API documentation |
| <pre>branches page delete button</pre> | Deletion of a branch in the web interface | "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#deleting-a-branch)" |
| <pre>git refs create api</pre> | Creation of a ref via the API | "[Git database](/rest/reference/git#create-a-reference)" in the REST API documentation |
| <pre>git refs delete api</pre> | Deletion of a ref via the API | "[Git database](/rest/reference/git#delete-a-reference)" in the REST API documentation |
| <pre>git refs update api</pre> | Update of a ref via the API | "[Git database](/rest/reference/git#update-a-reference)" in the REST API documentation |
| <pre>git repo contents api</pre> | Change to a file's contents via the API | "[Create or update file contents](/rest/reference/repos#create-or-update-file-contents)" in the REST API documentation |
{%- ifversion ghes %}
| `merge ` | Merge of a pull request using auto-merge | "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" |
|
`merge` | 使用 auto-merge 合并拉取请求 | "[自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" |
{%- endif %}
| <pre>merge base into head</pre> | Update of the topic branch from the base branch when the base branch requires strict status checks (via **Update branch** in a pull request, for example) | "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)" |
| <pre>pull request branch delete button</pre> | Deletion of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request)" |
| <pre>pull request branch undo button</pre> | Restoration of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#restoring-a-deleted-branch)" |
| <pre>pull request merge api</pre> | Merge of a pull request via the API | "[Pulls](/rest/reference/pulls#merge-a-pull-request)" in the REST API documentation |
| <pre>pull request merge button</pre> | Merge of a pull request in the web interface | "[Merging a pull request](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request#merging-a-pull-request-on-github)" |
| <pre>pull request revert button</pre> | Revert of a pull request | "[Reverting a pull request](/github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request)" |
| <pre>releases delete button</pre> | Deletion of a release | "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#deleting-a-release)" |
| <pre>stafftools branch restore</pre> | Restoration of a branch from the site admin dashboard | "[Site admin dashboard](/admin/configuration/site-admin-dashboard#repositories)" |
| <pre>tag create api</pre> | Creation of a tag via the API | "[Git database](/rest/reference/git#create-a-tag-object)" in the REST API documentation |
| <pre>slumlord (#<em>SHA</em>)</pre> | Commit via Subversion | "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)" |
| <pre>web branch create</pre> | Creation of a branch via the web interface | "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)" |
| <pre>merge base into head</pre> |当基本分支需要严格的状态检查时,从基本分支更新主题分支(例如,通过拉取请求中的**更新分支**|"[关于受保护分支](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)"| | <pre>pull request branch delete button</pre> |从 Web 界面中的拉取请求中删除主题分支|"[在拉取请求中删除和恢复分支](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request)"| | <pre>pull request branch undo button</pre> |从 Web 界面中的拉取请求恢复主题分支|"[在拉取请求中删除和恢复分支](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#restoring-a-deleted-branch)"| | <pre>pull request merge api</pre> |通过 API 合并拉取请求|REST API 文档中的“[拉取](/rest/reference/pulls#merge-a-pull-request)”| | <pre>pull request merge button</pre> |在 Web 界面中合并拉取请求|"[合并拉取请求](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request#merging-a-pull-request-on-github)"| | <pre>拉取请求还原按钮</pre> |还原拉取请求|"[](/github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request)"还原拉取请求"| | <pre>releases delete button</pre> |删除发行版|"[管理存储库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository#deleting-a-release)" | | <pre>stafftools branch restore</pre> |从站点管理仪表板还原分支|"[站点管理仪表板](/admin/configuration/site-admin-dashboard#repositories)" | | <pre>tag create api</pre> |通过 API |创建标签|REST API 文档中的“[Git 数据库](/rest/reference/git#create-a-tag-object)”| | <pre>slumlord (#<em>SHA</em>)</pre> |通过 Subversion 提交| "[支持 Subversion 客户端](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)" | | <pre>web branch create</pre> | 通过 web 接口创建分支 | "[在仓库中创建和删除分支](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)|
#### Available for pull request merges
#### 可用于拉取请求合并
The following variables are available in the pre-receive hook environment when the push that triggers the hook is a push due to the merge of a pull request.
当触发挂钩的推送由于拉取请求请求合并而成为推送时,以下变量在预接收挂钩环境中可用。
| Variable | Description | Example value |
| :- | :- | :- |
| <pre>$GITHUB_PULL_REQUEST_AUTHOR_LOGIN</pre> | Username of account that authored the pull request | octocat |
| <pre>$GITHUB_PULL_REQUEST_HEAD</pre> | The name of the pull request's topic branch, in the format `USERNAME:BRANCH` | <nobr>octocat:fix-bug</nobr> |
| <pre>$GITHUB_PULL_REQUEST_BASE</pre> | The name of the pull request's base branch, in the format `USERNAME:BRANCH` | octocat:main |
| 变量 | 描述 | 示例值 |
|:-------------------------- |:---------------------------------- |:---------------------------- |
| <pre>$GITHUB_PULL_REQUEST_AUTHOR_LOGIN</pre> | 编写拉取请求的帐户的用户名 | octocat |
| <pre>$GITHUB_PULL_REQUEST_HEAD</pre> | 拉取请求的主题分支的名称,格式为 `USERNAME:BRANCH` | <nobr>octocat:fix-bug</nobr> |
| <pre>$GITHUB_PULL_REQUEST_BASE</pre> | 拉取请求的基础分支的名称,格式为 `USERNAME:BRANCH` | octocat:main |
#### Available for pushes using SSH authentication
#### 可用于使用 SSH 身份验证的推送
| Variable | Description | Example value |
| :- | :- | :- |
| <pre>$GITHUB_PUBLIC_KEY_FINGERPRINT</pre> | The public key fingerprint for the user who pushed the changes | a1:b2:c3:d4:e5:f6:g7:h8:i9:j0:k1:l2:m3:n4:o5:p6 |
| 变量 | 描述 | 示例值 |
|:-------------------------- |:------------ |:----------------------------------------------- |
| <pre>$GITHUB_PUBLIC_KEY_FINGERPRINT</pre> | 推送更改的用户的公钥指纹 | a1:b2:c3:d4:e5:f6:g7:h8:i9:j0:k1:l2:m3:n4:o5:p6 |
## Setting permissions and pushing a pre-receive hook to {% data variables.product.prodname_ghe_server %}
## 设置权限并将预接收挂钩推送到 {% data variables.product.prodname_ghe_server %}
A pre-receive hook script is contained in a repository on {% data variables.product.product_location %}. A site administrator must take into consideration the repository permissions and ensure that only the appropriate users have access.
{% data variables.product.product_location %} 上的仓库中包含预接收挂钩脚本。 站点管理员必须考虑仓库权限,确保只有适当的用户才能访问。
We recommend consolidating hooks to a single repository. If the consolidated hook repository is public, the `README.md` can be used to explain policy enforcements. Also, contributions can be accepted via pull requests. However, pre-receive hooks can only be added from the default branch. For a testing workflow, forks of the repository with configuration should be used.
我们建议将挂钩合并到单个仓库。 如果统一的挂钩仓库是公共的,则可以使用 `README.md` 来解释策略强制实施。 此外,也可以通过拉取请求接受贡献。 但是,只能从默认分支添加预接收挂钩。 对于测试工作流程,应使用具有配置的仓库的分支。
1. For Mac users, ensure the scripts have execute permissions:
1. 对于 Mac 用户,确保脚本具有执行权限:
```shell
$ sudo chmod +x <em>SCRIPT_FILE.sh</em>
```
For Windows users, ensure the scripts have execute permissions:
对于 Windows 用户,确保脚本具有执行权限:
```shell
git update-index --chmod=+x <em>SCRIPT_FILE.sh</em>
```
2. Commit and push to the designated repository for pre-receive hooks on {% data variables.product.product_location %}.
2. 在 {% data variables.product.product_location %} 提交并推送到指定的预接收挂钩仓库。
```shell
$ git commit -m "<em>YOUR COMMIT MESSAGE</em>"
$ git push
```
3. [Create the pre-receive hook](/enterprise/{{ currentVersion }}/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance/#creating-pre-receive-hooks) on the {% data variables.product.prodname_ghe_server %} instance.
3. 在 {% data variables.product.prodname_ghe_server %} 实例上[创建预接收挂钩](/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance/#creating-pre-receive-hooks)。
## Testing pre-receive scripts locally
You can test a pre-receive hook script locally before you create or update it on {% data variables.product.product_location %}. One method is to create a local Docker environment to act as a remote repository that can execute the pre-receive hook.
## 在本地测试预接收脚本
在 {% data variables.product.product_location %} 上创建或更新预接收挂钩脚本之前,您可以在本地对其进行测试。 一种方法是创建本地 Docker 环境以充当可以执行预接收挂钩的远程仓库。
{% data reusables.linux.ensure-docker %}
2. Create a file called `Dockerfile.dev` containing:
2. 创建一个名为 `Dockerfile.dev` 的文件,其中包含:
```dockerfile
FROM gliderlabs/alpine:3.3
@ -174,7 +168,7 @@ You can test a pre-receive hook script locally before you create or update it on
CMD ["/usr/sbin/sshd", "-D"]
```
3. Create a test pre-receive script called `always_reject.sh`. This example script will reject all pushes, which is useful for locking a repository:
3. 创建一个名为 `always_reject.sh` 的测试预接收脚本。 此示例脚本将拒绝所有推送,这对于锁定仓库非常有用:
```
#!/usr/bin/env bash
@ -183,13 +177,13 @@ You can test a pre-receive hook script locally before you create or update it on
exit 1
```
4. Ensure the `always_reject.sh` scripts has execute permissions:
4. 确保 `always_reject.sh` 脚本具有执行权限:
```shell
$ chmod +x always_reject.sh
```
5. From the directory containing `Dockerfile.dev`, build an image:
5. 从包含 `Dockerfile.dev` 的目录中,构建一个镜像:
```shell
$ docker build -f Dockerfile.dev -t pre-receive.dev .
@ -212,32 +206,32 @@ You can test a pre-receive hook script locally before you create or update it on
> Successfully built dd8610c24f82
```
6. Run a data container that contains a generated SSH key:
6. 运行包含生成的 SSH 密钥的数据容器:
```shell
$ docker run --name data pre-receive.dev /bin/true
```
7. Copy the test pre-receive hook `always_reject.sh` into the data container:
7. 将测试预接收挂钩 `always_reject.sh` 复制到数据容器中:
```shell
$ docker cp always_reject.sh data:/home/git/test.git/hooks/pre-receive
```
8. Run an application container that runs `sshd` and executes the hook. Take note of the container id that is returned:
8. 启动一个运行 `sshd` 的应用程序容器并执行挂钩。 记下返回的容器 ID
```shell
$ docker run -d -p 52311:22 --volumes-from data pre-receive.dev
> 7f888bc700b8d23405dbcaf039e6c71d486793cad7d8ae4dd184f4a47000bc58
```
9. Copy the generated SSH key from the data container to the local machine:
9. 将生成的 SSH 密钥从数据容器复制到本地计算机:
```shell
$ docker cp data:/home/git/.ssh/id_ed25519 .
```
10. Modify the remote of a test repository and push to the `test.git` repo within the Docker container. This example uses `git@github.com:octocat/Hello-World.git` but you can use any repository you want. This example assumes your local machine (127.0.0.1) is binding port 52311, but you can use a different IP address if docker is running on a remote machine.
10. 修改远程测试仓库并将其推送到 Docker 容器中的 `test.git` 仓库。 此示例使用了 `git@github.com:octocat/Hello-World.git`,但您可以使用想要的任何仓库。 此示例假定您的本地计算机 (127.0.0.1) 绑定了端口 52311但如果 docker 在远程计算机上运行,则可以使用不同的 IP 地址。
```shell
$ git clone git@github.com:octocat/Hello-World.git
@ -256,7 +250,7 @@ You can test a pre-receive hook script locally before you create or update it on
> error: failed to push some refs to 'git@192.168.99.100:test.git'
```
Notice that the push was rejected after executing the pre-receive hook and echoing the output from the script.
请注意,在执行预接收挂钩并回显脚本中的输出后,将拒绝推送。
## Further reading
- "[Customizing Git - An Example Git-Enforced Policy](https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy)" from the *Pro Git website*
## 延伸阅读
- 来自 *Pro Git 网站*的“[自定义 Git - Git 强制实施策略示例](https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy)”

Просмотреть файл

@ -28,4 +28,4 @@ shortTitle: 设置成员资格可见性
{% data reusables.enterprise-accounts.options-tab %}
3. 在“Default organization membership visibility默认组织成员可见性”下使用下拉菜单然后单击 **Private私密**或 **Public公开**。 ![包含用于将默认组织成员关系可见性配置为公开或私密的选项的下拉菜单](/assets/images/enterprise/site-admin-settings/default-organization-membership-visibility-drop-down-menu.png)
4. 或者,为了阻止成员将他们的成员关系可见性改为非默认值,也可以选择 **Enforce on organization members**。 ![Checkbox to enforce the default setting on all members](/assets/images/enterprise/site-admin-settings/enforce-default-org-membership-visibility-setting.png){% ifversion ghes %}
5. 如果您想在所有现有成员中强制使用新的可见性设置,请使用 `ghe-org-membership-update` 命令行实用程序。 更多信息请参阅“[命令行实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-org-membership-update)”。{% endif %}
5. 如果您想在所有现有成员中强制使用新的可见性设置,请使用 `ghe-org-membership-update` 命令行实用程序。 更多信息请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities#ghe-org-membership-update)”。{% endif %}

Просмотреть файл

@ -18,7 +18,7 @@ Teams are central to many of {% data variables.product.prodname_dotcom %}'s coll
A team can represent a group within your company or include people with certain interests or expertise. For example, a team of accessibility experts on {% data variables.product.product_location %} could comprise of people from several different departments. Teams can represent functional concerns that complement a company's existing divisional hierarchy.
Organizations can create multiple levels of nested teams to reflect a company or group's hierarchy structure. For more information, see "[About teams](/enterprise/{{ currentVersion }}/user/articles/about-teams/#nested-teams)."
Organizations can create multiple levels of nested teams to reflect a company or group's hierarchy structure. For more information, see "[About teams](/enterprise/user/articles/about-teams/#nested-teams)."
## Creating a team

Просмотреть файл

@ -24,19 +24,19 @@ shortTitle: 需要 2FA
## 强制执行双重身份验证的要求
在可以要求组织成员和外部协作者使用双重身份验证之前,您必须为自己的个人帐户[启用双重身份验证](/enterprise/{{ currentVersion }}/user/articles/securing-your-account-with-two-factor-authentication-2fa/)。
在可以要求组织成员和外部协作者使用双重身份验证之前,您必须为自己的个人帐户[启用双重身份验证](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa/)。
{% warning %}
**警告:**
- 如果您要求双重身份验证,则不使用双重身份验证的成员和外部协作者(包括自动程序帐户)将从组织中移除,并失去对仓库的访问权限,包括他们的私有仓库分叉。 如果他们在被从组织移除的三个月内为个人帐户启用双重身份验证,您可以[恢复他们的访问权限和设置](/enterprise/{{ currentVersion }}/user/articles/reinstating-a-former-member-of-your-organization)。
- 如果您要求双重身份验证,则不使用双重身份验证的成员和外部协作者(包括自动程序帐户)将从组织中移除,并失去对仓库的访问权限,包括他们的私有仓库分叉。 如果他们在被从组织移除的三个月内为个人帐户启用双重身份验证,您可以[恢复他们的访问权限和设置](/enterprise/user/articles/reinstating-a-former-member-of-your-organization)。
- 如果需要双重身份验证,则禁用双重身份验证的组织成员或外部协作者将被自动从组织中移除。
- 如果您是某个要求双重身份验证的组织的唯一所有者,则在不为组织禁用双重身份验证要求的情况下,您将无法为个人帐户禁用双重身份验证。
{% endwarning %}
在您要求使用双重身份验证之前,我们建议通知组织成员和外部协作者,并要求他们为帐户设置双重身份验证。 您可以在组织的 People 选项卡上[查看成员和外部协作者是否已使用双重身份验证](/enterprise/{{ currentVersion }}/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)。
在您要求使用双重身份验证之前,我们建议通知组织成员和外部协作者,并要求他们为帐户设置双重身份验证。 您可以在组织的 People 选项卡上[查看成员和外部协作者是否已使用双重身份验证](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)。
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
@ -46,7 +46,7 @@ shortTitle: 需要 2FA
## 查看从您的组织中删除的人员
要查看在您要求双重身份验证时因为不合规而被从组织中自动移除的用户,您可以在搜索字段中使用 `reason:two_factor_requirement_non_compliance` [搜索审核日志](/enterprise/{{ currentVersion }}/admin/guides/installation/searching-the-audit-log/)。
要查看在您要求双重身份验证时因为不合规而被从组织中自动移除的用户,您可以在搜索字段中使用 `reason:two_factor_requirement_non_compliance` [搜索审核日志](/enterprise/admin/guides/installation/searching-the-audit-log/)。
{% data reusables.audit_log.octicon_icon %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
@ -65,7 +65,7 @@ shortTitle: 需要 2FA
## 延伸阅读
- "[查看组织中的用户是否已启用双重身份验证](/enterprise/{{ currentVersion }}/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)"
- "[使用双重身份验证 (2FA) 确保帐户的安全](/enterprise/{{ currentVersion }}/user/articles/securing-your-account-with-two-factor-authentication-2fa)"
- "[恢复组织的前成员](/enterprise/{{ currentVersion }}/user/articles/reinstating-a-former-member-of-your-organization)"
- "[恢复前外部协作者对您的组织的访问权限](/enterprise/{{ currentVersion }}/user/articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization)"
- "[查看组织中的用户是否已启用双重身份验证](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)"
- "[使用双重身份验证 (2FA) 确保帐户的安全](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa)"
- "[恢复组织的前成员](/enterprise/user/articles/reinstating-a-former-member-of-your-organization)"
- “[恢复前外部协作者对组织的访问权限](/enterprise/user/articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization)”

Просмотреть файл

@ -113,7 +113,7 @@ shortTitle: 审计用户
`created` 限定符可根据事件发生的时间筛选操作。
- 使用 `YYYY-MM-DD` 格式定义日期,即年后面是月份,之后是具体日期。
- 日期支持[大于、小于和范围限定符](/enterprise/{{ currentVersion }}/user/articles/search-syntax)。 例如:
- 日期支持[大于、小于和范围限定符](/enterprise/user/articles/search-syntax)。 例如:
* `created:2014-07-08` 会找到在 2014 年 7 月 8 日发生的所有事件。
* `created:>=2014-07-01` 会找到在 2014 年 7 月 8 日或之后发生的所有事件。
* `created:<=2014-07-01` 会找到在 2014 年 7 月 8 日或之前发生的所有事件。

Просмотреть файл

@ -20,7 +20,7 @@ shortTitle: 用户安全最佳实践
双重身份验证 (2FA) 是登录网站和服务的一种方法,需要使用密码以外的第二重因素来验证身份。 对于 {% data variables.product.prodname_ghe_server %},第二重因素为用户智能手机上的应用程序生成的一次性验证码。 我们强烈建议要求您的用户在他们的帐户上启用双重身份验证。 使用双重身份验证时,只有用户的密码和智能手机同时被盗,他们的帐户才会遭到入侵。
有关如何配置双重身份验证的更多信息,请参阅“[关于双重身份验证](/enterprise/{{ currentVersion }}/user/articles/about-two-factor-authentication)”。
有关如何配置双重身份验证的更多信息,请参阅“[关于双重身份验证](/enterprise/user/articles/about-two-factor-authentication)”。
{% endif %}
## 需要密码管理器

Просмотреть файл

@ -22,7 +22,7 @@ shortTitle: Manage administrators
{% endtip %}
For information about promoting a user to an organization owner, see the `ghe-org-admin-promote` section of "[Command-line utilities](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-org-admin-promote)."
For information about promoting a user to an organization owner, see the `ghe-org-admin-promote` section of "[Command-line utilities](/enterprise/admin/guides/installation/command-line-utilities#ghe-org-admin-promote)."
## Promoting a user from the enterprise settings
@ -47,16 +47,16 @@ For information about promoting a user to an organization owner, see the `ghe-or
## Promoting a user from the command line
1. [SSH](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
2. Run [ghe-user-promote](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-user-promote) with the username to promote.
1. [SSH](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
2. Run [ghe-user-promote](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-promote) with the username to promote.
```shell
$ ghe-user-promote <em>username</em>
```
## Demoting a site administrator from the command line
1. [SSH](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
2. Run [ghe-user-demote](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-user-demote) with the username to demote.
1. [SSH](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/) into your appliance.
2. Run [ghe-user-demote](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-demote) with the username to demote.
```shell
$ ghe-user-demote <em>username</em>
```

Просмотреть файл

@ -69,7 +69,7 @@ As when suspending a user, unsuspending a user takes effect immediately. The use
## Suspending a user from the command line
{% data reusables.enterprise_installation.ssh-into-instance %}
2. Run [ghe-user-suspend](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-user-suspend) with the username to suspend.
2. Run [ghe-user-suspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-suspend) with the username to suspend.
```shell
$ ghe-user-suspend <em>username</em>
```
@ -94,7 +94,7 @@ You can create a custom message that suspended users will see when attempting to
## Unsuspending a user from the command line
{% data reusables.enterprise_installation.ssh-into-instance %}
2. Run [ghe-user-unsuspend](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-user-unsuspend) with the username to unsuspend.
2. Run [ghe-user-unsuspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-unsuspend) with the username to unsuspend.
```shell
$ ghe-user-unsuspend <em>username</em>
```

Просмотреть файл

@ -27,7 +27,7 @@ shortTitle: 从另一个 VCS 导入
```shell
$ git-import-rewrite --flavor hg --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
```
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/{{ currentVersion }}/user/articles/creating-a-new-repository)。
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/user/articles/creating-a-new-repository)。
{% data reusables.command_line.switching_directories_procedural %}
7. 将导入的仓库推送到 {% data variables.product.prodname_ghe_server %}
```shell
@ -47,7 +47,7 @@ shortTitle: 从另一个 VCS 导入
```shell
$ git-import-rewrite --flavor svn --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
```
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/{{ currentVersion }}/user/articles/creating-a-new-repository)。
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/user/articles/creating-a-new-repository)。
{% data reusables.command_line.switching_directories_procedural %}
7. 将导入的仓库推送到 {% data variables.product.prodname_ghe_server %}
```shell
@ -67,7 +67,7 @@ shortTitle: 从另一个 VCS 导入
```shell
$ git-import-rewrite --flavor tfs --authors /<em>PATH</em>/<em>AUTHORS-MAP-FILE</em>.csv /<em>PATH</em>/<em>REPO-NAME</em>.git
```
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/{{ currentVersion }}/user/articles/creating-a-new-repository)。
5. 如果您还没有创建,请[在 {% data variables.product.prodname_ghe_server %} 上创建新的空仓库](/enterprise/user/articles/creating-a-new-repository)。
{% data reusables.command_line.switching_directories_procedural %}
7. 将导入的仓库推送到 {% data variables.product.prodname_ghe_server %}
```shell
@ -76,4 +76,4 @@ shortTitle: 从另一个 VCS 导入
## 延伸阅读
- "[命令行实用程序](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities/#import-and-export)"
- "[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities/#import-and-export)"

Просмотреть файл

@ -57,4 +57,10 @@ shortTitle: 测试 SSH 连接
{% endlinux %}
{% note %}
**注意:** 远程命令应以代码 1 退出。
{% endnote %}
4. 验证生成的消息包含您的用户名。 如果收到“权限被拒绝”消息,请参阅[“错误:权限被拒绝(公钥)”](/articles/error-permission-denied-publickey)。

Просмотреть файл

@ -155,10 +155,10 @@ shortTitle: 安全日志
| `add_member` | 当 {% data variables.product.product_name %} 用户{% ifversion fpt or ghec %}[被邀请协作使用](/articles/inviting-collaborators-to-a-personal-repository){% else %}[被授权协作使用](/articles/inviting-collaborators-to-a-personal-repository){% endif %}仓库时触发。 |
| `add_topic` | 当仓库所有者向仓库[添加主题](/articles/classifying-your-repository-with-topics)时触发。 |
| `archived` | 当仓库所有者[存档仓库](/articles/about-archiving-repositories)时触发。{% ifversion ghes %}
| `config.disable_anonymous_git_access` | 当公共仓库中[禁用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 |
| `config.enable_anonymous_git_access` | 当公共仓库中[启用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 |
| `config.lock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被锁定](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。 |
| `config.unlock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被解锁](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。{% endif %}
| `config.disable_anonymous_git_access` | 当公共仓库中[禁用匿名 Git 读取权限](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 |
| `config.enable_anonymous_git_access` | 当公共仓库中[启用匿名 Git 读取权限](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 |
| `config.lock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被锁定](/enterprise/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。 |
| `config.unlock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被解锁](/enterprise/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。{% endif %}
| `create` | 在[创建新仓库](/articles/creating-a-new-repository)时触发。 |
| `destroy` | 当[仓库被删除](/articles/deleting-a-repository)时触发。{% ifversion fpt or ghec %}
| `禁用` | 当仓库被禁用(例如,因[资金不足](/articles/unlocking-a-locked-account))时触发。{% endif %}{% ifversion fpt or ghec %}

Просмотреть файл

@ -42,7 +42,6 @@ topics:
### {% data variables.product.prodname_codespaces %} 预构建的计费
{% data reusables.codespaces.prebuilds-beta-note %}
{% data reusables.codespaces.billing-for-prebuilds %}

Просмотреть файл

@ -26,14 +26,12 @@ topics:
{% data reusables.dependabot.beta-security-and-version-updates %}
{% data reusables.dependabot.enterprise-enable-dependabot %}
仓库的 {% data variables.product.prodname_dependabot_alerts %} 选项卡列出所有打开和关闭的 {% data variables.product.prodname_dependabot_alerts %}{% ifversion fpt or ghec or ghes > 3.2 %} 以及对应的 {% data variables.product.prodname_dependabot_security_updates %}{% endif %}。 可以{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5638 %} 按程序包、生态系统或清单筛选警报。 您可以{% endif %} 对警报列表进行排序,单击特定警报以获取更多详细信息。 更多信息请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %} 警报](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)”。
仓库的 {% data variables.product.prodname_dependabot_alerts %} 选项卡列出所有打开和关闭的 {% data variables.product.prodname_dependabot_alerts %}{% ifversion fpt or ghec or ghes > 3.2 %} 以及对应的 {% data variables.product.prodname_dependabot_security_updates %}{% endif %}。 可以{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5638 %} 按程序包、生态系统或清单筛选警报。 您可以{% endif %} 对警报列表进行排序,单击特定警报以获取更多详细信息。 {% ifversion dependabot-bulk-alerts %}您还可以逐个关闭或重新打开警报,也可以一次选择多个警报。{% else %}您还可以关闭或重新打开警报。 {% endif %} 更多信息请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)”。
{% ifversion fpt or ghec or ghes > 3.2 %}
您可以为使用 {% data variables.product.prodname_dependabot_alerts %} 和依赖关系图的任何仓库启用自动安全更新。 更多信息请参阅“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)“。
{% endif %}
{% data reusables.repositories.dependency-review %}
{% ifversion fpt or ghec or ghes > 3.2 %}
## 关于仓库中有漏洞的依赖项的更新
@ -70,18 +68,20 @@ topics:
![显示警报的并带有"有漏洞的调用"标签的警报详细信息页面屏幕截图](/assets/images/help/repository/review-calls-to-vulnerable-functions.png)
更多信息请参阅下面的“[查看和修复有漏洞的依赖项](#reviewing-and-fixing-vulnerable-dependencies)”。
更多信息请参阅下面的“[查看和修复警报](#reviewing-and-fixing-alerts)”。
{% endif %}
## 查看有漏洞的依赖项
## 查看 {% data variables.product.prodname_dependabot_alerts %}
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5638 %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-dependabot-alerts %}
1. (可选)若要筛选警报,请选择 **Repository仓库**、**Package**、**Ecosystem生态系统**或 **Manifest清单**下拉菜单,然后单击要应用的筛选器。 您还可以在搜索栏中键入过滤条件。 例如 `ecosystem:npm``has:patch`。 要对警报进行排序,请选择 **Sort排序**下拉菜单,然后单击要作为排序依据的选项。 ![{% data variables.product.prodname_dependabot_alerts %} 选项卡中过滤器和排序菜单的屏幕截图](/assets/images/help/graphs/dependabot-alerts-filters.png)
1. 单击要查看的警报。 ![在警报列表中选择的警报](/assets/images/help/graphs/click-alert-in-alerts-list-ungrouped.png)
1. (可选)若要筛选警报,请选择 **Repository仓库**、**Package**、**Ecosystem生态系统**或 **Manifest清单**下拉菜单,然后单击要应用的筛选器。 您还可以在搜索栏中键入过滤条件。 例如 `ecosystem:npm``has:patch`。 要对警报进行排序,请选择 **Sort排序**下拉菜单,然后单击要作为排序依据的选项。{% ifversion dependabot-bulk-alerts %} ![Screenshot of the filter and sort menus in the {% data variables.product.prodname_dependabot_alerts %} tab](/assets/images/help/graphs/dependabot-alerts-filters-checkbox.png){% else %}
![Screenshot of the filter and sort menus in the {% data variables.product.prodname_dependabot_alerts %} tab](/assets/images/enterprise/3.5/dependabot/dependabot-alerts-filters.png){% endif %}
2. 单击要查看的警报。{% ifversion dependabot-bulk-alerts %} ![Alert selected in list of alerts](/assets/images/help/graphs/click-alert-in-alerts-list-checkbox.png){% else %}
![Alert selected in list of alerts](/assets/images/enterprise/3.5/dependabot/click-alert-in-alerts-list-ungrouped.png){% endif %}
{% else %}
{% data reusables.repositories.navigate-to-repo %}
@ -90,7 +90,7 @@ topics:
1. 单击您想要查看的警报。 ![在警报列表中选择的警报](/assets/images/help/graphs/click-alert-in-alerts-list.png)
{% endif %}
## 查看和修复有漏洞的依赖项
## 查看和修复警报
请务必确保所有依赖项都没有任何安全漏洞。 当 {% data variables.product.prodname_dependabot %} 发现依赖项中的漏洞时,应评估项目的暴露水平,并确定要采取哪些补救措施来保护应用程序。
@ -106,7 +106,7 @@ topics:
### 修复有漏洞的依赖项
1. 查看警报的详细信息。 更多信息请参阅“[查看有漏洞的依赖项](#viewing-vulnerable-dependencies)”(上文)。
1. 查看警报的详细信息。 更多信息请参阅“[查看 {% data variables.product.prodname_dependabot_alerts %}](#viewing-dependabot-alerts)”(上文)。
{% ifversion fpt or ghec or ghes > 3.2 %}
1. 如果启用了 {% data variables.product.prodname_dependabot_security_updates %} ,则可能存在指向将修复依赖项的拉取请求的链接。 或者,可以单击警报详细信息页面顶部的 **创建 {% data variables.product.prodname_dependabot %} 安全更新**以创建拉取请求。 ![创建 {% data variables.product.prodname_dependabot %} 安全更新按钮](/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png)
1. (可选)如果不使用 {% data variables.product.prodname_dependabot_security_updates %},则可以使用页面上的信息来决定要升级到的依赖项版本,并创建拉取请求以将依赖项更新到安全版本。
@ -119,22 +119,56 @@ topics:
{% data variables.product.prodname_dependabot %} 提出的每个拉取请求都包含可用于控制 {% data variables.product.prodname_dependabot %} 的命令的相关信息。 更多信息请参阅“[管理依赖项更新的拉取请求](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)”。
{% endif %}
### 忽略 {% data variables.product.prodname_dependabot_alerts %}
## 忽略 {% data variables.product.prodname_dependabot_alerts %}
{% tip %}
**提示:** 您只能关闭打开的警报。
{% endtip %}
如果计划大量工作来升级依赖项,或者决定不需要修复警报,则可以忽略警报。 通过忽略已评估的警报,可以更轻松地在新警报出现时对其进行分类。
1. 查看警报的详细信息。 更多信息请参阅“[查看有漏洞的依赖项](#viewing-vulnerable-dependencies)”(上文)。
1. 查看警报的详细信息。 更多信息请参阅“[查看有漏洞的依赖项](#viewing-dependabot-alerts)”(上文)。
1. 选择“Dismiss忽略”下拉列表然后单击忽略警报的原因。{% ifversion reopen-dependabot-alerts %} 未修复的已忽略警报可以稍后重新打开。{% endif %} ![选择通过 "Dismiss忽略"下拉菜单忽略警报的原因](/assets/images/help/repository/dependabot-alert-dismiss-drop-down-ungrouped.png)
{% ifversion dependabot-bulk-alerts %}
### 一次忽略多个警报
1. 查看打开的 {% data variables.product.prodname_dependabot_alerts %}。 更多信息请参阅“[查看 {% data variables.product.prodname_dependabot_alerts %}](/en/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts#viewing-dependabot-alerts)”。
2. (可选)通过选择下拉菜单,然后单击要应用的筛选器来筛选警报列表。 您还可以在搜索栏中键入过滤条件。
3. 在每个警报标题的左侧,选择要忽略的警报。 ![突出显示了复选框的打开警报的屏幕截图](/assets/images/help/graphs/select-multiple-alerts.png)
4. (可选)在警报列表的顶部,选择页面上的所有警报。 ![选择的所有已打开警报的屏幕截图](/assets/images/help/graphs/select-all-alerts.png)
5. 选择“Dismiss alerts忽略警报”下拉列表然后单击忽略警报的原因。 ![突出显示了“"忽略警报"下拉列表的已打开警报页面屏幕截图](/assets/images/help/graphs/dismiss-multiple-alerts.png)
{% endif %}
{% ifversion reopen-dependabot-alerts %}
## 查看和更新已关闭的警报
{% tip %}
**提示:** 您只能重新打开以前已忽略的警报。 无法重新打开已修复的已关闭警报。
{% endtip %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-dependabot-alerts %}
1. 要仅查看已关闭的警报,请单击 **Closed已关闭**。 ![显示"已关闭"选项的屏幕截图](/assets/images/help/repository/dependabot-alerts-closed.png)
1. 单击要查看或更新的警报。 ![显示突出显示的 dependabot 警报的屏幕截图](/assets/images/help/repository/dependabot-alerts-select-closed-alert.png)
2. (可选)如果警报已消除,并且您希望重新打开它,请单击 **Reopen重新打开**。 ![显示"重新打开"按钮的屏幕截图](/assets/images/help/repository/reopen-dismissed-alert.png)
1. 要仅查看已关闭的警报,请单击 **Closed已关闭**。{% ifversion dependabot-bulk-alerts %} ![Screenshot showing the "Closed" option](/assets/images/help/repository/dependabot-alerts-closed-checkbox.png){% else %}
![Screenshot showing the "Closed" option](/assets/images/help/repository/dependabot-alerts-closed.png){% endif %}
1. 单击要查看或更新的警报。{% ifversion dependabot-bulk-alerts %} ![Screenshot showing a highlighted dependabot alert](/assets/images/help/repository/dependabot-alerts-select-closed-alert-checkbox.png){% else %}
![Screenshot showing a highlighted dependabot alert](/assets/images/help/repository/dependabot-alerts-select-closed-alert.png){% endif %}
2. (可选)如果警报已消除,并且您希望重新打开它,请单击 **Reopen重新打开**。 无法重新打开已修复的警报。 ![显示"重新打开"按钮的屏幕截图](/assets/images/help/repository/reopen-dismissed-alert.png)
{% endif %}
{% ifversion dependabot-bulk-alerts %}
### 一次重新打开多个警报
1. 查看关闭的 {% data variables.product.prodname_dependabot_alerts %}。 更多信息请参阅“[查看和更新关闭的警报](/en/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts#viewing-and-updating-closed-alerts)”(上文)。
2. 在每个警报标题的左侧,选择要重新打开的警报。 ![突出显示了复选框的已关闭警报的屏幕截图](/assets/images/help/repository/dependabot-alerts-open-checkbox.png)
3. (可选)在警报列表的顶部,选择页面上所有已关闭的警报。 ![选中了所有警报的已关闭警报的屏幕截图](/assets/images/help/graphs/select-all-closed-alerts.png)
4. 单击 **Reopen重新打开**以重新打开警报。 无法重新打开已修复的警报。 ![突出显示了"重新打开"按钮的已关闭警报的屏幕截图](/assets/images/help/graphs/reopen-multiple-alerts.png)
{% endif %}

Просмотреть файл

@ -50,11 +50,19 @@ redirect_from:
{% data reusables.dependency-review.dependency-review-action-beta-note %}
可以使用存储库中的依赖项审查 GitHub 操作对拉取请求强制执行依赖项审查。 该操作将扫描由拉取请求中的包版本更改是否引入有漏洞的依赖项版本,并向您示警相关的安全漏洞。 这便于您更好地了解拉取请求中发生的变化,并有助于防止将漏洞添加到存储库中。 更多信息请参阅 [`dependency-review-action`](https://github.com/actions/dependency-review-action)。
The action is available for all {% ifversion fpt or ghec %}public repositories, as well as private {% endif %}repositories that have {% data variables.product.prodname_GH_advanced_security %} enabled.
You can use the {% data variables.product.prodname_dependency_review_action %} in your repository to enforce dependency reviews on your pull requests. 该操作将扫描由拉取请求中的包版本更改是否引入有漏洞的依赖项版本,并向您示警相关的安全漏洞。 这便于您更好地了解拉取请求中发生的变化,并有助于防止将漏洞添加到存储库中。 更多信息请参阅 [`dependency-review-action`](https://github.com/actions/dependency-review-action)。
![依赖项审查操作示例](/assets/images/help/graphs/dependency-review-action.png)
依赖项审查 GitHub 操作检查在发现任何易受攻击的包时会失败,但只有在存储库所有者要求在合并之前通过检查时,才会阻止合并拉取请求。 更多信息请参阅“[关于受保护分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging)”。
By default, the {% data variables.product.prodname_dependency_review_action %} check will fail if it discovers any vulnerable packages. A failed check blocks a pull request from being merged when the repository owner requires the dependency review check to pass. 更多信息请参阅“[关于受保护分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging)”。
该操作使用依赖项审查 REST API 来获取基本提交和头部提交之间的依赖项更改差异。 您可以使用依赖项审查 API 来获取存储库上任意两个提交之间的依赖项更改差异(包括漏洞数据)。 更多信息请参阅“[依赖项审查](/rest/reference/dependency-graph#dependency-review)”。
{% ifversion dependency-review-action-configuration %}
You can configure the {% data variables.product.prodname_dependency_review_action %} to better suit your needs. For example, you can specify the severity level that will make the action fail, or set an allow or deny list for licenses to scan. For more information, see "[Configuring dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)."
{% endif %}
{% endif %}

Просмотреть файл

@ -47,3 +47,56 @@ topics:
1. 在“Configure security and analysis features配置安全和分析功能”下检查是否启用了依赖关系图。
1. 如果启用了依赖关系图,请单击“{% data variables.product.prodname_GH_advanced_security %}”旁边的 **Enable启用**以启用 {% data variables.product.prodname_advanced_security %},包括依赖项审查。 如果您的企业没有可用于 {% data variables.product.prodname_advanced_security %} 的许可证,则启用按钮处于禁用状态。{% ifversion ghes < 3.3 %} ![Screenshot of "Code security and analysis" features"](/assets/images/enterprise/3.2/repository/code-security-and-analysis-enable-ghas-3.2.png){% endif %}{% ifversion ghes > 3.2 %} ![Screenshot of "Code security and analysis" features"](/assets/images/enterprise/3.4/repository/code-security-and-analysis-enable-ghas-3.4.png){% endif %}
{% endif %}
{% ifversion dependency-review-action-configuration %}
## Configuring the {% data variables.product.prodname_dependency_review_action %}
{% data reusables.dependency-review.dependency-review-action-beta-note %}
{% data reusables.dependency-review.dependency-review-action-overview %}
The following configuration options are available.
| 选项 | 必选 | 用法 |
| ------------------ | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fail-on-severity` | 可选 | Defines the threshold for level of severity (`low`, `moderate`, `high`, `critical`).</br>The action will fail on any pull requests that introduce vulnerabilities of the specified severity level or higher. |
| `allow-licenses` | 可选 | Contains a list of allowed licenses. You can find the possible values for this parameter in the [Licenses](/rest/licenses) page of the API documentation.</br>The action will fail on pull requests that introduce dependencies with licenses that do not match the list. |
| `deny-licenses` | 可选 | Contains a list of prohibited licenses. You can find the possible values for this parameter in the [Licenses](/rest/licenses) page of the API documentation.</br>The action will fail on pull requests that introduce dependencies with licenses that match the list. |
{% tip %}
**Tip:** The `allow-licenses` and `deny-licenses` options are mutually exclusive.
{% endtip %}
This {% data variables.product.prodname_dependency_review_action %} example file illustrates how you can use these configuration options.
```yaml{:copy}
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: {% data reusables.actions.action-checkout %}
- name: Dependency Review
uses: actions/dependency-review-action@v2
with:
# Possible values: "critical", "high", "moderate", "low"
fail-on-severity: critical
# You can only can only include one of these two options: `allow-licenses` and `deny-licences`
# ([String]). Only allow these licenses (optional)
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
# allow-licenses: GPL-3.0, BSD-3-Clause, MIT
# ([String]). Block the pull request on these licenses (optional)
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
# deny-licenses: LGPL-2.0, BSD-2-Clause
```
For further details about the configuration options, see [`dependency-review-action`](https://github.com/actions/dependency-review-action#readme).
{% endif %}

Просмотреть файл

@ -1,7 +1,7 @@
---
title: 关于代码空间预构建
shortTitle: 关于预构建
intro: 代码空间预构建有助于加快新代码空间的创建速度。
intro: Codespaces prebuilds help to speed up the creation of new codespaces for large or complex repositories.
versions:
fpt: '*'
ghec: '*'
@ -10,15 +10,13 @@ topics:
product: '{% data reusables.gated-features.codespaces %}'
---
{% data reusables.codespaces.prebuilds-beta-note %}
## 概览
预构建代码空间可让您提高工作效率并更快地访问代码空间,而不管项目的大小和复杂性如何。 这是因为在为项目创建代码空间之前,任何源代码、编辑器扩展、项目依赖项、命令和配置都已下载、安装和应用。 将预构建视为代码空间的“准备就绪”模板。
Prebuilding your codespaces allows you to be more productive and access your codespace faster, particularly if your repository is large or complex and new codespaces currently take more than 2 minutes to start. 这是因为在为项目创建代码空间之前,任何源代码、编辑器扩展、项目依赖项、命令和配置都已下载、安装和应用。 将预构建视为代码空间的“准备就绪”模板。
默认情况下,每当您将更改推送到存储库时,{% data variables.product.prodname_codespaces %} 都会使用 {% data variables.product.prodname_actions %} 自动更新您的预构建。
当预构建可用于存储库的特定分支以及您所在的地区时,则创建代码空间时在计算机类型选项列表中会看到“{% octicon "zap" aria-label="The zap icon" %} 预构建就绪”标签。 更多信息请参阅“[创建代码空间](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。
当预构建可用于存储库的特定分支以及您所在的地区时,则创建代码空间时在计算机类型选项列表中会看到“{% octicon "zap" aria-label="The zap icon" %} 预构建就绪”标签。 If a prebuild is still being created, you will see the "{% octicon "history" aria-label="The history icon" %} Prebuild in progress" label. 更多信息请参阅“[创建代码空间](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。
![用于选择计算机类型的对话框](/assets/images/help/codespaces/choose-custom-machine-type.png)

Просмотреть файл

@ -13,8 +13,6 @@ product: '{% data reusables.gated-features.codespaces %}'
permissions: People with admin access to a repository can configure prebuilds for the repository.
---
{% data reusables.codespaces.prebuilds-beta-note %}
您可以为存储库的特定分支设置预构建配置。
从启用了预构建的基础分支创建的任何分支通常也会在代码空间创建期间分配一个预构建。 如果分支上的开发容器与基本分支上的开发容器相同,则会出现这种情况。 这是因为具有相同开发容器配置的分支的大多数预构建配置都相同,因此开发人员也可以从这些分支上更快的代码空间创建时间中受益。 更多信息请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。
@ -48,7 +46,15 @@ permissions: People with admin access to a repository can configure prebuilds fo
{% endnote %}
1. 选择要在其中设置预构建的区域。 开发人员必须位于您选择的区域中,才能从预构建创建代码空间。 或者,选择 **All regions所有区域**
1. 选择自动触发预构建模板更新的方式。
* **每次推送**(默认设置)- 使用此设置,每次推送到给定分支时,都会更新预构建配置。 这将确保从预构建模板生成的代码空间始终包含最新的代码空间配置,包括任何最近添加或更新的依赖项。
* **在配置更改时** - 使用此设置,每次更新给定存储库和分支的关联配置文件时,都会更新预构建配置。 这可确保在从预构建模板生成代码空间时使用对存储库的开发容器配置文件所做的更改。 更新预构建模板的 Actions 工作流程的运行频率较低,因此此选项将使用较少的 Actions 分钟数。 但是,此选项不保证代码空间始终包含最近添加或更新的依赖项,因此在创建代码空间后,可能必须手动添加或更新这些依赖项。
* **计划** - 使用此设置,您可以按照自己定义的自定义计划更新预构建配置。 This can reduce consumption of Actions minutes, however, with this option, codespaces may be created that do not use the latest dev container configuration changes.
![预构建触发器选项](/assets/images/help/codespaces/prebuilds-triggers.png)
1. Select **Reduce prebuild available to only specific regions** to limit access to your prebuilt image, then select which regions you want it available in. Developers can only create codespaces from a prebuild if they are located in a region you select. By default, your prebuilt image is available to all regions where codespaces is available and storage costs apply for each region.
![区域选择选项](/assets/images/help/codespaces/prebuilds-regions.png)
@ -60,13 +66,17 @@ permissions: People with admin access to a repository can configure prebuilds fo
{% endnote %}
1. 选择自动触发预构建模板更新的方式。
1. Set the number of prebuild template versions to be retained. You can input any number between 1 and 5. The default number of saved versions is 2, which means that only the latest template version and the previous version are saved.
* **每次推送**(默认设置)- 使用此设置,每次推送到给定分支时,都会更新预构建配置。 这将确保从预构建模板生成的代码空间始终包含最新的代码空间配置,包括任何最近添加或更新的依赖项。
* **在配置更改时** - 使用此设置,每次更新给定存储库和分支的关联配置文件时,都会更新预构建配置。 这可确保在从预构建模板生成代码空间时使用对存储库的开发容器配置文件所做的更改。 更新预构建模板的 Actions 工作流程的运行频率较低,因此此选项将使用较少的 Actions 分钟数。 但是,此选项不保证代码空间始终包含最近添加或更新的依赖项,因此在创建代码空间后,可能必须手动添加或更新这些依赖项。
* **计划** - 使用此设置,您可以按照自己定义的自定义计划更新预构建配置。 这可以减少 Actions 分钟数的消耗,并减少预构建因更新而不可用的时间。 但是,使用此选项,可以创建不使用最新开发容器配置更改的代码空间。
Depending on your prebuild trigger settings, your prebuild template could change with each push or on each dev container configuration change. Retaining older versions of prebuild templates enables you to create a prebuild from an older commit with a different dev container configuration than the current prebuild template. Since there is a storage cost associated with retaining prebuild template versions, you can choose the number of versions to be retained based on the needs of your team. For more information on billing, see "[About billing for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)."
![预构建触发器选项](/assets/images/help/codespaces/prebuilds-triggers.png)
If you set the number of prebuild template versions to save to 1, {% data variables.product.prodname_codespaces %} will only save the latest version of the prebuild template and will delete the older version each time the template is updated. This means you will not get a prebuilt codespace if you go back to an older dev container configuration.
![The prebuild template history setting](/assets/images/help/codespaces/prebuilds-template-history-setting.png)
1. Add users or teams to notify when the prebuild workflow run fails for this configuration. You can begin typing a username, team name, or full name, then click the name once it appears to add them to the list. The users or teams you add will receive an email when prebuild failures occur, containing a link to the workflow run logs to help with further investigation.
![The prebuild failure notification setting](/assets/images/help/codespaces/prebuilds-failure-notification-setting.png)
1. 单击 **Create创建**

Просмотреть файл

@ -15,5 +15,4 @@ children:
- /managing-prebuilds
- /testing-dev-container-changes
---
{% data reusables.codespaces.prebuilds-beta-note %}

Просмотреть файл

@ -12,8 +12,6 @@ product: '{% data reusables.gated-features.codespaces %}'
miniTocMaxHeadingLevel: 3
---
{% data reusables.codespaces.prebuilds-beta-note %}
## 检查、更改和删除预构建配置
您为存储库配置的预构建是使用 {% data variables.product.prodname_actions %} 工作流程创建和更新的,由 {% data variables.product.prodname_codespaces %} 服务管理。

Просмотреть файл

@ -14,8 +14,6 @@ product: '{% data reusables.gated-features.codespaces %}'
permissions: People with write permissions to a repository can create or edit the dev container configuration for a branch.
---
{% data reusables.codespaces.prebuilds-beta-note %}
对启用了预构建的分支的开发容器配置所做任何更改,都将导致代码空间配置和关联的预构建模板更新。 因此,在将更改提交到当前使用的存储库分支之前,在代码空间中从测试分支测试此类更改非常重要。 这将确保您不会为团队引入破坏性更改。
更多信息请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。

Просмотреть файл

@ -12,8 +12,6 @@ product: '{% data reusables.gated-features.codespaces %}'
miniTocMaxHeadingLevel: 3
---
{% data reusables.codespaces.prebuilds-beta-note %}
有关 {% data variables.product.prodname_codespaces %} 预构建的详细信息,请参阅“[预构建代码空间](/codespaces/prebuilding-your-codespaces)”。
## 检查代码空间是否是从预构建创建的?

Просмотреть файл

@ -1337,6 +1337,34 @@ Key | Type | Description
{% endif %}
{% ifversion ghas-enablement-webhook %}
## security_and_analysis
Activity related to enabling or disabling code security and analysis features for a repository or organization.
### Availability
- Repository webhooks
- Organization webhooks
- {% data variables.product.prodname_github_apps %} with at least `read-only` access on repositories administration
### Webhook payload object
Key | Type | Description
----|------|-------------
`changes`|`object` | The changes that were made to the code security and analysis features.
{% data reusables.webhooks.repo_desc %}
{% data reusables.webhooks.org_desc %}
{% data reusables.webhooks.app_desc %}
{% data reusables.webhooks.sender_desc %}
### Webhook payload example
{{ webhookPayloadsForCurrentVersion.security_and_analysis }}
{% endif %}
{% ifversion fpt or ghec %}
## sponsorship

Просмотреть файл

@ -6,7 +6,7 @@ versions:
shortTitle: Community Exchange
---
## 关于 {% data variables.product.prodname_community_exchange %}
## About {% data variables.product.prodname_community_exchange %}
{% data variables.product.prodname_community_exchange %} is a student community within the {% data variables.product.prodname_global_campus %} portal. As a student, it's a place where you can get exposure for your project and discover other student repositories in need of collaborators and maintainers.
@ -25,6 +25,6 @@ To access {% data variables.product.prodname_community_exchange %}, visit your {
If you're a student or faculty member at an accredited educational institution, you can apply for {% data variables.product.prodname_education %} benefits, which includes access to {% data variables.product.prodname_community_exchange %} within {% data variables.product.prodname_global_campus %}.
- If youre a student and you haven't joined {% data variables.product.prodname_education %} yet, apply using the [student application form](https://education.github.com/discount_requests/student_application). For more information, see "[About GitHub Education for students](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students)."
- If youre a student and you haven't joined {% data variables.product.prodname_education %} yet, apply using the [student application form]( https://education.github.com/discount_requests/student_application). For more information, see "[About GitHub Education for students](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students)."
- If youre an educator and you haven't joined {% data variables.product.prodname_education %} yet, apply using the [teacher application form](https://education.github.com/discount_requests/teacher_application). For more information, see "[About GitHub Education for educators](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount)."
- If youre an educator and you haven't joined {% data variables.product.prodname_education %} yet, apply using the [teacher application form]( https://education.github.com/discount_requests/teacher_application). For more information, see "[About GitHub Education for educators](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount)."

Просмотреть файл

@ -9,7 +9,7 @@ shortTitle: 重复使用分配
## 关于重复使用作业
您可以在您有权访问的任何其他教室(包括其他组织中的教室)中重复使用现有的个人或小组作业。 如果您选择重复使用作业,{% data variables.product.prodname_classroom %} 会将作业复制到您选择的教室。 如果作业使用模板存储库,并且您选择在其他组织的教室中重复使用它,{% data variables.product.prodname_classroom %} 将在目标组织中创建存储库及其内容的副本。
您可以在您有权访问的任何其他教室(包括其他组织中的教室)中重复使用现有的个人或小组作业。 您还可以在一个教室中一次重复使用多个作业。 如果您选择重复使用作业,{% data variables.product.prodname_classroom %} 会将作业复制到您选择的教室。 如果作业使用模板存储库,并且您选择在其他组织的教室中重复使用它,{% data variables.product.prodname_classroom %} 将在目标组织中创建存储库及其内容的副本。
复制的作业包括作业详细信息,例如名称、源存储库、自动评分测试和首选编辑器。 复制任务后,您可以对其进行编辑以进行更改。 您无法对首选编辑器进行更改。
@ -36,3 +36,21 @@ shortTitle: 重复使用分配
1. 作业将复制到所选教室,并显示一条确认消息。 如果选择在模板存储库中重复使用作业,则复制过程可能需要几分钟才能完成,并且可能需要刷新页面才能看到已完成的消息。
![重复使用的作业已完成消息](/assets/images/help/classroom/reuse-assignment-completed-message.png)
## 重复使用教室中的多个作业
1. 登录 {% data variables.product.prodname_classroom_with_url %}。
2. 在教室名称的右侧,选择 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 下拉菜单,然后单击“**Reuse assignment重复使用作业**”。
![强调下拉列表的课堂概述页面的屏幕截图](/assets/images/help/classroom/classroom-reuse-assignment-modal.png)
3. 在“Reuse assignment重复使用作业”模式中使用 **Choose an organization选择组织**下拉菜单选择您希望作业所在的组织。 然后使用 **Choose a classroom选择教室**下拉菜单选择要将作业复制到的组织中教室。
![重用作业模式的屏幕截图](/assets/images/help/classroom/reuse-multiple-assignments-modal.png)
4. 在每个作业的左侧,选择要重复使用的作业。
![多个选定作业的屏幕截图](/assets/images/help/classroom/multiple-assignments-selected.png)
5. 单击 **Create assignments创建作业**
6. 作业将复制到所选教室。 如果选择使用模板存储库重用分配,则复制过程可能需要几分钟才能完成。

Просмотреть файл

@ -40,6 +40,16 @@ shortTitle: 保存有星标的仓库
1. (可选)要取消先前已标星仓库的星标,请点击 **Unstar取消星标**。 ![解压仓库](/assets/images/help/stars/unstarring-a-repository.png)
{% ifversion fpt or ghec %}
## Viewing who has starred a repository
You can view everyone who has starred a public repository or a private repository you have access to.
To view everyone who has starred a repository, add `/stargazers` to the end of the URL of a repository. For example, to view stargazers for the github/docs repository, visit https://github.com/github/docs/stargazers.
## 使用列表组织带星标的存储库
{% note %}

Просмотреть файл

@ -81,7 +81,7 @@ gh repo fork <em>repository</em> --clone=true
## 创建和推送更改
继续使用您喜欢的文本编辑器对项目进行一些更改,例如 [Atom](https://atom.io)。 例如,您可以更改 `index.html` 中的文本以添加您的 GitHub 用户名。
Go ahead and make a few changes to the project using your favorite text editor, like [Visual Studio Code](https://code.visualstudio.com). 例如,您可以更改 `index.html` 中的文本以添加您的 GitHub 用户名。
当您准备好提交更改时,请暂存并提交更改。 `git add .` 告诉 Git 您希望在下一次提交中包含所有更改。 `git commit` 会拍摄这些更改的快照。

Просмотреть файл

@ -35,9 +35,9 @@ topics:
{% note %}
**注意:**
- You can create public repositories for an open source project. 创建公共仓库时,请确保包含[许可文件](https://choosealicense.com/)以确定您希望与其他人共享项目。 {% data reusables.open-source.open-source-guide-repositories %}
- 您可以为开源项目创建公共仓库。 创建公共仓库时,请确保包含[许可文件](https://choosealicense.com/)以确定您希望与其他人共享项目。 {% data reusables.open-source.open-source-guide-repositories %}
- {% data reusables.open-source.open-source-learning %}
- You can also add community health files to your repositories, to set guidelines on how to contribute, keep your repositories safe, and much more. 更多信息请参阅“[创建默认社区健康文件](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)”。
- 您还可以将社区健康文件添加到存储库,以设置有关如何贡献、确保存储库安全等的准则。 更多信息请参阅“[创建默认社区健康文件](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)”。
{% endnote %}

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Closing an issue
intro: 'You can close an issue when bugs are fixed, feedback is acted on, or to show that work is not planned.'
title: 关闭议题
intro: 您可以在修复 Bug、对反馈执行操作或显示未计划工作时关闭议题。
permissions: 'Anyone can close an issue they opened.<br><br>Repository owners, collaborators on repositories owned by a personal account, and people with triage permissions or greater on repositories owned by an organization can close issues opened by others. {% data reusables.enterprise-accounts.emu-permission-repo %}'
versions:
fpt: '*'
@ -15,16 +15,16 @@ shortTitle: 关闭议题
{% note %}
**Note:** You can also close issues automatically with keywords in pull requests and commit messages. 更多信息请参阅“[将拉取请求链接到议题](/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword#linking-a-pull-request-to-an-issue-using-a-keyword)”。
**注意:** 您还可以使用拉取请求中的关键字自动关闭议题并提交消息。 更多信息请参阅“[将拉取请求链接到议题](/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword#linking-a-pull-request-to-an-issue-using-a-keyword)”。
{% endnote %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-issues %}
1. In the list of issues, click the issue you'd like to close.
1. 在议题列表中,单击您想要关闭的议题。
{%- ifversion issue-close-reasons %}
1. Optionally, to change the reason for closing the issue, select {% octicon "triangle-down" aria-label="The down triangle octicon" %} next to "Close issue" and click a reason. ![Screenshot showing dropdown menu containing issue close reasons](/assets/images/help/issues/close-issue-select-reason.png)
2. Click **Close issue**. ![Screenshot showing "close issue" button](/assets/images/help/issues/close-issue-with-reason.png)
1. 可选要更改关闭议题的原因请选择“Close issue关闭议题”旁边的 {% octicon "triangle-down" aria-label="The down triangle octicon" %} ,然后单击原因。 ![显示包含议题关闭原因的下拉菜单的屏幕截图](/assets/images/help/issues/close-issue-select-reason.png)
2. 单击 **Close issue关闭议题**。 ![显示 "关闭议题" 按钮的屏幕截图](/assets/images/help/issues/close-issue-with-reason.png)
{%- else %}
1. At the bottom of the page, click **Close issue**. ![Screenshot showing "close issue" button](/assets/images/help/issues/close-issue.png)
1. 在页面底部,单击 **Close issue关闭议题**。 ![显示 "关闭议题" 按钮的屏幕截图](/assets/images/help/issues/close-issue.png)
{% endif %}

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Managing projects (beta)
intro: 'You can close and re-open projects, or you can permanently delete projects.'
title: 管理项目(测试版)
intro: 您可以关闭并重新打开项目,也可以永久删除项目。
allowTitleToDifferFromFilename: true
miniTocMaxHeadingLevel: 2
versions:
@ -11,33 +11,33 @@ topics:
- Organizations
---
## Deleting a project
## 删除项目
You can delete a project to permanently remove it.
您可以删除项目以将其永久删除。
{% data reusables.projects.project-settings %}
1. At the bottom of the page, click **Delete this project**. ![Screenshot showing project delete button](/assets/images/help/issues/delete-project-button.png)
1. Read the warnings, then type the name of your project into the text box. ![Screenshot showing project delete confirmation](/assets/images/help/issues/project-delete-confirm.png)
1. Click **I understand the consequences, delete this project**.
1. 在页面底部,单击 **Delete this project删除此项目**。 ![显示项目删除按钮的屏幕截图](/assets/images/help/issues/delete-project-button.png)
1. 阅读警告,然后在文本框中键入项目名称。 ![显示项目删除确认的屏幕截图](/assets/images/help/issues/project-delete-confirm.png)
1. 单击 **I understand the consequences, delete this project我理解后果删除此项目**
## Closing a project
## 关闭项目
You can close a project to remove it from the list of projects but retain the contents and ability to re-open the project later.
您可以关闭项目以将其从项目列表中删除,但保留内容和以后重新打开项目的功能。
{% data reusables.projects.project-settings %}
1. At the bottom of the page, click **Close this project**. ![Screenshot showing project close button](/assets/images/help/issues/close-project-button.png)
1. 在页面底部,单击 **Close this project关闭此项目**。 ![显示项目关闭按钮的屏幕截图](/assets/images/help/issues/close-project-button.png)
## Re-opening an organization project
## 重新打开组织项目
You can reopen a previously closed project.
您可以重新打开以前关闭的项目。
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}
{% data reusables.projects.reopen-a-project %}
## Re-opening a user project
## 重新打开用户项目
You can reopen a previously closed project.
您可以重新打开以前关闭的项目。
{% data reusables.profile.access_profile %}
{% data reusables.projects.reopen-a-project %}

Просмотреть файл

@ -622,10 +622,10 @@ For more information, see "[Managing the publication of {% data variables.produc
| `advanced_security_disabled` | Triggered when a repository administrator disables {% data variables.product.prodname_GH_advanced_security %} features for the repository. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."
| `advanced_security_enabled` | Triggered when a repository administrator enables {% data variables.product.prodname_GH_advanced_security %} features for the repository. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository).".
| `archived` | Triggered when a repository admin [archives a repository](/articles/about-archiving-repositories).{% ifversion ghes %}
| `config.disable_anonymous_git_access` | Triggered when [anonymous Git read access is disabled](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository) in a public repository.
| `config.enable_anonymous_git_access` | Triggered when [anonymous Git read access is enabled](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository) in a public repository.
| `config.lock_anonymous_git_access` | Triggered when a repository's [anonymous Git read access setting is locked](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access).
| `config.unlock_anonymous_git_access` | Triggered when a repository's [anonymous Git read access setting is unlocked](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access).{% endif %}
| `config.disable_anonymous_git_access` | Triggered when [anonymous Git read access is disabled](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository) in a public repository.
| `config.enable_anonymous_git_access` | Triggered when [anonymous Git read access is enabled](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository) in a public repository.
| `config.lock_anonymous_git_access` | Triggered when a repository's [anonymous Git read access setting is locked](/enterprise/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access).
| `config.unlock_anonymous_git_access` | Triggered when a repository's [anonymous Git read access setting is unlocked](/enterprise/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access).{% endif %}
| `create` | Triggered when [a new repository is created](/articles/creating-a-new-repository).{% ifversion fpt or ghes or ghec %}
| `create_actions_secret` |Triggered when a {% data variables.product.prodname_actions %} secret is created for a repository. For more information, see "[Creating encrypted secrets for a repository](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)."{% endif %}
| `destroy` | Triggered when [a repository is deleted](/articles/deleting-a-repository).{% ifversion fpt or ghec %}

Просмотреть файл

@ -66,7 +66,7 @@ Organization | `http(s)://pages.<hostname>/<organization>` | `http(s)://<hostnam
Project site owned by personal account | `http(s)://pages.<hostname>/<username>/<repository>/` | `http(s)://<hostname>/pages/<username>/<repository>/`
Project site owned by organization account | `http(s)://pages.<hostname>/<orgname>/<repository>/` | `http(s)://<hostname>/pages/<orgname>/<repository>/`
For more information, see "[Enabling subdomain isolation](/enterprise/{{ currentVersion }}/admin/installation/enabling-subdomain-isolation)" or contact your site administrator.
For more information, see "[Enabling subdomain isolation](/enterprise/admin/installation/enabling-subdomain-isolation)" or contact your site administrator.
{% endif %}
## Publishing sources for {% data variables.product.prodname_pages %} sites

Просмотреть файл

@ -31,4 +31,4 @@ error: failed to push some refs to 'https://54.204.174.51/hodor/nope.git'
![失败预接收挂钩的错误消息](/assets/images/help/pull_requests/pre-receive-hook-failed-error.png)
您的 {% data variables.product.product_name %} 站点管理员可以创建和删除组织或仓库的预接收挂钩,并可允许组织或仓库管理员启用或禁用预接收挂钩。 更多信息请参阅“[使用预接收挂钩来强制实施策略](/enterprise/{{ currentVersion }}/admin/guides/developer-workflow/using-pre-receive-hooks-to-enforce-policy)”。
您的 {% data variables.product.product_name %} 站点管理员可以创建和删除组织或仓库的预接收挂钩,并可允许组织或仓库管理员启用或禁用预接收挂钩。 更多信息请参阅“[使用预接收挂钩来强制实施策略](/enterprise/admin/guides/developer-workflow/using-pre-receive-hooks-to-enforce-policy)”。

Просмотреть файл

@ -17,13 +17,30 @@ shortTitle: 创建和删除分支
---
## 创建分支
您可以在 {% data variables.product.product_name %} 上以不同的方式创建分支。
{% note %}
**注意:** 您只能在您具有推送访问权限的存储库中创建分支。
{% endnote %}
### 通过分支概述创建分支
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.navigate-to-branches %}
1. 单击 **New Branch新分支**。 ![突出显示了新分支按钮的分支概述页面的屏幕截图](/assets/images/help/branches/new-branch-button.png)
2. 在对话框中,输入分支名称,并根据需要更改分支源。
3. 单击 **Create Branch创建分支**。 ![突出显示了创建分支按钮的分支创建模式的屏幕截图](/assets/images/help/branches/branch-creation-popup.png)
1. (可选)如果要从仓库的默认分支以外的分支创建新分支,请单击 {% octicon "git-branch" aria-label="The branch icon" %} **<em>NUMBER</em> 分支**,然后选择另一个分支: ![概述页面上的分支链接](/assets/images/help/branches/branches-link.png)
### 使用分支下拉列表创建分支
{% data reusables.repositories.navigate-to-repo %}
1. (可选)如果要从仓库的默认分支以外的分支创建新分支,请单击 {% octicon "git-branch" aria-label="The branch icon" %}**Branches分支**,然后选择另一个分支。 ![概述页面上的分支链接](/assets/images/help/branches/branches-overview-link.png)
1. 单击分支选择器菜单。 ![分支选择器菜单](/assets/images/help/branch/branch-selection-dropdown.png)
1. 为新分支键入唯一名称,然后选择 **Create branch创建分支**。 ![分支创建文本框](/assets/images/help/branch/branch-creation-text-box.png)
{% ifversion fpt or ghec or ghes > 3.4 %}
### 为议题创建分支
您可以创建一个分支,直接从议题页面处理议题,然后立即开始。 更多信息请参阅“[创建分支以处理议题](/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue)”。
{% endif %}
## 删除分支
{% data reusables.pull_requests.automatically-delete-branches %}
@ -44,7 +61,7 @@ shortTitle: 创建和删除分支
![确认删除分支](/assets/images/help/branches/confirm-deleting-branch.png){% endif %}
{% data reusables.pull_requests.retargeted-on-branch-deletion %}
更多信息请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)
更多信息请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)。
## 延伸阅读

Просмотреть файл

@ -39,7 +39,8 @@ shortTitle: 筛选文件
{% data reusables.repositories.sidebar-pr %}
1. 在拉取请求列表中,单击要过滤的拉取请求。
{% data reusables.repositories.changed-files %}
1. 如果文件树处于隐藏状态,请单击 **Show file tree显示文件树**以显示文件树。
1. 单击文件树中的文件可查看相应的文件差异 If the file tree is hidden, click {% octicon "sidebar-collapse" aria-label="The sidebar collapse icon" %} to display the file tree.
{% note %}
@ -47,7 +48,7 @@ shortTitle: 筛选文件
{% endnote %}
1. 单击文件树中的文件可查看相应的文件差异 ![拉取请求文件树](/assets/images/help/pull_requests/pr-file-tree.png)
![Screenshot of filter changed files search box and file tree emphasized](/assets/images/help/repository/file-tree.png)
1. 要按文件路径进行筛选,请在 **Filter changed files筛选已更改的文件**搜索框中输入部分或全部文件路径。 或者,使用文件筛选器下拉列表。 更多信息请参阅“[使用文件筛选器下拉列表](#using-the-file-filter-dropdown)”。
{% endif %}

Просмотреть файл

@ -36,9 +36,14 @@ shortTitle: 查看依赖项更改
依赖关系审核允许您“左移”。 您可以使用所提供的预测信息在易受攻击的依赖项进入生产之前捕获它们。 更多信息请参阅“[关于依赖项审查](/code-security/supply-chain-security/about-dependency-review)”。
{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6396 %}
可以使用依赖项审查 GitHub 操作来帮助对存储库中的拉取请求强制实施依赖项审查。 更多信息请参阅“[依赖项审查实施](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement)”。
You can use the {% data variables.product.prodname_dependency_review_action %} to help enforce dependency reviews on pull requests in your repository. {% data reusables.dependency-review.dependency-review-action-overview %}
{% ifversion dependency-review-action-configuration %}
You can configure the {% data variables.product.prodname_dependency_review_action %} to better suit your needs by specifying the type of dependency vulnerability you wish to catch. For more information, see "[Configuring dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)."
{% endif %}
{% endif %}
## 审查拉取请求中的依赖项
{% data reusables.repositories.sidebar-pr %}

Просмотреть файл

@ -75,15 +75,9 @@ $ gh repo sync owner/cli-fork
> 2 files changed, 7 insertions(+), 9 deletions(-)
> delete mode 100644 README
> create mode 100644 README.md
``` If your local branch didn't have any unique commits, Git will instead perform a "fast-forward":
```shell
$ git merge upstream/main
> Updating 34e91da..16c56ad
> Fast-forward
> README.md | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
```
{% tip %}
**提示**:同步复刻仅更新仓库的本地副本。 要在 {% data variables.product.product_location %} 上更新复刻,您必须[推送更改](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)。

Просмотреть файл

@ -44,7 +44,7 @@ shortTitle: 删除或更改可见性
换句话说,即使将父仓库设为私有后,公共仓库的复刻也将在其各自的仓库网络中保持公开。 这样复刻所有者便可继续工作和协作,而不会中断。 如果公共复刻没有通过这种方式移动到单独的网络中,则这些复刻的所有者将需要获得适当的[访问权限](/articles/access-permissions-on-github)以从(现在私有的)父仓库中拉取更改并提交拉取请求 — 即使它们以前不需要这些权限。
{% ifversion ghes or ghae %}
如果公共仓库启用了匿名 Git 读取权限并且该仓库设为私有,则所有仓库的复刻都将失去匿名 Git 读取权限并恢复为默认的禁用设置。 如果将复刻的仓库设为公共,则仓库管理员可以重新启用 Git 读取权限。 更多信息请参阅“[为仓库启用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)。”
如果公共仓库启用了匿名 Git 读取权限并且该仓库设为私有,则所有仓库的复刻都将失去匿名 Git 读取权限并恢复为默认的禁用设置。 如果将复刻的仓库设为公共,则仓库管理员可以重新启用 Git 读取权限。 更多信息请参阅“[为仓库启用匿名 Git 读取权限](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)。”
{% endif %}
### 删除私有仓库

Просмотреть файл

@ -40,5 +40,27 @@ versions:
![强调提交标记的提交屏幕截图](/assets/images/help/commits/commit-tag-label.png)
{% ifversion commit-tree-view %}
## 使用文件树
You can use the file tree to navigate between files in a commit.
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.navigate-to-commit-page %}
1. 通过单击提交消息链接导航到提交。 ![强调提交消息链接的提交屏幕截图](/assets/images/help/commits/commit-message-link.png)
1. 单击文件树中的文件可查看相应的文件差异 If the file tree is hidden, click {% octicon "sidebar-collapse" aria-label="The sidebar collapse icon" %} to display the file tree.
{% note %}
**Note**: The file tree will not display if your screen width is too narrow or if the commit only includes one file.
{% endnote %}
![Screenshot of filter changed files search box and file tree emphasized](/assets/images/help/repository/file-tree.png)
1. 要按文件路径进行筛选,请在 **Filter changed files筛选已更改的文件**搜索框中输入部分或全部文件路径。
{% endif %}
## 延伸阅读
- {% data variables.product.prodname_desktop %} 上的“[提交和审查对项目的更改](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#about-commits)”

Просмотреть файл

@ -186,7 +186,7 @@ remote: error: Changes have been requested.
启用强制推送不会覆盖任何其他分支保护规则。 例如,如果分支需要线性提交历史记录,则无法强制推送合并提交到该分支。
{% ifversion ghes or ghae %}如果站点管理员阻止了强制推送到仓库中的所有分支,则无法对受保护分支启用强制推送。 更多信息请参阅“[阻止强制推送到个人帐户或组织拥有的仓库](/enterprise/{{ currentVersion }}/admin/developer-workflow/blocking-force-pushes-to-repositories-owned-by-a-user-account-or-organization)”。
{% ifversion ghes or ghae %}如果站点管理员阻止了强制推送到仓库中的所有分支,则无法对受保护分支启用强制推送。 更多信息请参阅“[阻止强制推送到个人帐户或组织拥有的仓库](/enterprise/admin/developer-workflow/blocking-force-pushes-to-repositories-owned-by-a-user-account-or-organization)”。
如果站点管理员只阻止强制推送到默认分支,您仍然可以为任何其他受保护分支启用强制推送。{% endif %}

Просмотреть файл

@ -61,7 +61,7 @@ shortTitle: 仓库可见性
{%- endif %}
{%- ifversion ghes %}
* 匿名 Git 读取权限不再可用。 更多信息请参阅“[为仓库启用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)。”
* 匿名 Git 读取权限不再可用。 更多信息请参阅“[为仓库启用匿名 Git 读取权限](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)。”
{%- endif %}
{% ifversion ghes or ghec or ghae %}

Просмотреть файл

@ -40,7 +40,7 @@ shortTitle: 大文件
{% endnote %}
{% ifversion ghes %}默认情况下, {% endif %}{% data variables.product.product_name %} 阻止超过 {% data variables.large_files.max_github_size %} 的推送。 {% ifversion ghes %}但站点管理员可为您的 {% data variables.product.product_location %} 配置不同的限制。 更多信息请参阅“[设置 Git 推送限制](/enterprise/{{ currentVersion }}/admin/guides/installation/setting-git-push-limits)”。{% endif %}
{% ifversion ghes %}默认情况下, {% endif %}{% data variables.product.product_name %} 阻止超过 {% data variables.large_files.max_github_size %} 的推送。 {% ifversion ghes %}但站点管理员可为您的 {% data variables.product.product_location %} 配置不同的限制。 更多信息请参阅“[设置 Git 推送限制](/enterprise/admin/guides/installation/setting-git-push-limits)”。{% endif %}
要跟踪超出此限制的文件,必须使用 {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %})。 更多信息请参阅“[关于 {% data variables.large_files.product_name_long %}](/repositories/working-with-files/managing-large-files/about-git-large-file-storage)”。

Просмотреть файл

@ -22,7 +22,7 @@ shortTitle: 配置 Git LFS
{% tip %}
**注:**尝试向 {% data variables.product.product_name %} 推送大文件之前,请确保在您的企业上启用了 {% data variables.large_files.product_name_short %}。 更多信息请参阅“[在 GitHub Enterprise Server 上配置 Git Large File Storage](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-git-large-file-storage-on-github-enterprise-server/)”。
**注:**尝试向 {% data variables.product.product_name %} 推送大文件之前,请确保在您的企业上启用了 {% data variables.large_files.product_name_short %}。 更多信息请参阅“[在 GitHub Enterprise Server 上配置 Git Large File Storage](/enterprise/admin/guides/installation/configuring-git-large-file-storage-on-github-enterprise-server/)”。
{% endtip %}

Просмотреть файл

@ -1,6 +1,7 @@
---
title: 可用于 GitHub 应用程序的端点
intro: 您的应用程序可以向以下 REST 端点发出请求。
permissions: 'You must use an installation access token to access endpoints using your {% data variables.product.prodname_github_app %}. For more information, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)."'
redirect_from:
- /v3/apps/available-endpoints
- /rest/reference/endpoints-available-for-github-apps

Просмотреть файл

@ -24,12 +24,6 @@ topics:
</div>
</div>
{% warning %}
警告:截至 2021 年 10 月下旬,官方 Octokit 库目前尚未维护。 更多信息请参阅 [octokit.js 存储库中的此讨论](https://github.com/octokit/octokit.js/discussions/620)。
{% endwarning %}
# 第三方库
### Clojure

Просмотреть файл

@ -185,7 +185,7 @@ _搜索_
- [`PUT /repos/:owner/:repo/topics`](/rest/reference/repos#replace-all-repository-topics) (:write)
- [`POST /repos/:owner/:repo/transfer`](/rest/reference/repos#transfer-a-repository) (:write)
{% ifversion fpt or ghec -%}
- [`GET /repos/:owner/:repo/vulnerability-alerts`](/rest/reference/repos#enable-vulnerability-alerts) (:write)
- [`GET /repos/:owner/:repo/vulnerability-alerts`](/rest/reference/repos#enable-vulnerability-alerts) (:read)
{% endif -%}
{% ifversion fpt or ghec -%}
- [`PUT /repos/:owner/:repo/vulnerability-alerts`](/rest/reference/repos#enable-vulnerability-alerts) (:write)

Просмотреть файл

@ -177,7 +177,7 @@ GitHub 可能会向执法部门或其他政府机构披露我们收集的有关
如果 GitHub 处理除您的个人资料信息以外的个人数据,例如 GitHub 从[第三方](/github/site-policy/github-privacy-statement#information-we-collect-from-third-parties)收到的有关您的信息,则根据适用法律,您可以联系 [GitHub 支持](https://support.github.com/contact) 或 [GitHub 高级支持](https://enterprise.githubsupport.com/hc/en-us)访问、更新、更改、删除、反对或限制处理您的个人数据。
You can adjust the settings on your Account regarding the display of your Personal Data in private or public repositories or Personal Data processed in connection with Community Features (such as GitHub Feed, GitHub Sponsors, and GitHub Explore) through [profile settings](https://github.com/settings/profile).
您可以通过[个人资料设置](https://github.com/settings/profile)来调整帐户上的设置,包括将您的个人数据显示在私人或公共存储库中,或与社区功能(例如 GitHub Feed、GitHub Sponsors 和 GitHub Explore相关的个人数据。
此外,如果您无法通过上述方式访问我们拥有的某些个人数据,您可以按照本隐私声明底部所述与我们联系以请求访问。

Просмотреть файл

@ -68,7 +68,7 @@ topics:
您无需登录 {% data variables.enterprise.management_console %} 即可使用此方法。
使用 [ghe-diagnostics](/enterprise/{{ currentVersion }}/admin/guides/installation/command-line-utilities#ghe-diagnostics) 命令行实用程序检索实例的诊断。
使用 [ghe-diagnostics](/enterprise/admin/guides/installation/command-line-utilities#ghe-diagnostics) 命令行实用程序检索实例的诊断。
```shell
$ ssh -p122 admin@<em>hostname</em> -- 'ghe-diagnostics' > diagnostics.txt

Просмотреть файл

@ -0,0 +1,8 @@
---
#Issue 6662
#Commit file tree view
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.6'
ghae: 'issue-6662'

Просмотреть файл

@ -0,0 +1,7 @@
---
#Reference: Issue #6076 ability to dismiss or re-open multiple Dependabot alerts
versions:
fpt: '*'
ghec: '*'
ghes: '>3.5'
ghae: 'issue-6628'

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше