New translation batch for cn (#33050)
This commit is contained in:
@@ -612,6 +612,7 @@ translations/zh-CN/content/admin/packages/getting-started-with-github-packages-f
|
||||
translations/zh-CN/content/admin/packages/migrating-your-enterprise-to-the-container-registry-from-the-docker-registry.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md,rendering error
|
||||
@@ -680,7 +681,6 @@ translations/zh-CN/content/code-security/adopting-github-advanced-security-at-sc
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md,rendering error
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md,rendering error
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md,rendering error
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages.md,broken liquid tags
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md,rendering error
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository.md,rendering error
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists.md,rendering error
|
||||
@@ -728,19 +728,21 @@ translations/zh-CN/content/code-security/security-overview/viewing-the-security-
|
||||
translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md,broken liquid tags
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository.md,rendering error
|
||||
translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template.md,rendering error
|
||||
translations/zh-CN/content/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md,rendering error
|
||||
translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge.md,rendering error
|
||||
translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-prebuilds.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md,rendering error
|
||||
translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md,rendering error
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md,broken liquid tags
|
||||
@@ -853,6 +855,7 @@ translations/zh-CN/content/organizations/managing-organization-settings/managing
|
||||
translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization.md,broken liquid tags
|
||||
translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags
|
||||
translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md,rendering error
|
||||
translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md,rendering error
|
||||
@@ -864,6 +867,7 @@ translations/zh-CN/content/packages/learn-github-packages/introduction-to-github
|
||||
translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md,rendering error
|
||||
translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md,rendering error
|
||||
translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md,rendering error
|
||||
translations/zh-CN/content/packages/quickstart.md,rendering error
|
||||
translations/zh-CN/content/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry.md,rendering error
|
||||
translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md,rendering error
|
||||
translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md,rendering error
|
||||
@@ -945,7 +949,6 @@ translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md,broken liq
|
||||
translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/enterprise-admin/scim.md,rendering error
|
||||
translations/zh-CN/content/rest/enterprise-admin/users.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/gitignore.md,rendering error
|
||||
translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md,rendering error
|
||||
translations/zh-CN/content/rest/guides/traversing-with-pagination.md,rendering error
|
||||
translations/zh-CN/content/rest/guides/working-with-comments.md,broken liquid tags
|
||||
@@ -957,7 +960,6 @@ translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md,rendering
|
||||
translations/zh-CN/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/packages.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/pulls/comments.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/scim.md,rendering error
|
||||
translations/zh-CN/content/rest/teams/team-sync.md,rendering error
|
||||
translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md,rendering error
|
||||
@@ -1028,13 +1030,11 @@ translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-p
|
||||
translations/zh-CN/data/reusables/advanced-security/secret-scanning-create-custom-pattern.md,rendering error
|
||||
translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/audit_log/audit-log-action-categories.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md,rendering error
|
||||
translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md,rendering error
|
||||
translations/zh-CN/data/reusables/branches/new-repo-default-branch.md,rendering error
|
||||
translations/zh-CN/data/reusables/classroom/about-autograding.md,rendering error
|
||||
translations/zh-CN/data/reusables/code-scanning/alerts-found-in-generated-code.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/code-scanning/autobuild-add-build-steps.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/code-scanning/autobuild-compiled-languages.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md,rendering error
|
||||
translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md,rendering error
|
||||
translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md,rendering error
|
||||
@@ -1106,6 +1106,7 @@ translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-poli
|
||||
translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md,rendering error
|
||||
translations/zh-CN/data/reusables/git/git-push.md,rendering error
|
||||
translations/zh-CN/data/reusables/identity-and-permissions/ip-allow-lists-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/identity-and-permissions/vigilant-mode-beta-note.md,rendering error
|
||||
translations/zh-CN/data/reusables/large_files/storage_assets_location.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/large_files/use_lfs_tip.md,rendering error
|
||||
@@ -1116,8 +1117,8 @@ translations/zh-CN/data/reusables/organizations/billing_plans.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/member-privileges.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/navigate-to-org.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/organization-wide-project.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/organizations/repository-defaults.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/require-ssh-cert.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/organizations/security-and-analysis.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/security.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/teams_sidebar.md,rendering error
|
||||
@@ -1163,7 +1164,6 @@ translations/zh-CN/data/reusables/scim/supported-idps.md,rendering error
|
||||
translations/zh-CN/data/reusables/search/syntax_tips.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md,rendering error
|
||||
translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-public-repo.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/secret-list-private-push-protection.md,rendering error
|
||||
translations/zh-CN/data/reusables/security-overview/permissions.md,rendering error
|
||||
translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md,rendering error
|
||||
@@ -1189,5 +1189,6 @@ translations/zh-CN/data/reusables/user-settings/security.md,rendering error
|
||||
translations/zh-CN/data/reusables/user-settings/ssh.md,rendering error
|
||||
translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md,broken liquid tags
|
||||
translations/zh-CN/data/ui.yml,broken liquid tags
|
||||
translations/zh-CN/data/variables/product.yml,rendering error
|
||||
translations/zh-CN/data/variables/projects.yml,broken liquid tags
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 在 Amazon Web Services 中配置 OpenID Connect
|
||||
shortTitle: Configuring OpenID Connect in Amazon Web Services
|
||||
shortTitle: OpenID Connect in AWS
|
||||
intro: 在工作流程中使用 OpenID Connect 向 Amazon Web Services 进行身份验证。
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
@@ -10,12 +10,12 @@ versions:
|
||||
type: tutorial
|
||||
topics:
|
||||
- Security
|
||||
ms.openlocfilehash: 6b57dc216c3f2ebc1edb73a8d588edb1967aebcb
|
||||
ms.sourcegitcommit: ac00e2afa6160341c5b258d73539869720b395a4
|
||||
ms.openlocfilehash: 597ea408c2f0172eb0eacf07fc2d1ad320872f09
|
||||
ms.sourcegitcommit: 94ba3891ebcc3c05812f468e4adafdd15b99e390
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147876001'
|
||||
ms.lasthandoff: 11/25/2022
|
||||
ms.locfileid: '148182255'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -53,7 +53,7 @@ OpenID Connect (OIDC) 允许您的 {% data variables.product.prodname_actions %}
|
||||
}
|
||||
```
|
||||
|
||||
在以下示例中,`ForAllValues` 用于匹配多个条件键,`StringLike` 用于匹配指定存储库中的任何 ref。 请注意,`ForAllValues` [过于宽松](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_multi-value-conditions.html),不应在 `Allow` 效果中单独使用。 对于此示例,包含 `StringLike` 表示 `ForAllValues` 中的空集仍然不会传递条件:
|
||||
在以下示例中,`StringLike` 与通配符运算符 (`*`) 一起使用,以允许 `octo-org/octo-repo` 组织和存储库中的任何分支、拉取请求合并分支或环境在 AWS 中担任角色。
|
||||
|
||||
```json{:copy}
|
||||
{
|
||||
@@ -69,8 +69,7 @@ OpenID Connect (OIDC) 允许您的 {% data variables.product.prodname_actions %}
|
||||
"StringLike": {
|
||||
"token.actions.githubusercontent.com:sub": "repo:octo-org/octo-repo:*"
|
||||
},
|
||||
"ForAllValues:StringEquals": {
|
||||
"token.actions.githubusercontent.com:iss": "https://token.actions.githubusercontent.com",
|
||||
"StringEquals": {
|
||||
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ topics:
|
||||
redirect_from:
|
||||
- /admin/configuration/restricting-network-traffic-to-your-enterprise
|
||||
- /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise
|
||||
ms.openlocfilehash: cd0c5b4bafc5226a99a75d3632fc5072233f5c1c
|
||||
ms.sourcegitcommit: c562c85cc75ffe1eb4e9595d8adc09ec71697ab1
|
||||
ms.openlocfilehash: d9a4518f2fcc23d4b49967effb7b9a3022a7c6bd
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148180096'
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184010'
|
||||
---
|
||||
## 关于网络流量限制
|
||||
|
||||
@@ -30,7 +30,7 @@ ms.locfileid: '148180096'
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
如果你的企业将 {% data variables.product.prodname_emus %} 与 OIDC 配合使用,你则可以选择是使用 {% data variables.product.company_short %} 的 IP 允许列表功能,还是为标识提供者 (IdP) 使用允许列表限制。 如果你的企业未将 {% data variables.product.prodname_emus %} 与 OIDC 配合使用,你则可以使用 {% data variables.product.company_short %} 的允许列表功能。
|
||||
如果你的企业将 {% data variables.product.prodname_emus %} 与 OIDC 配合使用,你则可以选择是使用 {% data variables.product.company_short %} 的 IP 允许列表功能,还是为标识提供者 (IdP) 使用允许列表限制。 如果你的企业未将 {% data variables.product.prodname_emus %} 与 OIDC 配合使用,你则可以使用 {% data variables.product.company_short %} 的允许列表功能。
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
@@ -50,8 +50,6 @@ ms.locfileid: '148180096'
|
||||
|
||||
{% data reusables.identity-and-permissions.ip-allow-lists-enable %} {% data reusables.identity-and-permissions.ip-allow-lists-enterprise %}
|
||||
|
||||
您还可以为单个组织配置允许的 IP 地址。 有关详细信息,请参阅“[为组织管理允许的 IP 地址](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)”。
|
||||
|
||||
## 关于 IdP 的允许列表
|
||||
|
||||
如果将 {% data variables.product.prodname_emus %} 与 OIDC 配合使用,则可以使用 IdP 的允许列表。
|
||||
|
||||
@@ -41,7 +41,7 @@ For more information, see "[About identity and access management with SAML singl
|
||||
|
||||
{% data reusables.saml.saml-disabled-linked-identities-removed %}
|
||||
|
||||
{% data reusables.scim.enterprise-account-scim %}
|
||||
{% data reusables.apps.reauthorize-apps-saml %}
|
||||
|
||||
{% elsif ghes or ghae %}
|
||||
|
||||
@@ -73,14 +73,9 @@ After a user successfully authenticates on your IdP, the user's SAML session for
|
||||
|
||||
## Enforcing SAML single-sign on for organizations in your enterprise account
|
||||
|
||||
{% note %}
|
||||
When you enforce SAML SSO for your enterprise, the enterprise configuration will override any existing organization-level SAML configurations. {% data reusables.saml.switching-from-org-to-enterprise %} For more information, see "[Switching your SAML configuration from an organization to an enterprise account](/github/setting-up-and-managing-your-enterprise/configuring-identity-and-access-management-for-your-enterprise-account/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)."
|
||||
|
||||
**Notes:**
|
||||
|
||||
- When you enforce SAML SSO for your enterprise, the enterprise configuration will override any existing organization-level SAML configurations. {% data reusables.saml.switching-from-org-to-enterprise %} For more information, see "[Switching your SAML configuration from an organization to an enterprise account](/github/setting-up-and-managing-your-enterprise/configuring-identity-and-access-management-for-your-enterprise-account/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)."
|
||||
- When you enforce SAML SSO for an organization, {% data variables.product.company_short %} removes any members of the organization that have not authenticated successfully with your SAML IdP. When you require SAML SSO for your enterprise, {% data variables.product.company_short %} does not remove members of the enterprise that have not authenticated successfully with your SAML IdP. The next time a member accesses the enterprise's resources, the member must authenticate with your SAML IdP.
|
||||
|
||||
{% endnote %}
|
||||
When you enforce SAML SSO for an organization, {% data variables.product.company_short %} removes any members of the organization that have not authenticated successfully with your SAML IdP. When you require SAML SSO for your enterprise, {% data variables.product.company_short %} does not remove members of the enterprise that have not authenticated successfully with your SAML IdP. The next time a member accesses the enterprise's resources, the member must authenticate with your SAML IdP.
|
||||
|
||||
For more detailed information about how to enable SAML using Okta, see "[Configuring SAML single sign-on for your enterprise account using Okta](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)."
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ topics:
|
||||
The scope of the events that appear in your enterprise's audit log depend on whether your enterprise uses {% data variables.product.prodname_emus %}. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)."
|
||||
|
||||
- If your enterprise does not use {% data variables.product.prodname_emus %}, the audit log only includes events related to the enterprise account and the organizations within the enterprise account, which are listed in this article.
|
||||
- If your enterprise uses {% data variables.product.prodname_emus %}, the audit log also includes user events for {% data variables.enterprise.prodname_managed_users %}, such as each time the user logs in to {% data variables.product.product_name %}. For a list of these events, see "[Reviewing your security log](/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log#security-log-actions)."
|
||||
- If your enterprise uses {% data variables.product.prodname_emus %}, the audit log also includes user events for {% data variables.enterprise.prodname_managed_users %}, such as each time the user logs in to {% data variables.product.product_name %} and actions they take within their user account. For a list of these user account events, see "[Reviewing your security log](/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log#security-log-actions)."
|
||||
{% endif %}
|
||||
|
||||
{%- ifversion fpt or ghec %}
|
||||
@@ -105,10 +105,12 @@ The scope of the events that appear in your enterprise's audit log depend on whe
|
||||
| `business.clear_members_can_create_repos` | An enterprise owner{% ifversion ghes %} or site administrator{% endif %} cleared a restriction on repository creation in organizations in the enterprise. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-repository-management-policies-in-your-enterprise#setting-a-policy-for-repository-creation)."
|
||||
| `business.create` | An enterprise was created.
|
||||
{%- ifversion ghec %}
|
||||
| `business.disable_oidc` | OIDC single sign-on was disabled for an enterprise. For more information, see "[Configuring OIDC for {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)."
|
||||
| `business.disable_saml` | SAML single sign-on was disabled for an enterprise.
|
||||
{%- endif %}
|
||||
| `business.disable_two_factor_requirement` | The requirement for members to have two-factor authentication enabled to access an enterprise was disabled.
|
||||
{%- ifversion ghec %}
|
||||
| `business.enable_oidc` | OIDC single sign-on was enabled for an enterprise. For more information, see "[Configuring OIDC for {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users)."
|
||||
| `business.enable_saml` | SAML single sign-on was enabled for an enterprise.
|
||||
{%- endif %}
|
||||
| `business.enable_two_factor_requirement` | The requirement for members to have two-factor authentication enabled to access an enterprise was enabled.
|
||||
@@ -1336,6 +1338,19 @@ Before you'll see `git` category actions, you must enable Git events in the audi
|
||||
| `ssh_certificate_requirement.disable` | The requirement for members to use SSH certificates to access an organization resources was disabled. For more information, see "[Managing your organization's SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/managing-your-organizations-ssh-certificate-authorities)" and "[Managing SSH certificate authorities for your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-ssh-certificate-authorities-for-your-enterprise)."
|
||||
{%- endif %}
|
||||
|
||||
{% ifversion sso-redirect %}
|
||||
## `sso_redirect` category actions
|
||||
|
||||
{% data reusables.enterprise-managed.sso-redirect-release-phase %}
|
||||
|
||||
| Action | Description |
|
||||
|--------|------------ |
|
||||
`sso_redirect.enable` | Automatic redirects for users to single sign-on (SSO) was enabled. |
|
||||
`sso_redirect.disable` | Automatic redirects for users to single sign-on (SSO) was disabled. |
|
||||
|
||||
For more information, 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-sso-for-unauthenticated-users)."
|
||||
{% endif %}
|
||||
|
||||
## `staff` category actions
|
||||
|
||||
| Action | Description
|
||||
|
||||
@@ -111,6 +111,7 @@ Each category has a set of associated actions that you can filter on. For exampl
|
||||
Actions that can be found in your enterprise audit log are grouped within the following categories:
|
||||
|
||||
{% data reusables.audit_log.audit-log-action-categories %}
|
||||
|
||||
### Search based on time of action
|
||||
|
||||
Use the `created` qualifier to filter events in the audit log based on when they occurred.
|
||||
|
||||
@@ -117,6 +117,10 @@ For more information about the audit log REST API, see "[Enterprise administrati
|
||||
|
||||
### Example 1: All events in an enterprise, for a specific date, with pagination
|
||||
|
||||
You can use page-based pagination or cursor based pagination. For more information, see "[Traversing with Pagination](/rest/guides/traversing-with-pagination)."
|
||||
|
||||
#### Example with page-based pagination
|
||||
|
||||
The query below searches for audit log events created on Jan 1st, 2022 in the `avocado-corp` enterprise, and return the first page with a maximum of 100 items per page using [REST API pagination](/rest/overview/resources-in-the-rest-api#pagination):
|
||||
|
||||
```shell
|
||||
@@ -125,6 +129,32 @@ curl -H "Authorization: Bearer TOKEN" \
|
||||
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&page=1&per_page=100"
|
||||
```
|
||||
|
||||
#### Example with cursor-based pagination
|
||||
|
||||
The query below searches for audit log events created on Jan 1st, 2022 in the `avocado-corp` enterprise, and returns the first page with a maximum of 100 items per page using [REST API pagination](/rest/overview/resources-in-the-rest-api#pagination). The `--include` flag causes the headers to be returned along with the response.
|
||||
|
||||
```
|
||||
curl --include -H "Authorization: Bearer TOKEN" \
|
||||
--request GET \
|
||||
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&per_page=100"
|
||||
```
|
||||
|
||||
If there are more than 100 results, the `link` header will include URLs to fetch the next, first, and previous pages of results.
|
||||
|
||||
```
|
||||
link: <https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before=>; rel="next",
|
||||
<https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=>; rel="first",
|
||||
<https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=MS42Njc4NDA2MjM4MzNlKzEyfExqeG5sUElvNEZMbG1XZHA5akdKTVE%3D>; rel="prev"
|
||||
```
|
||||
|
||||
Copy the corresponding pagination link into your next request. For example:
|
||||
|
||||
```shell
|
||||
curl -I -H "Authorization: Bearer TOKEN" \
|
||||
--request GET \
|
||||
"https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42Njc4NDA2MjM5NDFlKzEyfHRYa3AwSkxUd2xyRjA5bWxfOS1RbFE%3D&before="
|
||||
```
|
||||
|
||||
### Example 2: Events for pull requests in an enterprise, for a specific date and actor
|
||||
|
||||
You can specify multiple search phrases, such as `created` and `actor`, by separating them in your formed URL with the `+` symbol or ASCII character code `%20`.
|
||||
@@ -136,3 +166,9 @@ curl -H "Authorization: Bearer TOKEN" \
|
||||
--request GET \
|
||||
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=action:pull_request+created:>=2022-01-01+actor:octocat"
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 为企业中的安全设置实施策略
|
||||
intro: 您可以实施策略来管理企业组织中的安全设置,或允许在每个组织中设置策略。
|
||||
title: Enforcing policies for security settings in your enterprise
|
||||
intro: 'You can enforce policies to manage security settings in your enterprise''s organizations, or allow policies to be set in each organization.'
|
||||
permissions: Enterprise owners can enforce policies for security settings in an enterprise.
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
@@ -21,89 +21,100 @@ topics:
|
||||
- Policies
|
||||
- Security
|
||||
shortTitle: Policies for security settings
|
||||
ms.openlocfilehash: 600917881dc0850af33801bf1c544aa3ceb47574
|
||||
ms.sourcegitcommit: c562c85cc75ffe1eb4e9595d8adc09ec71697ab1
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148179963'
|
||||
---
|
||||
## 关于企业中安全设置的策略
|
||||
|
||||
您可以在 {% data variables.product.product_name %} 上实施策略以控制企业拥有的组织的安全设置。 默认情况下,组织所有者可以管理安全设置。
|
||||
## About policies for security settings in your enterprise
|
||||
|
||||
You can enforce policies to control the security settings for organizations owned by your enterprise on {% data variables.product.product_name %}. By default, organization owners can manage security settings.
|
||||
|
||||
{% ifversion ghec or ghes %}
|
||||
|
||||
## 要求企业中的组织进行双重身份验证
|
||||
## Requiring two-factor authentication for organizations in your enterprise
|
||||
|
||||
企业所有者可以要求企业拥有的所有组织中的组织成员、帐单管理员和外部协作者使用双重身份验证来保护其用户帐户。
|
||||
Enterprise owners can require that organization members, billing managers, and outside collaborators in all organizations owned by an enterprise use two-factor authentication to secure their user accounts.
|
||||
|
||||
您必须为自己的帐户启用双重身份验证,然后才能对企业拥有的所有组织都要求 2FA。 有关详细信息,请参阅“[使用双因素身份验证 (2FA) 保护帐户](/articles/securing-your-account-with-two-factor-authentication-2fa/)”。
|
||||
Before you can require 2FA for all organizations owned by your enterprise, you must enable two-factor authentication for your own account. For more information, see "[Securing your account with two-factor authentication (2FA)](/articles/securing-your-account-with-two-factor-authentication-2fa/)."
|
||||
|
||||
{% warning %}
|
||||
|
||||
警告:
|
||||
**Warnings:**
|
||||
|
||||
- 当您需要为企业进行双重身份验证时,不使用 2FA 的企业拥有的所有组织中的成员、外部协作者和帐单管理员(包括自动程序帐户)将从组织中删除,并失去对其仓库的访问权限。 他们还会失去对组织私有仓库的复刻的访问权限。 如果他们在从你的组织中删除后的三个月内为其帐户启用双因素身份验证,则可以恢复其访问特权和设置。 有关详细信息,请参阅“[恢复组织的前成员](/articles/reinstating-a-former-member-of-your-organization)”。
|
||||
- 为其帐户禁用 2FA 的企业拥有的任何组织中的任何组织所有者、成员、帐单管理员或外部协作者在你启用所需的双重身份验证后将自动从组织中删除。
|
||||
- 如果你是某个要求双因素身份验证的企业的唯一所有者,则在不为企业禁用双因素身份验证要求的情况下,你将无法为用户帐户禁用 2FA。
|
||||
- When you require two-factor authentication for your enterprise, members, outside collaborators, and billing managers (including bot accounts) in all organizations owned by your enterprise who do not use 2FA will be removed from the organization and lose access to its repositories. They will also lose access to their forks of the organization's private repositories. You can reinstate their access privileges and settings if they enable two-factor authentication for their account within three months of their removal from your organization. For more information, see "[Reinstating a former member of your organization](/articles/reinstating-a-former-member-of-your-organization)."
|
||||
- Any organization owner, member, billing manager, or outside collaborator in any of the organizations owned by your enterprise who disables 2FA for their account after you've enabled required two-factor authentication will automatically be removed from the organization.
|
||||
- If you're the sole owner of an enterprise that requires two-factor authentication, you won't be able to disable 2FA for your user account without disabling required two-factor authentication for the enterprise.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
在您要求使用双重身份验证之前,我们建议通知组织成员、外部协作者和帐单管理员,并要求他们为帐户设置双重身份验证。 组织所有者可以查看成员和外部协作者是否已在每个组织的 People(人员)页面上使用 2FA。 有关详细信息,请参阅“[查看组织中的用户是否启用了 2FA](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)”。
|
||||
Before you require use of two-factor authentication, we recommend notifying organization members, outside collaborators, and billing managers and asking them to set up 2FA for their accounts. Organization owners can see if members and outside collaborators already use 2FA on each organization's People page. For more information, see "[Viewing whether users in your organization have 2FA enabled](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
4. 在“Two-factor authentication(双重身份验证)”下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
5. 在“双因素身份验证”下,选择“要求对企业中的所有组织进行双因素身份验证”,然后单击“保存” 。
|
||||

|
||||
6. 如果出现提示,请阅读有关将从企业所拥有的组织中删除的成员和外部协作者的信息。 若要确认更改,请键入企业的名称,然后单击“删除成员并要求进行双因素身份验证”。
|
||||

|
||||
7. (可选)如果从您的企业拥有的组织中删除了任何成员或外部协作者,我们建议向他们发送邀请,以恢复其以前对组织的权限和访问权限。 每个人都必须启用双重身份验证,然后才能接受您的邀请。
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
4. Under "Two-factor authentication", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
5. Under "Two-factor authentication", select **Require two-factor authentication for all organizations in your business**, then click **Save**.
|
||||

|
||||
6. If prompted, read the information about members and outside collaborators who will be removed from the organizations owned by your enterprise. To confirm the change, type your enterprise's name, then click **Remove members & require two-factor authentication**.
|
||||

|
||||
7. Optionally, if any members or outside collaborators are removed from the organizations owned by your enterprise, we recommend sending them an invitation to reinstate their former privileges and access to your organization. Each person must enable two-factor authentication before they can accept your invitation.
|
||||
|
||||
{% endif %}
|
||||
|
||||
## 管理企业的 SSH 认证机构
|
||||
## Managing SSH certificate authorities for your enterprise
|
||||
|
||||
您可以使用 SSH 认证机构 (CA) 来允许企业拥有的任何组织的成员使用您提供的 SSH 证书访问该组织的存储库。 {% data reusables.organizations.can-require-ssh-cert %} 有关详细信息,请参阅“[关于 SSH 证书颁发机构](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)”。
|
||||
You can use a SSH certificate authorities (CA) to allow members of any organization owned by your enterprise to access that organization's repositories using SSH certificates you provide. {% data reusables.organizations.can-require-ssh-cert %} For more information, see "[About SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)."
|
||||
|
||||
{% data reusables.organizations.add-extension-to-cert %}
|
||||
|
||||
### 添加 SSH 认证中心
|
||||
### Adding an SSH certificate authority
|
||||
|
||||
如果您的企业需要 SSH 证书,企业成员应使用特殊的 URL 通过 SSH 进行 Git 操作。 有关详细信息,请参阅“[关于 SSH 证书颁发机构](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities#about-ssh-urls-with-ssh-certificates)”。
|
||||
If you require SSH certificates for your enterprise, enterprise members should use a special URL for Git operations over SSH. For more information, see "[About SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities#about-ssh-urls-with-ssh-certificates)."
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.organizations.new-ssh-ca %} {% data reusables.organizations.require-ssh-cert %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
{% data reusables.organizations.new-ssh-ca %}
|
||||
{% data reusables.organizations.require-ssh-cert %}
|
||||
|
||||
### 删除 SSH 认证中心
|
||||
### Deleting an SSH certificate authority
|
||||
|
||||
对 CA 的删除无法撤销。 如果以后要使用同一 CA,您需要重新上传该 CA。
|
||||
Deleting a CA cannot be undone. If you want to use the same CA in the future, you'll need to upload the CA again.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.organizations.delete-ssh-ca %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
{% data reusables.organizations.delete-ssh-ca %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
{% ifversion sso-redirect %}
|
||||
## Managing SSO for unauthenticated users
|
||||
|
||||
## 管理未经身份验证的用户的 SSO
|
||||
{% data reusables.enterprise-managed.sso-redirect-release-phase %}
|
||||
|
||||
如果你的企业使用 {% data variables.product.prodname_emus %},你可以选择未经身份验证的用户在尝试访问企业资源时看到的内容。 有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)”。
|
||||
If your enterprise uses {% data variables.product.prodname_emus %}, you can choose what unauthenticated users see when they attempt to access your enterprise's resources. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)."
|
||||
|
||||
默认情况下,为了隐藏专用资源的存在,当未经身份验证的用户尝试访问你的企业时,{% data variables.product.company_short %} 将显示 404 错误。
|
||||
By default, to hide the existence of private resources, when an unauthenticated user attempts to access your enterprise, {% data variables.product.company_short %} displays a 404 error.
|
||||
|
||||
为防止你的开发人员混淆,你可以更改此行为,以便用户通过标识提供者 (IdP) 自动重定向到单一登录 (SSO)。 启用自动重定向后,访问企业任何资源的 URL 的任何人都可以看到该资源是否存在。 但是,只有在他们使用你的 IdP 进行身份验证后具有适当的访问权限时,他们才能看到资源。
|
||||
To prevent confusion from your developers, you can change this behavior so that users are automatically redirected to single sign-on (SSO) through your identity provider (IdP). When you enable automatic redirects, anyone who visits the URL for any of your enterprise's resources will be able to see that the resource exists. However, they'll only be able to see the resource if they have appropriate access after authenticating with your IdP.
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:如果用户在尝试访问企业的任何资源时登录到其个人帐户,他们将被自动注销并重定向到 SSO 以登录到其 {% data variables.enterprise.prodname_managed_user %}。 有关详细信息,请参阅“[管理多个帐户](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)”。
|
||||
**Note:** If a user is signed in to their personal account when they attempt to access any of your enterprise's resources, they'll be automatically signed out and redirected to SSO to sign in to their {% data variables.enterprise.prodname_managed_user %}. For more information, see "[Managing multiple accounts](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
1. 在“单一登录设置”下,选择或取消选择“自动重定向用户以登录”。
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
1. Under "Single sign-on settings", select or deselect **Automatically redirect users to sign in**.
|
||||
|
||||

|
||||

|
||||
{% endif %}
|
||||
|
||||
## 延伸阅读
|
||||
## Further reading
|
||||
|
||||
- “[关于企业的标识和访问管理](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)”{% ifversion ghec %}
|
||||
- [访问企业的合规性报告](/admin/overview/accessing-compliance-reports-for-your-enterprise){%- endif %}
|
||||
- [保护组织安全](/organizations/keeping-your-organization-secure)
|
||||
- [使用 IP 允许列表限制网络流量](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list){%- endif %}
|
||||
- "[About identity and access management for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)"
|
||||
{%- ifversion ghec %}
|
||||
- "[Accessing compliance reports for your enterprise](/admin/overview/accessing-compliance-reports-for-your-enterprise)"
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghae %}
|
||||
- "[Restricting network traffic with an IP allow list with an IP allow list](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list)"
|
||||
{%- endif %}
|
||||
|
||||
@@ -84,11 +84,11 @@ When you authorize an {% data variables.product.prodname_oauth_app %} for your p
|
||||
|
||||
- **For organizations *without* {% data variables.product.prodname_oauth_app %} access restrictions, the application will automatically be authorized for access to that organization's resources.** For this reason, you should be careful about which {% data variables.product.prodname_oauth_apps %} you approve for access to your personal account resources as well as any organization resources.
|
||||
|
||||
If you belong to any organizations that enforce SAML single sign-on, you must have an active SAML session for each organization each time you authorize an {% data variables.product.prodname_oauth_app %}.
|
||||
If you belong to any organizations with SAML single sign-on (SSO) enabled, and you have created a linked identity for that organization by authenticating via SAML in the past, you must have an active SAML session for each organization each time you authorize an {% data variables.product.prodname_oauth_app %}.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are encountering errors authenticating to an organization that enforces SAML single sign-on, you may need to revoke the OAuth App from your [account settings page](https://github.com/settings/applications) and repeat the authentication flow to reauthorize the app.
|
||||
**Note:** If you're encountering issues with an authorized {% data variables.product.prodname_oauth_app %} or {% data variables.product.prodname_github_app %} accessing an organization that is protected by SAML, you may need to revoke the app from your [Authorized {% data variables.product.prodname_github_apps %}](https://github.com/settings/applications) or [Authorized {% data variables.product.prodname_oauth_apps %}](https://github.com/settings/apps/authorizations) page, visit the organization to authenticate and establish an active SAML session, and then attempt to reauthorize the app by accessing it.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Configuring the CodeQL workflow for compiled languages
|
||||
title: 为编译的语言配置 CodeQL 工作流
|
||||
shortTitle: Configure compiled languages
|
||||
intro: 'You can configure how {% data variables.product.prodname_dotcom %} uses the {% data variables.code-scanning.codeql_workflow %} to scan code written in compiled languages for vulnerabilities and errors.'
|
||||
intro: '可以配置 {% data variables.product.prodname_dotcom %} 如何使用 {% data variables.code-scanning.codeql_workflow %} 扫描用编译语言编写的代码以查找漏洞和错误。'
|
||||
product: '{% data reusables.gated-features.code-scanning %}'
|
||||
permissions: 'If you have write permissions to a repository, you can configure {% data variables.product.prodname_code_scanning %} for that repository.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
@@ -27,107 +27,106 @@ topics:
|
||||
- C#
|
||||
- Java
|
||||
- Kotlin
|
||||
ms.openlocfilehash: 4c594a9ca19064da6c017155fad27b37b083e7e3
|
||||
ms.sourcegitcommit: dac72908e8660cb4a347fbf73beab61034eed8c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/25/2022
|
||||
ms.locfileid: '148182264'
|
||||
---
|
||||
{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
|
||||
|
||||
## 关于 {% data variables.code-scanning.codeql_workflow %} 和编译语言
|
||||
|
||||
{% data reusables.code-scanning.beta %}
|
||||
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
|
||||
通过添加 {% data variables.product.prodname_actions %} 工作流程到仓库,设置 {% data variables.product.prodname_dotcom %} 对仓库运行 {% data variables.product.prodname_code_scanning %}。 对于 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %},可以添加 {% data variables.code-scanning.codeql_workflow %}。 有关详细信息,请参阅“[为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)”。
|
||||
|
||||
## About the {% data variables.code-scanning.codeql_workflow %} and compiled languages
|
||||
{% data reusables.code-scanning.edit-workflow %} 有关配置 {% data variables.product.prodname_code_scanning %} 和编辑工作流文件的一般信息,请参阅“[配置 {% data variables.product.prodname_code_scanning %} ](/code-security/secure-coding/configuring-code-scanning)”和“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。
|
||||
|
||||
You set up {% data variables.product.prodname_dotcom %} to run {% data variables.product.prodname_code_scanning %} for your repository by adding a {% data variables.product.prodname_actions %} workflow to the repository. For {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}, you add the {% data variables.code-scanning.codeql_workflow %}. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)."
|
||||
## 关于 {% data variables.product.prodname_codeql %} 的自动构建
|
||||
|
||||
{% data reusables.code-scanning.edit-workflow %}
|
||||
For general information about configuring {% data variables.product.prodname_code_scanning %} and editing workflow files, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" and "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
|
||||
|
||||
## About autobuild for {% data variables.product.prodname_codeql %}
|
||||
|
||||
{% data variables.product.prodname_code_scanning_capc %} works by running queries against one or more databases. Each database contains a representation of all of the code in a single language in your repository.
|
||||
For the compiled languages C/C++, C#,{% ifversion codeql-go-autobuild %} Go,{% endif %}{% ifversion codeql-kotlin-beta %} Kotlin, {% endif %} and Java, the process of populating this database involves building the code and extracting data. {% data reusables.code-scanning.analyze-go %}
|
||||
{% data variables.product.prodname_code_scanning_capc %} 的工作原理是针对一个或多个数据库运行查询。 每个数据库都包含仓库中所有代码的单一语言表示形式。
|
||||
对于编译语言 C/C++、C#、{% ifversion codeql-go-autobuild %} Go、{% endif %}{% ifversion codeql-kotlin-beta %}Kotlin {% endif %}和 Java,填充此数据库的过程涉及构建代码和提取数据。 {% data reusables.code-scanning.analyze-go %}
|
||||
|
||||
{% data reusables.code-scanning.autobuild-compiled-languages %}
|
||||
|
||||
If your workflow uses a `language` matrix, `autobuild` attempts to build each of the compiled languages listed in the matrix. Without a matrix `autobuild` attempts to build the supported compiled language that has the most source files in the repository. With the exception of Go, analysis of other compiled languages in your repository will fail unless you supply explicit build commands.
|
||||
如果你的工作流使用 `language` 矩阵,`autobuild` 会尝试生成矩阵中列出的每种编译语言。 如果不使用矩阵,则 `autobuild` 会尝试生成在存储库中具有最多源文件的受支持编译语言。 除 Go 以外,除非您提供明确的构建命令,否则您仓库中其他编译语言的分析将失败。
|
||||
|
||||
{% note %}
|
||||
|
||||
{% ifversion ghae %}
|
||||
**Note**: {% data reusables.actions.self-hosted-runners-software %}
|
||||
{% else %}
|
||||
**Note**: If you use self-hosted runners for {% data variables.product.prodname_actions %}, you may need to install additional software to use the `autobuild` process. Additionally, if your repository requires a specific version of a build tool, you may need to install it manually. For more information, see "[Specifications for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/reference/specifications-for-github-hosted-runners/#supported-software)".
|
||||
{% ifversion ghae %} **注意**:{% data reusables.actions.self-hosted-runners-software %} {% else %} **注意**:如果使用 {% data variables.product.prodname_actions %} 的自承载运行器,则可能需要安装其他软件才能使用 `autobuild` 进程。 此外,如果您的仓库需要特定版本的构建工具,您可能需要手动安装它。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 托管的运行器的规范](/actions/reference/specifications-for-github-hosted-runners/#supported-software)”。
|
||||
{% endif %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### C/C++
|
||||
|
||||
| Supported system type | System name |
|
||||
| 支持的系统类型 | 系统名称 |
|
||||
|----|----|
|
||||
| Operating system | Windows, macOS, and Linux |
|
||||
| Build system | Windows: MSbuild and build scripts<br/>Linux and macOS: Autoconf, Make, CMake, qmake, Meson, Waf, SCons, Linux Kbuild, and build scripts |
|
||||
| 操作系统 | Windows、macOS 和 Linux |
|
||||
| 构建系统 | Windows:MSbuild 和生成脚本<br/>Linux 和 macOS:Autoconf、Make、CMake、qmake、Meson、Waf、SCons、Linux Kbuild 和生成脚本 |
|
||||
|
||||
The behavior of the `autobuild` step varies according to the operating system that the extraction runs on. On Windows, the `autobuild` step attempts to autodetect a suitable build method for C/C++ using the following approach:
|
||||
`autobuild` 步骤的行为因运行提取的操作系统而异。 在 Windows 上,`autobuild` 步骤尝试使用以下方法自动检测适合 C/C++ 的生成方法:
|
||||
|
||||
1. Invoke `MSBuild.exe` on the solution (`.sln`) or project (`.vcxproj`) file closest to the root.
|
||||
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
|
||||
2. Invoke a script that looks like a build script—_build.bat_, _build.cmd_, _and build.exe_ (in that order).
|
||||
1. 对离根最近的解决方案 (`.sln`) 或项目 (`.vcxproj`) 文件调用 `MSBuild.exe`。
|
||||
如果 `autobuild` 在顶层目录下的相同(最短)深度检测到多个解决方案或项目文件,它将尝试生成所有这些文件。
|
||||
2. 调用看起来像生成脚本的脚本:build.bat、build.cmd 和 build.exe(按此顺序) 。
|
||||
|
||||
On Linux and macOS, the `autobuild` step reviews the files present in the repository to determine the build system used:
|
||||
在 Linux 和 macOS 上,`autobuild` 步骤检查存储库中存在的文件,以确定使用的生成系统:
|
||||
|
||||
1. Look for a build system in the root directory.
|
||||
2. If none are found, search subdirectories for a unique directory with a build system for C/C++.
|
||||
3. Run an appropriate command to configure the system.
|
||||
1. 在根目录中查找构建系统。
|
||||
2. 如果未找到,则搜索子目录以查找含有 C/C++ 构建系统的唯一目录。
|
||||
3. 运行适当的命令来配置系统。
|
||||
|
||||
### C#
|
||||
|
||||
| Supported system type | System name |
|
||||
| 支持的系统类型 | 系统名称 |
|
||||
|----|----|
|
||||
| Operating system | Windows and Linux |
|
||||
| Build system | .NET and MSbuild, as well as build scripts |
|
||||
| 操作系统 | Windows 和 Linux |
|
||||
| 构建系统 | .NET 和 MSbuild,以及构建脚本 |
|
||||
|
||||
The `autobuild` process attempts to autodetect a suitable build method for C# using the following approach:
|
||||
`autobuild` 进程尝试使用以下方法自动检测适合 C# 的构建方法:
|
||||
|
||||
1. Invoke `dotnet build` on the solution (`.sln`) or project (`.csproj`) file closest to the root.
|
||||
2. Invoke `MSbuild` (Linux) or `MSBuild.exe` (Windows) on the solution or project file closest to the root.
|
||||
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
|
||||
3. Invoke a script that looks like a build script—_build_ and _build.sh_ (in that order, for Linux) or _build.bat_, _build.cmd_, _and build.exe_ (in that order, for Windows).
|
||||
1. 对离根最近的解决方案 (`.sln`) 或项目 (`.csproj`) 文件调用 `dotnet build`。
|
||||
2. 对离根最近的解决方案或项目文件调用 `MSbuild` (Linux) 或 `MSBuild.exe` (Windows)。
|
||||
如果 `autobuild` 在顶层目录下的相同(最短)深度检测到多个解决方案或项目文件,它将尝试生成所有这些文件。
|
||||
3. 调用看起来像生成脚本的脚本:build 和 build.sh(对于 Linux,按此顺序)或 build.bat、build.cmd 和 build.exe(对于 Windows,按此顺序) 。
|
||||
|
||||
{% ifversion codeql-go-autobuild %}
|
||||
|
||||
### Go
|
||||
|
||||
| Supported system type | System name |
|
||||
| 支持的系统类型 | 系统名称 |
|
||||
|----|----|
|
||||
| Operating system | Windows, macOS, and Linux |
|
||||
| Build system | Go modules, `dep` and Glide, as well as build scripts including Makefiles and Ninja scripts |
|
||||
| 操作系统 | Windows、macOS 和 Linux |
|
||||
| 构建系统 | Go 模块、`dep` 和 Glide,以及生成脚本,包括 Makefiles 和 Ninja 脚本 |
|
||||
|
||||
The `autobuild` process attempts to autodetect a suitable way to install the dependencies needed by a Go repository before extracting all `.go` files:
|
||||
`autobuild` 过程尝试在提取所有 `.go` 文件之前自动检测安装 Go 存储库所需的依赖项的合适方法:
|
||||
|
||||
1. Invoke `make`, `ninja`, `./build` or `./build.sh` (in that order) until one of these commands succeeds and a subsequent `go list ./...` also succeeds, indicating that the needed dependencies have been installed.
|
||||
2. If none of those commands succeeded, look for `go.mod`, `Gopkg.toml` or `glide.yaml`, and run `go get` (unless vendoring is in use), `dep ensure -v` or `glide install` respectively to try to install dependencies.
|
||||
3. Finally, if configurations files for these dependency managers are not found, rearrange the repository directory structure suitable for addition to `GOPATH`, and use `go get` to install dependencies. The directory structure reverts to normal after extraction completes.
|
||||
4. Extract all Go code in the repository, similar to running `go build ./...`.
|
||||
1. 调用 `make`、`ninja`、`./build` 或 `./build.sh`(按该顺序),直到其中一个命令成功,后续 `go list ./...` 也成功,这表示已安装所需的依赖项。
|
||||
2. 如果这些命令都没有成功,请查找 `go.mod`、`Gopkg.toml` 或 `glide.yaml`,并分别运行 `go get`(除非正在使用供应商)、`dep ensure -v` 或 `glide install` 以尝试安装依赖项。
|
||||
3. 最后,如果未找到这些依赖项管理器的配置文件,请重新排列适合添加到 `GOPATH` 的存储库目录结构,并使用 `go get` 安装依赖项。 提取完成后,目录结构恢复为正常。
|
||||
4. 提取存储库中的所有 Go 代码,类似于运行 `go build ./...`。
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Java {% ifversion codeql-kotlin-beta %} and Kotlin {% endif %}
|
||||
### Java {% ifversion codeql-kotlin-beta %}和 Kotlin{% endif %}
|
||||
|
||||
| Supported system type | System name |
|
||||
| 支持的系统类型 | 系统名称 |
|
||||
|----|----|
|
||||
| Operating system | Windows, macOS, and Linux (no restriction) |
|
||||
| Build system | Gradle, Maven and Ant |
|
||||
| 操作系统 | Windows、macOS 和 Linux(无限制) |
|
||||
| 构建系统 | Gradle、Maven 和 Ant |
|
||||
|
||||
The `autobuild` process tries to determine the build system for Java codebases by applying this strategy:
|
||||
`autobuild` 进程尝试通过应用此策略来确定 Java 代码库的生成系统:
|
||||
|
||||
1. Search for a build file in the root directory. Check for Gradle then Maven then Ant build files.
|
||||
2. Run the first build file found. If both Gradle and Maven files are present, the Gradle file is used.
|
||||
3. Otherwise, search for build files in direct subdirectories of the root directory. If only one subdirectory contains build files, run the first file identified in that subdirectory (using the same preference as for 1). If more than one subdirectory contains build files, report an error.
|
||||
1. 在根目录中搜索构建文件。 先后检查 Gradle、Maven 和 Ant 构建文件。
|
||||
2. 运行找到的第一个构建文件。 如果 Gradle 和 Maven 文件都存在,则使用 Gradle 文件。
|
||||
3. 否则,在根目录的直接子目录中搜索构建文件。 如果只有一个子目录包含构建文件,则运行该子目录中标识的第一个文件(使用与 1 相同的首选项)。 如果多个子目录包含构建文件,则报告错误。
|
||||
|
||||
## Adding build steps for a compiled language
|
||||
## 添加编译语言的构建步骤
|
||||
|
||||
{% data reusables.code-scanning.autobuild-add-build-steps %} For information on how to edit the workflow file, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning#editing-a-code-scanning-workflow)."
|
||||
{% data reusables.code-scanning.autobuild-add-build-steps %} 有关如何编辑工作流文件的信息,请参阅“[配置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning#editing-a-code-scanning-workflow)”。
|
||||
|
||||
After removing the `autobuild` step, uncomment the `run` step and add build commands that are suitable for your repository. The workflow `run` step runs command-line programs using the operating system's shell. You can modify these commands and add more commands to customize the build process.
|
||||
删除 `autobuild` 步骤后,取消注释 `run` 步骤并添加适合存储库的生成命令。 工作流 `run` 步骤会使用操作系统的 shell 来运行命令行程序。 可以修改这些命令并添加更多命令以自定义生成过程。
|
||||
|
||||
``` yaml
|
||||
- run: |
|
||||
@@ -135,9 +134,9 @@ After removing the `autobuild` step, uncomment the `run` step and add build comm
|
||||
make release
|
||||
```
|
||||
|
||||
For more information about the `run` keyword, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
有关 `run` 关键字的详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun)”。
|
||||
|
||||
If your repository contains multiple compiled languages, you can specify language-specific build commands. For example, if your repository contains C/C++, C# and Java, and `autobuild` correctly builds C/C++ and C# but fails to build Java, you could use the following configuration in your workflow, after the `init` step. This specifies build steps for Java while still using `autobuild` for C/C++ and C#:
|
||||
如果存储库包含多个编译语言,可以指定特定于语言的生成命令。 例如,如果存储库包含 C/C++、C# 和 Java,而 `autobuild` 正确生成了 C/C++ 和 C#,但未能生成 Java,那么在 `init` 步骤之后,可以在工作流中使用以下配置。 这指定了 Java 的生成步骤,同时仍然为 C/C++ 和 C# 使用 `autobuild`:
|
||||
|
||||
```yaml
|
||||
- if: matrix.language == 'cpp' || matrix.language == 'csharp'
|
||||
@@ -151,8 +150,8 @@ If your repository contains multiple compiled languages, you can specify languag
|
||||
make release
|
||||
```
|
||||
|
||||
For more information about the `if` conditional, see "[Workflow syntax for GitHub Actions](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif)."
|
||||
有关 `if` 条件的详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif)”。
|
||||
|
||||
For more tips and tricks about why `autobuild` won't build your code, see "[Troubleshooting the {% data variables.product.prodname_codeql %} workflow](/code-security/secure-coding/troubleshooting-the-codeql-workflow)."
|
||||
有关为什么 `autobuild` 无法生成代码的更多提示和技巧,请参阅“[{% data variables.product.prodname_codeql %} 工作流故障排除](/code-security/secure-coding/troubleshooting-the-codeql-workflow)”。
|
||||
|
||||
If you added manual build steps for compiled languages and {% data variables.product.prodname_code_scanning %} is still not working on your repository, contact {% data variables.contact.contact_support %}.
|
||||
如果您为编译语言添加了手动构建步骤,但 {% data variables.product.prodname_code_scanning %} 仍然无法处理您的仓库,请联系 {% data variables.contact.contact_support %}。
|
||||
|
||||
@@ -25,10 +25,9 @@ shortTitle: Enable push protection
|
||||
Up to now, {% data variables.product.prodname_secret_scanning_GHAS %} checks for secrets _after_ a push and alerts users to exposed secrets. {% data reusables.secret-scanning.push-protection-overview %}
|
||||
|
||||
If a contributor bypasses a push protection block for a secret, {% data variables.product.prodname_dotcom %}:
|
||||
- generates an alert.
|
||||
- creates an alert in the "Security" tab of the repository.
|
||||
- creates an alert in the "Security" tab of the repository in the state described in the table below.
|
||||
- adds the bypass event to the audit log.{% ifversion secret-scanning-push-protection-email %}
|
||||
- sends an email alert to organization owners, security managers, and repository administrators, with a link to the related secret and the reason why it was allowed.{% endif %}
|
||||
- sends an email alert to organization owners, security managers, and repository administrators who are watching the repository, with a link to the secret and the reason why it was allowed.{% endif %}
|
||||
|
||||
{% data reusables.secret-scanning.bypass-reasons-and-alerts %}
|
||||
|
||||
|
||||
@@ -37,9 +37,11 @@ You can secure the code you depend on by creating a vulnerability management pro
|
||||
|
||||
1. Create an inventory of your dependencies.
|
||||
|
||||
2. Know when there is a security vulnerability in a dependency.
|
||||
1. Know when there is a security vulnerability in a dependency.
|
||||
{% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %}
|
||||
1. Enforce dependency reviews on your pull requests.{% endif %}
|
||||
|
||||
3. Assess the impact of that vulnerability on your code and decide what action to take.
|
||||
1. Assess the impact of that vulnerability on your code and decide what action to take.
|
||||
|
||||
### Automatic inventory generation
|
||||
|
||||
@@ -48,6 +50,11 @@ As a first step, you want to make a complete inventory of your dependencies. The
|
||||
### Automatic detection of vulnerabilities in dependencies
|
||||
|
||||
{% data variables.product.prodname_dependabot %} can help you by monitoring your dependencies and notifying you when they contain a known vulnerability. {% ifversion fpt or ghec or ghes %}You can even enable {% data variables.product.prodname_dependabot %} to automatically raise pull requests that update the dependency to a secure version.{% endif %} For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)"{% ifversion fpt or ghec or ghes %} and "[About Dependabot security updates](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)"{% endif %}.
|
||||
{% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %}
|
||||
### Automatic detection of vulnerabilities in pull requests
|
||||
|
||||
The {% data variables.product.prodname_dependency_review_action %} enforces a dependency review on your pull requests, making it easy for you to see if a pull request will introduce a vulnerable version of a dependency to your repository. When a vulnerability is detected, the {% data variables.product.prodname_dependency_review_action %} can block the pull request from merging. For more information, see "[Dependency review enforcement](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement)."{% endif %}
|
||||
|
||||
|
||||
### Assessment of exposure to risk from a vulnerable dependency
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: About supply chain security
|
||||
intro: '{% data variables.product.product_name %} helps you secure your supply chain, from understanding the dependencies in your environment, to knowing about vulnerabilities in those dependencies{% ifversion fpt or ghec or ghes %}, and patching them{% endif %}.'
|
||||
title: 关于供应链安全性
|
||||
intro: '{% data variables.product.product_name %} 有助于保护供应链,通过从了解环境中的依赖项到了解这些依赖项中的漏洞{% ifversion fpt or ghec or ghes %}并修补它们得以实现{% endif %}。'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: Supply chain security
|
||||
redirect_from:
|
||||
@@ -19,160 +19,157 @@ topics:
|
||||
- Dependencies
|
||||
- Pull requests
|
||||
- Repositories
|
||||
ms.openlocfilehash: d0f743db7d1f5a054a3eb8c7b4dbf81052aca50f
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181234'
|
||||
---
|
||||
## 关于 GitHub 上的供应链安全性
|
||||
|
||||
## About supply chain security at GitHub
|
||||
随着开放源代码的加速使用,大多数项目都依赖于数百个开源依赖项。 这就带来了一个安全问题:如果你正在使用的依赖项有漏洞,该怎么办? 你可能会使用户面临供应链攻击的风险。 保护供应链最重要的操作之一就是修补易受攻击的依赖项{% ifversion GH-advisory-db-supports-malware %}并替换任何恶意软件{% endif %}。
|
||||
|
||||
With the accelerated use of open source, most projects depend on hundreds of open-source dependencies. This poses a security problem: what if the dependencies you're using are vulnerable? You could be putting your users at risk of a supply chain attack. One of the most important things you can do to protect your supply chain is to patch your vulnerable dependencies{% ifversion GH-advisory-db-supports-malware %} and replace any malware{% endif %}.
|
||||
当你在清单文件或锁定文件中指定依赖项时,可以直接将它们添加到供应链。 依赖项也可以通过可传递方式包含在内,也就是说,即使你没有指定某个特定的依赖项,但你的某个依赖项使用了它,那么你也会依赖于该依赖项。
|
||||
|
||||
You add dependencies directly to your supply chain when you specify them in a manifest file or a lockfile. Dependencies can also be included transitively, that is, even if you don’t specify a particular dependency, but a dependency of yours uses it, then you’re also dependent on that dependency.
|
||||
{% data variables.product.product_name %} 提供了一系列功能,可帮助你了解环境中的依赖项{% ifversion ghae %},并了解这些依赖项中的漏洞{% endif %}{% ifversion fpt or ghec or ghes %},了解这些依赖项中的漏洞并进行修补{% endif %}。
|
||||
|
||||
{% data variables.product.product_name %} offers a range of features to help you understand the dependencies in your environment{% ifversion ghae %} and know about vulnerabilities in those dependencies{% endif %}{% ifversion fpt or ghec or ghes %}, know about vulnerabilities in those dependencies, and patch them{% endif %}.
|
||||
{% data variables.product.product_name %} 上的供应链功能包括:
|
||||
- **依赖项关系图**
|
||||
- **依赖项审查**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} ** {% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_updates %}
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}{% endif %}
|
||||
|
||||
The supply chain features on {% data variables.product.product_name %} are:
|
||||
- **Dependency graph**
|
||||
- **Dependency review**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} **
|
||||
{% ifversion fpt or ghec or ghes %}- **{% data variables.product.prodname_dependabot_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**{% endif %}
|
||||
依赖项关系图是供应链安全性的核心。 依赖项关系图标识了存储库或包的所有上游依赖项和公共下游依赖项。 你可以在存储库的依赖项关系图上看到存储库的依赖项和它们的一些属性,例如漏洞信息。
|
||||
|
||||
The dependency graph is central to supply chain security. The dependency graph identifies all upstream dependencies and public downstream dependents of a repository or package. You can see your repository’s dependencies and some of their properties, like vulnerability information, on the dependency graph for the repository.
|
||||
{% data variables.product.prodname_dotcom %} 上的其他供应链功能依赖于依赖项关系图提供的信息。
|
||||
|
||||
Other supply chain features on {% data variables.product.prodname_dotcom %} rely on the information provided by the dependency graph.
|
||||
- 依赖项审查使用依赖项关系图来标识依赖项更改,在你审查拉取请求时,可帮助你了解这些更改的安全影响。
|
||||
- {% data variables.product.prodname_dependabot %} 通过 {% data variables.product.prodname_advisory_database %} 中发布的公告列表交叉引用依赖项关系图提供的依赖项数据,扫描依赖项并在检测到潜在漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}时生成 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
{% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_security_updates %}通过依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %}来帮助你更新存储库中有已知漏洞的依赖项。
|
||||
|
||||
- Dependency review uses the dependency graph to identify dependency changes and help you understand the security impact of these changes when you review pull requests.
|
||||
- {% data variables.product.prodname_dependabot %} cross-references dependency data provided by the dependency graph with the list of advisories published in the {% data variables.product.prodname_advisory_database %}, scans your dependencies and generates {% data variables.product.prodname_dependabot_alerts %} when a potential vulnerability {% ifversion GH-advisory-db-supports-malware %}or malware{% endif %} is detected.
|
||||
{% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_security_updates %} use the dependency graph and {% data variables.product.prodname_dependabot_alerts %} to help you update dependencies with known vulnerabilities in your repository.
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %} don't use the dependency graph and rely on the semantic versioning of dependencies instead. {% data variables.product.prodname_dependabot_version_updates %} help you keep your dependencies updated, even when they don’t have any vulnerabilities.
|
||||
{% data variables.product.prodname_dependabot_version_updates %}不使用依赖项关系图,而是依赖于依赖项的语义版本控制。 {% data variables.product.prodname_dependabot_version_updates %}可帮助你使依赖项保持最新,即使它们没有任何漏洞。
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
For best practice guides on end-to-end supply chain security including the protection of personal accounts, code, and build processes, see "[Securing your end-to-end supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)."
|
||||
{% ifversion fpt or ghec or ghes %} 有关端到端供应链安全性的最佳做法指南,包括如何保护个人帐户、代码和生成流程,请参阅“[保护端到端供应链](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)”。
|
||||
{% endif %}
|
||||
|
||||
## Feature overview
|
||||
## 功能概述
|
||||
|
||||
### What is the dependency graph
|
||||
### 什么是依赖项关系图
|
||||
|
||||
To generate the dependency graph, {% data variables.product.company_short %} looks at a repository’s explicit dependencies declared in the manifest and lockfiles. When enabled, the dependency graph automatically parses all known package manifest files in the repository, and uses this to construct a graph with known dependency names and versions.
|
||||
为了生成依赖项关系图,{% data variables.product.company_short %} 会查看清单和锁定文件中声明的存储库显式依赖项。 启用后,依赖项关系图会自动分析存储库中的所有已知包清单文件,并以此来构造一个包含已知依赖项名称和版本的关系图。
|
||||
|
||||
- The dependency graph includes information on your _direct_ dependencies and _transitive_ dependencies.
|
||||
- The dependency graph is automatically updated when you push a commit to {% data variables.product.company_short %} that changes or adds a supported manifest or lock file to the default branch, and when anyone pushes a change to the repository of one of your dependencies.
|
||||
- You can see the dependency graph by opening the repository's main page on {% data variables.product.product_name %}, and navigating to the **Insights** tab.
|
||||
- 依赖项关系图包含有关直接依赖项和可传递依赖项的信息。
|
||||
- 当你将提交推送到 {% data variables.product.company_short %} 以更改受支持的清单或锁定文件或者将其添加到默认分支时,以及当任何人将更改推送到某个依赖项的存储库时,依赖项关系图会自动更新。
|
||||
- 可以通过打开 {% data variables.product.product_name %} 上的存储库主页,并导航到“见解”选项卡来查看依赖项关系图。
|
||||
|
||||
{% ifversion dependency-submission-api %}
|
||||
{% data reusables.dependency-submission.dependency-submission-link %}
|
||||
{% endif %}
|
||||
{% ifversion dependency-submission-api %} {% data reusables.dependency-submission.dependency-submission-link %} {% endif %}
|
||||
|
||||
For more information about the dependency graph, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)."
|
||||
有关依赖项关系图的详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。
|
||||
|
||||
### What is dependency review
|
||||
### 什么是依赖项审查
|
||||
|
||||
Dependency review helps reviewers and contributors understand dependency changes and their security impact in every pull request.
|
||||
依赖项审查可帮助审阅者和参与者了解每个拉取请求中的依赖项更改及其安全性影响。
|
||||
|
||||
- Dependency review tells you which dependencies were added, removed, or updated, in a pull request. You can use the release dates, popularity of dependencies, and vulnerability information to help you decide whether to accept the change.
|
||||
- You can see the dependency review for a pull request by showing the rich diff on the **Files Changed** tab.
|
||||
- 依赖项审查会在拉取请求中告知你已经添加、移除或更新了哪些依赖项。 你可以使用发布日期、依赖项的受欢迎程度和漏洞信息来帮助决定是否接受更改。
|
||||
- 可以通过在“已更改的文件”选项卡上显示多差异来查看拉取请求的依赖项审查。
|
||||
|
||||
For more information about dependency review, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)."
|
||||
有关依赖项审查的详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)”。
|
||||
|
||||
### What is Dependabot
|
||||
### 什么是 Dependabot
|
||||
|
||||
{% data variables.product.prodname_dependabot %} keeps your dependencies up to date by informing you of any security vulnerabilities in your dependencies{% ifversion fpt or ghec or ghes %}, and automatically opens pull requests to upgrade your dependencies to the next available secure version when a {% data variables.product.prodname_dependabot %} alert is triggered, or to the latest version when a release is published{% else %} so that you can update that dependency{% endif %}.
|
||||
{% data variables.product.prodname_dependabot %} 通过告知你的依赖项中的任何安全漏洞使依赖项保持最新{% ifversion fpt or ghec or ghes %},并自动提交拉取请求,以便在触发 {% data variables.product.prodname_dependabot %} 警报时将依赖项升级到下一个可用的安全版本,或者在版本发布时将依赖项升级到最新版本,{% else %}这样你就可以更新该依赖项{% endif %}。
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
The term "{% data variables.product.prodname_dependabot %}" encompasses the following features:
|
||||
- {% data variables.product.prodname_dependabot_alerts %}—Displayed notification on the **Security** tab for the repository, and in the repository's dependency graph. The alert includes a link to the affected file in the project, and information about a fixed version.
|
||||
- {% data variables.product.prodname_dependabot_updates %}:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}—Triggered updates to upgrade your dependencies to a secure version when an alert is triggered.
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}—Scheduled updates to keep your dependencies up to date with the latest version.
|
||||
{% ifversion fpt or ghec or ghes %}术语“{% data variables.product.prodname_dependabot %}”包含了以下功能:
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 在存储库的“安全性”选项卡上以及存储库的依赖项关系图中显示通知。 该警报包括指向项目中受影响的文件的链接,以及有关修复的版本的信息。
|
||||
- {% data variables.product.prodname_dependabot_updates %}:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 触发更新以在触发警报时将依赖项升级到安全版本。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 计划更新以使依赖项始终是最新版本。
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dependabot_security_updates %}, and {% data variables.product.prodname_dependabot_version_updates %} do not use {% data variables.product.prodname_actions %} when they run on {% data variables.product.product_name %}. However, pull requests opened by {% data variables.product.prodname_dependabot %} can trigger workflows that run actions. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)."
|
||||
{% data variables.product.prodname_dependabot_alerts %}、{% data variables.product.prodname_dependabot_security_updates %} 和 {% data variables.product.prodname_dependabot_version_updates %} 在 {% data variables.product.product_name %} 上运行时不使用 {% data variables.product.prodname_actions %}。 但是,由 {% data variables.product.prodname_dependabot %} 打开的拉取请求可能会触发运行操作的工作流。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)”。
|
||||
|
||||
{% elsif ghes %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %} and {% data variables.product.prodname_dependabot_version_updates %} require {% data variables.product.prodname_actions %} to run on {% data variables.product.product_name %}. {% data variables.product.prodname_dependabot_alerts %} do not require {% data variables.product.prodname_actions %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
{% data variables.product.prodname_dependabot_security_updates %} 和 {% data variables.product.prodname_dependabot_version_updates %} 要求 {% data variables.product.prodname_actions %} 在 {% data variables.product.product_name %} 上运行。 {% data variables.product.prodname_dependabot_alerts %} 不需要 {% data variables.product.prodname_actions %}。 有关详细信息,请参阅“[对企业启用 {% data variables.product.prodname_dependabot %}](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% data variables.product.prodname_actions %} is not required for {% data variables.product.prodname_dependabot_alerts %} to run on {% data variables.product.product_name %}.
|
||||
{% data variables.product.prodname_dependabot_alerts %} 不需要 {% data variables.product.prodname_actions %} 才能在 {% data variables.product.product_name %} 上运行。
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion dependabot-actions-support %}
|
||||
|
||||
{% data reusables.dependabot.dependabot-actions-support %} For more information, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)."
|
||||
{% data reusables.dependabot.dependabot-actions-support %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)”。
|
||||
|
||||
{% endif %}
|
||||
|
||||
#### What are Dependabot alerts
|
||||
#### 什么是 Dependabot 警报
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} highlight repositories affected by a newly discovered vulnerability based on the dependency graph and the {% data variables.product.prodname_advisory_database %}, which contains advisories for known vulnerabilities{% ifversion GH-advisory-db-supports-malware %} and malware{% endif %}.
|
||||
{% data variables.product.prodname_dependabot_alerts %} 基于依赖项关系图和 {% data variables.product.prodname_advisory_database %} 突出显示了受新发现的漏洞影响的存储库,其中包含已知漏洞{% ifversion GH-advisory-db-supports-malware %}和恶意软件{% endif %}的公告。
|
||||
|
||||
- {% data variables.product.prodname_dependabot %} performs a scan to detect insecure dependencies and sends {% data variables.product.prodname_dependabot_alerts %} when:
|
||||
{% ifversion fpt or ghec %}
|
||||
- A new advisory is added to the {% data variables.product.prodname_advisory_database %}.{% else %}
|
||||
- New advisory data is synchronized to {% data variables.location.product_location %} each hour from {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- The dependency graph for the repository changes.
|
||||
- {% data variables.product.prodname_dependabot_alerts %} are displayed {% ifversion fpt or ghec or ghes %} on the **Security** tab for the repository and{% endif %} in the repository's dependency graph. The alert includes {% ifversion fpt or ghec or ghes %}a link to the affected file in the project, and {% endif %}information about a fixed version.
|
||||
- {% data variables.product.prodname_dependabot %} 执行扫描以检测不安全的依赖项,并在以下情况下发送 {% data variables.product.prodname_dependabot_alerts %}:{% ifversion fpt or ghec %}
|
||||
- 新公告添加到 {% data variables.product.prodname_advisory_database %}。{% else %}
|
||||
- 新公告数据每小时从 {% data variables.product.prodname_dotcom_the_website %} 同步到 {% data variables.location.product_location %}。 {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- 存储库的依赖关系图发生更改。
|
||||
- {% data variables.product.prodname_dependabot_alerts %} 显示在{% ifversion fpt or ghec or ghes %}存储库的“安全性”选项卡上,以及{% endif %}存储库的依赖项关系图中。 警报包括项目中受影响文件的{% ifversion fpt or ghec or ghes %}链接,以及{% endif %}有关已修复的版本的信息。
|
||||
|
||||
For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)."
|
||||
有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)”。
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
#### What are Dependabot updates
|
||||
#### 什么是 Dependabot 更新
|
||||
|
||||
There are two types of {% data variables.product.prodname_dependabot_updates %}: {% data variables.product.prodname_dependabot %} _security_ updates and _version_ updates. {% data variables.product.prodname_dependabot %} generates automatic pull requests to update your dependencies in both cases, but there are several differences.
|
||||
有两种类型的 {% data variables.product.prodname_dependabot_updates %}:{% data variables.product.prodname_dependabot %}安全更新和版本更新。 {% data variables.product.prodname_dependabot %} 会生成自动拉取请求以在这两种情况下更新依赖项,但存在一些差异。
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %}:
|
||||
- Triggered by a {% data variables.product.prodname_dependabot %} alert
|
||||
- Update dependencies to the minimum version that resolves a known vulnerability
|
||||
- Supported for ecosystems the dependency graph supports
|
||||
- Does not require a configuration file, but you can use one to override the default behavior
|
||||
{% data variables.product.prodname_dependabot_security_updates %}:
|
||||
- 由 {% data variables.product.prodname_dependabot %} 警报触发
|
||||
- 将依赖项更新到可修复已知漏洞的最低版本
|
||||
- 支持用于依赖项关系图支持的生态系统
|
||||
- 不需要配置文件,但可使用配置文件来替代默认行为
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %}:
|
||||
- Requires a configuration file
|
||||
- Run on a schedule you configure
|
||||
- Update dependencies to the latest version that matches the configuration
|
||||
- Supported for a different group of ecosystems
|
||||
{% data variables.product.prodname_dependabot_version_updates %}:
|
||||
- 需要配置文件
|
||||
- 按配置的计划运行
|
||||
- 将依赖项更新到与配置匹配的最新版本
|
||||
- 支持用于不同类别的生态系统
|
||||
|
||||
For more information about {% data variables.product.prodname_dependabot_updates %}, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)" and "[About {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)."
|
||||
有关 {% data variables.product.prodname_dependabot_updates %}的详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)”和“[关于 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)”。
|
||||
{% endif %}
|
||||
|
||||
## Feature availability
|
||||
## 功能可用性
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
Public repositories:
|
||||
- **Dependency graph**—enabled by default and cannot be disabled.
|
||||
- **Dependency review**—enabled by default and cannot be disabled.
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. {% data variables.product.prodname_dotcom %} detects insecure dependencies and displays information in the dependency graph, but does not generate {% data variables.product.prodname_dependabot_alerts %} by default. Repository owners or people with admin access can enable {% data variables.product.prodname_dependabot_alerts %}.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
公共存储库:
|
||||
- 依赖项关系图 - 默认已启用,不能禁用。
|
||||
- 依赖项审查 - 默认已启用,不能禁用。
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 {% data variables.product.prodname_dotcom %} 检测不安全的依赖项,并在依赖项关系图中显示信息,但默认情况下不会生成 {% data variables.product.prodname_dependabot_alerts %}。 存储库所有者或具有管理员访问权限的人员可以启用 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
你也可以为用户帐户或组织拥有的所有存储库启用或禁用 Dependabot 警报。 有关详细信息,请参阅“[管理用户帐户的安全和分析设置](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)”。
|
||||
|
||||
Private repositories:
|
||||
- **Dependency graph**—not enabled by default. The feature can be enabled by repository administrators. For more information, see "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
专用存储库:
|
||||
- 依赖项关系图 - 默认未启用。 存储库管理员可以启用该功能。 有关详细信息,请参阅“[探索存储库的依赖项](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)”。
|
||||
{% ifversion fpt %}
|
||||
- **Dependency review**—available in private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review).
|
||||
- 依赖项审查 - 可用于使用 {% data variables.product.prodname_ghe_cloud %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证的组织所拥有的专用存储库。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)。
|
||||
{% elsif ghec %}
|
||||
- **Dependency review**—available in private repositories owned by organizations provided you have a license for {% data variables.product.prodname_GH_advanced_security %} and the dependency graph enabled. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)" and "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% endif %}
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Owners of private repositories, or people with admin access, can enable {% data variables.product.prodname_dependabot_alerts %} by enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for their repositories.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
- 依赖项审查 - 在组织拥有的专用存储库中可用,前提是你具有 {% data variables.product.prodname_GH_advanced_security %} 许可证并启用了依赖项关系图。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”和“[浏览存储库的依赖项](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)”。 {% endif %}
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 私有仓库的所有者或具有管理员权限的人员可以通过为其仓库启用依赖关系图和 {% data variables.product.prodname_dependabot_alerts %} 来启用 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
你也可以为用户帐户或组织拥有的所有存储库启用或禁用 Dependabot 警报。 有关详细信息,请参阅“[管理用户帐户的安全和分析设置](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)”。
|
||||
|
||||
Any repository type:
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
任意存储库类型:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 默认未启用。 您可以为任何使用 {% data variables.product.prodname_dependabot_alerts %} 和依赖关系图的仓库启用 {% data variables.product.prodname_dependabot_security_updates %}。 若要了解如何启用安全更新,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)”。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 默认未启用。 拥有存储库写入权限的用户可以启用 {% data variables.product.prodname_dependabot_version_updates %}。 若要了解如何启用版本更新,请参阅“[配置 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)”。
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
- **Dependency graph** and **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Both features are configured at an enterprise level by the enterprise owner. For more information, see {% ifversion ghes %}"[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)" and {% endif %}"[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
- **Dependency review**—available when dependency graph is enabled for {% data variables.location.product_location %} and {% data variables.product.prodname_advanced_security %} is enabled for the organization or repository. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)."
|
||||
{% endif %}
|
||||
{% ifversion ghes %}
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
- 依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 这两项功能由企业所有者在企业级别进行配置。 有关详细信息,请参阅 {% ifversion ghes %}“[为企业启用依赖项关系图](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)和 {% endif %}“[为企业启用 {% data variables.product.prodname_dependabot %} ](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。
|
||||
- 依赖项审查 - 为 {% data variables.location.product_location %} 启用依赖项关系图并为组织或存储库启用 {% data variables.product.prodname_advanced_security %} 时可用。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”。
|
||||
{% endif %} {% ifversion ghes %}
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 默认未启用。 您可以为任何使用 {% data variables.product.prodname_dependabot_alerts %} 和依赖关系图的仓库启用 {% data variables.product.prodname_dependabot_security_updates %}。 若要了解如何启用安全更新,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)”。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 默认未启用。 拥有存储库写入权限的用户可以启用 {% data variables.product.prodname_dependabot_version_updates %}。 若要了解如何启用版本更新,请参阅“[配置 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)”。
|
||||
{% endif %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 停止和启动 codespace
|
||||
intro: 可停止和启动 codespace 以保存资源和暂停工作。
|
||||
title: Stopping and starting a codespace
|
||||
intro: 'You can stop and start your codespace to save resources and to pause work.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
@@ -10,33 +10,28 @@ topics:
|
||||
- Fundamentals
|
||||
- Developer
|
||||
shortTitle: Stop a codespace
|
||||
ms.openlocfilehash: 290a39d9d60420230bd9b11d5e2d10119ccc1c72
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148158803'
|
||||
---
|
||||
|
||||
{% jetbrains %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
|
||||
|
||||
{% endjetbrains %}
|
||||
|
||||
## 关于停止和启动 codespace
|
||||
## About stopping and starting a codespace
|
||||
|
||||
{% data reusables.codespaces.stopping-a-codespace %}
|
||||
|
||||
无论在何处创建或访问 codespace,都可以通过浏览器在 https://github.com/codespaces 中查看和管理它们。
|
||||
Regardless of where you created or access your codespaces, you can view and manage them in your browser at https://github.com/codespaces.
|
||||
|
||||
## 停止代码空间
|
||||
## Stopping a codespace
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces-page %}
|
||||
1. 单击要停止的 codespace 右侧的省略号 (...)。
|
||||
1. 单击“停止 codespace”。
|
||||

|
||||
1. To the right of the codespace you want to stop, click the elipsis (**...**).
|
||||
1. Click **Stop codespace**.
|
||||

|
||||
|
||||
{% endwebui %}
|
||||
|
||||
@@ -44,7 +39,7 @@ ms.locfileid: '148158803'
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
要停止 codespace,请使用 `gh codespace stop` 子命令,然后从显示的列表中选择该 codespace。
|
||||
To stop a codespace use the `gh codespace stop` subcommand and then choose the codespace you want to stop from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace stop
|
||||
@@ -55,41 +50,38 @@ ms.locfileid: '148158803'
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.vs-code.open-command-palette %}
|
||||
1. 键入 `stop` 并从选项列表中选择“Codespaces: 停止 Codespace”。
|
||||
1. 在 codespace 列表中,选择要停止的 codespace。
|
||||
1. Type `stop` and select **Codespaces: Stop Codespace** from the list of options.
|
||||
1. In the list of codespaces, select the codespace you want to stop.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% jetbrains %}
|
||||
|
||||
{% data reusables.codespaces.jetbrains-open-codespace-plugin %}
|
||||
1. 在 {% data variables.product.prodname_github_codespaces %} 工具窗口中,单击“停止”图标。
|
||||
|
||||

|
||||
You can stop a codespace from the "Your codespaces" page (see [the web browser instructions](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace?tool=webui#stopping-a-codespace)) or by using {% data variables.product.prodname_cli %} (see [the CLI instructions](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace?tool=cli#stopping-a-codespace)).
|
||||
|
||||
{% endjetbrains %}
|
||||
|
||||
## 重启 codespace
|
||||
## Restarting a codespace
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces-page %}
|
||||
1. 单击要重启的 codespace 的名称。
|
||||

|
||||
1. Click the name of the codespace you want to restart.
|
||||

|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
重启 codespace 时,可选择在 {% data variables.product.prodname_vscode %} 或浏览器中将其打开。
|
||||
When you restart a codespace you can choose to open it in {% data variables.product.prodname_vscode %} or in your browser.
|
||||
|
||||
- 要重启 codespace 并在 {% data variables.product.prodname_vscode %} 中将其打开,请使用 `gh codespace code` 子命令,然后从显示的列表中选择要重启的 codespace。
|
||||
- To restart a codespace and open it in {% data variables.product.prodname_vscode %}, use the `gh codespace code` subcommand and then choose the codespace you want to restart from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace code
|
||||
```
|
||||
|
||||
- 要重启 codespace 并在浏览器中将其打开,请使用 `gh codespace open --web` 子命令,然后从显示的列表中选择要重启的 codespace。
|
||||
- To restart a codespace and open it in your browser, use the `gh codespace open --web` subcommand and then choose the codespace you want to restart from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace open --web
|
||||
@@ -100,8 +92,8 @@ ms.locfileid: '148158803'
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.vs-code.open-command-palette %}
|
||||
1. 键入 `connect` 并从选项列表中选择“Codespaces: 连接到 Codespace”。
|
||||
1. 在 codespace 列表中,选择要重启的 codespace。
|
||||
1. Type `connect` and select **Codespaces: Connect to Codespace** from the list of options.
|
||||
1. In the list of codespaces, select the codespace you want to restart.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
@@ -111,6 +103,6 @@ ms.locfileid: '148158803'
|
||||
|
||||
{% endjetbrains %}
|
||||
|
||||
## 延伸阅读
|
||||
## Further reading
|
||||
|
||||
- [codespace 生命周期](/codespaces/developing-in-codespaces/the-codespace-lifecycle)
|
||||
- "[The codespace lifecycle](/codespaces/developing-in-codespaces/the-codespace-lifecycle)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 开发容器简介
|
||||
intro: 在 codespace 中工作时,你工作所处的环境是使用托管在虚拟机上的开发容器创建的。
|
||||
title: Introduction to dev containers
|
||||
intro: 'When you work in a codespace, the environment you are working in is created using a development container, or dev container, hosted on a virtual machine.'
|
||||
permissions: People with write permissions to a repository can create or edit the codespace configuration.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/configuring-github-codespaces-for-your-project
|
||||
@@ -16,76 +16,71 @@ topics:
|
||||
- Codespaces
|
||||
- Set up
|
||||
- Fundamentals
|
||||
ms.openlocfilehash: 0b47f0292eb3a13467a8227ac323d289f9712223
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148158771'
|
||||
---
|
||||
## 关于开发容器
|
||||
|
||||
开发容器是 Docker 容器,是为了提供功能齐全的开发环境专门配置的。 只要在 codespace 中运作,都是在虚拟机上使用开发容器。
|
||||
## About dev containers
|
||||
|
||||
可以为存储库配置开发容器,以便为该存储库创建的 codespace 能够为你提供定制的开发环境,其中包含处理特定项目所需的所有工具和运行时。 如果未在存储库中定义配置,则 {% data variables.product.prodname_github_codespaces %} 使用默认配置,其中包含团队在开发项目时可能需要的许多常用工具。 有关详细信息,请参阅“[使用默认开发容器配置](#using-the-default-dev-container-configuration)”。
|
||||
Development containers, or dev containers, are Docker containers that are specifically configured to provide a fully featured development environment. Whenever you work in a codespace, you are using a dev container on a virtual machine.
|
||||
|
||||
开发容器的配置文件包含在存储库的 `.devcontainer` 目录中。 可以使用 {% data variables.product.prodname_vscode %} 为你添加配置文件。 可以从各种项目类型的预定义配置中进行选择。 无需进一步配置即可使用这些配置,也可以编辑这些配置以优化它们生成的开发环境。 有关详细信息,请参阅“[使用预定义的开发容器配置](#using-a-predefined-dev-container-configuration)”。
|
||||
You can configure the dev container for a repository so that codespaces created for that repository give you a tailored development environment, complete with all the tools and runtimes you need to work on a specific project. If you don't define a configuration in the repository then {% data variables.product.prodname_github_codespaces %} uses a default configuration, which contains many of the common tools that your team might need for development with your project. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
或者,可以添加自己的自定义配置文件。 有关详细信息,请参阅“[创建自定义开发容器配置](#creating-a-custom-dev-container-configuration)”。
|
||||
The configuration files for a dev container are contained in a `.devcontainer` directory in your repository. You can use {% data variables.product.prodname_vscode %} to add configuration files for you. You can choose from a selection of predefined configurations for various project types. You can use these without further configuration, or you can edit the configurations to refine the development environment they produce. For more information, see "[Using a predefined dev container configuration](#using-a-predefined-dev-container-configuration)."
|
||||
|
||||
可以为存储库定义单个开发容器配置、为不同分支定义不同配置或多个配置。 当有多个配置可用时,用户可以在创建 codespace 时选择其首选配置。 这对于包含不同编程语言或不同项目的源代码的大型存储库尤其有用。 你可以创建一个配置选择,允许不同的团队使用为他们正在进行的工作设置的相应 codespace。
|
||||
Alternatively, you can add your own custom configuration files. For more information, see "[Creating a custom dev container configuration](#creating-a-custom-dev-container-configuration)."
|
||||
|
||||
根据模板创建 codespace 时,可以从工作区中的一个或多个开发容器配置文件开始。 若要进一步配置环境,可以从这些文件添加或删除设置,并重新生成容器,将更改应用到你正在使用的 codespace。 如果将 codespace 发布到 {% data variables.product.product_name %} 上的存储库,则从该存储库创建的任何 codespace 都将共享已定义的配置。 有关详细信息,请参阅“[将配置更改应用于 codespace](#applying-configuration-changes-to-a-codespace)”和“[根据模板创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template#publishing-to-a-remote-repository)”。
|
||||
You can define a single dev container configuration for a repository, different configurations for different branches, or multiple configurations. When multiple configurations are available, users can choose their preferred configuration when they create a codespace. This is particularly useful for large repositories that contain source code in different programming languages or for different projects. You can create a choice of configurations that allow different teams to work in a codespace that's set up appropriately for the work they are doing.
|
||||
|
||||
When you create a codespace from a template, you might start with one or more dev container configuration files in your workspace. To configure your environment further, you can add or remove settings from these files and rebuild the container to apply the changes to the codespace you're working in. If you publish your codespace to a repository on {% data variables.product.product_name %}, then any codespaces created from that repository will share the configuration you've defined. For more information, see "[Applying configuration changes to a codespace](#applying-configuration-changes-to-a-codespace)" and "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template#publishing-to-a-remote-repository)."
|
||||
|
||||
### devcontainer.json
|
||||
|
||||
开发容器配置中的主文件是 `devcontainer.json` 文件。 可以使用此文件来确定为存储库创建的 codespace 环境。 此文件的内容定义了开发容器,它可以包括框架、工具、扩展和端口转发。 `devcontainer.json` 文件通常包含对 Dockerfile 的引用,Dockerfile 通常与 `devcontainer.json` 文件放在一起。
|
||||
The primary file in a dev container configuration is the `devcontainer.json` file. You can use this file to determine the environment of codespaces created for your repository. The contents of this file define a dev container that can include frameworks, tools, extensions, and port forwarding. The `devcontainer.json` file usually contains a reference to a Dockerfile, which is typically located alongside the `devcontainer.json` file.
|
||||
|
||||
如果从没有 `devcontainer.json` 文件的存储库创建 codespace,或者根据 {% data variables.product.company_short %} 的空白模板创建,则使用默认的开发容器配置。 有关详细信息,请参阅“[使用默认开发容器配置](#using-the-default-dev-container-configuration)”。
|
||||
If you create a codespace from a repository without a `devcontainer.json` file, or if you start from {% data variables.product.company_short %}'s blank template, the default dev container configuration is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
`devcontainer.json` 文件通常位于存储库的 `.devcontainer` 目录中。 或者,可以直接在存储库的根目录中找到它,在这种情况下,文件名必须以句点开头:`.devcontainer.json`。
|
||||
The `devcontainer.json` file is usually located in the `.devcontainer` directory of your repository. Alternatively, you can locate it directly in the root of the repository, in which case the file name must begin with a period: `.devcontainer.json`.
|
||||
|
||||
如果要在存储库中选择开发容器配置,则 `.devcontainer/devcontainer.json`(或 `.devcontainer.json`)文件的任何替代文件都必须位于路径 `.devcontainer/SUBDIRECTORY/devcontainer.json` 处它们自己的子目录中。 例如,可以选择两种配置:
|
||||
If you want to have a choice of dev container configurations in your repository, any alternatives to the `.devcontainer/devcontainer.json` (or `.devcontainer.json`) file must be located in their own subdirectory at the path `.devcontainer/SUBDIRECTORY/devcontainer.json`. For example, you could have a choice of two configurations:
|
||||
* `.devcontainer/database-dev/devcontainer.json`
|
||||
* `.devcontainer/gui-dev/devcontainer.json`
|
||||
|
||||
当存储库中有多个 `devcontainer.json` 文件时,每个 codespace 仅从其中一种配置创建。 无法在 `devcontainer.json` 文件之间导入或继承设置。 如果自定义子目录中的 `devcontainer.json` 文件具有依赖文件(例如 Dockerfile 或由 `devcontainer.json` 文件中的命令运行的脚本),建议将这些文件放在同一子目录中。
|
||||
When you have multiple `devcontainer.json` files in your repository, each codespace is created from only one of the configurations. Settings cannot be imported or inherited between `devcontainer.json` files. If a `devcontainer.json` file in a custom subdirectory has dependent files, such as the Dockerfile or scripts that are run by commands in the `devcontainer.json` file, it's recommended that you co-locate these files in the same subdirectory.
|
||||
|
||||
有关如何在创建 codespace 时选择首选的开发容器配置的信息,请参阅“[为存储库创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)”。
|
||||
For information about how to choose your preferred dev container configuration when you create a codespace, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
|
||||
{% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
#### 如何使用 devcontainer.json
|
||||
#### How to use the devcontainer.json
|
||||
|
||||
将 `devcontainer.json` 文件视为提供“自定义”而不是“个性化”很有用。 你应仅包括每个人处理代码库都需要的内容(而不是个人偏好的内容),将它们作为开发环境的标准元素。 Linter 等内容非常适合标准化,并且要求每个人都安装,因此它们很适合包含在 `devcontainer.json` 文件中。 用户界面装饰器或主题等内容属于个人选择,不应放入 `devcontainer.json` 文件中。
|
||||
It's useful to think of the `devcontainer.json` file as providing "customization" rather than "personalization." You should only include things that everyone working on your codebase needs as standard elements of the development environment, not things that are personal preferences. Things like linters are good to standardize on, and to require everyone to have installed, so they're good to include in your `devcontainer.json` file. Things like user interface decorators or themes are personal choices that should not be put in the `devcontainer.json` file.
|
||||
|
||||
可以使用点文件和设置同步对 codespace 进行个性化设置。有关详细信息,请参阅“[为帐户设置个性化的 {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)”。
|
||||
You can personalize your codespaces by using dotfiles and Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)."
|
||||
|
||||
### Dockerfile
|
||||
|
||||
可以将 Dockerfile 添加为开发容器配置的一部分。
|
||||
You can add a Dockerfile as part of your dev container configuration.
|
||||
|
||||
Dockerfile 是一个文本文件,其中包含创建 Docker 容器映像所需的指令。 每次有人使用引用此 Dockerfile 的 `devcontainer.json` 文件创建 codespace 时,此映像用于生成开发容器。 Dockerfile 中的指令通常以引用将创建的新映像所基于的父映像开始。 随后是在映像创建过程中运行的命令,例如安装软件包。
|
||||
The Dockerfile is a text file that contains the instructions needed to create a Docker container image. This image is used to generate a development container each time someone creates a codespace using the `devcontainer.json` file that references this Dockerfile. The instructions in the Dockerfile typically begin by referencing a parent image on which the new image that will be created is based. This is followed by commands that are run during the image creation process, for example to install software packages.
|
||||
|
||||
开发容器的 Dockerfile 通常位于 `.devcontainer` 文件夹中,引用它的 `devcontainer.json` 也在其中。
|
||||
The Dockerfile for a dev container is typically located in the `.devcontainer` folder, alongside the `devcontainer.json` in which it is referenced.
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:作为使用 Dockerfile 的替代方法,可以使用 `devcontainer.json` 文件中的 `image` 属性直接引用要使用的现有映像。 已设置的任何组织映像策略都必须允许在此处指定的映像。 有关详细信息,请参阅“[限制 codespace 的基础映像](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces)”。 如果找不到 Dockerfile 和映像,则使用默认容器映像。 有关详细信息,请参阅“[使用默认开发容器配置](#using-the-default-dev-container-configuration)”。
|
||||
**Note**: As an alternative to using a Dockerfile you can use the `image` property in the `devcontainer.json` file to refer directly to an existing image you want to use. The image you specify here must be allowed by any organization image policy that has been set. For more information, see "[Restricting the base image for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces)." If neither a Dockerfile nor an image is found then the default container image is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### 简单的 Dockerfile 示例
|
||||
#### Simple Dockerfile example
|
||||
|
||||
以下示例使用四个指令:
|
||||
The following example uses four instructions:
|
||||
|
||||
`ARG` 定义生成时变量。
|
||||
`ARG` defines a build-time variable.
|
||||
|
||||
`FROM` 指定生成的 Docker 映像所基于的父映像。
|
||||
`FROM` specifies the parent image on which the generated Docker image will be based.
|
||||
|
||||
`COPY` 复制文件并将其添加到文件系统。
|
||||
`COPY` copies a file and adds it to the filesystem.
|
||||
|
||||
`RUN` 更新包列表并运行脚本。 还可以使用 `RUN` 指令来安装软件,如注释掉的说明所示。 若要运行多个命令,请使用 `&&` 将命令组合成一个 `RUN` 语句。
|
||||
`RUN` updates package lists and runs a script. You can also use a `RUN` instruction to install software, as shown by the commented out instructions. To run multiple commands, use `&&` to combine the commands into a single `RUN` statement.
|
||||
|
||||
```Dockerfile{:copy}
|
||||
ARG VARIANT="16-buster"
|
||||
@@ -102,11 +97,11 @@ COPY library-scripts/github-debian.sh /tmp/library-scripts/
|
||||
RUN apt-get update && bash /tmp/library-scripts/github-debian.sh
|
||||
```
|
||||
|
||||
有关 Dockerfile 指令的详细信息,请参阅 Docker 文档中的“[Dockerfile 参考](https://docs.docker.com/engine/reference/builder)”。
|
||||
For more information about Dockerfile instructions, see "[Dockerfile reference](https://docs.docker.com/engine/reference/builder)" in the Docker documentation.
|
||||
|
||||
#### 使用 Dockerfile
|
||||
#### Using a Dockerfile
|
||||
|
||||
若要将 Dockerfile 用作开发容器配置的一部分,请使用 `dockerfile` 属性在 `devcontainer.json` 文件中引用它。
|
||||
To use a Dockerfile as part of a dev container configuration, reference it in your `devcontainer.json` file by using the `dockerfile` property.
|
||||
|
||||
```json{:copy}
|
||||
{
|
||||
@@ -116,130 +111,134 @@ RUN apt-get update && bash /tmp/library-scripts/github-debian.sh
|
||||
}
|
||||
```
|
||||
|
||||
如果要在开发容器中使用现有容器业务流程,可以使用多种选项。 有关详细信息,请参阅开发容器网站上[规范](https://containers.dev/implementors/spec/#orchestration-options)中的“业务流程选项”部分。
|
||||
Various options are available to you if you want to use existing container orchestration in your dev container. For more information, see the "Orchestration options" section of the [Specification](https://containers.dev/implementors/spec/#orchestration-options) on the Development Containers website.
|
||||
|
||||
## 使用默认开发容器配置
|
||||
## Using the default dev container configuration
|
||||
|
||||
如果没有在存储库中定义配置,{% data variables.product.prodname_dotcom %} 使用默认 Linux 映像创建 codespace。 此 Linux 映像包括许多常用语言的运行时版本,例如 Python、Node、PHP、Java、Go、C++、Ruby 和 .NET Core/C#。 使用这些语言的最新或 LTS 版本。 还有一些工具可以支持数据科学和机器学习,例如 JupyterLab 和 Conda。 该映像还包括其他开发人员工具和实用程序,例如 Git、GitHub CLI、yarn、openssh 和 vim。 若要查看包含的所有语言、运行时和工具,请在 codespace 终端中使用 `devcontainer-info content-url` 命令,并遵循命令输出的 URL。
|
||||
If you don't define a configuration in your repository, {% data variables.product.prodname_dotcom %} creates a codespace using a default Linux image. This Linux image includes a number of runtime versions for popular languages like Python, Node, PHP, Java, Go, C++, Ruby, and .NET Core/C#. The latest or LTS releases of these languages are used. There are also tools to support data science and machine learning, such as JupyterLab and Conda. The image also includes other developer tools and utilities like Git, GitHub CLI, yarn, openssh, and vim. To see all the languages, runtimes, and tools that are included use the `devcontainer-info content-url` command inside your codespace terminal and follow the URL that the command outputs.
|
||||
|
||||
有关默认 Linux 映像中包含内容的信息,请参阅 [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src/universal) 存储库。
|
||||
For information about what's included in the default Linux image, see the [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src/universal) repository.
|
||||
|
||||
如果要处理使用 {% data variables.product.prodname_github_codespaces %} 提供的语言和工具的小型项目,默认配置是个不错的选择。
|
||||
The default configuration is a good option if you're working on a small project that uses the languages and tools that {% data variables.product.prodname_github_codespaces %} provides.
|
||||
|
||||
## 使用预定义的开发容器配置
|
||||
## Using a predefined dev container configuration
|
||||
|
||||
如果在 {% data variables.product.prodname_vscode %} 或 Web 浏览器中使用 {% data variables.product.prodname_codespaces %},可以通过从预定义配置列表中进行选择,为存储库创建开发容器配置。 这些配置提供特定项目类型的共同设置,可帮助你快速开始使用已经有适当的容器选项、{% data variables.product.prodname_vscode %} 设置和应该安装的 {% data variables.product.prodname_vscode %} 扩展的配置。
|
||||
If you use {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}, or in a web browser, you can create a dev container configuration for your repository by choosing from a list of predefined configurations. These configurations provide common setups for particular project types, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed.
|
||||
|
||||
如果您需要一些额外的扩展性,使用预先定义的配置是一个好主意。 也可以从预定义的配置开始,并根据项目的需要对其进行修改。 有关预定义开发容器定义的详细信息,请参阅 [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src) 存储库。
|
||||
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project. For more information about the definitions of predefined dev containers, see the [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src) repository.
|
||||
|
||||
可以在 codespace 中工作时或在本地处理存储库时添加预定义的开发容器配置。 若要在本地工作且未连接到 codespace 时在 {% data variables.product.prodname_vscode_shortname %} 中执行此操作,必须安装并启用“开发容器”扩展。 有关该扩展的详细信息,请参阅 [{% data variables.product.prodname_vs_marketplace_shortname %}](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)。 以下步骤介绍使用 codespace 的过程。 未连接到 codespace 时 {% data variables.product.prodname_vscode_shortname %} 中的步骤非常相似。
|
||||
You can add a predefined dev container configuration either while working in a codespace, or while working on a repository locally. To do this in {% data variables.product.prodname_vscode_shortname %} while you are working locally, and not connected to a codespace, you must have the "Dev Containers" extension installed and enabled. For more information about this extension, see the [{% data variables.product.prodname_vs_marketplace_shortname %}](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). The following procedure describes the process when you are using a codespace. The steps in {% data variables.product.prodname_vscode_shortname %} when you are not connected to a codespace are very similar.
|
||||
|
||||
{% data reusables.codespaces.command-palette-container %}
|
||||
1. 单击要使用的定义。
|
||||
1. Click the definition you want to use.
|
||||
|
||||

|
||||

|
||||
|
||||
1. 按照提示自定义您的定义。 有关自定义定义的选项的详细信息,请参阅“[向 `devcontainer.json` 文件添加其他功能](#adding-additional-features-to-your-devcontainerjson-file)”。
|
||||
1. 单击" **确定**"。
|
||||
1. Follow the prompts to customize your definition. For more information on the options to customize your definition, see "[Adding additional features to your `devcontainer.json` file](#adding-additional-features-to-your-devcontainerjson-file)."
|
||||
1. Click **OK**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. 如果在 codespace 中工作,请应用更改,方法是单击窗口右下角的消息中的“立即重新生成”。 有关重新生成容器的详细信息,请参阅“[对配置应用更改](#applying-configuration-changes-to-a-codespace)”。
|
||||
1. If you are working in a codespace, apply your changes, by clicking **Rebuild now** in the message at the bottom right of the window. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-configuration-changes-to-a-codespace)."
|
||||
|
||||

|
||||

|
||||
|
||||
### 向 `devcontainer.json` 文件添加其他功能
|
||||
### Adding additional features to your `devcontainer.json` file
|
||||
|
||||
{% data reusables.codespaces.about-features %} 有关详细信息,请参阅“[向 `devcontainer.json` 文件添加功能](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=vscode)”。
|
||||
{% data reusables.codespaces.about-features %} For more information, see "[Adding features to a `devcontainer.json` file](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=vscode)."
|
||||
|
||||
## 创建自定义开发容器配置
|
||||
## Creating a custom dev container configuration
|
||||
|
||||
如果任何预定义配置都不符合你的需求,可以通过编写自己的 `devcontainer.json` 文件创建自定义配置。
|
||||
If none of the predefined configurations meets your needs, you can create a custom configuration by writing your own `devcontainer.json` file.
|
||||
|
||||
* 如果要添加一个 `devcontainer.json` 文件,该文件将由从存储库创建 codespace 的每个人使用,请在存储库根目录的 `.devcontainer` 目录中创建该文件。
|
||||
* 如果要为用户提供配置选择,可以创建多个自定义 `devcontainer.json` 文件,每个文件位于 `.devcontainer` 目录的单独子目录中。
|
||||
* If you're adding a single `devcontainer.json` file that will be used by everyone who creates a codespace from your repository, create the file within a `.devcontainer` directory at the root of the repository.
|
||||
* If you want to offer users a choice of configuration, you can create multiple custom `devcontainer.json` files, each located within a separate subdirectory of the `.devcontainer` directory.
|
||||
|
||||
{% note %}
|
||||
|
||||
**注释**:
|
||||
- 无法在比 `.devcontainer` 低一级的目录中找到 `devcontainer.json` 文件。 例如,位于 `.devcontainer/teamA/devcontainer.json` 的文件可以正常运行,但 `.devcontainer/teamA/testing/devcontainer.json` 不行。
|
||||
- {% data reusables.codespaces.configuration-choice-templates %} 有关详细信息,请参阅“[设置 {% data variables.product.prodname_github_codespaces %} 的模板存储库](/codespaces/setting-up-your-project-for-codespaces/setting-up-a-template-repository-for-github-codespaces)”。
|
||||
**Notes**:
|
||||
- You can't locate your `devcontainer.json` files in directories more than one level below `.devcontainer`. For example, a file at `.devcontainer/teamA/devcontainer.json` will work, but `.devcontainer/teamA/testing/devcontainer.json` will not.
|
||||
- {% data reusables.codespaces.configuration-choice-templates %} For more information, see "[Setting up a template repository for {% data variables.product.prodname_github_codespaces %}](/codespaces/setting-up-your-project-for-codespaces/setting-up-a-template-repository-for-github-codespaces)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
如果在存储库中找到多个 `devcontainer.json` 文件,则会在 codespace 创建选项页中列出这些文件。 有关详细信息,请参阅“[为存储库创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)”。
|
||||
If multiple `devcontainer.json` files are found in the repository, they are listed in the codespace creation options page. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
|
||||

|
||||

|
||||
|
||||
### 添加 `devcontainer.json` 文件
|
||||
### Adding a `devcontainer.json` file
|
||||
|
||||
如果存储库中还没有 `devcontainer.json` 文件,可以从 {% data variables.product.prodname_dotcom_the_website %} 快速添加一个。
|
||||
1. 导航到存储库,然后单击“{% octicon "code" aria-label="The code icon" %} 代码”下拉列表。
|
||||
1. 在“Codespace”选项卡中,单击省略号 (...),然后选择“配置开发容器” 。
|
||||
If you don't already have a `devcontainer.json` file in your repository, you can quickly add one from {% data variables.product.prodname_dotcom_the_website %}.
|
||||
1. Navigate to your repository and click the **{% octicon "code" aria-label="The code icon" %} Code** dropdown.
|
||||
1. In the **Codespaces** tab, click the ellipsis (**...**), then select **Configure dev container**.
|
||||
|
||||

|
||||

|
||||
|
||||
编辑器中将打开一个新的 `.devcontainer/devcontainer.json` 文件。 该文件将包含一些初始属性,包括可以向其添加新工具、库或运行时的 `features` 对象。 有关详细信息,请参阅“[向 `devcontainer.json` 文件添加功能](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=webui)”。
|
||||
A new `.devcontainer/devcontainer.json` file will open in the editor. The file will contain some initial properties, including a `features` object to which you can add new tools, libraries, or runtimes. For more information, see "[Adding features to a `devcontainer.json` file](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=webui)."
|
||||
|
||||
如果存储库已包含一个或多个 `devcontainer.json` 文件,则单击“配置开发容器”,会根据 containers.dev 上的[规范](https://containers.dev/implementors/spec/#devcontainerjson)以最高优先级打开现有 `devcontainer.json` 文件。
|
||||
If your repository already contains one or more `devcontainer.json` files, then clicking **Configure dev container** will open the existing `devcontainer.json` file with the highest precedence according to the [specification](https://containers.dev/implementors/spec/#devcontainerjson) on containers.dev.
|
||||
|
||||
### 创建 codespace 期间的默认配置选择
|
||||
### Default configuration selection during codespace creation
|
||||
|
||||
如果 `.devcontainer/devcontainer.json` 或 `.devcontainer.json` 存在,则创建 codespace 时,它将是可用配置文件列表中的默认选择。 如果两个文件都不存在,则默认选择默认开发容器配置。
|
||||
If `.devcontainer/devcontainer.json` or `.devcontainer.json` exists, it will be the default selection in the list of available configuration files when you create a codespace. If neither file exists, the default dev container configuration will be selected by default.
|
||||
|
||||

|
||||

|
||||
|
||||
### 编辑 devcontainer.json 文件
|
||||
### Editing the devcontainer.json file
|
||||
|
||||
可以在 `devcontainer.json` 文件中添加和编辑支持的配置键,以指定 codespace 环境的各个方面,例如将安装哪些 {% data variables.product.prodname_vscode_shortname %} 扩展。 {% data reusables.codespaces.more-info-devcontainer %}
|
||||
You can add and edit the supported configuration keys in the `devcontainer.json` file to specify aspects of the codespace's environment, like which {% data variables.product.prodname_vscode_shortname %} extensions will be installed. {% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
`devcontainer.json` 文件是使用 JSONC(带注释的 JSON)格式编写的。 这样,就可以在配置文件中包含注释。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[使用 {% data variables.product.prodname_vscode_shortname %} 编辑 JSON](https://code.visualstudio.com/docs/languages/json#_json-with-comments)”。
|
||||
The `devcontainer.json` file is written using the JSONC (JSON with comments) format. This allows you to include comments within the configuration file. For more information, see "[Editing JSON with {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/languages/json#_json-with-comments)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:如果使用 Linter 验证 `devcontainer.json` 文件,请确保将其设置为 JSONC 而不是 JSON,否则注释将被报告为错误。
|
||||
**Note**: If you use a linter to validate the `devcontainer.json` file, make sure it is set to JSONC and not JSON or comments will be reported as errors.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### {% data variables.product.prodname_vscode_shortname %} 的接口设置
|
||||
### Interface settings for {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
可以使用以下三个范围为 {% data variables.product.prodname_vscode_shortname %} 配置接口设置:工作区、远程 [Codespaces] 和用户。 可以在 {% data variables.product.prodname_vscode_shortname %}“设置”编辑器中查看这些范围。
|
||||
You can configure the interface settings for {% data variables.product.prodname_vscode_shortname %}, with three scopes: Workspace, Remote [Codespaces], and User. You can view these scopes in the {% data variables.product.prodname_vscode_shortname %} Settings editor.
|
||||
|
||||

|
||||

|
||||
|
||||
如果某个设置在多个范围内定义,则优先顺序依次为“工作区”设置、“远程 [Codespaces]”、“用户” 。
|
||||
If a setting is defined in multiple scopes, Workspace settings take priority, then Remote [Codespaces], then User.
|
||||
|
||||
可以在两个地方定义 {% data variables.product.prodname_vscode_shortname %} 的默认接口设置。
|
||||
You can define default interface settings for {% data variables.product.prodname_vscode_shortname %} in two places.
|
||||
|
||||
* 在存储库的 `.vscode/settings.json` 文件中定义的接口设置在 codespace 中应用为工作区范围的设置。
|
||||
* 在 `devcontainer.json` 文件的 `settings` 键中定义的接口设置应用为 codespace 中远程 [Codespaces] 范围的设置。
|
||||
* Interface settings defined in the `.vscode/settings.json` file in your repository are applied as Workspace-scoped settings in the codespace.
|
||||
* Interface settings defined in the `settings` key in the `devcontainer.json` file are applied as Remote [Codespaces]-scoped settings in the codespace.
|
||||
|
||||
## 将配置更改应用于 codespace
|
||||
## Applying configuration changes to a codespace
|
||||
|
||||
对配置的更改将在下次创建 codespace 时应用。 但是,如果在 Web 浏览器、{% data variables.product.prodname_vscode_shortname %} 或 JetBrains IDE 中使用 codespace,则可以通过重新生成容器将配置更改应用于当前 codespace。
|
||||
Changes to a configuration will be applied the next time you create a codespace. However, you can apply your changes to an existing codespace by rebuilding the container. You can do this within a codespace in the {% data variables.product.prodname_vscode_shortname %} web client or desktop application, or you can use {% data variables.product.prodname_cli %}.
|
||||
|
||||
### 在 {% data variables.product.prodname_vscode_shortname %} Web 客户端或桌面应用程序中重新生成开发容器
|
||||
### Rebuilding the dev container in the {% data variables.product.prodname_vscode_shortname %} web client or desktop application
|
||||
|
||||
{% data reusables.codespaces.rebuild-command %}
|
||||
1. {% data reusables.codespaces.recovery-mode %}
|
||||
|
||||

|
||||

|
||||
|
||||
- 若要通过查看创建日志来诊断错误,请单击“查看创建日志”。
|
||||
- 若要修复日志中标识的错误,请更新 `devcontainer.json` 文件。
|
||||
- 要应用更改,请重建容器。
|
||||
- To diagnose the error by reviewing the creation logs, click **View creation log**.
|
||||
- To fix the errors identified in the logs, update your `devcontainer.json` file.
|
||||
- To apply the changes, rebuild your container.
|
||||
|
||||
### 在 JetBrains IDE 中重新生成开发容器
|
||||
### Using {% data variables.product.prodname_cli %} to rebuild a dev container
|
||||
|
||||
{% data reusables.codespaces.jetbrains-open-codespace-plugin %}
|
||||
1. 在 {% data variables.product.prodname_github_codespaces %} 工具窗口中,单击“重新生成”图标。
|
||||
If you've changed a dev container configuration outside of VS Code (for example, on {% data variables.product.prodname_dotcom_the_website %} or in a JetBrains IDE), you can use {% data variables.product.prodname_cli %} to rebuild the dev container for an existing codespace.
|
||||
|
||||

|
||||
1. In a terminal, enter the following command.
|
||||
|
||||
1. 当提示确认是否要重新生成开发容器时,单击“重新生成”。
|
||||
1. 在 JetBrains IDE 中重新打开 codespace。
|
||||
```
|
||||
gh cs rebuild
|
||||
```
|
||||
|
||||
Your codespaces are listed.
|
||||
|
||||
1. Use the arrow keys on your keyboard to highlight the required codespace, then press <kbd>Enter</kbd>.
|
||||
|
||||
|
||||
## 延伸阅读
|
||||
## Further reading
|
||||
|
||||
- [预构建 codespaces](/codespaces/prebuilding-your-codespaces)
|
||||
- "[Prebuilding your codespaces](/codespaces/prebuilding-your-codespaces)"
|
||||
|
||||
@@ -1,123 +1,123 @@
|
||||
---
|
||||
title: 在 JetBrains IDE 中开始使用 GitHub Copilot
|
||||
title: Getting started with GitHub Copilot in a JetBrains IDE
|
||||
shortTitle: JetBrains IDE
|
||||
intro: '了解如何在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %},并在编写注释和代码时开始查看建议。'
|
||||
intro: 'Learn how to install {% data variables.product.prodname_copilot %} in a JetBrains IDE, and start seeing suggestions as you write comments and code.'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
ms.openlocfilehash: 24415504e0abeff6e129321068b07590d265da16
|
||||
ms.sourcegitcommit: 99eb4456062aea31ca381977396417cf92e5798d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179575'
|
||||
---
|
||||
## 关于 {% data variables.product.prodname_copilot %} 和 JetBrains IDE
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and JetBrains IDEs
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
如果使用 JetBrains IDE,可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 本指南演示如何在适用于 macOS、Windows 或 Linux 的 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %}。
|
||||
If you use a JetBrains IDE, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within a JetBrains IDE for macOS, Windows, or Linux.
|
||||
|
||||
## 先决条件
|
||||
## Prerequisites
|
||||
|
||||
{% data reusables.copilot.jetbrains-ides %}
|
||||
|
||||
## 在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %} 扩展
|
||||
## Installing the {% data variables.product.prodname_copilot %} extension in your JetBrains IDE
|
||||
|
||||
若要在 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_copilot %} 扩展。 以下过程将指导你在 IntelliJ IDEA 中安装 {% data variables.product.prodname_copilot %} 插件。 在另一个受支持的 IDE 中安装插件的步骤可能有所不同。
|
||||
To use {% data variables.product.prodname_copilot %} in a JetBrains IDE, you must install the {% data variables.product.prodname_copilot %} extension. The following procedure will guide you through installation of the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.
|
||||
|
||||
1. 在 JetBrains IDE 中,在 Windows 的“文件”菜单或 IDE 名称 (Mac) 下(例如 PyCharm 或 IntelliJ),单击“设置”(Windows) 或“首选项”(Mac)。
|
||||
2. 在“设置/首选项”对话框的左侧菜单中,单击“插件”。
|
||||
3. 在“设置/首选项”对话框顶部,单击“市场”。 在搜索栏中,搜索“{% data variables.product.prodname_copilot %}”,然后单击“安装”。
|
||||

|
||||
1. 安装 {% data variables.product.prodname_copilot %} 后,单击“重启 IDE”。
|
||||
1. JetBrains IDE 重启后,单击“工具”菜单。 单击“{% data variables.product.prodname_copilot %}”,然后单击“登录到 {% data variables.product.prodname_dotcom %}”。
|
||||

|
||||
1. 在“登录到 {% data variables.product.prodname_dotcom %}”对话框中,若要复制设备代码并打开设备激活窗口,请单击“复制并打开”。
|
||||

|
||||
1. 设备激活窗口将在浏览器中打开。 粘贴设备代码,然后单击“继续”。
|
||||
1. In your JetBrains IDE, under the **File** menu for Windows or under the name of your IDE for Mac (for example, **PyCharm** or **IntelliJ**), click **Settings** for Windows or **Preferences** for Mac.
|
||||
2. In the left-side menu of the **Settings/Preferences** dialog box, click **Plugins**.
|
||||
3. At the top of the **Settings/Preferences** dialog box, click **Marketplace**. In the search bar, search for **{% data variables.product.prodname_copilot %}**, then click **Install**.
|
||||

|
||||
1. After {% data variables.product.prodname_copilot %} is installed, click **Restart IDE**.
|
||||
1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**.
|
||||

|
||||
1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**.
|
||||

|
||||
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.
|
||||
|
||||
- 若要在 Windows 或 Linux 中粘贴代码,请按 <kbd>Ctrl</kbd>+<kbd>v</kbd>。
|
||||
- 若要在 macOS 中粘贴代码,请按 <kbd>command</kbd>+<kbd>v</kbd>。
|
||||
1. {% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_copilot %} 插件”。
|
||||
1. 权限获得批准后,JetBrains IDE 将显示确认。 要开始使用 {% data variables.product.prodname_copilot %},请单击“确定”。
|
||||

|
||||
- To paste the code in Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>v</kbd>.
|
||||
- To paste the code in macOS, press <kbd>command</kbd>+<kbd>v</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**.
|
||||
1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**.
|
||||

|
||||
|
||||
|
||||
## 查看第一个建议
|
||||
## Seeing your first suggestion
|
||||
|
||||
{% data reusables.copilot.code-examples-limitations %}
|
||||
|
||||
{% data reusables.copilot.supported-languages %} 以下示例使用的是 Java,但其他语言的工作方式类似。
|
||||
{% data reusables.copilot.supported-languages %} The following samples are in Java, but other languages will work similarly.
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. 在 Java 文件中,通过键入 `class Test` 创建类。
|
||||
{% data variables.product.prodname_copilot %} 将自动以灰色文本建议类正文,如下所示。 具体的建议可能会有所不同。
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 建议函数正文,请在 `main` 函数括号下方键入以下行。 具体的建议可能会有所不同。
|
||||
1. In the Java file, create a class by typing `class Test`.
|
||||
{% data variables.product.prodname_copilot %} will automatically suggest a class body in grayed text, as shown below. The exact suggestion may vary.
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest a function body, type the following line below the bracket of the `main` function. The exact suggestion may vary.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
|
||||
{% data variables.product.prodname_copilot %} 将尝试与代码的上下文和样式匹配。 始终可以编辑建议的代码。
|
||||
{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code.
|
||||
|
||||
## 查看替代建议
|
||||
## Seeing alternative suggestions
|
||||
|
||||
{% data reusables.copilot.alternative-suggestions %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} {% data reusables.copilot.see-alternative-suggestions %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
{% data reusables.copilot.see-alternative-suggestions %}
|
||||
|
||||
| OS | 查看下一个建议 | 查看上一个建议 |
|
||||
| OS | See next suggestion | See previous suggestion |
|
||||
| :- | :- | :- |
|
||||
| macOS | <kbd>选项</kbd>+<kbd>]</kbd> | <kbd>选项</kbd>+<kbd>[</kbd> |
|
||||
| macOS | <kbd>Option</kbd>+<kbd>]</kbd> | <kbd>Option</kbd>+<kbd>[</kbd> |
|
||||
| Windows | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
| Linux | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
{% data reusables.copilot.accept-or-reject-suggestion %}
|
||||
|
||||
## 在新选项卡中查看多个建议
|
||||
## Seeing multiple suggestions in a new tab
|
||||
|
||||
{% data reusables.copilot.suggestions-new-tab %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
1. 打开包含多个附加建议的新选项卡。
|
||||
- 在 macOS 上,按 <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>,然后单击“打开 GitHub Copilot”,或按 <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>\</kbd> 立即打开新选项卡。
|
||||
- 在 Windows 或 Linux 上,按 <kbd>Ctrl</kbd>+<kbd>Enter</kbd>,然后单击“打开 GitHub Copilot”。
|
||||

|
||||
1. 若要接受建议,请在建议上方单击“接受解决方案”。 若要拒绝所有建议,请关闭选项卡。
|
||||
1. Open a new tab with multiple additional suggestions.
|
||||
- On macOS, press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>, then click **Open GitHub Copilot**, or press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>\</kbd> to open the new tab immediately.
|
||||
- On Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>Enter</kbd>, then click **Open GitHub Copilot**.
|
||||

|
||||
1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab.
|
||||
|
||||
## 从注释生成代码建议
|
||||
## Generating code suggestions from comments
|
||||
|
||||
{% data reusables.copilot.generating-suggestions-from-comments %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 以建议 Java 文件中函数的实现,请键入以下行。
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest an implementation of a function in the Java file, type the following lines.
|
||||
```java{:copy}
|
||||
// find all images without alternate text
|
||||
// and give them a red border
|
||||
void process () {
|
||||
```
|
||||

|
||||

|
||||
|
||||
## 启用或禁用 {% data variables.product.prodname_copilot %}
|
||||
## Enabling and disabling {% data variables.product.prodname_copilot %}
|
||||
|
||||
可以为所有语言或单个语言启用或禁用 {% data variables.product.prodname_copilot %}。 JetBrains IDE 窗口底部面板中的 {% data variables.product.prodname_copilot %} 状态图标指示 {% data variables.product.prodname_copilot %} 是启用还是禁用。 启用后,将突出显示图标。 禁用后,图标灰显。
|
||||
You can enable or disable {% data variables.product.prodname_copilot %} for all languages, or for individual languages. The {% data variables.product.prodname_copilot %} status icon in the bottom panel of your JetBrains IDE window indicates whether {% data variables.product.prodname_copilot %} is enabled or disabled. When enabled, the icon is highlighted. When disabled, the icon is grayed out.
|
||||
|
||||
1. 若要启用或禁用 {% data variables.product.prodname_copilot %},请单击 JetBrains 窗口底部面板中的状态图标。
|
||||

|
||||
2. 如果要禁用 {% data variables.product.prodname_copilot %},系统会询问是全局禁用它,还是要禁用当前正在编辑的文件的语言。
|
||||
1. To enable or disable {% data variables.product.prodname_copilot %}, click the status icon in the bottom panel of the JetBrains window.
|
||||

|
||||
2. If you are disabling {% data variables.product.prodname_copilot %}, you will be asked whether you want to disable it globally, or for the language of the file you are currently editing.
|
||||
|
||||
- 若要全局禁用 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用完成”。
|
||||
- 若要禁用指定语言的 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用 LANGUAGE 完成”。
|
||||

|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} globally, click **Disable Completions**.
|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} for the specified language, click **Disable Completions for _LANGUAGE_**.
|
||||

|
||||
|
||||
|
||||
## 延伸阅读
|
||||
## Further reading
|
||||
|
||||
- [{% data variables.product.prodname_copilot %} 网站](https://copilot.github.com/)
|
||||
- [关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
- [The {% data variables.product.prodname_copilot %} website](https://copilot.github.com/)
|
||||
- [About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
|
||||
@@ -9,6 +9,8 @@ topics:
|
||||
- Copilot
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and Neovim
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
@@ -9,6 +9,8 @@ topics:
|
||||
- Copilot
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vscode %}
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
@@ -9,6 +9,8 @@ topics:
|
||||
- Copilot
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and Visual Studio
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
@@ -36,7 +36,7 @@ The `git remote add` command takes two arguments:
|
||||
For example:
|
||||
|
||||
```shell
|
||||
$ git remote add origin https://{% data variables.command_line.codeblock %}/USER/REPO>.git
|
||||
$ git remote add origin https://{% data variables.command_line.codeblock %}/USER/REPO.git
|
||||
# Set a new remote
|
||||
|
||||
$ git remote -v
|
||||
|
||||
@@ -70,9 +70,9 @@ After you set up your trial, you can explore {% data variables.product.prodname_
|
||||
|
||||
You can buy {% data variables.product.prodname_enterprise %} at any time during your trial. Purchasing {% data variables.product.prodname_enterprise %} ends your trial, removing the 50-seat maximum and initiating payment.
|
||||
|
||||
If you don't purchase {% data variables.product.prodname_enterprise %}, when the trial ends, your organization will be downgraded. If you used an existing organization for the trial, the organization will be downgraded to the product you were using before the trial. If you created a new organization for the trial, the organization will be downgraded to {% data variables.product.prodname_free_team %}.
|
||||
If you don't purchase {% data variables.product.prodname_enterprise %}, the trial will continue until the end of the 30-day period. You cannot end the trial early. When the trial ends, your organization will be downgraded. If you used an existing organization for the trial, the organization will be downgraded to the product you were using before the trial. If you created a new organization for the trial, the organization will be downgraded to {% data variables.product.prodname_free_team %}.
|
||||
|
||||
Your organization will lose access to any functionality that is not included in the new product, such as advanced features like {% data variables.product.prodname_pages %} for private repositories. If you don't plan to upgrade, to avoid losing access to advanced features, consider making affected repositories public before your trial ends. For more information, see "[Setting repository visibility](/articles/setting-repository-visibility)."
|
||||
Your organization will lose access to any functionality that is not included in the new plan, such as advanced features like {% data variables.product.prodname_pages %} for private repositories. If you don't plan to upgrade, to avoid losing access to advanced features, consider making affected repositories public before your trial ends. For more information, see "[Setting repository visibility](/articles/setting-repository-visibility)."
|
||||
|
||||
Downgrading also disables any SAML settings configured during the trial period. If you later purchase {% data variables.product.prodname_enterprise %}, your SAML settings will be enabled again for users in your organization to authenticate.
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ externalProducts:
|
||||
electron:
|
||||
id: electron
|
||||
name: Electron
|
||||
href: 'https://electronjs.org/docs'
|
||||
href: 'https://electronjs.org/docs/latest'
|
||||
external: true
|
||||
codeql:
|
||||
id: codeql
|
||||
@@ -154,11 +154,11 @@ externalProducts:
|
||||
name: npm
|
||||
href: 'https://docs.npmjs.com/'
|
||||
external: true
|
||||
ms.openlocfilehash: dad74fe11fc5bfea72ae994e9918683fc7e87b7a
|
||||
ms.sourcegitcommit: bd23217796e6ff442b14ef9d889eaef30e8d6826
|
||||
ms.openlocfilehash: e72ace58cb674661cbde635f97cf7ff0ab70433a
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/16/2022
|
||||
ms.locfileid: '148167302'
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148183970'
|
||||
---
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ You can restrict access to private organization assets by configuring an allow l
|
||||
|
||||
If you set up an allow list you can also choose to automatically add to your allow list any IP addresses configured for {% data variables.product.prodname_github_apps %} that you install in your organization. The creator of a {% data variables.product.prodname_github_app %} can configure an allow list for their application, specifying the IP addresses at which the application runs. By inheriting their allow list into yours, you avoid connection requests from the application being refused. For more information, see "[Allowing access by {% data variables.product.prodname_github_apps %}](#allowing-access-by-github-apps)."
|
||||
|
||||
You can also configure allowed IP addresses for the organizations in an enterprise account. For more information, 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)."
|
||||
You can also configure allowed IP addresses at the enterprise account level, and the entries in the enterprise account's allow list are inherited by all the organizations owned by the enterprise. {% data reusables.identity-and-permissions.org-enterprise-allow-list-interaction %} For more information, 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)."
|
||||
|
||||
## Adding an allowed IP address
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 启用和测试组织的 SAML 单点登录
|
||||
intro: 组织所有者和管理员可以启用 SAML 单点登录,以将额外的安全层添加到其组织。
|
||||
title: Enabling and testing SAML single sign-on for your organization
|
||||
intro: Organization owners and admins can enable SAML single sign-on to add an extra layer of security to their organization.
|
||||
redirect_from:
|
||||
- /articles/enabling-and-testing-saml-single-sign-on-for-your-organization
|
||||
- /github/setting-up-and-managing-organizations-and-teams/enabling-and-testing-saml-single-sign-on-for-your-organization
|
||||
@@ -10,62 +10,61 @@ topics:
|
||||
- Organizations
|
||||
- Teams
|
||||
shortTitle: Enable & test SAML SSO
|
||||
ms.openlocfilehash: f9b60931978f80de33c0e6a2d5268287e208040a
|
||||
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '145109427'
|
||||
---
|
||||
## 关于 SAML 单点登录
|
||||
|
||||
无需所有成员使用 SAML SSO,即可在组织中将其启用。 在组织中启用但不实施 SAML SSO 可帮助组织顺利采用 SAML SSO。 一旦组织内的大多数成员使用 SAML SSO,即可在组织内将其实施。
|
||||
## About SAML single sign-on
|
||||
|
||||
You can enable SAML SSO in your organization without requiring all members to use it. Enabling but not enforcing SAML SSO in your organization can help smooth your organization's SAML SSO adoption. Once a majority of your organization's members use SAML SSO, you can enforce it within your organization.
|
||||
|
||||
{% data reusables.saml.ghec-only %}
|
||||
|
||||
如果启用但不实施 SAML SSO,则选择不使用 SAML SSO 的组织成员仍可以是组织的成员。 有关强制实施 SAML SSO 的详细信息,请参阅“[为组织强制实施 SAML 单一登录](/articles/enforcing-saml-single-sign-on-for-your-organization)”。
|
||||
If you enable but don't enforce SAML SSO, organization members who choose not to use SAML SSO can still be members of the organization. For more information on enforcing SAML SSO, see "[Enforcing SAML single sign-on for your organization](/articles/enforcing-saml-single-sign-on-for-your-organization)."
|
||||
|
||||
{% data reusables.saml.outside-collaborators-exemption %}
|
||||
|
||||
{% data reusables.saml.saml-disabled-linked-identities-removed %}
|
||||
|
||||
## 启用和测试组织的 SAML 单点登录
|
||||
{% data reusables.apps.reauthorize-apps-saml %}
|
||||
|
||||
在组织中实施 SAML SSO 之前,请确保您已准备好组织。 有关详细信息,请参阅“[准备在组织中强制实施 SAML 单一登录](/articles/preparing-to-enforce-saml-single-sign-on-in-your-organization)”。
|
||||
## Enabling and testing SAML single sign-on for your organization
|
||||
|
||||
有关 {% data variables.product.company_short %} 支持用于 SAML SSO 的标识提供程序 (IdP) 的详细信息,请参阅“[将标识提供程序连接到组织](/organizations/managing-saml-single-sign-on-for-your-organization/connecting-your-identity-provider-to-your-organization)”。
|
||||
Before your enforce SAML SSO in your organization, ensure that you've prepared the organization. For more information, see "[Preparing to enforce SAML single sign-on in your organization](/articles/preparing-to-enforce-saml-single-sign-on-in-your-organization)."
|
||||
|
||||
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.security %}
|
||||
5. 在“SAML 单一登录”下,选择“启用 SAML 身份验证”。
|
||||

|
||||
For more information about the identity providers (IdPs) that {% data variables.product.company_short %} supports for SAML SSO, see "[Connecting your identity provider to your organization](/organizations/managing-saml-single-sign-on-for-your-organization/connecting-your-identity-provider-to-your-organization)."
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
{% data reusables.organizations.security %}
|
||||
5. Under "SAML single sign-on", select **Enable SAML authentication**.
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
注意:启用 SAML SSO 后,可以下载单一登录恢复代码,以便即使在 IdP 不可用时也能访问组织。 有关详细信息,请参阅“[下载组织的 SAML 单一登录恢复代码](/articles/downloading-your-organization-s-saml-single-sign-on-recovery-codes)”。
|
||||
**Note:** After enabling SAML SSO, you can download your single sign-on recovery codes so that you can access your organization even if your IdP is unavailable. For more information, see "[Downloading your organization's SAML single sign-on recovery codes](/articles/downloading-your-organization-s-saml-single-sign-on-recovery-codes)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
6. 在“Sign on URL”(登录 URL)字段中,为单点登录请求输入 IdP 上的 HTTPS 端点。 此值可在 IdP 配置中找到。
|
||||

|
||||
7. 可选择在“Issuer”(签发者)字段中,输入 SAML 签发者的姓名。 此操作验证已发送消息的真实性。
|
||||

|
||||
8. 在“Public Certificate”(公共证书)下,粘贴证书以验证 SAML 响应。
|
||||

|
||||
9. 单击 {% octicon "pencil" aria-label="The edit icon" %},然后在“签名方法”和“摘要方法”下拉菜单中,选择 SAML 颁发者用来验证请求完整性的哈希算法。
|
||||

|
||||
10. 在为组织启用 SAML SSO 之前,请单击“测试 SMAL 配置”,以确保已输入的信息正确。 
|
||||
6. In the "Sign on URL" field, type the HTTPS endpoint of your IdP for single sign-on requests. This value is available in your IdP configuration.
|
||||

|
||||
7. Optionally, in the "Issuer" field, type your SAML issuer's name. This verifies the authenticity of sent messages.
|
||||

|
||||
8. Under "Public Certificate," paste a certificate to verify SAML responses.
|
||||

|
||||
9. Click {% octicon "pencil" aria-label="The edit icon" %} and then in the Signature Method and Digest Method drop-downs, choose the hashing algorithm used by your SAML issuer to verify the integrity of the requests.
|
||||

|
||||
10. Before enabling SAML SSO for your organization, click **Test SAML configuration** to ensure that the information you've entered is correct. 
|
||||
|
||||
{% tip %}
|
||||
|
||||
**提示:** {% data reusables.saml.testing-saml-sso %}
|
||||
**Tip:** {% data reusables.saml.testing-saml-sso %}
|
||||
|
||||
{% endtip %}
|
||||
11. 要强制实施 SAML SSO 并删除未通过 IdP 进行身份验证的所有组织成员,请选择“要求 organization name 组织的所有成员进行 SAML SSO 身份验证”。 有关强制实施 SAML SSO 的详细信息,请参阅“[为组织强制实施 SAML 单一登录](/articles/enforcing-saml-single-sign-on-for-your-organization)”。
|
||||

|
||||
12. 单击“ **保存**”。
|
||||

|
||||
11. To enforce SAML SSO and remove all organization members who haven't authenticated via your IdP, select **Require SAML SSO authentication for all members of the _organization name_ organization**. For more information on enforcing SAML SSO, see "[Enforcing SAML single sign-on for your organization](/articles/enforcing-saml-single-sign-on-for-your-organization)."
|
||||

|
||||
12. Click **Save**.
|
||||

|
||||
|
||||
## 延伸阅读
|
||||
## Further reading
|
||||
|
||||
- [关于使用 SAML 单一登录进行的标识和访问管理](/articles/about-identity-and-access-management-with-saml-single-sign-on)
|
||||
- “[SAML 配置参考](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference)”
|
||||
- "[About identity and access management with SAML single sign-on](/articles/about-identity-and-access-management-with-saml-single-sign-on)"
|
||||
- "[SAML configuration reference](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub Packages 快速入门
|
||||
intro: '通过 {% data variables.product.prodname_actions %} 发布到 {% data variables.product.prodname_registry %}。'
|
||||
title: Quickstart for GitHub Packages
|
||||
intro: 'Publish to {% data variables.product.prodname_registry %} with {% data variables.product.prodname_actions %}.'
|
||||
allowTitleToDifferFromFilename: true
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -8,53 +8,48 @@ versions:
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
shortTitle: Quickstart
|
||||
ms.openlocfilehash: 207b91e821037a6eb61ae7bc9b18c98d8b14fdd2
|
||||
ms.sourcegitcommit: 505b84dc7227e8a5d518a71eb5c7eaa65b38ce0e
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '147876154'
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## 简介
|
||||
## Introduction
|
||||
|
||||
在本指南中,您将创建 {% data variables.product.prodname_actions %} 工作流程来测试代码,然后将其发布到 {% data variables.product.prodname_registry %}。
|
||||
In this guide, you'll create a {% data variables.product.prodname_actions %} workflow to test your code and then publish it to {% data variables.product.prodname_registry %}.
|
||||
|
||||
## 发布包
|
||||
## Publishing your package
|
||||
|
||||
1. 在 {% data variables.product.prodname_dotcom %} 上创建新存储库,为节点添加 `.gitignore`。 有关详细信息,请参阅“[创建新存储库](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository)”。
|
||||
2. 将存储库克隆到本地计算机。
|
||||
1. Create a new repository on {% data variables.product.prodname_dotcom %}, adding the `.gitignore` for Node. For more information, see "[Creating a new repository](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository)."
|
||||
2. Clone the repository to your local machine.
|
||||
```shell
|
||||
$ git clone https://{% ifversion ghes or ghae %}<em>YOUR-HOSTNAME</em>{% else %}github.com{% endif %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>.git
|
||||
$ cd <em>YOUR-REPOSITORY</em>
|
||||
$ git clone https://{% ifversion ghes or ghae %}YOUR-HOSTNAME{% else %}github.com{% endif %}/YOUR-USERNAME/YOUR-REPOSITORY.git
|
||||
$ cd YOUR-REPOSITORY
|
||||
```
|
||||
3. 创建 `index.js` 文件,并添加指示“Hello world!”的基本警报
|
||||
3. Create an `index.js` file and add a basic alert to say "Hello world!"
|
||||
{% raw %}
|
||||
```javascript{:copy}
|
||||
console.log("Hello, World!");
|
||||
```
|
||||
{% endraw %}
|
||||
4. 使用 `npm init` 初始化 npm 包。 在包初始化向导中,输入名称为 _`@YOUR-USERNAME/YOUR-REPOSITORY`_ 的包,并将测试脚本设置为 `exit 0`。 这将生成一个 `package.json` 文件,其中包含有关包的信息。
|
||||
4. Initialize an npm package with `npm init`. In the package initialization wizard, enter your package with the name: _`@YOUR-USERNAME/YOUR-REPOSITORY`_, and set the test script to `exit 0`. This will generate a `package.json` file with information about your package.
|
||||
{% raw %}
|
||||
```shell
|
||||
$ npm init
|
||||
...
|
||||
package name: <em>@YOUR-USERNAME/YOUR-REPOSITORY</em>
|
||||
package name: @YOUR-USERNAME/YOUR-REPOSITORY
|
||||
...
|
||||
test command: <em>exit 0</em>
|
||||
test command: exit 0
|
||||
...
|
||||
```
|
||||
{% endraw %}
|
||||
5. 运行 `npm install` 以生成 `package-lock.json` 文件,然后提交更改并将其推送到 {% data variables.product.prodname_dotcom %}。
|
||||
5. Run `npm install` to generate the `package-lock.json` file, then commit and push your changes to {% data variables.product.prodname_dotcom %}.
|
||||
```shell
|
||||
$ npm install
|
||||
$ git add index.js package.json package-lock.json
|
||||
$ git commit -m "initialize npm package"
|
||||
$ git push
|
||||
```
|
||||
6. 创建 `.github/workflows` 目录。 在此目录中,创建名为 `release-package.yml` 的文件。
|
||||
7. 将以下 YAML 内容复制到 `release-package.yml` 文件{% ifversion ghes or ghae %} 中,将 `YOUR-HOSTNAME` 替换为企业名称{% endif %}。
|
||||
6. Create a `.github/workflows` directory. In that directory, create a file named `release-package.yml`.
|
||||
7. Copy the following YAML content into the `release-package.yml` file{% ifversion ghes or ghae %}, replacing `YOUR-HOSTNAME` with the name of your enterprise{% endif %}.
|
||||
```yaml{:copy}
|
||||
name: Node.js Package
|
||||
|
||||
@@ -69,7 +64,7 @@ ms.locfileid: '147876154'
|
||||
- uses: {% data reusables.actions.action-checkout %}
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 16
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
@@ -83,54 +78,58 @@ ms.locfileid: '147876154'
|
||||
- uses: {% data reusables.actions.action-checkout %}
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: 12
|
||||
node-version: 16
|
||||
registry-url: {% ifversion ghes or ghae %}https://npm.YOUR-HOSTNAME.com/{% else %}https://npm.pkg.github.com/{% endif %}
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${% raw %}{{secrets.GITHUB_TOKEN}}{% endraw %}
|
||||
```
|
||||
8. 告诉 NPM 使用以下方法之一发布包的范围和注册表:
|
||||
- 在根目录中创建包含以下内容的 `.npmrc` 文件,为存储库添加 NPM 配置文件:{% raw %}
|
||||
8. Tell NPM which scope and registry to publish packages to using one of the following methods:
|
||||
- Add an NPM configuration file for the repository by creating a `.npmrc` file in the root directory with the contents:
|
||||
{% raw %}
|
||||
```shell
|
||||
<em>@YOUR-USERNAME</em>:registry=https://npm.pkg.github.com
|
||||
@YOUR-USERNAME:registry=https://npm.pkg.github.com
|
||||
```
|
||||
{% endraw %}
|
||||
- 编辑 `package.json` 文件并指定 `publishConfig` 密钥:{% raw %}
|
||||
- Edit the `package.json` file and specify the `publishConfig` key:
|
||||
{% raw %}
|
||||
```shell
|
||||
"publishConfig": {
|
||||
"@<em>YOUR-USERNAME</em>:registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
```
|
||||
{% endraw %}
|
||||
9. 提交并推送更改到 {% data variables.product.prodname_dotcom %}。
|
||||
9. Commit and push your changes to {% data variables.product.prodname_dotcom %}.
|
||||
```shell
|
||||
$ git add .github/workflows/release-package.yml
|
||||
# Also add the file you created or edited in the previous step.
|
||||
$ git add <em>.npmrc or package.json</em>
|
||||
$ git add .npmrc or package.json
|
||||
$ git commit -m "workflow to publish package"
|
||||
$ git push
|
||||
```
|
||||
10. 只要您的仓库中创建新版本,您创建的工作流程就会运行。 如果测试通过,则包将发布到 {% data variables.product.prodname_registry %}。
|
||||
10. The workflow that you created will run whenever a new release is created in your repository. If the tests pass, then the package will be published to {% data variables.product.prodname_registry %}.
|
||||
|
||||
要测试这一点,请导航到存储库中的“代码”选项卡,并创建新版本。 有关详细信息,请参阅“[管理存储库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)”。
|
||||
To test this out, navigate to the **Code** tab in your repository and create a new release. For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)."
|
||||
|
||||
## 查看已发布的包
|
||||
## Viewing your published package
|
||||
|
||||
您可以查看您发布的所有软件包。
|
||||
You can view all of the packages you have published.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.navigate-to-packages %}
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.package_registry.packages-from-code-tab %}
|
||||
{% data reusables.package_registry.navigate-to-packages %}
|
||||
|
||||
## 安装已发布的包
|
||||
## Installing a published package
|
||||
|
||||
现在,您已发布包,您需要使用它作为项目之间的依赖项。 有关详细信息,请参阅“[使用 npm 注册表](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package)”。
|
||||
Now that you've published the package, you'll want to use it as a dependency across your projects. For more information, see "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package)."
|
||||
|
||||
## 后续步骤
|
||||
## Next steps
|
||||
|
||||
您刚刚添加的基本工作流程在仓库中创建新版本时运行。 但是,这只是您可以对 {% data variables.product.prodname_registry %} 执行操作的开始。 您可以使用单个工作流和将包发布到多个注册表,触发工作流程以在发生不同事件(如合并拉取请求、管理容器等)时运行。
|
||||
The basic workflow you just added runs any time a new release is created in your repository. But this is only the beginning of what you can do with {% data variables.product.prodname_registry %}. You can publish your package to multiple registries with a single workflow, trigger the workflow to run on different events such as a merged pull request, manage containers, and more.
|
||||
|
||||
合并 {% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_actions %} 可以帮助您实现应用程序开发过程几乎每个方面的自动化。 准备好开始了吗? 以下是一些有用的资源,可用于执行 {% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_actions %} 的后续步骤:
|
||||
Combining {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_registry %} and {% data variables.product.prodname_actions %}:
|
||||
|
||||
- 有关 GitHub 包的深入教程,请“[了解 {% data variables.product.prodname_registry %}](/packages/learn-github-packages)”。
|
||||
- 有关 GitHub Actions 的深入教程,请“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”
|
||||
- 有关特定用例和示例,请“[使用 {% data variables.product.prodname_registry %} 注册表](/packages/working-with-a-github-packages-registry)”
|
||||
- "[Learn {% data variables.product.prodname_registry %}](/packages/learn-github-packages)" for an in-depth tutorial on GitHub Packages
|
||||
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)" for an in-depth tutorial on GitHub Actions
|
||||
- "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)" for specific uses cases and examples
|
||||
|
||||
@@ -9,12 +9,12 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: c51d9275950bbf303caa1a03344ba8402618d65b
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: 47961c5dfeeb5f320bbac67ffb0573c31709bd5b
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145129085'
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181285'
|
||||
---
|
||||
## 关于 Gist API
|
||||
|
||||
@@ -38,7 +38,7 @@ Gist API 为 Gist 中的每个文件提供最多一兆字节的内容。 通过
|
||||
|
||||
以下是获取 Gist 内容所支持的媒体类型。
|
||||
|
||||
application/vnd.github.VERSION.raw
|
||||
application/vnd.github.VERSION.base64
|
||||
application/vnd.github.raw
|
||||
application/vnd.github.base64
|
||||
|
||||
有关详细信息,请参阅“[媒体类型](/rest/overview/media-types)”。
|
||||
|
||||
@@ -11,22 +11,22 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: e815b7d7ea3d63ced4c486605891a10dcb870176
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: 3b7cac6d268fb4c7e786651a7281ca5ce4241ec5
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147060616'
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181243'
|
||||
---
|
||||
## 关于 Git Blob API
|
||||
|
||||
Git Blob(二进制大对象)是用于将每个文件的内容存储在仓库中的对象类型。 文件的 SHA-1 哈希在 Blob 对象中计算和存储。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取 [blob 对象](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects)并将其写入 Git 数据库。 Blob 利用[这些自定义媒体类型](#custom-media-types-for-blobs)。 你可以在[此处](/rest/overview/media-types)阅读有关 API 中媒体类型使用情况的更多信息。
|
||||
Git Blob(二进制大对象)是用于将每个文件的内容存储在仓库中的对象类型。 文件的 SHA-1 哈希在 Blob 对象中计算和存储。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取 [blob 对象](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects)并将其写入 Git 数据库。 Blob 利用[这些自定义媒体类型](#custom-media-types-for-blobs)。 你可以在[此处](/rest/overview/media-types)阅读有关 API 中媒体类型使用情况的更多信息。
|
||||
|
||||
### Blob 的自定义媒体类型
|
||||
|
||||
以下是 blob 支持的媒体类型。
|
||||
|
||||
application/json
|
||||
application/vnd.github.VERSION.raw
|
||||
application/vnd.github.raw
|
||||
|
||||
有关详细信息,请查看[媒体类型](/rest/overview/media-types)。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Gitignore
|
||||
intro: The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories.
|
||||
intro: Gitignore API 提取可用于忽略文件和目录的 `.gitignore` 模板。
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -11,16 +11,21 @@ topics:
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
- /rest/reference/gitignore
|
||||
ms.openlocfilehash: e830b0f00d60f3eb121fa2a99a910b073780700e
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181266'
|
||||
---
|
||||
## 关于 Gitignore API
|
||||
|
||||
## About the Gitignore API
|
||||
通过 API 在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} 上创建新存储库时,可以指定一个 [.gitignore 模板](/github/getting-started-with-github/ignoring-files)在创建后应用于存储库。 .gitignore 模板 API 可列出模板,并从 {% data variables.product.product_name %} [.gitignore 存储库](https://github.com/github/gitignore)中获取模板。
|
||||
|
||||
When you create a new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} via the API, you can specify a [.gitignore template](/github/getting-started-with-github/ignoring-files) to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore).
|
||||
### gitignore 的自定义媒体类型
|
||||
|
||||
### Custom media types for gitignore
|
||||
|
||||
You can use this custom media type when getting a gitignore template.
|
||||
获取 gitignore 模板时,您可以使用以下自定义媒体类型。
|
||||
|
||||
application/vnd.github.raw
|
||||
|
||||
For more information, see "[Media types](/rest/overview/media-types)."
|
||||
有关详细信息,请参阅“[媒体类型](/rest/overview/media-types)”。
|
||||
|
||||
@@ -299,7 +299,7 @@ Most operations specify that you should pass an `Accept` header with a value of
|
||||
To send a header with {% data variables.product.prodname_cli %}, use the `--header` or `-H` flag followed by the header in `key: value` format.
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /octocat
|
||||
gh api --header 'Accept: application/vnd.github+json'{% ifversion api-date-versioning %} --header 'X-GitHub-Api-Version:{{ allVersions[currentVersion].latestApiVersion }}'{% endif %} --method GET /octocat
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
@@ -311,7 +311,8 @@ The Octokit.js library automatically passes the `Accept: application/vnd.github+
|
||||
```javascript
|
||||
await octokit.request("GET /octocat", {
|
||||
headers: {
|
||||
"content-type": "text/plain",
|
||||
"content-type": "text/plain",{% ifversion api-date-versioning %}
|
||||
"X-GitHub-Api-Version": "{{ allVersions[currentVersion].latestApiVersion }}",{% endif %}
|
||||
},
|
||||
});
|
||||
```
|
||||
@@ -326,7 +327,8 @@ To send a header with cURL, use the `--header` or `-H` flag followed by the head
|
||||
curl --request GET \
|
||||
--url "https://api.github.com/octocat" \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: Bearer YOUR-TOKEN"
|
||||
--header "Authorization: Bearer <em>YOUR-TOKEN</em>"{% ifversion api-date-versioning %}\
|
||||
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
|
||||
```
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
@@ -12,6 +12,7 @@ featuredLinks:
|
||||
- /rest/guides/best-practices-for-integrators
|
||||
popular:
|
||||
- /rest/overview/resources-in-the-rest-api
|
||||
- /rest/overview/api-versions
|
||||
- /rest/overview/other-authentication-methods
|
||||
- /rest/overview/troubleshooting
|
||||
- /rest/overview/endpoints-available-for-github-apps
|
||||
@@ -78,11 +79,11 @@ children:
|
||||
- /teams
|
||||
- /users
|
||||
- /webhooks
|
||||
ms.openlocfilehash: d4d7e93d5bc22833168a932e047525c85e3f8768
|
||||
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
|
||||
ms.openlocfilehash: 393b427325e51b3717e882e430662a6517cba551
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/09/2022
|
||||
ms.locfileid: '147673636'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184388'
|
||||
---
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ intro: '{% data variables.product.pat_v2 %} 可以向以下 REST 终结点发出
|
||||
versions:
|
||||
feature: pat-v2
|
||||
shortTitle: '{% data variables.product.pat_v2_caps %}-enabled endpoints'
|
||||
ms.openlocfilehash: 7e6b4506a1af51a3c8da5aa8ee905936025aa952
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: e631edb7b723f516ed50eba6df19ba2f94862e7e
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148107235'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184219'
|
||||
---
|
||||
## actions
|
||||
|
||||
@@ -37,28 +37,6 @@ ms.locfileid: '148107235'
|
||||
- [`PUT /enterprises/{enterprise}/actions/permissions/selected-actions`](/rest/reference/actions#set-allowed-actions-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/permissions/workflow`](/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise)
|
||||
- [`PUT /enterprises/{enterprise}/actions/permissions/workflow`](/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runner-groups`](/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise)
|
||||
- [`POST /enterprises/{enterprise}/actions/runner-groups`](/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}`](/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise)
|
||||
- [`PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}`](/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise)
|
||||
- [`DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}`](/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations`](/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise)
|
||||
- [`PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations`](/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners`](/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise)
|
||||
- [`PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners`](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise)
|
||||
- [`PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`](/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise)
|
||||
- [`DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}`](/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runners`](/rest/reference/actions#list-self-hosted-runners-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runners/{runner_id}`](/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`DELETE /enterprises/{enterprise}/actions/runners/{runner_id}`](/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels`](/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels`](/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels`](/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels`](/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}`](/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise)
|
||||
- [`GET /enterprises/{enterprise}/actions/runners/downloads`](/rest/reference/actions#list-runner-applications-for-an-enterprise)
|
||||
- [`POST /enterprises/{enterprise}/actions/runners/registration-token`](/rest/reference/actions#create-a-registration-token-for-an-enterprise)
|
||||
- [`POST /enterprises/{enterprise}/actions/runners/remove-token`](/rest/reference/actions#create-a-remove-token-for-an-enterprise)
|
||||
- [`GET /repos/{owner}/{repo}/actions/jobs/{job_id}`](/rest/reference/actions#get-a-job-for-a-workflow-run)
|
||||
- [`GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs`](/rest/reference/actions#download-job-logs-for-a-workflow-run)
|
||||
- [`POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun`](/rest/reference/actions#re-run-job-for-workflow-run)
|
||||
@@ -155,18 +133,6 @@ ms.locfileid: '148107235'
|
||||
- [`GET /users/{username}/received_events`](/rest/reference/activity#list-events-received-by-the-authenticated-user)
|
||||
- [`GET /users/{username}/received_events/public`](/rest/reference/activity#list-public-events-received-by-a-user)
|
||||
- [`GET /feeds`](/rest/reference/activity#get-feeds)
|
||||
- [`GET /notifications`](/rest/reference/activity#list-notifications-for-the-authenticated-user)
|
||||
- [`PUT /notifications`](/rest/reference/activity#mark-notifications-as-read)
|
||||
- [`GET /notifications/threads/{thread_id}`](/rest/reference/activity#get-a-thread)
|
||||
- [`PATCH /notifications/threads/{thread_id}`](/rest/reference/activity#mark-a-thread-as-read)
|
||||
- [`GET /notifications/threads/{thread_id}/subscription`](/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user)
|
||||
- [`PUT /notifications/threads/{thread_id}/subscription`](/rest/reference/activity#set-a-thread-subscription)
|
||||
- [`DELETE /notifications/threads/{thread_id}/subscription`](/rest/reference/activity#delete-a-thread-subscription)
|
||||
- [`GET /repos/{owner}/{repo}/notifications`](/rest/reference/activity#list-repository-notifications-for-the-authenticated-user)
|
||||
- [`PUT /repos/{owner}/{repo}/notifications`](/rest/reference/activity#mark-repository-notifications-as-read)
|
||||
- [`GET /repos/{owner}/{repo}/subscription`](/rest/reference/activity#get-a-repository-subscription)
|
||||
- [`PUT /repos/{owner}/{repo}/subscription`](/rest/reference/activity#set-a-repository-subscription)
|
||||
- [`DELETE /repos/{owner}/{repo}/subscription`](/rest/reference/activity#delete-a-repository-subscription)
|
||||
- [`GET /repos/{owner}/{repo}/stargazers`](/rest/reference/activity#list-stargazers)
|
||||
- [`GET /repos/{owner}/{repo}/subscribers`](/rest/reference/activity#list-watchers)
|
||||
- [`GET /users/{username}/starred`](/rest/reference/activity#list-repositories-starred-by-a-user)
|
||||
@@ -179,39 +145,7 @@ ms.locfileid: '148107235'
|
||||
|
||||
## 应用
|
||||
|
||||
- [`DELETE /applications/{client_id}/grant`](/rest/reference/apps#delete-an-app-authorization)
|
||||
- [`POST /applications/{client_id}/token`](/rest/reference/apps#check-a-token)
|
||||
- [`PATCH /applications/{client_id}/token`](/rest/reference/apps#reset-a-token)
|
||||
- [`DELETE /applications/{client_id}/token`](/rest/reference/apps#delete-an-app-token)
|
||||
- [`POST /applications/{client_id}/token/scoped`](/rest/reference/apps#create-a-scoped-access-token)
|
||||
- [`GET /installation/repositories`](/rest/reference/apps#list-repositories-accessible-to-the-app-installation)
|
||||
- [`DELETE /installation/token`](/rest/reference/apps#revoke-an-installation-access-token)
|
||||
- [`GET /user/installations/{installation_id}/repositories`](/rest/reference/apps#list-repositories-accessible-to-the-user-access-token)
|
||||
- [`PUT /user/installations/{installation_id}/repositories/{repository_id}`](/rest/reference/apps#add-a-repository-to-an-app-installation)
|
||||
- [`DELETE /user/installations/{installation_id}/repositories/{repository_id}`](/rest/reference/apps#remove-a-repository-from-an-app-installation)
|
||||
- [`POST /app-manifests/{code}/conversions`](/rest/reference/apps#create-a-github-app-from-a-manifest)
|
||||
- [`GET /app`](/rest/reference/apps#get-the-authenticated-app)
|
||||
- [`GET /app/hook/config`](/rest/reference/apps#get-a-webhook-configuration-for-an-app)
|
||||
- [`PATCH /app/hook/config`](/rest/reference/apps#update-a-webhook-configuration-for-an-app)
|
||||
- [`GET /app/hook/deliveries`](/rest/reference/apps#list-deliveries-for-an-app-webhook)
|
||||
- [`GET /app/hook/deliveries/{delivery_id}`](/rest/reference/apps#get-a-delivery-for-an-app-webhook)
|
||||
- [`POST /app/hook/deliveries/{delivery_id}/attempts`](/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook)
|
||||
- [`GET /app/installations`](/rest/reference/apps#list-installations-for-the-authenticated-app)
|
||||
- [`GET /app/installations/{installation_id}`](/rest/reference/apps#get-an-installation-for-the-authenticated-app)
|
||||
- [`DELETE /app/installations/{installation_id}`](/rest/reference/apps#delete-an-installation-for-the-authenticated-app)
|
||||
- [`POST /app/installations/{installation_id}/access_tokens`](/rest/reference/apps/#create-an-installation-access-token-for-an-app)
|
||||
- [`PUT /app/installations/{installation_id}/suspended`](/rest/reference/apps#suspend-an-app-installation)
|
||||
- [`DELETE /app/installations/{installation_id}/suspended`](/rest/reference/apps#unsuspend-an-app-installation)
|
||||
- [`GET /orgs/{org}/installation`](/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app)
|
||||
- [`GET /repos/{owner}/{repo}/installation`](/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app)
|
||||
- [`GET /users/{username}/installation`](/rest/reference/apps#get-a-user-installation-for-the-authenticated-app)
|
||||
- [`GET /marketplace_listing/accounts/{account_id}`](/rest/reference/apps#get-a-subscription-plan-for-an-account)
|
||||
- [`GET /marketplace_listing/plans`](/rest/reference/apps#list-plans)
|
||||
- [`GET /marketplace_listing/plans/{plan_id}/accounts`](/rest/reference/apps#list-accounts-for-a-plan)
|
||||
- [`GET /marketplace_listing/stubbed/accounts/{account_id}`](/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed)
|
||||
- [`GET /marketplace_listing/stubbed/plans`](/rest/reference/apps#list-plans-stubbed)
|
||||
- [`GET /marketplace_listing/stubbed/plans/{plan_id}/accounts`](/rest/reference/apps#list-accounts-for-a-plan-stubbed)
|
||||
- [`GET /user/installations`](/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token)
|
||||
- [`GET /user/marketplace_purchases`](/rest/reference/apps#list-subscriptions-for-the-authenticated-user)
|
||||
- [`GET /user/marketplace_purchases/stubbed`](/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed)
|
||||
|
||||
@@ -225,22 +159,14 @@ ms.locfileid: '148107235'
|
||||
- [`GET /users/{username}/settings/billing/packages`](/rest/reference/billing#get-github-packages-billing-for-a-user)
|
||||
- [`GET /users/{username}/settings/billing/shared-storage`](/rest/reference/billing#get-shared-storage-billing-for-a-user)
|
||||
|
||||
## 检查
|
||||
## 分享
|
||||
|
||||
- [`POST /repos/{owner}/{repo}/check-runs`](/rest/reference/checks#create-a-check-run)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#get-a-check-run)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#update-a-check-run)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations`](/rest/reference/checks#list-check-run-annotations)
|
||||
- [`POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`](/rest/reference/checks#rerequest-a-check-run)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs`](/rest/reference/checks#list-check-runs-in-a-check-suite)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites`](/rest/reference/checks#create-a-check-suite)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}`](/rest/reference/checks#get-a-check-suite)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`](/rest/reference/checks#rerequest-a-check-suite)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-suites/preferences`](/rest/reference/checks#update-repository-preferences-for-check-suites)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/branches/branches#list-branches)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/branches/branches#merge-a-branch)
|
||||
|
||||
## code-scanning
|
||||
|
||||
- [`GET /enterprises/{enterprise}/code-scanning/alerts`](/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise)
|
||||
- [`GET /orgs/{org}/code-scanning/alerts`](/rest/reference/code-scanning#list-code-scanning-alerts-by-organization)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/alerts`](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}`](/rest/reference/code-scanning#get-a-code-scanning-alert)
|
||||
@@ -331,6 +257,7 @@ ms.locfileid: '148107235'
|
||||
- [`PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}`](/rest/reference/dependabot#create-or-update-a-repository-secret)
|
||||
- [`DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}`](/rest/reference/dependabot#delete-a-repository-secret)
|
||||
- [`GET /repos/{owner}/{repo}/dependabot/secrets/public-key`](/rest/reference/dependabot#get-a-repository-public-key)
|
||||
- [`GET /orgs/{org}/dependabot/alerts`](/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization)
|
||||
- [`GET /orgs/{org}/dependabot/secrets`](/rest/reference/dependabot#list-organization-secrets)
|
||||
- [`GET /orgs/{org}/dependabot/secrets/{secret_name}`](/rest/reference/dependabot#get-an-organization-secret)
|
||||
- [`PUT /orgs/{org}/dependabot/secrets/{secret_name}`](/rest/reference/dependabot#create-or-update-an-organization-secret)
|
||||
@@ -427,7 +354,7 @@ ms.locfileid: '148107235'
|
||||
- [`GET /repos/{owner}/{repo}/issues`](/rest/reference/issues#list-repository-issues)
|
||||
- [`POST /repos/{owner}/{repo}/issues`](/rest/reference/issues#create-an-issue)
|
||||
- [`GET /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#get-an-issue)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues/#update-an-issue)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#update-an-issue)
|
||||
- [`PUT /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#lock-an-issue)
|
||||
- [`DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#unlock-an-issue)
|
||||
- [`GET /user/issues`](/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user)
|
||||
@@ -474,34 +401,12 @@ ms.locfileid: '148107235'
|
||||
- [`GET /repos/{owner}/{repo}/traffic/popular/referrers`](/rest/metrics/traffic#get-top-referral-sources)
|
||||
- [`GET /repos/{owner}/{repo}/traffic/views`](/rest/metrics/traffic#get-page-views)
|
||||
|
||||
## 迁移
|
||||
|
||||
- [`GET /orgs/{org}/migrations`](/rest/reference/migrations#list-organization-migrations)
|
||||
- [`POST /orgs/{org}/migrations`](/rest/reference/migrations#start-an-organization-migration)
|
||||
- [`GET /orgs/{org}/migrations/{migration_id}`](/rest/reference/migrations#get-an-organization-migration-status)
|
||||
- [`GET /orgs/{org}/migrations/{migration_id}/archive`](/rest/reference/migrations#download-an-organization-migration-archive)
|
||||
- [`DELETE /orgs/{org}/migrations/{migration_id}/archive`](/rest/reference/migrations#delete-an-organization-migration-archive)
|
||||
- [`GET /orgs/{org}/migrations/{migration_id}/repositories`](/rest/reference/migrations#list-repositories-in-an-organization-migration)
|
||||
- [`GET /user/migrations`](/rest/reference/migrations#list-user-migrations)
|
||||
- [`POST /user/migrations`](/rest/reference/migrations#start-a-user-migration)
|
||||
- [`GET /user/migrations/{migration_id}`](/rest/reference/migrations#get-a-user-migration-status)
|
||||
- [`GET /user/migrations/{migration_id}/archive`](/rest/reference/migrations#download-a-user-migration-archive)
|
||||
- [`DELETE /user/migrations/{migration_id}/archive`](/rest/reference/migrations#delete-a-user-migration-archive)
|
||||
- [`GET /user/migrations/{migration_id}/repositories`](/rest/reference/migrations#list-repositories-for-a-user-migration)
|
||||
- [`GET /repos/{owner}/{repo}/import`](/rest/reference/migrations#get-an-import-status)
|
||||
- [`PUT /repos/{owner}/{repo}/import`](/rest/reference/migrations#start-an-import)
|
||||
- [`PATCH /repos/{owner}/{repo}/import`](/rest/reference/migrations#update-an-import)
|
||||
- [`DELETE /repos/{owner}/{repo}/import`](/rest/reference/migrations#cancel-an-import)
|
||||
- [`GET /repos/{owner}/{repo}/import/authors`](/rest/reference/migrations#get-commit-authors)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/authors/{author_id}`](/rest/reference/migrations#map-a-commit-author)
|
||||
- [`GET /repos/{owner}/{repo}/import/large_files`](/rest/reference/migrations#get-large-files)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/lfs`](/rest/reference/migrations#update-git-lfs-preference)
|
||||
|
||||
## orgs
|
||||
|
||||
{% ifversion ghec %}
|
||||
- [`GET /orgs/{org}/audit-log`](/rest/reference/orgs#get-audit-log){% endif %}
|
||||
- [`GET /organizations/{organization_id}/custom_roles`](/rest/reference/orgs#list-custom-repository-roles-in-an-organization)
|
||||
- [`GET /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs/#get-a-custom-role)
|
||||
- [`PATCH /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#update-a-custom-role)
|
||||
- [`DELETE /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#delete-a-custom-role)
|
||||
- [`GET /orgs/{org}/fine_grained_permissions`](/rest/reference/orgs#list-fine-grained-permissions-for-an-organization)
|
||||
@@ -539,7 +444,7 @@ ms.locfileid: '148107235'
|
||||
- [`DELETE /orgs/{org}/security-managers/teams/{team_slug}`](/rest/reference/orgs#remove-a-security-manager-team)
|
||||
- [`GET /organizations`](/rest/reference/orgs#list-organizations)
|
||||
- [`GET /orgs/{org}`](/rest/reference/orgs#get-an-organization)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs/#update-an-organization)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs#update-an-organization)
|
||||
- [`GET /orgs/{org}/installations`](/rest/reference/orgs#list-app-installations-for-an-organization)
|
||||
- [`GET /users/{username}/orgs`](/rest/reference/orgs#list-organizations-for-a-user)
|
||||
- [`GET /user/memberships/orgs/{org}`](/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user)
|
||||
@@ -551,18 +456,10 @@ ms.locfileid: '148107235'
|
||||
- [`PUT /orgs/{org}/blocks/{username}`](/rest/reference/orgs#block-a-user-from-an-organization)
|
||||
- [`DELETE /orgs/{org}/blocks/{username}`](/rest/reference/orgs#unblock-a-user-from-an-organization)
|
||||
|
||||
## packages
|
||||
|
||||
- [`GET /orgs/{org}/packages`](/rest/reference/packages#list-packages-for-an-organization)
|
||||
- [`GET /users/{username}/packages`](/rest/reference/packages#list-packages-for-user)
|
||||
- [`GET /user/packages`](/rest/reference/packages#list-packages-for-the-authenticated-user)
|
||||
|
||||
## 页
|
||||
|
||||
- [`GET /repos/{owner}/{repo}/pages`](/rest/pages#get-a-github-pages-site)
|
||||
- [`POST /repos/{owner}/{repo}/pages`](/rest/pages#create-a-github-pages-site)
|
||||
- [`PUT /repos/{owner}/{repo}/pages`](/rest/pages#update-information-about-a-github-pages-site)
|
||||
- [`DELETE /repos/{owner}/{repo}/pages`](/rest/pages#delete-a-github-pages-site)
|
||||
- [`GET /repos/{owner}/{repo}/pages/builds`](/rest/pages#list-github-pages-builds)
|
||||
- [`POST /repos/{owner}/{repo}/pages/builds`](/rest/pages#request-a-github-pages-build)
|
||||
- [`GET /repos/{owner}/{repo}/pages/builds/{build_id}`](/rest/pages#get-github-pages-build)
|
||||
@@ -570,34 +467,6 @@ ms.locfileid: '148107235'
|
||||
- [`POST /repos/{owner}/{repo}/pages/deployment`](/rest/pages#create-a-github-pages-deployment)
|
||||
- [`GET /repos/{owner}/{repo}/pages/health`](/rest/pages#get-a-dns-health-check-for-github-pages)
|
||||
|
||||
## projects
|
||||
|
||||
- [`GET /projects/{project_id}/collaborators`](/rest/reference/projects#list-project-collaborators)
|
||||
- [`PUT /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#add-project-collaborator)
|
||||
- [`DELETE /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#remove-project-collaborator)
|
||||
- [`GET /projects/{project_id}/collaborators/{username}/permission`](/rest/reference/projects#get-project-permission-for-a-user)
|
||||
- [`GET /orgs/{org}/projects`](/rest/reference/projects#list-organization-projects)
|
||||
- [`POST /orgs/{org}/projects`](/rest/reference/projects#create-an-organization-project)
|
||||
- [`GET /projects/{project_id}`](/rest/reference/projects#get-a-project)
|
||||
- [`PATCH /projects/{project_id}`](/rest/reference/projects#update-a-project)
|
||||
- [`DELETE /projects/{project_id}`](/rest/reference/projects#delete-a-project)
|
||||
- [`GET /projects/{project_id}/columns`](/rest/reference/projects#list-project-columns)
|
||||
- [`POST /projects/{project_id}/columns`](/rest/reference/projects#create-a-project-column)
|
||||
- [`GET /projects/columns/{column_id}`](/rest/reference/projects#get-a-project-column)
|
||||
- [`PATCH /projects/columns/{column_id}`](/rest/reference/projects#update-a-project-column)
|
||||
- [`DELETE /projects/columns/{column_id}`](/rest/reference/projects#delete-a-project-column)
|
||||
- [`GET /projects/columns/{column_id}/cards`](/rest/reference/projects#list-project-cards)
|
||||
- [`POST /projects/columns/{column_id}/cards`](/rest/reference/projects#create-a-project-card)
|
||||
- [`POST /projects/columns/{column_id}/moves`](/rest/reference/projects#move-a-project-column)
|
||||
- [`GET /projects/columns/cards/{card_id}`](/rest/reference/projects#get-a-project-card)
|
||||
- [`PATCH /projects/columns/cards/{card_id}`](/rest/reference/projects#update-a-project-card)
|
||||
- [`DELETE /projects/columns/cards/{card_id}`](/rest/reference/projects#delete-a-project-card)
|
||||
- [`POST /projects/columns/cards/{card_id}/moves`](/rest/reference/projects#move-a-project-card)
|
||||
- [`GET /repos/{owner}/{repo}/projects`](/rest/reference/projects#list-repository-projects)
|
||||
- [`POST /repos/{owner}/{repo}/projects`](/rest/reference/projects#create-a-repository-project)
|
||||
- [`GET /users/{username}/projects`](/rest/reference/projects#list-user-projects)
|
||||
- [`POST /user/projects`](/rest/reference/projects#create-a-user-project)
|
||||
|
||||
## pulls
|
||||
|
||||
- [`GET /repos/{owner}/{repo}/pulls/{pull_number}/comments`](/rest/reference/pulls#list-review-comments-on-a-pull-request)
|
||||
@@ -669,7 +538,7 @@ ms.locfileid: '148107235'
|
||||
- [`POST /orgs/{org}/repos`](/rest/reference/repos#create-an-organization-repository)
|
||||
- [`GET /repositories`](/rest/reference/repos#list-public-repositories)
|
||||
- [`GET /repos/{owner}/{repo}`](/rest/reference/repos#get-a-repository)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/reference/repos/#update-a-repository)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/repos/repos#update-a-repository)
|
||||
- [`DELETE /repos/{owner}/{repo}`](/rest/reference/repos#delete-a-repository)
|
||||
- [`GET /repos/{owner}/{repo}/contributors`](/rest/reference/repos#list-repository-contributors)
|
||||
- [`GET /repos/{owner}/{repo}/forks`](/rest/reference/repos#list-forks)
|
||||
@@ -677,7 +546,6 @@ ms.locfileid: '148107235'
|
||||
- [`GET /repos/{owner}/{repo}/languages`](/rest/reference/repos#list-repository-languages)
|
||||
- [`GET /repos/{owner}/{repo}/tags`](/rest/reference/repos#list-repository-tags)
|
||||
- [`GET /repos/{owner}/{repo}/teams`](/rest/reference/repos#list-repository-teams)
|
||||
- [`POST /repos/{owner}/{repo}/transfer`](/rest/reference/repos#transfer-a-repository)
|
||||
- [`GET /users/{username}/repos`](/rest/reference/repos#list-repositories-for-a-user)
|
||||
- [`GET /user/repos`](/rest/reference/repos#list-repositories-for-the-authenticated-user)
|
||||
- [`POST /user/repos`](/rest/reference/repos#create-a-repository-for-the-authenticated-user)
|
||||
@@ -687,16 +555,11 @@ ms.locfileid: '148107235'
|
||||
- [`DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}`](/v3/repos#delete-autolink)
|
||||
- [`PUT /repos/{owner}/{repo}/automated-security-fixes`](/rest/reference/repos#enable-automated-security-fixes)
|
||||
- [`DELETE /repos/{owner}/{repo}/automated-security-fixes`](/rest/reference/repos#disable-automated-security-fixes)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/reference/repos#list-branches)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/reference/repos#merge-a-branch)
|
||||
- [`POST /repos/{owner}/{repo}/dispatches`](/rest/reference/repos#create-a-repository-dispatch-event)
|
||||
- [`GET /repos/{owner}/{repo}/keys`](/rest/reference/repos#list-deploy-keys)
|
||||
- [`POST /repos/{owner}/{repo}/keys`](/rest/reference/repos#create-a-deploy-key)
|
||||
- [`GET /repos/{owner}/{repo}/keys/{key_id}`](/rest/reference/repos#get-a-deploy-key)
|
||||
- [`DELETE /repos/{owner}/{repo}/keys/{key_id}`](/rest/reference/repos#delete-a-deploy-key)
|
||||
- [`PUT /repos/{owner}/{repo}/lfs`](/rest/reference/repos#enable-git-lfs-for-a-repository)
|
||||
- [`DELETE /repos/{owner}/{repo}/lfs`](/rest/reference/repos#disable-git-lfs-for-a-repository)
|
||||
- [`GET /repos/{owner}/{repo}/releases`](/rest/reference/repos#list-releases)
|
||||
- [`POST /repos/{owner}/{repo}/releases`](/rest/reference/repos#create-a-release)
|
||||
- [`GET /repos/{owner}/{repo}/releases/{release_id}`](/rest/reference/repos#get-a-release)
|
||||
@@ -729,7 +592,6 @@ ms.locfileid: '148107235'
|
||||
|
||||
## secret-scanning
|
||||
|
||||
- [`GET /enterprises/{enterprise}/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)
|
||||
- [`GET /orgs/{org}/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization)
|
||||
- [`GET /repos/{owner}/{repo}/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository)
|
||||
- [`GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}`](/rest/reference/secret-scanning#get-a-secret-scanning-alert)
|
||||
@@ -797,7 +659,6 @@ ms.locfileid: '148107235'
|
||||
- [`POST /user/gpg_keys`](/rest/reference/users#create-a-gpg-key-for-the-authenticated-user)
|
||||
- [`GET /user/gpg_keys/{gpg_key_id}`](/rest/reference/users#get-a-gpg-key-for-the-authenticated-user)
|
||||
- [`DELETE /user/gpg_keys/{gpg_key_id}`](/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user)
|
||||
- [`GET /users/{username}/hovercard`](/rest/reference/users#get-contextual-information-for-a-user)
|
||||
- [`GET /users/{username}/keys`](/rest/reference/users#list-public-keys-for-a-user)
|
||||
- [`GET /user/keys`](/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user)
|
||||
- [`POST /user/keys`](/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user)
|
||||
|
||||
@@ -11,6 +11,7 @@ topics:
|
||||
- API
|
||||
children:
|
||||
- /resources-in-the-rest-api
|
||||
- /api-versions
|
||||
- /media-types
|
||||
- /other-authentication-methods
|
||||
- /troubleshooting
|
||||
@@ -20,12 +21,13 @@ children:
|
||||
- /endpoints-available-for-github-apps
|
||||
- /endpoints-available-for-fine-grained-personal-access-tokens
|
||||
- /permissions-required-for-github-apps
|
||||
- /breaking-changes
|
||||
- /permissions-required-for-fine-grained-personal-access-tokens
|
||||
ms.openlocfilehash: 96d6109d1dcd2571ada7e448459980fdf6a92e05
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.openlocfilehash: 7e5671dcf94766dfcc8d1a39dd47191e20eb1513
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145101182'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184228'
|
||||
---
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,8 +13,12 @@ topics:
|
||||
- API
|
||||
---
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
## API version
|
||||
|
||||
This describes the resources that make up the official {% data variables.product.product_name %} REST API. If you have any problems or requests, please contact {% data variables.contact.contact_support %}.
|
||||
Available resources may vary between REST API versions. You should use the `X-GitHub-Api-Version` header to specify an API version. For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Schema
|
||||
|
||||
|
||||
@@ -17,6 +17,22 @@ topics:
|
||||
If you're encountering some oddities in the API, here's a list of resolutions to
|
||||
some of the problems you may be experiencing.
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
|
||||
## `400` error for an unsupported API version
|
||||
|
||||
You should use the `X-GitHub-Api-Version` header to specify an API version. For example:
|
||||
|
||||
```shell
|
||||
$ curl {% data reusables.rest-api.version-header %} https://api.github.com/zen
|
||||
```
|
||||
|
||||
If you specify a version that does not exist, you will receive a `400` error.
|
||||
|
||||
For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
## `404` error for an existing repository
|
||||
|
||||
Typically, we send a `404` error when your client isn't properly authenticated.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Pull request review comments
|
||||
title: 拉取请求审查评论
|
||||
shortTitle: Review comments
|
||||
intro: ''
|
||||
versions:
|
||||
@@ -11,10 +11,15 @@ topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
allowTitleToDifferFromFilename: true
|
||||
ms.openlocfilehash: d076bead1efdb07c3fcce3472798bddeaf9908e6
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181280'
|
||||
---
|
||||
## 关于拉取请求评审评论 API
|
||||
|
||||
## About the Pull request review comments API
|
||||
|
||||
Pull request review comments are comments on a portion of the unified diff made during a pull request review. Commit comments and issue comments are different from pull request review comments. You apply commit comments directly to a commit and you apply issue comments without referencing a portion of the unified diff. For more information, see "[Create a commit comment](/rest/reference/commits#create-a-commit-comment)" and "[Create an issue comment](/rest/reference/issues#create-an-issue-comment)."
|
||||
拉取请求审查评论是在拉取请求审查期间对统一差异的一部分所发表的评论。 提交评论和议题评论不同于拉取请求审查评论。 将提交评论直接应用于提交,然后应用议题评论而不引用统一差异的一部分。 有关详细信息,请参阅“[创建提交评论](/rest/reference/commits#create-a-commit-comment)”和“[创建问题评论](/rest/reference/issues#create-an-issue-comment)”。
|
||||
|
||||
{% data reusables.pull_requests.issues-media-types %}
|
||||
|
||||
@@ -9,12 +9,12 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: 80e4a5a5257a8f2615b402567f91daa9e68a0077
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: b140c41062e4fea4c1cb1299b23de774963913af
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145101145'
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181284'
|
||||
---
|
||||
## 关于拉取 API
|
||||
|
||||
@@ -26,12 +26,12 @@ ms.locfileid: '145101145'
|
||||
|
||||
以下是拉取请求支持的媒体类型。
|
||||
|
||||
application/vnd.github.VERSION.raw+json
|
||||
application/vnd.github.VERSION.text+json
|
||||
application/vnd.github.VERSION.html+json
|
||||
application/vnd.github.VERSION.full+json
|
||||
application/vnd.github.VERSION.diff
|
||||
application/vnd.github.VERSION.patch
|
||||
application/vnd.github.raw+json
|
||||
application/vnd.github.text+json
|
||||
application/vnd.github.html+json
|
||||
application/vnd.github.full+json
|
||||
application/vnd.github.diff
|
||||
application/vnd.github.patch
|
||||
|
||||
有关详细信息,请参阅“[自定义媒体类型](/rest/overview/media-types)”。
|
||||
|
||||
|
||||
@@ -11,13 +11,15 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: ee55b646dd58b4f91227c6d629c2e07d834b6dfd
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.openlocfilehash: 6e07a6cbbdb368ef530b81a6c9cc3893e1590ac4
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '145101143'
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184043'
|
||||
---
|
||||
## 关于拉取请求评审 API
|
||||
|
||||
拉取请求审查是拉取请求上的拉取请求审查评论组,与状态和可选的正文注释一起分组。
|
||||
|
||||
{% data reusables.pull_requests.issues-media-types %}
|
||||
|
||||
@@ -11,12 +11,12 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: 50875021a506201a90cbac62db521604a390a586
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: fd3619faeb8ccaeaa70e8a2be050881b4a169b64
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147060328'
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181283'
|
||||
---
|
||||
## 关于存储库内容 API
|
||||
|
||||
@@ -26,8 +26,8 @@ ms.locfileid: '147060328'
|
||||
|
||||
[README](/rest/reference/repos#get-a-repository-readme)、[文件](/rest/reference/repos#get-repository-content)和[符号链接](/rest/reference/repos#get-repository-content)支持以下自定义媒体类型:
|
||||
|
||||
application/vnd.github.VERSION.raw
|
||||
application/vnd.github.VERSION.html
|
||||
application/vnd.github.raw
|
||||
application/vnd.github.html
|
||||
|
||||
使用 `.raw` 媒体类型检索文件的内容。
|
||||
|
||||
@@ -35,7 +35,7 @@ ms.locfileid: '147060328'
|
||||
|
||||
[所有对象](/rest/reference/repos#get-repository-content)都支持以下自定义媒体类型:
|
||||
|
||||
application/vnd.github.VERSION.object
|
||||
application/vnd.github.object
|
||||
|
||||
无论内容类型如何,使用 `object` 媒体类型参数以一致的对象格式检索内容。 例如,响应不是目录的对象数组,而是具有包含对象数组的 `entries` 属性的对象。
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: a0c8b24bacdd41e32d9b8bdd0d8850e7a6ada557
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: a9f12214edcef8a107ad9c447fea7207cfdc48f4
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "145098580"
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184060"
|
||||
---
|
||||
当并发作业或工作流排队时,如果存储库中使用同一并发组的其他作业或工作流正在运行,则排队的作业或工作流将为 `pending`。 在并发组中任何先前挂起的作业或工作流程都将被取消。 若还要取消同一并发组中任何当前正在运行的作业或工作流,请指定 `cancel-in-progress: true`。
|
||||
|
||||
@@ -26,7 +26,7 @@ concurrency: ci-${{ github.ref }}
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
concurrency:
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
```
|
||||
@@ -38,7 +38,7 @@ concurrency:
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
concurrency:
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
```
|
||||
@@ -53,7 +53,7 @@ concurrency:
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
concurrency:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
```
|
||||
|
||||
@@ -1,116 +1,192 @@
|
||||
---
|
||||
ms.openlocfilehash: e0bf1f4b7bbd5fcb145a6e869dd442fd8e53108a
|
||||
ms.sourcegitcommit: b4996daba2e75b3368f39316e6929602f13b961b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/31/2022
|
||||
ms.locfileid: "148120532"
|
||||
---
|
||||
| 类别名称 | 说明
|
||||
| Category name | Description
|
||||
|------------------|-------------------
|
||||
{%- ifversion fpt or ghec %} | `account` | 包含与组织帐户相关的活动。
|
||||
| `advisory_credit` | 包含与 {% data variables.product.prodname_advisory_database %} 中安全通告的贡献者积分相关的活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通知](/github/managing-security-vulnerabilities/about-github-security-advisories)”。
|
||||
{%- endif %} | `artifact` | 包含与 {% data variables.product.prodname_actions %} 工作流运行工件相关的活动。
|
||||
{%- ifversion audit-log-streaming %} | `audit_log_streaming` | 包含与企业帐户中组织的流式审核日志相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `billing` | 包含与组织计费相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `business` | 包含与企业的业务设置相关的活动。
|
||||
{%- endif %} {%- ifversion code-security-audit-log-events %} | `business_advanced_security` | 包含与企业中的 {% data variables.product.prodname_GH_advanced_security %} 相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
| `business_secret_scanning` | 包含与企业中的 {% data variables.product.prodname_secret_scanning %} 相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `business_secret_scanning_custom_pattern` | 包含与企业中 {% data variables.product.prodname_secret_scanning %} 的自定义模式相关的活动。
|
||||
{%- endif %} {%- ifversion code-security-audit-log-events %} | `business_secret_scanning_push_protection` | 包含与企业中 {% data variables.product.prodname_secret_scanning %} 的推送保护功能相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
| `business_secret_scanning_push_protection_custom_message` | 包含与在企业中触发推送保护时显示的自定义消息相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
{%- endif %} | `checks` | 包含与检查套件和运行相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `codespaces` | 包含与组织的 codespaces 相关的活动。
|
||||
{%- endif %} | `commit_comment` | 包含与更新或删除提交评论相关的活动。
|
||||
{%- ifversion ghes %} | `config_entry` | 包含与配置设置相关的活动。 这些事件仅在站点管理员审核日志中可见。
|
||||
{%- endif %} | `dependabot_alerts` | 包含现有存储库中 {% data variables.product.prodname_dependabot_alerts %} 的组织级配置活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)”。
|
||||
| `dependabot_alerts_new_repos` | 包含组织新建存储库中 {% data variables.product.prodname_dependabot_alerts %} 的组织级配置活动。
|
||||
| `dependabot_repository_access` | 包含与允许 {% data variables.product.prodname_dependabot %} 访问组织中哪些专用存储库相关的活动。
|
||||
{%- ifversion fpt or ghec or ghes %} | `dependabot_security_updates` | 包含现有存储库中 {% data variables.product.prodname_dependabot_security_updates %} 的组织级配置活动。 有关详细信息,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)”。
|
||||
| `dependabot_security_updates_new_repos` | 包含组织新建存储库中 {% data variables.product.prodname_dependabot_security_updates %} 的组织级配置活动。
|
||||
{%- endif %} | `dependency_graph` | 包含存储库依赖项关系图的组织级配置活动。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。
|
||||
| `dependency_graph_new_repos` | 包含组织新建存储库的组织级配置活动。
|
||||
{%- ifversion fpt or ghec %} | `discussion` | 包含与团队讨论相关的活动。
|
||||
| `discussion_comment` | 包含与发布到团队页的讨论中的评论相关的活动。
|
||||
| `discussion_post` | 包含与发布到团队页的讨论相关的活动。
|
||||
| `discussion_post_reply` | 包含与发布到团队页的讨论回复相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes %} | `dotcom_connection` | 包含与 {% data variables.product.prodname_github_connect %} 相关的活动。
|
||||
| `enterprise` | 包含与企业设置相关的活动。
|
||||
{%- endif %} {%- ifversion ghec %} | `enterprise_domain` | 包含与已验证的企业域相关的活动。
|
||||
| `enterprise_installation` | 包含与和 {% data variables.product.prodname_github_connect %} 企业连接关联的 {% data variables.product.prodname_github_app %} 相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `environment` | 包含与 {% data variables.product.prodname_actions %} 环境相关的活动。
|
||||
{%- endif %} {%- ifversion ghae %} | `external_group` | 包含与 Okta 组相关的活动。
|
||||
| `external_identity` | 包含与 Okta 组中的用户相关的活动。
|
||||
{%- endif %} | `gist` | 包含与 Gists 相关的活动。
|
||||
| `hook` | 包含与 Webhook 相关的活动。
|
||||
| `integration` | 包含与帐户中的集成相关的活动。
|
||||
| `integration_installation` | 包含与帐户中安装的集成相关的活动。
|
||||
| `integration_installation_request` | 包含与组织成员请求所有者批准在组织中使用的集成相关的活动。
|
||||
{%- ifversion ghec or ghae %} | `ip_allow_list` | 包含与为组织启用或禁用 IP 允许列表相关的活动。
|
||||
| `ip_allow_list_entry` | 包含与为组织创建、删除和编辑 IP 允许列表条目相关的活动。
|
||||
{%- endif %} | `issue` | 包含与固定、转移或删除存储库中问题相关的活动。
|
||||
| `issue_comment` | 包含与固定、转移或删除问题评论相关的活动。
|
||||
| `issues` | 包含与为组织启用或禁用问题创建相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `marketplace_agreement_signature` | 包含与签署 {% data variables.product.prodname_marketplace %} 开发者协议相关的活动。
|
||||
| `marketplace_listing` | 包含与 {% data variables.product.prodname_marketplace %} 中列出的应用相关的活动。
|
||||
{%- endif %} | `members_can_create_pages` | 包含与管理组织存储库的 {% data variables.product.prodname_pages %} 站点发布相关的活动。 有关详细信息,请参阅“[为组织管理 {% data variables.product.prodname_pages %} 站点的发布](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)”。
|
||||
| `members_can_create_private_pages` | 包含与管理组织存储库的专用 {% data variables.product.prodname_pages %} 站点发布相关的活动。
|
||||
| `members_can_create_public_pages` | 包含与管理组织存储库的公共 {% data variables.product.prodname_pages %} 站点发布相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `members_can_delete_repos` | 包含与为组织启用或禁用存储库创建相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `members_can_view_dependency_insights` | 包含允许组织成员查看依赖项见解的组织级配置活动。
|
||||
| `migration` | 包含与将数据从源位置(例如 {% data variables.product.prodname_dotcom_the_website %} 组织或 {% data variables.product.prodname_ghe_server %} 实例)传输到目标 {% data variables.product.prodname_ghe_server %} 实例相关的活动 。
|
||||
{%- endif %} | `oauth_access` | 包含与 OAuth 访问令牌相关的活动。
|
||||
| `oauth_application` | 包含与 OAuth 应用相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `oauth_authorization` | 包含与授权 OAuth 应用相关的活动。
|
||||
{%- endif %} | `org` | 包含与组织成员身份相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `org_credential_authorization` | 包含与授权凭据以用于 SAML 单一登录相关的活动。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `org_secret_scanning_custom_pattern` | 包含与组织中机密扫描的自定义模式相关的活动。 有关详细信息,请参阅“[为机密扫描定义自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。
|
||||
| `org.secret_scanning_push_protection` | 包含与组织中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。
|
||||
{%- endif %} | `organization_default_label` | 包含与组织中存储库的默认标签相关的活动。
|
||||
{%- ifversion fpt or ghec or ghes %} | `organization_domain` | 包含与已验证的组织域相关的活动。
|
||||
| `organization_projects_change` | 包含与企业中组织范围的项目板相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `pages_protected_domain` | 包含与 {% data variables.product.prodname_pages %} 的已验证自定义域相关的活动。
|
||||
| `payment_method` | 包含与组织如何支付 {% data variables.product.prodname_dotcom %} 相关的活动。
|
||||
| `prebuild_configuration` | 包含与 {% data variables.product.prodname_github_codespaces %} 的预生成配置相关的活动。
|
||||
{%- endif %} {%- ifversion ghes %} | `pre_receive_environment` | 包含与预接收挂钩环境相关的活动。
|
||||
| `pre_receive_hook` | 包含与预接收挂钩相关的活动。
|
||||
{%- endif %} {%- ifversion ghes %} | `private_instance_encryption` | 包含与为企业启用专用模式相关的活动。
|
||||
{%- endif %} | `private_repository_forking` | 包含与允许存储库、组织或企业的专用和内部存储库分支相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `profile_picture` | 包含与组织的配置文件图片相关的活动。
|
||||
{%- endif %} | `project` | 包含与项目板相关的活动。
|
||||
| `project_field` | 包含与项目板中的字段创建和删除相关的活动。
|
||||
| `project_view` | 包含与项目板中的视图创建和删除相关的活动。
|
||||
| `protected_branch` | 包含与受保护分支相关的活动。
|
||||
| `public_key` | 包含与 SSH 密钥和部署密钥相关的活动。
|
||||
| `pull_request` | 包含与拉取请求评审相关的活动。
|
||||
| `pull_request_review` | 包含与拉取请求评审相关的活动。
|
||||
| `pull_request_review_comment` | 包含与拉取请求评审评论相关的活动。
|
||||
| `repo` | 包含与组织拥有的存储库相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `repository_advisory` | 包含与 {% data variables.product.prodname_advisory_database %} 中的安全通告相关的存储库级活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通知](/github/managing-security-vulnerabilities/about-github-security-advisories)”。
|
||||
| `repository_content_analysis` | 包含与[为专用存储库启用或禁用数据使用](/articles/about-github-s-use-of-your-data)相关的活动。
|
||||
| `repository_dependency_graph` | 包含与为{% ifversion fpt or ghec %}专用{% endif %}存储库启用或禁用依赖项关系图相关的存储库级活动。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。
|
||||
{%- endif %} | `repository_image` | 包含与存储库映像相关的活动。
|
||||
| `repository_invitation` | 包含与邀请加入存储库相关的活动。
|
||||
| `repository_projects_change` | 包含与为存储库或组织中的所有存储库启用项目相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `repository_secret_scanning` | 包含与机密扫描相关的存储库级活动。 有关详细信息,请参阅“[关于机密扫描](/github/administering-a-repository/about-secret-scanning)”。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `repository_secret_scanning_custom_pattern` | 包含与存储库中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[为机密扫描定义自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 {% endif %}{% ifversion secret-scanning-audit-log-custom-patterns %} | `repository_secret_scanning_push_protection` | 包含与存储库中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `repository_visibility_change` | 包含与允许组织成员更改组织的存储库可见性相关的活动。
|
||||
{%- endif %} | `repository_vulnerability_alert` | 包含与 [{% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts) 相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `repository_vulnerability_alerts` | 包含 {% data variables.product.prodname_dependabot_alerts %} 的存储库级配置活动。
|
||||
| `required_status_check` | 包含与受保护分支所需的状态检查相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes %} | `restrict_notification_delivery` | 包含与将电子邮件通知限制为企业的已批准或已验证域相关的活动。
|
||||
{%- endif %} {%- ifversion custom-repository-roles %} | `role` | 包含与[自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `secret_scanning` | 包含现有存储库中机密扫描的组织级配置活动。 有关详细信息,请参阅“[关于机密扫描](/github/administering-a-repository/about-secret-scanning)”。
|
||||
| `secret_scanning_new_repos` | 包含组织新建存储库中机密扫描的组织级配置活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `security_key` | 包含与安全密钥注册和删除相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `sponsors` | 包含与赞助按钮相关的事件(请参阅“[在存储库中显示赞助按钮](/articles/displaying-a-sponsor-button-in-your-repository)”)。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `ssh_certificate_authority` | 包含与组织或企业中的 SSH 证书颁发机构相关的活动。
|
||||
| `ssh_certificate_requirement` | 包含与要求成员使用 SSH 证书访问组织资源相关的活动。
|
||||
{%- endif %} | `staff` | 包含与执行操作的站点管理员相关的活动。
|
||||
| `team` | 包含与组织中的团队相关的活动。
|
||||
| `team_discussions` | 包含与管理组织的团队讨论相关的活动。
|
||||
{%- ifversion ghec %} | `team_sync_tenant` | 包含与企业或组织的 IdP 进行团队同步相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghes %} | `two_factor_authentication` | 包含与双因素身份验证相关的活动。
|
||||
{%- endif %} | `user` | 包含与企业或组织中的用户相关的活动。
|
||||
{%- ifversion ghec or ghes %} | `user_license` | 包含与占用企业许可席位并身为企业成员的用户相关的活动。
|
||||
{%- endif %} | `workflows` | 包含与 {% data variables.product.prodname_actions %} 工作流相关的活动。
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `account` | Contains activities related to an organization account.
|
||||
| `advisory_credit` | Contains activities related to crediting a contributor for a security advisory in the {% data variables.product.prodname_advisory_database %}. For more information, see "[About {% data variables.product.prodname_dotcom %} Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
|
||||
{%- endif %}
|
||||
| `artifact` | Contains activities related to {% data variables.product.prodname_actions %} workflow run artifacts.
|
||||
{%- ifversion audit-log-streaming %}
|
||||
| `audit_log_streaming` | Contains activities related to streaming audit logs for organizations in an enterprise account.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `billing` | Contains activities related to an organization's billing.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `business` | Contains activities related to business settings for an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion code-security-audit-log-events %}
|
||||
| `business_advanced_security` | Contains activities related to {% data variables.product.prodname_GH_advanced_security %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
| `business_secret_scanning` | Contains activities related to {% data variables.product.prodname_secret_scanning %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `business_secret_scanning_custom_pattern` | Contains activities related to custom patterns for {% data variables.product.prodname_secret_scanning %} in an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion code-security-audit-log-events %}
|
||||
| `business_secret_scanning_push_protection` | Contains activities related to the push protection feature of {% data variables.product.prodname_secret_scanning %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
| `business_secret_scanning_push_protection_custom_message` | Contains activities related to the custom message displayed when push protection is triggered in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
{%- endif %}
|
||||
| `checks` | Contains activities related to check suites and runs.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `codespaces` | Contains activities related to an organization's codespaces.
|
||||
{%- endif %}
|
||||
| `commit_comment` | Contains activities related to updating or deleting commit comments.
|
||||
{%- ifversion ghes %}
|
||||
| `config_entry` | Contains activities related to configuration settings. These events are only visible in the site admin audit log.
|
||||
{%- endif %}
|
||||
| `dependabot_alerts` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in existing repositories. For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)."
|
||||
| `dependabot_alerts_new_repos` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in new repositories created in the organization.
|
||||
| `dependabot_repository_access` | Contains activities related to which private repositories in an organization {% data variables.product.prodname_dependabot %} is allowed to access.
|
||||
{%- ifversion fpt or ghec or ghes %}
|
||||
| `dependabot_security_updates` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} in existing repositories. For more information, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)."
|
||||
| `dependabot_security_updates_new_repos` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} for new repositories created in the organization.
|
||||
{%- endif %}
|
||||
| `dependency_graph` | Contains organization-level configuration activities for dependency graphs for repositories. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)."
|
||||
| `dependency_graph_new_repos` | Contains organization-level configuration activities for new repositories created in the organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `discussion` | Contains activities related to team discussions.
|
||||
| `discussion_comment` | Contains activities related to comments posted in discussions on a team page.
|
||||
| `discussion_post` | Contains activities related to discussions posted to a team page.
|
||||
| `discussion_post_reply` | Contains activities related to replies to discussions posted to a team page.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `dotcom_connection` | Contains activities related to {% data variables.product.prodname_github_connect %}.
|
||||
| `enterprise` | Contains activities related to enterprise settings.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec %}
|
||||
| `enterprise_domain` | Contains activities related to verified enterprise domains.
|
||||
| `enterprise_installation` | Contains activities related to {% data variables.product.prodname_github_app %}s associated with an {% data variables.product.prodname_github_connect %} enterprise connection.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `environment` | Contains activities related to {% data variables.product.prodname_actions %} environments.
|
||||
{%- endif %}
|
||||
{%- ifversion ghae %}
|
||||
| `external_group` | Contains activities related to Okta groups.
|
||||
| `external_identity` | Contains activities related to a user in an Okta group.
|
||||
{%- endif %}
|
||||
| `gist` | Contains activities related to Gists.
|
||||
| `hook` | Contains activities related to webhooks.
|
||||
| `integration` | Contains activities related to integrations in an account.
|
||||
| `integration_installation` | Contains activities related to integrations installed in an account.
|
||||
| `integration_installation_request` | Contains activities related to organization member requests for owners to approve integrations for use in the organization.
|
||||
{%- ifversion ghec or ghae %}
|
||||
| `ip_allow_list` | Contains activities related to enabling or disabling the IP allow list for an organization.
|
||||
| `ip_allow_list_entry` | Contains activities related to the creation, deletion, and editing of an IP allow list entry for an organization.
|
||||
{%- endif %}
|
||||
| `issue` | Contains activities related to pinning, transferring, or deleting an issue in a repository.
|
||||
| `issue_comment` | Contains activities related to pinning, transferring, or deleting issue comments.
|
||||
| `issues` | Contains activities related to enabling or disabling issue creation for an organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `marketplace_agreement_signature` | Contains activities related to signing the {% data variables.product.prodname_marketplace %} Developer Agreement.
|
||||
| `marketplace_listing` | Contains activities related to listing apps in {% data variables.product.prodname_marketplace %}.
|
||||
{%- endif %}
|
||||
| `members_can_create_pages` | Contains activities related to managing the publication of {% data variables.product.prodname_pages %} sites for repositories in the organization. For more information, see "[Managing the publication of {% data variables.product.prodname_pages %} sites for your organization](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)."
|
||||
| `members_can_create_private_pages` | Contains activities related to managing the publication of private {% data variables.product.prodname_pages %} sites for repositories in the organization.
|
||||
| `members_can_create_public_pages` | Contains activities related to managing the publication of public {% data variables.product.prodname_pages %} sites for repositories in the organization.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `members_can_delete_repos` | Contains activities related to enabling or disabling repository creation for an organization.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `members_can_view_dependency_insights` | Contains organization-level configuration activities allowing organization members to view dependency insights.
|
||||
| `migration` | Contains activities related to transferring data from a *source* location (such as a {% data variables.product.prodname_dotcom_the_website %} organization or a {% data variables.product.prodname_ghe_server %} instance) to a *target* {% data variables.product.prodname_ghe_server %} instance.
|
||||
{%- endif %}
|
||||
| `oauth_access` | Contains activities related to OAuth access tokens.
|
||||
| `oauth_application` | Contains activities related to OAuth Apps.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `oauth_authorization` | Contains activities related to authorizing OAuth Apps.
|
||||
{%- endif %}
|
||||
| `org` | Contains activities related to organization membership.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `org_credential_authorization` | Contains activities related to authorizing credentials for use with SAML single sign-on.
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `org_secret_scanning_custom_pattern` | Contains activities related to custom patterns for secret scanning in an organization. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)."
|
||||
| `org.secret_scanning_push_protection` | Contains activities related to secret scanning custom patterns in an organization. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
|
||||
{%- endif %}
|
||||
| `organization_default_label` | Contains activities related to default labels for repositories in an organization.
|
||||
{%- ifversion fpt or ghec or ghes %}
|
||||
| `organization_domain` | Contains activities related to verified organization domains.
|
||||
| `organization_projects_change` | Contains activities related to organization-wide project boards in an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `pages_protected_domain` | Contains activities related to verified custom domains for {% data variables.product.prodname_pages %}.
|
||||
| `payment_method` | Contains activities related to how an organization pays for {% data variables.product.prodname_dotcom %}.
|
||||
| `prebuild_configuration` | Contains activities related to prebuild configurations for {% data variables.product.prodname_github_codespaces %}.
|
||||
{%- endif %}
|
||||
{%- ifversion ghes %}
|
||||
| `pre_receive_environment` | Contains activities related to pre-receive hook environments.
|
||||
| `pre_receive_hook` | Contains activities related to pre-receive hooks.
|
||||
{%- endif %}
|
||||
{%- ifversion ghes %}
|
||||
| `private_instance_encryption` | Contains activities related to enabling private mode for an enterprise.
|
||||
{%- endif %}
|
||||
| `private_repository_forking` | Contains activities related to allowing forks of private and internal repositories, for a repository, organization or enterprise.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `profile_picture` | Contains activities related to an organization's profile picture.
|
||||
{%- endif %}
|
||||
| `project` | Contains activities related to project boards.
|
||||
| `project_field` | Contains activities related to field creation and deletion in a project board.
|
||||
| `project_view` | Contains activities related to view creation and deletion in a project board.
|
||||
| `protected_branch` | Contains activities related to protected branches.
|
||||
| `public_key` | Contains activities related to SSH keys and deploy keys.
|
||||
| `pull_request` | Contains activities related to pull requests.
|
||||
| `pull_request_review` | Contains activities related to pull request reviews.
|
||||
| `pull_request_review_comment` | Contains activities related to pull request review comments.
|
||||
| `repo` | Contains activities related to the repositories owned by an organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_advisory` | Contains repository-level activities related to security advisories in the {% data variables.product.prodname_advisory_database %}. For more information, see "[About {% data variables.product.prodname_dotcom %} Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
|
||||
| `repository_content_analysis` | Contains activities related to [enabling or disabling data use for a private repository](/articles/about-github-s-use-of-your-data).
|
||||
| `repository_dependency_graph` | Contains repository-level activities related to enabling or disabling the dependency graph for a {% ifversion fpt or ghec %}private {% endif %}repository. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)."
|
||||
{%- endif %}
|
||||
| `repository_image` | Contains activities related to images for a repository.
|
||||
| `repository_invitation` | Contains activities related to invitations to join a repository.
|
||||
| `repository_projects_change` | Contains activities related to enabling projects for a repository or for all repositories in an organization.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `repository_secret_scanning` | Contains repository-level activities related to secret scanning. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `repository_secret_scanning_custom_pattern` | Contains activities related to secret scanning custom patterns in a repository. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." {% endif %}{% ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `repository_secret_scanning_push_protection` | Contains activities related to secret scanning custom patterns in a repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_visibility_change` | Contains activities related to allowing organization members to change repository visibilities for the organization.
|
||||
{%- endif %}
|
||||
| `repository_vulnerability_alert` | Contains activities related to [{% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_vulnerability_alerts` | Contains repository-level configuration activities for {% data variables.product.prodname_dependabot_alerts %}.
|
||||
| `required_status_check` | Contains activities related to required status checks for protected branches.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `restrict_notification_delivery` | Contains activities related to the restriction of email notifications to approved or verified domains for an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion custom-repository-roles %}
|
||||
| `role` | Contains activities related to [custom repository roles](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `secret_scanning` | Contains organization-level configuration activities for secret scanning in existing repositories. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
|
||||
| `secret_scanning_new_repos` | Contains organization-level configuration activities for secret scanning for new repositories created in the organization.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `security_key` | Contains activities related to security keys registration and removal.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `sponsors` | Contains events related to sponsor buttons (see "[Displaying a sponsor button in your repository](/articles/displaying-a-sponsor-button-in-your-repository)").
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `ssh_certificate_authority` | Contains activities related to a SSH certificate authority in an organization or enterprise.
|
||||
| `ssh_certificate_requirement` | Contains activities related to requiring members use SSH certificates to access organization resources.
|
||||
{%- endif %}{% ifversion sso-redirect %}
|
||||
| `sso_redirect` | Contains activities related to automatically redirecting users to sign in (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-sso-for-unauthenticated-users)").{% endif %}
|
||||
| `staff` | Contains activities related to a site admin performing an action.
|
||||
| `team` | Contains activities related to teams in an organization.
|
||||
| `team_discussions` | Contains activities related to managing team discussions for an organization.
|
||||
{%- ifversion ghec %}
|
||||
| `team_sync_tenant` | Contains activities related to team synchronization with an IdP for an enterprise or organization.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghes %}
|
||||
| `two_factor_authentication` | Contains activities related to two-factor authentication.
|
||||
{%- endif %}
|
||||
| `user` | Contains activities related to users in an enterprise or organization.
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `user_license` | Contains activities related to a user occupying a licensed seat in, and being a member of, an enterprise.
|
||||
{%- endif %}
|
||||
| `workflows` | Contains activities related to {% data variables.product.prodname_actions %} workflows.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
For compiled languages like Java,{% ifversion codeql-kotlin-beta %} Kotlin, {% endif %}{% ifversion codeql-go-autobuild %} Go,{% endif %} C, C++, and C#, {% data variables.product.prodname_codeql %} analyzes all of the code which was built during the workflow run. To limit the amount of code being analyzed, build ony the code which you wish to analyze by specifying your own build steps in a `run` block. You can combine specifying your own build steps with using the `paths` or `paths-ignore` filters on the `pull_request` and `push` events to ensure that your workflow only runs when specific code is changed. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)."
|
||||
---
|
||||
ms.openlocfilehash: a39c6a75a0b6decf15352f2d164d593f0d020fff
|
||||
ms.sourcegitcommit: dac72908e8660cb4a347fbf73beab61034eed8c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/25/2022
|
||||
ms.locfileid: "148182304"
|
||||
---
|
||||
对于 Java、{% ifversion codeql-kotlin-beta %}Kotlin、{% endif %}{% ifversion codeql-go-autobuild %}Go、{% endif %}C、C++ 和 C# 等编译语言,{% data variables.product.prodname_codeql %} 分析在工作流运行过程中生成的所有代码。 要限制要分析的代码量,请通过在 `run` 块中指定的生成步骤,来生成想要分析的代码。 可以将指定自己的生成步骤与对 `pull_request` 和 `push` 事件使用 `paths` 或 `paths-ignore` 筛选器相结合,以确保工作流仅在特定代码更改时运行。 有关详细信息,请参阅 [{% data variables.product.prodname_actions %} 的工作流语法](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)。
|
||||
|
||||
For languages like{% ifversion codeql-go-autobuild %}{% else %} Go,{% endif %} JavaScript, Python, and TypeScript, that {% data variables.product.prodname_codeql %} analyzes without compiling the source code, you can specify additional configuration options to limit the amount of code to analyze. For more information, see "[Specifying directories to scan](/code-security/secure-coding/configuring-code-scanning#specifying-directories-to-scan)."
|
||||
对于 {% ifversion codeql-go-autobuild %}{% else %} Go、{% endif %} JavaScript、Python,和 TypeScript 等语言,{% data variables.product.prodname_codeql %} 分析而不编译源代码,你可以指定其他配置选项来限制要分析的代码量。 有关详细信息,请参阅“[指定要扫描的目录](/code-security/secure-coding/configuring-code-scanning#specifying-directories-to-scan)”。
|
||||
@@ -1,2 +1,10 @@
|
||||
If `autobuild` fails, or you want to analyze a different set of source files from those built by the `autobuild` process, you'll need to remove the `autobuild` step from the workflow, and manually add build steps. For C/C++, C#, Go,{% ifversion codeql-kotlin-beta %} Kotlin, {% endif %} and Java projects, {% data variables.product.prodname_codeql %} will analyze whatever source code is built by your specified build steps.
|
||||
---
|
||||
ms.openlocfilehash: d4d496d4b5c45f557d80aace29013b3b32e478c6
|
||||
ms.sourcegitcommit: dac72908e8660cb4a347fbf73beab61034eed8c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/25/2022
|
||||
ms.locfileid: "148182272"
|
||||
---
|
||||
如果 `autobuild` 失败,或者你想要分析与 `autobuild` 进程生成的源文件不同的一组源文件,则需要从工作流中删除 `autobuild` 步骤,并手动添加生成步骤。 对于 C/C++、C#、Go、{% ifversion codeql-kotlin-beta %}Kotlin {% endif %}和 Java 项目,{% data variables.product.prodname_codeql %} 将分析由指定的生成步骤生成的任何源代码。
|
||||
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
For the supported compiled languages, you can use the `autobuild` action in the {% data variables.code-scanning.codeql_workflow %} to build your code. This avoids you having to specify explicit build commands for C/C++, C#,{% ifversion codeql-go-autobuild %} Go,{% endif %}{% ifversion codeql-kotlin-beta %} Kotlin, {% endif %} and Java.
|
||||
---
|
||||
ms.openlocfilehash: 81bb084ee5dcb540c77b4a7b55c67890bab2d47a
|
||||
ms.sourcegitcommit: dac72908e8660cb4a347fbf73beab61034eed8c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/25/2022
|
||||
ms.locfileid: "148182288"
|
||||
---
|
||||
对于受支持的编译语言,你可使用 {% data variables.code-scanning.codeql_workflow %} 中的 `autobuild` 操作来生成代码。 这样就无需为 C/C++、C#、{% ifversion codeql-go-autobuild %}Go、{% endif %}{% ifversion codeql-kotlin-beta %}Kotlin {% endif %}和 Java 指定显式生成命令。
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: 10a6df860ab8205845ae90fcb01d95d8e617096c
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: "148181281"
|
||||
---
|
||||
{% ifversion dependabot-actions-support %}{% data variables.product.prodname_dependabot_security_updates %} 可以修复 {% data variables.product.prodname_actions %} 中有漏洞的依赖项。 启用安全更新后,{% data variables.product.prodname_dependabot %} 将自动提出拉取请求,以将工作流中使用的存在漏洞的 {% data variables.product.prodname_actions %} 更新到最低的已修补版本。{% endif %}
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
ms.openlocfilehash: 4e7a2b55a6a6db231bacb232e4a4da0b4101dbf1
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: 1cb33ecd5b87ac110509c21934a0c8747f2087ae
|
||||
ms.sourcegitcommit: 4c72bcff385d7093cc42df79ad17f05cfd900b5f
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "147167401"
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148183929"
|
||||
---
|
||||
| 用户许可证 | vCPU | 内存 | 附加存储 | 根存储 |
|
||||
| 用户许可证 | vCPU | 内存 | 根存储 | 附加(数据)存储 |
|
||||
| :- | -: | -: | -: | -: |
|
||||
| 试用版、演示版或 10 个轻度用户 | 4 | 32 GB | 150 GB | 200 GB |
|
||||
| 10-3000 | 8 | 48 GB | 300 GB | 200 GB |
|
||||
| 3000-5000 | 12 | 64 GB | 500 GB | 200 GB |
|
||||
| 5000-8000 | 16 | 96 GB | 750 GB | 200 GB |
|
||||
| 8000-10000+ | 20 | 160 GB | 1000 GB | 200 GB |
|
||||
| 试用版、演示版或 10 个轻度用户 | 4 | 32 GB | 200 GB | 150 GB |
|
||||
| 10-3000 | 8 | 48 GB | 200 GB | 300 GB |
|
||||
| 3000-5000 | 12 | 64 GB | 200 GB | 500 GB |
|
||||
| 5000-8000 | 16 | 96 GB | 200 GB | 750 GB |
|
||||
| 8000-10000+ | 20 | 160 GB | 200 GB | 1000 GB |
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
---
|
||||
ms.openlocfilehash: 5c02cf240a1d23e9549a534381d9914bd8dc0ebd
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: "145097394"
|
||||
---
|
||||
启用允许列表时,您配置的 IP 地址将立即添加到企业中的组织允许列表中。 如果禁用允许列表,则地址将从组织允许列表中删除。
|
||||
When you enable the allow list, the IP addresses you have configured are immediately added to the allow lists of organizations in your enterprise. If you disable the allow list, the addresses are removed from the organization allow lists.
|
||||
|
||||
您可以选择将为组织中安装的 {% data variables.product.prodname_github_apps %} 配置的任何 IP 地址自动添加到允许列表中。 {% data variables.product.prodname_github_app %} 的创建者可以为其应用程序配置允许列表,指定应用程序运行的 IP 地址。 通过将允许列表继承到您的列表中,您可以避免申请中的连接请求被拒绝。 有关详细信息,请参阅“[允许 GitHub 应用进行访问](#allowing-access-by-github-apps)”。
|
||||
{% data reusables.identity-and-permissions.org-enterprise-allow-list-interaction %} For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)."
|
||||
|
||||
You can choose to automatically add to your allow list any IP addresses configured for {% data variables.product.prodname_github_apps %} installed in your enterprise. The creator of a {% data variables.product.prodname_github_app %} can configure an allow list for their application, specifying the IP addresses at which the application runs. By inheriting their allow list into yours, you avoid connection requests from the application being refused. For more information, see "[Allowing access by GitHub Apps](#allowing-access-by-github-apps)."
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
1. Under your organization name, click {% ifversion projects-v2 %}{% octicon "table" aria-label="The Projects icon" %}{% else %}{% octicon "project" aria-label="The Projects icon" %}{% endif %} **Projects**.
|
||||
{% ifversion projects-v2 %}{% else %}{% endif %}
|
||||
---
|
||||
ms.openlocfilehash: ce21934ccff5f4f88bf2d3984ae95bcd11e5a41e
|
||||
ms.sourcegitcommit: 9bf175b190674416ad4e11b5c567409f74c00ad2
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/23/2022
|
||||
ms.locfileid: "148181211"
|
||||
---
|
||||
1. 在组织名称下,单击{% ifversion projects-v2 %}{% octicon "table" aria-label="The Projects icon" %}{% else %}{% octicon "project" aria-label="The Projects icon" %}{% endif %}“项目”。
|
||||
{% ifversion projects-v2 %}{% else %}{% endif %}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
---
|
||||
ms.openlocfilehash: 2f27cc8f89cfa028a5e07512c1528152a9bd4941
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "145100490"
|
||||
---
|
||||
1. (可选)若要要求成员使用 SSH 证书,请选择“需要 SSH 证书”,然后单击“保存” 。
|
||||

|
||||
1. Optionally, to require members to use SSH certificates, select **Require SSH Certificates**, then click **Save**.
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** When you require SSH certificates, the requirement does not apply to authorized third-party integrations or to {% data variables.product.prodname_dotcom %} features such as {% data variables.product.prodname_actions %}{% ifversion fpt or ghec %} and {% data variables.product.prodname_codespaces %}{% endif %}, which are trusted environments within the {% data variables.product.prodname_dotcom %} ecosystem.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
ms.openlocfilehash: 0e58e5904bbff65341fbe4221fa03ea96e032c42
|
||||
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
|
||||
ms.openlocfilehash: a45f36a89c0e8881fa181cc31f03a6a9cf034aa9
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: "145086995"
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: "148181279"
|
||||
---
|
||||
### 自定义媒体类型
|
||||
|
||||
以下是此 API 支持的媒体类型:
|
||||
|
||||
application/vnd.github.VERSION.raw+json
|
||||
application/vnd.github.VERSION.text+json
|
||||
application/vnd.github.VERSION.html+json
|
||||
application/vnd.github.VERSION.full+json
|
||||
application/vnd.github.raw+json
|
||||
application/vnd.github.text+json
|
||||
application/vnd.github.html+json
|
||||
application/vnd.github.full+json
|
||||
|
||||
有关媒体类型的详细信息,请参阅“[自定义媒体类型](/rest/overview/media-types)”。
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
ms.openlocfilehash: eb4b729cf490728306961ff3d2ef2835700c8735
|
||||
ms.sourcegitcommit: 80edcdbff4726de4d196584fcb603bca2efffd1f
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: "148181799"
|
||||
---
|
||||
此表显示了用户可以绕过推送保护块的每种方式的警报行为。
|
||||
|
||||
| 绕过原因 | 警报行为 |
|
||||
|-----------------------|------------------------------------------------------|
|
||||
| 它在测试中使用 | {% data variables.product.prodname_dotcom %} 创建已关闭的警报,该警报解析为“在测试中使用” |
|
||||
| 这是假正 | {% data variables.product.prodname_dotcom %} 创建已关闭的警报,该警报解析为“假正” |
|
||||
| 我稍后会修复它 | {% data variables.product.prodname_dotcom %} 创建未结警报 |
|
||||
@@ -1,127 +1,135 @@
|
||||
Partner | Supported secret
|
||||
---
|
||||
ms.openlocfilehash: 59e78cbf492110a8949c27e867bf195ae5605307
|
||||
ms.sourcegitcommit: bddda0c0814770ee64e378692891931c618247ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: "148181761"
|
||||
---
|
||||
Partner | 支持的密钥
|
||||
--- | ---
|
||||
Adafruit IO | Adafruit IO Key
|
||||
Adobe | Adobe Device Token
|
||||
Adobe | Adobe Service Token
|
||||
Adobe | Adobe Short-Lived Access Token
|
||||
Adobe | Adobe JSON Web Token
|
||||
Alibaba Cloud | Alibaba Cloud Access Key ID and Access Key Secret pair
|
||||
Amazon Web Services (AWS) | Amazon AWS Access Key ID and Secret Access Key pair
|
||||
Atlassian | Atlassian API Token
|
||||
Atlassian | Atlassian JSON Web Token
|
||||
Azure | Azure Active Directory Application Secret
|
||||
Azure | Azure Batch Key Identifiable
|
||||
Azure | Azure CosmosDB Key Identifiable
|
||||
Adafruit IO | Adafruit IO 密钥
|
||||
Adobe | Adobe 设备令牌
|
||||
Adobe | Adobe 服务令牌
|
||||
Adobe | Adobe 短暂访问令牌
|
||||
Adobe | Adobe JSON Web 令牌
|
||||
Alibaba Cloud | Alibaba 云端访问密钥 ID 和访问密钥对
|
||||
Amazon Web Services (AWS) | Amazon AWS 访问密钥 ID 和秘密访问密钥对
|
||||
Atlassian | Atlassian API 令牌
|
||||
Atlassian | Atlassian JSON Web 令牌
|
||||
Azure | Azure Active Directory 应用程序密钥
|
||||
Azure | Azure Batch 可识别密钥
|
||||
Azure | Azure CosmosDB 可识别密钥
|
||||
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %}
|
||||
Azure | Azure ML Studio (classic) Web Service Key
|
||||
Azure | Azure SAS Token
|
||||
Azure | Azure Search Admin Key
|
||||
Azure | Azure Search Query Key
|
||||
Azure | Azure Service Management Certificate
|
||||
Azure | Azure SQL Connection String
|
||||
Azure | Azure Storage Account Key
|
||||
Checkout.com | Checkout.com Production Secret Key
|
||||
Checkout.com | Checkout.com Test Secret Key
|
||||
Chief | Chief Tools Token
|
||||
Clojars | Clojars Deploy Token
|
||||
CloudBees CodeShip | CloudBees CodeShip Credential
|
||||
Contributed Systems | Contributed Systems Credentials
|
||||
Databricks | Databricks Access Token
|
||||
Datadog | Datadog API Key
|
||||
DevCycle | DevCycle Client API Key
|
||||
DevCycle | DevCycle Server API Key
|
||||
Azure | Azure ML 工作室(经典)Web 服务密钥
|
||||
Azure | Azure SAS 令牌
|
||||
Azure | Azure 搜索管理密钥
|
||||
Azure | Azure 搜索查询密钥
|
||||
Azure | Azure 服务管理证书
|
||||
Azure | Azure SQL 连接字符串
|
||||
Azure | Azure 存储帐户密钥
|
||||
Checkout.com | Checkout.com 生产密钥
|
||||
Checkout.com | Checkout.com 测试密钥
|
||||
Chief | Chief 工具令牌
|
||||
Clojars | Clojars 部署令牌
|
||||
CloudBees CodeShip | CloudBees CodeShip 凭据
|
||||
参与的系统 | 参与的系统凭据
|
||||
Databricks | Databricks 访问令牌
|
||||
Datadog | Datadog API 密钥
|
||||
DevCycle | DevCycle 客户端 API 密钥
|
||||
DevCycle | DevCycle 服务器 API 密钥
|
||||
DigitalOcean | DigitalOcean {% data variables.product.pat_generic_title_case %}
|
||||
DigitalOcean | DigitalOcean OAuth Token
|
||||
DigitalOcean | DigitalOcean Refresh Token
|
||||
DigitalOcean | DigitalOcean System Token
|
||||
Discord | Discord Bot Token
|
||||
Doppler | Doppler Personal Token
|
||||
Doppler | Doppler Service Token
|
||||
Doppler | Doppler CLI Token
|
||||
Doppler | Doppler SCIM Token
|
||||
Doppler | Doppler Audit Token
|
||||
Dropbox | Dropbox Access Token
|
||||
Dropbox | Dropbox Short Lived Access Token
|
||||
Dynatrace | Dynatrace Access Token
|
||||
Dynatrace | Dynatrace Internal Token
|
||||
DigitalOcean | DigitalOcean OAuth 令牌
|
||||
DigitalOcean | DigitalOcean 刷新令牌
|
||||
DigitalOcean | DigitalOcean 系统令牌
|
||||
Discord | Discord 自动程序令牌
|
||||
Doppler | Doppler 个人令牌
|
||||
Doppler | Doppler 服务令牌
|
||||
Doppler | Doppler CLI 令牌
|
||||
Doppler | Doppler SCIM 令牌
|
||||
Doppler | Doppler 审核令牌
|
||||
Dropbox | Dropbox 访问令牌
|
||||
Dropbox | Dropbox 短暂访问令牌
|
||||
Dynatrace | Dynatrace 访问令牌
|
||||
Dynatrace | Dynatrace 内部令牌
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %}
|
||||
Finicity | Finicity App Key
|
||||
Frame.io | Frame.io JSON Web Token
|
||||
Frame.io| Frame.io Developer Token
|
||||
FullStory| FullStory API Key
|
||||
Finicity | Finicity App 密钥
|
||||
Frame.io | Frame.io JSON Web 令牌
|
||||
Frame.io| Frame.io Developer 令牌
|
||||
FullStory| FullStory API 密钥
|
||||
GitHub | GitHub {% data variables.product.pat_generic_title_case %}
|
||||
GitHub | GitHub OAuth Access Token
|
||||
GitHub | GitHub Refresh Token
|
||||
GitHub | GitHub App Installation Access Token
|
||||
GitHub | GitHub SSH Private Key
|
||||
GoCardless | GoCardless Live Access Token
|
||||
GoCardless | GoCardless Sandbox Access Token
|
||||
Google Cloud | Google API Key
|
||||
Google Cloud | Google Cloud Private Key ID
|
||||
Hashicorp Terraform | Terraform Cloud / Enterprise API Token
|
||||
Hubspot | Hubspot API Key
|
||||
Hubspot | Hubspot API Personal Access Key
|
||||
GitHub | GitHub OAuth 访问令牌
|
||||
GitHub | GitHub 刷新令牌
|
||||
GitHub | GitHub App 安装访问令牌
|
||||
GitHub | GitHub SSH 私钥
|
||||
GoCardless | GoCardless 实时访问令牌
|
||||
GoCardless | GoCardless Sandbox 访问令牌
|
||||
Google Cloud | Google API 密钥
|
||||
Google Cloud | Google Cloud 私钥 ID
|
||||
Hashicorp Terraform | Terraform Cloud / Enterprise API 令牌
|
||||
Hubspot | Hubspot API 密钥
|
||||
Hubspot | Hubspot API 个人访问密钥
|
||||
Ionic | Ionic {% data variables.product.pat_generic_title_case %}
|
||||
Ionic | Ionic Refresh Token
|
||||
JD Cloud | JD Cloud Access Key
|
||||
Linear | Linear API Key
|
||||
Linear | Linear OAuth Access Token
|
||||
Mailchimp | Mailchimp API Key
|
||||
Mailchimp | Mandrill API Key
|
||||
Mailgun | Mailgun API Key
|
||||
MessageBird | MessageBird API Key
|
||||
Meta | Facebook Access Token
|
||||
npm | npm Access Token
|
||||
NuGet | NuGet API Key
|
||||
Octopus Deploy | Octopus Deploy API Key
|
||||
OpenAI | OpenAI API Key
|
||||
Palantir | Palantir JSON Web Token
|
||||
PlanetScale | PlanetScale Database Password
|
||||
PlanetScale | PlanetScale OAuth Token
|
||||
PlanetScale | PlanetScale Service Token
|
||||
Plivo | Plivo Auth ID and Token
|
||||
Postman | Postman API Key
|
||||
Prefect | Prefect Server API Key
|
||||
Prefect | Prefect User API Token
|
||||
Proctorio | Proctorio Consumer Key
|
||||
Proctorio | Proctorio Linkage Key
|
||||
Proctorio | Proctorio Registration Key
|
||||
Proctorio | Proctorio Secret Key
|
||||
Pulumi | Pulumi Access Token
|
||||
PyPI | PyPI API Token
|
||||
ReadMe | ReadMe API Access Key
|
||||
redirect.pizza | redirect.pizza API Token
|
||||
RubyGems | RubyGems API Key
|
||||
Samsara | Samsara API Token
|
||||
Samsara | Samsara OAuth Access Token
|
||||
SendGrid | SendGrid API Key
|
||||
Sendinblue | Sendinblue API Key
|
||||
Sendinblue | Sendinblue SMTP Key
|
||||
Shopify | Shopify App Shared Secret
|
||||
Shopify | Shopify Access Token
|
||||
Shopify | Shopify Custom App Access Token
|
||||
Shopify | Shopify Private App Password
|
||||
Slack | Slack API Token
|
||||
Slack | Slack Incoming Webhook URL
|
||||
Slack | Slack Workflow Webhook URL
|
||||
SSLMate | SSLMate API Key
|
||||
SSLMate | SSLMate Cluster Secret
|
||||
Stripe | Stripe Live API Secret Key
|
||||
Stripe | Stripe Test API Secret Key
|
||||
Stripe | Stripe Live API Restricted Key
|
||||
Stripe | Stripe Test API Restricted Key
|
||||
Supabase | Supabase Service Key
|
||||
Tencent Cloud | Tencent Cloud Secret ID
|
||||
Tencent WeChat | Tencent WeChat API App ID
|
||||
Twilio | Twilio Account String Identifier
|
||||
Twilio | Twilio API Key
|
||||
Ionic | Ionic 刷新令牌
|
||||
JD Cloud | JD Cloud 访问密钥
|
||||
线性 | 线性 API 密钥
|
||||
线性 | 线性 OAuth 访问令牌
|
||||
Mailchimp | Mailchimp API 密钥
|
||||
Mailchimp | Mandril API 密钥
|
||||
Mailgun | Mailgun API 密钥
|
||||
MessageBird | MessageBird API 密钥
|
||||
元数据 | Facebook Access Token
|
||||
npm | npm 访问令牌
|
||||
NuGet | NuGet API 密钥
|
||||
Octopus 部署 | Octopus 部署 API 密钥
|
||||
OpenAI | OpenAI API 密钥
|
||||
Palantir | Palantir JSON Web 令牌
|
||||
PlanetScale | PlanetScale 数据库密码
|
||||
PlanetScale | PlanetScale OAuth 令牌
|
||||
PlanetScale | PlanetScale 服务令牌
|
||||
Plivo | Plivo 身份验证 ID 和令牌
|
||||
Postman | Postman API 密钥
|
||||
Prefect | Prefect 服务器 API 密钥
|
||||
Prefect | Prefect 用户 API 令牌
|
||||
Proctorio | Proctorio 消费者密钥
|
||||
Proctorio | Proctorio 链接密钥
|
||||
Proctorio | Proctorio 注册密钥
|
||||
Proctorio | Proctorio 密钥
|
||||
Pulumi | Pulumi 访问令牌
|
||||
PyPI | PyPI API 令牌
|
||||
ReadMe | ReadMe API 访问密钥
|
||||
redirect.pizza | redirect.pizza API 令牌
|
||||
RubyGems | RubyGems API 密钥
|
||||
Samsara | Samsara API 令牌
|
||||
Samsara | Samsara OAuth 访问令牌
|
||||
SendGrid | SendGrid API 密钥
|
||||
Sendinblue | Sendinblue API 密钥
|
||||
Sendinblue | Sendinblue SMTP 密钥
|
||||
Shopify | Shopify App 共享密钥
|
||||
Shopify | Shopify 访问令牌
|
||||
Shopify | Shopify 自定义应用访问令牌
|
||||
Shopify | Shopify 私人应用密码
|
||||
Slack | Slack API 令牌
|
||||
Slack | Slack 传入 web 挂钩 URL
|
||||
Slack | Slack 工作流程 web 挂钩 URL
|
||||
SSLMate | SSLMate API 密钥
|
||||
SSLMate | SSLMate 集群密钥
|
||||
Stripe | Stripe Live API 密钥
|
||||
Stripe | Stripe 测试 API 密钥
|
||||
Stripe | Stripe Live API 限制密钥
|
||||
Stripe | Stripe 测试 API 限制密钥
|
||||
Supabase | Supabase 服务密钥
|
||||
Tencent Cloud | 腾讯云密钥 ID
|
||||
腾讯微信 | 腾讯微信 API 应用 ID
|
||||
Twilio | Twilio 帐户字符串标识符
|
||||
Twilio | Twilio API 密钥
|
||||
Typeform | Typeform {% data variables.product.pat_generic_title_case %}
|
||||
Uniwise | WISEflow API Key
|
||||
Valour | Valour Access Token
|
||||
Yandex | Yandex.Cloud API Key
|
||||
Yandex | Yandex.Cloud IAM Cookie
|
||||
Yandex | Yandex.Cloud IAM Token
|
||||
Yandex | Yandex.Dictionary API Key
|
||||
Yandex | Yandex.Cloud Access Secret
|
||||
Yandex | Yandex.Passport OAuth Token
|
||||
Zuplo | Zuplo Consumer API
|
||||
Uniwise | WISEflow API 密钥
|
||||
Valour | Valour 访问令牌
|
||||
Yandex | Yandex.Cloud API 密钥
|
||||
Yandex | Yandex.Cloud IAM Cookie
|
||||
Yandex | Yandex.Cloud IAM 令牌
|
||||
Yandex | Yandex.Dictionary API 密钥
|
||||
Yandex | Yandex.Cloud 访问机密
|
||||
Yandex | Yandex.Passport OAuth 令牌
|
||||
Zuplo | Zuplo 使用者 API
|
||||
|
||||
@@ -1,235 +1,267 @@
|
||||
meta:
|
||||
default_description: 开始使用、排除故障和充分利用 GitHub。新用户、开发人员、管理员和所有 GitHub 产品的文档。
|
||||
default_description: Get started, troubleshoot, and make the most of GitHub. Documentation for new users, developers, administrators, and all of GitHub's products.
|
||||
header:
|
||||
github_docs: GitHub Docs
|
||||
contact: 联系人
|
||||
contact: Contact
|
||||
notices:
|
||||
ghae_silent_launch: GitHub AE 目前处于受限版。
|
||||
ghae_silent_launch: GitHub AE is currently under limited release.
|
||||
release_candidate:
|
||||
# The version name is rendered before the below text via includes/header-notification.html
|
||||
' 目前可作为候选发布。有关详细信息,请参阅“<a href="/admin/overview/about-upgrades-to-new-releases">关于升级到新版本</a>”。'
|
||||
' is currently available as a release candidate. For more information, see "<a href="/admin/overview/about-upgrades-to-new-releases">About upgrades to new releases</a>."'
|
||||
localization_complete:
|
||||
"我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问<a id=\"to-english-doc\" href=\"/en\">英语文档</a>。"
|
||||
early_access: 📣 请<b>不要公开分享</b>此 URL。此页面包含有关早期访问功能的内容。
|
||||
release_notes_use_latest: 请使用最新版本获取最新的安全性、性能和 bug 修复程序。
|
||||
We publish frequent updates to our documentation, and translation of this page may still be in progress.
|
||||
For the most current information, please visit the
|
||||
<a id="to-english-doc" href="/en">English documentation</a>.
|
||||
early_access: 📣 Please <b>do not share</b> this URL publicly. This page contains content about an early access feature.
|
||||
release_notes_use_latest: Please use the latest release for the latest security, performance, and bug fixes.
|
||||
# GHES release notes
|
||||
ghes_release_notes_upgrade_patch_only: "📣 这不是 Enterprise Server 的<a href=\"#{{ latestPatch }}\">最新补丁版本</a>。"
|
||||
ghes_release_notes_upgrade_release_only: "📣 这不是 Enterprise Server 的<a href=\"/enterprise-server@{{ latestRelease }}/admin/release-notes\">最新版本</a>。"
|
||||
ghes_release_notes_upgrade_patch_and_release: "📣 这不是此版本系列的<a href=\"#{{ latestPatch }}\">最新补丁版本</a>,也不是 Enterprise Server 的<a href=\"/enterprise-server@{{ latestRelease }}/admin/release-notes\">最新版本</a>。"
|
||||
sign_up_cta: 注册
|
||||
ghes_release_notes_upgrade_patch_only: 📣 This is not the <a href="#{{ latestPatch }}">latest patch release</a> of Enterprise Server.
|
||||
ghes_release_notes_upgrade_release_only: 📣 This is not the <a href="/enterprise-server@{{ latestRelease }}/admin/release-notes">latest release</a> of Enterprise Server.
|
||||
ghes_release_notes_upgrade_patch_and_release: 📣 This is not the <a href="#{{ latestPatch }}">latest patch release</a> of this release series, and this is not the <a href="/enterprise-server@{{ latestRelease }}/admin/release-notes">latest release</a> of Enterprise Server.
|
||||
sign_up_cta: Sign up
|
||||
picker:
|
||||
language_picker_default_text: 选择语言
|
||||
product_picker_default_text: 所有产品
|
||||
version_picker_default_text: 选择版本
|
||||
language_picker_default_text: Choose a language
|
||||
product_picker_default_text: All products
|
||||
version_picker_default_text: Choose a version
|
||||
release_notes:
|
||||
banner_text: GitHub 开始向企业推出这些更改
|
||||
banner_text: GitHub began rolling these changes out to enterprises on
|
||||
search:
|
||||
need_help: 需要帮助?
|
||||
placeholder: 搜索 GitHub Docs
|
||||
loading: 加载
|
||||
no_results: 未找到结果
|
||||
search_results_for: 搜索以下项的结果
|
||||
no_content: 无内容
|
||||
matches_displayed: 显示的匹配项
|
||||
search_error: 尝试执行搜索时发生错误。
|
||||
description: 输入搜索词以在 GitHub 文档中找到它。
|
||||
label: 搜索 GitHub Docs
|
||||
results_found: "在 {s} 毫秒内找到了 {n} 个结果"
|
||||
results_page: "这是第 {page} 页,共 {pages} 页。"
|
||||
nothing_found: 未找到任何内容 😿
|
||||
need_help: Need help?
|
||||
placeholder: Search GitHub Docs
|
||||
loading: Loading
|
||||
no_results: No results found
|
||||
search_results_for: Search results for
|
||||
no_content: No content
|
||||
matches_found: Results found
|
||||
matches_displayed: Matches displayed
|
||||
search_error: An error occurred trying to perform the search.
|
||||
description: Enter a search term to find it in the GitHub Documentation.
|
||||
label: Search GitHub Docs
|
||||
results_found: Found {n} results in {s}ms
|
||||
results_page: This is page {page} of {pages}.
|
||||
nothing_found: Nothing found 😿
|
||||
homepage:
|
||||
explore_by_product: 按产品浏览
|
||||
version_picker: 版本
|
||||
description: 在 GitHub 旅程中随时为你提供帮助。
|
||||
explore_by_product: Explore by product
|
||||
version_picker: Version
|
||||
description: Help for wherever you are on your GitHub journey.
|
||||
toc:
|
||||
getting_started: 入门
|
||||
popular: 热门
|
||||
guides: 指南
|
||||
whats_new: 新增功能
|
||||
videos: 视频
|
||||
all_changelogs: 所有更改日志帖子
|
||||
getting_started: Getting started
|
||||
popular: Popular
|
||||
guides: Guides
|
||||
whats_new: What's new
|
||||
videos: Videos
|
||||
all_changelogs: All changelog posts
|
||||
pages:
|
||||
article_version: '文章版本'
|
||||
miniToc: 本文内容
|
||||
contributor_callout: 这篇文章的参与者和维护者是
|
||||
all_enterprise_releases: 所有 Enterprise Server 发行版
|
||||
about_versions: 关于版本
|
||||
article_version: 'Article version'
|
||||
miniToc: In this article
|
||||
contributor_callout: This article is contributed and maintained by
|
||||
all_enterprise_releases: All Enterprise Server releases
|
||||
about_versions: About versions
|
||||
permissions_statement: Who can use this feature
|
||||
errors:
|
||||
oops: 哎呀!
|
||||
something_went_wrong: 似乎出现了问题。
|
||||
we_track_errors: 我们会自动跟踪这些错误,但如果问题仍然存在,请随时联系我们。
|
||||
page_doesnt_exist: 看来此页面不存在。
|
||||
oops: Ooops!
|
||||
something_went_wrong: It looks like something went wrong.
|
||||
we_track_errors: We track these errors automatically, but if the problem persists please feel free to contact us.
|
||||
page_doesnt_exist: It looks like this page doesn't exist.
|
||||
support:
|
||||
still_need_help: 还需要帮助?
|
||||
contact_support: 联系支持人员
|
||||
ask_community: 询问 GitHub 社区
|
||||
still_need_help: Still need help?
|
||||
contact_support: Contact support
|
||||
ask_community: Ask the GitHub community
|
||||
survey:
|
||||
able_to_find: 此文档对你有帮助吗?
|
||||
able_to_find: Did this doc help you?
|
||||
yes: Yes
|
||||
no: No
|
||||
comment_yes_label: 让我们知道哪方面做得好
|
||||
comment_no_label: 告诉我们如何改进
|
||||
optional: 可选
|
||||
required: 必选
|
||||
comment_yes_label: Let us know what we do well
|
||||
comment_no_label: Let us know what we can do better
|
||||
optional: Optional
|
||||
required: Required
|
||||
email_placeholder: email@example.com
|
||||
email_label: 如果我们可以就更多问题与你联系,请输入电子邮件地址
|
||||
email_validation: 请输入有效的电子邮件地址
|
||||
email_label: If we can contact you with more questions, please enter your email address
|
||||
email_validation: Please enter a valid email address
|
||||
send: Send
|
||||
feedback: 谢谢!我们收到了你的反馈。
|
||||
not_support: 如果你需要回复,请联系客户支持。
|
||||
privacy_policy: 隐私政策
|
||||
feedback: Thank you! We received your feedback.
|
||||
not_support: If you need a reply, please contact support instead.
|
||||
privacy_policy: Privacy policy
|
||||
contribution_cta:
|
||||
title: 帮助我们创建出色的文档!
|
||||
body: 所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。
|
||||
button: 做出贡献
|
||||
or: 或者,
|
||||
to_guidelines: 了解如何参与。
|
||||
title: Help us make these docs great!
|
||||
body: All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.
|
||||
button: Make a contribution
|
||||
or: Or,
|
||||
to_guidelines: learn how to contribute.
|
||||
parameter_table:
|
||||
body: Body parameters
|
||||
default: Default
|
||||
description: Description
|
||||
enum_description_title: Can be one of
|
||||
headers: Headers
|
||||
name: Name
|
||||
path: Path parameters
|
||||
query: Query parameters
|
||||
required: Required
|
||||
see_preview_notice: See preview notice
|
||||
see_preview_notices: See preview notices
|
||||
type: Type
|
||||
single_enum_description: Value
|
||||
products:
|
||||
graphql:
|
||||
reference:
|
||||
implements: 实现
|
||||
fields: 字段
|
||||
arguments: 参数
|
||||
name: 名称
|
||||
type: 类型
|
||||
description: 说明
|
||||
input_fields: 输入字段
|
||||
return_fields: 返回字段
|
||||
implemented_by: 实施者
|
||||
values: 值
|
||||
possible_types: 可能的类型
|
||||
preview_notice: 预览通知
|
||||
deprecation_notice: 启用通知
|
||||
preview_period: 在预览期间,API 可能会更改,恕不通知。
|
||||
implements: Implements
|
||||
fields: Fields
|
||||
arguments: Arguments
|
||||
name: Name
|
||||
type: Type
|
||||
description: Description
|
||||
input_fields: Input fields
|
||||
return_fields: Return fields
|
||||
implemented_by: Implemented by
|
||||
values: Values
|
||||
possible_types: Possible types
|
||||
preview_notice: Preview notice
|
||||
deprecation_notice: Deprecation notice
|
||||
preview_period: During the preview period, the API may change without notice.
|
||||
overview:
|
||||
preview_header: '若要切换此预览并访问以下架构成员,必须在 `Accept` 标头中提供自定义媒体类型:'
|
||||
preview_schema_members: '预览的架构成员'
|
||||
announced: 已公布
|
||||
updates: 更新
|
||||
preview_header: 'To toggle this preview and access the following schema members, you must provide a custom media type in the `Accept` header:'
|
||||
preview_schema_members: 'Previewed schema members'
|
||||
announced: Announced
|
||||
updates: Updates
|
||||
rest:
|
||||
banner:
|
||||
api_versioned: The REST API is now versioned.
|
||||
api_version_info: For more information, see "<a href="{{ versionWithApiVersion }}/rest/overview/api-versions">About API versioning</a>".
|
||||
ghes_api_versioned: After a site administrator upgrades your Enterprise Server instance to {{ firstGhesReleaseWithApiVersions.versionTitle }} or later, the REST API will be versioned. To learn how to find your instance's version, see "<a href="/{{ currentVersion }}/get-started/learning-about-github/about-versions-of-github-docs#github-enterprise-server">About versions of GitHub Docs</a>".
|
||||
versioning:
|
||||
about_versions: About REST API versions
|
||||
reference:
|
||||
default: 默认
|
||||
name: 名称
|
||||
in: In
|
||||
type: 类型
|
||||
description: 说明
|
||||
notes: 说明
|
||||
parameters: 参数
|
||||
response: 响应
|
||||
example_response: 示例响应
|
||||
status_code: 状态代码
|
||||
http_status_code: HTTP 响应状态代码
|
||||
code_sample: 代码示例
|
||||
code_samples: 代码示例
|
||||
preview_notice: 预览通知
|
||||
preview_notices: 预览通知
|
||||
see_preview_notice: 查看预览通知
|
||||
see_preview_notices: 查看预览通知
|
||||
preview_header_is_required: 此标头<strong>必填</strong>
|
||||
preview_notice_to_change: 此 API 处于预览阶段,可能会更改
|
||||
works_with: 使用
|
||||
api_reference: REST API 参考
|
||||
enum_description_title: 可以是以下选项之一
|
||||
required: 必选
|
||||
headers: 头文件
|
||||
query: 查询参数
|
||||
path: 路径参数
|
||||
body: 正文参数
|
||||
description: Description
|
||||
notes: Notes
|
||||
parameters: Parameters
|
||||
response: Response
|
||||
example_response: Example response
|
||||
status_code: Status code
|
||||
http_status_code: HTTP response status codes
|
||||
code_sample: Code sample
|
||||
code_samples: Code samples
|
||||
preview_notice: Preview notice
|
||||
preview_notices: Preview notices
|
||||
preview_header_is_required: This header is <strong>required</strong>
|
||||
preview_notice_to_change: This API is under preview and subject to change
|
||||
works_with: Works with
|
||||
api_reference: REST API reference
|
||||
enum_description_title: Can be one of
|
||||
required: Required
|
||||
headers: Headers
|
||||
query: Query parameters
|
||||
path: Path parameters
|
||||
body: Body parameters
|
||||
webhooks:
|
||||
action_type_switch_error: There was an error switching webhook action types.
|
||||
action_type: Action type
|
||||
availability: Availability
|
||||
webhook_payload_object: Webhook payload object
|
||||
webhook_payload_example: Webhook payload example
|
||||
rephrase_availability:
|
||||
repository: Repositories
|
||||
organization: Organizations
|
||||
app: GitHub Apps
|
||||
business: Enterprises
|
||||
marketplace: GitHub Marketplace
|
||||
sponsors_listing: Sponsored accounts
|
||||
footer:
|
||||
all_rights_reserved: 保留所有权利
|
||||
terms: 术语
|
||||
privacy: 隐私
|
||||
security: 安全性
|
||||
all_rights_reserved: All rights reserved
|
||||
terms: Terms
|
||||
privacy: Privacy
|
||||
security: Security
|
||||
product:
|
||||
heading: Products
|
||||
heading: Product
|
||||
links:
|
||||
features: 功能
|
||||
security: 安全性
|
||||
features: Features
|
||||
security: Security
|
||||
enterprise: Enterprise
|
||||
case_studies: 案例研究
|
||||
pricing: 定价
|
||||
resources: 资源
|
||||
case_studies: Case Studies
|
||||
pricing: Pricing
|
||||
resources: Resources
|
||||
platform:
|
||||
heading: 平台
|
||||
heading: Platform
|
||||
links:
|
||||
developer_api: 开发人员 API
|
||||
partners: 合作伙伴
|
||||
developer_api: Developer API
|
||||
partners: Partners
|
||||
atom: Atom
|
||||
electron: Electron
|
||||
github_desktop: GitHub Desktop
|
||||
support:
|
||||
heading: 支持
|
||||
heading: Support
|
||||
links:
|
||||
help: 帮助
|
||||
community_forum: 社区论坛
|
||||
training: 培训
|
||||
status: 状态
|
||||
contact_github: 联系 GitHub
|
||||
help: Help
|
||||
community_forum: Community Forum
|
||||
training: Training
|
||||
status: Status
|
||||
contact_github: Contact GitHub
|
||||
company:
|
||||
heading: Company
|
||||
links:
|
||||
about: 关于
|
||||
blog: 博客
|
||||
careers: 招聘
|
||||
press: 请按
|
||||
about: About
|
||||
blog: Blog
|
||||
careers: Careers
|
||||
press: Press
|
||||
shop: Shop
|
||||
product_landing:
|
||||
quickstart: 快速入门
|
||||
reference: 参考
|
||||
overview: 概述
|
||||
guides: 指南
|
||||
code_examples: 代码示例
|
||||
search_code_examples: 搜索代码示例
|
||||
search_results_for: 搜索以下项的结果
|
||||
matches_displayed: 显示的匹配项
|
||||
show_more: 显示更多
|
||||
explore_people_and_projects: 探索人员和项目
|
||||
sorry: 抱歉,找不到以下项的结果
|
||||
no_example: 看起来我们没有适合你的筛选条件的示例。
|
||||
try_another: 请尝试另一个筛选条件或添加你的代码示例。
|
||||
no_result: 抱歉,没有与你的筛选条件匹配的指南。
|
||||
learn: 了解如何添加代码示例
|
||||
communities_using_discussions: GitHub.com 上使用讨论的社区
|
||||
add_your_community: 添加社区
|
||||
sponsor_community: GitHub Sponsors 社区
|
||||
supported_releases: 支持的版本
|
||||
release_notes_for: 发行说明
|
||||
upgrade_from: 升级前的版本
|
||||
browse_all_docs: 浏览所有文档
|
||||
browse_all: 浏览全部
|
||||
docs: 文档
|
||||
explore_release_notes: 浏览发行说明
|
||||
view: 查看全部
|
||||
quickstart: Quickstart
|
||||
reference: Reference
|
||||
overview: Overview
|
||||
guides: Guides
|
||||
code_examples: Code examples
|
||||
search_code_examples: Search code examples
|
||||
search_results_for: Search results for
|
||||
matches_displayed: Matches displayed
|
||||
show_more: Show more
|
||||
explore_people_and_projects: Explore people and projects
|
||||
sorry: Sorry, there is no result for
|
||||
no_example: It looks like we don't have an example that fits your filter.
|
||||
try_another: Try another filter or add your code example.
|
||||
no_result: Sorry, there are no guides that match your filter.
|
||||
learn: Learn how to add a code example
|
||||
communities_using_discussions: Communities on GitHub.com using discussions
|
||||
add_your_community: Add your community
|
||||
sponsor_community: GitHub Sponsors community
|
||||
supported_releases: Supported releases
|
||||
release_notes_for: Release notes for
|
||||
upgrade_from: Upgrade from
|
||||
browse_all_docs: Browse all docs
|
||||
browse_all: Browse all
|
||||
docs: docs
|
||||
explore_release_notes: Explore release notes
|
||||
view: View all
|
||||
product_guides:
|
||||
start_path: 启动学习路径
|
||||
learning_paths: '{{ productMap[currentProduct].name }} 学习路径'
|
||||
learning_paths_desc: 学习路径是一系列帮助你掌握特定主题的指南。
|
||||
guides: '{{ productMap[currentProduct].name }} 指南'
|
||||
more_guides: 更多指南
|
||||
load_more: 加载更多指南
|
||||
all_guides: '所有 {{ productMap[currentProduct].name }} 指南'
|
||||
filter_instructions: 使用这些控件筛选指南列表
|
||||
start_path: Start learning path
|
||||
learning_paths: '{{ productMap[currentProduct].name }} learning paths'
|
||||
learning_paths_desc: Learning paths are a collection of guides that help you master a particular subject.
|
||||
guides: '{{ productMap[currentProduct].name }} guides'
|
||||
more_guides: more guides
|
||||
load_more: Load more guides
|
||||
all_guides: 'All {{ productMap[currentProduct].name }} guides'
|
||||
filter_instructions: Filter the guide list using these controls
|
||||
filters:
|
||||
type: 类型
|
||||
topic: 主题
|
||||
type: Type
|
||||
topic: Topic
|
||||
all: All
|
||||
guides_found:
|
||||
multiple: '找到了 {n} 个指南'
|
||||
one: 找到了 1 个指南
|
||||
none: 找不到指南
|
||||
multiple: '{n} guides found'
|
||||
one: 1 guide found
|
||||
none: No guides found
|
||||
guide_types:
|
||||
overview: 概述
|
||||
quick_start: 快速入门
|
||||
tutorial: 教程
|
||||
how_to: 操作指南
|
||||
reference: 参考
|
||||
overview: Overview
|
||||
quick_start: Quickstart
|
||||
tutorial: Tutorial
|
||||
how_to: How-to guide
|
||||
reference: Reference
|
||||
learning_track_nav:
|
||||
prevGuide: 上一个指南
|
||||
nextGuide: 下一个指南
|
||||
prevGuide: Previous guide
|
||||
nextGuide: Next guide
|
||||
toggle_images:
|
||||
off: 图像已关闭,点击显示
|
||||
on: 图像已打开,点击隐藏
|
||||
hide_single: 隐藏图像
|
||||
show_single: 显示图像
|
||||
off: Images are off, click to show
|
||||
on: Images are on, click to hide
|
||||
hide_single: Hide image
|
||||
show_single: Show image
|
||||
scroll_button:
|
||||
scroll_to_top: 滚动到顶部
|
||||
scroll_to_top: Scroll to top
|
||||
|
||||
@@ -23,7 +23,6 @@ prodname_ghe_cloud: 'GitHub Enterprise Cloud'
|
||||
prodname_ghe_managed: 'GitHub AE'
|
||||
prodname_ghe_one: 'GitHub One'
|
||||
prodname_docs: 'GitHub Docs'
|
||||
|
||||
prodname_free_user: 'GitHub Free'
|
||||
prodname_pro: 'GitHub Pro'
|
||||
prodname_team: 'GitHub Team'
|
||||
|
||||
Reference in New Issue
Block a user